From 925823691130a8dd9c367b992db52f3f98d4ee1a Mon Sep 17 00:00:00 2001 From: riccardopillar <98806807+riccardopillar@users.noreply.github.com> Date: Fri, 1 Jul 2022 22:25:42 +0700 Subject: [PATCH] BalancesHelperV2, Fuse, Diamond contract. (#82) * Resolved merge conflicts * add diamond contract (#71) * add diamond contract * update compiler version in .solhint * typo * fix typo * Update package.json (#76) - Changed version to 1.8.0 * Fuse support to etherspot (#79) * PRO-295 setup constants and update package.json * PRO-295 Fuse Sparknet deployments * update version and add network details * update compiled code * FUSE mainnet deployments * Updated deployments Co-authored-by: zincoshine * Update package release (#80) * update release * change release number * Support for SuperTokens in BalancesHelperV2 contract (#68) (#81) * Mainnet deployments * 1.7.0 * Resolved merge conflicts Co-authored-by: Luke Wickens <71776468+lukewickens1989@users.noreply.github.com> Co-authored-by: Luke Wickens Co-authored-by: Parthasarathy Ramanujam Co-authored-by: Luke Wickens <71776468+lukewickens1989@users.noreply.github.com> Co-authored-by: Luke Wickens Co-authored-by: zincoshine Co-authored-by: Utkir S Co-authored-by: Luke Wickens <71776468+lukewickens1989@users.noreply.github.com> Co-authored-by: Parthasarathy Ramanujam Co-authored-by: Luke Wickens --- .solhint.json | 2 +- DEPLOYMENTS.md | 48 + DEVELOPMENT.md | 2 + artifacts/Diamond.json | 35 + artifacts/DiamondCutFacet.json | 93 + artifacts/DiamondLoupeFacet.json | 106 + artifacts/IDiamondCut.json | 93 + artifacts/IDiamondLoupe.json | 87 + artifacts/IERC165.json | 30 + artifacts/IERC173.json | 37 + artifacts/LibDiamond.json | 72 + artifacts/OwnershipFacet.json | 37 + deploy/200_deploy_initial_facets.ts | 29 + deploy/201_deploy_diamond.ts | 24 + deploy/202_init_facets.ts | 28 + deployments/fuse/.chainId | 1 + deployments/fuse/BalancesHelper.json | 81 + deployments/fuse/BalancesHelperV2.json | 160 ++ deployments/fuse/Diamond.json | 94 + deployments/fuse/DiamondCutFacet.json | 134 + deployments/fuse/DiamondLoupeFacet.json | 176 ++ deployments/fuse/ENSController.json | 1152 ++++++++ deployments/fuse/ENSHelper.json | 208 ++ deployments/fuse/ENSRegistry.json | 510 ++++ deployments/fuse/ENSReverseRegistrar.json | 274 ++ deployments/fuse/ExternalAccountRegistry.json | 489 ++++ deployments/fuse/Gateway.json | 578 ++++ deployments/fuse/OwnershipFacet.json | 85 + deployments/fuse/PaymentRegistry.json | 1434 ++++++++++ .../fuse/PersonalAccountImplementationV1.json | 326 +++ deployments/fuse/PersonalAccountRegistry.json | 1058 +++++++ deployments/fuse/WrappedWeiToken.json | 670 +++++ .../1bdf84d4bd28700579af1cc4796e2cae.json | 154 ++ .../7a183f869f73d4ccd46c6d23b208518b.json | 79 + deployments/fuseSparknet/.chainId | 1 + deployments/fuseSparknet/BalancesHelper.json | 81 + .../fuseSparknet/BalancesHelperV2.json | 160 ++ deployments/fuseSparknet/Diamond.json | 94 + deployments/fuseSparknet/DiamondCutFacet.json | 134 + .../fuseSparknet/DiamondLoupeFacet.json | 176 ++ deployments/fuseSparknet/ENSController.json | 1152 ++++++++ deployments/fuseSparknet/ENSHelper.json | 208 ++ deployments/fuseSparknet/ENSRegistry.json | 510 ++++ .../fuseSparknet/ENSReverseRegistrar.json | 274 ++ .../fuseSparknet/ExternalAccountRegistry.json | 489 ++++ deployments/fuseSparknet/Gateway.json | 578 ++++ deployments/fuseSparknet/OwnershipFacet.json | 85 + deployments/fuseSparknet/PaymentRegistry.json | 1434 ++++++++++ .../PersonalAccountImplementationV1.json | 326 +++ .../fuseSparknet/PersonalAccountRegistry.json | 1058 +++++++ deployments/fuseSparknet/WrappedWeiToken.json | 670 +++++ .../1bdf84d4bd28700579af1cc4796e2cae.json | 154 ++ .../7a183f869f73d4ccd46c6d23b208518b.json | 79 + dist/constants.d.ts | 14 + dist/constants.js | 14 + dist/contracts.js | 2427 +++++++++++++++-- dist/deploy/001_create-common.js | 8 +- dist/deploy/200_deploy_initial_facets.d.ts | 3 + dist/deploy/200_deploy_initial_facets.js | 20 + dist/deploy/201_deploy_diamond.d.ts | 3 + dist/deploy/201_deploy_diamond.js | 15 + dist/deploy/202_init_facets.d.ts | 3 + dist/deploy/202_init_facets.js | 20 + dist/extensions/constants.js | 1 - dist/hardhat.config.d.ts | 13 +- dist/hardhat.config.js | 74 +- dist/typings/Account.d.ts | 161 ++ dist/typings/Account.js | 2 + dist/typings/AccountBase.d.ts | 65 + dist/typings/AccountBase.js | 2 + dist/typings/AccountController.d.ts | 137 + dist/typings/AccountController.js | 2 + dist/typings/AccountControllerMock.d.ts | 249 ++ dist/typings/AccountControllerMock.js | 2 + dist/typings/AccountImplementationV1.d.ts | 192 ++ dist/typings/AccountImplementationV1.js | 2 + dist/typings/AccountImplementationV1Mock.d.ts | 216 ++ dist/typings/AccountImplementationV1Mock.js | 2 + dist/typings/AccountRegistry.d.ts | 70 + dist/typings/AccountRegistry.js | 2 + dist/typings/AccountRegistryMock.d.ts | 110 + dist/typings/AccountRegistryMock.js | 2 + dist/typings/BalancesHelper.d.ts | 65 + dist/typings/BalancesHelper.js | 2 + dist/typings/BalancesHelperV2.d.ts | 49 + dist/typings/BalancesHelperV2.js | 2 + dist/typings/Controlled.d.ts | 65 + dist/typings/Controlled.js | 2 + dist/typings/ENSAddressResolver.d.ts | 151 + dist/typings/ENSAddressResolver.js | 2 + dist/typings/ENSController.d.ts | 762 ++++++ dist/typings/ENSController.js | 2 + dist/typings/ENSHelper.d.ts | 139 + dist/typings/ENSHelper.js | 2 + dist/typings/ENSNameResolver.d.ts | 119 + dist/typings/ENSNameResolver.js | 2 + dist/typings/ENSPubKeyResolver.d.ts | 130 + dist/typings/ENSPubKeyResolver.js | 2 + dist/typings/ENSRegistry.d.ts | 275 ++ dist/typings/ENSRegistry.js | 2 + dist/typings/ENSReverseRegistrar.d.ts | 195 ++ dist/typings/ENSReverseRegistrar.js | 2 + dist/typings/ENSTextResolver.d.ts | 121 + dist/typings/ENSTextResolver.js | 2 + dist/typings/ERC20Token.d.ts | 183 ++ dist/typings/ERC20Token.js | 2 + dist/typings/ExternalAccountRegistry.d.ts | 203 ++ dist/typings/ExternalAccountRegistry.js | 2 + dist/typings/Gateway.d.ts | 318 +++ dist/typings/Gateway.js | 2 + dist/typings/GatewayRecipient.d.ts | 65 + dist/typings/GatewayRecipient.js | 2 + dist/typings/GatewayRecipientMock.d.ts | 121 + dist/typings/GatewayRecipientMock.js | 2 + dist/typings/Guarded.d.ts | 131 + dist/typings/Guarded.js | 2 + dist/typings/GuardedMock.d.ts | 155 ++ dist/typings/GuardedMock.js | 2 + dist/typings/IERC20.d.ts | 135 + dist/typings/IERC20.js | 2 + dist/typings/ISuperAgreement.d.ts | 73 + dist/typings/ISuperAgreement.js | 2 + dist/typings/ISuperfluidToken.d.ts | 419 +++ dist/typings/ISuperfluidToken.js | 2 + dist/typings/Initializable.d.ts | 75 + dist/typings/Initializable.js | 2 + dist/typings/PaymentDepositAccount.d.ts | 105 + dist/typings/PaymentDepositAccount.js | 2 + dist/typings/PaymentRegistry.d.ts | 665 +++++ dist/typings/PaymentRegistry.js | 2 + .../PersonalAccountImplementationV1.d.ts | 216 ++ .../PersonalAccountImplementationV1.js | 2 + dist/typings/PersonalAccountRegistry.d.ts | 566 ++++ dist/typings/PersonalAccountRegistry.js | 2 + dist/typings/SignatureValidator.d.ts | 65 + dist/typings/SignatureValidator.js | 2 + dist/typings/WrappedWeiToken.d.ts | 431 +++ dist/typings/WrappedWeiToken.js | 2 + dist/typings/common.d.ts | 21 + dist/typings/common.js | 2 + .../factories/AccountBase__factory.d.ts | 34 + .../typings/factories/AccountBase__factory.js | 103 + .../AccountControllerMock__factory.d.ts | 58 + .../AccountControllerMock__factory.js | 383 +++ .../factories/AccountController__factory.d.ts | 35 + .../factories/AccountController__factory.js | 194 ++ .../AccountImplementationV1Mock__factory.d.ts | 58 + .../AccountImplementationV1Mock__factory.js | 489 ++++ .../AccountImplementationV1__factory.d.ts | 35 + .../AccountImplementationV1__factory.js | 404 +++ .../AccountRegistryMock__factory.d.ts | 34 + .../factories/AccountRegistryMock__factory.js | 217 ++ .../factories/AccountRegistry__factory.d.ts | 22 + .../factories/AccountRegistry__factory.js | 125 + dist/typings/factories/Account__factory.d.ts | 50 + dist/typings/factories/Account__factory.js | 297 ++ .../factories/BalancesHelperV2__factory.d.ts | 50 + .../factories/BalancesHelperV2__factory.js | 124 + .../factories/BalancesHelper__factory.d.ts | 34 + .../factories/BalancesHelper__factory.js | 114 + .../factories/Controlled__factory.d.ts | 22 + dist/typings/factories/Controlled__factory.js | 80 + .../ENSAddressResolver__factory.d.ts | 35 + .../factories/ENSAddressResolver__factory.js | 246 ++ .../factories/ENSController__factory.d.ts | 74 + .../factories/ENSController__factory.js | 1303 +++++++++ .../typings/factories/ENSHelper__factory.d.ts | 54 + dist/typings/factories/ENSHelper__factory.js | 236 ++ .../factories/ENSNameResolver__factory.d.ts | 35 + .../factories/ENSNameResolver__factory.js | 174 ++ .../factories/ENSPubKeyResolver__factory.d.ts | 35 + .../factories/ENSPubKeyResolver__factory.js | 190 ++ .../factories/ENSRegistry__factory.d.ts | 54 + .../typings/factories/ENSRegistry__factory.js | 464 ++++ .../ENSReverseRegistrar__factory.d.ts | 54 + .../factories/ENSReverseRegistrar__factory.js | 310 +++ .../factories/ENSTextResolver__factory.d.ts | 35 + .../factories/ENSTextResolver__factory.js | 190 ++ .../factories/ERC20Token__factory.d.ts | 35 + dist/typings/factories/ERC20Token__factory.js | 289 ++ .../ExternalAccountRegistry__factory.d.ts | 47 + .../ExternalAccountRegistry__factory.js | 324 +++ .../GatewayRecipientMock__factory.d.ts | 58 + .../GatewayRecipientMock__factory.js | 197 ++ .../factories/GatewayRecipient__factory.d.ts | 22 + .../factories/GatewayRecipient__factory.js | 80 + dist/typings/factories/Gateway__factory.d.ts | 74 + dist/typings/factories/Gateway__factory.js | 536 ++++ .../factories/GuardedMock__factory.d.ts | 58 + .../typings/factories/GuardedMock__factory.js | 259 ++ dist/typings/factories/Guarded__factory.d.ts | 35 + dist/typings/factories/Guarded__factory.js | 174 ++ dist/typings/factories/IERC20__factory.d.ts | 35 + dist/typings/factories/IERC20__factory.js | 199 ++ .../factories/ISuperAgreement__factory.d.ts | 22 + .../factories/ISuperAgreement__factory.js | 68 + .../factories/ISuperfluidToken__factory.d.ts | 35 + .../factories/ISuperfluidToken__factory.js | 657 +++++ .../factories/Initializable__factory.d.ts | 35 + .../factories/Initializable__factory.js | 93 + .../PaymentDepositAccount__factory.d.ts | 46 + .../PaymentDepositAccount__factory.js | 192 ++ .../factories/PaymentRegistry__factory.d.ts | 74 + .../factories/PaymentRegistry__factory.js | 1195 ++++++++ ...sonalAccountImplementationV1__factory.d.ts | 54 + ...ersonalAccountImplementationV1__factory.js | 483 ++++ .../PersonalAccountRegistry__factory.d.ts | 54 + .../PersonalAccountRegistry__factory.js | 990 +++++++ .../SignatureValidator__factory.d.ts | 22 + .../factories/SignatureValidator__factory.js | 80 + .../factories/WrappedWeiToken__factory.d.ts | 61 + .../factories/WrappedWeiToken__factory.js | 654 +++++ dist/typings/index.d.ts | 72 + dist/typings/index.js | 75 + dist/utils/diamond.d.ts | 11 + dist/utils/diamond.js | 135 + extensions/constants.ts | 12 + package-lock.json | 4 +- package.json | 4 +- src/bridges/Diamond.sol | 63 + src/bridges/README.md | 3 + src/bridges/facets/DiamondCutFacet.sol | 22 + src/bridges/facets/DiamondLoupeFacet.sol | 65 + src/bridges/facets/OwnershipFacet.sol | 16 + src/bridges/interfaces/IDiamondCut.sol | 31 + src/bridges/interfaces/IDiamondLoupe.sol | 33 + src/bridges/interfaces/IERC165.sol | 12 + src/bridges/interfaces/IERC173.sol | 16 + src/bridges/libs/LibDiamond.sol | 214 ++ test/bridges/Diamond.ts | 48 + typings/Diamond.ts | 50 + typings/DiamondCutFacet.ts | 139 + typings/DiamondLoupeFacet.ts | 209 ++ typings/IDiamondCut.ts | 139 + typings/IDiamondLoupe.ts | 175 ++ typings/IERC165.ts | 95 + typings/IERC173.ts | 110 + typings/LibDiamond.ts | 103 + typings/OwnershipFacet.ts | 110 + typings/factories/DiamondCutFacet__factory.ts | 143 + .../factories/DiamondLoupeFacet__factory.ts | 156 ++ typings/factories/Diamond__factory.ts | 100 + typings/factories/IDiamondCut__factory.ts | 105 + typings/factories/IDiamondLoupe__factory.ts | 99 + typings/factories/IERC165__factory.ts | 42 + typings/factories/IERC173__factory.ts | 49 + typings/factories/LibDiamond__factory.ts | 119 + typings/factories/OwnershipFacet__factory.ts | 87 + typings/index.ts | 18 + utils/diamond.ts | 191 ++ 250 files changed, 42475 insertions(+), 244 deletions(-) create mode 100644 artifacts/Diamond.json create mode 100644 artifacts/DiamondCutFacet.json create mode 100644 artifacts/DiamondLoupeFacet.json create mode 100644 artifacts/IDiamondCut.json create mode 100644 artifacts/IDiamondLoupe.json create mode 100644 artifacts/IERC165.json create mode 100644 artifacts/IERC173.json create mode 100644 artifacts/LibDiamond.json create mode 100644 artifacts/OwnershipFacet.json create mode 100644 deploy/200_deploy_initial_facets.ts create mode 100644 deploy/201_deploy_diamond.ts create mode 100644 deploy/202_init_facets.ts create mode 100644 deployments/fuse/.chainId create mode 100644 deployments/fuse/BalancesHelper.json create mode 100644 deployments/fuse/BalancesHelperV2.json create mode 100644 deployments/fuse/Diamond.json create mode 100644 deployments/fuse/DiamondCutFacet.json create mode 100644 deployments/fuse/DiamondLoupeFacet.json create mode 100644 deployments/fuse/ENSController.json create mode 100644 deployments/fuse/ENSHelper.json create mode 100644 deployments/fuse/ENSRegistry.json create mode 100644 deployments/fuse/ENSReverseRegistrar.json create mode 100644 deployments/fuse/ExternalAccountRegistry.json create mode 100644 deployments/fuse/Gateway.json create mode 100644 deployments/fuse/OwnershipFacet.json create mode 100644 deployments/fuse/PaymentRegistry.json create mode 100644 deployments/fuse/PersonalAccountImplementationV1.json create mode 100644 deployments/fuse/PersonalAccountRegistry.json create mode 100644 deployments/fuse/WrappedWeiToken.json create mode 100644 deployments/fuse/solcInputs/1bdf84d4bd28700579af1cc4796e2cae.json create mode 100644 deployments/fuse/solcInputs/7a183f869f73d4ccd46c6d23b208518b.json create mode 100644 deployments/fuseSparknet/.chainId create mode 100644 deployments/fuseSparknet/BalancesHelper.json create mode 100644 deployments/fuseSparknet/BalancesHelperV2.json create mode 100644 deployments/fuseSparknet/Diamond.json create mode 100644 deployments/fuseSparknet/DiamondCutFacet.json create mode 100644 deployments/fuseSparknet/DiamondLoupeFacet.json create mode 100644 deployments/fuseSparknet/ENSController.json create mode 100644 deployments/fuseSparknet/ENSHelper.json create mode 100644 deployments/fuseSparknet/ENSRegistry.json create mode 100644 deployments/fuseSparknet/ENSReverseRegistrar.json create mode 100644 deployments/fuseSparknet/ExternalAccountRegistry.json create mode 100644 deployments/fuseSparknet/Gateway.json create mode 100644 deployments/fuseSparknet/OwnershipFacet.json create mode 100644 deployments/fuseSparknet/PaymentRegistry.json create mode 100644 deployments/fuseSparknet/PersonalAccountImplementationV1.json create mode 100644 deployments/fuseSparknet/PersonalAccountRegistry.json create mode 100644 deployments/fuseSparknet/WrappedWeiToken.json create mode 100644 deployments/fuseSparknet/solcInputs/1bdf84d4bd28700579af1cc4796e2cae.json create mode 100644 deployments/fuseSparknet/solcInputs/7a183f869f73d4ccd46c6d23b208518b.json create mode 100644 dist/deploy/200_deploy_initial_facets.d.ts create mode 100644 dist/deploy/200_deploy_initial_facets.js create mode 100644 dist/deploy/201_deploy_diamond.d.ts create mode 100644 dist/deploy/201_deploy_diamond.js create mode 100644 dist/deploy/202_init_facets.d.ts create mode 100644 dist/deploy/202_init_facets.js create mode 100644 dist/typings/Account.d.ts create mode 100644 dist/typings/Account.js create mode 100644 dist/typings/AccountBase.d.ts create mode 100644 dist/typings/AccountBase.js create mode 100644 dist/typings/AccountController.d.ts create mode 100644 dist/typings/AccountController.js create mode 100644 dist/typings/AccountControllerMock.d.ts create mode 100644 dist/typings/AccountControllerMock.js create mode 100644 dist/typings/AccountImplementationV1.d.ts create mode 100644 dist/typings/AccountImplementationV1.js create mode 100644 dist/typings/AccountImplementationV1Mock.d.ts create mode 100644 dist/typings/AccountImplementationV1Mock.js create mode 100644 dist/typings/AccountRegistry.d.ts create mode 100644 dist/typings/AccountRegistry.js create mode 100644 dist/typings/AccountRegistryMock.d.ts create mode 100644 dist/typings/AccountRegistryMock.js create mode 100644 dist/typings/BalancesHelper.d.ts create mode 100644 dist/typings/BalancesHelper.js create mode 100644 dist/typings/BalancesHelperV2.d.ts create mode 100644 dist/typings/BalancesHelperV2.js create mode 100644 dist/typings/Controlled.d.ts create mode 100644 dist/typings/Controlled.js create mode 100644 dist/typings/ENSAddressResolver.d.ts create mode 100644 dist/typings/ENSAddressResolver.js create mode 100644 dist/typings/ENSController.d.ts create mode 100644 dist/typings/ENSController.js create mode 100644 dist/typings/ENSHelper.d.ts create mode 100644 dist/typings/ENSHelper.js create mode 100644 dist/typings/ENSNameResolver.d.ts create mode 100644 dist/typings/ENSNameResolver.js create mode 100644 dist/typings/ENSPubKeyResolver.d.ts create mode 100644 dist/typings/ENSPubKeyResolver.js create mode 100644 dist/typings/ENSRegistry.d.ts create mode 100644 dist/typings/ENSRegistry.js create mode 100644 dist/typings/ENSReverseRegistrar.d.ts create mode 100644 dist/typings/ENSReverseRegistrar.js create mode 100644 dist/typings/ENSTextResolver.d.ts create mode 100644 dist/typings/ENSTextResolver.js create mode 100644 dist/typings/ERC20Token.d.ts create mode 100644 dist/typings/ERC20Token.js create mode 100644 dist/typings/ExternalAccountRegistry.d.ts create mode 100644 dist/typings/ExternalAccountRegistry.js create mode 100644 dist/typings/Gateway.d.ts create mode 100644 dist/typings/Gateway.js create mode 100644 dist/typings/GatewayRecipient.d.ts create mode 100644 dist/typings/GatewayRecipient.js create mode 100644 dist/typings/GatewayRecipientMock.d.ts create mode 100644 dist/typings/GatewayRecipientMock.js create mode 100644 dist/typings/Guarded.d.ts create mode 100644 dist/typings/Guarded.js create mode 100644 dist/typings/GuardedMock.d.ts create mode 100644 dist/typings/GuardedMock.js create mode 100644 dist/typings/IERC20.d.ts create mode 100644 dist/typings/IERC20.js create mode 100644 dist/typings/ISuperAgreement.d.ts create mode 100644 dist/typings/ISuperAgreement.js create mode 100644 dist/typings/ISuperfluidToken.d.ts create mode 100644 dist/typings/ISuperfluidToken.js create mode 100644 dist/typings/Initializable.d.ts create mode 100644 dist/typings/Initializable.js create mode 100644 dist/typings/PaymentDepositAccount.d.ts create mode 100644 dist/typings/PaymentDepositAccount.js create mode 100644 dist/typings/PaymentRegistry.d.ts create mode 100644 dist/typings/PaymentRegistry.js create mode 100644 dist/typings/PersonalAccountImplementationV1.d.ts create mode 100644 dist/typings/PersonalAccountImplementationV1.js create mode 100644 dist/typings/PersonalAccountRegistry.d.ts create mode 100644 dist/typings/PersonalAccountRegistry.js create mode 100644 dist/typings/SignatureValidator.d.ts create mode 100644 dist/typings/SignatureValidator.js create mode 100644 dist/typings/WrappedWeiToken.d.ts create mode 100644 dist/typings/WrappedWeiToken.js create mode 100644 dist/typings/common.d.ts create mode 100644 dist/typings/common.js create mode 100644 dist/typings/factories/AccountBase__factory.d.ts create mode 100644 dist/typings/factories/AccountBase__factory.js create mode 100644 dist/typings/factories/AccountControllerMock__factory.d.ts create mode 100644 dist/typings/factories/AccountControllerMock__factory.js create mode 100644 dist/typings/factories/AccountController__factory.d.ts create mode 100644 dist/typings/factories/AccountController__factory.js create mode 100644 dist/typings/factories/AccountImplementationV1Mock__factory.d.ts create mode 100644 dist/typings/factories/AccountImplementationV1Mock__factory.js create mode 100644 dist/typings/factories/AccountImplementationV1__factory.d.ts create mode 100644 dist/typings/factories/AccountImplementationV1__factory.js create mode 100644 dist/typings/factories/AccountRegistryMock__factory.d.ts create mode 100644 dist/typings/factories/AccountRegistryMock__factory.js create mode 100644 dist/typings/factories/AccountRegistry__factory.d.ts create mode 100644 dist/typings/factories/AccountRegistry__factory.js create mode 100644 dist/typings/factories/Account__factory.d.ts create mode 100644 dist/typings/factories/Account__factory.js create mode 100644 dist/typings/factories/BalancesHelperV2__factory.d.ts create mode 100644 dist/typings/factories/BalancesHelperV2__factory.js create mode 100644 dist/typings/factories/BalancesHelper__factory.d.ts create mode 100644 dist/typings/factories/BalancesHelper__factory.js create mode 100644 dist/typings/factories/Controlled__factory.d.ts create mode 100644 dist/typings/factories/Controlled__factory.js create mode 100644 dist/typings/factories/ENSAddressResolver__factory.d.ts create mode 100644 dist/typings/factories/ENSAddressResolver__factory.js create mode 100644 dist/typings/factories/ENSController__factory.d.ts create mode 100644 dist/typings/factories/ENSController__factory.js create mode 100644 dist/typings/factories/ENSHelper__factory.d.ts create mode 100644 dist/typings/factories/ENSHelper__factory.js create mode 100644 dist/typings/factories/ENSNameResolver__factory.d.ts create mode 100644 dist/typings/factories/ENSNameResolver__factory.js create mode 100644 dist/typings/factories/ENSPubKeyResolver__factory.d.ts create mode 100644 dist/typings/factories/ENSPubKeyResolver__factory.js create mode 100644 dist/typings/factories/ENSRegistry__factory.d.ts create mode 100644 dist/typings/factories/ENSRegistry__factory.js create mode 100644 dist/typings/factories/ENSReverseRegistrar__factory.d.ts create mode 100644 dist/typings/factories/ENSReverseRegistrar__factory.js create mode 100644 dist/typings/factories/ENSTextResolver__factory.d.ts create mode 100644 dist/typings/factories/ENSTextResolver__factory.js create mode 100644 dist/typings/factories/ERC20Token__factory.d.ts create mode 100644 dist/typings/factories/ERC20Token__factory.js create mode 100644 dist/typings/factories/ExternalAccountRegistry__factory.d.ts create mode 100644 dist/typings/factories/ExternalAccountRegistry__factory.js create mode 100644 dist/typings/factories/GatewayRecipientMock__factory.d.ts create mode 100644 dist/typings/factories/GatewayRecipientMock__factory.js create mode 100644 dist/typings/factories/GatewayRecipient__factory.d.ts create mode 100644 dist/typings/factories/GatewayRecipient__factory.js create mode 100644 dist/typings/factories/Gateway__factory.d.ts create mode 100644 dist/typings/factories/Gateway__factory.js create mode 100644 dist/typings/factories/GuardedMock__factory.d.ts create mode 100644 dist/typings/factories/GuardedMock__factory.js create mode 100644 dist/typings/factories/Guarded__factory.d.ts create mode 100644 dist/typings/factories/Guarded__factory.js create mode 100644 dist/typings/factories/IERC20__factory.d.ts create mode 100644 dist/typings/factories/IERC20__factory.js create mode 100644 dist/typings/factories/ISuperAgreement__factory.d.ts create mode 100644 dist/typings/factories/ISuperAgreement__factory.js create mode 100644 dist/typings/factories/ISuperfluidToken__factory.d.ts create mode 100644 dist/typings/factories/ISuperfluidToken__factory.js create mode 100644 dist/typings/factories/Initializable__factory.d.ts create mode 100644 dist/typings/factories/Initializable__factory.js create mode 100644 dist/typings/factories/PaymentDepositAccount__factory.d.ts create mode 100644 dist/typings/factories/PaymentDepositAccount__factory.js create mode 100644 dist/typings/factories/PaymentRegistry__factory.d.ts create mode 100644 dist/typings/factories/PaymentRegistry__factory.js create mode 100644 dist/typings/factories/PersonalAccountImplementationV1__factory.d.ts create mode 100644 dist/typings/factories/PersonalAccountImplementationV1__factory.js create mode 100644 dist/typings/factories/PersonalAccountRegistry__factory.d.ts create mode 100644 dist/typings/factories/PersonalAccountRegistry__factory.js create mode 100644 dist/typings/factories/SignatureValidator__factory.d.ts create mode 100644 dist/typings/factories/SignatureValidator__factory.js create mode 100644 dist/typings/factories/WrappedWeiToken__factory.d.ts create mode 100644 dist/typings/factories/WrappedWeiToken__factory.js create mode 100644 dist/typings/index.d.ts create mode 100644 dist/typings/index.js create mode 100644 dist/utils/diamond.d.ts create mode 100644 dist/utils/diamond.js create mode 100644 src/bridges/Diamond.sol create mode 100644 src/bridges/README.md create mode 100644 src/bridges/facets/DiamondCutFacet.sol create mode 100644 src/bridges/facets/DiamondLoupeFacet.sol create mode 100644 src/bridges/facets/OwnershipFacet.sol create mode 100644 src/bridges/interfaces/IDiamondCut.sol create mode 100644 src/bridges/interfaces/IDiamondLoupe.sol create mode 100644 src/bridges/interfaces/IERC165.sol create mode 100644 src/bridges/interfaces/IERC173.sol create mode 100644 src/bridges/libs/LibDiamond.sol create mode 100644 test/bridges/Diamond.ts create mode 100644 typings/Diamond.ts create mode 100644 typings/DiamondCutFacet.ts create mode 100644 typings/DiamondLoupeFacet.ts create mode 100644 typings/IDiamondCut.ts create mode 100644 typings/IDiamondLoupe.ts create mode 100644 typings/IERC165.ts create mode 100644 typings/IERC173.ts create mode 100644 typings/LibDiamond.ts create mode 100644 typings/OwnershipFacet.ts create mode 100644 typings/factories/DiamondCutFacet__factory.ts create mode 100644 typings/factories/DiamondLoupeFacet__factory.ts create mode 100644 typings/factories/Diamond__factory.ts create mode 100644 typings/factories/IDiamondCut__factory.ts create mode 100644 typings/factories/IDiamondLoupe__factory.ts create mode 100644 typings/factories/IERC165__factory.ts create mode 100644 typings/factories/IERC173__factory.ts create mode 100644 typings/factories/LibDiamond__factory.ts create mode 100644 typings/factories/OwnershipFacet__factory.ts create mode 100644 utils/diamond.ts diff --git a/.solhint.json b/.solhint.json index 6940acc5..879089df 100644 --- a/.solhint.json +++ b/.solhint.json @@ -3,7 +3,7 @@ "rules": { "compiler-version": [ "error", - "^0.6.0" + "^0.6.0 || 0.8.4" ], "no-empty-blocks": "off", "mark-callable-contracts": "off", diff --git a/DEPLOYMENTS.md b/DEPLOYMENTS.md index ff719ccf..61c993b9 100644 --- a/DEPLOYMENTS.md +++ b/DEPLOYMENTS.md @@ -25,9 +25,35 @@ | `BalancesHelper` | `optimismKovan` | 0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b | 0x77429ac3d85ee908dcc1a08e87270011a4c9a9d33b014489527c987001330064 | | `BalancesHelper` | `moonbeam` | 0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b | 0x4b6bbfd5814393a15e2426b19ea38fa9cb8184ef7a76bf1e1c5b4aa4bc6e1b36 | | `BalancesHelper` | `moonbase` | 0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b | 0x60c79eeb1b21c83a35cb9d4db244607fefecf66834a021d4b635d40376eb0794 | +| `BalancesHelper` | `fuse` | 0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b | 0x64b505015e713e0a03825ab347fff4e9d164ba3b1f0c80b8698de2933ce0046d | +| `BalancesHelper` | `fuseSparknet` | 0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b | 0x17eca87186670f812655a315ee26a3f8a118accde1369e1a14e85e7f748ca63f | | `BalancesHelper` | `celo` | 0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b | 0xfc0dc010dd2df5473efc9e99d884818145c485de11993612ee8873680eed7b76 | | `BalancesHelper` | `celoTest` | 0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b | 0x6b910a25366bfda341b56258532d882579db1de46ace8e7457cc8da90cf9877b | | `BalancesHelper` | `etherspot` | 0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b | 0xac7270105c381ce52e137b815727c88f9f03a0005afa776154de199de41c1d33 | +| `BalancesHelperV2` | `mainnet` | [0xe5A160F89f330cc933816E896a3F36376DE0a835](https://etherscan.io/address/0xe5A160F89f330cc933816E896a3F36376DE0a835) | [0xf6ea0fa211f992a6b409e3d9808abe1c3c6d9d3136969a5ee403ed9b26c9741f](https://etherscan.io/tx/0xf6ea0fa211f992a6b409e3d9808abe1c3c6d9d3136969a5ee403ed9b26c9741f) | +| `BalancesHelperV2` | `ropsten` | [0xe5A160F89f330cc933816E896a3F36376DE0a835](https://ropsten.etherscan.io/address/0xe5A160F89f330cc933816E896a3F36376DE0a835) | [0x85a9b1e970b917b4af56111429d9424409e0527fec62079e6451a94de7a5c737](https://ropsten.etherscan.io/tx/0x85a9b1e970b917b4af56111429d9424409e0527fec62079e6451a94de7a5c737) | +| `BalancesHelperV2` | `goerli` | [0xe5A160F89f330cc933816E896a3F36376DE0a835](https://goerli.etherscan.io/address/0xe5A160F89f330cc933816E896a3F36376DE0a835) | [0x730049031e4acf1595d7c01d6184b9fb1c6a2855753cd4b765f856a0da9fa6eb](https://goerli.etherscan.io/tx/0x730049031e4acf1595d7c01d6184b9fb1c6a2855753cd4b765f856a0da9fa6eb) | +| `BalancesHelperV2` | `xdai` | [0xe5A160F89f330cc933816E896a3F36376DE0a835](https://blockscout.com/poa/xdai/address/0xe5A160F89f330cc933816E896a3F36376DE0a835) | [0xaf526ad2091fb9fc3c64c04b23ed38580c8e23195c9a5c56956396e425d95fec](https://blockscout.com/poa/xdai/tx/0xaf526ad2091fb9fc3c64c04b23ed38580c8e23195c9a5c56956396e425d95fec) | +| `BalancesHelperV2` | `bsc` | [0xe5A160F89f330cc933816E896a3F36376DE0a835](https://bscscan.com/address/0xe5A160F89f330cc933816E896a3F36376DE0a835) | [0xa2074dd7aa22eb02ef1357daee07b09518a421b11d49c65b8c5b29605e769ed8](https://bscscan.com/tx/0xa2074dd7aa22eb02ef1357daee07b09518a421b11d49c65b8c5b29605e769ed8) | +| `BalancesHelperV2` | `fantom` | [0xe5A160F89f330cc933816E896a3F36376DE0a835](https://ftmscan.com/address/0xe5A160F89f330cc933816E896a3F36376DE0a835) | [0x42ddbc5b0c33282438089ab5876a35358ab55571ece08a1ac4a8186eec650677](https://ftmscan.com/tx/0x42ddbc5b0c33282438089ab5876a35358ab55571ece08a1ac4a8186eec650677) | +| `BalancesHelperV2` | `fantomTest` | [0xe5A160F89f330cc933816E896a3F36376DE0a835](https://explorer.testnet.fantom.network/address/0xe5A160F89f330cc933816E896a3F36376DE0a835) | [0xcf785451e31308e606ccbb64338bb31ca0d21dd14dee921d36778cbbe190fff5](https://explorer.testnet.fantom.network/transactions/0xcf785451e31308e606ccbb64338bb31ca0d21dd14dee921d36778cbbe190fff5) | +| `BalancesHelperV2` | `matic` | [0xe5A160F89f330cc933816E896a3F36376DE0a835](https://polygonscan.com/address/0xe5A160F89f330cc933816E896a3F36376DE0a835) | [0x67dfa193a4d9425d9e8fd23030c11d5a77cab3f86bb0bb58c57c7b8728cb611a](https://polygonscan.com/tx/0x67dfa193a4d9425d9e8fd23030c11d5a77cab3f86bb0bb58c57c7b8728cb611a) | +| `BalancesHelperV2` | `mumbai` | [0xe5A160F89f330cc933816E896a3F36376DE0a835](https://mumbai.polygonscan.com/address/0xe5A160F89f330cc933816E896a3F36376DE0a835) | [0x4ac32927cd25414eefdaa64fbdb217a9b9aac98105283cfe7d259635ce7de87a](https://mumbai.polygonscan.com/tx/0x4ac32927cd25414eefdaa64fbdb217a9b9aac98105283cfe7d259635ce7de87a) | +| `BalancesHelperV2` | `avalanche` | [0x13261B2b8674Cb855c408F3721281330ee16C66E](https://snowtrace.io/address/0x13261B2b8674Cb855c408F3721281330ee16C66E) | [0x3e0f88326aad61f07006016d497b4ae8c80f17ca17b1407ab928127bc3f6b06d](https://snowtrace.io/tx/0x3e0f88326aad61f07006016d497b4ae8c80f17ca17b1407ab928127bc3f6b06d) | +| `BalancesHelperV2` | `aurora` | 0xe5A160F89f330cc933816E896a3F36376DE0a835 | 0x5ab4c1067308ff7ddac1f9e3db39ed42dadf2d1a3d2dd9337c80060b7798772d | +| `BalancesHelperV2` | `auroraTest` | 0xe5A160F89f330cc933816E896a3F36376DE0a835 | 0xcbbf436ff90d4351e8409846374d3be44b625fd55601e8adebf392db7056f9f5 | +| `BalancesHelperV2` | `arbitrum` | 0xe5A160F89f330cc933816E896a3F36376DE0a835 | 0x79d8b685ddc42564227581bdf9f53cd44f8ca3fb2a97187ed1c43c831b091d0f | +| `BalancesHelperV2` | `optimism` | 0xe5A160F89f330cc933816E896a3F36376DE0a835 | 0xb5916d6b2475a15802fd20274bcc82751ffaf6757d504f664fce079edbd8fd72 | +| `BalancesHelperV2` | `moonbeam` | 0xe5A160F89f330cc933816E896a3F36376DE0a835 | 0xf1b01798e9062f8ec03d1423b2c5350a24c4613b4f8178e72047fde6aee15324 | +| `BalancesHelperV2` | `fuse` | 0xe5A160F89f330cc933816E896a3F36376DE0a835 | 0xc2647efac011deb1cdd2ad539cbbb606cfa84106b7bea2e387f964ea2f5a288a | +| `BalancesHelperV2` | `fuseSparknet` | 0xe5A160F89f330cc933816E896a3F36376DE0a835 | 0x794c538975130b41812df708b2174c971ab7af6fa1e19bb5d2b4301c7071c893 | +| `BalancesHelperV2` | `celo` | 0xe5A160F89f330cc933816E896a3F36376DE0a835 | 0xfdc0e0d89733dfb237e8b3f4fa36810b84d079d6ecf0b50e435e9542d8b8cdbc | +| `Diamond` | `fuse` | 0xF1447514368fCC942279862a8B5D6Ed7beDFf431 | 0x5931e70b172dc87726ad99af59018ccf9b8cfc9671a6c277f584dcd6871a9487 | +| `Diamond` | `fuseSparknet` | 0xF1447514368fCC942279862a8B5D6Ed7beDFf431 | 0xb04462e8680ede04a12a3dfa9c2b9df35c6ae2f28ec7ea1a15a400e92a722995 | +| `DiamondCutFacet` | `fuse` | 0xf859F683a47b3D0E2A964eFDdf7392972700a101 | 0x02bb6e8045d5d9b7c69dea3802d5e7a6d33a4844dd6f6263dc0c444604ecc450 | +| `DiamondCutFacet` | `fuseSparknet` | 0xf859F683a47b3D0E2A964eFDdf7392972700a101 | 0x5e65bab5b380676f95b76498d68642e6e86894c08089c072b952f6aa1bf8451b | +| `DiamondLoupeFacet` | `fuse` | 0x8BFbB21683e21DC4B11af352117d6D4F2bc62f8e | 0x8710442a64820abbf2a0d69c611eda0beb5fc8b17db31da5e6c08d571f7a32b2 | +| `DiamondLoupeFacet` | `fuseSparknet` | 0x8BFbB21683e21DC4B11af352117d6D4F2bc62f8e | 0xc4224d5b19ec685dcb17b0ab862ec9968dc1ab25dd63b6145b1a01b3ac3a1e70 | | `ENSController` | `mainnet` | [0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08](https://etherscan.io/address/0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08) | [0xcb245478eb559307f977f2ffdfb3f487af38098f6f7499b2ff438f497107f024](https://etherscan.io/tx/0xcb245478eb559307f977f2ffdfb3f487af38098f6f7499b2ff438f497107f024) | | `ENSController` | `ropsten` | [0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08](https://ropsten.etherscan.io/address/0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08) | [0x8becdf6c4958d945ca128c50a66718e7a900379f344091cac282b89a8d86f5b0](https://ropsten.etherscan.io/tx/0x8becdf6c4958d945ca128c50a66718e7a900379f344091cac282b89a8d86f5b0) | | `ENSController` | `rinkeby` | [0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08](https://rinkeby.etherscan.io/address/0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08) | [0x111e9dfa57fe07247d130e36600ef53a5b54620240a708540761785d1abd847d](https://rinkeby.etherscan.io/tx/0x111e9dfa57fe07247d130e36600ef53a5b54620240a708540761785d1abd847d) | @@ -51,6 +77,8 @@ | `ENSController` | `optimismKovan` | 0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08 | 0xf1beabf6fdf7605d23b80072280ffc82249161d85ae7418c546464a8ffcdb2c1 | | `ENSController` | `moonbeam` | 0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08 | 0x30fa83945e8141e8fa299d2a9906d5f5b7d1125edb0723b1f84cb88377a17ac3 | | `ENSController` | `moonbase` | 0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08 | 0xa50524fe7057eba0cb1d8b50627ea8be7dc955112a9a6bd2b3a4b16347427c6b | +| `ENSController` | `fuse` | 0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08 | 0x7eaed2685e2334a5c7c8cb3fc1b85dec0aadaca705bc1872fde5b2fb2dfb6728 | +| `ENSController` | `fuseSparknet` | 0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08 | 0xf73f44af58c7d1d4c28d2d86e8151d9df4afaa2577eb0699557abc16968dbd53 | | `ENSController` | `celo` | 0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08 | 0x506af71c933202ab4deb3de6599c0c5ec5f07af0750837ffa38216fddd1af7eb | | `ENSController` | `celoTest` | 0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08 | 0xc45d57662670d6ab754683f4a030859fa8d1b0fad29a6dd335b768f259665ecd | | `ENSController` | `etherspot` | 0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08 | 0x2dd4c61274c93e97aa5ce56138d7d67d4cc74503a97b0e2af4f2dee9844c7253 | @@ -77,6 +105,8 @@ | `ENSHelper` | `optimismKovan` | 0xF330b17e19474762E6F408D7dCf0327264d4A2C0 | 0xdf34f12112a1b96b10509799c8ca0e4e833e0f750e073b24a269fcffe188d460 | | `ENSHelper` | `moonbeam` | 0xF330b17e19474762E6F408D7dCf0327264d4A2C0 | 0x56a447d8f97f625e1e373512454c3baa179552d59f806a5e5774e8926b74eb5c | | `ENSHelper` | `moonbase` | 0xF330b17e19474762E6F408D7dCf0327264d4A2C0 | 0x26a08b3bb79383f3b877a8a236a37544213ab9968f591e1c8ddd736c06078ecb | +| `ENSHelper` | `fuse` | 0xF330b17e19474762E6F408D7dCf0327264d4A2C0 | 0x1878a82e9754f951494ecd386dcc132f93f9d934f6b7ac250d1972f57d43d141 | +| `ENSHelper` | `fuseSparknet` | 0xF330b17e19474762E6F408D7dCf0327264d4A2C0 | 0x6db86ba1be399c574ea44d3ce3b36f9759d97db6875c1e2519667ab946b6e240 | | `ENSHelper` | `celo` | 0xF330b17e19474762E6F408D7dCf0327264d4A2C0 | 0x396ec3c9f1f3a8625402798581ae2cb925d2ae1d6743ad9e7b498e814c570057 | | `ENSHelper` | `celoTest` | 0xF330b17e19474762E6F408D7dCf0327264d4A2C0 | 0x42c9dce6afca7bd38dee552c2b8724061e01bf9a47ecff91f3094e730bd80caf | | `ENSHelper` | `etherspot` | 0xF330b17e19474762E6F408D7dCf0327264d4A2C0 | 0x7cf8135b5b04916485a8ec064d304c46cfe871e613ea14e128c51b6616f0d0f0 | @@ -102,6 +132,8 @@ | `ENSRegistry` | `optimismKovan` | 0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688 | 0xf3f26bf0faeefe572e813feb66992b277e521585628918dd8eeee6edb0977cc0 | | `ENSRegistry` | `moonbeam` | 0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688 | 0x61b6a0baad531bfb535f6b8a205ddd463c9ef0825d18523d16822e826e29826a | | `ENSRegistry` | `moonbase` | 0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688 | 0xbcd09e5811765686b823300b46c0a00e04b6deb4398da828d336048729312ea1 | +| `ENSRegistry` | `fuse` | 0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688 | 0x1df7af5250f555b5ed8dc77728ca7dbf77ad6179f851d4fe80b788b83a8f7257 | +| `ENSRegistry` | `fuseSparknet` | 0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688 | 0x9c446bb44fa6e652f05391ccf363679d32237782495f7384d1a04214c40c7536 | | `ENSRegistry` | `celo` | 0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688 | 0xfbd52c01cc283b000acfe5679ec13cd4956991d14ef2d9d899cc9cc4a30566aa | | `ENSRegistry` | `celoTest` | 0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688 | 0x6361fb53ae0e03f60f5886aa101620f050d2ca0a94765e45dd0be8fabe3e1f5a | | `ENSRegistry` | `etherspot` | 0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688 | 0x1b419734e3beb7a4d97e835e3b0f594ddb74290ab7fc940ba3c5a3b37e035775 | @@ -127,6 +159,8 @@ | `ENSReverseRegistrar` | `optimismKovan` | 0x523C92966e9d2067ba547f59D51E907c20FD8761 | 0x8f1d942feef6e57cf5e0d8e352c1013484f2167e8cd91ec6cb044b44a13eb33d | | `ENSReverseRegistrar` | `moonbeam` | 0x523C92966e9d2067ba547f59D51E907c20FD8761 | 0x2ab2107f2ecd6e59dbdddbdc8db0c0b1cd4f32f9c9fecb28c78da1551599481c | | `ENSReverseRegistrar` | `moonbase` | 0x523C92966e9d2067ba547f59D51E907c20FD8761 | 0xe25950acdd86dc94a63ebed4d67b34bdca7ce75822b4e6c0a973932061ab9d49 | +| `ENSReverseRegistrar` | `fuse` | 0x523C92966e9d2067ba547f59D51E907c20FD8761 | 0x3cfe6c47907a333dd546f569cbed2b9b67515d8ae4f48e0a816c247ef0c2a050 | +| `ENSReverseRegistrar` | `fuseSparknet` | 0x523C92966e9d2067ba547f59D51E907c20FD8761 | 0x9d18868bf5babb156cc0551acc2874b85543f5168b89e0326473cd3e6630eca3 | | `ENSReverseRegistrar` | `celo` | 0x523C92966e9d2067ba547f59D51E907c20FD8761 | 0x3fda2be4237a4ca2103d46d8755edb14c5ea4bef154eabfc4aa91280d9f16836 | | `ENSReverseRegistrar` | `celoTest` | 0x523C92966e9d2067ba547f59D51E907c20FD8761 | 0x178149172d88aa3d6b00fde5ba0d0bc120924349c5fb5030f43136d86cbb7383 | | `ENSReverseRegistrar` | `etherspot` | 0x523C92966e9d2067ba547f59D51E907c20FD8761 | 0x3193533de6611dc509866e81e0d955674b8d351a82ca5db095e00b6e40414869 | @@ -153,6 +187,8 @@ | `ExternalAccountRegistry` | `optimismKovan` | 0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc | 0x5cb0af3d444eadf42a6e342accf3d7caa2a1614265556edf8129c4828d69f758 | | `ExternalAccountRegistry` | `moonbeam` | 0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc | 0x15a329dcfeca14228bba66df5eb73f08af08403ae3ebc191dd93b24afb1361f8 | | `ExternalAccountRegistry` | `moonbase` | 0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc | 0x66602f45feb9c4ae4b7eb3a6f0437e881e028b168b296cfba7d8be1e367ea74a | +| `ExternalAccountRegistry` | `fuse` | 0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc | 0x1fcd9f8ad01d7a72c8eaceab3a92abcadb3e0c785ffdee0f78567ec7137e5549 | +| `ExternalAccountRegistry` | `fuseSparknet` | 0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc | 0xaf97cd55f19b04f6aad22bfb1757d7c92346e5b9ebdb88d68bde2998ed2cafc2 | | `ExternalAccountRegistry` | `celo` | 0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc | 0x01dbf81a93f634c4352e223da76269ade120e638386bfdb5e6850989ffd7e9d1 | | `ExternalAccountRegistry` | `celoTest` | 0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc | 0xdec39d8ca0dc8bfdc627a7c1f97d9dd3697c53c6f39ed4824e2a199fb987c8fe | | `ExternalAccountRegistry` | `etherspot` | 0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc | 0x0bec371bae9679a3eacab911686c48199f620c9f795d9cc5d5faec6f4ab0c669 | @@ -179,9 +215,13 @@ | `Gateway` | `optimismKovan` | 0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163 | 0xc149ec98b3bd4dc2a95d70ce2d614b3c6c937fb40a7d2d789b0a1c9e2452d2f3 | | `Gateway` | `moonbeam` | 0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163 | 0xad29eff76f794881fe52bab1db90e28139e64b577d2a5e9a3ca667397334efdd | | `Gateway` | `moonbase` | 0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163 | 0x224372503c160773a2e59a9cea8d1a90f0d0f2b798484aec252acfda2d9bc654 | +| `Gateway` | `fuse` | 0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163 | 0x0b883fff9db01129ea63519e9338f462bb945e3011dcdc67ab1e579ac82f1672 | +| `Gateway` | `fuseSparknet` | 0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163 | 0x814795f50ab1bd03fa7eae4d28f70e85e24138ed8af01cab3ea0f98c98e81235 | | `Gateway` | `celo` | 0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163 | 0x9f0a37c40e438898b92eb3404726cf7e3ab0566e3bd97453153d4502255f15d3 | | `Gateway` | `celoTest` | 0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163 | 0x017b93cfff9bef60d74ed3f678617e31bce472a62c16e4170d27833d265295a6 | | `Gateway` | `etherspot` | 0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163 | 0xba898531d95380c97307201fb1fe773801fb83343d9096c6bc4380402ed4486b | +| `OwnershipFacet` | `fuse` | 0xdd43fA3fCB57F9F075F48F0FA564162a0eE7fa70 | 0x6b077186eb6861290fb7f38c0d53e93b5e83f4e9e217b8d7dee5ab837c2cf4e8 | +| `OwnershipFacet` | `fuseSparknet` | 0xdd43fA3fCB57F9F075F48F0FA564162a0eE7fa70 | 0xb65d9d8fa6bb8390d70c2dfd7341b91077ae8eec4fe4513d53ce61e636d12185 | | `PaymentRegistry` | `mainnet` | [0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312](https://etherscan.io/address/0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312) | [0x03172e98a8a14cbec4ce793277552de243df1451eefe8a163bacccd9187b2a4f](https://etherscan.io/tx/0x03172e98a8a14cbec4ce793277552de243df1451eefe8a163bacccd9187b2a4f) | | `PaymentRegistry` | `ropsten` | [0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312](https://ropsten.etherscan.io/address/0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312) | [0xef47e55c32941bb0d794c491d0a1fc25fb98826472fc62df31e6fcd0fad9b162](https://ropsten.etherscan.io/tx/0xef47e55c32941bb0d794c491d0a1fc25fb98826472fc62df31e6fcd0fad9b162) | | `PaymentRegistry` | `rinkeby` | [0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312](https://rinkeby.etherscan.io/address/0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312) | [0xea159392a00bcb71fcb65292798180bc25801e03d81ec2d20a469661e1160109](https://rinkeby.etherscan.io/tx/0xea159392a00bcb71fcb65292798180bc25801e03d81ec2d20a469661e1160109) | @@ -205,6 +245,8 @@ | `PaymentRegistry` | `optimismKovan` | 0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312 | 0xdc6d4e0f2de454c2b1f2aa66cc13128b940433253aa9b05e6100cece0164476d | | `PaymentRegistry` | `moonbeam` | 0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312 | 0x8b938eb513535885f17e55a076a14b23fcb8600d53a9468d2b2448a2b52030be | | `PaymentRegistry` | `moonbase` | 0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312 | 0x9b31b42d325e4adfbdadfe7c2389596907bc6c3ae6551df3fabc4da9a675a9c5 | +| `PaymentRegistry` | `fuse` | 0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312 | 0x865afeb8d3433b53d27f54b124fc03593bc00abd4249c096cac3240764d15023 | +| `PaymentRegistry` | `fuseSparknet` | 0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312 | 0x6c5375420adb40244862d193177f1bcb3bf6cf18bb53fd0693bca73d3693ca48 | | `PaymentRegistry` | `celo` | 0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312 | 0x70b6d0b59d9ca6cfc0a02f04742a91177f87166cfe4c287edd08170519390479 | | `PaymentRegistry` | `celoTest` | 0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312 | 0x82b9aa071e80bfb8521d76e0867035116153ee3f9e6d2ba49fd6ac2953d130bb | | `PaymentRegistry` | `etherspot` | 0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312 | 0x96338b94bbc9fe24b6e5def6ad523983dfd56883620a85ebd4ca35d0be609d0c | @@ -231,6 +273,8 @@ | `PersonalAccountImplementationV1` | `optimismKovan` | 0x0672aF0018fdEbACcc93c7D047D62b72CB12883A | 0xb4b3e3b6b81af8db8d8160cfc041e3f9e88e1c3b61264ad7dca2eb99583a4a66 | | `PersonalAccountImplementationV1` | `moonbeam` | 0x0672aF0018fdEbACcc93c7D047D62b72CB12883A | 0xe0e1856fc37aa848176993e95b4e69cf4a11536d26376a82b6ba426cf94a289b | | `PersonalAccountImplementationV1` | `moonbase` | 0x0672aF0018fdEbACcc93c7D047D62b72CB12883A | 0x199c1b6275a99da461bd3cff250e44b859b5af9926adcd74bb0540f51b37a9d0 | +| `PersonalAccountImplementationV1` | `fuse` | 0x0672aF0018fdEbACcc93c7D047D62b72CB12883A | 0x197b5bf90ae186f7e6773dcea88ea5ee4218c2faa8abeb8baf1bfcba8af13ce2 | +| `PersonalAccountImplementationV1` | `fuseSparknet` | 0x0672aF0018fdEbACcc93c7D047D62b72CB12883A | 0x3fded149d1fa752a031943332ec16600ba871bb13aa6c7e4fd4c90b0c78a501f | | `PersonalAccountImplementationV1` | `celo` | 0x0672aF0018fdEbACcc93c7D047D62b72CB12883A | 0x0816d1e8803abb1a638e1aba5ec7395e5cd8228d2883cc3d7c1ea2af19fc0926 | | `PersonalAccountImplementationV1` | `celoTest` | 0x0672aF0018fdEbACcc93c7D047D62b72CB12883A | 0xbf4e974badd253ba96904e2281d01ac7e00ac798763568581b3674cf3e6df5df | | `PersonalAccountImplementationV1` | `etherspot` | 0x0672aF0018fdEbACcc93c7D047D62b72CB12883A | 0x8ddcf689ffc89e45538b31941069088c0a63d34de0f24358cd29f536e8dce3e2 | @@ -257,6 +301,8 @@ | `PersonalAccountRegistry` | `optimismKovan` | 0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa | 0xcd3305c783ec99872f4578a1023d7e78d5a70e28dcb9ee7fe7825e6264e48bed | | `PersonalAccountRegistry` | `moonbeam` | 0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa | 0xf1db7faaee5df423f358abcecb1cba7ee75481041b6725f8d93a9cb50731c8b6 | | `PersonalAccountRegistry` | `moonbase` | 0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa | 0xb1868deaeb75958e6f2f377ebb2c1d4d119d98d3fc98da8b1223d9ddd30e38e3 | +| `PersonalAccountRegistry` | `fuse` | 0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa | 0xde64b23f59348247db1d8ac7f4c7377cd8555dfd39a2d35f718f0a1db78a6210 | +| `PersonalAccountRegistry` | `fuseSparknet` | 0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa | 0xfbd74ec51c1c57acba61bc69f83923a3dc5f913524e8bbbfd00f97c9031d28dd | | `PersonalAccountRegistry` | `celo` | 0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa | 0x2a601f05cdc7d98281ce20575ba214505f325a9bc3a938c5255fa7a44fab39c5 | | `PersonalAccountRegistry` | `celoTest` | 0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa | 0x1462730017894782a39811340aa50ec65a2a9ad710f6a38de578ed7fc44e4b73 | | `PersonalAccountRegistry` | `etherspot` | 0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa | 0xd9359a5aa653ba4acab01ad38a2cb644f2140f0d7d1648398414471422448346 | @@ -283,6 +329,8 @@ | `WrappedWeiToken` | `optimismKovan` | 0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616 | 0xd5b4db94a66759e5ca438cd990dcb6ffbfd45f6e899ce6554bff98dfcb6b3963 | | `WrappedWeiToken` | `moonbeam` | 0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616 | 0x5ee7df66fd2b00adf6eec1789550b2b9f48d957f2aad27e77ea7e64055b33f29 | | `WrappedWeiToken` | `moonbase` | 0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616 | 0xf0f493befc1914cc2fb85eb83a5a23d0c307fd70bcadf175c288a44fbb7f9d42 | +| `WrappedWeiToken` | `fuse` | 0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616 | 0x72d998bc58dec925507fda0b52185fdc6af01094e12f67758f9e2d9231f34a05 | +| `WrappedWeiToken` | `fuseSparknet` | 0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616 | 0x892803ea55222c0ba1f2143063ab79df1ee42ce2bf2e65385c80f8a8c842d067 | | `WrappedWeiToken` | `celo` | 0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616 | 0x81141ef3b78568d3c8889b4f4443868dd3766cd08b9eac34a5b8030c29636321 | | `WrappedWeiToken` | `celoTest` | 0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616 | 0xda0092889e56a998075e66d89d03e6f0f54382e43780adb837dc0ffac6f56b16 | | `WrappedWeiToken` | `etherspot` | 0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616 | 0x97561b8070bdcb84cc0ef0fc47a1f59ebe56c36e3f7448e90e39cdcd65aefd9d | diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 82959db6..3c449c60 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -25,6 +25,8 @@ | `testnets` | Arbitrum Testnet | `ARBITRUM_TEST` | `arbitrumTest` | | `mainnets` | Optimism | `OPTIMISM` | `optimism` | | `testnets` | Optimism Kovan | `OPTIMISM_KOVAN` | `optimismKovan` | +| `mainnets` | Fuse | `FUSE` | `fuse` | +| `testnets` | Fuse Sparknet | `FUSE_SPARKNET` | `fuseSparknet` | | `testnets` | Etherspot | `ETHERSPOT` | `etherspot` | | `localnets` | Localnet (instance A) | `LOCAL_A` | `localA` | | `localnets` | Localnet (instance B) | `LOCAL_B` | `localB` | diff --git a/artifacts/Diamond.json b/artifacts/Diamond.json new file mode 100644 index 00000000..1b142b49 --- /dev/null +++ b/artifacts/Diamond.json @@ -0,0 +1,35 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "Diamond", + "sourceName": "src/bridges/Diamond.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_contractOwner", + "type": "address" + }, + { + "internalType": "address", + "name": "_diamondCutFacet", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "bytecode": "0x608060405260405162004fc238038062004fc2833981810160405281019062000029919062001c79565b6200003f82620002ab60201b620001681760201c565b6000600167ffffffffffffffff81111562000083577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015620000c057816020015b620000ac62001bf2565b815260200190600190039081620000a25790505b5090506000600167ffffffffffffffff81111562000107577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015620001365781602001602082028036833780820191505090505b509050631f931c1c60e01b816000815181106200017c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152505060405180606001604052808473ffffffffffffffffffffffffffffffffffffffff168152602001600060028111156200022a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815260200182815250826000815181106200026e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010181905250620002a1826000604051806020016040528060008152506200038a60201b6200023f1760201c565b5050505062002931565b6000620002bd620007e560201b60201c565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60005b835181101562000790576000848281518110620003d3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156200041c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000456577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415620004ff57620004f98583815181106200049b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160000151868481518110620004e1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151604001516200081260201b60201c565b62000779565b600160028111156200053a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000574577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156200061d5762000617858381518110620005b9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160000151868481518110620005ff577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015162000ada60201b60201c565b62000778565b60028081111562000657577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000691577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156200073a5762000734858381518110620006d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106200071c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015162000db560201b60201c565b62000777565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200076e90620021e5565b60405180910390fd5b5b5b5080806200078790620024a4565b9150506200038d565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673838383604051620007c693929190620020ee565b60405180910390a1620007e0828262000f8160201b60201c565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b600081511162000859576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200085090620021a1565b60405180910390fd5b60006200086b620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415620008e0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620008d79062002207565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156200095757620009568285620011b060201b60201c565b5b60005b835181101562000ad3576000848281518110620009a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000a97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000a8e906200226d565b60405180910390fd5b62000aab8583868a6200129460201b60201c565b838062000ab890620024f2565b9450505050808062000aca90620024a4565b9150506200095a565b5050505050565b600081511162000b21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000b1890620021a1565b60405180910390fd5b600062000b33620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141562000ba8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000b9f9062002207565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff16141562000c1f5762000c1e8285620011b060201b60201c565b5b60005b835181101562000dae57600084828151811062000c68577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000d5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000d56906200228f565b60405180910390fd5b62000d728582846200144160201b60201c565b62000d868583868a6200129460201b60201c565b838062000d9390620024f2565b9450505050808062000da590620024a4565b91505062000c22565b5050505050565b600081511162000dfc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000df390620021a1565b60405180910390fd5b600062000e0e620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161462000e82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000e7990620022b1565b60405180910390fd5b60005b825181101562000f7b57600083828151811062000ecb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905062000f638482846200144160201b60201c565b5050808062000f7290620024a4565b91505062000e85565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156200100457600081511462000ffe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ff5906200215d565b60405180910390fd5b620011ac565b60008151116200104b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620010429062002229565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614620010ab57620010aa8260405180606001604052806028815260200162004f766028913962001b9d60201b60201c565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051620010d59190620020d5565b600060405180830381855af49150503d806000811462001112576040519150601f19603f3d011682016040523d82523d6000602084013e62001117565b606091505b509150915081620011a9576000815111156200116c57806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162001163919062002139565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620011a0906200217f565b60405180910390fd5b50505b5050565b620011db8160405180606001604052806024815260200162004f9e6024913962001b9d60201b60201c565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620014b4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620014ab90620021c3565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562001526576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200151d906200224b565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180549050620015ff919062002388565b9050808214620017e25760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001828154811062001688577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000184815481106200172b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806200185d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff02191690555050600081141562001b96576000600186600201805490506200194b919062002388565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154905081811462001adb576000876002018381548110620019dd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508088600201838154811062001a48577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b8660020180548062001b16577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b905060008111829062001bec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162001be3919062002139565b60405180910390fd5b50505050565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000600281111562001c55577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001606081525090565b60008151905062001c738162002917565b92915050565b6000806040838503121562001c8d57600080fd5b600062001c9d8582860162001c62565b925050602062001cb08582860162001c62565b9150509250929050565b600062001cc8838362001df7565b60208301905092915050565b600062001ce283836200207f565b905092915050565b62001cf581620023c3565b82525050565b62001d0681620023c3565b82525050565b600062001d1982620022f3565b62001d25818562002339565b935062001d3283620022d3565b8060005b8381101562001d6957815162001d4d888262001cba565b975062001d5a836200231f565b92505060018101905062001d36565b5085935050505092915050565b600062001d8382620022fe565b62001d8f81856200234a565b93508360208202850162001da385620022e3565b8060005b8581101562001de5578484038952815162001dc3858262001cd4565b945062001dd0836200232c565b925060208a0199505060018101905062001da7565b50829750879550505050505092915050565b62001e0281620023d7565b82525050565b600062001e158262002309565b62001e2181856200235b565b935062001e338185602086016200246e565b62001e3e816200258a565b840191505092915050565b600062001e568262002309565b62001e6281856200236c565b935062001e748185602086016200246e565b80840191505092915050565b62001e8b816200245a565b82525050565b600062001e9e8262002314565b62001eaa818562002377565b935062001ebc8185602086016200246e565b62001ec7816200258a565b840191505092915050565b600062001ee1603c8362002377565b915062001eee826200259b565b604082019050919050565b600062001f0860268362002377565b915062001f1582620025ea565b604082019050919050565b600062001f2f602b8362002377565b915062001f3c8262002639565b604082019050919050565b600062001f5660378362002377565b915062001f638262002688565b604082019050919050565b600062001f7d60278362002377565b915062001f8a82620026d7565b604082019050919050565b600062001fa4602c8362002377565b915062001fb18262002726565b604082019050919050565b600062001fcb603d8362002377565b915062001fd88262002775565b604082019050919050565b600062001ff2602e8362002377565b915062001fff82620027c4565b604082019050919050565b60006200201960358362002377565b9150620020268262002813565b604082019050919050565b60006200204060388362002377565b91506200204d8262002862565b604082019050919050565b60006200206760368362002377565b91506200207482620028b1565b604082019050919050565b600060608301600083015162002099600086018262001cea565b506020830151620020ae602086018262001e80565b5060408301518482036040860152620020c8828262001d0c565b9150508091505092915050565b6000620020e3828462001e49565b915081905092915050565b600060608201905081810360008301526200210a818662001d76565b90506200211b602083018562001cfb565b81810360408301526200212f818462001e08565b9050949350505050565b6000602082019050818103600083015262002155818462001e91565b905092915050565b60006020820190508181036000830152620021788162001ed2565b9050919050565b600060208201905081810360008301526200219a8162001ef9565b9050919050565b60006020820190508181036000830152620021bc8162001f20565b9050919050565b60006020820190508181036000830152620021de8162001f47565b9050919050565b60006020820190508181036000830152620022008162001f6e565b9050919050565b60006020820190508181036000830152620022228162001f95565b9050919050565b60006020820190508181036000830152620022448162001fbc565b9050919050565b60006020820190508181036000830152620022668162001fe3565b9050919050565b6000602082019050818103600083015262002288816200200a565b9050919050565b60006020820190508181036000830152620022aa8162002031565b9050919050565b60006020820190508181036000830152620022cc8162002058565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000620023958262002438565b9150620023a28362002438565b925082821015620023b857620023b76200252c565b5b828203905092915050565b6000620023d08262002418565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050620024138262002900565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b6000620024678262002403565b9050919050565b60005b838110156200248e57808201518184015260208101905062002471565b838111156200249e576000848401525b50505050565b6000620024b18262002438565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415620024e757620024e66200252c565b5b600182019050919050565b6000620024ff8262002442565b91506bffffffffffffffffffffffff8214156200252157620025206200252c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106200291457620029136200255b565b5b50565b6200292281620023c3565b81146200292e57600080fd5b50565b61263580620029416000396000f3fe60806040523661000b57005b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9050809150600082600001600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013990611ecc565b60405180910390fd5b3660008037600080366000845af43d6000803e8060008114610163573d6000f35b3d6000fd5b600061017261065f565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60005b8351811015610614576000848281518110610286577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610307577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103a45761039f858381518110610349577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061038e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161068c565b610600565b600160028111156103de577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610417577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104b4576104af858381518110610459577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061049e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161092b565b6105ff565b6002808111156104ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610526577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156105c3576105be858381518110610568577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106105ad577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610bd5565b6105fe565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f590611e8c565b60405180910390fd5b5b5b50808061060c9061214d565b915050610242565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161064893929190611da5565b60405180910390a161065a8282610d86565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116106d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c790611e4c565b60405180910390fd5b60006106da61065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561074c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074390611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156107ba576107b98285610f99565b5b60005b8351811015610924576000848281518110610801577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ec90611f2c565b60405180910390fd5b6109018583868a611074565b838061090c90612196565b9450505050808061091c9061214d565b9150506107bd565b5050505050565b600081511161096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690611e4c565b60405180910390fd5b600061097961065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e290611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff161415610a5957610a588285610f99565b5b60005b8351811015610bce576000848281518110610aa0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8b90611f4c565b60405180910390fd5b610b9f858284611221565b610bab8583868a611074565b8380610bb690612196565b94505050508080610bc69061214d565b915050610a5c565b5050505050565b6000815111610c19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1090611e4c565b60405180910390fd5b6000610c2361065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8b90611f6c565b60405180910390fd5b60005b8251811015610d80576000838281518110610cdb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610d6b848284611221565b50508080610d789061214d565b915050610c97565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e04576000815114610dff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df690611e0c565b60405180910390fd5b610f95565b6000815111610e48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3f90611eec565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610e9e57610e9d826040518060600160405280602881526020016125dd6028913961196a565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610ec69190611d8e565b600060405180830381855af49150503d8060008114610f01576040519150601f19603f3d011682016040523d82523d6000602084013e610f06565b606091505b509150915081610f9257600081511115610f5757806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4e9190611dea565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8990611e2c565b60405180910390fd5b50505b5050565b610fbb816040518060600160405280602481526020016126056024913961196a565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611291576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128890611e6c565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611300576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f790611f0c565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506113d79190612041565b90508082146115b75760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001828154811061145e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611631577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156119635760006001866002018054905061171c9190612041565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146118a95760008760020183815481106117ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611816577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806118e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906119b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ad9190611dea565b60405180910390fd5b50505050565b60006119c88383611ad9565b60208301905092915050565b60006119e08383611d3e565b905092915050565b6119f181612075565b82525050565b611a0081612075565b82525050565b6000611a1182611fac565b611a1b8185611ff2565b9350611a2683611f8c565b8060005b83811015611a57578151611a3e88826119bc565b9750611a4983611fd8565b925050600181019050611a2a565b5085935050505092915050565b6000611a6f82611fb7565b611a798185612003565b935083602082028501611a8b85611f9c565b8060005b85811015611ac75784840389528151611aa885826119d4565b9450611ab383611fe5565b925060208a01995050600181019050611a8f565b50829750879550505050505092915050565b611ae281612087565b82525050565b6000611af382611fc2565b611afd8185612014565b9350611b0d81856020860161211a565b611b1681612229565b840191505092915050565b6000611b2c82611fc2565b611b368185612025565b9350611b4681856020860161211a565b80840191505092915050565b611b5b81612108565b82525050565b6000611b6c82611fcd565b611b768185612030565b9350611b8681856020860161211a565b611b8f81612229565b840191505092915050565b6000611ba7603c83612030565b9150611bb28261223a565b604082019050919050565b6000611bca602683612030565b9150611bd582612289565b604082019050919050565b6000611bed602b83612030565b9150611bf8826122d8565b604082019050919050565b6000611c10603783612030565b9150611c1b82612327565b604082019050919050565b6000611c33602783612030565b9150611c3e82612376565b604082019050919050565b6000611c56602c83612030565b9150611c61826123c5565b604082019050919050565b6000611c79602083612030565b9150611c8482612414565b602082019050919050565b6000611c9c603d83612030565b9150611ca78261243d565b604082019050919050565b6000611cbf602e83612030565b9150611cca8261248c565b604082019050919050565b6000611ce2603583612030565b9150611ced826124db565b604082019050919050565b6000611d05603883612030565b9150611d108261252a565b604082019050919050565b6000611d28603683612030565b9150611d3382612579565b604082019050919050565b6000606083016000830151611d5660008601826119e8565b506020830151611d696020860182611b52565b5060408301518482036040860152611d818282611a06565b9150508091505092915050565b6000611d9a8284611b21565b915081905092915050565b60006060820190508181036000830152611dbf8186611a64565b9050611dce60208301856119f7565b8181036040830152611de08184611ae8565b9050949350505050565b60006020820190508181036000830152611e048184611b61565b905092915050565b60006020820190508181036000830152611e2581611b9a565b9050919050565b60006020820190508181036000830152611e4581611bbd565b9050919050565b60006020820190508181036000830152611e6581611be0565b9050919050565b60006020820190508181036000830152611e8581611c03565b9050919050565b60006020820190508181036000830152611ea581611c26565b9050919050565b60006020820190508181036000830152611ec581611c49565b9050919050565b60006020820190508181036000830152611ee581611c6c565b9050919050565b60006020820190508181036000830152611f0581611c8f565b9050919050565b60006020820190508181036000830152611f2581611cb2565b9050919050565b60006020820190508181036000830152611f4581611cd5565b9050919050565b60006020820190508181036000830152611f6581611cf8565b9050919050565b60006020820190508181036000830152611f8581611d1b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061204c826120e6565b9150612057836120e6565b92508282101561206a576120696121cb565b5b828203905092915050565b6000612080826120c6565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60008190506120c1826125c8565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b6000612113826120b3565b9050919050565b60005b8381101561213857808201518184015260208101905061211d565b83811115612147576000848401525b50505050565b6000612158826120e6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561218b5761218a6121cb565b5b600182019050919050565b60006121a1826120f0565b91506bffffffffffffffffffffffff8214156121c0576121bf6121cb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374600082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106125d9576125d86121fa565b5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465", + "deployedBytecode": "0x60806040523661000b57005b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9050809150600082600001600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013990611ecc565b60405180910390fd5b3660008037600080366000845af43d6000803e8060008114610163573d6000f35b3d6000fd5b600061017261065f565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60005b8351811015610614576000848281518110610286577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610307577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103a45761039f858381518110610349577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061038e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161068c565b610600565b600160028111156103de577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610417577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104b4576104af858381518110610459577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061049e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161092b565b6105ff565b6002808111156104ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610526577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156105c3576105be858381518110610568577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106105ad577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610bd5565b6105fe565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f590611e8c565b60405180910390fd5b5b5b50808061060c9061214d565b915050610242565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161064893929190611da5565b60405180910390a161065a8282610d86565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116106d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c790611e4c565b60405180910390fd5b60006106da61065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561074c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074390611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156107ba576107b98285610f99565b5b60005b8351811015610924576000848281518110610801577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ec90611f2c565b60405180910390fd5b6109018583868a611074565b838061090c90612196565b9450505050808061091c9061214d565b9150506107bd565b5050505050565b600081511161096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690611e4c565b60405180910390fd5b600061097961065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e290611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff161415610a5957610a588285610f99565b5b60005b8351811015610bce576000848281518110610aa0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8b90611f4c565b60405180910390fd5b610b9f858284611221565b610bab8583868a611074565b8380610bb690612196565b94505050508080610bc69061214d565b915050610a5c565b5050505050565b6000815111610c19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1090611e4c565b60405180910390fd5b6000610c2361065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8b90611f6c565b60405180910390fd5b60005b8251811015610d80576000838281518110610cdb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610d6b848284611221565b50508080610d789061214d565b915050610c97565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e04576000815114610dff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df690611e0c565b60405180910390fd5b610f95565b6000815111610e48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3f90611eec565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610e9e57610e9d826040518060600160405280602881526020016125dd6028913961196a565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610ec69190611d8e565b600060405180830381855af49150503d8060008114610f01576040519150601f19603f3d011682016040523d82523d6000602084013e610f06565b606091505b509150915081610f9257600081511115610f5757806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4e9190611dea565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8990611e2c565b60405180910390fd5b50505b5050565b610fbb816040518060600160405280602481526020016126056024913961196a565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611291576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128890611e6c565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611300576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f790611f0c565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506113d79190612041565b90508082146115b75760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001828154811061145e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611631577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156119635760006001866002018054905061171c9190612041565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146118a95760008760020183815481106117ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611816577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806118e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906119b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ad9190611dea565b60405180910390fd5b50505050565b60006119c88383611ad9565b60208301905092915050565b60006119e08383611d3e565b905092915050565b6119f181612075565b82525050565b611a0081612075565b82525050565b6000611a1182611fac565b611a1b8185611ff2565b9350611a2683611f8c565b8060005b83811015611a57578151611a3e88826119bc565b9750611a4983611fd8565b925050600181019050611a2a565b5085935050505092915050565b6000611a6f82611fb7565b611a798185612003565b935083602082028501611a8b85611f9c565b8060005b85811015611ac75784840389528151611aa885826119d4565b9450611ab383611fe5565b925060208a01995050600181019050611a8f565b50829750879550505050505092915050565b611ae281612087565b82525050565b6000611af382611fc2565b611afd8185612014565b9350611b0d81856020860161211a565b611b1681612229565b840191505092915050565b6000611b2c82611fc2565b611b368185612025565b9350611b4681856020860161211a565b80840191505092915050565b611b5b81612108565b82525050565b6000611b6c82611fcd565b611b768185612030565b9350611b8681856020860161211a565b611b8f81612229565b840191505092915050565b6000611ba7603c83612030565b9150611bb28261223a565b604082019050919050565b6000611bca602683612030565b9150611bd582612289565b604082019050919050565b6000611bed602b83612030565b9150611bf8826122d8565b604082019050919050565b6000611c10603783612030565b9150611c1b82612327565b604082019050919050565b6000611c33602783612030565b9150611c3e82612376565b604082019050919050565b6000611c56602c83612030565b9150611c61826123c5565b604082019050919050565b6000611c79602083612030565b9150611c8482612414565b602082019050919050565b6000611c9c603d83612030565b9150611ca78261243d565b604082019050919050565b6000611cbf602e83612030565b9150611cca8261248c565b604082019050919050565b6000611ce2603583612030565b9150611ced826124db565b604082019050919050565b6000611d05603883612030565b9150611d108261252a565b604082019050919050565b6000611d28603683612030565b9150611d3382612579565b604082019050919050565b6000606083016000830151611d5660008601826119e8565b506020830151611d696020860182611b52565b5060408301518482036040860152611d818282611a06565b9150508091505092915050565b6000611d9a8284611b21565b915081905092915050565b60006060820190508181036000830152611dbf8186611a64565b9050611dce60208301856119f7565b8181036040830152611de08184611ae8565b9050949350505050565b60006020820190508181036000830152611e048184611b61565b905092915050565b60006020820190508181036000830152611e2581611b9a565b9050919050565b60006020820190508181036000830152611e4581611bbd565b9050919050565b60006020820190508181036000830152611e6581611be0565b9050919050565b60006020820190508181036000830152611e8581611c03565b9050919050565b60006020820190508181036000830152611ea581611c26565b9050919050565b60006020820190508181036000830152611ec581611c49565b9050919050565b60006020820190508181036000830152611ee581611c6c565b9050919050565b60006020820190508181036000830152611f0581611c8f565b9050919050565b60006020820190508181036000830152611f2581611cb2565b9050919050565b60006020820190508181036000830152611f4581611cd5565b9050919050565b60006020820190508181036000830152611f6581611cf8565b9050919050565b60006020820190508181036000830152611f8581611d1b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061204c826120e6565b9150612057836120e6565b92508282101561206a576120696121cb565b5b828203905092915050565b6000612080826120c6565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60008190506120c1826125c8565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b6000612113826120b3565b9050919050565b60005b8381101561213857808201518184015260208101905061211d565b83811115612147576000848401525b50505050565b6000612158826120e6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561218b5761218a6121cb565b5b600182019050919050565b60006121a1826120f0565b91506bffffffffffffffffffffffff8214156121c0576121bf6121cb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374600082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106125d9576125d86121fa565b5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/DiamondCutFacet.json b/artifacts/DiamondCutFacet.json new file mode 100644 index 00000000..c7cd546e --- /dev/null +++ b/artifacts/DiamondCutFacet.json @@ -0,0 +1,93 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "DiamondCutFacet", + "sourceName": "src/bridges/facets/DiamondCutFacet.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "indexed": false, + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" + }, + { + "indexed": false, + "internalType": "address", + "name": "_init", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "DiamondCut", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "_init", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "diamondCut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b5061298d806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80631f931c1c14610030575b600080fd5b61004a60048036038101906100459190611b35565b61004c565b005b6100546100b6565b6100af8585906100649190612387565b8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610151565b5050505050565b6100be610571565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461014f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101469061204e565b60405180910390fd5b565b60005b8351811015610526576000848281518110610198577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156101e0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610219577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156102b6576102b185838151811061025b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106102a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161059e565b610512565b600160028111156102f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610329577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103c6576103c185838151811061036b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106103b0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161083d565b610511565b6002808111156103ff577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610438577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104d5576104d085838151811061047a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106104bf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610ae7565b610510565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610507906120ae565b60405180910390fd5b5b5b50808061051e90612412565b915050610154565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161055a93929190611fa7565b60405180910390a161056c8282610c98565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116105e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d99061206e565b60405180910390fd5b60006105ec610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561065e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610655906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156106cc576106cb8285610eab565b5b60005b8351811015610836576000848281518110610713577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610807576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107fe9061212e565b60405180910390fd5b6108138583868a610f86565b838061081e9061245b565b9450505050808061082e90612412565b9150506106cf565b5050505050565b6000815111610881576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108789061206e565b60405180910390fd5b600061088b610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f4906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff16141561096b5761096a8285610eab565b5b60005b8351811015610ae05760008482815181106109b2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9d9061214e565b60405180910390fd5b610ab1858284611133565b610abd8583868a610f86565b8380610ac89061245b565b94505050508080610ad890612412565b91505061096e565b5050505050565b6000815111610b2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b229061206e565b60405180910390fd5b6000610b35610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610ba6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9d9061216e565b60405180910390fd5b60005b8251811015610c92576000838281518110610bed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610c7d848284611133565b50508080610c8a90612412565b915050610ba9565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d16576000815114610d11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d089061200e565b60405180910390fd5b610ea7565b6000815111610d5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d51906120ee565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610db057610daf826040518060600160405280602881526020016129356028913961187c565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610dd89190611f90565b600060405180830381855af49150503d8060008114610e13576040519150601f19603f3d011682016040523d82523d6000602084013e610e18565b606091505b509150915081610ea457600081511115610e6957806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e609190611fec565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9b9061202e565b60405180910390fd5b50505b5050565b610ecd8160405180606001604052806024815260200161295d6024913961187c565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119a9061208e565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611212576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112099061210e565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506112e991906122c0565b90508082146114c95760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018281548110611370577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611412577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611543577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156118755760006001866002018054905061162e91906122c0565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146117bb5760008760020183815481106116be577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611728577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806117f5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906118c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bf9190611fec565b60405180910390fd5b50505050565b60006118e16118dc846121b3565b61218e565b9050808382526020820190508285602086028201111561190057600080fd5b60005b8581101561193057816119168882611a49565b845260208401935060208301925050600181019050611903565b5050509392505050565b600061194d611948846121df565b61218e565b9050808382526020820190508285602086028201111561196c57600080fd5b60005b858110156119b657813567ffffffffffffffff81111561198e57600080fd5b80860161199b8982611abd565b8552602085019450602084019350505060018101905061196f565b5050509392505050565b6000813590506119cf816128f6565b92915050565b600082601f8301126119e657600080fd5b81356119f68482602086016118ce565b91505092915050565b60008083601f840112611a1157600080fd5b8235905067ffffffffffffffff811115611a2a57600080fd5b602083019150836020820283011115611a4257600080fd5b9250929050565b600081359050611a588161290d565b92915050565b60008083601f840112611a7057600080fd5b8235905067ffffffffffffffff811115611a8957600080fd5b602083019150836001820283011115611aa157600080fd5b9250929050565b600081359050611ab781612924565b92915050565b600060608284031215611acf57600080fd5b611ad9606061218e565b90506000611ae9848285016119c0565b6000830152506020611afd84828501611aa8565b602083015250604082013567ffffffffffffffff811115611b1d57600080fd5b611b29848285016119d5565b60408301525092915050565b600080600080600060608688031215611b4d57600080fd5b600086013567ffffffffffffffff811115611b6757600080fd5b611b73888289016119ff565b95509550506020611b86888289016119c0565b935050604086013567ffffffffffffffff811115611ba357600080fd5b611baf88828901611a5e565b92509250509295509295909350565b6000611bca8383611cdb565b60208301905092915050565b6000611be28383611f40565b905092915050565b611bf3816122f4565b82525050565b611c02816122f4565b82525050565b6000611c138261222b565b611c1d8185612271565b9350611c288361220b565b8060005b83811015611c59578151611c408882611bbe565b9750611c4b83612257565b925050600181019050611c2c565b5085935050505092915050565b6000611c7182612236565b611c7b8185612282565b935083602082028501611c8d8561221b565b8060005b85811015611cc95784840389528151611caa8582611bd6565b9450611cb583612264565b925060208a01995050600181019050611c91565b50829750879550505050505092915050565b611ce481612306565b82525050565b6000611cf582612241565b611cff8185612293565b9350611d0f8185602086016123ae565b611d188161251d565b840191505092915050565b6000611d2e82612241565b611d3881856122a4565b9350611d488185602086016123ae565b80840191505092915050565b611d5d8161239c565b82525050565b6000611d6e8261224c565b611d7881856122af565b9350611d888185602086016123ae565b611d918161251d565b840191505092915050565b6000611da9603c836122af565b9150611db48261252e565b604082019050919050565b6000611dcc6026836122af565b9150611dd78261257d565b604082019050919050565b6000611def6022836122af565b9150611dfa826125cc565b604082019050919050565b6000611e12602b836122af565b9150611e1d8261261b565b604082019050919050565b6000611e356037836122af565b9150611e408261266a565b604082019050919050565b6000611e586027836122af565b9150611e63826126b9565b604082019050919050565b6000611e7b602c836122af565b9150611e8682612708565b604082019050919050565b6000611e9e603d836122af565b9150611ea982612757565b604082019050919050565b6000611ec1602e836122af565b9150611ecc826127a6565b604082019050919050565b6000611ee46035836122af565b9150611eef826127f5565b604082019050919050565b6000611f076038836122af565b9150611f1282612844565b604082019050919050565b6000611f2a6036836122af565b9150611f3582612893565b604082019050919050565b6000606083016000830151611f586000860182611bea565b506020830151611f6b6020860182611d54565b5060408301518482036040860152611f838282611c08565b9150508091505092915050565b6000611f9c8284611d23565b915081905092915050565b60006060820190508181036000830152611fc18186611c66565b9050611fd06020830185611bf9565b8181036040830152611fe28184611cea565b9050949350505050565b600060208201905081810360008301526120068184611d63565b905092915050565b6000602082019050818103600083015261202781611d9c565b9050919050565b6000602082019050818103600083015261204781611dbf565b9050919050565b6000602082019050818103600083015261206781611de2565b9050919050565b6000602082019050818103600083015261208781611e05565b9050919050565b600060208201905081810360008301526120a781611e28565b9050919050565b600060208201905081810360008301526120c781611e4b565b9050919050565b600060208201905081810360008301526120e781611e6e565b9050919050565b6000602082019050818103600083015261210781611e91565b9050919050565b6000602082019050818103600083015261212781611eb4565b9050919050565b6000602082019050818103600083015261214781611ed7565b9050919050565b6000602082019050818103600083015261216781611efa565b9050919050565b6000602082019050818103600083015261218781611f1d565b9050919050565b60006121986121a9565b90506121a482826123e1565b919050565b6000604051905090565b600067ffffffffffffffff8211156121ce576121cd6124ee565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156121fa576121f96124ee565b5b602082029050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006122cb82612365565b91506122d683612365565b9250828210156122e9576122e8612490565b5b828203905092915050565b60006122ff82612345565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050612340826128e2565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b600061239436848461193a565b905092915050565b60006123a782612332565b9050919050565b60005b838110156123cc5780820151818401526020810190506123b1565b838111156123db576000848401525b50505050565b6123ea8261251d565b810181811067ffffffffffffffff82111715612409576124086124ee565b5b80604052505050565b600061241d82612365565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156124505761244f612490565b5b600182019050919050565b60006124668261236f565b91506bffffffffffffffffffffffff82141561248557612484612490565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106128f3576128f26124bf565b5b50565b6128ff816122f4565b811461290a57600080fd5b50565b61291681612306565b811461292157600080fd5b50565b6003811061293157600080fd5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80631f931c1c14610030575b600080fd5b61004a60048036038101906100459190611b35565b61004c565b005b6100546100b6565b6100af8585906100649190612387565b8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610151565b5050505050565b6100be610571565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461014f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101469061204e565b60405180910390fd5b565b60005b8351811015610526576000848281518110610198577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156101e0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610219577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156102b6576102b185838151811061025b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106102a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161059e565b610512565b600160028111156102f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610329577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103c6576103c185838151811061036b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106103b0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161083d565b610511565b6002808111156103ff577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610438577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104d5576104d085838151811061047a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106104bf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610ae7565b610510565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610507906120ae565b60405180910390fd5b5b5b50808061051e90612412565b915050610154565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161055a93929190611fa7565b60405180910390a161056c8282610c98565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116105e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d99061206e565b60405180910390fd5b60006105ec610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561065e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610655906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156106cc576106cb8285610eab565b5b60005b8351811015610836576000848281518110610713577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610807576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107fe9061212e565b60405180910390fd5b6108138583868a610f86565b838061081e9061245b565b9450505050808061082e90612412565b9150506106cf565b5050505050565b6000815111610881576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108789061206e565b60405180910390fd5b600061088b610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f4906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff16141561096b5761096a8285610eab565b5b60005b8351811015610ae05760008482815181106109b2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9d9061214e565b60405180910390fd5b610ab1858284611133565b610abd8583868a610f86565b8380610ac89061245b565b94505050508080610ad890612412565b91505061096e565b5050505050565b6000815111610b2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b229061206e565b60405180910390fd5b6000610b35610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610ba6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9d9061216e565b60405180910390fd5b60005b8251811015610c92576000838281518110610bed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610c7d848284611133565b50508080610c8a90612412565b915050610ba9565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d16576000815114610d11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d089061200e565b60405180910390fd5b610ea7565b6000815111610d5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d51906120ee565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610db057610daf826040518060600160405280602881526020016129356028913961187c565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610dd89190611f90565b600060405180830381855af49150503d8060008114610e13576040519150601f19603f3d011682016040523d82523d6000602084013e610e18565b606091505b509150915081610ea457600081511115610e6957806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e609190611fec565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9b9061202e565b60405180910390fd5b50505b5050565b610ecd8160405180606001604052806024815260200161295d6024913961187c565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119a9061208e565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611212576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112099061210e565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506112e991906122c0565b90508082146114c95760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018281548110611370577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611412577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611543577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156118755760006001866002018054905061162e91906122c0565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146117bb5760008760020183815481106116be577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611728577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806117f5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906118c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bf9190611fec565b60405180910390fd5b50505050565b60006118e16118dc846121b3565b61218e565b9050808382526020820190508285602086028201111561190057600080fd5b60005b8581101561193057816119168882611a49565b845260208401935060208301925050600181019050611903565b5050509392505050565b600061194d611948846121df565b61218e565b9050808382526020820190508285602086028201111561196c57600080fd5b60005b858110156119b657813567ffffffffffffffff81111561198e57600080fd5b80860161199b8982611abd565b8552602085019450602084019350505060018101905061196f565b5050509392505050565b6000813590506119cf816128f6565b92915050565b600082601f8301126119e657600080fd5b81356119f68482602086016118ce565b91505092915050565b60008083601f840112611a1157600080fd5b8235905067ffffffffffffffff811115611a2a57600080fd5b602083019150836020820283011115611a4257600080fd5b9250929050565b600081359050611a588161290d565b92915050565b60008083601f840112611a7057600080fd5b8235905067ffffffffffffffff811115611a8957600080fd5b602083019150836001820283011115611aa157600080fd5b9250929050565b600081359050611ab781612924565b92915050565b600060608284031215611acf57600080fd5b611ad9606061218e565b90506000611ae9848285016119c0565b6000830152506020611afd84828501611aa8565b602083015250604082013567ffffffffffffffff811115611b1d57600080fd5b611b29848285016119d5565b60408301525092915050565b600080600080600060608688031215611b4d57600080fd5b600086013567ffffffffffffffff811115611b6757600080fd5b611b73888289016119ff565b95509550506020611b86888289016119c0565b935050604086013567ffffffffffffffff811115611ba357600080fd5b611baf88828901611a5e565b92509250509295509295909350565b6000611bca8383611cdb565b60208301905092915050565b6000611be28383611f40565b905092915050565b611bf3816122f4565b82525050565b611c02816122f4565b82525050565b6000611c138261222b565b611c1d8185612271565b9350611c288361220b565b8060005b83811015611c59578151611c408882611bbe565b9750611c4b83612257565b925050600181019050611c2c565b5085935050505092915050565b6000611c7182612236565b611c7b8185612282565b935083602082028501611c8d8561221b565b8060005b85811015611cc95784840389528151611caa8582611bd6565b9450611cb583612264565b925060208a01995050600181019050611c91565b50829750879550505050505092915050565b611ce481612306565b82525050565b6000611cf582612241565b611cff8185612293565b9350611d0f8185602086016123ae565b611d188161251d565b840191505092915050565b6000611d2e82612241565b611d3881856122a4565b9350611d488185602086016123ae565b80840191505092915050565b611d5d8161239c565b82525050565b6000611d6e8261224c565b611d7881856122af565b9350611d888185602086016123ae565b611d918161251d565b840191505092915050565b6000611da9603c836122af565b9150611db48261252e565b604082019050919050565b6000611dcc6026836122af565b9150611dd78261257d565b604082019050919050565b6000611def6022836122af565b9150611dfa826125cc565b604082019050919050565b6000611e12602b836122af565b9150611e1d8261261b565b604082019050919050565b6000611e356037836122af565b9150611e408261266a565b604082019050919050565b6000611e586027836122af565b9150611e63826126b9565b604082019050919050565b6000611e7b602c836122af565b9150611e8682612708565b604082019050919050565b6000611e9e603d836122af565b9150611ea982612757565b604082019050919050565b6000611ec1602e836122af565b9150611ecc826127a6565b604082019050919050565b6000611ee46035836122af565b9150611eef826127f5565b604082019050919050565b6000611f076038836122af565b9150611f1282612844565b604082019050919050565b6000611f2a6036836122af565b9150611f3582612893565b604082019050919050565b6000606083016000830151611f586000860182611bea565b506020830151611f6b6020860182611d54565b5060408301518482036040860152611f838282611c08565b9150508091505092915050565b6000611f9c8284611d23565b915081905092915050565b60006060820190508181036000830152611fc18186611c66565b9050611fd06020830185611bf9565b8181036040830152611fe28184611cea565b9050949350505050565b600060208201905081810360008301526120068184611d63565b905092915050565b6000602082019050818103600083015261202781611d9c565b9050919050565b6000602082019050818103600083015261204781611dbf565b9050919050565b6000602082019050818103600083015261206781611de2565b9050919050565b6000602082019050818103600083015261208781611e05565b9050919050565b600060208201905081810360008301526120a781611e28565b9050919050565b600060208201905081810360008301526120c781611e4b565b9050919050565b600060208201905081810360008301526120e781611e6e565b9050919050565b6000602082019050818103600083015261210781611e91565b9050919050565b6000602082019050818103600083015261212781611eb4565b9050919050565b6000602082019050818103600083015261214781611ed7565b9050919050565b6000602082019050818103600083015261216781611efa565b9050919050565b6000602082019050818103600083015261218781611f1d565b9050919050565b60006121986121a9565b90506121a482826123e1565b919050565b6000604051905090565b600067ffffffffffffffff8211156121ce576121cd6124ee565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156121fa576121f96124ee565b5b602082029050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006122cb82612365565b91506122d683612365565b9250828210156122e9576122e8612490565b5b828203905092915050565b60006122ff82612345565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050612340826128e2565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b600061239436848461193a565b905092915050565b60006123a782612332565b9050919050565b60005b838110156123cc5780820151818401526020810190506123b1565b838111156123db576000848401525b50505050565b6123ea8261251d565b810181811067ffffffffffffffff82111715612409576124086124ee565b5b80604052505050565b600061241d82612365565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156124505761244f612490565b5b600182019050919050565b60006124668261236f565b91506bffffffffffffffffffffffff82141561248557612484612490565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106128f3576128f26124bf565b5b50565b6128ff816122f4565b811461290a57600080fd5b50565b61291681612306565b811461292157600080fd5b50565b6003811061293157600080fd5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/DiamondLoupeFacet.json b/artifacts/DiamondLoupeFacet.json new file mode 100644 index 00000000..f2bf0f80 --- /dev/null +++ b/artifacts/DiamondLoupeFacet.json @@ -0,0 +1,106 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "DiamondLoupeFacet", + "sourceName": "src/bridges/facets/DiamondLoupeFacet.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "_functionSelector", + "type": "bytes4" + } + ], + "name": "facetAddress", + "outputs": [ + { + "internalType": "address", + "name": "facetAddress_", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "facetAddresses", + "outputs": [ + { + "internalType": "address[]", + "name": "facetAddresses_", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_facet", + "type": "address" + } + ], + "name": "facetFunctionSelectors", + "outputs": [ + { + "internalType": "bytes4[]", + "name": "facetFunctionSelectors_", + "type": "bytes4[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "facets", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IDiamondLoupe.Facet[]", + "name": "facets_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "_interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b50610c11806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c57806352ef6b2c1461008c5780637a0ed627146100aa578063adfca15e146100c8578063cdffacc6146100f8575b600080fd5b6100766004803603810190610071919061071d565b610128565b6040516100839190610a13565b60405180910390f35b61009461019e565b6040516100a191906109ad565b60405180910390f35b6100b261023b565b6040516100bf91906109f1565b60405180910390f35b6100e260048036038101906100dd91906106f4565b6104f6565b6040516100ef91906109cf565b60405180910390f35b610112600480360381019061010d919061071d565b6105e1565b60405161011f9190610992565b60405180910390f35b60008061013361066d565b9050806003016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff16915050919050565b606060006101aa61066d565b90508060020180548060200260200160405190810160405280929190818152602001828054801561023057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116101e6575b505050505091505090565b6060600061024761066d565b90506000816002018054905090508067ffffffffffffffff811115610295577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102ce57816020015b6102bb61069a565b8152602001906001900390816102b35790505b50925060005b818110156104f057600083600201828154811061031a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080858381518110610381577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561048f57602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001906004019060208260030104928301926001038202915080841161043c5790505b50505050508583815181106104cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001819052505080806104e890610b5e565b9150506102d4565b50505090565b6060600061050261066d565b90508060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806020026020016040519081016040528092919081815260200182805480156105d457602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600401906020826003010492830192600103820291508084116105815790505b5050505050915050919050565b6000806105ec61066d565b9050806000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b6000813590506106d981610bd6565b92915050565b6000813590506106ee81610bed565b92915050565b60006020828403121561070657600080fd5b6000610714848285016106ca565b91505092915050565b60006020828403121561072f57600080fd5b600061073d848285016106df565b91505092915050565b6000610752838361078a565b60208301905092915050565b600061076a8383610946565b60208301905092915050565b60006107828383610955565b905092915050565b61079381610aea565b82525050565b6107a281610aea565b82525050565b60006107b382610a5e565b6107bd8185610aa6565b93506107c883610a2e565b8060005b838110156107f95781516107e08882610746565b97506107eb83610a7f565b9250506001810190506107cc565b5085935050505092915050565b600061081182610a69565b61081b8185610ab7565b935061082683610a3e565b8060005b8381101561085757815161083e888261075e565b975061084983610a8c565b92505060018101905061082a565b5085935050505092915050565b600061086f82610a69565b6108798185610ac8565b935061088483610a3e565b8060005b838110156108b557815161089c888261075e565b97506108a783610a8c565b925050600181019050610888565b5085935050505092915050565b60006108cd82610a74565b6108d78185610ad9565b9350836020820285016108e985610a4e565b8060005b8581101561092557848403895281516109068582610776565b945061091183610a99565b925060208a019950506001810190506108ed565b50829750879550505050505092915050565b61094081610afc565b82525050565b61094f81610b08565b82525050565b600060408301600083015161096d600086018261078a565b50602083015184820360208601526109858282610806565b9150508091505092915050565b60006020820190506109a76000830184610799565b92915050565b600060208201905081810360008301526109c781846107a8565b905092915050565b600060208201905081810360008301526109e98184610864565b905092915050565b60006020820190508181036000830152610a0b81846108c2565b905092915050565b6000602082019050610a286000830184610937565b92915050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610af582610b34565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610b6982610b54565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610b9c57610b9b610ba7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610bdf81610aea565b8114610bea57600080fd5b50565b610bf681610b08565b8114610c0157600080fd5b5056fea164736f6c6343000804000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c57806352ef6b2c1461008c5780637a0ed627146100aa578063adfca15e146100c8578063cdffacc6146100f8575b600080fd5b6100766004803603810190610071919061071d565b610128565b6040516100839190610a13565b60405180910390f35b61009461019e565b6040516100a191906109ad565b60405180910390f35b6100b261023b565b6040516100bf91906109f1565b60405180910390f35b6100e260048036038101906100dd91906106f4565b6104f6565b6040516100ef91906109cf565b60405180910390f35b610112600480360381019061010d919061071d565b6105e1565b60405161011f9190610992565b60405180910390f35b60008061013361066d565b9050806003016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff16915050919050565b606060006101aa61066d565b90508060020180548060200260200160405190810160405280929190818152602001828054801561023057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116101e6575b505050505091505090565b6060600061024761066d565b90506000816002018054905090508067ffffffffffffffff811115610295577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102ce57816020015b6102bb61069a565b8152602001906001900390816102b35790505b50925060005b818110156104f057600083600201828154811061031a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080858381518110610381577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561048f57602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001906004019060208260030104928301926001038202915080841161043c5790505b50505050508583815181106104cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001819052505080806104e890610b5e565b9150506102d4565b50505090565b6060600061050261066d565b90508060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806020026020016040519081016040528092919081815260200182805480156105d457602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600401906020826003010492830192600103820291508084116105815790505b5050505050915050919050565b6000806105ec61066d565b9050806000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b6000813590506106d981610bd6565b92915050565b6000813590506106ee81610bed565b92915050565b60006020828403121561070657600080fd5b6000610714848285016106ca565b91505092915050565b60006020828403121561072f57600080fd5b600061073d848285016106df565b91505092915050565b6000610752838361078a565b60208301905092915050565b600061076a8383610946565b60208301905092915050565b60006107828383610955565b905092915050565b61079381610aea565b82525050565b6107a281610aea565b82525050565b60006107b382610a5e565b6107bd8185610aa6565b93506107c883610a2e565b8060005b838110156107f95781516107e08882610746565b97506107eb83610a7f565b9250506001810190506107cc565b5085935050505092915050565b600061081182610a69565b61081b8185610ab7565b935061082683610a3e565b8060005b8381101561085757815161083e888261075e565b975061084983610a8c565b92505060018101905061082a565b5085935050505092915050565b600061086f82610a69565b6108798185610ac8565b935061088483610a3e565b8060005b838110156108b557815161089c888261075e565b97506108a783610a8c565b925050600181019050610888565b5085935050505092915050565b60006108cd82610a74565b6108d78185610ad9565b9350836020820285016108e985610a4e565b8060005b8581101561092557848403895281516109068582610776565b945061091183610a99565b925060208a019950506001810190506108ed565b50829750879550505050505092915050565b61094081610afc565b82525050565b61094f81610b08565b82525050565b600060408301600083015161096d600086018261078a565b50602083015184820360208601526109858282610806565b9150508091505092915050565b60006020820190506109a76000830184610799565b92915050565b600060208201905081810360008301526109c781846107a8565b905092915050565b600060208201905081810360008301526109e98184610864565b905092915050565b60006020820190508181036000830152610a0b81846108c2565b905092915050565b6000602082019050610a286000830184610937565b92915050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610af582610b34565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610b6982610b54565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610b9c57610b9b610ba7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610bdf81610aea565b8114610bea57600080fd5b50565b610bf681610b08565b8114610c0157600080fd5b5056fea164736f6c6343000804000a", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/IDiamondCut.json b/artifacts/IDiamondCut.json new file mode 100644 index 00000000..55e3fad0 --- /dev/null +++ b/artifacts/IDiamondCut.json @@ -0,0 +1,93 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IDiamondCut", + "sourceName": "src/bridges/interfaces/IDiamondCut.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "indexed": false, + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" + }, + { + "indexed": false, + "internalType": "address", + "name": "_init", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "DiamondCut", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "_init", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "diamondCut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/IDiamondLoupe.json b/artifacts/IDiamondLoupe.json new file mode 100644 index 00000000..05348264 --- /dev/null +++ b/artifacts/IDiamondLoupe.json @@ -0,0 +1,87 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IDiamondLoupe", + "sourceName": "src/bridges/interfaces/IDiamondLoupe.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "_functionSelector", + "type": "bytes4" + } + ], + "name": "facetAddress", + "outputs": [ + { + "internalType": "address", + "name": "facetAddress_", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "facetAddresses", + "outputs": [ + { + "internalType": "address[]", + "name": "facetAddresses_", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_facet", + "type": "address" + } + ], + "name": "facetFunctionSelectors", + "outputs": [ + { + "internalType": "bytes4[]", + "name": "facetFunctionSelectors_", + "type": "bytes4[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "facets", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IDiamondLoupe.Facet[]", + "name": "facets_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/IERC165.json b/artifacts/IERC165.json new file mode 100644 index 00000000..76e60d3b --- /dev/null +++ b/artifacts/IERC165.json @@ -0,0 +1,30 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC165", + "sourceName": "src/bridges/interfaces/IERC165.sol", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/IERC173.json b/artifacts/IERC173.json new file mode 100644 index 00000000..c620bd3c --- /dev/null +++ b/artifacts/IERC173.json @@ -0,0 +1,37 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "IERC173", + "sourceName": "src/bridges/interfaces/IERC173.sol", + "abi": [ + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "owner_", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x", + "deployedBytecode": "0x", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/LibDiamond.json b/artifacts/LibDiamond.json new file mode 100644 index 00000000..a7d5ae13 --- /dev/null +++ b/artifacts/LibDiamond.json @@ -0,0 +1,72 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "LibDiamond", + "sourceName": "src/bridges/libs/LibDiamond.sol", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "indexed": false, + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" + }, + { + "indexed": false, + "internalType": "address", + "name": "_init", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "DiamondCut", + "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" + } + ], + "bytecode": "0x602d6050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000804000a", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000804000a", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/artifacts/OwnershipFacet.json b/artifacts/OwnershipFacet.json new file mode 100644 index 00000000..16399c66 --- /dev/null +++ b/artifacts/OwnershipFacet.json @@ -0,0 +1,37 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "OwnershipFacet", + "sourceName": "src/bridges/facets/OwnershipFacet.sol", + "abi": [ + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "owner_", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506103cb806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80638da5cb5b1461003b578063f2fde38b14610059575b600080fd5b610043610075565b60405161005091906102da565b60405180910390f35b610073600480360381019061006e919061027f565b610084565b005b600061007f610098565b905090565b61008c6100cb565b61009581610166565b50565b60006100a261023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6100d361023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015b906102f5565b60405180910390fd5b565b600061017061023d565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b600081359050610279816103a7565b92915050565b60006020828403121561029157600080fd5b600061029f8482850161026a565b91505092915050565b6102b181610326565b82525050565b60006102c4602283610315565b91506102cf82610358565b604082019050919050565b60006020820190506102ef60008301846102a8565b92915050565b6000602082019050818103600083015261030e816102b7565b9050919050565b600082825260208201905092915050565b600061033182610338565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b6103b081610326565b81146103bb57600080fd5b5056fea164736f6c6343000804000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80638da5cb5b1461003b578063f2fde38b14610059575b600080fd5b610043610075565b60405161005091906102da565b60405180910390f35b610073600480360381019061006e919061027f565b610084565b005b600061007f610098565b905090565b61008c6100cb565b61009581610166565b50565b60006100a261023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6100d361023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015b906102f5565b60405180910390fd5b565b600061017061023d565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b600081359050610279816103a7565b92915050565b60006020828403121561029157600080fd5b600061029f8482850161026a565b91505092915050565b6102b181610326565b82525050565b60006102c4602283610315565b91506102cf82610358565b604082019050919050565b60006020820190506102ef60008301846102a8565b92915050565b6000602082019050818103600083015261030e816102b7565b9050919050565b600082825260208201905092915050565b600061033182610338565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b6103b081610326565b81146103bb57600080fd5b5056fea164736f6c6343000804000a", + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/deploy/200_deploy_initial_facets.ts b/deploy/200_deploy_initial_facets.ts new file mode 100644 index 00000000..5f63e833 --- /dev/null +++ b/deploy/200_deploy_initial_facets.ts @@ -0,0 +1,29 @@ +import { HardhatRuntimeEnvironment } from 'hardhat/types' +import { DeployFunction } from 'hardhat-deploy/types' + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { + deployments: { deploy }, + getNamedAccounts, + } = hre; + const { from } = await getNamedAccounts(); + + await deploy('DiamondCutFacet', { + from, + log: true, + }); + + await deploy('DiamondLoupeFacet', { + from, + log: true, + }); + + await deploy('OwnershipFacet', { + from, + log: true, + }); +} + +func.tags = ['bridges', 'initial-facets'] + +export default func; diff --git a/deploy/201_deploy_diamond.ts b/deploy/201_deploy_diamond.ts new file mode 100644 index 00000000..0bcd2aad --- /dev/null +++ b/deploy/201_deploy_diamond.ts @@ -0,0 +1,24 @@ +import { HardhatRuntimeEnvironment } from 'hardhat/types' +import { DeployFunction } from 'hardhat-deploy/types' + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { + deployments: { deploy }, + getNamedAccounts, + ethers, + } = hre; + const { from } = await getNamedAccounts(); + + const diamondCutFacet = await ethers.getContract('DiamondCutFacet'); + + await deploy('Diamond', { + from, + args: [from, diamondCutFacet.address], + log: true, + deterministicDeployment: true, + }); +} + +func.tags = ['bridges', 'diamond']; + +export default func; diff --git a/deploy/202_init_facets.ts b/deploy/202_init_facets.ts new file mode 100644 index 00000000..0f94c7cc --- /dev/null +++ b/deploy/202_init_facets.ts @@ -0,0 +1,28 @@ +import { ethers } from 'hardhat'; +import { DeployFunction } from 'hardhat-deploy/types'; +import { IDiamondLoupe } from '../typings'; +import { addFacets, addOrReplaceFacets } from '../utils/diamond'; + +const func: DeployFunction = async function () { + const diamondLoupeFacet = await ethers.getContract('DiamondLoupeFacet'); + const ownershipFacet = await ethers.getContract('OwnershipFacet'); + const diamond = await ethers.getContract('Diamond'); + + const loupe = await ethers.getContractAt( + 'IDiamondLoupe', + diamond.address + ); + + try { + await loupe.facets(); + } catch (e) { + await addFacets([diamondLoupeFacet], diamond.address); + } + + await addOrReplaceFacets([diamondLoupeFacet, ownershipFacet], diamond.address); +} + +func.tags = ['bridges', 'init-facets']; +func.dependencies = ['initial-facets', 'diamond']; + +export default func; diff --git a/deployments/fuse/.chainId b/deployments/fuse/.chainId new file mode 100644 index 00000000..3fdc173d --- /dev/null +++ b/deployments/fuse/.chainId @@ -0,0 +1 @@ +122 \ No newline at end of file diff --git a/deployments/fuse/BalancesHelper.json b/deployments/fuse/BalancesHelper.json new file mode 100644 index 00000000..cbbe7ffa --- /dev/null +++ b/deployments/fuse/BalancesHelper.json @@ -0,0 +1,81 @@ +{ + "address": "0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b", + "abi": [ + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "getBalances", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x64b505015e713e0a03825ab347fff4e9d164ba3b1f0c80b8698de2933ce0046d", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 2, + "gasUsed": "420418", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x62838734a13c86a285f643b29c5f25c6089427156e834dbf23d9dded0ed003ee", + "transactionHash": "0x64b505015e713e0a03825ab347fff4e9d164ba3b1f0c80b8698de2933ce0046d", + "logs": [], + "blockNumber": 17842181, + "cumulativeGasUsed": "562860", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getBalances\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Jegor Sidorenko Stanis\\u0142aw G\\u0142ogowski \",\"kind\":\"dev\",\"methods\":{\"getBalances(address[],address[])\":{\"details\":\"Pass 0x0 as a \\\"token\\\" address to get ETH balance. Possible error throws: - extremely large arrays for account and or tokens (gas cost too high)\",\"params\":{\"accounts\":\"array of accounts addresses\",\"tokens\":\"array of tokens addresses\"},\"returns\":{\"_0\":\"a one-dimensional that's user.length * tokens.length long. The array is ordered by all of the 0th accounts token balances, then the 1th user, and so on.\"}}},\"title\":\"Balances helper\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getBalances(address[],address[])\":{\"notice\":\"Checks the token balances of accounts for multiple tokens.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/common/helpers/BalancesHelper.sol\":\"BalancesHelper\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/helpers/BalancesHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../token/ERC20Token.sol\\\";\\nimport \\\"../libs/SafeMathLib.sol\\\";\\n\\n\\n/**\\n * @title Balances helper\\n *\\n * @author Jegor Sidorenko \\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract BalancesHelper {\\n using SafeMathLib for uint256;\\n\\n // external functions\\n\\n /**\\n * @notice Checks the token balances of accounts for multiple tokens.\\n * @dev Pass 0x0 as a \\\"token\\\" address to get ETH balance.\\n *\\n * Possible error throws:\\n * - extremely large arrays for account and or tokens (gas cost too high)\\n *\\n * @param accounts array of accounts addresses\\n * @param tokens array of tokens addresses\\n * @return a one-dimensional that's user.length * tokens.length long. The\\n * array is ordered by all of the 0th accounts token balances, then the 1th\\n * user, and so on.\\n */\\n function getBalances(\\n address[] calldata accounts,\\n address[] calldata tokens\\n )\\n external\\n view\\n returns (uint[] memory)\\n {\\n uint[] memory result = new uint[](accounts.length.mul(tokens.length));\\n\\n for (uint i = 0; i < accounts.length; i++) {\\n for (uint j = 0; j < tokens.length; j++) {\\n uint index = j.add(tokens.length.mul(i));\\n\\n if (tokens[j] != address(0x0)) {\\n result[index] = _getBalance(accounts[i], tokens[j]);\\n } else {\\n result[index] = accounts[i].balance;\\n }\\n }\\n }\\n\\n return result;\\n }\\n\\n // private functions\\n\\n function _getBalance(\\n address account,\\n address token\\n )\\n private\\n view\\n returns (uint256)\\n {\\n uint256 result = 0;\\n uint256 tokenCode;\\n\\n /// @dev check if token is actually a contract\\n // solhint-disable-next-line no-inline-assembly\\n assembly { tokenCode := extcodesize(token) } // contract code size\\n\\n if (tokenCode > 0) {\\n /// @dev is it a contract and does it implement balanceOf\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool methodExists,) = token.staticcall(abi.encodeWithSelector(\\n ERC20Token(token).balanceOf.selector,\\n account\\n ));\\n\\n if (methodExists) {\\n result = ERC20Token(token).balanceOf(account);\\n }\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x76a5729807b8581731967ea74fc5e16a2c5c9067457c9059da97f089ffff68b9\",\"license\":\"MIT\"},\"src/common/libs/SafeMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Safe math library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/math/SafeMath.sol\\n */\\nlibrary SafeMathLib {\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n\\n require(c >= a, \\\"SafeMathLib: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMathLib: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n\\n return a - b;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n\\n require(c / a == b, \\\"SafeMathLib: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMathLib: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n\\n return a / b;\\n }\\n\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMathLib: modulo by zero\\\");\\n }\\n\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x6089f354ca754d9c5dd9e800ee5ed86717dbf8f9af470604e0be691ac57c0107\",\"license\":\"MIT\"},\"src/common/token/ERC20Token.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/SafeMathLib.sol\\\";\\n\\n\\n/**\\n * @title ERC20 token\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/token/ERC20/ERC20.sol\\n */\\ncontract ERC20Token {\\n using SafeMathLib for uint256;\\n\\n string public name;\\n string public symbol;\\n uint8 public decimals;\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) internal balances;\\n mapping(address => mapping(address => uint256)) internal allowances;\\n\\n // events\\n\\n event Transfer(\\n address indexed from,\\n address indexed to,\\n uint256 value\\n );\\n\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n function transfer(\\n address to,\\n uint256 value\\n )\\n external\\n returns (bool)\\n {\\n _transfer(_getSender(), to, value);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n address sender = _getSender();\\n\\n _transfer(from, to, value);\\n _approve(from, sender, allowances[from][sender].sub(value));\\n\\n return true;\\n }\\n\\n function approve(\\n address spender,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n _approve(_getSender(), spender, value);\\n\\n return true;\\n }\\n\\n // external functions (views)\\n\\n function balanceOf(\\n address owner\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return balances[owner];\\n }\\n\\n function allowance(\\n address owner,\\n address spender\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[owner][spender];\\n }\\n\\n // internal functions\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n from != address(0),\\n \\\"ERC20Token: cannot transfer from 0x0 address\\\"\\n );\\n require(\\n to != address(0),\\n \\\"ERC20Token: cannot transfer to 0x0 address\\\"\\n );\\n\\n balances[from] = balances[from].sub(value);\\n balances[to] = balances[to].add(value);\\n\\n emit Transfer(from, to, value);\\n }\\n\\n function _approve(\\n address owner,\\n address spender,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot approve from 0x0 address\\\"\\n );\\n require(\\n spender != address(0),\\n \\\"ERC20Token: cannot approve to 0x0 address\\\"\\n );\\n\\n allowances[owner][spender] = value;\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function _mint(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot mint to 0x0 address\\\"\\n );\\n require(\\n value > 0,\\n \\\"ERC20Token: cannot mint 0 value\\\"\\n );\\n\\n balances[owner] = balances[owner].add(value);\\n totalSupply = totalSupply.add(value);\\n\\n emit Transfer(address(0), owner, value);\\n }\\n\\n function _burn(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot burn from 0x0 address\\\"\\n );\\n\\n balances[owner] = balances[owner].sub(\\n value,\\n \\\"ERC20Token: burn value exceeds balance\\\"\\n );\\n\\n totalSupply = totalSupply.sub(value);\\n\\n emit Transfer(owner, address(0), value);\\n }\\n\\n // internal functions (views)\\n\\n function _getSender()\\n virtual\\n internal\\n view\\n returns (address)\\n {\\n return msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x6f2b0bd08da549c6c1f5ceee85766832d587dde62c56bebc3a14bd9ea407e03d\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506106a2806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063ef5bfc3714610030575b600080fd5b6100fc6004803603604081101561004657600080fd5b810190808035906020019064010000000081111561006357600080fd5b82018360208201111561007557600080fd5b8035906020019184602083028401116401000000008311171561009757600080fd5b9091929391929390803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460208302840111640100000000831117156100ec57600080fd5b9091929391929390505050610153565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561013f578082015181840152602081019050610124565b505050509050019250505060405180910390f35b60608061016f848490508787905061035490919063ffffffff16565b67ffffffffffffffff8111801561018557600080fd5b506040519080825280602002602001820160405280156101b45781602001602082028036833780820191505090505b50905060005b868690508110156103475760005b858590508110156103395760006101fd6101ee848989905061035490919063ffffffff16565b836103da90919063ffffffff16565b9050600073ffffffffffffffffffffffffffffffffffffffff1687878481811061022357fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146102d2576102b589898581811061026a57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1688888581811061029357fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16610462565b8482815181106102c157fe5b60200260200101818152505061032b565b8888848181106102de57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163184828151811061031e57fe5b6020026020010181815250505b5080806001019150506101c8565b5080806001019150506101ba565b5080915050949350505050565b60008083141561036757600090506103d4565b600082840290508284828161037857fe5b04146103cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806106726024913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015610458576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174684c69623a206164646974696f6e206f766572666c6f77000081525060200191505060405180910390fd5b8091505092915050565b600080600090506000833b905060008111156106665760008473ffffffffffffffffffffffffffffffffffffffff166370a0823160e01b87604051602401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310610550578051825260208201915060208101905060208303925061052d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146105b0576040519150601f19603f3d011682016040523d82523d6000602084013e6105b5565b606091505b505090508015610664578473ffffffffffffffffffffffffffffffffffffffff166370a08231876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561062657600080fd5b505afa15801561063a573d6000803e3d6000fd5b505050506040513d602081101561065057600080fd5b810190808051906020019092919050505092505b505b81925050509291505056fe536166654d6174684c69623a206d756c7469706c69636174696f6e206f766572666c6f77a164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063ef5bfc3714610030575b600080fd5b6100fc6004803603604081101561004657600080fd5b810190808035906020019064010000000081111561006357600080fd5b82018360208201111561007557600080fd5b8035906020019184602083028401116401000000008311171561009757600080fd5b9091929391929390803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460208302840111640100000000831117156100ec57600080fd5b9091929391929390505050610153565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561013f578082015181840152602081019050610124565b505050509050019250505060405180910390f35b60608061016f848490508787905061035490919063ffffffff16565b67ffffffffffffffff8111801561018557600080fd5b506040519080825280602002602001820160405280156101b45781602001602082028036833780820191505090505b50905060005b868690508110156103475760005b858590508110156103395760006101fd6101ee848989905061035490919063ffffffff16565b836103da90919063ffffffff16565b9050600073ffffffffffffffffffffffffffffffffffffffff1687878481811061022357fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146102d2576102b589898581811061026a57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1688888581811061029357fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16610462565b8482815181106102c157fe5b60200260200101818152505061032b565b8888848181106102de57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163184828151811061031e57fe5b6020026020010181815250505b5080806001019150506101c8565b5080806001019150506101ba565b5080915050949350505050565b60008083141561036757600090506103d4565b600082840290508284828161037857fe5b04146103cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806106726024913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015610458576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174684c69623a206164646974696f6e206f766572666c6f77000081525060200191505060405180910390fd5b8091505092915050565b600080600090506000833b905060008111156106665760008473ffffffffffffffffffffffffffffffffffffffff166370a0823160e01b87604051602401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310610550578051825260208201915060208101905060208303925061052d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146105b0576040519150601f19603f3d011682016040523d82523d6000602084013e6105b5565b606091505b505090508015610664578473ffffffffffffffffffffffffffffffffffffffff166370a08231876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561062657600080fd5b505afa15801561063a573d6000803e3d6000fd5b505050506040513d602081101561065057600080fd5b810190808051906020019092919050505092505b505b81925050509291505056fe536166654d6174684c69623a206d756c7469706c69636174696f6e206f766572666c6f77a164736f6c634300060c000a", + "devdoc": { + "author": "Jegor Sidorenko Stanisław Głogowski ", + "kind": "dev", + "methods": { + "getBalances(address[],address[])": { + "details": "Pass 0x0 as a \"token\" address to get ETH balance. Possible error throws: - extremely large arrays for account and or tokens (gas cost too high)", + "params": { + "accounts": "array of accounts addresses", + "tokens": "array of tokens addresses" + }, + "returns": { + "_0": "a one-dimensional that's user.length * tokens.length long. The array is ordered by all of the 0th accounts token balances, then the 1th user, and so on." + } + } + }, + "title": "Balances helper", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "getBalances(address[],address[])": { + "notice": "Checks the token balances of accounts for multiple tokens." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fuse/BalancesHelperV2.json b/deployments/fuse/BalancesHelperV2.json new file mode 100644 index 00000000..23627805 --- /dev/null +++ b/deployments/fuse/BalancesHelperV2.json @@ -0,0 +1,160 @@ +{ + "address": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "AccountZeroAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "TokenZeroAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "getBalances", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "getSuperfluidWrappedTokenBalances", + "outputs": [ + { + "internalType": "int256[]", + "name": "", + "type": "int256[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xc2647efac011deb1cdd2ad539cbbb606cfa84106b7bea2e387f964ea2f5a288a", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 3, + "gasUsed": "964203", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x99e8d7dd8e62d862999d729c2e1bf9b8d2e93b2bb0948393d889bb7974bf0e67", + "transactionHash": "0xc2647efac011deb1cdd2ad539cbbb606cfa84106b7bea2e387f964ea2f5a288a", + "logs": [], + "blockNumber": 17842182, + "cumulativeGasUsed": "1510080", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "7a183f869f73d4ccd46c6d23b208518b", + "metadata": "{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"AccountZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getBalances\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getSuperfluidWrappedTokenBalances\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getBalances(address[],address[])\":{\"details\":\"Error thrown if: account or token address is address(0), large arrays of accounts/tokens are passed in could cause gas block limit issue\",\"params\":{\"accounts\":\"= Array of accounts addresses\",\"tokens\":\"= Array of tokens addresses\"},\"returns\":{\"_0\":\"One-dimensional that's accounts.length * tokens.length long. The array is ordered by all of accounts[0] token balances, then accounts[1] etc.\"}},\"getSuperfluidWrappedTokenBalances(address[],address[])\":{\"details\":\"Error thrown if: account or token address is address(0), large arrays of accounts/tokens are passed in could cause gas block limit issue\",\"params\":{\"accounts\":\"= Array of accounts addresses\",\"tokens\":\"= Array of tokens addresses\"},\"returns\":{\"_0\":\"One-dimensional that's accounts.length * tokens.length long. The array is ordered by all of accounts[0] token balances, then accounts[1] etc.\"}}},\"version\":1},\"userdoc\":{\"errors\":{\"AccountZeroAddress(address,address)\":[{\"notice\":\"Custom errors to handle address(0)\"}]},\"kind\":\"user\",\"methods\":{\"getBalances(address[],address[])\":{\"notice\":\"Returns balances of accounts for multiple ERC20 tokens.\"},\"getSuperfluidWrappedTokenBalances(address[],address[])\":{\"notice\":\"Returns balances of accounts for multiple Wrapped Super Tokens.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/common/helpers/BalancesHelperV2.sol\":\"BalancesHelperV2\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x6ebf1944ab804b8660eb6fc52f9fe84588cee01c2566a69023e59497e7d27f45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperAgreement.sol\":{\"content\":\"// SPDX-License-Identifier: AGPLv3\\npragma solidity >= 0.8.0;\\n\\nimport { ISuperfluidToken } from \\\"./ISuperfluidToken.sol\\\";\\n\\n/**\\n * @title Super agreement interface\\n * @author Superfluid\\n */\\ninterface ISuperAgreement {\\n\\n /**\\n * @dev Get the type of the agreement class\\n */\\n function agreementType() external view returns (bytes32);\\n\\n /**\\n * @dev Calculate the real-time balance for the account of this agreement class\\n * @param account Account the state belongs to\\n * @param time Time used for the calculation\\n * @return dynamicBalance Dynamic balance portion of real-time balance of this agreement\\n * @return deposit Account deposit amount of this agreement\\n * @return owedDeposit Account owed deposit amount of this agreement\\n */\\n function realtimeBalanceOf(\\n ISuperfluidToken token,\\n address account,\\n uint256 time\\n )\\n external\\n view\\n returns (\\n int256 dynamicBalance,\\n uint256 deposit,\\n uint256 owedDeposit\\n );\\n\\n}\\n\",\"keccak256\":\"0xc3a6a907245116bcecc70fe4b207454012e8ce4fa190228fb8bbe39e0b1bc5cf\",\"license\":\"AGPLv3\"},\"@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluidToken.sol\":{\"content\":\"// SPDX-License-Identifier: AGPLv3\\npragma solidity >= 0.8.0;\\n\\nimport { ISuperAgreement } from \\\"./ISuperAgreement.sol\\\";\\n\\n\\n/**\\n * @title Superfluid token interface\\n * @author Superfluid\\n */\\ninterface ISuperfluidToken {\\n\\n /**************************************************************************\\n * Basic information\\n *************************************************************************/\\n\\n /**\\n * @dev Get superfluid host contract address\\n */\\n function getHost() external view returns(address host);\\n\\n /**\\n * @dev Encoded liquidation type data mainly used for handling stack to deep errors\\n *\\n * Note:\\n * - version: 1\\n * - liquidationType key:\\n * - 0 = reward account receives reward (PIC period)\\n * - 1 = liquidator account receives reward (Pleb period)\\n * - 2 = liquidator account receives reward (Pirate period/bailout)\\n */\\n struct LiquidationTypeData {\\n uint256 version;\\n uint8 liquidationType;\\n }\\n\\n /**************************************************************************\\n * Real-time balance functions\\n *************************************************************************/\\n\\n /**\\n * @dev Calculate the real balance of a user, taking in consideration all agreements of the account\\n * @param account for the query\\n * @param timestamp Time of balance\\n * @return availableBalance Real-time balance\\n * @return deposit Account deposit\\n * @return owedDeposit Account owed Deposit\\n */\\n function realtimeBalanceOf(\\n address account,\\n uint256 timestamp\\n )\\n external view\\n returns (\\n int256 availableBalance,\\n uint256 deposit,\\n uint256 owedDeposit);\\n\\n /**\\n * @notice Calculate the realtime balance given the current host.getNow() value\\n * @dev realtimeBalanceOf with timestamp equals to block timestamp\\n * @param account for the query\\n * @return availableBalance Real-time balance\\n * @return deposit Account deposit\\n * @return owedDeposit Account owed Deposit\\n */\\n function realtimeBalanceOfNow(\\n address account\\n )\\n external view\\n returns (\\n int256 availableBalance,\\n uint256 deposit,\\n uint256 owedDeposit,\\n uint256 timestamp);\\n\\n /**\\n * @notice Check if account is critical\\n * @dev A critical account is when availableBalance < 0\\n * @param account The account to check\\n * @param timestamp The time we'd like to check if the account is critical (should use future)\\n * @return isCritical Whether the account is critical\\n */\\n function isAccountCritical(\\n address account,\\n uint256 timestamp\\n )\\n external view\\n returns(bool isCritical);\\n\\n /**\\n * @notice Check if account is critical now (current host.getNow())\\n * @dev A critical account is when availableBalance < 0\\n * @param account The account to check\\n * @return isCritical Whether the account is critical\\n */\\n function isAccountCriticalNow(\\n address account\\n )\\n external view\\n returns(bool isCritical);\\n\\n /**\\n * @notice Check if account is solvent\\n * @dev An account is insolvent when the sum of deposits for a token can't cover the negative availableBalance\\n * @param account The account to check\\n * @param timestamp The time we'd like to check if the account is solvent (should use future)\\n * @return isSolvent\\n */\\n function isAccountSolvent(\\n address account,\\n uint256 timestamp\\n )\\n external view\\n returns(bool isSolvent);\\n\\n /**\\n * @notice Check if account is solvent now\\n * @dev An account is insolvent when the sum of deposits for a token can't cover the negative availableBalance\\n * @param account The account to check\\n * @return isSolvent\\n */\\n function isAccountSolventNow(\\n address account\\n )\\n external view\\n returns(bool isSolvent);\\n\\n /**\\n * @notice Get a list of agreements that is active for the account\\n * @dev An active agreement is one that has state for the account\\n * @param account Account to query\\n * @return activeAgreements List of accounts that have non-zero states for the account\\n */\\n function getAccountActiveAgreements(address account)\\n external view\\n returns(ISuperAgreement[] memory activeAgreements);\\n\\n\\n /**************************************************************************\\n * Super Agreement hosting functions\\n *************************************************************************/\\n\\n /**\\n * @dev Create a new agreement\\n * @param id Agreement ID\\n * @param data Agreement data\\n */\\n function createAgreement(\\n bytes32 id,\\n bytes32[] calldata data\\n )\\n external;\\n /**\\n * @dev Agreement created event\\n * @param agreementClass Contract address of the agreement\\n * @param id Agreement ID\\n * @param data Agreement data\\n */\\n event AgreementCreated(\\n address indexed agreementClass,\\n bytes32 id,\\n bytes32[] data\\n );\\n\\n /**\\n * @dev Get data of the agreement\\n * @param agreementClass Contract address of the agreement\\n * @param id Agreement ID\\n * @return data Data of the agreement\\n */\\n function getAgreementData(\\n address agreementClass,\\n bytes32 id,\\n uint dataLength\\n )\\n external view\\n returns(bytes32[] memory data);\\n\\n /**\\n * @dev Create a new agreement\\n * @param id Agreement ID\\n * @param data Agreement data\\n */\\n function updateAgreementData(\\n bytes32 id,\\n bytes32[] calldata data\\n )\\n external;\\n /**\\n * @dev Agreement updated event\\n * @param agreementClass Contract address of the agreement\\n * @param id Agreement ID\\n * @param data Agreement data\\n */\\n event AgreementUpdated(\\n address indexed agreementClass,\\n bytes32 id,\\n bytes32[] data\\n );\\n\\n /**\\n * @dev Close the agreement\\n * @param id Agreement ID\\n */\\n function terminateAgreement(\\n bytes32 id,\\n uint dataLength\\n )\\n external;\\n /**\\n * @dev Agreement terminated event\\n * @param agreementClass Contract address of the agreement\\n * @param id Agreement ID\\n */\\n event AgreementTerminated(\\n address indexed agreementClass,\\n bytes32 id\\n );\\n\\n /**\\n * @dev Update agreement state slot\\n * @param account Account to be updated\\n *\\n * NOTE\\n * - To clear the storage out, provide zero-ed array of intended length\\n */\\n function updateAgreementStateSlot(\\n address account,\\n uint256 slotId,\\n bytes32[] calldata slotData\\n )\\n external;\\n /**\\n * @dev Agreement account state updated event\\n * @param agreementClass Contract address of the agreement\\n * @param account Account updated\\n * @param slotId slot id of the agreement state\\n */\\n event AgreementStateUpdated(\\n address indexed agreementClass,\\n address indexed account,\\n uint256 slotId\\n );\\n\\n /**\\n * @dev Get data of the slot of the state of an agreement\\n * @param agreementClass Contract address of the agreement\\n * @param account Account to query\\n * @param slotId slot id of the state\\n * @param dataLength length of the state data\\n */\\n function getAgreementStateSlot(\\n address agreementClass,\\n address account,\\n uint256 slotId,\\n uint dataLength\\n )\\n external view\\n returns (bytes32[] memory slotData);\\n\\n /**\\n * @notice Settle balance from an account by the agreement\\n * @dev The agreement needs to make sure that the balance delta is balanced afterwards\\n * @param account Account to query.\\n * @param delta Amount of balance delta to be settled\\n *\\n * Modifiers:\\n * - onlyAgreement\\n */\\n function settleBalance(\\n address account,\\n int256 delta\\n )\\n external;\\n\\n /**\\n * @dev Make liquidation payouts (v2)\\n * @param id Agreement ID\\n * @param liquidationTypeData Data regarding the version of the liquidation schema and the type\\n * @param liquidatorAccount Address of the executor of the liquidation\\n * @param useDefaultRewardAccount Whether or not the default reward account receives the rewardAmount\\n * @param targetAccount Account of the stream sender\\n * @param rewardAmount The amount the reward recepient account will receive\\n * @param targetAccountBalanceDelta The amount the sender account balance should change by\\n *\\n * - If a bailout is required (bailoutAmount > 0)\\n * - the actual reward (single deposit) goes to the executor,\\n * - while the reward account becomes the bailout account\\n * - total bailout include: bailout amount + reward amount\\n * - the targetAccount will be bailed out\\n * - If a bailout is not required\\n * - the targetAccount will pay the rewardAmount\\n * - the liquidator (reward account in PIC period) will receive the rewardAmount\\n *\\n * Modifiers:\\n * - onlyAgreement\\n */\\n function makeLiquidationPayoutsV2\\n (\\n bytes32 id,\\n bytes memory liquidationTypeData,\\n address liquidatorAccount,\\n bool useDefaultRewardAccount,\\n address targetAccount,\\n uint256 rewardAmount,\\n int256 targetAccountBalanceDelta\\n ) external;\\n /**\\n * @dev Agreement liquidation event v2 (including agent account)\\n * @param agreementClass Contract address of the agreement\\n * @param id Agreement ID\\n * @param liquidatorAccount Address of the executor of the liquidation\\n * @param targetAccount Account of the stream sender\\n * @param rewardAccount Account that collects the reward or bails out insolvent accounts\\n * @param rewardAmount The amount the reward recipient account balance should change by\\n * @param targetAccountBalanceDelta The amount the sender account balance should change by\\n * @param liquidationTypeData The encoded liquidation type data including the version (how to decode)\\n *\\n * NOTE:\\n * Reward account rule:\\n * - if the agreement is liquidated during the PIC period\\n * - the rewardAccount will get the rewardAmount (remaining deposit), regardless of the liquidatorAccount\\n * - the targetAccount will pay for the rewardAmount\\n * - if the agreement is liquidated after the PIC period AND the targetAccount is solvent\\n * - the liquidatorAccount will get the rewardAmount (remaining deposit)\\n * - the targetAccount will pay for the rewardAmount\\n * - if the targetAccount is insolvent\\n * - the liquidatorAccount will get the rewardAmount (single deposit)\\n * - the rewardAccount will pay for both the rewardAmount and bailoutAmount\\n * - the targetAccount will receive the bailoutAmount\\n */\\n event AgreementLiquidatedV2(\\n address indexed agreementClass,\\n bytes32 id,\\n address indexed liquidatorAccount,\\n address indexed targetAccount,\\n address rewardAccount,\\n uint256 rewardAmount,\\n int256 targetAccountBalanceDelta,\\n bytes liquidationTypeData\\n );\\n\\n /**************************************************************************\\n * Function modifiers for access control and parameter validations\\n *\\n * While they cannot be explicitly stated in function definitions, they are\\n * listed in function definition comments instead for clarity.\\n *\\n * NOTE: solidity-coverage not supporting it\\n *************************************************************************/\\n\\n /// @dev The msg.sender must be host contract\\n //modifier onlyHost() virtual;\\n\\n /// @dev The msg.sender must be a listed agreement.\\n //modifier onlyAgreement() virtual;\\n\\n /**************************************************************************\\n * DEPRECATED\\n *************************************************************************/\\n\\n /**\\n * @dev Agreement liquidation event (DEPRECATED BY AgreementLiquidatedBy)\\n * @param agreementClass Contract address of the agreement\\n * @param id Agreement ID\\n * @param penaltyAccount Account of the agreement to be penalized\\n * @param rewardAccount Account that collect the reward\\n * @param rewardAmount Amount of liquidation reward\\n *\\n * NOTE:\\n *\\n * [DEPRECATED] Use AgreementLiquidatedV2 instead\\n */\\n event AgreementLiquidated(\\n address indexed agreementClass,\\n bytes32 id,\\n address indexed penaltyAccount,\\n address indexed rewardAccount,\\n uint256 rewardAmount\\n );\\n\\n /**\\n * @dev System bailout occurred (DEPRECATED BY AgreementLiquidatedBy)\\n * @param bailoutAccount Account that bailout the penalty account\\n * @param bailoutAmount Amount of account bailout\\n *\\n * NOTE:\\n *\\n * [DEPRECATED] Use AgreementLiquidatedV2 instead\\n */\\n event Bailout(\\n address indexed bailoutAccount,\\n uint256 bailoutAmount\\n );\\n\\n /**\\n * @dev Agreement liquidation event (DEPRECATED BY AgreementLiquidatedV2)\\n * @param liquidatorAccount Account of the agent that performed the liquidation.\\n * @param agreementClass Contract address of the agreement\\n * @param id Agreement ID\\n * @param penaltyAccount Account of the agreement to be penalized\\n * @param bondAccount Account that collect the reward or bailout accounts\\n * @param rewardAmount Amount of liquidation reward\\n * @param bailoutAmount Amount of liquidation bailouot\\n *\\n * NOTE:\\n * Reward account rule:\\n * - if bailout is equal to 0, then\\n * - the bondAccount will get the rewardAmount,\\n * - the penaltyAccount will pay for the rewardAmount.\\n * - if bailout is larger than 0, then\\n * - the liquidatorAccount will get the rewardAmouont,\\n * - the bondAccount will pay for both the rewardAmount and bailoutAmount,\\n * - the penaltyAccount will pay for the rewardAmount while get the bailoutAmount.\\n */\\n event AgreementLiquidatedBy(\\n address liquidatorAccount,\\n address indexed agreementClass,\\n bytes32 id,\\n address indexed penaltyAccount,\\n address indexed bondAccount,\\n uint256 rewardAmount,\\n uint256 bailoutAmount\\n );\\n}\\n\",\"keccak256\":\"0x9189eaba9e856cc4932ea29eeaf4e89a09448dde13860591691ec122856fdc75\",\"license\":\"AGPLv3\"},\"src/common/helpers/BalancesHelperV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// solhint-disable-next-line\\npragma solidity 0.8.4;\\n\\n/// @title BalancesHelperV2\\n/// @author Luke Wickens \\n/// @notice Used to get account balances of ERC20 tokens and Wrapped Super Tokens\\n\\nimport {ISuperfluidToken} from \\\"@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluidToken.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport {Address} from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\ncontract BalancesHelperV2 {\\n using Address for address;\\n\\n /// @notice Custom errors to handle address(0)\\n error AccountZeroAddress(address account, address token);\\n error TokenZeroAddress(address account, address token);\\n\\n constructor() {}\\n\\n /// @notice Returns balances of accounts for multiple ERC20 tokens.\\n /// @dev Error thrown if: account or token address is address(0),\\n /// large arrays of accounts/tokens are passed in could cause gas block limit issue\\n /// @param accounts = Array of accounts addresses\\n /// @param tokens = Array of tokens addresses\\n /// @return One-dimensional that's accounts.length * tokens.length long. The\\n /// array is ordered by all of accounts[0] token balances, then accounts[1] etc.\\n\\n function getBalances(address[] calldata accounts, address[] calldata tokens)\\n external\\n view\\n returns (uint256[] memory)\\n {\\n uint256[] memory result = new uint256[](\\n accounts.length * tokens.length\\n );\\n\\n for (uint256 i; i < accounts.length; i++) {\\n for (uint256 j; j < tokens.length; j++) {\\n uint256 index = j + (tokens.length * i);\\n result[index] = _getBalance(accounts[i], tokens[j]);\\n }\\n }\\n return result;\\n }\\n\\n /// @notice Returns balances of accounts for multiple Wrapped Super Tokens.\\n /// @dev Error thrown if: account or token address is address(0),\\n /// large arrays of accounts/tokens are passed in could cause gas block limit issue\\n /// @param accounts = Array of accounts addresses\\n /// @param tokens = Array of tokens addresses\\n /// @return One-dimensional that's accounts.length * tokens.length long. The\\n /// array is ordered by all of accounts[0] token balances, then accounts[1] etc.\\n\\n function getSuperfluidWrappedTokenBalances(\\n address[] calldata accounts,\\n address[] calldata tokens\\n ) external view returns (int256[] memory) {\\n int256[] memory result = new int256[](accounts.length * tokens.length);\\n\\n for (uint256 i; i < accounts.length; i++) {\\n for (uint256 j; j < tokens.length; j++) {\\n uint256 index = j + (tokens.length * i);\\n result[index] = _getSuperfluidWrappedTokenBalance(\\n accounts[i],\\n tokens[j]\\n );\\n }\\n }\\n return result;\\n }\\n\\n /// Private fuctions\\n\\n /// @notice Returns balance of account for an ERC20 token.\\n /// @dev Error thrown if: account or token address is address(0)\\n /// @param account = account address\\n /// @param token = tokens address\\n /// @return balance of account as uint256.\\n\\n function _getBalance(address account, address token)\\n private\\n view\\n returns (uint256)\\n {\\n if (account == address(0)) revert AccountZeroAddress(account, token);\\n if (token == address(0)) revert TokenZeroAddress(account, token);\\n\\n bytes memory returnedData = token.functionStaticCall(\\n abi.encodeWithSelector(IERC20(token).balanceOf.selector, account)\\n );\\n\\n return abi.decode(returnedData, (uint256));\\n }\\n\\n /// @notice Returns real balance of a user, taking into consideration all agreements of account\\n /// @dev Error thrown if: account or token address is address(0)\\n /// @param account = account address\\n /// @param token = tokens address\\n /// @return available balance of account as int256.\\n\\n function _getSuperfluidWrappedTokenBalance(address account, address token)\\n private\\n view\\n returns (int256)\\n {\\n if (account == address(0)) revert AccountZeroAddress(account, token);\\n if (token == address(0)) revert TokenZeroAddress(account, token);\\n\\n bytes memory returnedData = token.functionStaticCall(\\n abi.encodeWithSelector(\\n ISuperfluidToken(token).realtimeBalanceOfNow.selector,\\n account\\n )\\n );\\n\\n (int256 availableBalance, , , ) = abi.decode(\\n returnedData,\\n (int256, uint256, uint256, uint256)\\n );\\n return availableBalance;\\n }\\n}\\n\",\"keccak256\":\"0x02dfe13a8521bebc6f623a9df9877d7c66f8cfb67c10ee1a041dcba42ef7b973\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061108a806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806350c5a7101461003b578063ef5bfc371461006b575b600080fd5b610055600480360381019061005091906109e6565b61009b565b6040516100629190610ce8565b60405180910390f35b610085600480360381019061008091906109e6565b610279565b6040516100929190610d0a565b60405180910390f35b6060600083839050868690506100b19190610e68565b67ffffffffffffffff8111156100f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405190808252806020026020018201604052801561011e5781602001602082028036833780820191505090505b50905060005b8686905081101561026c5760005b85859050811015610258576000828787905061014e9190610e68565b826101599190610e12565b90506101ff898985818110610197577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906101ac91906109bd565b8888858181106101e5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906101fa91906109bd565b610457565b848281518110610238577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101818152505050808061025090610f3b565b915050610132565b50808061026490610f3b565b915050610124565b5080915050949350505050565b60606000838390508686905061028f9190610e68565b67ffffffffffffffff8111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102fc5781602001602082028036833780820191505090505b50905060005b8686905081101561044a5760005b85859050811015610436576000828787905061032c9190610e68565b826103379190610e12565b90506103dd898985818110610375577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201602081019061038a91906109bd565b8888858181106103c3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906103d891906109bd565b610608565b848281518110610416577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101818152505050808061042e90610f3b565b915050610310565b50808061044290610f3b565b915050610302565b5080915050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156104cc5782826040517f484305ff0000000000000000000000000000000000000000000000000000000081526004016104c3929190610cbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156105405782826040517f41f93bdf000000000000000000000000000000000000000000000000000000008152600401610537929190610cbf565b60405180910390fd5b60006105e0632ec8eec760e01b8560405160240161055e9190610ca4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050508473ffffffffffffffffffffffffffffffffffffffff166107b090919063ffffffff16565b90506000818060200190518101906105f89190610a5b565b5050509050809250505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561067d5782826040517f484305ff000000000000000000000000000000000000000000000000000000008152600401610674929190610cbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156106f15782826040517f41f93bdf0000000000000000000000000000000000000000000000000000000081526004016106e8929190610cbf565b60405180910390fd5b60006107916370a0823160e01b8560405160240161070f9190610ca4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050508473ffffffffffffffffffffffffffffffffffffffff166107b090919063ffffffff16565b9050808060200190518101906107a79190610abe565b91505092915050565b60606107d58383604051806060016040528060258152602001611059602591396107dd565b905092915050565b60606107e8846108aa565b610827576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081e90610d4e565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161084f9190610c8d565b600060405180830381855afa9150503d806000811461088a576040519150601f19603f3d011682016040523d82523d6000602084013e61088f565b606091505b509150915061089f8282866108cd565b925050509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156108dd5782905061092d565b6000835111156108f05782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109249190610d2c565b60405180910390fd5b9392505050565b60008135905061094381611013565b92915050565b60008083601f84011261095b57600080fd5b8235905067ffffffffffffffff81111561097457600080fd5b60208301915083602082028301111561098c57600080fd5b9250929050565b6000815190506109a28161102a565b92915050565b6000815190506109b781611041565b92915050565b6000602082840312156109cf57600080fd5b60006109dd84828501610934565b91505092915050565b600080600080604085870312156109fc57600080fd5b600085013567ffffffffffffffff811115610a1657600080fd5b610a2287828801610949565b9450945050602085013567ffffffffffffffff811115610a4157600080fd5b610a4d87828801610949565b925092505092959194509250565b60008060008060808587031215610a7157600080fd5b6000610a7f87828801610993565b9450506020610a90878288016109a8565b9350506040610aa1878288016109a8565b9250506060610ab2878288016109a8565b91505092959194509250565b600060208284031215610ad057600080fd5b6000610ade848285016109a8565b91505092915050565b6000610af38383610c13565b60208301905092915050565b6000610b0b8383610c7e565b60208301905092915050565b610b2081610ec2565b82525050565b6000610b3182610d8e565b610b3b8185610dd4565b9350610b4683610d6e565b8060005b83811015610b77578151610b5e8882610ae7565b9750610b6983610dba565b925050600181019050610b4a565b5085935050505092915050565b6000610b8f82610d99565b610b998185610de5565b9350610ba483610d7e565b8060005b83811015610bd5578151610bbc8882610aff565b9750610bc783610dc7565b925050600181019050610ba8565b5085935050505092915050565b6000610bed82610da4565b610bf78185610df6565b9350610c07818560208601610f08565b80840191505092915050565b610c1c81610ed4565b82525050565b6000610c2d82610daf565b610c378185610e01565b9350610c47818560208601610f08565b610c5081610fb3565b840191505092915050565b6000610c68602483610e01565b9150610c7382610fc4565b604082019050919050565b610c8781610efe565b82525050565b6000610c998284610be2565b915081905092915050565b6000602082019050610cb96000830184610b17565b92915050565b6000604082019050610cd46000830185610b17565b610ce16020830184610b17565b9392505050565b60006020820190508181036000830152610d028184610b26565b905092915050565b60006020820190508181036000830152610d248184610b84565b905092915050565b60006020820190508181036000830152610d468184610c22565b905092915050565b60006020820190508181036000830152610d6781610c5b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610e1d82610efe565b9150610e2883610efe565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610e5d57610e5c610f84565b5b828201905092915050565b6000610e7382610efe565b9150610e7e83610efe565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610eb757610eb6610f84565b5b828202905092915050565b6000610ecd82610ede565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610f26578082015181840152602081019050610f0b565b83811115610f35576000848401525b50505050565b6000610f4682610efe565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610f7957610f78610f84565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000601f19601f8301169050919050565b7f416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7460008201527f7261637400000000000000000000000000000000000000000000000000000000602082015250565b61101c81610ec2565b811461102757600080fd5b50565b61103381610ed4565b811461103e57600080fd5b50565b61104a81610efe565b811461105557600080fd5b5056fe416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564a164736f6c6343000804000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806350c5a7101461003b578063ef5bfc371461006b575b600080fd5b610055600480360381019061005091906109e6565b61009b565b6040516100629190610ce8565b60405180910390f35b610085600480360381019061008091906109e6565b610279565b6040516100929190610d0a565b60405180910390f35b6060600083839050868690506100b19190610e68565b67ffffffffffffffff8111156100f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405190808252806020026020018201604052801561011e5781602001602082028036833780820191505090505b50905060005b8686905081101561026c5760005b85859050811015610258576000828787905061014e9190610e68565b826101599190610e12565b90506101ff898985818110610197577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906101ac91906109bd565b8888858181106101e5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906101fa91906109bd565b610457565b848281518110610238577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101818152505050808061025090610f3b565b915050610132565b50808061026490610f3b565b915050610124565b5080915050949350505050565b60606000838390508686905061028f9190610e68565b67ffffffffffffffff8111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102fc5781602001602082028036833780820191505090505b50905060005b8686905081101561044a5760005b85859050811015610436576000828787905061032c9190610e68565b826103379190610e12565b90506103dd898985818110610375577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201602081019061038a91906109bd565b8888858181106103c3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906103d891906109bd565b610608565b848281518110610416577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101818152505050808061042e90610f3b565b915050610310565b50808061044290610f3b565b915050610302565b5080915050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156104cc5782826040517f484305ff0000000000000000000000000000000000000000000000000000000081526004016104c3929190610cbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156105405782826040517f41f93bdf000000000000000000000000000000000000000000000000000000008152600401610537929190610cbf565b60405180910390fd5b60006105e0632ec8eec760e01b8560405160240161055e9190610ca4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050508473ffffffffffffffffffffffffffffffffffffffff166107b090919063ffffffff16565b90506000818060200190518101906105f89190610a5b565b5050509050809250505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561067d5782826040517f484305ff000000000000000000000000000000000000000000000000000000008152600401610674929190610cbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156106f15782826040517f41f93bdf0000000000000000000000000000000000000000000000000000000081526004016106e8929190610cbf565b60405180910390fd5b60006107916370a0823160e01b8560405160240161070f9190610ca4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050508473ffffffffffffffffffffffffffffffffffffffff166107b090919063ffffffff16565b9050808060200190518101906107a79190610abe565b91505092915050565b60606107d58383604051806060016040528060258152602001611059602591396107dd565b905092915050565b60606107e8846108aa565b610827576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081e90610d4e565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161084f9190610c8d565b600060405180830381855afa9150503d806000811461088a576040519150601f19603f3d011682016040523d82523d6000602084013e61088f565b606091505b509150915061089f8282866108cd565b925050509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156108dd5782905061092d565b6000835111156108f05782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109249190610d2c565b60405180910390fd5b9392505050565b60008135905061094381611013565b92915050565b60008083601f84011261095b57600080fd5b8235905067ffffffffffffffff81111561097457600080fd5b60208301915083602082028301111561098c57600080fd5b9250929050565b6000815190506109a28161102a565b92915050565b6000815190506109b781611041565b92915050565b6000602082840312156109cf57600080fd5b60006109dd84828501610934565b91505092915050565b600080600080604085870312156109fc57600080fd5b600085013567ffffffffffffffff811115610a1657600080fd5b610a2287828801610949565b9450945050602085013567ffffffffffffffff811115610a4157600080fd5b610a4d87828801610949565b925092505092959194509250565b60008060008060808587031215610a7157600080fd5b6000610a7f87828801610993565b9450506020610a90878288016109a8565b9350506040610aa1878288016109a8565b9250506060610ab2878288016109a8565b91505092959194509250565b600060208284031215610ad057600080fd5b6000610ade848285016109a8565b91505092915050565b6000610af38383610c13565b60208301905092915050565b6000610b0b8383610c7e565b60208301905092915050565b610b2081610ec2565b82525050565b6000610b3182610d8e565b610b3b8185610dd4565b9350610b4683610d6e565b8060005b83811015610b77578151610b5e8882610ae7565b9750610b6983610dba565b925050600181019050610b4a565b5085935050505092915050565b6000610b8f82610d99565b610b998185610de5565b9350610ba483610d7e565b8060005b83811015610bd5578151610bbc8882610aff565b9750610bc783610dc7565b925050600181019050610ba8565b5085935050505092915050565b6000610bed82610da4565b610bf78185610df6565b9350610c07818560208601610f08565b80840191505092915050565b610c1c81610ed4565b82525050565b6000610c2d82610daf565b610c378185610e01565b9350610c47818560208601610f08565b610c5081610fb3565b840191505092915050565b6000610c68602483610e01565b9150610c7382610fc4565b604082019050919050565b610c8781610efe565b82525050565b6000610c998284610be2565b915081905092915050565b6000602082019050610cb96000830184610b17565b92915050565b6000604082019050610cd46000830185610b17565b610ce16020830184610b17565b9392505050565b60006020820190508181036000830152610d028184610b26565b905092915050565b60006020820190508181036000830152610d248184610b84565b905092915050565b60006020820190508181036000830152610d468184610c22565b905092915050565b60006020820190508181036000830152610d6781610c5b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610e1d82610efe565b9150610e2883610efe565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610e5d57610e5c610f84565b5b828201905092915050565b6000610e7382610efe565b9150610e7e83610efe565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610eb757610eb6610f84565b5b828202905092915050565b6000610ecd82610ede565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610f26578082015181840152602081019050610f0b565b83811115610f35576000848401525b50505050565b6000610f4682610efe565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610f7957610f78610f84565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000601f19601f8301169050919050565b7f416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7460008201527f7261637400000000000000000000000000000000000000000000000000000000602082015250565b61101c81610ec2565b811461102757600080fd5b50565b61103381610ed4565b811461103e57600080fd5b50565b61104a81610efe565b811461105557600080fd5b5056fe416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564a164736f6c6343000804000a", + "devdoc": { + "kind": "dev", + "methods": { + "getBalances(address[],address[])": { + "details": "Error thrown if: account or token address is address(0), large arrays of accounts/tokens are passed in could cause gas block limit issue", + "params": { + "accounts": "= Array of accounts addresses", + "tokens": "= Array of tokens addresses" + }, + "returns": { + "_0": "One-dimensional that's accounts.length * tokens.length long. The array is ordered by all of accounts[0] token balances, then accounts[1] etc." + } + }, + "getSuperfluidWrappedTokenBalances(address[],address[])": { + "details": "Error thrown if: account or token address is address(0), large arrays of accounts/tokens are passed in could cause gas block limit issue", + "params": { + "accounts": "= Array of accounts addresses", + "tokens": "= Array of tokens addresses" + }, + "returns": { + "_0": "One-dimensional that's accounts.length * tokens.length long. The array is ordered by all of accounts[0] token balances, then accounts[1] etc." + } + } + }, + "version": 1 + }, + "userdoc": { + "errors": { + "AccountZeroAddress(address,address)": [ + { + "notice": "Custom errors to handle address(0)" + } + ] + }, + "kind": "user", + "methods": { + "getBalances(address[],address[])": { + "notice": "Returns balances of accounts for multiple ERC20 tokens." + }, + "getSuperfluidWrappedTokenBalances(address[],address[])": { + "notice": "Returns balances of accounts for multiple Wrapped Super Tokens." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fuse/Diamond.json b/deployments/fuse/Diamond.json new file mode 100644 index 00000000..f2374652 --- /dev/null +++ b/deployments/fuse/Diamond.json @@ -0,0 +1,94 @@ +{ + "address": "0xF1447514368fCC942279862a8B5D6Ed7beDFf431", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_contractOwner", + "type": "address" + }, + { + "internalType": "address", + "name": "_diamondCutFacet", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x5931e70b172dc87726ad99af59018ccf9b8cfc9671a6c277f584dcd6871a9487", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 2, + "gasUsed": "2451493", + "logsBloom": "0x00000000000200000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000001000000000800000000000000000000020000000000000000000800000000000000000000000000000000400020000000000000000000000000000004000000000004000000001000000000000000000000000000000000000000000000000000010000000200000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x9f38925d2770d677498f84c4945abaa262718d45a4c6e51133ef2fec9fd4c31a", + "transactionHash": "0x5931e70b172dc87726ad99af59018ccf9b8cfc9671a6c277f584dcd6871a9487", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 17842224, + "transactionHash": "0x5931e70b172dc87726ad99af59018ccf9b8cfc9671a6c277f584dcd6871a9487", + "address": "0xF1447514368fCC942279862a8B5D6Ed7beDFf431", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 2, + "blockHash": "0x9f38925d2770d677498f84c4945abaa262718d45a4c6e51133ef2fec9fd4c31a" + }, + { + "transactionIndex": 2, + "blockNumber": 17842224, + "transactionHash": "0x5931e70b172dc87726ad99af59018ccf9b8cfc9671a6c277f584dcd6871a9487", + "address": "0xF1447514368fCC942279862a8B5D6Ed7beDFf431", + "topics": [ + "0x8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000f859f683a47b3d0e2a964efddf7392972700a1010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011f931c1c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 3, + "blockHash": "0x9f38925d2770d677498f84c4945abaa262718d45a4c6e51133ef2fec9fd4c31a" + } + ], + "blockNumber": 17842224, + "cumulativeGasUsed": "2813517", + "status": 1, + "byzantium": true + }, + "args": [ + "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "0xf859F683a47b3D0E2A964eFDdf7392972700a101" + ], + "solcInputHash": "7a183f869f73d4ccd46c6d23b208518b", + "metadata": "{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_contractOwner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_diamondCutFacet\",\"type\":\"address\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/bridges/Diamond.sol\":\"Diamond\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/bridges/Diamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport {LibDiamond} from \\\"./libs/LibDiamond.sol\\\";\\nimport {IDiamondCut} from \\\"./interfaces/IDiamondCut.sol\\\";\\n\\ncontract Diamond {\\n constructor(address _contractOwner, address _diamondCutFacet) payable {\\n LibDiamond.setContractOwner(_contractOwner);\\n\\n // Add the diamondCut external function from the diamondCutFacet\\n IDiamondCut.FacetCut[] memory cut = new IDiamondCut.FacetCut[](1);\\n bytes4[] memory functionSelectors = new bytes4[](1);\\n functionSelectors[0] = IDiamondCut.diamondCut.selector;\\n cut[0] = IDiamondCut.FacetCut({\\n facetAddress: _diamondCutFacet,\\n action: IDiamondCut.FacetCutAction.Add,\\n functionSelectors: functionSelectors\\n });\\n LibDiamond.diamondCut(cut, address(0), \\\"\\\");\\n }\\n\\n // Find facet for function that is called and execute the\\n // function if a facet is found and return any value.\\n // solhint-disable-next-line no-complex-fallback\\n fallback() external payable {\\n LibDiamond.DiamondStorage storage ds;\\n bytes32 position = LibDiamond.DIAMOND_STORAGE_POSITION;\\n\\n // get diamond storage\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n ds.slot := position\\n }\\n\\n // get facet from function selector\\n address facet = ds.selectorToFacetAndPosition[msg.sig].facetAddress;\\n require(facet != address(0), \\\"Diamond: Function does not exist\\\");\\n\\n // Execute external function from facet using delegatecall and return any value.\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // copy function selector and any arguments\\n calldatacopy(0, 0, calldatasize())\\n // execute function call using the facet\\n let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)\\n // get any return value\\n returndatacopy(0, 0, returndatasize())\\n // return any return value or error back to the caller\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // Able to receive ether\\n // solhint-disable-next-line no-empty-blocks\\n receive() external payable {}\\n}\\n\",\"keccak256\":\"0x8e68493efdca79bc2f5b68ed4f3f7a8f77784d85593a19902610d0b782de1525\",\"license\":\"MIT\"},\"src/bridges/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(\\n FacetCut[] calldata _diamondCut,\\n address _init,\\n bytes calldata _calldata\\n ) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0x608723d9599dc5de624ca7af0751f834bdff25c5b02bc9e817b6f490d3324069\",\"license\":\"MIT\"},\"src/bridges/libs/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { IDiamondCut } from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 internal constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(\\n IDiamondCut.FacetCut[] memory _diamondCut,\\n address _init,\\n bytes memory _calldata\\n ) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(\\n DiamondStorage storage ds,\\n address _facetAddress,\\n bytes4 _selector\\n ) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x7a82c7c0bd4b049b5471c09127fad37873be021813abbe7ec07edb5a908c35e5\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162004fc238038062004fc2833981810160405281019062000029919062001c79565b6200003f82620002ab60201b620001681760201c565b6000600167ffffffffffffffff81111562000083577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015620000c057816020015b620000ac62001bf2565b815260200190600190039081620000a25790505b5090506000600167ffffffffffffffff81111562000107577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015620001365781602001602082028036833780820191505090505b509050631f931c1c60e01b816000815181106200017c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152505060405180606001604052808473ffffffffffffffffffffffffffffffffffffffff168152602001600060028111156200022a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815260200182815250826000815181106200026e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010181905250620002a1826000604051806020016040528060008152506200038a60201b6200023f1760201c565b5050505062002931565b6000620002bd620007e560201b60201c565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60005b835181101562000790576000848281518110620003d3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156200041c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000456577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415620004ff57620004f98583815181106200049b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160000151868481518110620004e1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151604001516200081260201b60201c565b62000779565b600160028111156200053a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000574577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156200061d5762000617858381518110620005b9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160000151868481518110620005ff577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015162000ada60201b60201c565b62000778565b60028081111562000657577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000691577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156200073a5762000734858381518110620006d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106200071c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015162000db560201b60201c565b62000777565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200076e90620021e5565b60405180910390fd5b5b5b5080806200078790620024a4565b9150506200038d565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673838383604051620007c693929190620020ee565b60405180910390a1620007e0828262000f8160201b60201c565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b600081511162000859576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200085090620021a1565b60405180910390fd5b60006200086b620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415620008e0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620008d79062002207565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156200095757620009568285620011b060201b60201c565b5b60005b835181101562000ad3576000848281518110620009a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000a97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000a8e906200226d565b60405180910390fd5b62000aab8583868a6200129460201b60201c565b838062000ab890620024f2565b9450505050808062000aca90620024a4565b9150506200095a565b5050505050565b600081511162000b21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000b1890620021a1565b60405180910390fd5b600062000b33620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141562000ba8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000b9f9062002207565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff16141562000c1f5762000c1e8285620011b060201b60201c565b5b60005b835181101562000dae57600084828151811062000c68577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000d5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000d56906200228f565b60405180910390fd5b62000d728582846200144160201b60201c565b62000d868583868a6200129460201b60201c565b838062000d9390620024f2565b9450505050808062000da590620024a4565b91505062000c22565b5050505050565b600081511162000dfc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000df390620021a1565b60405180910390fd5b600062000e0e620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161462000e82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000e7990620022b1565b60405180910390fd5b60005b825181101562000f7b57600083828151811062000ecb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905062000f638482846200144160201b60201c565b5050808062000f7290620024a4565b91505062000e85565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156200100457600081511462000ffe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ff5906200215d565b60405180910390fd5b620011ac565b60008151116200104b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620010429062002229565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614620010ab57620010aa8260405180606001604052806028815260200162004f766028913962001b9d60201b60201c565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051620010d59190620020d5565b600060405180830381855af49150503d806000811462001112576040519150601f19603f3d011682016040523d82523d6000602084013e62001117565b606091505b509150915081620011a9576000815111156200116c57806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162001163919062002139565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620011a0906200217f565b60405180910390fd5b50505b5050565b620011db8160405180606001604052806024815260200162004f9e6024913962001b9d60201b60201c565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620014b4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620014ab90620021c3565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562001526576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200151d906200224b565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180549050620015ff919062002388565b9050808214620017e25760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001828154811062001688577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000184815481106200172b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806200185d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff02191690555050600081141562001b96576000600186600201805490506200194b919062002388565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154905081811462001adb576000876002018381548110620019dd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508088600201838154811062001a48577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b8660020180548062001b16577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b905060008111829062001bec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162001be3919062002139565b60405180910390fd5b50505050565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000600281111562001c55577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001606081525090565b60008151905062001c738162002917565b92915050565b6000806040838503121562001c8d57600080fd5b600062001c9d8582860162001c62565b925050602062001cb08582860162001c62565b9150509250929050565b600062001cc8838362001df7565b60208301905092915050565b600062001ce283836200207f565b905092915050565b62001cf581620023c3565b82525050565b62001d0681620023c3565b82525050565b600062001d1982620022f3565b62001d25818562002339565b935062001d3283620022d3565b8060005b8381101562001d6957815162001d4d888262001cba565b975062001d5a836200231f565b92505060018101905062001d36565b5085935050505092915050565b600062001d8382620022fe565b62001d8f81856200234a565b93508360208202850162001da385620022e3565b8060005b8581101562001de5578484038952815162001dc3858262001cd4565b945062001dd0836200232c565b925060208a0199505060018101905062001da7565b50829750879550505050505092915050565b62001e0281620023d7565b82525050565b600062001e158262002309565b62001e2181856200235b565b935062001e338185602086016200246e565b62001e3e816200258a565b840191505092915050565b600062001e568262002309565b62001e6281856200236c565b935062001e748185602086016200246e565b80840191505092915050565b62001e8b816200245a565b82525050565b600062001e9e8262002314565b62001eaa818562002377565b935062001ebc8185602086016200246e565b62001ec7816200258a565b840191505092915050565b600062001ee1603c8362002377565b915062001eee826200259b565b604082019050919050565b600062001f0860268362002377565b915062001f1582620025ea565b604082019050919050565b600062001f2f602b8362002377565b915062001f3c8262002639565b604082019050919050565b600062001f5660378362002377565b915062001f638262002688565b604082019050919050565b600062001f7d60278362002377565b915062001f8a82620026d7565b604082019050919050565b600062001fa4602c8362002377565b915062001fb18262002726565b604082019050919050565b600062001fcb603d8362002377565b915062001fd88262002775565b604082019050919050565b600062001ff2602e8362002377565b915062001fff82620027c4565b604082019050919050565b60006200201960358362002377565b9150620020268262002813565b604082019050919050565b60006200204060388362002377565b91506200204d8262002862565b604082019050919050565b60006200206760368362002377565b91506200207482620028b1565b604082019050919050565b600060608301600083015162002099600086018262001cea565b506020830151620020ae602086018262001e80565b5060408301518482036040860152620020c8828262001d0c565b9150508091505092915050565b6000620020e3828462001e49565b915081905092915050565b600060608201905081810360008301526200210a818662001d76565b90506200211b602083018562001cfb565b81810360408301526200212f818462001e08565b9050949350505050565b6000602082019050818103600083015262002155818462001e91565b905092915050565b60006020820190508181036000830152620021788162001ed2565b9050919050565b600060208201905081810360008301526200219a8162001ef9565b9050919050565b60006020820190508181036000830152620021bc8162001f20565b9050919050565b60006020820190508181036000830152620021de8162001f47565b9050919050565b60006020820190508181036000830152620022008162001f6e565b9050919050565b60006020820190508181036000830152620022228162001f95565b9050919050565b60006020820190508181036000830152620022448162001fbc565b9050919050565b60006020820190508181036000830152620022668162001fe3565b9050919050565b6000602082019050818103600083015262002288816200200a565b9050919050565b60006020820190508181036000830152620022aa8162002031565b9050919050565b60006020820190508181036000830152620022cc8162002058565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000620023958262002438565b9150620023a28362002438565b925082821015620023b857620023b76200252c565b5b828203905092915050565b6000620023d08262002418565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050620024138262002900565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b6000620024678262002403565b9050919050565b60005b838110156200248e57808201518184015260208101905062002471565b838111156200249e576000848401525b50505050565b6000620024b18262002438565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415620024e757620024e66200252c565b5b600182019050919050565b6000620024ff8262002442565b91506bffffffffffffffffffffffff8214156200252157620025206200252c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106200291457620029136200255b565b5b50565b6200292281620023c3565b81146200292e57600080fd5b50565b61263580620029416000396000f3fe60806040523661000b57005b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9050809150600082600001600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013990611ecc565b60405180910390fd5b3660008037600080366000845af43d6000803e8060008114610163573d6000f35b3d6000fd5b600061017261065f565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60005b8351811015610614576000848281518110610286577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610307577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103a45761039f858381518110610349577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061038e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161068c565b610600565b600160028111156103de577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610417577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104b4576104af858381518110610459577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061049e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161092b565b6105ff565b6002808111156104ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610526577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156105c3576105be858381518110610568577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106105ad577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610bd5565b6105fe565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f590611e8c565b60405180910390fd5b5b5b50808061060c9061214d565b915050610242565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161064893929190611da5565b60405180910390a161065a8282610d86565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116106d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c790611e4c565b60405180910390fd5b60006106da61065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561074c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074390611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156107ba576107b98285610f99565b5b60005b8351811015610924576000848281518110610801577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ec90611f2c565b60405180910390fd5b6109018583868a611074565b838061090c90612196565b9450505050808061091c9061214d565b9150506107bd565b5050505050565b600081511161096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690611e4c565b60405180910390fd5b600061097961065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e290611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff161415610a5957610a588285610f99565b5b60005b8351811015610bce576000848281518110610aa0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8b90611f4c565b60405180910390fd5b610b9f858284611221565b610bab8583868a611074565b8380610bb690612196565b94505050508080610bc69061214d565b915050610a5c565b5050505050565b6000815111610c19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1090611e4c565b60405180910390fd5b6000610c2361065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8b90611f6c565b60405180910390fd5b60005b8251811015610d80576000838281518110610cdb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610d6b848284611221565b50508080610d789061214d565b915050610c97565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e04576000815114610dff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df690611e0c565b60405180910390fd5b610f95565b6000815111610e48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3f90611eec565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610e9e57610e9d826040518060600160405280602881526020016125dd6028913961196a565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610ec69190611d8e565b600060405180830381855af49150503d8060008114610f01576040519150601f19603f3d011682016040523d82523d6000602084013e610f06565b606091505b509150915081610f9257600081511115610f5757806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4e9190611dea565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8990611e2c565b60405180910390fd5b50505b5050565b610fbb816040518060600160405280602481526020016126056024913961196a565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611291576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128890611e6c565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611300576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f790611f0c565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506113d79190612041565b90508082146115b75760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001828154811061145e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611631577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156119635760006001866002018054905061171c9190612041565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146118a95760008760020183815481106117ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611816577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806118e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906119b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ad9190611dea565b60405180910390fd5b50505050565b60006119c88383611ad9565b60208301905092915050565b60006119e08383611d3e565b905092915050565b6119f181612075565b82525050565b611a0081612075565b82525050565b6000611a1182611fac565b611a1b8185611ff2565b9350611a2683611f8c565b8060005b83811015611a57578151611a3e88826119bc565b9750611a4983611fd8565b925050600181019050611a2a565b5085935050505092915050565b6000611a6f82611fb7565b611a798185612003565b935083602082028501611a8b85611f9c565b8060005b85811015611ac75784840389528151611aa885826119d4565b9450611ab383611fe5565b925060208a01995050600181019050611a8f565b50829750879550505050505092915050565b611ae281612087565b82525050565b6000611af382611fc2565b611afd8185612014565b9350611b0d81856020860161211a565b611b1681612229565b840191505092915050565b6000611b2c82611fc2565b611b368185612025565b9350611b4681856020860161211a565b80840191505092915050565b611b5b81612108565b82525050565b6000611b6c82611fcd565b611b768185612030565b9350611b8681856020860161211a565b611b8f81612229565b840191505092915050565b6000611ba7603c83612030565b9150611bb28261223a565b604082019050919050565b6000611bca602683612030565b9150611bd582612289565b604082019050919050565b6000611bed602b83612030565b9150611bf8826122d8565b604082019050919050565b6000611c10603783612030565b9150611c1b82612327565b604082019050919050565b6000611c33602783612030565b9150611c3e82612376565b604082019050919050565b6000611c56602c83612030565b9150611c61826123c5565b604082019050919050565b6000611c79602083612030565b9150611c8482612414565b602082019050919050565b6000611c9c603d83612030565b9150611ca78261243d565b604082019050919050565b6000611cbf602e83612030565b9150611cca8261248c565b604082019050919050565b6000611ce2603583612030565b9150611ced826124db565b604082019050919050565b6000611d05603883612030565b9150611d108261252a565b604082019050919050565b6000611d28603683612030565b9150611d3382612579565b604082019050919050565b6000606083016000830151611d5660008601826119e8565b506020830151611d696020860182611b52565b5060408301518482036040860152611d818282611a06565b9150508091505092915050565b6000611d9a8284611b21565b915081905092915050565b60006060820190508181036000830152611dbf8186611a64565b9050611dce60208301856119f7565b8181036040830152611de08184611ae8565b9050949350505050565b60006020820190508181036000830152611e048184611b61565b905092915050565b60006020820190508181036000830152611e2581611b9a565b9050919050565b60006020820190508181036000830152611e4581611bbd565b9050919050565b60006020820190508181036000830152611e6581611be0565b9050919050565b60006020820190508181036000830152611e8581611c03565b9050919050565b60006020820190508181036000830152611ea581611c26565b9050919050565b60006020820190508181036000830152611ec581611c49565b9050919050565b60006020820190508181036000830152611ee581611c6c565b9050919050565b60006020820190508181036000830152611f0581611c8f565b9050919050565b60006020820190508181036000830152611f2581611cb2565b9050919050565b60006020820190508181036000830152611f4581611cd5565b9050919050565b60006020820190508181036000830152611f6581611cf8565b9050919050565b60006020820190508181036000830152611f8581611d1b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061204c826120e6565b9150612057836120e6565b92508282101561206a576120696121cb565b5b828203905092915050565b6000612080826120c6565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60008190506120c1826125c8565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b6000612113826120b3565b9050919050565b60005b8381101561213857808201518184015260208101905061211d565b83811115612147576000848401525b50505050565b6000612158826120e6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561218b5761218a6121cb565b5b600182019050919050565b60006121a1826120f0565b91506bffffffffffffffffffffffff8214156121c0576121bf6121cb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374600082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106125d9576125d86121fa565b5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465", + "deployedBytecode": "0x60806040523661000b57005b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9050809150600082600001600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013990611ecc565b60405180910390fd5b3660008037600080366000845af43d6000803e8060008114610163573d6000f35b3d6000fd5b600061017261065f565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60005b8351811015610614576000848281518110610286577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610307577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103a45761039f858381518110610349577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061038e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161068c565b610600565b600160028111156103de577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610417577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104b4576104af858381518110610459577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061049e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161092b565b6105ff565b6002808111156104ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610526577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156105c3576105be858381518110610568577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106105ad577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610bd5565b6105fe565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f590611e8c565b60405180910390fd5b5b5b50808061060c9061214d565b915050610242565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161064893929190611da5565b60405180910390a161065a8282610d86565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116106d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c790611e4c565b60405180910390fd5b60006106da61065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561074c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074390611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156107ba576107b98285610f99565b5b60005b8351811015610924576000848281518110610801577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ec90611f2c565b60405180910390fd5b6109018583868a611074565b838061090c90612196565b9450505050808061091c9061214d565b9150506107bd565b5050505050565b600081511161096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690611e4c565b60405180910390fd5b600061097961065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e290611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff161415610a5957610a588285610f99565b5b60005b8351811015610bce576000848281518110610aa0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8b90611f4c565b60405180910390fd5b610b9f858284611221565b610bab8583868a611074565b8380610bb690612196565b94505050508080610bc69061214d565b915050610a5c565b5050505050565b6000815111610c19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1090611e4c565b60405180910390fd5b6000610c2361065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8b90611f6c565b60405180910390fd5b60005b8251811015610d80576000838281518110610cdb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610d6b848284611221565b50508080610d789061214d565b915050610c97565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e04576000815114610dff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df690611e0c565b60405180910390fd5b610f95565b6000815111610e48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3f90611eec565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610e9e57610e9d826040518060600160405280602881526020016125dd6028913961196a565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610ec69190611d8e565b600060405180830381855af49150503d8060008114610f01576040519150601f19603f3d011682016040523d82523d6000602084013e610f06565b606091505b509150915081610f9257600081511115610f5757806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4e9190611dea565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8990611e2c565b60405180910390fd5b50505b5050565b610fbb816040518060600160405280602481526020016126056024913961196a565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611291576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128890611e6c565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611300576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f790611f0c565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506113d79190612041565b90508082146115b75760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001828154811061145e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611631577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156119635760006001866002018054905061171c9190612041565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146118a95760008760020183815481106117ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611816577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806118e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906119b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ad9190611dea565b60405180910390fd5b50505050565b60006119c88383611ad9565b60208301905092915050565b60006119e08383611d3e565b905092915050565b6119f181612075565b82525050565b611a0081612075565b82525050565b6000611a1182611fac565b611a1b8185611ff2565b9350611a2683611f8c565b8060005b83811015611a57578151611a3e88826119bc565b9750611a4983611fd8565b925050600181019050611a2a565b5085935050505092915050565b6000611a6f82611fb7565b611a798185612003565b935083602082028501611a8b85611f9c565b8060005b85811015611ac75784840389528151611aa885826119d4565b9450611ab383611fe5565b925060208a01995050600181019050611a8f565b50829750879550505050505092915050565b611ae281612087565b82525050565b6000611af382611fc2565b611afd8185612014565b9350611b0d81856020860161211a565b611b1681612229565b840191505092915050565b6000611b2c82611fc2565b611b368185612025565b9350611b4681856020860161211a565b80840191505092915050565b611b5b81612108565b82525050565b6000611b6c82611fcd565b611b768185612030565b9350611b8681856020860161211a565b611b8f81612229565b840191505092915050565b6000611ba7603c83612030565b9150611bb28261223a565b604082019050919050565b6000611bca602683612030565b9150611bd582612289565b604082019050919050565b6000611bed602b83612030565b9150611bf8826122d8565b604082019050919050565b6000611c10603783612030565b9150611c1b82612327565b604082019050919050565b6000611c33602783612030565b9150611c3e82612376565b604082019050919050565b6000611c56602c83612030565b9150611c61826123c5565b604082019050919050565b6000611c79602083612030565b9150611c8482612414565b602082019050919050565b6000611c9c603d83612030565b9150611ca78261243d565b604082019050919050565b6000611cbf602e83612030565b9150611cca8261248c565b604082019050919050565b6000611ce2603583612030565b9150611ced826124db565b604082019050919050565b6000611d05603883612030565b9150611d108261252a565b604082019050919050565b6000611d28603683612030565b9150611d3382612579565b604082019050919050565b6000606083016000830151611d5660008601826119e8565b506020830151611d696020860182611b52565b5060408301518482036040860152611d818282611a06565b9150508091505092915050565b6000611d9a8284611b21565b915081905092915050565b60006060820190508181036000830152611dbf8186611a64565b9050611dce60208301856119f7565b8181036040830152611de08184611ae8565b9050949350505050565b60006020820190508181036000830152611e048184611b61565b905092915050565b60006020820190508181036000830152611e2581611b9a565b9050919050565b60006020820190508181036000830152611e4581611bbd565b9050919050565b60006020820190508181036000830152611e6581611be0565b9050919050565b60006020820190508181036000830152611e8581611c03565b9050919050565b60006020820190508181036000830152611ea581611c26565b9050919050565b60006020820190508181036000830152611ec581611c49565b9050919050565b60006020820190508181036000830152611ee581611c6c565b9050919050565b60006020820190508181036000830152611f0581611c8f565b9050919050565b60006020820190508181036000830152611f2581611cb2565b9050919050565b60006020820190508181036000830152611f4581611cd5565b9050919050565b60006020820190508181036000830152611f6581611cf8565b9050919050565b60006020820190508181036000830152611f8581611d1b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061204c826120e6565b9150612057836120e6565b92508282101561206a576120696121cb565b5b828203905092915050565b6000612080826120c6565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60008190506120c1826125c8565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b6000612113826120b3565b9050919050565b60005b8381101561213857808201518184015260208101905061211d565b83811115612147576000848401525b50505050565b6000612158826120e6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561218b5761218a6121cb565b5b600182019050919050565b60006121a1826120f0565b91506bffffffffffffffffffffffff8214156121c0576121bf6121cb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374600082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106125d9576125d86121fa565b5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fuse/DiamondCutFacet.json b/deployments/fuse/DiamondCutFacet.json new file mode 100644 index 00000000..22e926ef --- /dev/null +++ b/deployments/fuse/DiamondCutFacet.json @@ -0,0 +1,134 @@ +{ + "address": "0xf859F683a47b3D0E2A964eFDdf7392972700a101", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "indexed": false, + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" + }, + { + "indexed": false, + "internalType": "address", + "name": "_init", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "DiamondCut", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "_init", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "diamondCut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x02bb6e8045d5d9b7c69dea3802d5e7a6d33a4844dd6f6263dc0c444604ecc450", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 5, + "gasUsed": "2337199", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xc5868af950eff0612b81b4eaa2c50c6ea5acd1adae1f490ff3ec830778ff4078", + "transactionHash": "0x02bb6e8045d5d9b7c69dea3802d5e7a6d33a4844dd6f6263dc0c444604ecc450", + "logs": [], + "blockNumber": 17842220, + "cumulativeGasUsed": "3051566", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "7a183f869f73d4ccd46c6d23b208518b", + "metadata": "{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"facetAddress\",\"type\":\"address\"},{\"internalType\":\"enum IDiamondCut.FacetCutAction\",\"name\":\"action\",\"type\":\"uint8\"},{\"internalType\":\"bytes4[]\",\"name\":\"functionSelectors\",\"type\":\"bytes4[]\"}],\"indexed\":false,\"internalType\":\"struct IDiamondCut.FacetCut[]\",\"name\":\"_diamondCut\",\"type\":\"tuple[]\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_init\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_calldata\",\"type\":\"bytes\"}],\"name\":\"DiamondCut\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"facetAddress\",\"type\":\"address\"},{\"internalType\":\"enum IDiamondCut.FacetCutAction\",\"name\":\"action\",\"type\":\"uint8\"},{\"internalType\":\"bytes4[]\",\"name\":\"functionSelectors\",\"type\":\"bytes4[]\"}],\"internalType\":\"struct IDiamondCut.FacetCut[]\",\"name\":\"_diamondCut\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"_init\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_calldata\",\"type\":\"bytes\"}],\"name\":\"diamondCut\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"diamondCut((address,uint8,bytes4[])[],address,bytes)\":{\"params\":{\"_calldata\":\"A function call, including function selector and arguments _calldata is executed with delegatecall on _init\",\"_diamondCut\":\"Contains the facet addresses and function selectors\",\"_init\":\"The address of the contract or facet to execute _calldata\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"diamondCut((address,uint8,bytes4[])[],address,bytes)\":{\"notice\":\"Add/replace/remove any number of functions and optionally execute a function with delegatecall\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/bridges/facets/DiamondCutFacet.sol\":\"DiamondCutFacet\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/bridges/facets/DiamondCutFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { IDiamondCut } from \\\"../interfaces/IDiamondCut.sol\\\";\\nimport { LibDiamond } from \\\"../libs/LibDiamond.sol\\\";\\n\\ncontract DiamondCutFacet is IDiamondCut {\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(\\n FacetCut[] calldata _diamondCut,\\n address _init,\\n bytes calldata _calldata\\n ) external override {\\n LibDiamond.enforceIsContractOwner();\\n LibDiamond.diamondCut(_diamondCut, _init, _calldata);\\n }\\n}\\n\",\"keccak256\":\"0x0387472f18c1949e2a6c12fccb216a6e17a28abbedf81c1d5c7a565c2c618c36\",\"license\":\"MIT\"},\"src/bridges/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(\\n FacetCut[] calldata _diamondCut,\\n address _init,\\n bytes calldata _calldata\\n ) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0x608723d9599dc5de624ca7af0751f834bdff25c5b02bc9e817b6f490d3324069\",\"license\":\"MIT\"},\"src/bridges/libs/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { IDiamondCut } from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 internal constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(\\n IDiamondCut.FacetCut[] memory _diamondCut,\\n address _init,\\n bytes memory _calldata\\n ) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(\\n DiamondStorage storage ds,\\n address _facetAddress,\\n bytes4 _selector\\n ) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x7a82c7c0bd4b049b5471c09127fad37873be021813abbe7ec07edb5a908c35e5\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061298d806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80631f931c1c14610030575b600080fd5b61004a60048036038101906100459190611b35565b61004c565b005b6100546100b6565b6100af8585906100649190612387565b8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610151565b5050505050565b6100be610571565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461014f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101469061204e565b60405180910390fd5b565b60005b8351811015610526576000848281518110610198577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156101e0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610219577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156102b6576102b185838151811061025b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106102a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161059e565b610512565b600160028111156102f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610329577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103c6576103c185838151811061036b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106103b0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161083d565b610511565b6002808111156103ff577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610438577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104d5576104d085838151811061047a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106104bf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610ae7565b610510565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610507906120ae565b60405180910390fd5b5b5b50808061051e90612412565b915050610154565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161055a93929190611fa7565b60405180910390a161056c8282610c98565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116105e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d99061206e565b60405180910390fd5b60006105ec610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561065e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610655906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156106cc576106cb8285610eab565b5b60005b8351811015610836576000848281518110610713577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610807576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107fe9061212e565b60405180910390fd5b6108138583868a610f86565b838061081e9061245b565b9450505050808061082e90612412565b9150506106cf565b5050505050565b6000815111610881576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108789061206e565b60405180910390fd5b600061088b610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f4906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff16141561096b5761096a8285610eab565b5b60005b8351811015610ae05760008482815181106109b2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9d9061214e565b60405180910390fd5b610ab1858284611133565b610abd8583868a610f86565b8380610ac89061245b565b94505050508080610ad890612412565b91505061096e565b5050505050565b6000815111610b2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b229061206e565b60405180910390fd5b6000610b35610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610ba6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9d9061216e565b60405180910390fd5b60005b8251811015610c92576000838281518110610bed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610c7d848284611133565b50508080610c8a90612412565b915050610ba9565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d16576000815114610d11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d089061200e565b60405180910390fd5b610ea7565b6000815111610d5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d51906120ee565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610db057610daf826040518060600160405280602881526020016129356028913961187c565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610dd89190611f90565b600060405180830381855af49150503d8060008114610e13576040519150601f19603f3d011682016040523d82523d6000602084013e610e18565b606091505b509150915081610ea457600081511115610e6957806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e609190611fec565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9b9061202e565b60405180910390fd5b50505b5050565b610ecd8160405180606001604052806024815260200161295d6024913961187c565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119a9061208e565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611212576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112099061210e565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506112e991906122c0565b90508082146114c95760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018281548110611370577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611412577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611543577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156118755760006001866002018054905061162e91906122c0565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146117bb5760008760020183815481106116be577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611728577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806117f5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906118c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bf9190611fec565b60405180910390fd5b50505050565b60006118e16118dc846121b3565b61218e565b9050808382526020820190508285602086028201111561190057600080fd5b60005b8581101561193057816119168882611a49565b845260208401935060208301925050600181019050611903565b5050509392505050565b600061194d611948846121df565b61218e565b9050808382526020820190508285602086028201111561196c57600080fd5b60005b858110156119b657813567ffffffffffffffff81111561198e57600080fd5b80860161199b8982611abd565b8552602085019450602084019350505060018101905061196f565b5050509392505050565b6000813590506119cf816128f6565b92915050565b600082601f8301126119e657600080fd5b81356119f68482602086016118ce565b91505092915050565b60008083601f840112611a1157600080fd5b8235905067ffffffffffffffff811115611a2a57600080fd5b602083019150836020820283011115611a4257600080fd5b9250929050565b600081359050611a588161290d565b92915050565b60008083601f840112611a7057600080fd5b8235905067ffffffffffffffff811115611a8957600080fd5b602083019150836001820283011115611aa157600080fd5b9250929050565b600081359050611ab781612924565b92915050565b600060608284031215611acf57600080fd5b611ad9606061218e565b90506000611ae9848285016119c0565b6000830152506020611afd84828501611aa8565b602083015250604082013567ffffffffffffffff811115611b1d57600080fd5b611b29848285016119d5565b60408301525092915050565b600080600080600060608688031215611b4d57600080fd5b600086013567ffffffffffffffff811115611b6757600080fd5b611b73888289016119ff565b95509550506020611b86888289016119c0565b935050604086013567ffffffffffffffff811115611ba357600080fd5b611baf88828901611a5e565b92509250509295509295909350565b6000611bca8383611cdb565b60208301905092915050565b6000611be28383611f40565b905092915050565b611bf3816122f4565b82525050565b611c02816122f4565b82525050565b6000611c138261222b565b611c1d8185612271565b9350611c288361220b565b8060005b83811015611c59578151611c408882611bbe565b9750611c4b83612257565b925050600181019050611c2c565b5085935050505092915050565b6000611c7182612236565b611c7b8185612282565b935083602082028501611c8d8561221b565b8060005b85811015611cc95784840389528151611caa8582611bd6565b9450611cb583612264565b925060208a01995050600181019050611c91565b50829750879550505050505092915050565b611ce481612306565b82525050565b6000611cf582612241565b611cff8185612293565b9350611d0f8185602086016123ae565b611d188161251d565b840191505092915050565b6000611d2e82612241565b611d3881856122a4565b9350611d488185602086016123ae565b80840191505092915050565b611d5d8161239c565b82525050565b6000611d6e8261224c565b611d7881856122af565b9350611d888185602086016123ae565b611d918161251d565b840191505092915050565b6000611da9603c836122af565b9150611db48261252e565b604082019050919050565b6000611dcc6026836122af565b9150611dd78261257d565b604082019050919050565b6000611def6022836122af565b9150611dfa826125cc565b604082019050919050565b6000611e12602b836122af565b9150611e1d8261261b565b604082019050919050565b6000611e356037836122af565b9150611e408261266a565b604082019050919050565b6000611e586027836122af565b9150611e63826126b9565b604082019050919050565b6000611e7b602c836122af565b9150611e8682612708565b604082019050919050565b6000611e9e603d836122af565b9150611ea982612757565b604082019050919050565b6000611ec1602e836122af565b9150611ecc826127a6565b604082019050919050565b6000611ee46035836122af565b9150611eef826127f5565b604082019050919050565b6000611f076038836122af565b9150611f1282612844565b604082019050919050565b6000611f2a6036836122af565b9150611f3582612893565b604082019050919050565b6000606083016000830151611f586000860182611bea565b506020830151611f6b6020860182611d54565b5060408301518482036040860152611f838282611c08565b9150508091505092915050565b6000611f9c8284611d23565b915081905092915050565b60006060820190508181036000830152611fc18186611c66565b9050611fd06020830185611bf9565b8181036040830152611fe28184611cea565b9050949350505050565b600060208201905081810360008301526120068184611d63565b905092915050565b6000602082019050818103600083015261202781611d9c565b9050919050565b6000602082019050818103600083015261204781611dbf565b9050919050565b6000602082019050818103600083015261206781611de2565b9050919050565b6000602082019050818103600083015261208781611e05565b9050919050565b600060208201905081810360008301526120a781611e28565b9050919050565b600060208201905081810360008301526120c781611e4b565b9050919050565b600060208201905081810360008301526120e781611e6e565b9050919050565b6000602082019050818103600083015261210781611e91565b9050919050565b6000602082019050818103600083015261212781611eb4565b9050919050565b6000602082019050818103600083015261214781611ed7565b9050919050565b6000602082019050818103600083015261216781611efa565b9050919050565b6000602082019050818103600083015261218781611f1d565b9050919050565b60006121986121a9565b90506121a482826123e1565b919050565b6000604051905090565b600067ffffffffffffffff8211156121ce576121cd6124ee565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156121fa576121f96124ee565b5b602082029050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006122cb82612365565b91506122d683612365565b9250828210156122e9576122e8612490565b5b828203905092915050565b60006122ff82612345565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050612340826128e2565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b600061239436848461193a565b905092915050565b60006123a782612332565b9050919050565b60005b838110156123cc5780820151818401526020810190506123b1565b838111156123db576000848401525b50505050565b6123ea8261251d565b810181811067ffffffffffffffff82111715612409576124086124ee565b5b80604052505050565b600061241d82612365565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156124505761244f612490565b5b600182019050919050565b60006124668261236f565b91506bffffffffffffffffffffffff82141561248557612484612490565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106128f3576128f26124bf565b5b50565b6128ff816122f4565b811461290a57600080fd5b50565b61291681612306565b811461292157600080fd5b50565b6003811061293157600080fd5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80631f931c1c14610030575b600080fd5b61004a60048036038101906100459190611b35565b61004c565b005b6100546100b6565b6100af8585906100649190612387565b8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610151565b5050505050565b6100be610571565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461014f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101469061204e565b60405180910390fd5b565b60005b8351811015610526576000848281518110610198577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156101e0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610219577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156102b6576102b185838151811061025b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106102a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161059e565b610512565b600160028111156102f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610329577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103c6576103c185838151811061036b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106103b0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161083d565b610511565b6002808111156103ff577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610438577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104d5576104d085838151811061047a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106104bf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610ae7565b610510565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610507906120ae565b60405180910390fd5b5b5b50808061051e90612412565b915050610154565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161055a93929190611fa7565b60405180910390a161056c8282610c98565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116105e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d99061206e565b60405180910390fd5b60006105ec610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561065e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610655906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156106cc576106cb8285610eab565b5b60005b8351811015610836576000848281518110610713577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610807576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107fe9061212e565b60405180910390fd5b6108138583868a610f86565b838061081e9061245b565b9450505050808061082e90612412565b9150506106cf565b5050505050565b6000815111610881576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108789061206e565b60405180910390fd5b600061088b610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f4906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff16141561096b5761096a8285610eab565b5b60005b8351811015610ae05760008482815181106109b2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9d9061214e565b60405180910390fd5b610ab1858284611133565b610abd8583868a610f86565b8380610ac89061245b565b94505050508080610ad890612412565b91505061096e565b5050505050565b6000815111610b2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b229061206e565b60405180910390fd5b6000610b35610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610ba6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9d9061216e565b60405180910390fd5b60005b8251811015610c92576000838281518110610bed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610c7d848284611133565b50508080610c8a90612412565b915050610ba9565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d16576000815114610d11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d089061200e565b60405180910390fd5b610ea7565b6000815111610d5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d51906120ee565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610db057610daf826040518060600160405280602881526020016129356028913961187c565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610dd89190611f90565b600060405180830381855af49150503d8060008114610e13576040519150601f19603f3d011682016040523d82523d6000602084013e610e18565b606091505b509150915081610ea457600081511115610e6957806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e609190611fec565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9b9061202e565b60405180910390fd5b50505b5050565b610ecd8160405180606001604052806024815260200161295d6024913961187c565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119a9061208e565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611212576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112099061210e565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506112e991906122c0565b90508082146114c95760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018281548110611370577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611412577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611543577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156118755760006001866002018054905061162e91906122c0565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146117bb5760008760020183815481106116be577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611728577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806117f5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906118c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bf9190611fec565b60405180910390fd5b50505050565b60006118e16118dc846121b3565b61218e565b9050808382526020820190508285602086028201111561190057600080fd5b60005b8581101561193057816119168882611a49565b845260208401935060208301925050600181019050611903565b5050509392505050565b600061194d611948846121df565b61218e565b9050808382526020820190508285602086028201111561196c57600080fd5b60005b858110156119b657813567ffffffffffffffff81111561198e57600080fd5b80860161199b8982611abd565b8552602085019450602084019350505060018101905061196f565b5050509392505050565b6000813590506119cf816128f6565b92915050565b600082601f8301126119e657600080fd5b81356119f68482602086016118ce565b91505092915050565b60008083601f840112611a1157600080fd5b8235905067ffffffffffffffff811115611a2a57600080fd5b602083019150836020820283011115611a4257600080fd5b9250929050565b600081359050611a588161290d565b92915050565b60008083601f840112611a7057600080fd5b8235905067ffffffffffffffff811115611a8957600080fd5b602083019150836001820283011115611aa157600080fd5b9250929050565b600081359050611ab781612924565b92915050565b600060608284031215611acf57600080fd5b611ad9606061218e565b90506000611ae9848285016119c0565b6000830152506020611afd84828501611aa8565b602083015250604082013567ffffffffffffffff811115611b1d57600080fd5b611b29848285016119d5565b60408301525092915050565b600080600080600060608688031215611b4d57600080fd5b600086013567ffffffffffffffff811115611b6757600080fd5b611b73888289016119ff565b95509550506020611b86888289016119c0565b935050604086013567ffffffffffffffff811115611ba357600080fd5b611baf88828901611a5e565b92509250509295509295909350565b6000611bca8383611cdb565b60208301905092915050565b6000611be28383611f40565b905092915050565b611bf3816122f4565b82525050565b611c02816122f4565b82525050565b6000611c138261222b565b611c1d8185612271565b9350611c288361220b565b8060005b83811015611c59578151611c408882611bbe565b9750611c4b83612257565b925050600181019050611c2c565b5085935050505092915050565b6000611c7182612236565b611c7b8185612282565b935083602082028501611c8d8561221b565b8060005b85811015611cc95784840389528151611caa8582611bd6565b9450611cb583612264565b925060208a01995050600181019050611c91565b50829750879550505050505092915050565b611ce481612306565b82525050565b6000611cf582612241565b611cff8185612293565b9350611d0f8185602086016123ae565b611d188161251d565b840191505092915050565b6000611d2e82612241565b611d3881856122a4565b9350611d488185602086016123ae565b80840191505092915050565b611d5d8161239c565b82525050565b6000611d6e8261224c565b611d7881856122af565b9350611d888185602086016123ae565b611d918161251d565b840191505092915050565b6000611da9603c836122af565b9150611db48261252e565b604082019050919050565b6000611dcc6026836122af565b9150611dd78261257d565b604082019050919050565b6000611def6022836122af565b9150611dfa826125cc565b604082019050919050565b6000611e12602b836122af565b9150611e1d8261261b565b604082019050919050565b6000611e356037836122af565b9150611e408261266a565b604082019050919050565b6000611e586027836122af565b9150611e63826126b9565b604082019050919050565b6000611e7b602c836122af565b9150611e8682612708565b604082019050919050565b6000611e9e603d836122af565b9150611ea982612757565b604082019050919050565b6000611ec1602e836122af565b9150611ecc826127a6565b604082019050919050565b6000611ee46035836122af565b9150611eef826127f5565b604082019050919050565b6000611f076038836122af565b9150611f1282612844565b604082019050919050565b6000611f2a6036836122af565b9150611f3582612893565b604082019050919050565b6000606083016000830151611f586000860182611bea565b506020830151611f6b6020860182611d54565b5060408301518482036040860152611f838282611c08565b9150508091505092915050565b6000611f9c8284611d23565b915081905092915050565b60006060820190508181036000830152611fc18186611c66565b9050611fd06020830185611bf9565b8181036040830152611fe28184611cea565b9050949350505050565b600060208201905081810360008301526120068184611d63565b905092915050565b6000602082019050818103600083015261202781611d9c565b9050919050565b6000602082019050818103600083015261204781611dbf565b9050919050565b6000602082019050818103600083015261206781611de2565b9050919050565b6000602082019050818103600083015261208781611e05565b9050919050565b600060208201905081810360008301526120a781611e28565b9050919050565b600060208201905081810360008301526120c781611e4b565b9050919050565b600060208201905081810360008301526120e781611e6e565b9050919050565b6000602082019050818103600083015261210781611e91565b9050919050565b6000602082019050818103600083015261212781611eb4565b9050919050565b6000602082019050818103600083015261214781611ed7565b9050919050565b6000602082019050818103600083015261216781611efa565b9050919050565b6000602082019050818103600083015261218781611f1d565b9050919050565b60006121986121a9565b90506121a482826123e1565b919050565b6000604051905090565b600067ffffffffffffffff8211156121ce576121cd6124ee565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156121fa576121f96124ee565b5b602082029050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006122cb82612365565b91506122d683612365565b9250828210156122e9576122e8612490565b5b828203905092915050565b60006122ff82612345565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050612340826128e2565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b600061239436848461193a565b905092915050565b60006123a782612332565b9050919050565b60005b838110156123cc5780820151818401526020810190506123b1565b838111156123db576000848401525b50505050565b6123ea8261251d565b810181811067ffffffffffffffff82111715612409576124086124ee565b5b80604052505050565b600061241d82612365565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156124505761244f612490565b5b600182019050919050565b60006124668261236f565b91506bffffffffffffffffffffffff82141561248557612484612490565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106128f3576128f26124bf565b5b50565b6128ff816122f4565b811461290a57600080fd5b50565b61291681612306565b811461292157600080fd5b50565b6003811061293157600080fd5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a", + "devdoc": { + "kind": "dev", + "methods": { + "diamondCut((address,uint8,bytes4[])[],address,bytes)": { + "params": { + "_calldata": "A function call, including function selector and arguments _calldata is executed with delegatecall on _init", + "_diamondCut": "Contains the facet addresses and function selectors", + "_init": "The address of the contract or facet to execute _calldata" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "diamondCut((address,uint8,bytes4[])[],address,bytes)": { + "notice": "Add/replace/remove any number of functions and optionally execute a function with delegatecall" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fuse/DiamondLoupeFacet.json b/deployments/fuse/DiamondLoupeFacet.json new file mode 100644 index 00000000..11434a4d --- /dev/null +++ b/deployments/fuse/DiamondLoupeFacet.json @@ -0,0 +1,176 @@ +{ + "address": "0x8BFbB21683e21DC4B11af352117d6D4F2bc62f8e", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "_functionSelector", + "type": "bytes4" + } + ], + "name": "facetAddress", + "outputs": [ + { + "internalType": "address", + "name": "facetAddress_", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "facetAddresses", + "outputs": [ + { + "internalType": "address[]", + "name": "facetAddresses_", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_facet", + "type": "address" + } + ], + "name": "facetFunctionSelectors", + "outputs": [ + { + "internalType": "bytes4[]", + "name": "facetFunctionSelectors_", + "type": "bytes4[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "facets", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IDiamondLoupe.Facet[]", + "name": "facets_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "_interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x8710442a64820abbf2a0d69c611eda0beb5fc8b17db31da5e6c08d571f7a32b2", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 3, + "gasUsed": "719562", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x093e1d0836e86776f06eeb7f0750656222229c2d93104d330c55f19a7ce63e98", + "transactionHash": "0x8710442a64820abbf2a0d69c611eda0beb5fc8b17db31da5e6c08d571f7a32b2", + "logs": [], + "blockNumber": 17842221, + "cumulativeGasUsed": "1265439", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "7a183f869f73d4ccd46c6d23b208518b", + "metadata": "{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"_functionSelector\",\"type\":\"bytes4\"}],\"name\":\"facetAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"facetAddress_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"facetAddresses\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"facetAddresses_\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_facet\",\"type\":\"address\"}],\"name\":\"facetFunctionSelectors\",\"outputs\":[{\"internalType\":\"bytes4[]\",\"name\":\"facetFunctionSelectors_\",\"type\":\"bytes4[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"facets\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"facetAddress\",\"type\":\"address\"},{\"internalType\":\"bytes4[]\",\"name\":\"functionSelectors\",\"type\":\"bytes4[]\"}],\"internalType\":\"struct IDiamondLoupe.Facet[]\",\"name\":\"facets_\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"_interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"facetAddress(bytes4)\":{\"details\":\"If facet is not found return address(0).\",\"params\":{\"_functionSelector\":\"The function selector.\"},\"returns\":{\"facetAddress_\":\"The facet address.\"}},\"facetAddresses()\":{\"returns\":{\"facetAddresses_\":\"facetAddresses_\"}},\"facetFunctionSelectors(address)\":{\"params\":{\"_facet\":\"The facet address.\"},\"returns\":{\"facetFunctionSelectors_\":\"facetFunctionSelectors_\"}},\"facets()\":{\"returns\":{\"facets_\":\"Facet\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"facetAddress(bytes4)\":{\"notice\":\"Gets the facet that supports the given selector.\"},\"facetAddresses()\":{\"notice\":\"Get all the facet addresses used by a diamond.\"},\"facetFunctionSelectors(address)\":{\"notice\":\"Gets all the function selectors provided by a facet.\"},\"facets()\":{\"notice\":\"Gets all facets and their selectors.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/bridges/facets/DiamondLoupeFacet.sol\":\"DiamondLoupeFacet\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/bridges/facets/DiamondLoupeFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { LibDiamond } from \\\"../libs/LibDiamond.sol\\\";\\nimport { IDiamondLoupe } from \\\"../interfaces/IDiamondLoupe.sol\\\";\\nimport { IERC165 } from \\\"../interfaces/IERC165.sol\\\";\\n\\ncontract DiamondLoupeFacet is IDiamondLoupe, IERC165 {\\n // Diamond Loupe Functions\\n ////////////////////////////////////////////////////////////////////\\n /// These functions are expected to be called frequently by tools.\\n //\\n // struct Facet {\\n // address facetAddress;\\n // bytes4[] functionSelectors;\\n // }\\n\\n /// @notice Gets all facets and their selectors.\\n /// @return facets_ Facet\\n function facets() external view override returns (Facet[] memory facets_) {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n uint256 numFacets = ds.facetAddresses.length;\\n facets_ = new Facet[](numFacets);\\n for (uint256 i = 0; i < numFacets; i++) {\\n address facetAddress_ = ds.facetAddresses[i];\\n facets_[i].facetAddress = facetAddress_;\\n facets_[i].functionSelectors = ds.facetFunctionSelectors[facetAddress_].functionSelectors;\\n }\\n }\\n\\n /// @notice Gets all the function selectors provided by a facet.\\n /// @param _facet The facet address.\\n /// @return facetFunctionSelectors_\\n function facetFunctionSelectors(address _facet)\\n external\\n view\\n override\\n returns (bytes4[] memory facetFunctionSelectors_)\\n {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n facetFunctionSelectors_ = ds.facetFunctionSelectors[_facet].functionSelectors;\\n }\\n\\n /// @notice Get all the facet addresses used by a diamond.\\n /// @return facetAddresses_\\n function facetAddresses() external view override returns (address[] memory facetAddresses_) {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n facetAddresses_ = ds.facetAddresses;\\n }\\n\\n /// @notice Gets the facet that supports the given selector.\\n /// @dev If facet is not found return address(0).\\n /// @param _functionSelector The function selector.\\n /// @return facetAddress_ The facet address.\\n function facetAddress(bytes4 _functionSelector) external view override returns (address facetAddress_) {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n facetAddress_ = ds.selectorToFacetAndPosition[_functionSelector].facetAddress;\\n }\\n\\n // This implements ERC-165.\\n function supportsInterface(bytes4 _interfaceId) external view override returns (bool) {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n return ds.supportedInterfaces[_interfaceId];\\n }\\n}\\n\",\"keccak256\":\"0xf544f602fa01f82f15ff8f2257255c6ff82dcef3c2d57b4e3b6598a8cf61dc1a\",\"license\":\"MIT\"},\"src/bridges/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(\\n FacetCut[] calldata _diamondCut,\\n address _init,\\n bytes calldata _calldata\\n ) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0x608723d9599dc5de624ca7af0751f834bdff25c5b02bc9e817b6f490d3324069\",\"license\":\"MIT\"},\"src/bridges/interfaces/IDiamondLoupe.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\n// A loupe is a small magnifying glass used to look at diamonds.\\n// These functions look at diamonds\\ninterface IDiamondLoupe {\\n /// These functions are expected to be called frequently\\n /// by tools.\\n\\n struct Facet {\\n address facetAddress;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Gets all facet addresses and their four byte function selectors.\\n /// @return facets_ Facet\\n function facets() external view returns (Facet[] memory facets_);\\n\\n /// @notice Gets all the function selectors supported by a specific facet.\\n /// @param _facet The facet address.\\n /// @return facetFunctionSelectors_\\n function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);\\n\\n /// @notice Get all the facet addresses used by a diamond.\\n /// @return facetAddresses_\\n function facetAddresses() external view returns (address[] memory facetAddresses_);\\n\\n /// @notice Gets the facet that supports the given selector.\\n /// @dev If facet is not found return address(0).\\n /// @param _functionSelector The function selector.\\n /// @return facetAddress_ The facet address.\\n function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);\\n}\\n\",\"keccak256\":\"0xc710a1bd0523868e5f6972f3f3cc1cf37a5020ef13d3805e76b13fe952a9614a\",\"license\":\"MIT\"},\"src/bridges/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\ninterface IERC165 {\\n /// @notice Query if a contract implements an interface\\n /// @param interfaceId The interface identifier, as specified in ERC-165\\n /// @dev Interface identification is specified in ERC-165. This function\\n /// uses less than 30,000 gas.\\n /// @return `true` if the contract implements `interfaceID` and\\n /// `interfaceID` is not 0xffffffff, `false` otherwise\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\",\"keccak256\":\"0x1734ad5b8c2f4c805ed7e20d62627db8747ff8b9929007f982e76f798cf67e50\",\"license\":\"MIT\"},\"src/bridges/libs/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { IDiamondCut } from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 internal constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(\\n IDiamondCut.FacetCut[] memory _diamondCut,\\n address _init,\\n bytes memory _calldata\\n ) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(\\n DiamondStorage storage ds,\\n address _facetAddress,\\n bytes4 _selector\\n ) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x7a82c7c0bd4b049b5471c09127fad37873be021813abbe7ec07edb5a908c35e5\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c11806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c57806352ef6b2c1461008c5780637a0ed627146100aa578063adfca15e146100c8578063cdffacc6146100f8575b600080fd5b6100766004803603810190610071919061071d565b610128565b6040516100839190610a13565b60405180910390f35b61009461019e565b6040516100a191906109ad565b60405180910390f35b6100b261023b565b6040516100bf91906109f1565b60405180910390f35b6100e260048036038101906100dd91906106f4565b6104f6565b6040516100ef91906109cf565b60405180910390f35b610112600480360381019061010d919061071d565b6105e1565b60405161011f9190610992565b60405180910390f35b60008061013361066d565b9050806003016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff16915050919050565b606060006101aa61066d565b90508060020180548060200260200160405190810160405280929190818152602001828054801561023057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116101e6575b505050505091505090565b6060600061024761066d565b90506000816002018054905090508067ffffffffffffffff811115610295577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102ce57816020015b6102bb61069a565b8152602001906001900390816102b35790505b50925060005b818110156104f057600083600201828154811061031a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080858381518110610381577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561048f57602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001906004019060208260030104928301926001038202915080841161043c5790505b50505050508583815181106104cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001819052505080806104e890610b5e565b9150506102d4565b50505090565b6060600061050261066d565b90508060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806020026020016040519081016040528092919081815260200182805480156105d457602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600401906020826003010492830192600103820291508084116105815790505b5050505050915050919050565b6000806105ec61066d565b9050806000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b6000813590506106d981610bd6565b92915050565b6000813590506106ee81610bed565b92915050565b60006020828403121561070657600080fd5b6000610714848285016106ca565b91505092915050565b60006020828403121561072f57600080fd5b600061073d848285016106df565b91505092915050565b6000610752838361078a565b60208301905092915050565b600061076a8383610946565b60208301905092915050565b60006107828383610955565b905092915050565b61079381610aea565b82525050565b6107a281610aea565b82525050565b60006107b382610a5e565b6107bd8185610aa6565b93506107c883610a2e565b8060005b838110156107f95781516107e08882610746565b97506107eb83610a7f565b9250506001810190506107cc565b5085935050505092915050565b600061081182610a69565b61081b8185610ab7565b935061082683610a3e565b8060005b8381101561085757815161083e888261075e565b975061084983610a8c565b92505060018101905061082a565b5085935050505092915050565b600061086f82610a69565b6108798185610ac8565b935061088483610a3e565b8060005b838110156108b557815161089c888261075e565b97506108a783610a8c565b925050600181019050610888565b5085935050505092915050565b60006108cd82610a74565b6108d78185610ad9565b9350836020820285016108e985610a4e565b8060005b8581101561092557848403895281516109068582610776565b945061091183610a99565b925060208a019950506001810190506108ed565b50829750879550505050505092915050565b61094081610afc565b82525050565b61094f81610b08565b82525050565b600060408301600083015161096d600086018261078a565b50602083015184820360208601526109858282610806565b9150508091505092915050565b60006020820190506109a76000830184610799565b92915050565b600060208201905081810360008301526109c781846107a8565b905092915050565b600060208201905081810360008301526109e98184610864565b905092915050565b60006020820190508181036000830152610a0b81846108c2565b905092915050565b6000602082019050610a286000830184610937565b92915050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610af582610b34565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610b6982610b54565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610b9c57610b9b610ba7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610bdf81610aea565b8114610bea57600080fd5b50565b610bf681610b08565b8114610c0157600080fd5b5056fea164736f6c6343000804000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c57806352ef6b2c1461008c5780637a0ed627146100aa578063adfca15e146100c8578063cdffacc6146100f8575b600080fd5b6100766004803603810190610071919061071d565b610128565b6040516100839190610a13565b60405180910390f35b61009461019e565b6040516100a191906109ad565b60405180910390f35b6100b261023b565b6040516100bf91906109f1565b60405180910390f35b6100e260048036038101906100dd91906106f4565b6104f6565b6040516100ef91906109cf565b60405180910390f35b610112600480360381019061010d919061071d565b6105e1565b60405161011f9190610992565b60405180910390f35b60008061013361066d565b9050806003016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff16915050919050565b606060006101aa61066d565b90508060020180548060200260200160405190810160405280929190818152602001828054801561023057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116101e6575b505050505091505090565b6060600061024761066d565b90506000816002018054905090508067ffffffffffffffff811115610295577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102ce57816020015b6102bb61069a565b8152602001906001900390816102b35790505b50925060005b818110156104f057600083600201828154811061031a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080858381518110610381577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561048f57602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001906004019060208260030104928301926001038202915080841161043c5790505b50505050508583815181106104cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001819052505080806104e890610b5e565b9150506102d4565b50505090565b6060600061050261066d565b90508060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806020026020016040519081016040528092919081815260200182805480156105d457602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600401906020826003010492830192600103820291508084116105815790505b5050505050915050919050565b6000806105ec61066d565b9050806000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b6000813590506106d981610bd6565b92915050565b6000813590506106ee81610bed565b92915050565b60006020828403121561070657600080fd5b6000610714848285016106ca565b91505092915050565b60006020828403121561072f57600080fd5b600061073d848285016106df565b91505092915050565b6000610752838361078a565b60208301905092915050565b600061076a8383610946565b60208301905092915050565b60006107828383610955565b905092915050565b61079381610aea565b82525050565b6107a281610aea565b82525050565b60006107b382610a5e565b6107bd8185610aa6565b93506107c883610a2e565b8060005b838110156107f95781516107e08882610746565b97506107eb83610a7f565b9250506001810190506107cc565b5085935050505092915050565b600061081182610a69565b61081b8185610ab7565b935061082683610a3e565b8060005b8381101561085757815161083e888261075e565b975061084983610a8c565b92505060018101905061082a565b5085935050505092915050565b600061086f82610a69565b6108798185610ac8565b935061088483610a3e565b8060005b838110156108b557815161089c888261075e565b97506108a783610a8c565b925050600181019050610888565b5085935050505092915050565b60006108cd82610a74565b6108d78185610ad9565b9350836020820285016108e985610a4e565b8060005b8581101561092557848403895281516109068582610776565b945061091183610a99565b925060208a019950506001810190506108ed565b50829750879550505050505092915050565b61094081610afc565b82525050565b61094f81610b08565b82525050565b600060408301600083015161096d600086018261078a565b50602083015184820360208601526109858282610806565b9150508091505092915050565b60006020820190506109a76000830184610799565b92915050565b600060208201905081810360008301526109c781846107a8565b905092915050565b600060208201905081810360008301526109e98184610864565b905092915050565b60006020820190508181036000830152610a0b81846108c2565b905092915050565b6000602082019050610a286000830184610937565b92915050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610af582610b34565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610b6982610b54565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610b9c57610b9b610ba7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610bdf81610aea565b8114610bea57600080fd5b50565b610bf681610b08565b8114610c0157600080fd5b5056fea164736f6c6343000804000a", + "devdoc": { + "kind": "dev", + "methods": { + "facetAddress(bytes4)": { + "details": "If facet is not found return address(0).", + "params": { + "_functionSelector": "The function selector." + }, + "returns": { + "facetAddress_": "The facet address." + } + }, + "facetAddresses()": { + "returns": { + "facetAddresses_": "facetAddresses_" + } + }, + "facetFunctionSelectors(address)": { + "params": { + "_facet": "The facet address." + }, + "returns": { + "facetFunctionSelectors_": "facetFunctionSelectors_" + } + }, + "facets()": { + "returns": { + "facets_": "Facet" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "facetAddress(bytes4)": { + "notice": "Gets the facet that supports the given selector." + }, + "facetAddresses()": { + "notice": "Get all the facet addresses used by a diamond." + }, + "facetFunctionSelectors(address)": { + "notice": "Gets all the function selectors provided by a facet." + }, + "facets()": { + "notice": "Gets all facets and their selectors." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fuse/ENSController.json b/deployments/fuse/ENSController.json new file mode 100644 index 00000000..6023ae89 --- /dev/null +++ b/deployments/fuse/ENSController.json @@ -0,0 +1,1152 @@ +{ + "address": "0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "AddrChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "coinType", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "newAddress", + "type": "bytes" + } + ], + "name": "AddressChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "NameChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "NodeReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "NodeSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "NodeVerified", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "x", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "y", + "type": "bytes32" + } + ], + "name": "PubkeyChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "registry", + "type": "address" + } + ], + "name": "RegistryChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "string", + "name": "indexedKey", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + } + ], + "name": "TextChanged", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "addGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "addr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "coinType", + "type": "uint256" + } + ], + "name": "addr", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "chainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gateway", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + } + ], + "internalType": "struct ENSController.SubNodeRegistration", + "name": "subNodeRegistration", + "type": "tuple" + } + ], + "name": "hashSubNodeRegistration", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ENSRegistry", + "name": "registry_", + "type": "address" + }, + { + "internalType": "address[]", + "name": "guardians_", + "type": "address[]" + }, + { + "internalType": "address", + "name": "gateway_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "isGuardian", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nodeOwners", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "pubkey", + "outputs": [ + { + "internalType": "bytes32", + "name": "x", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "y", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "guardianSignature", + "type": "bytes" + } + ], + "name": "registerSubNode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract ENSRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "releaseNode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "removeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "coinType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "addr_", + "type": "bytes" + } + ], + "name": "setAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "addr_", + "type": "address" + } + ], + "name": "setAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "setName", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "x", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "y", + "type": "bytes32" + } + ], + "name": "setPubkey", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ENSRegistry", + "name": "registry_", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "internalType": "string", + "name": "value", + "type": "string" + } + ], + "name": "setText", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "submitNode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "syncAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "key", + "type": "string" + } + ], + "name": "text", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "verifyGuardianSignature", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "verifyNode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x7eaed2685e2334a5c7c8cb3fc1b85dec0aadaca705bc1872fde5b2fb2dfb6728", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "4150167", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x29b71c4760bc81477660862392f30f08c34b990477266246986ad5a08170a34f", + "transactionHash": "0x7eaed2685e2334a5c7c8cb3fc1b85dec0aadaca705bc1872fde5b2fb2dfb6728", + "logs": [], + "blockNumber": 17842183, + "cumulativeGasUsed": "4334020", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"AddrChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"coinType\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"newAddress\",\"type\":\"bytes\"}],\"name\":\"AddressChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"GuardianAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"GuardianRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NameChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"NodeReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"NodeSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"NodeVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"x\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"y\",\"type\":\"bytes32\"}],\"name\":\"PubkeyChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"name\":\"RegistryChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"indexedKey\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"}],\"name\":\"TextChanged\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"addGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"addr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"coinType\",\"type\":\"uint256\"}],\"name\":\"addr\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"}],\"internalType\":\"struct ENSController.SubNodeRegistration\",\"name\":\"subNodeRegistration\",\"type\":\"tuple\"}],\"name\":\"hashSubNodeRegistration\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ENSRegistry\",\"name\":\"registry_\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"guardians_\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"gateway_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"isGuardian\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nodeOwners\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"pubkey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"x\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"y\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"guardianSignature\",\"type\":\"bytes\"}],\"name\":\"registerSubNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract ENSRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"releaseNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"removeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"coinType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"addr_\",\"type\":\"bytes\"}],\"name\":\"setAddr\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"addr_\",\"type\":\"address\"}],\"name\":\"setAddr\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"x\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"y\",\"type\":\"bytes32\"}],\"name\":\"setPubkey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ENSRegistry\",\"name\":\"registry_\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"name\":\"setText\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"submitNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceID\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"syncAddr\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"}],\"name\":\"text\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"verifyGuardianSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"verifyNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"details\":\"The process of adding root node consists of 3 steps: 1. `submitNode` - should be called from ENS node owner, 2. Change ENS node owner in ENS registry to ENS controller, 3. `verifyNode` - should be called from previous ENS node owner, To register sub node, `msg.sender` need to send valid signature from one of guardian key. Once registration is complete `msg.sender` becoming both node owner and `addr` record value. After registration sub node cannot be replaced.\",\"events\":{\"NodeReleased(bytes32,address)\":{\"details\":\"Emitted when new node is released\",\"params\":{\"node\":\"node name hash\",\"owner\":\"owner address\"}},\"NodeSubmitted(bytes32,address)\":{\"details\":\"Emitted when new node is submitted\",\"params\":{\"node\":\"node name hash\",\"owner\":\"owner address\"}},\"NodeVerified(bytes32)\":{\"details\":\"Emitted when the existing owner is verified\",\"params\":{\"node\":\"node name hash\"}},\"RegistryChanged(address)\":{\"details\":\"Emitted when ENS registry address is changed\",\"params\":{\"registry\":\"registry address\"}}},\"kind\":\"dev\",\"methods\":{\"addGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"}},\"constructor\":{\"details\":\"Public constructor\"},\"hashSubNodeRegistration((address,bytes32,bytes32))\":{\"params\":{\"subNodeRegistration\":\"struct\"},\"returns\":{\"_0\":\"hash\"}},\"initialize(address,address[],address)\":{\"params\":{\"gateway_\":\"gateway address\",\"registry_\":\"ENS registry address\"}},\"isGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"},\"returns\":{\"_0\":\"true when guardian exists\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}},\"registerSubNode(bytes32,bytes32,bytes)\":{\"params\":{\"guardianSignature\":\"guardian signature\",\"label\":\"label hash\",\"node\":\"node name hash\"}},\"releaseNode(bytes32)\":{\"details\":\"Should be called from the previous ENS node owner\",\"params\":{\"node\":\"node name hash\"}},\"removeGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"}},\"setRegistry(address)\":{\"params\":{\"registry_\":\"registry address\"}},\"submitNode(bytes32)\":{\"details\":\"Should be called from the current ENS node owner\",\"params\":{\"node\":\"node name hash\"}},\"syncAddr(bytes32)\":{\"params\":{\"node\":\"node name hash\"}},\"verifyGuardianSignature(bytes32,bytes)\":{\"params\":{\"messageHash\":\"message hash\",\"signature\":\"signature\"},\"returns\":{\"_0\":\"true on correct guardian signature\"}},\"verifyNode(bytes32)\":{\"details\":\"Should be called from the previous ENS node owner\",\"params\":{\"node\":\"node name hash\"}}},\"title\":\"ENS controller\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addGuardian(address)\":{\"notice\":\"Adds a new guardian\"},\"hashSubNodeRegistration((address,bytes32,bytes32))\":{\"notice\":\"Hashes `SubNodeRegistration` message payload\"},\"initialize(address,address[],address)\":{\"notice\":\"Initializes `ENSController` contract\"},\"isGuardian(address)\":{\"notice\":\"Check if guardian exists\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"},\"registerSubNode(bytes32,bytes32,bytes)\":{\"notice\":\"Registers sub node\"},\"releaseNode(bytes32)\":{\"notice\":\"Releases node\"},\"removeGuardian(address)\":{\"notice\":\"Removes the existing guardian\"},\"setRegistry(address)\":{\"notice\":\"Sets registry\"},\"submitNode(bytes32)\":{\"notice\":\"Submits node\"},\"syncAddr(bytes32)\":{\"notice\":\"Sync address\"},\"verifyGuardianSignature(bytes32,bytes)\":{\"notice\":\"Verifies guardian signature\"},\"verifyNode(bytes32)\":{\"notice\":\"Verifies node\"}},\"notice\":\"ENS subnode registrar\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ens/ENSController.sol\":\"ENSController\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/access/Guarded.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n\\n/**\\n * @title Guarded\\n *\\n * @dev Contract module which provides a guardian-type control mechanism.\\n * It allows key accounts to have guardians and restricts specific methods to be accessible by guardians only.\\n *\\n * Each guardian account can remove other guardians\\n *\\n * Use `_initializeGuarded` to initialize the contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Guarded {\\n using ECDSALib for bytes32;\\n\\n mapping(address => bool) private guardians;\\n\\n // events\\n\\n /**\\n * @dev Emitted when a new guardian is added\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianAdded(\\n address sender,\\n address guardian\\n );\\n\\n /**\\n * @dev Emitted when the existing guardian is removed\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianRemoved(\\n address sender,\\n address guardian\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not a guardian account\\n */\\n modifier onlyGuardian() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n guardians[tx.origin],\\n \\\"Guarded: tx.origin is not the guardian\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new guardian\\n * @param guardian guardian address\\n */\\n function addGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n _addGuardian(guardian);\\n }\\n\\n /**\\n * @notice Removes the existing guardian\\n * @param guardian guardian address\\n */\\n function removeGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin != guardian,\\n \\\"Guarded: cannot remove self\\\"\\n );\\n\\n require(\\n guardians[guardian],\\n \\\"Guarded: guardian doesn't exist\\\"\\n );\\n\\n guardians[guardian] = false;\\n\\n emit GuardianRemoved(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if guardian exists\\n * @param guardian guardian address\\n * @return true when guardian exists\\n */\\n function isGuardian(\\n address guardian\\n )\\n external\\n view\\n returns (bool)\\n {\\n return guardians[guardian];\\n }\\n\\n /**\\n * @notice Verifies guardian signature\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true on correct guardian signature\\n */\\n function verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyGuardianSignature(\\n messageHash,\\n signature\\n );\\n }\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `Guarded` contract\\n * @dev If `guardians_` array is empty `tx.origin` is added as guardian account\\n * @param guardians_ array of guardians addresses\\n */\\n function _initializeGuarded(\\n address[] memory guardians_\\n )\\n internal\\n {\\n if (guardians_.length == 0) {\\n // solhint-disable-next-line avoid-tx-origin\\n _addGuardian(tx.origin);\\n } else {\\n uint guardiansLen = guardians_.length;\\n for (uint i = 0; i < guardiansLen; i++) {\\n _addGuardian(guardians_[i]);\\n }\\n }\\n }\\n\\n\\n // internal functions (views)\\n\\n function _verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n view\\n returns (bool)\\n {\\n address guardian = messageHash.recoverAddress(signature);\\n\\n return guardians[guardian];\\n }\\n\\n // private functions\\n\\n function _addGuardian(\\n address guardian\\n )\\n private\\n {\\n require(\\n guardian != address(0),\\n \\\"Guarded: cannot add 0x0 guardian\\\"\\n );\\n\\n require(\\n !guardians[guardian],\\n \\\"Guarded: guardian already exists\\\"\\n );\\n\\n guardians[guardian] = true;\\n\\n emit GuardianAdded(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n}\\n\",\"keccak256\":\"0x4a5f5670041362e87ea267d81c55fc3edc1a78e81f6f17524b13267f91f31458\",\"license\":\"MIT\"},\"src/common/libs/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Bytes library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BytesLib {\\n /**\\n * @notice Converts bytes to address\\n * @param data data\\n * @return address\\n */\\n function toAddress(\\n bytes memory data\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result;\\n\\n require(\\n data.length == 20,\\n \\\"BytesLib: invalid data length\\\"\\n );\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := div(mload(add(data, 0x20)), 0x1000000000000000000000000)\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x64c84964ea91bfb1f2d859eea6c57fe5b4a6f269951a4adf5f58d306c54c7f76\",\"license\":\"MIT\"},\"src/common/libs/ECDSALib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ECDSA library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/cryptography/ECDSA.sol#L26\\n */\\nlibrary ECDSALib {\\n function recoverAddress(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n\\n if (v < 27) {\\n v += 27;\\n }\\n\\n if (v == 27 || v == 28) {\\n result = ecrecover(messageHash, v, r, s);\\n }\\n }\\n\\n return result;\\n }\\n\\n function toEthereumSignedMessageHash(\\n bytes32 messageHash\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n messageHash\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x3b1460d688302eb595268c2af147ab532f29dbced66520e013f48d498eed3cec\",\"license\":\"MIT\"},\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/common/signature/SignatureValidator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n/**\\n * @title Signature validator\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract SignatureValidator {\\n using ECDSALib for bytes32;\\n\\n uint256 public chainId;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {\\n uint256 chainId_;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n chainId_ := chainid()\\n }\\n\\n chainId = chainId_;\\n }\\n\\n // internal functions\\n\\n function _hashMessagePayload(\\n bytes32 messagePrefix,\\n bytes memory messagePayload\\n )\\n internal\\n view\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n chainId,\\n address(this),\\n messagePrefix,\\n messagePayload\\n )).toEthereumSignedMessageHash();\\n }\\n}\\n\",\"keccak256\":\"0xc1168f7ccb74aea67089941dc5e4c1d1c4aa766afca47a90c0b017b8445b8acf\",\"license\":\"MIT\"},\"src/ens/ENSController.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../common/access/Guarded.sol\\\";\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"../common/signature/SignatureValidator.sol\\\";\\nimport \\\"../gateway/GatewayRecipient.sol\\\";\\nimport \\\"./resolvers/ENSAddressResolver.sol\\\";\\nimport \\\"./resolvers/ENSNameResolver.sol\\\";\\nimport \\\"./resolvers/ENSPubKeyResolver.sol\\\";\\nimport \\\"./resolvers/ENSTextResolver.sol\\\";\\nimport \\\"./ENSRegistry.sol\\\";\\n\\n\\n/**\\n * @title ENS controller\\n *\\n * @notice ENS subnode registrar\\n *\\n * @dev The process of adding root node consists of 3 steps:\\n * 1. `submitNode` - should be called from ENS node owner,\\n * 2. Change ENS node owner in ENS registry to ENS controller,\\n * 3. `verifyNode` - should be called from previous ENS node owner,\\n *\\n * To register sub node, `msg.sender` need to send valid signature from one of guardian key.\\n * Once registration is complete `msg.sender` becoming both node owner and `addr` record value.\\n *\\n * After registration sub node cannot be replaced.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract ENSController is Guarded, Initializable, SignatureValidator, GatewayRecipient, ENSAddressResolver, ENSNameResolver, ENSPubKeyResolver, ENSTextResolver {\\n struct SubNodeRegistration {\\n address account;\\n bytes32 node;\\n bytes32 label;\\n }\\n\\n bytes4 private constant INTERFACE_META_ID = bytes4(keccak256(abi.encodePacked(\\\"supportsInterface(bytes4)\\\")));\\n\\n bytes32 private constant HASH_PREFIX_SUB_NODE_REGISTRATION = keccak256(\\n \\\"SubNodeRegistration(address account,bytes32 node,bytes32 label)\\\"\\n );\\n\\n ENSRegistry public registry;\\n\\n mapping(bytes32 => address) public nodeOwners;\\n\\n // events\\n\\n /**\\n * @dev Emitted when new node is submitted\\n * @param node node name hash\\n * @param owner owner address\\n */\\n event NodeSubmitted(\\n bytes32 node,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the existing owner is verified\\n * @param node node name hash\\n */\\n event NodeVerified(\\n bytes32 node\\n );\\n\\n /**\\n * @dev Emitted when new node is released\\n * @param node node name hash\\n * @param owner owner address\\n */\\n event NodeReleased(\\n bytes32 node,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when ENS registry address is changed\\n * @param registry registry address\\n */\\n event RegistryChanged(\\n address registry\\n );\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Guarded() Initializable() SignatureValidator() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `ENSController` contract\\n * @param registry_ ENS registry address\\n * @param gateway_ gateway address\\n */\\n function initialize(\\n ENSRegistry registry_,\\n address[] calldata guardians_,\\n address gateway_\\n )\\n external\\n onlyInitializer\\n {\\n require(\\n address(registry_) != address(0),\\n \\\"ENSController: cannot set 0x0 registry\\\"\\n );\\n\\n registry = registry_;\\n\\n // Guarded\\n _initializeGuarded(guardians_);\\n\\n // GatewayRecipient\\n _initializeGatewayRecipient(gateway_);\\n }\\n\\n /**\\n * @notice Sets registry\\n * @param registry_ registry address\\n */\\n function setRegistry(\\n ENSRegistry registry_\\n )\\n external\\n onlyGuardian\\n {\\n require(\\n address(registry_) != address(0),\\n \\\"ENSController: cannot set 0x0 registry\\\"\\n );\\n\\n require(\\n registry_ != registry,\\n \\\"ENSController: registry already set\\\"\\n );\\n\\n registry = registry_;\\n\\n emit RegistryChanged(\\n address(registry)\\n );\\n }\\n\\n /**\\n * @notice Submits node\\n * @dev Should be called from the current ENS node owner\\n * @param node node name hash\\n */\\n function submitNode(\\n bytes32 node\\n )\\n external\\n {\\n address owner = _getContextAccount();\\n\\n require(\\n _addr(node) == address(0),\\n \\\"ENSController: node already exists\\\"\\n );\\n\\n require(\\n nodeOwners[node] == address(0),\\n \\\"ENSController: node already submitted\\\"\\n );\\n\\n require(\\n registry.owner(node) == owner,\\n \\\"ENSController: invalid ens node owner\\\"\\n );\\n\\n nodeOwners[node] = owner;\\n\\n emit NodeSubmitted(node, owner);\\n }\\n\\n /**\\n * @notice Verifies node\\n * @dev Should be called from the previous ENS node owner\\n * @param node node name hash\\n */\\n function verifyNode(\\n bytes32 node\\n )\\n external\\n {\\n address owner = _getContextAccount();\\n\\n require(\\n _addr(node) == address(0),\\n \\\"ENSController: node already exists\\\"\\n );\\n\\n require(\\n nodeOwners[node] == owner,\\n \\\"ENSController: invalid node owner\\\"\\n );\\n\\n require(\\n registry.owner(node) == address(this),\\n \\\"ENSController: invalid ens node owner\\\"\\n );\\n\\n _setAddr(node, address(this));\\n\\n registry.setResolver(node, address(this));\\n\\n emit NodeVerified(node);\\n }\\n\\n /**\\n * @notice Releases node\\n * @dev Should be called from the previous ENS node owner\\n * @param node node name hash\\n */\\n function releaseNode(\\n bytes32 node\\n )\\n external\\n {\\n address owner = _getContextAccount();\\n\\n require(\\n _addr(node) == address(this),\\n \\\"ENSController: node doesn't exist\\\"\\n );\\n\\n require(\\n nodeOwners[node] == owner,\\n \\\"ENSController: invalid node owner\\\"\\n );\\n\\n registry.setOwner(node, owner);\\n\\n delete nodeOwners[node];\\n\\n emit NodeReleased(node, owner);\\n }\\n\\n /**\\n * @notice Sync address\\n * @param node node name hash\\n */\\n function syncAddr(\\n bytes32 node\\n )\\n external\\n {\\n address account = _getContextAccount();\\n\\n require(\\n account == registry.owner(node),\\n \\\"ENSController: caller is not the node owner\\\"\\n );\\n\\n require(\\n registry.resolver(node) == address(this),\\n \\\"ENSController: invalid node resolver\\\"\\n );\\n\\n require(\\n _addr(node) == address(0),\\n \\\"ENSController: node already in sync\\\"\\n );\\n\\n _setAddr(node, account);\\n }\\n\\n /**\\n * @notice Registers sub node\\n * @param node node name hash\\n * @param label label hash\\n * @param guardianSignature guardian signature\\n */\\n function registerSubNode(\\n bytes32 node,\\n bytes32 label,\\n bytes calldata guardianSignature\\n )\\n external\\n {\\n address account = _getContextAccount();\\n\\n bytes32 messageHash = _hashSubNodeRegistration(\\n account,\\n node,\\n label\\n );\\n\\n require(\\n _verifyGuardianSignature(messageHash, guardianSignature),\\n \\\"ENSController: invalid guardian signature\\\"\\n );\\n\\n bytes32 subNode = keccak256(\\n abi.encodePacked(\\n node,\\n label\\n )\\n );\\n\\n require(\\n _addr(node) == address(this),\\n \\\"ENSController: invalid node\\\"\\n );\\n\\n require(\\n _addr(subNode) == address(0),\\n \\\"ENSController: label already taken\\\"\\n );\\n\\n registry.setSubnodeRecord(node, label, address(this), address(this), 0);\\n registry.setOwner(subNode, account);\\n\\n _setAddr(subNode, account);\\n }\\n\\n // external functions (pure)\\n function supportsInterface(\\n bytes4 interfaceID\\n )\\n external\\n pure\\n returns(bool)\\n {\\n return interfaceID == INTERFACE_META_ID ||\\n interfaceID == INTERFACE_ADDR_ID ||\\n interfaceID == INTERFACE_ADDRESS_ID ||\\n interfaceID == INTERFACE_NAME_ID ||\\n interfaceID == INTERFACE_PUB_KEY_ID ||\\n interfaceID == INTERFACE_TEXT_ID;\\n }\\n\\n // public functions (views)\\n\\n /**\\n * @notice Hashes `SubNodeRegistration` message payload\\n * @param subNodeRegistration struct\\n * @return hash\\n */\\n function hashSubNodeRegistration(\\n SubNodeRegistration memory subNodeRegistration\\n )\\n public\\n view\\n returns (bytes32)\\n {\\n return _hashSubNodeRegistration(\\n subNodeRegistration.account,\\n subNodeRegistration.node,\\n subNodeRegistration.label\\n );\\n }\\n\\n // internal functions (views)\\n\\n function _isNodeOwner(\\n bytes32 node\\n )\\n internal\\n override\\n view\\n returns (bool)\\n {\\n return registry.owner(node) == _getContextAccount();\\n }\\n\\n // private functions (views)\\n\\n function _hashSubNodeRegistration(\\n address account,\\n bytes32 node,\\n bytes32 label\\n )\\n private\\n view\\n returns (bytes32)\\n {\\n return _hashMessagePayload(HASH_PREFIX_SUB_NODE_REGISTRATION, abi.encodePacked(\\n account,\\n node,\\n label\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x8006c066bef9625f3d103d77e8b66ff5f006187586cd4518676e73c5d3f79957\",\"license\":\"MIT\"},\"src/ens/ENSRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ENS registry\\n *\\n * @dev Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ENSRegistry.sol\\n */\\ncontract ENSRegistry {\\n struct Record {\\n address owner;\\n address resolver;\\n uint64 ttl;\\n }\\n\\n mapping (bytes32 => Record) private records;\\n mapping (address => mapping(address => bool)) private operators;\\n\\n // events\\n\\n event NewOwner(\\n bytes32 indexed node,\\n bytes32 indexed label,\\n address owner\\n );\\n\\n event Transfer(\\n bytes32 indexed node,\\n address owner\\n );\\n\\n event NewResolver(\\n bytes32 indexed node,\\n address resolver\\n );\\n\\n event NewTTL(\\n bytes32 indexed node,\\n uint64 ttl\\n );\\n\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n // modifiers\\n\\n modifier authorised(\\n bytes32 node\\n )\\n {\\n address owner = records[node].owner;\\n\\n require(\\n owner == msg.sender || operators[owner][msg.sender],\\n \\\"ENSRegistry: reverted by authorised modifier\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor()\\n public\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n records[0x0].owner = tx.origin;\\n }\\n\\n // external functions\\n\\n function setRecord(\\n bytes32 node,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n setOwner(node, owner_);\\n\\n _setResolverAndTTL(node, resolver_, ttl_);\\n }\\n\\n function setTTL(\\n bytes32 node,\\n uint64 ttl_\\n )\\n external\\n authorised(node)\\n {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n bytes32 subNode = setSubnodeOwner(node, label, owner_);\\n\\n _setResolverAndTTL(subNode, resolver_, ttl_);\\n }\\n\\n function setApprovalForAll(\\n address operator,\\n bool approved\\n )\\n external\\n {\\n operators[msg.sender][operator] = approved;\\n\\n emit ApprovalForAll(\\n msg.sender,\\n operator,\\n approved\\n );\\n }\\n\\n // external functions (views)\\n\\n function owner(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n address addr = records[node].owner;\\n\\n if (addr == address(this)) {\\n return address(0x0);\\n }\\n\\n return addr;\\n }\\n\\n function resolver(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n return records[node].resolver;\\n }\\n\\n function ttl(\\n bytes32 node\\n )\\n external\\n view\\n returns (uint64)\\n {\\n return records[node].ttl;\\n }\\n\\n function recordExists(\\n bytes32 node\\n )\\n external\\n view\\n returns (bool)\\n {\\n return records[node].owner != address(0x0);\\n }\\n\\n function isApprovedForAll(\\n address owner_,\\n address operator\\n )\\n external\\n view\\n returns (bool)\\n {\\n return operators[owner_][operator];\\n }\\n\\n // public functions\\n\\n function setOwner(\\n bytes32 node,\\n address owner_\\n )\\n public\\n authorised(node)\\n {\\n records[node].owner = owner_;\\n\\n emit Transfer(node, owner_);\\n }\\n\\n function setResolver(\\n bytes32 node,\\n address resolver_\\n )\\n public\\n authorised(node)\\n {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner_\\n )\\n public\\n authorised(node)\\n returns(bytes32)\\n {\\n bytes32 subNode = keccak256(abi.encodePacked(node, label));\\n\\n records[subNode].owner = owner_;\\n\\n emit NewOwner(node, label, owner_);\\n\\n return subNode;\\n }\\n\\n // private functions\\n\\n function _setResolverAndTTL(\\n bytes32 node,\\n address resolver_,\\n uint64 ttl_\\n )\\n private\\n {\\n if (resolver_ != records[node].resolver) {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n if (ttl_ != records[node].ttl) {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe00dbdea09d17d41c2c14266e6e1b6b95938c0d374b266bb44a91cfcf0495612\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSAbstractResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ENS abstract resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/ResolverBase.sol\\n */\\nabstract contract ENSAbstractResolver {\\n // modifiers\\n\\n modifier onlyNodeOwner(bytes32 node)\\n {\\n require(\\n _isNodeOwner(node),\\n \\\"ENSAbstractResolver: reverted by onlyNodeOwner modifier\\\"\\n );\\n\\n _;\\n }\\n\\n // internal functions (views)\\n\\n function _isNodeOwner(\\n bytes32 node\\n )\\n internal\\n virtual\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xc67d8bdd4904684e5d3388f7ca7d18c7d407058d6b548d8c591404c758a1ac60\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSAddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./ENSAbstractResolver.sol\\\";\\n\\n\\n/**\\n * @title ENS abstract address resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/AddrResolver.sol\\n */\\nabstract contract ENSAddressResolver is ENSAbstractResolver {\\n bytes4 internal constant INTERFACE_ADDR_ID = bytes4(keccak256(abi.encodePacked(\\\"addr(bytes32)\\\")));\\n bytes4 internal constant INTERFACE_ADDRESS_ID = bytes4(keccak256(abi.encodePacked(\\\"addr(bytes32,uint)\\\")));\\n\\n uint internal constant COIN_TYPE_ETH = 60;\\n\\n mapping(bytes32 => mapping(uint => bytes)) internal resolverAddresses;\\n\\n // events\\n\\n event AddrChanged(\\n bytes32 indexed node,\\n address addr\\n );\\n\\n event AddressChanged(\\n bytes32 indexed node,\\n uint coinType,\\n bytes newAddress\\n );\\n\\n // external functions\\n\\n function setAddr(\\n bytes32 node,\\n address addr_\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n _setAddr(node, addr_);\\n }\\n\\n function setAddr(\\n bytes32 node,\\n uint coinType,\\n bytes memory addr_\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n _setAddr(node, coinType, addr_);\\n }\\n\\n // external functions (views)\\n\\n function addr(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n return _addr(node);\\n }\\n\\n function addr(\\n bytes32 node,\\n uint coinType\\n )\\n external\\n view\\n returns (bytes memory)\\n {\\n return resolverAddresses[node][coinType];\\n }\\n\\n // internal functions\\n\\n function _setAddr(\\n bytes32 node,\\n address addr_\\n )\\n internal\\n {\\n _setAddr(node, COIN_TYPE_ETH, _addressToBytes(addr_));\\n }\\n\\n function _setAddr(\\n bytes32 node,\\n uint coinType,\\n bytes memory addr_\\n )\\n internal\\n {\\n emit AddressChanged(node, coinType, addr_);\\n\\n if(coinType == COIN_TYPE_ETH) {\\n emit AddrChanged(node, _bytesToAddress(addr_));\\n }\\n\\n resolverAddresses[node][coinType] = addr_;\\n }\\n\\n // internal functions (views)\\n\\n function _addr(\\n bytes32 node\\n )\\n internal\\n view\\n returns (address)\\n {\\n address result;\\n\\n bytes memory addr_ = resolverAddresses[node][COIN_TYPE_ETH];\\n\\n if (addr_.length > 0) {\\n result = _bytesToAddress(addr_);\\n }\\n\\n return result;\\n }\\n\\n // private function (pure)\\n\\n function _bytesToAddress(\\n bytes memory data\\n )\\n private\\n pure\\n returns(address payable)\\n {\\n address payable result;\\n\\n require(data.length == 20);\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := div(mload(add(data, 32)), exp(256, 12))\\n }\\n\\n return result;\\n }\\n\\n function _addressToBytes(\\n address addr_\\n )\\n private\\n pure\\n returns(bytes memory)\\n {\\n bytes memory result = new bytes(20);\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n mstore(add(result, 32), mul(addr_, exp(256, 12)))\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xd2f0c5ed5f5058755512c0916496da6bcf4cf18a0026ee8d20b4306656ce5142\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSNameResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./ENSAbstractResolver.sol\\\";\\n\\n\\n/**\\n * @title ENS abstract name resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/NameResolver.sol\\n */\\nabstract contract ENSNameResolver is ENSAbstractResolver {\\n bytes4 internal constant INTERFACE_NAME_ID = bytes4(keccak256(abi.encodePacked(\\\"name(bytes32)\\\")));\\n\\n mapping(bytes32 => string) internal resolverNames;\\n\\n // events\\n\\n event NameChanged(\\n bytes32 indexed node,\\n string name\\n );\\n\\n // external functions\\n\\n function setName(\\n bytes32 node,\\n string calldata name\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n resolverNames[node] = name;\\n\\n emit NameChanged(node, name);\\n }\\n\\n // external functions (views)\\n\\n function name(\\n bytes32 node\\n )\\n external\\n view\\n returns (string memory)\\n {\\n return resolverNames[node];\\n }\\n}\\n\",\"keccak256\":\"0x1d2d4b21f59225fbefe0e5aaff87aff8f11afe5281745934d595e15770557ead\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSPubKeyResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./ENSAbstractResolver.sol\\\";\\n\\n\\n/**\\n * @title ENS abstract pub key resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/PubkeyResolver.sol\\n */\\nabstract contract ENSPubKeyResolver is ENSAbstractResolver {\\n bytes4 internal constant INTERFACE_PUB_KEY_ID = bytes4(keccak256(abi.encodePacked(\\\"pubkey(bytes32)\\\")));\\n\\n struct PubKey {\\n bytes32 x;\\n bytes32 y;\\n }\\n\\n mapping(bytes32 => PubKey) internal resolverPubKeys;\\n\\n // events\\n\\n event PubkeyChanged(\\n bytes32 indexed node,\\n bytes32 x,\\n bytes32 y\\n );\\n\\n // external functions (views)\\n\\n function setPubkey(\\n bytes32 node,\\n bytes32 x,\\n bytes32 y\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n resolverPubKeys[node] = PubKey(x, y);\\n\\n emit PubkeyChanged(node, x, y);\\n }\\n\\n // external functions (views)\\n\\n function pubkey(\\n bytes32 node\\n )\\n external\\n view\\n returns (bytes32 x, bytes32 y)\\n {\\n return (resolverPubKeys[node].x, resolverPubKeys[node].y);\\n }\\n}\\n\",\"keccak256\":\"0x763a3403ded734b7fa9141c270a0aaaf4a3f1322ff4b197e51ed70adfbaf1fa1\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSTextResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./ENSAbstractResolver.sol\\\";\\n\\n\\n/**\\n * @title ENS abstract text resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/TextResolver.sol\\n */\\nabstract contract ENSTextResolver is ENSAbstractResolver {\\n bytes4 internal constant INTERFACE_TEXT_ID = bytes4(keccak256(abi.encodePacked(\\\"text(bytes32,string)\\\")));\\n\\n mapping(bytes32 => mapping(string => string)) internal resolverTexts;\\n\\n // events\\n\\n event TextChanged(\\n bytes32 indexed node,\\n string indexed indexedKey,\\n string key\\n );\\n\\n // external functions (views)\\n\\n function setText(\\n bytes32 node,\\n string calldata key,\\n string calldata value\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n resolverTexts[node][key] = value;\\n\\n emit TextChanged(node, key, key);\\n }\\n\\n // external functions (views)\\n\\n function text(\\n bytes32 node,\\n string calldata key\\n )\\n external\\n view\\n returns (string memory)\\n {\\n return resolverTexts[node][key];\\n }\\n}\\n\",\"keccak256\":\"0x6d13447ff9aa753320b3a93ba0b8a2cbb43385711d51e00809cfb9201136cff7\",\"license\":\"MIT\"},\"src/gateway/GatewayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BytesLib.sol\\\";\\n\\n\\n/**\\n * @title Gateway recipient\\n *\\n * @notice Gateway target contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract GatewayRecipient {\\n using BytesLib for bytes;\\n\\n address public gateway;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `GatewayRecipient` contract\\n * @param gateway_ `Gateway` contract address\\n */\\n function _initializeGatewayRecipient(\\n address gateway_\\n )\\n internal\\n {\\n gateway = gateway_;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Gets gateway context account\\n * @return context account address\\n */\\n function _getContextAccount()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(40);\\n }\\n\\n /**\\n * @notice Gets gateway context sender\\n * @return context sender address\\n */\\n function _getContextSender()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(20);\\n }\\n\\n /**\\n * @notice Gets gateway context data\\n * @return context data\\n */\\n function _getContextData()\\n internal\\n view\\n returns (bytes calldata)\\n {\\n bytes calldata result;\\n\\n if (_isGatewaySender()) {\\n result = msg.data[:msg.data.length - 40];\\n } else {\\n result = msg.data;\\n }\\n\\n return result;\\n }\\n\\n // private functions (views)\\n\\n function _getContextAddress(\\n uint256 offset\\n )\\n private\\n view\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (_isGatewaySender()) {\\n uint from = msg.data.length - offset;\\n result = bytes(msg.data[from:from + 20]).toAddress();\\n } else {\\n result = msg.sender;\\n }\\n\\n return result;\\n }\\n\\n function _isGatewaySender()\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (msg.sender == gateway) {\\n require(\\n msg.data.length >= 44,\\n \\\"GatewayRecipient: invalid msg.data\\\"\\n );\\n\\n result = true;\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe3fd29479d748d67360c61a9cbaafc66eaca25f476e59a45e842472bcf5233fc\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5032600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600046905080600281905550506149798061006e6000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806371404156116100f9578063a91ee0dc11610097578063d0f710d611610071578063d0f710d614610512578063d5fa2b0014610542578063dc5b68a61461055e578063f1cb7e061461057a576101c4565b8063a91ee0dc146104a9578063c8690233146104c5578063c8cc2aee146104f6576101c4565b80637d0e0e7e116100d35780637d0e0e7e146104375780638b95dd71146104535780639a8a05921461046f578063a526d83b1461048d576101c4565b806371404156146103e157806377372213146103fd5780637b10399914610419576101c4565b8063392e53cd1161016657806355800f871161014057806355800f871461033557806359d1d43c14610351578063691f3431146103815780636df0cf42146103b1576101c4565b8063392e53cd146102cb5780633b3b57de146102e957806346386f7314610319576101c4565b8063116191b6116101a2578063116191b6146102455780631b3cd1421461026357806329ae6a7e1461029357806329cd62ea146102af576101c4565b806301ffc9a7146101c95780630c68ba21146101f957806310f13a8c14610229575b600080fd5b6101e360048036038101906101de91906133b4565b6105aa565b6040516101f091906141bc565b60405180910390f35b610213600480360381019061020e9190613066565b610834565b60405161022091906141bc565b60405180910390f35b610243600480360381019061023e9190613288565b610889565b005b61024d61096d565b60405161025a919061415d565b60405180910390f35b61027d600480360381019061027891906130b8565b610993565b60405161028a919061415d565b60405180910390f35b6102ad60048036038101906102a891906130b8565b6109c6565b005b6102c960048036038101906102c4919061311d565b610beb565b005b6102d3610cb3565b6040516102e091906141bc565b60405180910390f35b61030360048036038101906102fe91906130b8565b610d0b565b604051610310919061415d565b60405180910390f35b610333600480360381019061032e919061316c565b610d1d565b005b61034f600480360381019061034a91906130b8565b611017565b005b61036b60048036038101906103669190613230565b6112d8565b604051610378919061433d565b60405180910390f35b61039b600480360381019061039691906130b8565b6113ad565b6040516103a8919061433d565b60405180910390f35b6103cb60048036038101906103c69190613472565b611462565b6040516103d891906141d7565b60405180910390f35b6103fb60048036038101906103f69190613066565b611482565b005b61041760048036038101906104129190613230565b61169a565b005b610421611746565b60405161042e91906142fe565b60405180910390f35b610451600480360381019061044c91906130b8565b61176c565b005b61046d6004803603810190610468919061334d565b611a38565b005b610477611a92565b604051610484919061461f565b60405180910390f35b6104a760048036038101906104a29190613066565b611a98565b005b6104c360048036038101906104be91906133dd565b611b2f565b005b6104df60048036038101906104da91906130b8565b611d58565b6040516104ed92919061421b565b60405180910390f35b610510600480360381019061050b91906130b8565b611d92565b005b61052c600480360381019061052791906131d8565b6120a2565b60405161053991906141bc565b60405180910390f35b61055c600480360381019061055791906130e1565b6120fb565b005b61057860048036038101906105739190613406565b612153565b005b610594600480360381019061058f9190613311565b612366565b6040516105a191906142dc565b60405180910390f35b60006040516020016105bb9061406f565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061067d5750604051602001610626906140aa565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806106e95750604051602001610692906140fe565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061075557506040516020016106fe906140d4565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806107c1575060405160200161076a906140e9565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061082d57506040516020016107d6906140bf565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b846108938161242d565b6108d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c9906145df565b60405180910390fd5b82826007600089815260200190815260200160002087876040516108f7929190614056565b90815260200160405180910390209190610912929190612d39565b508484604051610923929190614056565b6040518091039020867fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a7550878760405161095d929190614319565b60405180910390a3505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60096020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006109d0612516565b90503073ffffffffffffffffffffffffffffffffffffffff166109f283612527565b73ffffffffffffffffffffffffffffffffffffffff1614610a48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3f9061443f565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ae9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae09061437f565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b0fc9c383836040518363ffffffff1660e01b8152600401610b469291906141f2565b600060405180830381600087803b158015610b6057600080fd5b505af1158015610b74573d6000803e3d6000fd5b505050506009600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f7803a16d95f9ca635bdec561006625e7444d8a9f8463866643cc03af011779d38282604051610bdf9291906141f2565b60405180910390a15050565b82610bf58161242d565b610c34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2b906145df565b60405180910390fd5b604051806040016040528084815260200183815250600660008681526020019081526020016000206000820151816000015560208201518160010155905050837f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e468484604051610ca592919061421b565b60405180910390a250505050565b60008073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b6000610d1682612527565b9050919050565b6000610d27612516565b90506000610d3682878761260c565b9050610d868185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612664565b610dc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dbc9061439f565b60405180910390fd5b60008686604051602001610dda92919061402a565b6040516020818303038152906040528051906020012090503073ffffffffffffffffffffffffffffffffffffffff16610e1288612527565b73ffffffffffffffffffffffffffffffffffffffff1614610e68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5f9061441f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16610e8982612527565b73ffffffffffffffffffffffffffffffffffffffff1614610edf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed6906143bf565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635ef2c7f08888303060006040518663ffffffff1660e01b8152600401610f43959493929190614244565b600060405180830381600087803b158015610f5d57600080fd5b505af1158015610f71573d6000803e3d6000fd5b50505050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b0fc9c382856040518363ffffffff1660e01b8152600401610fd29291906141f2565b600060405180830381600087803b158015610fec57600080fd5b505af1158015611000573d6000803e3d6000fd5b5050505061100e81846126d1565b50505050505050565b6000611021612516565b9050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff1660e01b815260040161107e91906141d7565b60206040518083038186803b15801561109657600080fd5b505afa1580156110aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ce919061308f565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461113b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111329061447f565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf846040518263ffffffff1660e01b81526004016111ad91906141d7565b60206040518083038186803b1580156111c557600080fd5b505afa1580156111d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fd919061308f565b73ffffffffffffffffffffffffffffffffffffffff1614611253576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124a9061435f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1661127483612527565b73ffffffffffffffffffffffffffffffffffffffff16146112ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c19061451f565b60405180910390fd5b6112d482826126d1565b5050565b60606007600085815260200190815260200160002083836040516112fd929190614056565b90815260200160405180910390208054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561139f5780601f106113745761010080835404028352916020019161139f565b820191906000526020600020905b81548152906001019060200180831161138257829003601f168201915b505050505090509392505050565b6060600560008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156114565780601f1061142b57610100808354040283529160200191611456565b820191906000526020600020905b81548152906001019060200180831161143957829003601f168201915b50505050509050919050565b600061147b82600001518360200151846040015161260c565b9050919050565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661150d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115049061449f565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16141561157c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115739061459f565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611607576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fe9061453f565b60405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b328260405161168f929190614193565b60405180910390a150565b826116a48161242d565b6116e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116da906145df565b60405180910390fd5b8282600560008781526020019081526020016000209190611705929190612d39565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f78484604051611738929190614319565b60405180910390a250505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611776612516565b9050600073ffffffffffffffffffffffffffffffffffffffff1661179983612527565b73ffffffffffffffffffffffffffffffffffffffff16146117ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e6906144ff565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611891576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611888906144df565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b815260040161190391906141d7565b60206040518083038186803b15801561191b57600080fd5b505afa15801561192f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611953919061308f565b73ffffffffffffffffffffffffffffffffffffffff16146119a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a09061455f565b60405180910390fd5b806009600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fc1e082a8c26f27c26e1bf5d0ce7ddd579ec7f6d7eb3ea90d8abd6c40991bae368282604051611a2c9291906141f2565b60405180910390a15050565b82611a428161242d565b611a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a78906145df565b60405180910390fd5b611a8c8484846126e9565b50505050565b60025481565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611b23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b1a9061449f565b60405180910390fd5b611b2c816127ab565b50565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611bba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb19061449f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611c2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c21906144bf565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611cbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cb2906145ff565b60405180910390fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdb0239c63d4033dcdd21bd44f8dd479a03efbae12f6bbe27c0a5f923d26514cc600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051611d4d919061415d565b60405180910390a150565b6000806006600084815260200190815260200160002060000154600660008581526020019081526020016000206001015491509150915091565b6000611d9c612516565b9050600073ffffffffffffffffffffffffffffffffffffffff16611dbf83612527565b73ffffffffffffffffffffffffffffffffffffffff1614611e15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e0c906144ff565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611eb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ead9061437f565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b8152600401611f2891906141d7565b60206040518083038186803b158015611f4057600080fd5b505afa158015611f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f78919061308f565b73ffffffffffffffffffffffffffffffffffffffff1614611fce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fc59061455f565b60405180910390fd5b611fd882306126d1565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a83306040518363ffffffff1660e01b81526004016120359291906141f2565b600060405180830381600087803b15801561204f57600080fd5b505af1158015612063573d6000803e3d6000fd5b505050507fcefbe9dbadcf675eef14e23810996ff38541fc26b4dd77cd6724b0eedc96f2008260405161209691906141d7565b60405180910390a15050565b60006120f28484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612664565b90509392505050565b816121058161242d565b612144576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161213b906145df565b60405180910390fd5b61214e83836126d1565b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146121e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121da906143ff565b60405180910390fd5b6000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612295576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228c906144bf565b60405180910390fd5b83600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612320838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061293a565b61232981612992565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516123589190614178565b60405180910390a150505050565b60606004600084815260200190815260200160002060008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124205780601f106123f557610100808354040283529160200191612420565b820191906000526020600020905b81548152906001019060200180831161240357829003601f168201915b5050505050905092915050565b6000612437612516565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004016124a891906141d7565b60206040518083038186803b1580156124c057600080fd5b505afa1580156124d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f8919061308f565b73ffffffffffffffffffffffffffffffffffffffff16149050919050565b600061252260286129d6565b905090565b6000806060600460008581526020019081526020016000206000603c81526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125e55780601f106125ba576101008083540402835291602001916125e5565b820191906000526020600020905b8154815290600101906020018083116125c857829003601f168201915b50505050509050600081511115612602576125ff81612a6b565b91505b8192505050919050565b600061265b7f621363c539a3aa1024c8837ca1dc095db03b7f9512b3a95ecb429aae7fd953ed85858560405160200161264793929190613fed565b604051602081830303815290604052612a93565b90509392505050565b60008061267a8385612ad490919063ffffffff16565b90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b6126e582603c6126e084612b8f565b6126e9565b5050565b827f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af752838360405161271b92919061463a565b60405180910390a2603c82141561276d57827f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd261275783612a6b565b6040516127649190614178565b60405180910390a25b8060046000858152602001908152602001600020600084815260200190815260200160002090805190602001906127a5929190612db9565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561281b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612812906143df565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156128a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161289e9061457f565b60405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a328260405161292f929190614193565b60405180910390a150565b6000815114156129525761294d326127ab565b61298f565b60008151905060005b8181101561298c5761297f83828151811061297257fe5b60200260200101516127ab565b808060010191505061295b565b50505b50565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600090506129e5612bf6565b15612a5e576000836000369050039050612a5660003683906014850192612a0e93929190614711565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612ca3565b915050612a62565b3390505b80915050919050565b6000806014835114612a7c57600080fd5b600c6101000a602084015104905080915050919050565b6000612acc600254308585604051602001612ab19493929190614113565b60405160208183030381529060405280519060200120612d09565b905092915050565b60008060009050604183511415612b855760008060006020860151925060408601519150606086015160001a9050601b8160ff161015612b1557601b810190505b601b8160ff161480612b2a5750601c8160ff16145b15612b815760018782858560405160008152602001604052604051612b529493929190614297565b6020604051602081039080840390855afa158015612b74573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b606080601467ffffffffffffffff81118015612baa57600080fd5b506040519080825280601f01601f191660200182016040528015612bdd5781602001600182028036833780820191505090505b509050600c6101000a8302602082015280915050919050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415612c9c57602c60003690501015612c97576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c8e9061445f565b60405180910390fd5b600190505b8091505090565b6000806014835114612cea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ce1906145bf565b60405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b600081604051602001612d1c9190614084565b604051602081830303815290604052805190602001209050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612d7a57803560ff1916838001178555612da8565b82800160010185558215612da8579182015b82811115612da7578235825591602001919060010190612d8c565b5b509050612db59190612e39565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612dfa57805160ff1916838001178555612e28565b82800160010185558215612e28579182015b82811115612e27578251825591602001919060010190612e0c565b5b509050612e359190612e39565b5090565b5b80821115612e52576000816000905550600101612e3a565b5090565b600081359050612e65816148f9565b92915050565b600081519050612e7a816148f9565b92915050565b60008083601f840112612e9257600080fd5b8235905067ffffffffffffffff811115612eab57600080fd5b602083019150836020820283011115612ec357600080fd5b9250929050565b600081359050612ed981614910565b92915050565b600081359050612eee81614927565b92915050565b60008083601f840112612f0657600080fd5b8235905067ffffffffffffffff811115612f1f57600080fd5b602083019150836001820283011115612f3757600080fd5b9250929050565b600082601f830112612f4f57600080fd5b8135612f62612f5d82614697565b61466a565b91508082526020830160208301858383011115612f7e57600080fd5b612f89838284614861565b50505092915050565b600081359050612fa18161493e565b92915050565b60008083601f840112612fb957600080fd5b8235905067ffffffffffffffff811115612fd257600080fd5b602083019150836001820283011115612fea57600080fd5b9250929050565b60006060828403121561300357600080fd5b61300d606061466a565b9050600061301d84828501612e56565b600083015250602061303184828501612eca565b602083015250604061304584828501612eca565b60408301525092915050565b60008135905061306081614955565b92915050565b60006020828403121561307857600080fd5b600061308684828501612e56565b91505092915050565b6000602082840312156130a157600080fd5b60006130af84828501612e6b565b91505092915050565b6000602082840312156130ca57600080fd5b60006130d884828501612eca565b91505092915050565b600080604083850312156130f457600080fd5b600061310285828601612eca565b925050602061311385828601612e56565b9150509250929050565b60008060006060848603121561313257600080fd5b600061314086828701612eca565b935050602061315186828701612eca565b925050604061316286828701612eca565b9150509250925092565b6000806000806060858703121561318257600080fd5b600061319087828801612eca565b94505060206131a187828801612eca565b935050604085013567ffffffffffffffff8111156131be57600080fd5b6131ca87828801612ef4565b925092505092959194509250565b6000806000604084860312156131ed57600080fd5b60006131fb86828701612eca565b935050602084013567ffffffffffffffff81111561321857600080fd5b61322486828701612ef4565b92509250509250925092565b60008060006040848603121561324557600080fd5b600061325386828701612eca565b935050602084013567ffffffffffffffff81111561327057600080fd5b61327c86828701612fa7565b92509250509250925092565b6000806000806000606086880312156132a057600080fd5b60006132ae88828901612eca565b955050602086013567ffffffffffffffff8111156132cb57600080fd5b6132d788828901612fa7565b9450945050604086013567ffffffffffffffff8111156132f657600080fd5b61330288828901612fa7565b92509250509295509295909350565b6000806040838503121561332457600080fd5b600061333285828601612eca565b925050602061334385828601613051565b9150509250929050565b60008060006060848603121561336257600080fd5b600061337086828701612eca565b935050602061338186828701613051565b925050604084013567ffffffffffffffff81111561339e57600080fd5b6133aa86828701612f3e565b9150509250925092565b6000602082840312156133c657600080fd5b60006133d484828501612edf565b91505092915050565b6000602082840312156133ef57600080fd5b60006133fd84828501612f92565b91505092915050565b6000806000806060858703121561341c57600080fd5b600061342a87828801612f92565b945050602085013567ffffffffffffffff81111561344757600080fd5b61345387828801612e80565b9350935050604061346687828801612e56565b91505092959194509250565b60006060828403121561348457600080fd5b600061349284828501612ff1565b91505092915050565b6134a4816147f5565b82525050565b6134b381614744565b82525050565b6134ca6134c582614744565b6148a3565b82525050565b6134d981614756565b82525050565b6134e881614762565b82525050565b6134ff6134fa82614762565b6148b5565b82525050565b6000613510826146c3565b61351a81856146d9565b935061352a818560208601614870565b613533816148db565b840191505092915050565b6000613549826146c3565b61355381856146ea565b9350613563818560208601614870565b80840191505092915050565b61357881614807565b82525050565b6135878161482b565b82525050565b600061359983856146f5565b93506135a6838584614861565b6135af836148db565b840190509392505050565b60006135c68385614706565b93506135d3838584614861565b82840190509392505050565b60006135ea826146ce565b6135f481856146f5565b9350613604818560208601614870565b61360d816148db565b840191505092915050565b6000613625601983614706565b91507f737570706f727473496e746572666163652862797465733429000000000000006000830152601982019050919050565b60006136656024836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f6465207265736f60008301527f6c766572000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006136cb6021836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f6465206f776e6560008301527f72000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006137316029836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c696420677561726469616e2060008301527f7369676e617475726500000000000000000000000000000000000000000000006020830152604082019050919050565b60006137976022836146f5565b91507f454e53436f6e74726f6c6c65723a206c6162656c20616c72656164792074616b60008301527f656e0000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006137fd601c83614706565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b600061383d6020836146f5565b91507f477561726465643a2063616e6e6f74206164642030783020677561726469616e6000830152602082019050919050565b600061387d602f836146f5565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b60006138e3600d83614706565b91507f61646472286279746573333229000000000000000000000000000000000000006000830152600d82019050919050565b6000613923601b836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f646500000000006000830152602082019050919050565b60006139636021836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520646f65736e2774206578697360008301527f74000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006139c96022836146f5565b91507f47617465776179526563697069656e743a20696e76616c6964206d73672e646160008301527f74610000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613a2f601483614706565b91507f7465787428627974657333322c737472696e67290000000000000000000000006000830152601482019050919050565b6000613a6f600d83614706565b91507f6e616d65286279746573333229000000000000000000000000000000000000006000830152600d82019050919050565b6000613aaf602b836146f5565b91507f454e53436f6e74726f6c6c65723a2063616c6c6572206973206e6f742074686560008301527f206e6f6465206f776e65720000000000000000000000000000000000000000006020830152604082019050919050565b6000613b156026836146f5565b91507f477561726465643a2074782e6f726967696e206973206e6f742074686520677560008301527f61726469616e00000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613b7b6026836146f5565b91507f454e53436f6e74726f6c6c65723a2063616e6e6f74207365742030783020726560008301527f67697374727900000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613be16025836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c7265616479207375626d60008301527f69747465640000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613c47600f83614706565b91507f7075626b657928627974657333322900000000000000000000000000000000006000830152600f82019050919050565b6000613c876022836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c7265616479206578697360008301527f74730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613ced6023836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c726561647920696e207360008301527f796e6300000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613d53601f836146f5565b91507f477561726465643a20677561726469616e20646f65736e2774206578697374006000830152602082019050919050565b6000613d936025836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c696420656e73206e6f64652060008301527f6f776e65720000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613df96020836146f5565b91507f477561726465643a20677561726469616e20616c7265616479206578697374736000830152602082019050919050565b6000613e39601b836146f5565b91507f477561726465643a2063616e6e6f742072656d6f76652073656c6600000000006000830152602082019050919050565b6000613e79601d836146f5565b91507f42797465734c69623a20696e76616c69642064617461206c656e6774680000006000830152602082019050919050565b6000613eb96037836146f5565b91507f454e5341627374726163745265736f6c7665723a20726576657274656420627960008301527f206f6e6c794e6f64654f776e6572206d6f6469666965720000000000000000006020830152604082019050919050565b6000613f1f601283614706565b91507f6164647228627974657333322c75696e742900000000000000000000000000006000830152601282019050919050565b6000613f5f6023836146f5565b91507f454e53436f6e74726f6c6c65723a20726567697374727920616c72656164792060008301527f73657400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b613fc1816147ca565b82525050565b613fd8613fd3826147ca565b6148d1565b82525050565b613fe7816147e8565b82525050565b6000613ff982866134b9565b60148201915061400982856134ee565b60208201915061401982846134ee565b602082019150819050949350505050565b600061403682856134ee565b60208201915061404682846134ee565b6020820191508190509392505050565b60006140638284866135ba565b91508190509392505050565b600061407a82613618565b9150819050919050565b600061408f826137f0565b915061409b82846134ee565b60208201915081905092915050565b60006140b5826138d6565b9150819050919050565b60006140ca82613a22565b9150819050919050565b60006140df82613a62565b9150819050919050565b60006140f482613c3a565b9150819050919050565b600061410982613f12565b9150819050919050565b600061411f8287613fc7565b60208201915061412f82866134b9565b60148201915061413f82856134ee565b60208201915061414f828461353e565b915081905095945050505050565b600060208201905061417260008301846134aa565b92915050565b600060208201905061418d600083018461349b565b92915050565b60006040820190506141a8600083018561349b565b6141b560208301846134aa565b9392505050565b60006020820190506141d160008301846134d0565b92915050565b60006020820190506141ec60008301846134df565b92915050565b600060408201905061420760008301856134df565b61421460208301846134aa565b9392505050565b600060408201905061423060008301856134df565b61423d60208301846134df565b9392505050565b600060a08201905061425960008301886134df565b61426660208301876134df565b61427360408301866134aa565b61428060608301856134aa565b61428d608083018461357e565b9695505050505050565b60006080820190506142ac60008301876134df565b6142b96020830186613fde565b6142c660408301856134df565b6142d360608301846134df565b95945050505050565b600060208201905081810360008301526142f68184613505565b905092915050565b6000602082019050614313600083018461356f565b92915050565b6000602082019050818103600083015261433481848661358d565b90509392505050565b6000602082019050818103600083015261435781846135df565b905092915050565b6000602082019050818103600083015261437881613658565b9050919050565b60006020820190508181036000830152614398816136be565b9050919050565b600060208201905081810360008301526143b881613724565b9050919050565b600060208201905081810360008301526143d88161378a565b9050919050565b600060208201905081810360008301526143f881613830565b9050919050565b6000602082019050818103600083015261441881613870565b9050919050565b6000602082019050818103600083015261443881613916565b9050919050565b6000602082019050818103600083015261445881613956565b9050919050565b60006020820190508181036000830152614478816139bc565b9050919050565b6000602082019050818103600083015261449881613aa2565b9050919050565b600060208201905081810360008301526144b881613b08565b9050919050565b600060208201905081810360008301526144d881613b6e565b9050919050565b600060208201905081810360008301526144f881613bd4565b9050919050565b6000602082019050818103600083015261451881613c7a565b9050919050565b6000602082019050818103600083015261453881613ce0565b9050919050565b6000602082019050818103600083015261455881613d46565b9050919050565b6000602082019050818103600083015261457881613d86565b9050919050565b6000602082019050818103600083015261459881613dec565b9050919050565b600060208201905081810360008301526145b881613e2c565b9050919050565b600060208201905081810360008301526145d881613e6c565b9050919050565b600060208201905081810360008301526145f881613eac565b9050919050565b6000602082019050818103600083015261461881613f52565b9050919050565b60006020820190506146346000830184613fb8565b92915050565b600060408201905061464f6000830185613fb8565b81810360208301526146618184613505565b90509392505050565b6000604051905081810181811067ffffffffffffffff8211171561468d57600080fd5b8060405250919050565b600067ffffffffffffffff8211156146ae57600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000808585111561472157600080fd5b8386111561472e57600080fd5b6001850283019150848603905094509492505050565b600061474f826147aa565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006147a382614744565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b60006148008261483d565b9050919050565b600061481282614819565b9050919050565b6000614824826147aa565b9050919050565b6000614836826147d4565b9050919050565b60006148488261484f565b9050919050565b600061485a826147aa565b9050919050565b82818337600083830152505050565b60005b8381101561488e578082015181840152602081019050614873565b8381111561489d576000848401525b50505050565b60006148ae826148bf565b9050919050565b6000819050919050565b60006148ca826148ec565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61490281614744565b811461490d57600080fd5b50565b61491981614762565b811461492457600080fd5b50565b6149308161476c565b811461493b57600080fd5b50565b61494781614798565b811461495257600080fd5b50565b61495e816147ca565b811461496957600080fd5b5056fea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806371404156116100f9578063a91ee0dc11610097578063d0f710d611610071578063d0f710d614610512578063d5fa2b0014610542578063dc5b68a61461055e578063f1cb7e061461057a576101c4565b8063a91ee0dc146104a9578063c8690233146104c5578063c8cc2aee146104f6576101c4565b80637d0e0e7e116100d35780637d0e0e7e146104375780638b95dd71146104535780639a8a05921461046f578063a526d83b1461048d576101c4565b806371404156146103e157806377372213146103fd5780637b10399914610419576101c4565b8063392e53cd1161016657806355800f871161014057806355800f871461033557806359d1d43c14610351578063691f3431146103815780636df0cf42146103b1576101c4565b8063392e53cd146102cb5780633b3b57de146102e957806346386f7314610319576101c4565b8063116191b6116101a2578063116191b6146102455780631b3cd1421461026357806329ae6a7e1461029357806329cd62ea146102af576101c4565b806301ffc9a7146101c95780630c68ba21146101f957806310f13a8c14610229575b600080fd5b6101e360048036038101906101de91906133b4565b6105aa565b6040516101f091906141bc565b60405180910390f35b610213600480360381019061020e9190613066565b610834565b60405161022091906141bc565b60405180910390f35b610243600480360381019061023e9190613288565b610889565b005b61024d61096d565b60405161025a919061415d565b60405180910390f35b61027d600480360381019061027891906130b8565b610993565b60405161028a919061415d565b60405180910390f35b6102ad60048036038101906102a891906130b8565b6109c6565b005b6102c960048036038101906102c4919061311d565b610beb565b005b6102d3610cb3565b6040516102e091906141bc565b60405180910390f35b61030360048036038101906102fe91906130b8565b610d0b565b604051610310919061415d565b60405180910390f35b610333600480360381019061032e919061316c565b610d1d565b005b61034f600480360381019061034a91906130b8565b611017565b005b61036b60048036038101906103669190613230565b6112d8565b604051610378919061433d565b60405180910390f35b61039b600480360381019061039691906130b8565b6113ad565b6040516103a8919061433d565b60405180910390f35b6103cb60048036038101906103c69190613472565b611462565b6040516103d891906141d7565b60405180910390f35b6103fb60048036038101906103f69190613066565b611482565b005b61041760048036038101906104129190613230565b61169a565b005b610421611746565b60405161042e91906142fe565b60405180910390f35b610451600480360381019061044c91906130b8565b61176c565b005b61046d6004803603810190610468919061334d565b611a38565b005b610477611a92565b604051610484919061461f565b60405180910390f35b6104a760048036038101906104a29190613066565b611a98565b005b6104c360048036038101906104be91906133dd565b611b2f565b005b6104df60048036038101906104da91906130b8565b611d58565b6040516104ed92919061421b565b60405180910390f35b610510600480360381019061050b91906130b8565b611d92565b005b61052c600480360381019061052791906131d8565b6120a2565b60405161053991906141bc565b60405180910390f35b61055c600480360381019061055791906130e1565b6120fb565b005b61057860048036038101906105739190613406565b612153565b005b610594600480360381019061058f9190613311565b612366565b6040516105a191906142dc565b60405180910390f35b60006040516020016105bb9061406f565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061067d5750604051602001610626906140aa565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806106e95750604051602001610692906140fe565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061075557506040516020016106fe906140d4565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806107c1575060405160200161076a906140e9565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061082d57506040516020016107d6906140bf565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b846108938161242d565b6108d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c9906145df565b60405180910390fd5b82826007600089815260200190815260200160002087876040516108f7929190614056565b90815260200160405180910390209190610912929190612d39565b508484604051610923929190614056565b6040518091039020867fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a7550878760405161095d929190614319565b60405180910390a3505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60096020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006109d0612516565b90503073ffffffffffffffffffffffffffffffffffffffff166109f283612527565b73ffffffffffffffffffffffffffffffffffffffff1614610a48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3f9061443f565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ae9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae09061437f565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b0fc9c383836040518363ffffffff1660e01b8152600401610b469291906141f2565b600060405180830381600087803b158015610b6057600080fd5b505af1158015610b74573d6000803e3d6000fd5b505050506009600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f7803a16d95f9ca635bdec561006625e7444d8a9f8463866643cc03af011779d38282604051610bdf9291906141f2565b60405180910390a15050565b82610bf58161242d565b610c34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2b906145df565b60405180910390fd5b604051806040016040528084815260200183815250600660008681526020019081526020016000206000820151816000015560208201518160010155905050837f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e468484604051610ca592919061421b565b60405180910390a250505050565b60008073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b6000610d1682612527565b9050919050565b6000610d27612516565b90506000610d3682878761260c565b9050610d868185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612664565b610dc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dbc9061439f565b60405180910390fd5b60008686604051602001610dda92919061402a565b6040516020818303038152906040528051906020012090503073ffffffffffffffffffffffffffffffffffffffff16610e1288612527565b73ffffffffffffffffffffffffffffffffffffffff1614610e68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5f9061441f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16610e8982612527565b73ffffffffffffffffffffffffffffffffffffffff1614610edf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed6906143bf565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635ef2c7f08888303060006040518663ffffffff1660e01b8152600401610f43959493929190614244565b600060405180830381600087803b158015610f5d57600080fd5b505af1158015610f71573d6000803e3d6000fd5b50505050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b0fc9c382856040518363ffffffff1660e01b8152600401610fd29291906141f2565b600060405180830381600087803b158015610fec57600080fd5b505af1158015611000573d6000803e3d6000fd5b5050505061100e81846126d1565b50505050505050565b6000611021612516565b9050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff1660e01b815260040161107e91906141d7565b60206040518083038186803b15801561109657600080fd5b505afa1580156110aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ce919061308f565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461113b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111329061447f565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf846040518263ffffffff1660e01b81526004016111ad91906141d7565b60206040518083038186803b1580156111c557600080fd5b505afa1580156111d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fd919061308f565b73ffffffffffffffffffffffffffffffffffffffff1614611253576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124a9061435f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1661127483612527565b73ffffffffffffffffffffffffffffffffffffffff16146112ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c19061451f565b60405180910390fd5b6112d482826126d1565b5050565b60606007600085815260200190815260200160002083836040516112fd929190614056565b90815260200160405180910390208054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561139f5780601f106113745761010080835404028352916020019161139f565b820191906000526020600020905b81548152906001019060200180831161138257829003601f168201915b505050505090509392505050565b6060600560008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156114565780601f1061142b57610100808354040283529160200191611456565b820191906000526020600020905b81548152906001019060200180831161143957829003601f168201915b50505050509050919050565b600061147b82600001518360200151846040015161260c565b9050919050565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661150d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115049061449f565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16141561157c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115739061459f565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611607576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fe9061453f565b60405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b328260405161168f929190614193565b60405180910390a150565b826116a48161242d565b6116e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116da906145df565b60405180910390fd5b8282600560008781526020019081526020016000209190611705929190612d39565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f78484604051611738929190614319565b60405180910390a250505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611776612516565b9050600073ffffffffffffffffffffffffffffffffffffffff1661179983612527565b73ffffffffffffffffffffffffffffffffffffffff16146117ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e6906144ff565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611891576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611888906144df565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b815260040161190391906141d7565b60206040518083038186803b15801561191b57600080fd5b505afa15801561192f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611953919061308f565b73ffffffffffffffffffffffffffffffffffffffff16146119a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a09061455f565b60405180910390fd5b806009600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fc1e082a8c26f27c26e1bf5d0ce7ddd579ec7f6d7eb3ea90d8abd6c40991bae368282604051611a2c9291906141f2565b60405180910390a15050565b82611a428161242d565b611a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a78906145df565b60405180910390fd5b611a8c8484846126e9565b50505050565b60025481565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611b23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b1a9061449f565b60405180910390fd5b611b2c816127ab565b50565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611bba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb19061449f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611c2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c21906144bf565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611cbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cb2906145ff565b60405180910390fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdb0239c63d4033dcdd21bd44f8dd479a03efbae12f6bbe27c0a5f923d26514cc600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051611d4d919061415d565b60405180910390a150565b6000806006600084815260200190815260200160002060000154600660008581526020019081526020016000206001015491509150915091565b6000611d9c612516565b9050600073ffffffffffffffffffffffffffffffffffffffff16611dbf83612527565b73ffffffffffffffffffffffffffffffffffffffff1614611e15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e0c906144ff565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611eb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ead9061437f565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b8152600401611f2891906141d7565b60206040518083038186803b158015611f4057600080fd5b505afa158015611f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f78919061308f565b73ffffffffffffffffffffffffffffffffffffffff1614611fce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fc59061455f565b60405180910390fd5b611fd882306126d1565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a83306040518363ffffffff1660e01b81526004016120359291906141f2565b600060405180830381600087803b15801561204f57600080fd5b505af1158015612063573d6000803e3d6000fd5b505050507fcefbe9dbadcf675eef14e23810996ff38541fc26b4dd77cd6724b0eedc96f2008260405161209691906141d7565b60405180910390a15050565b60006120f28484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612664565b90509392505050565b816121058161242d565b612144576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161213b906145df565b60405180910390fd5b61214e83836126d1565b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146121e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121da906143ff565b60405180910390fd5b6000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612295576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228c906144bf565b60405180910390fd5b83600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612320838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061293a565b61232981612992565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516123589190614178565b60405180910390a150505050565b60606004600084815260200190815260200160002060008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124205780601f106123f557610100808354040283529160200191612420565b820191906000526020600020905b81548152906001019060200180831161240357829003601f168201915b5050505050905092915050565b6000612437612516565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004016124a891906141d7565b60206040518083038186803b1580156124c057600080fd5b505afa1580156124d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f8919061308f565b73ffffffffffffffffffffffffffffffffffffffff16149050919050565b600061252260286129d6565b905090565b6000806060600460008581526020019081526020016000206000603c81526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125e55780601f106125ba576101008083540402835291602001916125e5565b820191906000526020600020905b8154815290600101906020018083116125c857829003601f168201915b50505050509050600081511115612602576125ff81612a6b565b91505b8192505050919050565b600061265b7f621363c539a3aa1024c8837ca1dc095db03b7f9512b3a95ecb429aae7fd953ed85858560405160200161264793929190613fed565b604051602081830303815290604052612a93565b90509392505050565b60008061267a8385612ad490919063ffffffff16565b90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b6126e582603c6126e084612b8f565b6126e9565b5050565b827f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af752838360405161271b92919061463a565b60405180910390a2603c82141561276d57827f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd261275783612a6b565b6040516127649190614178565b60405180910390a25b8060046000858152602001908152602001600020600084815260200190815260200160002090805190602001906127a5929190612db9565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561281b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612812906143df565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156128a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161289e9061457f565b60405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a328260405161292f929190614193565b60405180910390a150565b6000815114156129525761294d326127ab565b61298f565b60008151905060005b8181101561298c5761297f83828151811061297257fe5b60200260200101516127ab565b808060010191505061295b565b50505b50565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600090506129e5612bf6565b15612a5e576000836000369050039050612a5660003683906014850192612a0e93929190614711565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612ca3565b915050612a62565b3390505b80915050919050565b6000806014835114612a7c57600080fd5b600c6101000a602084015104905080915050919050565b6000612acc600254308585604051602001612ab19493929190614113565b60405160208183030381529060405280519060200120612d09565b905092915050565b60008060009050604183511415612b855760008060006020860151925060408601519150606086015160001a9050601b8160ff161015612b1557601b810190505b601b8160ff161480612b2a5750601c8160ff16145b15612b815760018782858560405160008152602001604052604051612b529493929190614297565b6020604051602081039080840390855afa158015612b74573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b606080601467ffffffffffffffff81118015612baa57600080fd5b506040519080825280601f01601f191660200182016040528015612bdd5781602001600182028036833780820191505090505b509050600c6101000a8302602082015280915050919050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415612c9c57602c60003690501015612c97576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c8e9061445f565b60405180910390fd5b600190505b8091505090565b6000806014835114612cea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ce1906145bf565b60405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b600081604051602001612d1c9190614084565b604051602081830303815290604052805190602001209050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612d7a57803560ff1916838001178555612da8565b82800160010185558215612da8579182015b82811115612da7578235825591602001919060010190612d8c565b5b509050612db59190612e39565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612dfa57805160ff1916838001178555612e28565b82800160010185558215612e28579182015b82811115612e27578251825591602001919060010190612e0c565b5b509050612e359190612e39565b5090565b5b80821115612e52576000816000905550600101612e3a565b5090565b600081359050612e65816148f9565b92915050565b600081519050612e7a816148f9565b92915050565b60008083601f840112612e9257600080fd5b8235905067ffffffffffffffff811115612eab57600080fd5b602083019150836020820283011115612ec357600080fd5b9250929050565b600081359050612ed981614910565b92915050565b600081359050612eee81614927565b92915050565b60008083601f840112612f0657600080fd5b8235905067ffffffffffffffff811115612f1f57600080fd5b602083019150836001820283011115612f3757600080fd5b9250929050565b600082601f830112612f4f57600080fd5b8135612f62612f5d82614697565b61466a565b91508082526020830160208301858383011115612f7e57600080fd5b612f89838284614861565b50505092915050565b600081359050612fa18161493e565b92915050565b60008083601f840112612fb957600080fd5b8235905067ffffffffffffffff811115612fd257600080fd5b602083019150836001820283011115612fea57600080fd5b9250929050565b60006060828403121561300357600080fd5b61300d606061466a565b9050600061301d84828501612e56565b600083015250602061303184828501612eca565b602083015250604061304584828501612eca565b60408301525092915050565b60008135905061306081614955565b92915050565b60006020828403121561307857600080fd5b600061308684828501612e56565b91505092915050565b6000602082840312156130a157600080fd5b60006130af84828501612e6b565b91505092915050565b6000602082840312156130ca57600080fd5b60006130d884828501612eca565b91505092915050565b600080604083850312156130f457600080fd5b600061310285828601612eca565b925050602061311385828601612e56565b9150509250929050565b60008060006060848603121561313257600080fd5b600061314086828701612eca565b935050602061315186828701612eca565b925050604061316286828701612eca565b9150509250925092565b6000806000806060858703121561318257600080fd5b600061319087828801612eca565b94505060206131a187828801612eca565b935050604085013567ffffffffffffffff8111156131be57600080fd5b6131ca87828801612ef4565b925092505092959194509250565b6000806000604084860312156131ed57600080fd5b60006131fb86828701612eca565b935050602084013567ffffffffffffffff81111561321857600080fd5b61322486828701612ef4565b92509250509250925092565b60008060006040848603121561324557600080fd5b600061325386828701612eca565b935050602084013567ffffffffffffffff81111561327057600080fd5b61327c86828701612fa7565b92509250509250925092565b6000806000806000606086880312156132a057600080fd5b60006132ae88828901612eca565b955050602086013567ffffffffffffffff8111156132cb57600080fd5b6132d788828901612fa7565b9450945050604086013567ffffffffffffffff8111156132f657600080fd5b61330288828901612fa7565b92509250509295509295909350565b6000806040838503121561332457600080fd5b600061333285828601612eca565b925050602061334385828601613051565b9150509250929050565b60008060006060848603121561336257600080fd5b600061337086828701612eca565b935050602061338186828701613051565b925050604084013567ffffffffffffffff81111561339e57600080fd5b6133aa86828701612f3e565b9150509250925092565b6000602082840312156133c657600080fd5b60006133d484828501612edf565b91505092915050565b6000602082840312156133ef57600080fd5b60006133fd84828501612f92565b91505092915050565b6000806000806060858703121561341c57600080fd5b600061342a87828801612f92565b945050602085013567ffffffffffffffff81111561344757600080fd5b61345387828801612e80565b9350935050604061346687828801612e56565b91505092959194509250565b60006060828403121561348457600080fd5b600061349284828501612ff1565b91505092915050565b6134a4816147f5565b82525050565b6134b381614744565b82525050565b6134ca6134c582614744565b6148a3565b82525050565b6134d981614756565b82525050565b6134e881614762565b82525050565b6134ff6134fa82614762565b6148b5565b82525050565b6000613510826146c3565b61351a81856146d9565b935061352a818560208601614870565b613533816148db565b840191505092915050565b6000613549826146c3565b61355381856146ea565b9350613563818560208601614870565b80840191505092915050565b61357881614807565b82525050565b6135878161482b565b82525050565b600061359983856146f5565b93506135a6838584614861565b6135af836148db565b840190509392505050565b60006135c68385614706565b93506135d3838584614861565b82840190509392505050565b60006135ea826146ce565b6135f481856146f5565b9350613604818560208601614870565b61360d816148db565b840191505092915050565b6000613625601983614706565b91507f737570706f727473496e746572666163652862797465733429000000000000006000830152601982019050919050565b60006136656024836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f6465207265736f60008301527f6c766572000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006136cb6021836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f6465206f776e6560008301527f72000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006137316029836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c696420677561726469616e2060008301527f7369676e617475726500000000000000000000000000000000000000000000006020830152604082019050919050565b60006137976022836146f5565b91507f454e53436f6e74726f6c6c65723a206c6162656c20616c72656164792074616b60008301527f656e0000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006137fd601c83614706565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b600061383d6020836146f5565b91507f477561726465643a2063616e6e6f74206164642030783020677561726469616e6000830152602082019050919050565b600061387d602f836146f5565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b60006138e3600d83614706565b91507f61646472286279746573333229000000000000000000000000000000000000006000830152600d82019050919050565b6000613923601b836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f646500000000006000830152602082019050919050565b60006139636021836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520646f65736e2774206578697360008301527f74000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006139c96022836146f5565b91507f47617465776179526563697069656e743a20696e76616c6964206d73672e646160008301527f74610000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613a2f601483614706565b91507f7465787428627974657333322c737472696e67290000000000000000000000006000830152601482019050919050565b6000613a6f600d83614706565b91507f6e616d65286279746573333229000000000000000000000000000000000000006000830152600d82019050919050565b6000613aaf602b836146f5565b91507f454e53436f6e74726f6c6c65723a2063616c6c6572206973206e6f742074686560008301527f206e6f6465206f776e65720000000000000000000000000000000000000000006020830152604082019050919050565b6000613b156026836146f5565b91507f477561726465643a2074782e6f726967696e206973206e6f742074686520677560008301527f61726469616e00000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613b7b6026836146f5565b91507f454e53436f6e74726f6c6c65723a2063616e6e6f74207365742030783020726560008301527f67697374727900000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613be16025836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c7265616479207375626d60008301527f69747465640000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613c47600f83614706565b91507f7075626b657928627974657333322900000000000000000000000000000000006000830152600f82019050919050565b6000613c876022836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c7265616479206578697360008301527f74730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613ced6023836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c726561647920696e207360008301527f796e6300000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613d53601f836146f5565b91507f477561726465643a20677561726469616e20646f65736e2774206578697374006000830152602082019050919050565b6000613d936025836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c696420656e73206e6f64652060008301527f6f776e65720000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613df96020836146f5565b91507f477561726465643a20677561726469616e20616c7265616479206578697374736000830152602082019050919050565b6000613e39601b836146f5565b91507f477561726465643a2063616e6e6f742072656d6f76652073656c6600000000006000830152602082019050919050565b6000613e79601d836146f5565b91507f42797465734c69623a20696e76616c69642064617461206c656e6774680000006000830152602082019050919050565b6000613eb96037836146f5565b91507f454e5341627374726163745265736f6c7665723a20726576657274656420627960008301527f206f6e6c794e6f64654f776e6572206d6f6469666965720000000000000000006020830152604082019050919050565b6000613f1f601283614706565b91507f6164647228627974657333322c75696e742900000000000000000000000000006000830152601282019050919050565b6000613f5f6023836146f5565b91507f454e53436f6e74726f6c6c65723a20726567697374727920616c72656164792060008301527f73657400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b613fc1816147ca565b82525050565b613fd8613fd3826147ca565b6148d1565b82525050565b613fe7816147e8565b82525050565b6000613ff982866134b9565b60148201915061400982856134ee565b60208201915061401982846134ee565b602082019150819050949350505050565b600061403682856134ee565b60208201915061404682846134ee565b6020820191508190509392505050565b60006140638284866135ba565b91508190509392505050565b600061407a82613618565b9150819050919050565b600061408f826137f0565b915061409b82846134ee565b60208201915081905092915050565b60006140b5826138d6565b9150819050919050565b60006140ca82613a22565b9150819050919050565b60006140df82613a62565b9150819050919050565b60006140f482613c3a565b9150819050919050565b600061410982613f12565b9150819050919050565b600061411f8287613fc7565b60208201915061412f82866134b9565b60148201915061413f82856134ee565b60208201915061414f828461353e565b915081905095945050505050565b600060208201905061417260008301846134aa565b92915050565b600060208201905061418d600083018461349b565b92915050565b60006040820190506141a8600083018561349b565b6141b560208301846134aa565b9392505050565b60006020820190506141d160008301846134d0565b92915050565b60006020820190506141ec60008301846134df565b92915050565b600060408201905061420760008301856134df565b61421460208301846134aa565b9392505050565b600060408201905061423060008301856134df565b61423d60208301846134df565b9392505050565b600060a08201905061425960008301886134df565b61426660208301876134df565b61427360408301866134aa565b61428060608301856134aa565b61428d608083018461357e565b9695505050505050565b60006080820190506142ac60008301876134df565b6142b96020830186613fde565b6142c660408301856134df565b6142d360608301846134df565b95945050505050565b600060208201905081810360008301526142f68184613505565b905092915050565b6000602082019050614313600083018461356f565b92915050565b6000602082019050818103600083015261433481848661358d565b90509392505050565b6000602082019050818103600083015261435781846135df565b905092915050565b6000602082019050818103600083015261437881613658565b9050919050565b60006020820190508181036000830152614398816136be565b9050919050565b600060208201905081810360008301526143b881613724565b9050919050565b600060208201905081810360008301526143d88161378a565b9050919050565b600060208201905081810360008301526143f881613830565b9050919050565b6000602082019050818103600083015261441881613870565b9050919050565b6000602082019050818103600083015261443881613916565b9050919050565b6000602082019050818103600083015261445881613956565b9050919050565b60006020820190508181036000830152614478816139bc565b9050919050565b6000602082019050818103600083015261449881613aa2565b9050919050565b600060208201905081810360008301526144b881613b08565b9050919050565b600060208201905081810360008301526144d881613b6e565b9050919050565b600060208201905081810360008301526144f881613bd4565b9050919050565b6000602082019050818103600083015261451881613c7a565b9050919050565b6000602082019050818103600083015261453881613ce0565b9050919050565b6000602082019050818103600083015261455881613d46565b9050919050565b6000602082019050818103600083015261457881613d86565b9050919050565b6000602082019050818103600083015261459881613dec565b9050919050565b600060208201905081810360008301526145b881613e2c565b9050919050565b600060208201905081810360008301526145d881613e6c565b9050919050565b600060208201905081810360008301526145f881613eac565b9050919050565b6000602082019050818103600083015261461881613f52565b9050919050565b60006020820190506146346000830184613fb8565b92915050565b600060408201905061464f6000830185613fb8565b81810360208301526146618184613505565b90509392505050565b6000604051905081810181811067ffffffffffffffff8211171561468d57600080fd5b8060405250919050565b600067ffffffffffffffff8211156146ae57600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000808585111561472157600080fd5b8386111561472e57600080fd5b6001850283019150848603905094509492505050565b600061474f826147aa565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006147a382614744565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b60006148008261483d565b9050919050565b600061481282614819565b9050919050565b6000614824826147aa565b9050919050565b6000614836826147d4565b9050919050565b60006148488261484f565b9050919050565b600061485a826147aa565b9050919050565b82818337600083830152505050565b60005b8381101561488e578082015181840152602081019050614873565b8381111561489d576000848401525b50505050565b60006148ae826148bf565b9050919050565b6000819050919050565b60006148ca826148ec565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61490281614744565b811461490d57600080fd5b50565b61491981614762565b811461492457600080fd5b50565b6149308161476c565b811461493b57600080fd5b50565b61494781614798565b811461495257600080fd5b50565b61495e816147ca565b811461496957600080fd5b5056fea164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "details": "The process of adding root node consists of 3 steps: 1. `submitNode` - should be called from ENS node owner, 2. Change ENS node owner in ENS registry to ENS controller, 3. `verifyNode` - should be called from previous ENS node owner, To register sub node, `msg.sender` need to send valid signature from one of guardian key. Once registration is complete `msg.sender` becoming both node owner and `addr` record value. After registration sub node cannot be replaced.", + "events": { + "NodeReleased(bytes32,address)": { + "details": "Emitted when new node is released", + "params": { + "node": "node name hash", + "owner": "owner address" + } + }, + "NodeSubmitted(bytes32,address)": { + "details": "Emitted when new node is submitted", + "params": { + "node": "node name hash", + "owner": "owner address" + } + }, + "NodeVerified(bytes32)": { + "details": "Emitted when the existing owner is verified", + "params": { + "node": "node name hash" + } + }, + "RegistryChanged(address)": { + "details": "Emitted when ENS registry address is changed", + "params": { + "registry": "registry address" + } + } + }, + "kind": "dev", + "methods": { + "addGuardian(address)": { + "params": { + "guardian": "guardian address" + } + }, + "constructor": { + "details": "Public constructor" + }, + "hashSubNodeRegistration((address,bytes32,bytes32))": { + "params": { + "subNodeRegistration": "struct" + }, + "returns": { + "_0": "hash" + } + }, + "initialize(address,address[],address)": { + "params": { + "gateway_": "gateway address", + "registry_": "ENS registry address" + } + }, + "isGuardian(address)": { + "params": { + "guardian": "guardian address" + }, + "returns": { + "_0": "true when guardian exists" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + }, + "registerSubNode(bytes32,bytes32,bytes)": { + "params": { + "guardianSignature": "guardian signature", + "label": "label hash", + "node": "node name hash" + } + }, + "releaseNode(bytes32)": { + "details": "Should be called from the previous ENS node owner", + "params": { + "node": "node name hash" + } + }, + "removeGuardian(address)": { + "params": { + "guardian": "guardian address" + } + }, + "setRegistry(address)": { + "params": { + "registry_": "registry address" + } + }, + "submitNode(bytes32)": { + "details": "Should be called from the current ENS node owner", + "params": { + "node": "node name hash" + } + }, + "syncAddr(bytes32)": { + "params": { + "node": "node name hash" + } + }, + "verifyGuardianSignature(bytes32,bytes)": { + "params": { + "messageHash": "message hash", + "signature": "signature" + }, + "returns": { + "_0": "true on correct guardian signature" + } + }, + "verifyNode(bytes32)": { + "details": "Should be called from the previous ENS node owner", + "params": { + "node": "node name hash" + } + } + }, + "title": "ENS controller", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addGuardian(address)": { + "notice": "Adds a new guardian" + }, + "hashSubNodeRegistration((address,bytes32,bytes32))": { + "notice": "Hashes `SubNodeRegistration` message payload" + }, + "initialize(address,address[],address)": { + "notice": "Initializes `ENSController` contract" + }, + "isGuardian(address)": { + "notice": "Check if guardian exists" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + }, + "registerSubNode(bytes32,bytes32,bytes)": { + "notice": "Registers sub node" + }, + "releaseNode(bytes32)": { + "notice": "Releases node" + }, + "removeGuardian(address)": { + "notice": "Removes the existing guardian" + }, + "setRegistry(address)": { + "notice": "Sets registry" + }, + "submitNode(bytes32)": { + "notice": "Submits node" + }, + "syncAddr(bytes32)": { + "notice": "Sync address" + }, + "verifyGuardianSignature(bytes32,bytes)": { + "notice": "Verifies guardian signature" + }, + "verifyNode(bytes32)": { + "notice": "Verifies node" + } + }, + "notice": "ENS subnode registrar", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 40, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "guardians", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 1871, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "initializer", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1935, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "chainId", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 5197, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "gateway", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 3850, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "resolverAddresses", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_bytes32,t_mapping(t_uint256,t_bytes_storage))" + }, + { + "astId": 4073, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "resolverNames", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_string_storage)" + }, + { + "astId": 4140, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "resolverPubKeys", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_bytes32,t_struct(PubKey)4136_storage)" + }, + { + "astId": 4220, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "resolverTexts", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_string_storage))" + }, + { + "astId": 2388, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "registry", + "offset": 0, + "slot": "8", + "type": "t_contract(ENSRegistry)3564" + }, + { + "astId": 2392, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "nodeOwners", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_bytes32,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(ENSRegistry)3564": { + "encoding": "inplace", + "label": "contract ENSRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_string_storage))": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => mapping(string => string))", + "numberOfBytes": "32", + "value": "t_mapping(t_string_memory_ptr,t_string_storage)" + }, + "t_mapping(t_bytes32,t_mapping(t_uint256,t_bytes_storage))": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => mapping(uint256 => bytes))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_bytes_storage)" + }, + "t_mapping(t_bytes32,t_string_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_bytes32,t_struct(PubKey)4136_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct ENSPubKeyResolver.PubKey)", + "numberOfBytes": "32", + "value": "t_struct(PubKey)4136_storage" + }, + "t_mapping(t_string_memory_ptr,t_string_storage)": { + "encoding": "mapping", + "key": "t_string_memory_ptr", + "label": "mapping(string => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_uint256,t_bytes_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes)", + "numberOfBytes": "32", + "value": "t_bytes_storage" + }, + "t_string_memory_ptr": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(PubKey)4136_storage": { + "encoding": "inplace", + "label": "struct ENSPubKeyResolver.PubKey", + "members": [ + { + "astId": 4133, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "x", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 4135, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "y", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuse/ENSHelper.json b/deployments/fuse/ENSHelper.json new file mode 100644 index 00000000..f9a8dda8 --- /dev/null +++ b/deployments/fuse/ENSHelper.json @@ -0,0 +1,208 @@ +{ + "address": "0xF330b17e19474762E6F408D7dCf0327264d4A2C0", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "nodes", + "type": "bytes32[]" + } + ], + "name": "getAddresses", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "nodes", + "type": "bytes32[]" + } + ], + "name": "getNames", + "outputs": [ + { + "internalType": "string[]", + "name": "", + "type": "string[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ENSRegistry", + "name": "registry_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract ENSRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x1878a82e9754f951494ecd386dcc132f93f9d934f6b7ac250d1972f57d43d141", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "876395", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x12662e18aa1b45a3a01ddb8b2e6d377c42cc06afa27d25cb92d6ff085897be53", + "transactionHash": "0x1878a82e9754f951494ecd386dcc132f93f9d934f6b7ac250d1972f57d43d141", + "logs": [], + "blockNumber": 17842185, + "cumulativeGasUsed": "1060248", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"}],\"name\":\"getAddresses\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"}],\"name\":\"getNames\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ENSRegistry\",\"name\":\"registry_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract ENSRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Public constructor\"},\"getAddresses(bytes32[])\":{\"params\":{\"nodes\":\"array of nodes\"},\"returns\":{\"_0\":\"nodes addresses\"}},\"getNames(bytes32[])\":{\"params\":{\"nodes\":\"array of nodes\"},\"returns\":{\"_0\":\"nodes names\"}},\"initialize(address)\":{\"params\":{\"registry_\":\"ENS registry address\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}}},\"title\":\"ENS helper\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getAddresses(bytes32[])\":{\"notice\":\"Gets nodes addresses\"},\"getNames(bytes32[])\":{\"notice\":\"Gets nodes names\"},\"initialize(address)\":{\"notice\":\"Initializes `ENSLookupHelper` contract\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ens/ENSHelper.sol\":\"ENSHelper\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/ens/ENSHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"./resolvers/ENSAddressResolver.sol\\\";\\nimport \\\"./resolvers/ENSNameResolver.sol\\\";\\nimport \\\"./ENSRegistry.sol\\\";\\n\\n/**\\n * @title ENS helper\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract ENSHelper is Initializable {\\n ENSRegistry public registry;\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Initializable() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `ENSLookupHelper` contract\\n * @param registry_ ENS registry address\\n */\\n function initialize(\\n ENSRegistry registry_\\n )\\n external\\n onlyInitializer\\n {\\n registry = registry_;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Gets nodes addresses\\n * @param nodes array of nodes\\n * @return nodes addresses\\n */\\n function getAddresses(\\n bytes32[] memory nodes\\n )\\n external\\n view\\n returns (address[] memory)\\n {\\n uint nodesLen = nodes.length;\\n address[] memory result = new address[](nodesLen);\\n\\n for (uint i = 0; i < nodesLen; i++) {\\n result[i] = _getAddress(nodes[i]);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @notice Gets nodes names\\n * @param nodes array of nodes\\n * @return nodes names\\n */\\n function getNames(\\n bytes32[] memory nodes\\n )\\n external\\n view\\n returns (string[] memory)\\n {\\n uint nodesLen = nodes.length;\\n string[] memory result = new string[](nodesLen);\\n\\n for (uint i = 0; i < nodesLen; i++) {\\n result[i] = _getName(nodes[i]);\\n }\\n\\n return result;\\n }\\n\\n // private functions (views)\\n\\n function _getAddress(\\n bytes32 node\\n )\\n private\\n view\\n returns (address)\\n {\\n address result;\\n address resolver = registry.resolver(node);\\n\\n if (resolver != address(0)) {\\n try ENSAddressResolver(resolver).addr(node) returns (address addr) {\\n result = addr;\\n } catch {\\n //\\n }\\n }\\n\\n return result;\\n }\\n\\n function _getName(\\n bytes32 node\\n )\\n private\\n view\\n returns (string memory)\\n {\\n string memory result;\\n address resolver = registry.resolver(node);\\n\\n if (resolver != address(0)) {\\n try ENSNameResolver(resolver).name(node) returns (string memory name) {\\n result = name;\\n } catch {\\n //\\n }\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x38b9f6686c97eef1da7a015817b47f335fec507c30d4f22101d850908805e43f\",\"license\":\"MIT\"},\"src/ens/ENSRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ENS registry\\n *\\n * @dev Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ENSRegistry.sol\\n */\\ncontract ENSRegistry {\\n struct Record {\\n address owner;\\n address resolver;\\n uint64 ttl;\\n }\\n\\n mapping (bytes32 => Record) private records;\\n mapping (address => mapping(address => bool)) private operators;\\n\\n // events\\n\\n event NewOwner(\\n bytes32 indexed node,\\n bytes32 indexed label,\\n address owner\\n );\\n\\n event Transfer(\\n bytes32 indexed node,\\n address owner\\n );\\n\\n event NewResolver(\\n bytes32 indexed node,\\n address resolver\\n );\\n\\n event NewTTL(\\n bytes32 indexed node,\\n uint64 ttl\\n );\\n\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n // modifiers\\n\\n modifier authorised(\\n bytes32 node\\n )\\n {\\n address owner = records[node].owner;\\n\\n require(\\n owner == msg.sender || operators[owner][msg.sender],\\n \\\"ENSRegistry: reverted by authorised modifier\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor()\\n public\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n records[0x0].owner = tx.origin;\\n }\\n\\n // external functions\\n\\n function setRecord(\\n bytes32 node,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n setOwner(node, owner_);\\n\\n _setResolverAndTTL(node, resolver_, ttl_);\\n }\\n\\n function setTTL(\\n bytes32 node,\\n uint64 ttl_\\n )\\n external\\n authorised(node)\\n {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n bytes32 subNode = setSubnodeOwner(node, label, owner_);\\n\\n _setResolverAndTTL(subNode, resolver_, ttl_);\\n }\\n\\n function setApprovalForAll(\\n address operator,\\n bool approved\\n )\\n external\\n {\\n operators[msg.sender][operator] = approved;\\n\\n emit ApprovalForAll(\\n msg.sender,\\n operator,\\n approved\\n );\\n }\\n\\n // external functions (views)\\n\\n function owner(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n address addr = records[node].owner;\\n\\n if (addr == address(this)) {\\n return address(0x0);\\n }\\n\\n return addr;\\n }\\n\\n function resolver(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n return records[node].resolver;\\n }\\n\\n function ttl(\\n bytes32 node\\n )\\n external\\n view\\n returns (uint64)\\n {\\n return records[node].ttl;\\n }\\n\\n function recordExists(\\n bytes32 node\\n )\\n external\\n view\\n returns (bool)\\n {\\n return records[node].owner != address(0x0);\\n }\\n\\n function isApprovedForAll(\\n address owner_,\\n address operator\\n )\\n external\\n view\\n returns (bool)\\n {\\n return operators[owner_][operator];\\n }\\n\\n // public functions\\n\\n function setOwner(\\n bytes32 node,\\n address owner_\\n )\\n public\\n authorised(node)\\n {\\n records[node].owner = owner_;\\n\\n emit Transfer(node, owner_);\\n }\\n\\n function setResolver(\\n bytes32 node,\\n address resolver_\\n )\\n public\\n authorised(node)\\n {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner_\\n )\\n public\\n authorised(node)\\n returns(bytes32)\\n {\\n bytes32 subNode = keccak256(abi.encodePacked(node, label));\\n\\n records[subNode].owner = owner_;\\n\\n emit NewOwner(node, label, owner_);\\n\\n return subNode;\\n }\\n\\n // private functions\\n\\n function _setResolverAndTTL(\\n bytes32 node,\\n address resolver_,\\n uint64 ttl_\\n )\\n private\\n {\\n if (resolver_ != records[node].resolver) {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n if (ttl_ != records[node].ttl) {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe00dbdea09d17d41c2c14266e6e1b6b95938c0d374b266bb44a91cfcf0495612\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSAbstractResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ENS abstract resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/ResolverBase.sol\\n */\\nabstract contract ENSAbstractResolver {\\n // modifiers\\n\\n modifier onlyNodeOwner(bytes32 node)\\n {\\n require(\\n _isNodeOwner(node),\\n \\\"ENSAbstractResolver: reverted by onlyNodeOwner modifier\\\"\\n );\\n\\n _;\\n }\\n\\n // internal functions (views)\\n\\n function _isNodeOwner(\\n bytes32 node\\n )\\n internal\\n virtual\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xc67d8bdd4904684e5d3388f7ca7d18c7d407058d6b548d8c591404c758a1ac60\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSAddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./ENSAbstractResolver.sol\\\";\\n\\n\\n/**\\n * @title ENS abstract address resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/AddrResolver.sol\\n */\\nabstract contract ENSAddressResolver is ENSAbstractResolver {\\n bytes4 internal constant INTERFACE_ADDR_ID = bytes4(keccak256(abi.encodePacked(\\\"addr(bytes32)\\\")));\\n bytes4 internal constant INTERFACE_ADDRESS_ID = bytes4(keccak256(abi.encodePacked(\\\"addr(bytes32,uint)\\\")));\\n\\n uint internal constant COIN_TYPE_ETH = 60;\\n\\n mapping(bytes32 => mapping(uint => bytes)) internal resolverAddresses;\\n\\n // events\\n\\n event AddrChanged(\\n bytes32 indexed node,\\n address addr\\n );\\n\\n event AddressChanged(\\n bytes32 indexed node,\\n uint coinType,\\n bytes newAddress\\n );\\n\\n // external functions\\n\\n function setAddr(\\n bytes32 node,\\n address addr_\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n _setAddr(node, addr_);\\n }\\n\\n function setAddr(\\n bytes32 node,\\n uint coinType,\\n bytes memory addr_\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n _setAddr(node, coinType, addr_);\\n }\\n\\n // external functions (views)\\n\\n function addr(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n return _addr(node);\\n }\\n\\n function addr(\\n bytes32 node,\\n uint coinType\\n )\\n external\\n view\\n returns (bytes memory)\\n {\\n return resolverAddresses[node][coinType];\\n }\\n\\n // internal functions\\n\\n function _setAddr(\\n bytes32 node,\\n address addr_\\n )\\n internal\\n {\\n _setAddr(node, COIN_TYPE_ETH, _addressToBytes(addr_));\\n }\\n\\n function _setAddr(\\n bytes32 node,\\n uint coinType,\\n bytes memory addr_\\n )\\n internal\\n {\\n emit AddressChanged(node, coinType, addr_);\\n\\n if(coinType == COIN_TYPE_ETH) {\\n emit AddrChanged(node, _bytesToAddress(addr_));\\n }\\n\\n resolverAddresses[node][coinType] = addr_;\\n }\\n\\n // internal functions (views)\\n\\n function _addr(\\n bytes32 node\\n )\\n internal\\n view\\n returns (address)\\n {\\n address result;\\n\\n bytes memory addr_ = resolverAddresses[node][COIN_TYPE_ETH];\\n\\n if (addr_.length > 0) {\\n result = _bytesToAddress(addr_);\\n }\\n\\n return result;\\n }\\n\\n // private function (pure)\\n\\n function _bytesToAddress(\\n bytes memory data\\n )\\n private\\n pure\\n returns(address payable)\\n {\\n address payable result;\\n\\n require(data.length == 20);\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := div(mload(add(data, 32)), exp(256, 12))\\n }\\n\\n return result;\\n }\\n\\n function _addressToBytes(\\n address addr_\\n )\\n private\\n pure\\n returns(bytes memory)\\n {\\n bytes memory result = new bytes(20);\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n mstore(add(result, 32), mul(addr_, exp(256, 12)))\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xd2f0c5ed5f5058755512c0916496da6bcf4cf18a0026ee8d20b4306656ce5142\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSNameResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./ENSAbstractResolver.sol\\\";\\n\\n\\n/**\\n * @title ENS abstract name resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/NameResolver.sol\\n */\\nabstract contract ENSNameResolver is ENSAbstractResolver {\\n bytes4 internal constant INTERFACE_NAME_ID = bytes4(keccak256(abi.encodePacked(\\\"name(bytes32)\\\")));\\n\\n mapping(bytes32 => string) internal resolverNames;\\n\\n // events\\n\\n event NameChanged(\\n bytes32 indexed node,\\n string name\\n );\\n\\n // external functions\\n\\n function setName(\\n bytes32 node,\\n string calldata name\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n resolverNames[node] = name;\\n\\n emit NameChanged(node, name);\\n }\\n\\n // external functions (views)\\n\\n function name(\\n bytes32 node\\n )\\n external\\n view\\n returns (string memory)\\n {\\n return resolverNames[node];\\n }\\n}\\n\",\"keccak256\":\"0x1d2d4b21f59225fbefe0e5aaff87aff8f11afe5281745934d595e15770557ead\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610e74806100606000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806338bc01b51461005c578063392e53cd1461008c5780637b103999146100aa578063c4d66de8146100c8578063dc6008e2146100e4575b600080fd5b610076600480360381019061007191906108a6565b610114565b6040516100839190610b55565b60405180910390f35b6100946101ec565b6040516100a19190610b99565b60405180910390f35b6100b2610242565b6040516100bf9190610bcf565b60405180910390f35b6100e260048036038101906100dd91906108e7565b610268565b005b6100fe60048036038101906100f991906108a6565b6103b2565b60405161010b9190610b77565b60405180910390f35b606060008251905060608167ffffffffffffffff8111801561013557600080fd5b506040519080825280602002602001820160405280156101645781602001602082028036833780820191505090505b50905060005b828110156101e15761018e85828151811061018157fe5b6020026020010151610460565b82828151811061019a57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808060010191505061016a565b508092505050919050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146102f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ed90610bea565b60405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516103a79190610b3a565b60405180910390a150565b606060008251905060608167ffffffffffffffff811180156103d357600080fd5b5060405190808252806020026020018201604052801561040757816020015b60608152602001906001900390816103f25790505b50905060005b828110156104555761043185828151811061042457fe5b60200260200101516105e1565b82828151811061043d57fe5b6020026020010181905250808060010191505061040d565b508092505050919050565b6000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf856040518263ffffffff1660e01b81526004016104c09190610bb4565b60206040518083038186803b1580156104d857600080fd5b505afa1580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610510919061087d565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105d7578073ffffffffffffffffffffffffffffffffffffffff16633b3b57de856040518263ffffffff1660e01b815260040161057f9190610bb4565b60206040518083038186803b15801561059757600080fd5b505afa9250505080156105c857506040513d601f19601f820116820180604052508101906105c5919061087d565b60015b6105d1576105d6565b809250505b5b8192505050919050565b6060806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf856040518263ffffffff1660e01b81526004016106419190610bb4565b60206040518083038186803b15801561065957600080fd5b505afa15801561066d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610691919061087d565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461075d578073ffffffffffffffffffffffffffffffffffffffff1663691f3431856040518263ffffffff1660e01b81526004016107009190610bb4565b60006040518083038186803b15801561071857600080fd5b505afa92505050801561074e57506040513d6000823e3d601f19601f8201168201806040525081019061074b9190610910565b60015b6107575761075c565b809250505b5b8192505050919050565b60008151905061077681610e22565b92915050565b600082601f83011261078d57600080fd5b81356107a061079b82610c37565b610c0a565b915081818352602084019350602081019050838560208402820111156107c557600080fd5b60005b838110156107f557816107db88826107ff565b8452602084019350602083019250506001810190506107c8565b5050505092915050565b60008135905061080e81610e39565b92915050565b60008135905061082381610e50565b92915050565b600082601f83011261083a57600080fd5b815161084d61084882610c5f565b610c0a565b9150808252602083016020830185838301111561086957600080fd5b610874838284610dde565b50505092915050565b60006020828403121561088f57600080fd5b600061089d84828501610767565b91505092915050565b6000602082840312156108b857600080fd5b600082013567ffffffffffffffff8111156108d257600080fd5b6108de8482850161077c565b91505092915050565b6000602082840312156108f957600080fd5b600061090784828501610814565b91505092915050565b60006020828403121561092257600080fd5b600082015167ffffffffffffffff81111561093c57600080fd5b61094884828501610829565b91505092915050565b600061095d838361098c565b60208301905092915050565b60006109758383610a9b565b905092915050565b61098681610d84565b82525050565b61099581610d2a565b82525050565b60006109a682610cab565b6109b08185610ce6565b93506109bb83610c8b565b8060005b838110156109ec5781516109d38882610951565b97506109de83610ccc565b9250506001810190506109bf565b5085935050505092915050565b6000610a0482610cb6565b610a0e8185610cf7565b935083602082028501610a2085610c9b565b8060005b85811015610a5c5784840389528151610a3d8582610969565b9450610a4883610cd9565b925060208a01995050600181019050610a24565b50829750879550505050505092915050565b610a7781610d3c565b82525050565b610a8681610d48565b82525050565b610a9581610d96565b82525050565b6000610aa682610cc1565b610ab08185610d08565b9350610ac0818560208601610dde565b610ac981610e11565b840191505092915050565b6000610ae1602f83610d19565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b6000602082019050610b4f600083018461097d565b92915050565b60006020820190508181036000830152610b6f818461099b565b905092915050565b60006020820190508181036000830152610b9181846109f9565b905092915050565b6000602082019050610bae6000830184610a6e565b92915050565b6000602082019050610bc96000830184610a7d565b92915050565b6000602082019050610be46000830184610a8c565b92915050565b60006020820190508181036000830152610c0381610ad4565b9050919050565b6000604051905081810181811067ffffffffffffffff82111715610c2d57600080fd5b8060405250919050565b600067ffffffffffffffff821115610c4e57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115610c7657600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610d3582610d64565b9050919050565b60008115159050919050565b6000819050919050565b6000610d5d82610d2a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610d8f82610dba565b9050919050565b6000610da182610da8565b9050919050565b6000610db382610d64565b9050919050565b6000610dc582610dcc565b9050919050565b6000610dd782610d64565b9050919050565b60005b83811015610dfc578082015181840152602081019050610de1565b83811115610e0b576000848401525b50505050565b6000601f19601f8301169050919050565b610e2b81610d2a565b8114610e3657600080fd5b50565b610e4281610d48565b8114610e4d57600080fd5b50565b610e5981610d52565b8114610e6457600080fd5b5056fea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806338bc01b51461005c578063392e53cd1461008c5780637b103999146100aa578063c4d66de8146100c8578063dc6008e2146100e4575b600080fd5b610076600480360381019061007191906108a6565b610114565b6040516100839190610b55565b60405180910390f35b6100946101ec565b6040516100a19190610b99565b60405180910390f35b6100b2610242565b6040516100bf9190610bcf565b60405180910390f35b6100e260048036038101906100dd91906108e7565b610268565b005b6100fe60048036038101906100f991906108a6565b6103b2565b60405161010b9190610b77565b60405180910390f35b606060008251905060608167ffffffffffffffff8111801561013557600080fd5b506040519080825280602002602001820160405280156101645781602001602082028036833780820191505090505b50905060005b828110156101e15761018e85828151811061018157fe5b6020026020010151610460565b82828151811061019a57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808060010191505061016a565b508092505050919050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146102f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ed90610bea565b60405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516103a79190610b3a565b60405180910390a150565b606060008251905060608167ffffffffffffffff811180156103d357600080fd5b5060405190808252806020026020018201604052801561040757816020015b60608152602001906001900390816103f25790505b50905060005b828110156104555761043185828151811061042457fe5b60200260200101516105e1565b82828151811061043d57fe5b6020026020010181905250808060010191505061040d565b508092505050919050565b6000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf856040518263ffffffff1660e01b81526004016104c09190610bb4565b60206040518083038186803b1580156104d857600080fd5b505afa1580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610510919061087d565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105d7578073ffffffffffffffffffffffffffffffffffffffff16633b3b57de856040518263ffffffff1660e01b815260040161057f9190610bb4565b60206040518083038186803b15801561059757600080fd5b505afa9250505080156105c857506040513d601f19601f820116820180604052508101906105c5919061087d565b60015b6105d1576105d6565b809250505b5b8192505050919050565b6060806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf856040518263ffffffff1660e01b81526004016106419190610bb4565b60206040518083038186803b15801561065957600080fd5b505afa15801561066d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610691919061087d565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461075d578073ffffffffffffffffffffffffffffffffffffffff1663691f3431856040518263ffffffff1660e01b81526004016107009190610bb4565b60006040518083038186803b15801561071857600080fd5b505afa92505050801561074e57506040513d6000823e3d601f19601f8201168201806040525081019061074b9190610910565b60015b6107575761075c565b809250505b5b8192505050919050565b60008151905061077681610e22565b92915050565b600082601f83011261078d57600080fd5b81356107a061079b82610c37565b610c0a565b915081818352602084019350602081019050838560208402820111156107c557600080fd5b60005b838110156107f557816107db88826107ff565b8452602084019350602083019250506001810190506107c8565b5050505092915050565b60008135905061080e81610e39565b92915050565b60008135905061082381610e50565b92915050565b600082601f83011261083a57600080fd5b815161084d61084882610c5f565b610c0a565b9150808252602083016020830185838301111561086957600080fd5b610874838284610dde565b50505092915050565b60006020828403121561088f57600080fd5b600061089d84828501610767565b91505092915050565b6000602082840312156108b857600080fd5b600082013567ffffffffffffffff8111156108d257600080fd5b6108de8482850161077c565b91505092915050565b6000602082840312156108f957600080fd5b600061090784828501610814565b91505092915050565b60006020828403121561092257600080fd5b600082015167ffffffffffffffff81111561093c57600080fd5b61094884828501610829565b91505092915050565b600061095d838361098c565b60208301905092915050565b60006109758383610a9b565b905092915050565b61098681610d84565b82525050565b61099581610d2a565b82525050565b60006109a682610cab565b6109b08185610ce6565b93506109bb83610c8b565b8060005b838110156109ec5781516109d38882610951565b97506109de83610ccc565b9250506001810190506109bf565b5085935050505092915050565b6000610a0482610cb6565b610a0e8185610cf7565b935083602082028501610a2085610c9b565b8060005b85811015610a5c5784840389528151610a3d8582610969565b9450610a4883610cd9565b925060208a01995050600181019050610a24565b50829750879550505050505092915050565b610a7781610d3c565b82525050565b610a8681610d48565b82525050565b610a9581610d96565b82525050565b6000610aa682610cc1565b610ab08185610d08565b9350610ac0818560208601610dde565b610ac981610e11565b840191505092915050565b6000610ae1602f83610d19565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b6000602082019050610b4f600083018461097d565b92915050565b60006020820190508181036000830152610b6f818461099b565b905092915050565b60006020820190508181036000830152610b9181846109f9565b905092915050565b6000602082019050610bae6000830184610a6e565b92915050565b6000602082019050610bc96000830184610a7d565b92915050565b6000602082019050610be46000830184610a8c565b92915050565b60006020820190508181036000830152610c0381610ad4565b9050919050565b6000604051905081810181811067ffffffffffffffff82111715610c2d57600080fd5b8060405250919050565b600067ffffffffffffffff821115610c4e57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115610c7657600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610d3582610d64565b9050919050565b60008115159050919050565b6000819050919050565b6000610d5d82610d2a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610d8f82610dba565b9050919050565b6000610da182610da8565b9050919050565b6000610db382610d64565b9050919050565b6000610dc582610dcc565b9050919050565b6000610dd782610d64565b9050919050565b60005b83811015610dfc578082015181840152602081019050610de1565b83811115610e0b576000848401525b50505050565b6000601f19601f8301169050919050565b610e2b81610d2a565b8114610e3657600080fd5b50565b610e4281610d48565b8114610e4d57600080fd5b50565b610e5981610d52565b8114610e6457600080fd5b5056fea164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "kind": "dev", + "methods": { + "constructor": { + "details": "Public constructor" + }, + "getAddresses(bytes32[])": { + "params": { + "nodes": "array of nodes" + }, + "returns": { + "_0": "nodes addresses" + } + }, + "getNames(bytes32[])": { + "params": { + "nodes": "array of nodes" + }, + "returns": { + "_0": "nodes names" + } + }, + "initialize(address)": { + "params": { + "registry_": "ENS registry address" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + } + }, + "title": "ENS helper", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "getAddresses(bytes32[])": { + "notice": "Gets nodes addresses" + }, + "getNames(bytes32[])": { + "notice": "Gets nodes names" + }, + "initialize(address)": { + "notice": "Initializes `ENSLookupHelper` contract" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1871, + "contract": "src/ens/ENSHelper.sol:ENSHelper", + "label": "initializer", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 2929, + "contract": "src/ens/ENSHelper.sol:ENSHelper", + "label": "registry", + "offset": 0, + "slot": "1", + "type": "t_contract(ENSRegistry)3564" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_contract(ENSRegistry)3564": { + "encoding": "inplace", + "label": "contract ENSRegistry", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuse/ENSRegistry.json b/deployments/fuse/ENSRegistry.json new file mode 100644 index 00000000..6bc48a9d --- /dev/null +++ b/deployments/fuse/ENSRegistry.json @@ -0,0 +1,510 @@ +{ + "address": "0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "NewOwner", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "resolver", + "type": "address" + } + ], + "name": "NewResolver", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "ttl", + "type": "uint64" + } + ], + "name": "NewTTL", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner_", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "recordExists", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "resolver", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "owner_", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "owner_", + "type": "address" + }, + { + "internalType": "address", + "name": "resolver_", + "type": "address" + }, + { + "internalType": "uint64", + "name": "ttl_", + "type": "uint64" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "resolver_", + "type": "address" + } + ], + "name": "setResolver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "owner_", + "type": "address" + } + ], + "name": "setSubnodeOwner", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "owner_", + "type": "address" + }, + { + "internalType": "address", + "name": "resolver_", + "type": "address" + }, + { + "internalType": "uint64", + "name": "ttl_", + "type": "uint64" + } + ], + "name": "setSubnodeRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "ttl_", + "type": "uint64" + } + ], + "name": "setTTL", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "ttl", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x1df7af5250f555b5ed8dc77728ca7dbf77ad6179f851d4fe80b788b83a8f7257", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 4, + "gasUsed": "1090588", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xbfba8e025738fcfa236156938d7ce172e07da5624fe4188746dc27cc5d82f6a4", + "transactionHash": "0x1df7af5250f555b5ed8dc77728ca7dbf77ad6179f851d4fe80b788b83a8f7257", + "logs": [], + "blockNumber": 17842186, + "cumulativeGasUsed": "1632392", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"NewOwner\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"}],\"name\":\"NewResolver\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"ttl\",\"type\":\"uint64\"}],\"name\":\"NewTTL\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"recordExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"resolver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resolver_\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"ttl_\",\"type\":\"uint64\"}],\"name\":\"setRecord\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"resolver_\",\"type\":\"address\"}],\"name\":\"setResolver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"name\":\"setSubnodeOwner\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resolver_\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"ttl_\",\"type\":\"uint64\"}],\"name\":\"setSubnodeRecord\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"ttl_\",\"type\":\"uint64\"}],\"name\":\"setTTL\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"ttl\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ENSRegistry.sol\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Public constructor\"}},\"title\":\"ENS registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ens/ENSRegistry.sol\":\"ENSRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/ens/ENSRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ENS registry\\n *\\n * @dev Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ENSRegistry.sol\\n */\\ncontract ENSRegistry {\\n struct Record {\\n address owner;\\n address resolver;\\n uint64 ttl;\\n }\\n\\n mapping (bytes32 => Record) private records;\\n mapping (address => mapping(address => bool)) private operators;\\n\\n // events\\n\\n event NewOwner(\\n bytes32 indexed node,\\n bytes32 indexed label,\\n address owner\\n );\\n\\n event Transfer(\\n bytes32 indexed node,\\n address owner\\n );\\n\\n event NewResolver(\\n bytes32 indexed node,\\n address resolver\\n );\\n\\n event NewTTL(\\n bytes32 indexed node,\\n uint64 ttl\\n );\\n\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n // modifiers\\n\\n modifier authorised(\\n bytes32 node\\n )\\n {\\n address owner = records[node].owner;\\n\\n require(\\n owner == msg.sender || operators[owner][msg.sender],\\n \\\"ENSRegistry: reverted by authorised modifier\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor()\\n public\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n records[0x0].owner = tx.origin;\\n }\\n\\n // external functions\\n\\n function setRecord(\\n bytes32 node,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n setOwner(node, owner_);\\n\\n _setResolverAndTTL(node, resolver_, ttl_);\\n }\\n\\n function setTTL(\\n bytes32 node,\\n uint64 ttl_\\n )\\n external\\n authorised(node)\\n {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n bytes32 subNode = setSubnodeOwner(node, label, owner_);\\n\\n _setResolverAndTTL(subNode, resolver_, ttl_);\\n }\\n\\n function setApprovalForAll(\\n address operator,\\n bool approved\\n )\\n external\\n {\\n operators[msg.sender][operator] = approved;\\n\\n emit ApprovalForAll(\\n msg.sender,\\n operator,\\n approved\\n );\\n }\\n\\n // external functions (views)\\n\\n function owner(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n address addr = records[node].owner;\\n\\n if (addr == address(this)) {\\n return address(0x0);\\n }\\n\\n return addr;\\n }\\n\\n function resolver(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n return records[node].resolver;\\n }\\n\\n function ttl(\\n bytes32 node\\n )\\n external\\n view\\n returns (uint64)\\n {\\n return records[node].ttl;\\n }\\n\\n function recordExists(\\n bytes32 node\\n )\\n external\\n view\\n returns (bool)\\n {\\n return records[node].owner != address(0x0);\\n }\\n\\n function isApprovedForAll(\\n address owner_,\\n address operator\\n )\\n external\\n view\\n returns (bool)\\n {\\n return operators[owner_][operator];\\n }\\n\\n // public functions\\n\\n function setOwner(\\n bytes32 node,\\n address owner_\\n )\\n public\\n authorised(node)\\n {\\n records[node].owner = owner_;\\n\\n emit Transfer(node, owner_);\\n }\\n\\n function setResolver(\\n bytes32 node,\\n address resolver_\\n )\\n public\\n authorised(node)\\n {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner_\\n )\\n public\\n authorised(node)\\n returns(bytes32)\\n {\\n bytes32 subNode = keccak256(abi.encodePacked(node, label));\\n\\n records[subNode].owner = owner_;\\n\\n emit NewOwner(node, label, owner_);\\n\\n return subNode;\\n }\\n\\n // private functions\\n\\n function _setResolverAndTTL(\\n bytes32 node,\\n address resolver_,\\n uint64 ttl_\\n )\\n private\\n {\\n if (resolver_ != records[node].resolver) {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n if (ttl_ != records[node].ttl) {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe00dbdea09d17d41c2c14266e6e1b6b95938c0d374b266bb44a91cfcf0495612\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50326000808060001b815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611253806100776000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80635b0fc9c3116100715780635b0fc9c3146102b15780635ef2c7f0146102ff578063a22cb4651461038b578063cf408823146103db578063e985e9c51461045d578063f79fe538146104d7576100b4565b80630178b8bf146100b957806302571be31461011157806306ab59231461016957806314ab9038146101d557806316a25cbd146102175780631896f70a14610263575b600080fd5b6100e5600480360360208110156100cf57600080fd5b810190808035906020019092919050505061051b565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61013d6004803603602081101561012757600080fd5b810190808035906020019092919050505061055a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101bf6004803603606081101561017f57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105dd565b6040518082815260200191505060405180910390f35b610215600480360360408110156101eb57600080fd5b8101908080359060200190929190803567ffffffffffffffff169060200190929190505050610812565b005b6102436004803603602081101561022d57600080fd5b81019080803590602001909291905050506109e6565b604051808267ffffffffffffffff16815260200191505060405180910390f35b6102af6004803603604081101561027957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a19565b005b6102fd600480360360408110156102c757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c11565b005b610389600480360360a081101561031557600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803567ffffffffffffffff169060200190929190505050610e09565b005b6103d9600480360360408110156103a157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050610e2b565b005b61045b600480360360808110156103f157600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803567ffffffffffffffff169060200190929190505050610f2a565b005b6104bf6004803603604081101561047357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f45565b60405180821515815260200191505060405180910390f35b610503600480360360208110156104ed57600080fd5b8101908080359060200190929190505050610fd9565b60405180821515815260200191505060405180910390f35b600080600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060008084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156105d35760009150506105d8565b809150505b919050565b600083600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806106da5750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61072f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b6000868660405160200180838152602001828152602001925050506040516020818303038152906040528051906020012090508460008083815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085877fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e8287604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a38093505050509392505050565b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16148061090d5750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610962576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b8260008086815260200190815260200160002060010160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550837f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa6884604051808267ffffffffffffffff16815260200191505060405180910390a250505050565b600080600083815260200190815260200160002060010160149054906101000a900467ffffffffffffffff169050919050565b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610b145750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610b69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b8260008086815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550837f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a084604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a250505050565b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610d0c5750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610d61576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b8260008086815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550837fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d26684604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a250505050565b6000610e168686866105dd565b9050610e23818484611047565b505050505050565b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b610f348484610c11565b610f3f848383611047565b50505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b60008084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611152578160008085815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550827f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a083604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25b60008084815260200190815260200160002060010160149054906101000a900467ffffffffffffffff1667ffffffffffffffff168167ffffffffffffffff1614611215578060008085815260200190815260200160002060010160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550827f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa6882604051808267ffffffffffffffff16815260200191505060405180910390a25b50505056fe454e5352656769737472793a20726576657274656420627920617574686f7269736564206d6f646966696572a164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80635b0fc9c3116100715780635b0fc9c3146102b15780635ef2c7f0146102ff578063a22cb4651461038b578063cf408823146103db578063e985e9c51461045d578063f79fe538146104d7576100b4565b80630178b8bf146100b957806302571be31461011157806306ab59231461016957806314ab9038146101d557806316a25cbd146102175780631896f70a14610263575b600080fd5b6100e5600480360360208110156100cf57600080fd5b810190808035906020019092919050505061051b565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61013d6004803603602081101561012757600080fd5b810190808035906020019092919050505061055a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101bf6004803603606081101561017f57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105dd565b6040518082815260200191505060405180910390f35b610215600480360360408110156101eb57600080fd5b8101908080359060200190929190803567ffffffffffffffff169060200190929190505050610812565b005b6102436004803603602081101561022d57600080fd5b81019080803590602001909291905050506109e6565b604051808267ffffffffffffffff16815260200191505060405180910390f35b6102af6004803603604081101561027957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a19565b005b6102fd600480360360408110156102c757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c11565b005b610389600480360360a081101561031557600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803567ffffffffffffffff169060200190929190505050610e09565b005b6103d9600480360360408110156103a157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050610e2b565b005b61045b600480360360808110156103f157600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803567ffffffffffffffff169060200190929190505050610f2a565b005b6104bf6004803603604081101561047357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f45565b60405180821515815260200191505060405180910390f35b610503600480360360208110156104ed57600080fd5b8101908080359060200190929190505050610fd9565b60405180821515815260200191505060405180910390f35b600080600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060008084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156105d35760009150506105d8565b809150505b919050565b600083600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806106da5750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61072f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b6000868660405160200180838152602001828152602001925050506040516020818303038152906040528051906020012090508460008083815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085877fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e8287604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a38093505050509392505050565b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16148061090d5750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610962576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b8260008086815260200190815260200160002060010160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550837f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa6884604051808267ffffffffffffffff16815260200191505060405180910390a250505050565b600080600083815260200190815260200160002060010160149054906101000a900467ffffffffffffffff169050919050565b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610b145750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610b69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b8260008086815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550837f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a084604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a250505050565b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610d0c5750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610d61576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b8260008086815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550837fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d26684604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a250505050565b6000610e168686866105dd565b9050610e23818484611047565b505050505050565b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b610f348484610c11565b610f3f848383611047565b50505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b60008084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611152578160008085815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550827f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a083604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25b60008084815260200190815260200160002060010160149054906101000a900467ffffffffffffffff1667ffffffffffffffff168167ffffffffffffffff1614611215578060008085815260200190815260200160002060010160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550827f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa6882604051808267ffffffffffffffff16815260200191505060405180910390a25b50505056fe454e5352656769737472793a20726576657274656420627920617574686f7269736564206d6f646966696572a164736f6c634300060c000a", + "devdoc": { + "details": "Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ENSRegistry.sol", + "kind": "dev", + "methods": { + "constructor": { + "details": "Public constructor" + } + }, + "title": "ENS registry", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 3158, + "contract": "src/ens/ENSRegistry.sol:ENSRegistry", + "label": "records", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_struct(Record)3154_storage)" + }, + { + "astId": 3164, + "contract": "src/ens/ENSRegistry.sol:ENSRegistry", + "label": "operators", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "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_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_bytes32,t_struct(Record)3154_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct ENSRegistry.Record)", + "numberOfBytes": "32", + "value": "t_struct(Record)3154_storage" + }, + "t_struct(Record)3154_storage": { + "encoding": "inplace", + "label": "struct ENSRegistry.Record", + "members": [ + { + "astId": 3149, + "contract": "src/ens/ENSRegistry.sol:ENSRegistry", + "label": "owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 3151, + "contract": "src/ens/ENSRegistry.sol:ENSRegistry", + "label": "resolver", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 3153, + "contract": "src/ens/ENSRegistry.sol:ENSRegistry", + "label": "ttl", + "offset": 20, + "slot": "1", + "type": "t_uint64" + } + ], + "numberOfBytes": "64" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuse/ENSReverseRegistrar.json b/deployments/fuse/ENSReverseRegistrar.json new file mode 100644 index 00000000..866f6f1e --- /dev/null +++ b/deployments/fuse/ENSReverseRegistrar.json @@ -0,0 +1,274 @@ +{ + "address": "0x523C92966e9d2067ba547f59D51E907c20FD8761", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "ADDR_REVERSE_NODE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "claim", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "resolver_", + "type": "address" + } + ], + "name": "claimWithResolver", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ENSRegistry", + "name": "registry_", + "type": "address" + }, + { + "internalType": "contract ENSNameResolver", + "name": "resolver_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr_", + "type": "address" + } + ], + "name": "node", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract ENSRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "resolver", + "outputs": [ + { + "internalType": "contract ENSNameResolver", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "setName", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x3cfe6c47907a333dd546f569cbed2b9b67515d8ae4f48e0a816c247ef0c2a050", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 32, + "gasUsed": "849943", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf18d2eaefd707ed430acae67cd043fa5a90d5702ae5d175ac7f251b4ed44d004", + "transactionHash": "0x3cfe6c47907a333dd546f569cbed2b9b67515d8ae4f48e0a816c247ef0c2a050", + "logs": [], + "blockNumber": 17842187, + "cumulativeGasUsed": "3354834", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADDR_REVERSE_NODE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resolver_\",\"type\":\"address\"}],\"name\":\"claimWithResolver\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ENSRegistry\",\"name\":\"registry_\",\"type\":\"address\"},{\"internalType\":\"contract ENSNameResolver\",\"name\":\"resolver_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr_\",\"type\":\"address\"}],\"name\":\"node\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract ENSRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resolver\",\"outputs\":[{\"internalType\":\"contract ENSNameResolver\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ReverseRegistrar.sol\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Public constructor\"},\"initialize(address,address)\":{\"params\":{\"registry_\":\"ENS registry address\",\"resolver_\":\"ENS name resolver address\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}}},\"title\":\"ENS reverse registrar\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initialize(address,address)\":{\"notice\":\"Initializes `ENSReverseRegistrar` contract\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ens/ENSReverseRegistrar.sol\":\"ENSReverseRegistrar\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/libs/AddressLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Address library\\n */\\nlibrary AddressLib {\\n /**\\n * @notice Converts address into sha3 hash\\n * @param self address\\n * @return sha3 hash\\n */\\n function toSha3Hash(\\n address self\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n bytes32 result;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let lookup := 0x3031323334353637383961626364656600000000000000000000000000000000\\n\\n for { let i := 40 } gt(i, 0) { } {\\n i := sub(i, 1)\\n mstore8(i, byte(and(self, 0xf), lookup))\\n self := div(self, 0x10)\\n i := sub(i, 1)\\n mstore8(i, byte(and(self, 0xf), lookup))\\n self := div(self, 0x10)\\n }\\n\\n result := keccak256(0, 40)\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe54172c033f0a3e59a8ec5ae72aeac02a35b4341331e2698baeb31fa5e543f5f\",\"license\":\"MIT\"},\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/ens/ENSRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ENS registry\\n *\\n * @dev Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ENSRegistry.sol\\n */\\ncontract ENSRegistry {\\n struct Record {\\n address owner;\\n address resolver;\\n uint64 ttl;\\n }\\n\\n mapping (bytes32 => Record) private records;\\n mapping (address => mapping(address => bool)) private operators;\\n\\n // events\\n\\n event NewOwner(\\n bytes32 indexed node,\\n bytes32 indexed label,\\n address owner\\n );\\n\\n event Transfer(\\n bytes32 indexed node,\\n address owner\\n );\\n\\n event NewResolver(\\n bytes32 indexed node,\\n address resolver\\n );\\n\\n event NewTTL(\\n bytes32 indexed node,\\n uint64 ttl\\n );\\n\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n // modifiers\\n\\n modifier authorised(\\n bytes32 node\\n )\\n {\\n address owner = records[node].owner;\\n\\n require(\\n owner == msg.sender || operators[owner][msg.sender],\\n \\\"ENSRegistry: reverted by authorised modifier\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor()\\n public\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n records[0x0].owner = tx.origin;\\n }\\n\\n // external functions\\n\\n function setRecord(\\n bytes32 node,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n setOwner(node, owner_);\\n\\n _setResolverAndTTL(node, resolver_, ttl_);\\n }\\n\\n function setTTL(\\n bytes32 node,\\n uint64 ttl_\\n )\\n external\\n authorised(node)\\n {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n bytes32 subNode = setSubnodeOwner(node, label, owner_);\\n\\n _setResolverAndTTL(subNode, resolver_, ttl_);\\n }\\n\\n function setApprovalForAll(\\n address operator,\\n bool approved\\n )\\n external\\n {\\n operators[msg.sender][operator] = approved;\\n\\n emit ApprovalForAll(\\n msg.sender,\\n operator,\\n approved\\n );\\n }\\n\\n // external functions (views)\\n\\n function owner(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n address addr = records[node].owner;\\n\\n if (addr == address(this)) {\\n return address(0x0);\\n }\\n\\n return addr;\\n }\\n\\n function resolver(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n return records[node].resolver;\\n }\\n\\n function ttl(\\n bytes32 node\\n )\\n external\\n view\\n returns (uint64)\\n {\\n return records[node].ttl;\\n }\\n\\n function recordExists(\\n bytes32 node\\n )\\n external\\n view\\n returns (bool)\\n {\\n return records[node].owner != address(0x0);\\n }\\n\\n function isApprovedForAll(\\n address owner_,\\n address operator\\n )\\n external\\n view\\n returns (bool)\\n {\\n return operators[owner_][operator];\\n }\\n\\n // public functions\\n\\n function setOwner(\\n bytes32 node,\\n address owner_\\n )\\n public\\n authorised(node)\\n {\\n records[node].owner = owner_;\\n\\n emit Transfer(node, owner_);\\n }\\n\\n function setResolver(\\n bytes32 node,\\n address resolver_\\n )\\n public\\n authorised(node)\\n {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner_\\n )\\n public\\n authorised(node)\\n returns(bytes32)\\n {\\n bytes32 subNode = keccak256(abi.encodePacked(node, label));\\n\\n records[subNode].owner = owner_;\\n\\n emit NewOwner(node, label, owner_);\\n\\n return subNode;\\n }\\n\\n // private functions\\n\\n function _setResolverAndTTL(\\n bytes32 node,\\n address resolver_,\\n uint64 ttl_\\n )\\n private\\n {\\n if (resolver_ != records[node].resolver) {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n if (ttl_ != records[node].ttl) {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe00dbdea09d17d41c2c14266e6e1b6b95938c0d374b266bb44a91cfcf0495612\",\"license\":\"MIT\"},\"src/ens/ENSReverseRegistrar.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/AddressLib.sol\\\";\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"./resolvers/ENSNameResolver.sol\\\";\\nimport \\\"./ENSRegistry.sol\\\";\\n\\n/**\\n * @title ENS reverse registrar\\n *\\n * @dev Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ReverseRegistrar.sol\\n */\\ncontract ENSReverseRegistrar is Initializable {\\n using AddressLib for address;\\n\\n // namehash('addr.reverse')\\n bytes32 public constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\\n\\n ENSRegistry public registry;\\n ENSNameResolver public resolver;\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Initializable() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `ENSReverseRegistrar` contract\\n * @param registry_ ENS registry address\\n * @param resolver_ ENS name resolver address\\n */\\n function initialize(\\n ENSRegistry registry_,\\n ENSNameResolver resolver_\\n )\\n external\\n onlyInitializer\\n {\\n registry = registry_;\\n resolver = resolver_;\\n }\\n\\n // external functions\\n\\n function claim(\\n address owner\\n )\\n public\\n returns (bytes32)\\n {\\n return _claimWithResolver(owner, address(0));\\n }\\n\\n function claimWithResolver(\\n address owner,\\n address resolver_\\n )\\n public\\n returns (bytes32)\\n {\\n return _claimWithResolver(owner, resolver_);\\n }\\n\\n function setName(\\n string memory name\\n )\\n public\\n returns (bytes32)\\n {\\n bytes32 node = _claimWithResolver(address(this), address(resolver));\\n\\n resolver.setName(node, name);\\n\\n return node;\\n }\\n\\n // external functions (pure)\\n\\n function node(\\n address addr_\\n )\\n external\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(ADDR_REVERSE_NODE, addr_.toSha3Hash()));\\n }\\n\\n // private functions\\n\\n function _claimWithResolver(\\n address owner,\\n address resolver_\\n )\\n private\\n returns (bytes32)\\n {\\n bytes32 label = address(msg.sender).toSha3Hash();\\n bytes32 node_ = keccak256(abi.encodePacked(ADDR_REVERSE_NODE, label));\\n address currentOwner = registry.owner(node_);\\n\\n if (resolver_ != address(0x0) && resolver_ != registry.resolver(node_)) {\\n if (currentOwner != address(this)) {\\n registry.setSubnodeOwner(ADDR_REVERSE_NODE, label, address(this));\\n currentOwner = address(this);\\n }\\n\\n registry.setResolver(node_, resolver_);\\n }\\n\\n // Update the owner if required\\n if (currentOwner != owner) {\\n registry.setSubnodeOwner(ADDR_REVERSE_NODE, label, owner);\\n }\\n\\n return node_;\\n }\\n}\\n\",\"keccak256\":\"0xcedc0ece74976c6a3d22fc615baa0cb171e510ac53688a803211606c438dfdf2\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSAbstractResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ENS abstract resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/ResolverBase.sol\\n */\\nabstract contract ENSAbstractResolver {\\n // modifiers\\n\\n modifier onlyNodeOwner(bytes32 node)\\n {\\n require(\\n _isNodeOwner(node),\\n \\\"ENSAbstractResolver: reverted by onlyNodeOwner modifier\\\"\\n );\\n\\n _;\\n }\\n\\n // internal functions (views)\\n\\n function _isNodeOwner(\\n bytes32 node\\n )\\n internal\\n virtual\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xc67d8bdd4904684e5d3388f7ca7d18c7d407058d6b548d8c591404c758a1ac60\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSNameResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./ENSAbstractResolver.sol\\\";\\n\\n\\n/**\\n * @title ENS abstract name resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/NameResolver.sol\\n */\\nabstract contract ENSNameResolver is ENSAbstractResolver {\\n bytes4 internal constant INTERFACE_NAME_ID = bytes4(keccak256(abi.encodePacked(\\\"name(bytes32)\\\")));\\n\\n mapping(bytes32 => string) internal resolverNames;\\n\\n // events\\n\\n event NameChanged(\\n bytes32 indexed node,\\n string name\\n );\\n\\n // external functions\\n\\n function setName(\\n bytes32 node,\\n string calldata name\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n resolverNames[node] = name;\\n\\n emit NameChanged(node, name);\\n }\\n\\n // external functions (views)\\n\\n function name(\\n bytes32 node\\n )\\n external\\n view\\n returns (string memory)\\n {\\n return resolverNames[node];\\n }\\n}\\n\",\"keccak256\":\"0x1d2d4b21f59225fbefe0e5aaff87aff8f11afe5281745934d595e15770557ead\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610df8806100606000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063485cc95511610066578063485cc955146101bc5780637b103999146102205780637cf8a2eb14610254578063bffbe61c14610272578063c47f0027146102ca57610093565b806304f3bcec146100985780630f5a5466146100cc5780631e83409a14610144578063392e53cd1461019c575b600080fd5b6100a0610399565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61012e600480360360408110156100e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103bf565b6040518082815260200191505060405180910390f35b6101866004803603602081101561015a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103d3565b6040518082815260200191505060405180910390f35b6101a46103e7565b60405180821515815260200191505060405180910390f35b61021e600480360360408110156101d257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061043d565b005b6102286105f5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61025c61061b565b6040518082815260200191505060405180910390f35b6102b46004803603602081101561028857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610642565b6040518082815260200191505060405180910390f35b610383600480360360208110156102e057600080fd5b81019080803590602001906401000000008111156102fd57600080fd5b82018360208201111561030f57600080fd5b8035906020019184600183028401116401000000008311171561033157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506106bb565b6040518082815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006103cb83836107ef565b905092915050565b60006103e08260006107ef565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146104e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180610dbd602f913960400191505060405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b81565b60007f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b6106878373ffffffffffffffffffffffffffffffffffffffff16610d4d565b6040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b6000806106ea30600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166107ef565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637737221382856040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610781578082015181840152602081019050610766565b50505050905090810190601f1680156107ae5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b1580156107ce57600080fd5b505af11580156107e2573d6000803e3d6000fd5b5050505080915050919050565b6000806108113373ffffffffffffffffffffffffffffffffffffffff16610d4d565b905060007f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b8260405160200180838152602001828152602001925050506040516020818303038152906040528051906020012090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156108de57600080fd5b505afa1580156108f2573d6000803e3d6000fd5b505050506040513d602081101561090857600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614158015610a315750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156109c657600080fd5b505afa1580156109da573d6000803e3d6000fd5b505050506040513d60208110156109f057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15610c13573073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b6757600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59237f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b85306040518463ffffffff1660e01b8152600401808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b158015610b2757600080fd5b505af1158015610b3b573d6000803e3d6000fd5b505050506040513d6020811015610b5157600080fd5b8101908080519060200190929190505050503090505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a83876040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b158015610bfa57600080fd5b505af1158015610c0e573d6000803e3d6000fd5b505050505b8573ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d4157600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59237f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b85896040518463ffffffff1660e01b8152600401808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b158015610d0457600080fd5b505af1158015610d18573d6000803e3d6000fd5b505050506040513d6020811015610d2e57600080fd5b8101908080519060200190929190505050505b81935050505092915050565b6000807f303132333435363738396162636465660000000000000000000000000000000060285b6000811115610daa5760018103905081600f86161a815360108504945060018103905081600f86161a8153601085049450610d74565b5060286000209150508091505091905056fe496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a6572a164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063485cc95511610066578063485cc955146101bc5780637b103999146102205780637cf8a2eb14610254578063bffbe61c14610272578063c47f0027146102ca57610093565b806304f3bcec146100985780630f5a5466146100cc5780631e83409a14610144578063392e53cd1461019c575b600080fd5b6100a0610399565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61012e600480360360408110156100e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103bf565b6040518082815260200191505060405180910390f35b6101866004803603602081101561015a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103d3565b6040518082815260200191505060405180910390f35b6101a46103e7565b60405180821515815260200191505060405180910390f35b61021e600480360360408110156101d257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061043d565b005b6102286105f5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61025c61061b565b6040518082815260200191505060405180910390f35b6102b46004803603602081101561028857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610642565b6040518082815260200191505060405180910390f35b610383600480360360208110156102e057600080fd5b81019080803590602001906401000000008111156102fd57600080fd5b82018360208201111561030f57600080fd5b8035906020019184600183028401116401000000008311171561033157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506106bb565b6040518082815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006103cb83836107ef565b905092915050565b60006103e08260006107ef565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146104e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180610dbd602f913960400191505060405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b81565b60007f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b6106878373ffffffffffffffffffffffffffffffffffffffff16610d4d565b6040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b6000806106ea30600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166107ef565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637737221382856040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610781578082015181840152602081019050610766565b50505050905090810190601f1680156107ae5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b1580156107ce57600080fd5b505af11580156107e2573d6000803e3d6000fd5b5050505080915050919050565b6000806108113373ffffffffffffffffffffffffffffffffffffffff16610d4d565b905060007f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b8260405160200180838152602001828152602001925050506040516020818303038152906040528051906020012090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156108de57600080fd5b505afa1580156108f2573d6000803e3d6000fd5b505050506040513d602081101561090857600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614158015610a315750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156109c657600080fd5b505afa1580156109da573d6000803e3d6000fd5b505050506040513d60208110156109f057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15610c13573073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b6757600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59237f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b85306040518463ffffffff1660e01b8152600401808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b158015610b2757600080fd5b505af1158015610b3b573d6000803e3d6000fd5b505050506040513d6020811015610b5157600080fd5b8101908080519060200190929190505050503090505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a83876040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b158015610bfa57600080fd5b505af1158015610c0e573d6000803e3d6000fd5b505050505b8573ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d4157600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59237f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b85896040518463ffffffff1660e01b8152600401808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b158015610d0457600080fd5b505af1158015610d18573d6000803e3d6000fd5b505050506040513d6020811015610d2e57600080fd5b8101908080519060200190929190505050505b81935050505092915050565b6000807f303132333435363738396162636465660000000000000000000000000000000060285b6000811115610daa5760018103905081600f86161a815360108504945060018103905081600f86161a8153601085049450610d74565b5060286000209150508091505091905056fe496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a6572a164736f6c634300060c000a", + "devdoc": { + "details": "Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ReverseRegistrar.sol", + "kind": "dev", + "methods": { + "constructor": { + "details": "Public constructor" + }, + "initialize(address,address)": { + "params": { + "registry_": "ENS registry address", + "resolver_": "ENS name resolver address" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + } + }, + "title": "ENS reverse registrar", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "initialize(address,address)": { + "notice": "Initializes `ENSReverseRegistrar` contract" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1871, + "contract": "src/ens/ENSReverseRegistrar.sol:ENSReverseRegistrar", + "label": "initializer", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 3581, + "contract": "src/ens/ENSReverseRegistrar.sol:ENSReverseRegistrar", + "label": "registry", + "offset": 0, + "slot": "1", + "type": "t_contract(ENSRegistry)3564" + }, + { + "astId": 3583, + "contract": "src/ens/ENSReverseRegistrar.sol:ENSReverseRegistrar", + "label": "resolver", + "offset": 0, + "slot": "2", + "type": "t_contract(ENSNameResolver)4114" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_contract(ENSNameResolver)4114": { + "encoding": "inplace", + "label": "contract ENSNameResolver", + "numberOfBytes": "20" + }, + "t_contract(ENSRegistry)3564": { + "encoding": "inplace", + "label": "contract ENSRegistry", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuse/ExternalAccountRegistry.json b/deployments/fuse/ExternalAccountRegistry.json new file mode 100644 index 00000000..b1a2e27c --- /dev/null +++ b/deployments/fuse/ExternalAccountRegistry.json @@ -0,0 +1,489 @@ +{ + "address": "0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "AccountOwnerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "AccountOwnerRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "AccountProofAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "AccountProofRemoved", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "addAccountOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "addAccountProof", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "removeAccountOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "removeAccountProof", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "verifyAccountOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "verifyAccountOwnerAtBlock", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "verifyAccountProof", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "verifyAccountProofAtBlock", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x1fcd9f8ad01d7a72c8eaceab3a92abcadb3e0c785ffdee0f78567ec7137e5549", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 10, + "gasUsed": "937660", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa9c20f0f3e92bd1261d028c1df2f650bb928a548731ee39de73e03b8c3509664", + "transactionHash": "0x1fcd9f8ad01d7a72c8eaceab3a92abcadb3e0c785ffdee0f78567ec7137e5549", + "logs": [], + "blockNumber": 17842188, + "cumulativeGasUsed": "1978932", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AccountOwnerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AccountOwnerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"AccountProofAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"AccountProofRemoved\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"addAccountOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"addAccountProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"removeAccountOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"removeAccountProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"verifyAccountOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"verifyAccountOwnerAtBlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"verifyAccountProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"verifyAccountProofAtBlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"details\":\"An account can call the registry to add (`addAccountOwner`) or remove (`removeAccountOwner`) its own owners. When the owner has been added, information about that fact will live in the registry forever. Removing an owner only affects the future blocks (until the owner is re-added). Given the fact, there is no way to sign the data using a contract based wallet, we created a registry to store signed by the key wallet proofs. ERC-1271 allows removing a signer after the signature was created. Thus store the signature for the later use doesn't guarantee the signer is still has access to that smart account. Because of that, the ERC1271's `isValidSignature()` cannot be used in e.g. `PaymentRegistry`.* An account can call the registry to add (`addAccountProof`) or remove (`removeAccountProof`) proof hash. When the proof has been added, information about that fact will live in the registry forever. Removing a proof only affects the future blocks (until the proof is re-added).\",\"events\":{\"AccountOwnerAdded(address,address)\":{\"details\":\"Emitted when the new owner is added\",\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"}},\"AccountOwnerRemoved(address,address)\":{\"details\":\"Emitted when the existing owner is removed\",\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"}},\"AccountProofAdded(address,bytes32)\":{\"details\":\"Emitted when the new proof is added\",\"params\":{\"account\":\"account address\",\"hash\":\"proof hash\"}},\"AccountProofRemoved(address,bytes32)\":{\"details\":\"Emitted when the existing proof is removed\",\"params\":{\"account\":\"account address\",\"hash\":\"proof hash\"}}},\"kind\":\"dev\",\"methods\":{\"addAccountOwner(address)\":{\"params\":{\"owner\":\"owner address\"}},\"addAccountProof(bytes32)\":{\"params\":{\"hash\":\"proof hash\"}},\"removeAccountOwner(address)\":{\"params\":{\"owner\":\"owner address\"}},\"removeAccountProof(bytes32)\":{\"params\":{\"hash\":\"proof hash\"}},\"verifyAccountOwner(address,address)\":{\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"},\"returns\":{\"_0\":\"true on correct account owner\"}},\"verifyAccountOwnerAtBlock(address,address,uint256)\":{\"params\":{\"account\":\"account address\",\"blockNumber\":\"block number to verify\",\"owner\":\"owner address\"},\"returns\":{\"_0\":\"true on correct account owner\"}},\"verifyAccountProof(address,bytes32)\":{\"params\":{\"account\":\"account address\",\"hash\":\"proof hash\"},\"returns\":{\"_0\":\"true on correct account proof\"}},\"verifyAccountProofAtBlock(address,bytes32,uint256)\":{\"params\":{\"account\":\"account address\",\"blockNumber\":\"block number to verify\",\"hash\":\"proof hash\"},\"returns\":{\"_0\":\"true on correct account proof\"}}},\"title\":\"External account registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addAccountOwner(address)\":{\"notice\":\"Adds a new account owner\"},\"addAccountProof(bytes32)\":{\"notice\":\"Adds a new account proof\"},\"removeAccountOwner(address)\":{\"notice\":\"Removes existing account owner\"},\"removeAccountProof(bytes32)\":{\"notice\":\"Removes existing account proof\"},\"verifyAccountOwner(address,address)\":{\"notice\":\"Verifies the owner of the account at current block\"},\"verifyAccountOwnerAtBlock(address,address,uint256)\":{\"notice\":\"Verifies the owner of the account at specific block\"},\"verifyAccountProof(address,bytes32)\":{\"notice\":\"Verifies the proof of the account at current block\"},\"verifyAccountProofAtBlock(address,bytes32,uint256)\":{\"notice\":\"Verifies the proof of the account at specific block\"}},\"notice\":\"Global registry for keys and external (outside of the platform) contract based wallets\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/external/ExternalAccountRegistry.sol\":\"ExternalAccountRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/libs/BlockLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Block library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BlockLib {\\n struct BlockRelated {\\n bool added;\\n uint256 removedAtBlockNumber;\\n }\\n\\n /**\\n * @notice Verifies self struct at current block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtCurrentBlock(\\n BlockRelated memory self\\n )\\n internal\\n view\\n returns (bool)\\n {\\n return verifyAtBlock(self, block.number);\\n }\\n\\n /**\\n * @notice Verifies self struct at any block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtAnyBlock(\\n BlockRelated memory self\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n return verifyAtBlock(self, 0);\\n }\\n\\n /**\\n * @notice Verifies self struct at specific block\\n * @param self self struct\\n * @param blockNumber block number to verify\\n * @return true on correct self struct\\n */\\n function verifyAtBlock(\\n BlockRelated memory self,\\n uint256 blockNumber\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n bool result = false;\\n\\n if (self.added) {\\n if (self.removedAtBlockNumber == 0) {\\n result = true;\\n } else if (blockNumber == 0) {\\n result = true;\\n } else {\\n result = self.removedAtBlockNumber > blockNumber;\\n }\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9205536bc211f86d1113118a44dddfa7a9b9772a918cf4b1575c982a05472587\",\"license\":\"MIT\"},\"src/external/ExternalAccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BlockLib.sol\\\";\\n\\n\\n/**\\n * @title External account registry\\n *\\n * @notice Global registry for keys and external (outside of the platform) contract based wallets\\n *\\n * @dev An account can call the registry to add (`addAccountOwner`) or remove (`removeAccountOwner`) its own owners.\\n * When the owner has been added, information about that fact will live in the registry forever.\\n * Removing an owner only affects the future blocks (until the owner is re-added).\\n *\\n * Given the fact, there is no way to sign the data using a contract based wallet,\\n * we created a registry to store signed by the key wallet proofs.\\n * ERC-1271 allows removing a signer after the signature was created. Thus store the signature for the later use\\n * doesn't guarantee the signer is still has access to that smart account.\\n * Because of that, the ERC1271's `isValidSignature()` cannot be used in e.g. `PaymentRegistry`.*\\n *\\n * An account can call the registry to add (`addAccountProof`) or remove (`removeAccountProof`) proof hash.\\n * When the proof has been added, information about that fact will live in the registry forever.\\n * Removing a proof only affects the future blocks (until the proof is re-added).\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract ExternalAccountRegistry {\\n using BlockLib for BlockLib.BlockRelated;\\n\\n struct Account {\\n mapping(address => BlockLib.BlockRelated) owners;\\n mapping(bytes32 => BlockLib.BlockRelated) proofs;\\n }\\n\\n mapping(address => Account) private accounts;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the new owner is added\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerAdded(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the existing owner is removed\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerRemoved(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the new proof is added\\n * @param account account address\\n * @param hash proof hash\\n */\\n event AccountProofAdded(\\n address account,\\n bytes32 hash\\n );\\n\\n /**\\n * @dev Emitted when the existing proof is removed\\n * @param account account address\\n * @param hash proof hash\\n */\\n event AccountProofRemoved(\\n address account,\\n bytes32 hash\\n );\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new account owner\\n * @param owner owner address\\n */\\n function addAccountOwner(\\n address owner\\n )\\n external\\n {\\n require(\\n owner != address(0),\\n \\\"ExternalAccountRegistry: cannot add 0x0 owner\\\"\\n );\\n\\n require(\\n !accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: owner already exists\\\"\\n );\\n\\n accounts[msg.sender].owners[owner].added = true;\\n accounts[msg.sender].owners[owner].removedAtBlockNumber = 0;\\n\\n emit AccountOwnerAdded(\\n msg.sender,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Removes existing account owner\\n * @param owner owner address\\n */\\n function removeAccountOwner(\\n address owner\\n )\\n external\\n {\\n require(\\n accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: owner doesn't exist\\\"\\n );\\n\\n accounts[msg.sender].owners[owner].removedAtBlockNumber = block.number;\\n\\n emit AccountOwnerRemoved(\\n msg.sender,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Adds a new account proof\\n * @param hash proof hash\\n */\\n function addAccountProof(\\n bytes32 hash\\n )\\n external\\n {\\n require(\\n !accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: proof already exists\\\"\\n );\\n\\n accounts[msg.sender].proofs[hash].added = true;\\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = 0;\\n\\n emit AccountProofAdded(\\n msg.sender,\\n hash\\n );\\n }\\n\\n /**\\n * @notice Removes existing account proof\\n * @param hash proof hash\\n */\\n function removeAccountProof(\\n bytes32 hash\\n )\\n external\\n {\\n require(\\n accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: proof doesn't exist\\\"\\n );\\n\\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = block.number;\\n\\n emit AccountProofRemoved(\\n msg.sender,\\n hash\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Verifies the owner of the account at current block\\n * @param account account address\\n * @param owner owner address\\n * @return true on correct account owner\\n */\\n function verifyAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].owners[owner].verifyAtCurrentBlock();\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at specific block\\n * @param account account address\\n * @param owner owner address\\n * @param blockNumber block number to verify\\n * @return true on correct account owner\\n */\\n function verifyAccountOwnerAtBlock(\\n address account,\\n address owner,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].owners[owner].verifyAtBlock(blockNumber);\\n }\\n\\n /**\\n * @notice Verifies the proof of the account at current block\\n * @param account account address\\n * @param hash proof hash\\n * @return true on correct account proof\\n */\\n function verifyAccountProof(\\n address account,\\n bytes32 hash\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].proofs[hash].verifyAtCurrentBlock();\\n }\\n\\n /**\\n * @notice Verifies the proof of the account at specific block\\n * @param account account address\\n * @param hash proof hash\\n * @param blockNumber block number to verify\\n * @return true on correct account proof\\n */\\n function verifyAccountProofAtBlock(\\n address account,\\n bytes32 hash,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].proofs[hash].verifyAtBlock(blockNumber);\\n }\\n}\\n\",\"keccak256\":\"0x8067b1fae41b73949f8d871a835533cbdd94b9ca3faa93b91f595c37e632ccdb\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610fff806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806394000b021161005b57806394000b0214610227578063bb890d3f14610255578063d543c34a146102cf578063e278cfc6146102fd57610088565b806334d323a41461008d57806359b52ef8146101115780638a3133781461017f5780638ecc1365146101e3575b600080fd5b6100f9600480360360608110156100a357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610341565b60405180821515815260200191505060405180910390f35b6101676004803603606081101561012757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919050505061040c565b60405180821515815260200191505060405180910390f35b6101cb6004803603604081101561019557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ab565b60405180821515815260200191505060405180910390f35b610225600480360360208110156101f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061053f565b005b6102536004803603602081101561023d57600080fd5b8101908080359060200190929190505050610860565b005b6102b76004803603604081101561026b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109f1565b60405180821515815260200191505060405180910390f35b6102fb600480360360208110156102e557600080fd5b8101908080359060200190929190505050610ab1565b005b61033f6004803603602081101561031357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cb2565b005b6000610403826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610eb190919063ffffffff16565b90509392505050565b60006104a2826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610eb190919063ffffffff16565b90509392505050565b60006105376000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008481526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156105c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610f14602d913960400191505060405180910390fd5b61067b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b156106d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610f6e602d913960400191505060405180910390fd5b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff02191690831515021790555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644683382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b6108ea6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008381526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b61093f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610fc7602c913960400191505060405180910390fd5b436000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000838152602001908152602001600020600101819055507f87dde712783ad4895642c7a875998317a71cf424a2444eb79545ce3795431ff93382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000610aa96000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b905092915050565b610b3b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008381526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b15610b91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610f41602d913960400191505060405180910390fd5b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600083815260200190815260200160002060000160006101000a81548160ff02191690831515021790555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000838152602001908152602001600020600101819055507f4075b367eed0513a54aa39c287c66d6ae98e5df6f73ac087b26b8f89d05d1aa83382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b610d686000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b610dbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610f9b602c913960400191505060405180910390fd5b436000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f1ce3cbbc43ee231e5b950332f2b0b9dd7d349291a3ee411ce5c5c7ed745661bb3382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b60008060009050836000015115610ef657600084602001511415610ed85760019050610ef5565b6000831415610eea5760019050610ef4565b8284602001511190505b5b5b8091505092915050565b6000610f0c8243610eb1565b905091905056fe45787465726e616c4163636f756e7452656769737472793a2063616e6e6f742061646420307830206f776e657245787465726e616c4163636f756e7452656769737472793a2070726f6f6620616c72656164792065786973747345787465726e616c4163636f756e7452656769737472793a206f776e657220616c72656164792065786973747345787465726e616c4163636f756e7452656769737472793a206f776e657220646f65736e277420657869737445787465726e616c4163636f756e7452656769737472793a2070726f6f6620646f65736e2774206578697374a164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c806394000b021161005b57806394000b0214610227578063bb890d3f14610255578063d543c34a146102cf578063e278cfc6146102fd57610088565b806334d323a41461008d57806359b52ef8146101115780638a3133781461017f5780638ecc1365146101e3575b600080fd5b6100f9600480360360608110156100a357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610341565b60405180821515815260200191505060405180910390f35b6101676004803603606081101561012757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919050505061040c565b60405180821515815260200191505060405180910390f35b6101cb6004803603604081101561019557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ab565b60405180821515815260200191505060405180910390f35b610225600480360360208110156101f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061053f565b005b6102536004803603602081101561023d57600080fd5b8101908080359060200190929190505050610860565b005b6102b76004803603604081101561026b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109f1565b60405180821515815260200191505060405180910390f35b6102fb600480360360208110156102e557600080fd5b8101908080359060200190929190505050610ab1565b005b61033f6004803603602081101561031357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cb2565b005b6000610403826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610eb190919063ffffffff16565b90509392505050565b60006104a2826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610eb190919063ffffffff16565b90509392505050565b60006105376000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008481526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156105c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610f14602d913960400191505060405180910390fd5b61067b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b156106d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610f6e602d913960400191505060405180910390fd5b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff02191690831515021790555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644683382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b6108ea6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008381526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b61093f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610fc7602c913960400191505060405180910390fd5b436000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000838152602001908152602001600020600101819055507f87dde712783ad4895642c7a875998317a71cf424a2444eb79545ce3795431ff93382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000610aa96000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b905092915050565b610b3b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008381526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b15610b91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610f41602d913960400191505060405180910390fd5b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600083815260200190815260200160002060000160006101000a81548160ff02191690831515021790555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000838152602001908152602001600020600101819055507f4075b367eed0513a54aa39c287c66d6ae98e5df6f73ac087b26b8f89d05d1aa83382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b610d686000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b610dbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610f9b602c913960400191505060405180910390fd5b436000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f1ce3cbbc43ee231e5b950332f2b0b9dd7d349291a3ee411ce5c5c7ed745661bb3382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b60008060009050836000015115610ef657600084602001511415610ed85760019050610ef5565b6000831415610eea5760019050610ef4565b8284602001511190505b5b5b8091505092915050565b6000610f0c8243610eb1565b905091905056fe45787465726e616c4163636f756e7452656769737472793a2063616e6e6f742061646420307830206f776e657245787465726e616c4163636f756e7452656769737472793a2070726f6f6620616c72656164792065786973747345787465726e616c4163636f756e7452656769737472793a206f776e657220616c72656164792065786973747345787465726e616c4163636f756e7452656769737472793a206f776e657220646f65736e277420657869737445787465726e616c4163636f756e7452656769737472793a2070726f6f6620646f65736e2774206578697374a164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "details": "An account can call the registry to add (`addAccountOwner`) or remove (`removeAccountOwner`) its own owners. When the owner has been added, information about that fact will live in the registry forever. Removing an owner only affects the future blocks (until the owner is re-added). Given the fact, there is no way to sign the data using a contract based wallet, we created a registry to store signed by the key wallet proofs. ERC-1271 allows removing a signer after the signature was created. Thus store the signature for the later use doesn't guarantee the signer is still has access to that smart account. Because of that, the ERC1271's `isValidSignature()` cannot be used in e.g. `PaymentRegistry`.* An account can call the registry to add (`addAccountProof`) or remove (`removeAccountProof`) proof hash. When the proof has been added, information about that fact will live in the registry forever. Removing a proof only affects the future blocks (until the proof is re-added).", + "events": { + "AccountOwnerAdded(address,address)": { + "details": "Emitted when the new owner is added", + "params": { + "account": "account address", + "owner": "owner address" + } + }, + "AccountOwnerRemoved(address,address)": { + "details": "Emitted when the existing owner is removed", + "params": { + "account": "account address", + "owner": "owner address" + } + }, + "AccountProofAdded(address,bytes32)": { + "details": "Emitted when the new proof is added", + "params": { + "account": "account address", + "hash": "proof hash" + } + }, + "AccountProofRemoved(address,bytes32)": { + "details": "Emitted when the existing proof is removed", + "params": { + "account": "account address", + "hash": "proof hash" + } + } + }, + "kind": "dev", + "methods": { + "addAccountOwner(address)": { + "params": { + "owner": "owner address" + } + }, + "addAccountProof(bytes32)": { + "params": { + "hash": "proof hash" + } + }, + "removeAccountOwner(address)": { + "params": { + "owner": "owner address" + } + }, + "removeAccountProof(bytes32)": { + "params": { + "hash": "proof hash" + } + }, + "verifyAccountOwner(address,address)": { + "params": { + "account": "account address", + "owner": "owner address" + }, + "returns": { + "_0": "true on correct account owner" + } + }, + "verifyAccountOwnerAtBlock(address,address,uint256)": { + "params": { + "account": "account address", + "blockNumber": "block number to verify", + "owner": "owner address" + }, + "returns": { + "_0": "true on correct account owner" + } + }, + "verifyAccountProof(address,bytes32)": { + "params": { + "account": "account address", + "hash": "proof hash" + }, + "returns": { + "_0": "true on correct account proof" + } + }, + "verifyAccountProofAtBlock(address,bytes32,uint256)": { + "params": { + "account": "account address", + "blockNumber": "block number to verify", + "hash": "proof hash" + }, + "returns": { + "_0": "true on correct account proof" + } + } + }, + "title": "External account registry", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addAccountOwner(address)": { + "notice": "Adds a new account owner" + }, + "addAccountProof(bytes32)": { + "notice": "Adds a new account proof" + }, + "removeAccountOwner(address)": { + "notice": "Removes existing account owner" + }, + "removeAccountProof(bytes32)": { + "notice": "Removes existing account proof" + }, + "verifyAccountOwner(address,address)": { + "notice": "Verifies the owner of the account at current block" + }, + "verifyAccountOwnerAtBlock(address,address,uint256)": { + "notice": "Verifies the owner of the account at specific block" + }, + "verifyAccountProof(address,bytes32)": { + "notice": "Verifies the proof of the account at current block" + }, + "verifyAccountProofAtBlock(address,bytes32,uint256)": { + "notice": "Verifies the proof of the account at specific block" + } + }, + "notice": "Global registry for keys and external (outside of the platform) contract based wallets", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4292, + "contract": "src/external/ExternalAccountRegistry.sol:ExternalAccountRegistry", + "label": "accounts", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_struct(Account)4288_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Account)4288_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct ExternalAccountRegistry.Account)", + "numberOfBytes": "32", + "value": "t_struct(Account)4288_storage" + }, + "t_mapping(t_address,t_struct(BlockRelated)1382_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct BlockLib.BlockRelated)", + "numberOfBytes": "32", + "value": "t_struct(BlockRelated)1382_storage" + }, + "t_mapping(t_bytes32,t_struct(BlockRelated)1382_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct BlockLib.BlockRelated)", + "numberOfBytes": "32", + "value": "t_struct(BlockRelated)1382_storage" + }, + "t_struct(Account)4288_storage": { + "encoding": "inplace", + "label": "struct ExternalAccountRegistry.Account", + "members": [ + { + "astId": 4283, + "contract": "src/external/ExternalAccountRegistry.sol:ExternalAccountRegistry", + "label": "owners", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_struct(BlockRelated)1382_storage)" + }, + { + "astId": 4287, + "contract": "src/external/ExternalAccountRegistry.sol:ExternalAccountRegistry", + "label": "proofs", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_struct(BlockRelated)1382_storage)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(BlockRelated)1382_storage": { + "encoding": "inplace", + "label": "struct BlockLib.BlockRelated", + "members": [ + { + "astId": 1379, + "contract": "src/external/ExternalAccountRegistry.sol:ExternalAccountRegistry", + "label": "added", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1381, + "contract": "src/external/ExternalAccountRegistry.sol:ExternalAccountRegistry", + "label": "removedAtBlockNumber", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuse/Gateway.json b/deployments/fuse/Gateway.json new file mode 100644 index 00000000..73bd0fe2 --- /dev/null +++ b/deployments/fuse/Gateway.json @@ -0,0 +1,578 @@ +{ + "address": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "batch", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bool", + "name": "succeeded", + "type": "bool" + } + ], + "name": "BatchDelegated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "chainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "senderSignature", + "type": "bytes" + } + ], + "name": "delegateBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "senderSignature", + "type": "bytes" + } + ], + "name": "delegateBatchWithGasPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "batches", + "type": "bytes[]" + }, + { + "internalType": "bool", + "name": "revertOnFailure", + "type": "bool" + } + ], + "name": "delegateBatches", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "externalAccountRegistry", + "outputs": [ + { + "internalType": "contract ExternalAccountRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccountNextNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct Gateway.DelegatedBatch", + "name": "delegatedBatch", + "type": "tuple" + } + ], + "name": "hashDelegatedBatch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "gasPrice", + "type": "uint256" + } + ], + "internalType": "struct Gateway.DelegatedBatchWithGasPrice", + "name": "delegatedBatch", + "type": "tuple" + } + ], + "name": "hashDelegatedBatchWithGasPrice", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ExternalAccountRegistry", + "name": "externalAccountRegistry_", + "type": "address" + }, + { + "internalType": "contract PersonalAccountRegistry", + "name": "personalAccountRegistry_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "personalAccountRegistry", + "outputs": [ + { + "internalType": "contract PersonalAccountRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "sendBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "sendBatchFromAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x0b883fff9db01129ea63519e9338f462bb945e3011dcdc67ab1e579ac82f1672", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 29, + "gasUsed": "2083512", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x933b61fe30851f1d07184e1bf071c33bc2d8ba7d6dca0e27284742bb536b415f", + "transactionHash": "0x0b883fff9db01129ea63519e9338f462bb945e3011dcdc67ab1e579ac82f1672", + "logs": [], + "blockNumber": 17842190, + "cumulativeGasUsed": "4168233", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"batch\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"succeeded\",\"type\":\"bool\"}],\"name\":\"BatchDelegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"senderSignature\",\"type\":\"bytes\"}],\"name\":\"delegateBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"senderSignature\",\"type\":\"bytes\"}],\"name\":\"delegateBatchWithGasPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"batches\",\"type\":\"bytes[]\"},{\"internalType\":\"bool\",\"name\":\"revertOnFailure\",\"type\":\"bool\"}],\"name\":\"delegateBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"externalAccountRegistry\",\"outputs\":[{\"internalType\":\"contract ExternalAccountRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getAccountNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"internalType\":\"struct Gateway.DelegatedBatch\",\"name\":\"delegatedBatch\",\"type\":\"tuple\"}],\"name\":\"hashDelegatedBatch\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"}],\"internalType\":\"struct Gateway.DelegatedBatchWithGasPrice\",\"name\":\"delegatedBatch\",\"type\":\"tuple\"}],\"name\":\"hashDelegatedBatchWithGasPrice\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ExternalAccountRegistry\",\"name\":\"externalAccountRegistry_\",\"type\":\"address\"},{\"internalType\":\"contract PersonalAccountRegistry\",\"name\":\"personalAccountRegistry_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"personalAccountRegistry\",\"outputs\":[{\"internalType\":\"contract PersonalAccountRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"sendBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"sendBatchFromAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"events\":{\"BatchDelegated(address,bytes,bool)\":{\"details\":\"Emitted when the single batch is delegated\",\"params\":{\"batch\":\"batch\",\"sender\":\"sender address\",\"succeeded\":\"if succeeded\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Public constructor\"},\"delegateBatch(address,uint256,address[],bytes[],bytes)\":{\"details\":\"Use `hashDelegatedBatch` to create sender message payload. `GatewayRecipient` context api: `_getContextAccount` will return `account` arg `_getContextSender` will return recovered address from `senderSignature` arg\",\"params\":{\"account\":\"account address\",\"data\":\"array of batch data\",\"nonce\":\"next account nonce\",\"senderSignature\":\"sender signature\",\"to\":\"array of batch recipients contracts\"}},\"delegateBatchWithGasPrice(address,uint256,address[],bytes[],bytes)\":{\"details\":\"Use `hashDelegatedBatchWithGasPrice` to create sender message payload (tx.gasprice as gasPrice) `GatewayRecipient` context api: `_getContextAccount` will return `account` arg `_getContextSender` will return recovered address from `senderSignature` arg\",\"params\":{\"account\":\"account address\",\"data\":\"array of batch data\",\"nonce\":\"next account nonce\",\"senderSignature\":\"sender signature\",\"to\":\"array of batch recipients contracts\"}},\"delegateBatches(bytes[],bool)\":{\"details\":\"It will revert when all batches fail\",\"params\":{\"batches\":\"array of batches\",\"revertOnFailure\":\"reverts on any error\"}},\"getAccountNextNonce(address)\":{\"params\":{\"account\":\"account address\"},\"returns\":{\"_0\":\"next nonce\"}},\"hashDelegatedBatch((address,uint256,address[],bytes[]))\":{\"params\":{\"delegatedBatch\":\"struct\"},\"returns\":{\"_0\":\"hash\"}},\"hashDelegatedBatchWithGasPrice((address,uint256,address[],bytes[],uint256))\":{\"params\":{\"delegatedBatch\":\"struct\"},\"returns\":{\"_0\":\"hash\"}},\"initialize(address,address)\":{\"params\":{\"externalAccountRegistry_\":\"`ExternalAccountRegistry` contract address\",\"personalAccountRegistry_\":\"`PersonalAccountRegistry` contract address\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}},\"sendBatch(address[],bytes[])\":{\"details\":\"`GatewayRecipient` context api: `_getContextAccount` will return `msg.sender` `_getContextSender` will return `msg.sender`\",\"params\":{\"data\":\"array of batch data\",\"to\":\"array of batch recipients contracts\"}},\"sendBatchFromAccount(address,address[],bytes[])\":{\"details\":\"`GatewayRecipient` context api: `_getContextAccount` will return `account` arg `_getContextSender` will return `msg.sender`\",\"params\":{\"account\":\"account address\",\"data\":\"array of batch data\",\"to\":\"array of batch recipients contracts\"}}},\"title\":\"Gateway\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"delegateBatch(address,uint256,address[],bytes[],bytes)\":{\"notice\":\"Delegates batch from the account\"},\"delegateBatchWithGasPrice(address,uint256,address[],bytes[],bytes)\":{\"notice\":\"Delegates batch from the account (with gas price)\"},\"delegateBatches(bytes[],bool)\":{\"notice\":\"Delegates multiple batches\"},\"getAccountNextNonce(address)\":{\"notice\":\"Gets next account nonce\"},\"hashDelegatedBatch((address,uint256,address[],bytes[]))\":{\"notice\":\"Hashes `DelegatedBatch` message payload\"},\"hashDelegatedBatchWithGasPrice((address,uint256,address[],bytes[],uint256))\":{\"notice\":\"Hashes `DelegatedBatchWithGasPrice` message payload\"},\"initialize(address,address)\":{\"notice\":\"Initializes `Gateway` contract\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"},\"sendBatch(address[],bytes[])\":{\"notice\":\"Sends batch\"},\"sendBatchFromAccount(address,address[],bytes[])\":{\"notice\":\"Sends batch from the account\"}},\"notice\":\"GSN replacement\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gateway/Gateway.sol\":\"Gateway\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/access/Controlled.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Controlled\\n *\\n * @dev Contract module which provides an access control mechanism.\\n * It ensures there is only one controlling account of the smart contract\\n * and grants that account exclusive access to specific functions.\\n *\\n * The controller account will be the one that deploys the contract.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Controlled {\\n /**\\n * @return controller account address\\n */\\n address public controller;\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if msg.sender is not the controller\\n */\\n modifier onlyController() {\\n require(\\n msg.sender == controller,\\n \\\"Controlled: msg.sender is not the controller\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n controller = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xdf03a0b7ec644da9925c5c1b6c8a86bb1cc1b9c5018bb265a1a4c5044b877af3\",\"license\":\"MIT\"},\"src/common/access/Guarded.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n\\n/**\\n * @title Guarded\\n *\\n * @dev Contract module which provides a guardian-type control mechanism.\\n * It allows key accounts to have guardians and restricts specific methods to be accessible by guardians only.\\n *\\n * Each guardian account can remove other guardians\\n *\\n * Use `_initializeGuarded` to initialize the contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Guarded {\\n using ECDSALib for bytes32;\\n\\n mapping(address => bool) private guardians;\\n\\n // events\\n\\n /**\\n * @dev Emitted when a new guardian is added\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianAdded(\\n address sender,\\n address guardian\\n );\\n\\n /**\\n * @dev Emitted when the existing guardian is removed\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianRemoved(\\n address sender,\\n address guardian\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not a guardian account\\n */\\n modifier onlyGuardian() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n guardians[tx.origin],\\n \\\"Guarded: tx.origin is not the guardian\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new guardian\\n * @param guardian guardian address\\n */\\n function addGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n _addGuardian(guardian);\\n }\\n\\n /**\\n * @notice Removes the existing guardian\\n * @param guardian guardian address\\n */\\n function removeGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin != guardian,\\n \\\"Guarded: cannot remove self\\\"\\n );\\n\\n require(\\n guardians[guardian],\\n \\\"Guarded: guardian doesn't exist\\\"\\n );\\n\\n guardians[guardian] = false;\\n\\n emit GuardianRemoved(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if guardian exists\\n * @param guardian guardian address\\n * @return true when guardian exists\\n */\\n function isGuardian(\\n address guardian\\n )\\n external\\n view\\n returns (bool)\\n {\\n return guardians[guardian];\\n }\\n\\n /**\\n * @notice Verifies guardian signature\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true on correct guardian signature\\n */\\n function verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyGuardianSignature(\\n messageHash,\\n signature\\n );\\n }\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `Guarded` contract\\n * @dev If `guardians_` array is empty `tx.origin` is added as guardian account\\n * @param guardians_ array of guardians addresses\\n */\\n function _initializeGuarded(\\n address[] memory guardians_\\n )\\n internal\\n {\\n if (guardians_.length == 0) {\\n // solhint-disable-next-line avoid-tx-origin\\n _addGuardian(tx.origin);\\n } else {\\n uint guardiansLen = guardians_.length;\\n for (uint i = 0; i < guardiansLen; i++) {\\n _addGuardian(guardians_[i]);\\n }\\n }\\n }\\n\\n\\n // internal functions (views)\\n\\n function _verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n view\\n returns (bool)\\n {\\n address guardian = messageHash.recoverAddress(signature);\\n\\n return guardians[guardian];\\n }\\n\\n // private functions\\n\\n function _addGuardian(\\n address guardian\\n )\\n private\\n {\\n require(\\n guardian != address(0),\\n \\\"Guarded: cannot add 0x0 guardian\\\"\\n );\\n\\n require(\\n !guardians[guardian],\\n \\\"Guarded: guardian already exists\\\"\\n );\\n\\n guardians[guardian] = true;\\n\\n emit GuardianAdded(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n}\\n\",\"keccak256\":\"0x4a5f5670041362e87ea267d81c55fc3edc1a78e81f6f17524b13267f91f31458\",\"license\":\"MIT\"},\"src/common/account/Account.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../access/Controlled.sol\\\";\\nimport \\\"./AccountBase.sol\\\";\\n\\n\\n/**\\n * @title Account\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Account is Controlled, AccountBase {\\n address public implementation;\\n\\n /**\\n * @dev Public constructor\\n * @param registry_ account registry address\\n * @param implementation_ account implementation address\\n */\\n constructor(\\n address registry_,\\n address implementation_\\n )\\n public\\n Controlled()\\n {\\n registry = registry_;\\n implementation = implementation_;\\n }\\n\\n // external functions\\n\\n /**\\n * @notice Payable receive\\n */\\n receive()\\n external\\n payable\\n {\\n //\\n }\\n\\n /**\\n * @notice Fallback\\n */\\n // solhint-disable-next-line payable-fallback\\n fallback()\\n external\\n {\\n if (msg.data.length != 0) {\\n address implementation_ = implementation;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let calldedatasize := calldatasize()\\n\\n calldatacopy(0, 0, calldedatasize)\\n\\n let result := delegatecall(gas(), implementation_, 0, calldedatasize, 0, 0)\\n let returneddatasize := returndatasize()\\n\\n returndatacopy(0, 0, returneddatasize)\\n\\n switch result\\n case 0 { revert(0, returneddatasize) }\\n default { return(0, returneddatasize) }\\n }\\n }\\n }\\n\\n /**\\n * @notice Sets implementation\\n * @param implementation_ implementation address\\n */\\n function setImplementation(\\n address implementation_\\n )\\n external\\n onlyController\\n {\\n implementation = implementation_;\\n }\\n\\n /**\\n * @notice Executes transaction\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @return transaction result\\n */\\n function executeTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n onlyController\\n returns (bytes memory)\\n {\\n bytes memory result;\\n bool succeeded;\\n\\n // solhint-disable-next-line avoid-call-value, avoid-low-level-calls\\n (succeeded, result) = payable(to).call{value: value}(data);\\n\\n require(\\n succeeded,\\n \\\"Account: transaction reverted\\\"\\n );\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe516c999a02a65ee99487d398d0c12589500680a9ca08c852540fb9473d70a26\",\"license\":\"MIT\"},\"src/common/account/AccountBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Account base\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountBase {\\n address public registry;\\n}\\n\",\"keccak256\":\"0xcadf29e389f8db823e14f3f92808fd135f07b0135eb4dcf29b89c85941b39862\",\"license\":\"MIT\"},\"src/common/account/AccountController.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./Account.sol\\\";\\n\\n\\n/**\\n * @title Account controller\\n *\\n * @dev Contract module which provides Account deployment mechanism\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountController {\\n address public accountRegistry;\\n address public accountImplementation;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the account registry is updated\\n * @param accountRegistry account registry address\\n */\\n event AccountRegistryUpdated(\\n address accountRegistry\\n );\\n\\n /**\\n * @dev Emitted when the account implementation is updated\\n * @param accountImplementation account implementation address\\n */\\n event AccountImplementationUpdated(\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the account is deployed\\n * @param account account address\\n * @param accountImplementation account implementation address\\n */\\n event AccountDeployed(\\n address account,\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the account is upgraded\\n * @param account account address\\n * @param accountImplementation account implementation address\\n */\\n event AccountUpgraded(\\n address account,\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the transaction is executed\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @param response response\\n */\\n event AccountTransactionExecuted(\\n address account,\\n address to,\\n uint256 value,\\n bytes data,\\n bytes response\\n );\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `AccountController` contract\\n * @param accountRegistry_ account registry address\\n * @param accountImplementation_ account implementation address\\n */\\n function _initializeAccountController(\\n address accountRegistry_,\\n address accountImplementation_\\n )\\n internal\\n {\\n _setAccountRegistry(accountRegistry_, false);\\n _setAccountImplementation(accountImplementation_, false);\\n }\\n\\n /**\\n * @notice Sets account registry\\n * @param accountRegistry_ account registry address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _setAccountRegistry(\\n address accountRegistry_,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n accountRegistry_ != address(0),\\n \\\"AccountController: cannot set account registry to 0x0\\\"\\n );\\n\\n accountRegistry = accountRegistry_;\\n\\n if (emitEvent) {\\n emit AccountRegistryUpdated(accountRegistry);\\n }\\n }\\n\\n /**\\n * @notice Sets account implementation\\n * @param accountImplementation_ account implementation address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _setAccountImplementation(\\n address accountImplementation_,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n accountImplementation_ != address(0),\\n \\\"AccountController: cannot set account Implementation to 0x0\\\"\\n );\\n\\n accountImplementation = accountImplementation_;\\n\\n if (emitEvent) {\\n emit AccountImplementationUpdated(accountImplementation);\\n }\\n }\\n\\n /**\\n * @notice Deploys account\\n * @param salt CREATE2 salt\\n * @param emitEvent it will emit event when flag is set to true\\n * @return account address\\n */\\n function _deployAccount(\\n bytes32 salt,\\n bool emitEvent\\n )\\n internal\\n returns (address)\\n {\\n address account = address(new Account{salt: salt}(\\n accountRegistry,\\n accountImplementation\\n ));\\n\\n if (emitEvent) {\\n emit AccountDeployed(\\n account,\\n accountImplementation\\n );\\n }\\n\\n return account;\\n }\\n\\n /**\\n * @notice Upgrades account\\n * @param account account address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _upgradeAccount(\\n address account,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n Account(payable(account)).implementation() != accountImplementation,\\n \\\"AccountController: account already upgraded\\\"\\n );\\n\\n Account(payable(account)).setImplementation(accountImplementation);\\n\\n if (emitEvent) {\\n emit AccountUpgraded(\\n account,\\n accountImplementation\\n );\\n }\\n }\\n\\n /**\\n * @notice Executes transaction from the account\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @param emitEvent it will emit event when flag is set to true\\n * @return transaction result\\n */\\n function _executeAccountTransaction(\\n address account,\\n address to,\\n uint256 value,\\n bytes memory data,\\n bool emitEvent\\n )\\n internal\\n returns (bytes memory)\\n {\\n require(\\n to != address(0),\\n \\\"AccountController: cannot send to 0x0\\\"\\n );\\n\\n require(\\n to != address(this),\\n \\\"AccountController: cannot send to controller\\\"\\n );\\n\\n require(\\n to != account,\\n \\\"AccountController: cannot send to self\\\"\\n );\\n\\n bytes memory response = Account(payable(account)).executeTransaction(\\n to,\\n value,\\n data\\n );\\n\\n if (emitEvent) {\\n emit AccountTransactionExecuted(\\n account,\\n to,\\n value,\\n data,\\n response\\n );\\n }\\n\\n return response;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Computes account CREATE2 address\\n * @param salt CREATE2 salt\\n * @return account address\\n */\\n function _computeAccountAddress(\\n bytes32 salt\\n )\\n internal\\n view\\n returns (address)\\n {\\n bytes memory creationCode = abi.encodePacked(\\n type(Account).creationCode,\\n bytes12(0),\\n accountRegistry,\\n bytes12(0),\\n accountImplementation\\n );\\n\\n bytes32 data = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n salt,\\n keccak256(creationCode)\\n )\\n );\\n\\n return address(uint160(uint256(data)));\\n }\\n}\\n\",\"keccak256\":\"0xe161f1f4f6ea5d3a9810f7c93764d55e473abe1054e6aa68fde791be7d70a26c\",\"license\":\"MIT\"},\"src/common/account/AccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./Account.sol\\\";\\n\\n\\n/**\\n * @title Account registry\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nabstract contract AccountRegistry {\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param message message\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes calldata message,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0x2d40245721f5f74219e5cf88713246dbe8b6d5404e941125d3e850b1f127ec34\",\"license\":\"MIT\"},\"src/common/libs/BlockLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Block library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BlockLib {\\n struct BlockRelated {\\n bool added;\\n uint256 removedAtBlockNumber;\\n }\\n\\n /**\\n * @notice Verifies self struct at current block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtCurrentBlock(\\n BlockRelated memory self\\n )\\n internal\\n view\\n returns (bool)\\n {\\n return verifyAtBlock(self, block.number);\\n }\\n\\n /**\\n * @notice Verifies self struct at any block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtAnyBlock(\\n BlockRelated memory self\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n return verifyAtBlock(self, 0);\\n }\\n\\n /**\\n * @notice Verifies self struct at specific block\\n * @param self self struct\\n * @param blockNumber block number to verify\\n * @return true on correct self struct\\n */\\n function verifyAtBlock(\\n BlockRelated memory self,\\n uint256 blockNumber\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n bool result = false;\\n\\n if (self.added) {\\n if (self.removedAtBlockNumber == 0) {\\n result = true;\\n } else if (blockNumber == 0) {\\n result = true;\\n } else {\\n result = self.removedAtBlockNumber > blockNumber;\\n }\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9205536bc211f86d1113118a44dddfa7a9b9772a918cf4b1575c982a05472587\",\"license\":\"MIT\"},\"src/common/libs/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Bytes library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BytesLib {\\n /**\\n * @notice Converts bytes to address\\n * @param data data\\n * @return address\\n */\\n function toAddress(\\n bytes memory data\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result;\\n\\n require(\\n data.length == 20,\\n \\\"BytesLib: invalid data length\\\"\\n );\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := div(mload(add(data, 0x20)), 0x1000000000000000000000000)\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x64c84964ea91bfb1f2d859eea6c57fe5b4a6f269951a4adf5f58d306c54c7f76\",\"license\":\"MIT\"},\"src/common/libs/ECDSAExtendedLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./StringsLib.sol\\\";\\n\\n\\n/**\\n * @title ECDSA extended library\\n */\\nlibrary ECDSAExtendedLib {\\n using StringsLib for uint;\\n\\n function toEthereumSignedMessageHash(\\n bytes memory message\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n\\\",\\n message.length.toString(),\\n abi.encodePacked(message)\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x83e6056caaba892d91de45324f4d2702ac01695fab2d34c86895d7d288547ba3\",\"license\":\"MIT\"},\"src/common/libs/ECDSALib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ECDSA library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/cryptography/ECDSA.sol#L26\\n */\\nlibrary ECDSALib {\\n function recoverAddress(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n\\n if (v < 27) {\\n v += 27;\\n }\\n\\n if (v == 27 || v == 28) {\\n result = ecrecover(messageHash, v, r, s);\\n }\\n }\\n\\n return result;\\n }\\n\\n function toEthereumSignedMessageHash(\\n bytes32 messageHash\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n messageHash\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x3b1460d688302eb595268c2af147ab532f29dbced66520e013f48d498eed3cec\",\"license\":\"MIT\"},\"src/common/libs/SafeMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Safe math library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/math/SafeMath.sol\\n */\\nlibrary SafeMathLib {\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n\\n require(c >= a, \\\"SafeMathLib: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMathLib: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n\\n return a - b;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n\\n require(c / a == b, \\\"SafeMathLib: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMathLib: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n\\n return a / b;\\n }\\n\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMathLib: modulo by zero\\\");\\n }\\n\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x6089f354ca754d9c5dd9e800ee5ed86717dbf8f9af470604e0be691ac57c0107\",\"license\":\"MIT\"},\"src/common/libs/StringsLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Strings library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/utils/Strings.sol#L12\\n */\\nlibrary StringsLib {\\n function toString(\\n uint256 value\\n )\\n internal\\n pure\\n returns (string memory)\\n {\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n\\n uint256 temp = value;\\n uint256 digits;\\n\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n\\n while (temp != 0) {\\n buffer[index--] = byte(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0x4110150d0c921fd31db34ca33672de8e81c3ae467076149a3a546f804d1f58dd\",\"license\":\"MIT\"},\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/common/signature/SignatureValidator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n/**\\n * @title Signature validator\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract SignatureValidator {\\n using ECDSALib for bytes32;\\n\\n uint256 public chainId;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {\\n uint256 chainId_;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n chainId_ := chainid()\\n }\\n\\n chainId = chainId_;\\n }\\n\\n // internal functions\\n\\n function _hashMessagePayload(\\n bytes32 messagePrefix,\\n bytes memory messagePayload\\n )\\n internal\\n view\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n chainId,\\n address(this),\\n messagePrefix,\\n messagePayload\\n )).toEthereumSignedMessageHash();\\n }\\n}\\n\",\"keccak256\":\"0xc1168f7ccb74aea67089941dc5e4c1d1c4aa766afca47a90c0b017b8445b8acf\",\"license\":\"MIT\"},\"src/common/token/ERC20Token.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/SafeMathLib.sol\\\";\\n\\n\\n/**\\n * @title ERC20 token\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/token/ERC20/ERC20.sol\\n */\\ncontract ERC20Token {\\n using SafeMathLib for uint256;\\n\\n string public name;\\n string public symbol;\\n uint8 public decimals;\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) internal balances;\\n mapping(address => mapping(address => uint256)) internal allowances;\\n\\n // events\\n\\n event Transfer(\\n address indexed from,\\n address indexed to,\\n uint256 value\\n );\\n\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n function transfer(\\n address to,\\n uint256 value\\n )\\n external\\n returns (bool)\\n {\\n _transfer(_getSender(), to, value);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n address sender = _getSender();\\n\\n _transfer(from, to, value);\\n _approve(from, sender, allowances[from][sender].sub(value));\\n\\n return true;\\n }\\n\\n function approve(\\n address spender,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n _approve(_getSender(), spender, value);\\n\\n return true;\\n }\\n\\n // external functions (views)\\n\\n function balanceOf(\\n address owner\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return balances[owner];\\n }\\n\\n function allowance(\\n address owner,\\n address spender\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[owner][spender];\\n }\\n\\n // internal functions\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n from != address(0),\\n \\\"ERC20Token: cannot transfer from 0x0 address\\\"\\n );\\n require(\\n to != address(0),\\n \\\"ERC20Token: cannot transfer to 0x0 address\\\"\\n );\\n\\n balances[from] = balances[from].sub(value);\\n balances[to] = balances[to].add(value);\\n\\n emit Transfer(from, to, value);\\n }\\n\\n function _approve(\\n address owner,\\n address spender,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot approve from 0x0 address\\\"\\n );\\n require(\\n spender != address(0),\\n \\\"ERC20Token: cannot approve to 0x0 address\\\"\\n );\\n\\n allowances[owner][spender] = value;\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function _mint(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot mint to 0x0 address\\\"\\n );\\n require(\\n value > 0,\\n \\\"ERC20Token: cannot mint 0 value\\\"\\n );\\n\\n balances[owner] = balances[owner].add(value);\\n totalSupply = totalSupply.add(value);\\n\\n emit Transfer(address(0), owner, value);\\n }\\n\\n function _burn(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot burn from 0x0 address\\\"\\n );\\n\\n balances[owner] = balances[owner].sub(\\n value,\\n \\\"ERC20Token: burn value exceeds balance\\\"\\n );\\n\\n totalSupply = totalSupply.sub(value);\\n\\n emit Transfer(owner, address(0), value);\\n }\\n\\n // internal functions (views)\\n\\n function _getSender()\\n virtual\\n internal\\n view\\n returns (address)\\n {\\n return msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x6f2b0bd08da549c6c1f5ceee85766832d587dde62c56bebc3a14bd9ea407e03d\",\"license\":\"MIT\"},\"src/external/ExternalAccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BlockLib.sol\\\";\\n\\n\\n/**\\n * @title External account registry\\n *\\n * @notice Global registry for keys and external (outside of the platform) contract based wallets\\n *\\n * @dev An account can call the registry to add (`addAccountOwner`) or remove (`removeAccountOwner`) its own owners.\\n * When the owner has been added, information about that fact will live in the registry forever.\\n * Removing an owner only affects the future blocks (until the owner is re-added).\\n *\\n * Given the fact, there is no way to sign the data using a contract based wallet,\\n * we created a registry to store signed by the key wallet proofs.\\n * ERC-1271 allows removing a signer after the signature was created. Thus store the signature for the later use\\n * doesn't guarantee the signer is still has access to that smart account.\\n * Because of that, the ERC1271's `isValidSignature()` cannot be used in e.g. `PaymentRegistry`.*\\n *\\n * An account can call the registry to add (`addAccountProof`) or remove (`removeAccountProof`) proof hash.\\n * When the proof has been added, information about that fact will live in the registry forever.\\n * Removing a proof only affects the future blocks (until the proof is re-added).\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract ExternalAccountRegistry {\\n using BlockLib for BlockLib.BlockRelated;\\n\\n struct Account {\\n mapping(address => BlockLib.BlockRelated) owners;\\n mapping(bytes32 => BlockLib.BlockRelated) proofs;\\n }\\n\\n mapping(address => Account) private accounts;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the new owner is added\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerAdded(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the existing owner is removed\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerRemoved(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the new proof is added\\n * @param account account address\\n * @param hash proof hash\\n */\\n event AccountProofAdded(\\n address account,\\n bytes32 hash\\n );\\n\\n /**\\n * @dev Emitted when the existing proof is removed\\n * @param account account address\\n * @param hash proof hash\\n */\\n event AccountProofRemoved(\\n address account,\\n bytes32 hash\\n );\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new account owner\\n * @param owner owner address\\n */\\n function addAccountOwner(\\n address owner\\n )\\n external\\n {\\n require(\\n owner != address(0),\\n \\\"ExternalAccountRegistry: cannot add 0x0 owner\\\"\\n );\\n\\n require(\\n !accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: owner already exists\\\"\\n );\\n\\n accounts[msg.sender].owners[owner].added = true;\\n accounts[msg.sender].owners[owner].removedAtBlockNumber = 0;\\n\\n emit AccountOwnerAdded(\\n msg.sender,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Removes existing account owner\\n * @param owner owner address\\n */\\n function removeAccountOwner(\\n address owner\\n )\\n external\\n {\\n require(\\n accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: owner doesn't exist\\\"\\n );\\n\\n accounts[msg.sender].owners[owner].removedAtBlockNumber = block.number;\\n\\n emit AccountOwnerRemoved(\\n msg.sender,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Adds a new account proof\\n * @param hash proof hash\\n */\\n function addAccountProof(\\n bytes32 hash\\n )\\n external\\n {\\n require(\\n !accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: proof already exists\\\"\\n );\\n\\n accounts[msg.sender].proofs[hash].added = true;\\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = 0;\\n\\n emit AccountProofAdded(\\n msg.sender,\\n hash\\n );\\n }\\n\\n /**\\n * @notice Removes existing account proof\\n * @param hash proof hash\\n */\\n function removeAccountProof(\\n bytes32 hash\\n )\\n external\\n {\\n require(\\n accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: proof doesn't exist\\\"\\n );\\n\\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = block.number;\\n\\n emit AccountProofRemoved(\\n msg.sender,\\n hash\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Verifies the owner of the account at current block\\n * @param account account address\\n * @param owner owner address\\n * @return true on correct account owner\\n */\\n function verifyAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].owners[owner].verifyAtCurrentBlock();\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at specific block\\n * @param account account address\\n * @param owner owner address\\n * @param blockNumber block number to verify\\n * @return true on correct account owner\\n */\\n function verifyAccountOwnerAtBlock(\\n address account,\\n address owner,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].owners[owner].verifyAtBlock(blockNumber);\\n }\\n\\n /**\\n * @notice Verifies the proof of the account at current block\\n * @param account account address\\n * @param hash proof hash\\n * @return true on correct account proof\\n */\\n function verifyAccountProof(\\n address account,\\n bytes32 hash\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].proofs[hash].verifyAtCurrentBlock();\\n }\\n\\n /**\\n * @notice Verifies the proof of the account at specific block\\n * @param account account address\\n * @param hash proof hash\\n * @param blockNumber block number to verify\\n * @return true on correct account proof\\n */\\n function verifyAccountProofAtBlock(\\n address account,\\n bytes32 hash,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].proofs[hash].verifyAtBlock(blockNumber);\\n }\\n}\\n\",\"keccak256\":\"0x8067b1fae41b73949f8d871a835533cbdd94b9ca3faa93b91f595c37e632ccdb\",\"license\":\"MIT\"},\"src/gateway/Gateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../common/libs/ECDSALib.sol\\\";\\nimport \\\"../common/libs/SafeMathLib.sol\\\";\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"../common/signature/SignatureValidator.sol\\\";\\nimport \\\"../external/ExternalAccountRegistry.sol\\\";\\nimport \\\"../personal/PersonalAccountRegistry.sol\\\";\\n\\n\\n/**\\n * @title Gateway\\n *\\n * @notice GSN replacement\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Gateway is Initializable, SignatureValidator {\\n using ECDSALib for bytes32;\\n using SafeMathLib for uint256;\\n\\n struct DelegatedBatch {\\n address account;\\n uint256 nonce;\\n address[] to;\\n bytes[] data;\\n }\\n\\n struct DelegatedBatchWithGasPrice {\\n address account;\\n uint256 nonce;\\n address[] to;\\n bytes[] data;\\n uint256 gasPrice;\\n }\\n\\n bytes32 private constant HASH_PREFIX_DELEGATED_BATCH = keccak256(\\n \\\"DelegatedBatch(address account,uint256 nonce,address[] to,bytes[] data)\\\"\\n );\\n\\n bytes32 private constant HASH_PREFIX_DELEGATED_BATCH_WITH_GAS_PRICE = keccak256(\\n \\\"DelegatedBatchWithGasPrice(address account,uint256 nonce,address[] to,bytes[] data,uint256 gasPrice)\\\"\\n );\\n\\n ExternalAccountRegistry public externalAccountRegistry;\\n PersonalAccountRegistry public personalAccountRegistry;\\n\\n mapping(address => uint256) private accountNonce;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the single batch is delegated\\n * @param sender sender address\\n * @param batch batch\\n * @param succeeded if succeeded\\n */\\n event BatchDelegated(\\n address sender,\\n bytes batch,\\n bool succeeded\\n );\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Initializable() SignatureValidator() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `Gateway` contract\\n * @param externalAccountRegistry_ `ExternalAccountRegistry` contract address\\n * @param personalAccountRegistry_ `PersonalAccountRegistry` contract address\\n */\\n function initialize(\\n ExternalAccountRegistry externalAccountRegistry_,\\n PersonalAccountRegistry personalAccountRegistry_\\n )\\n external\\n onlyInitializer\\n {\\n externalAccountRegistry = externalAccountRegistry_;\\n personalAccountRegistry = personalAccountRegistry_;\\n }\\n\\n // public functions\\n\\n /**\\n * @notice Sends batch\\n * @dev `GatewayRecipient` context api:\\n * `_getContextAccount` will return `msg.sender`\\n * `_getContextSender` will return `msg.sender`\\n *\\n * @param to array of batch recipients contracts\\n * @param data array of batch data\\n */\\n function sendBatch(\\n address[] memory to,\\n bytes[] memory data\\n )\\n public\\n {\\n _sendBatch(\\n msg.sender,\\n msg.sender,\\n to,\\n data\\n );\\n }\\n\\n /**\\n * @notice Sends batch from the account\\n * @dev `GatewayRecipient` context api:\\n * `_getContextAccount` will return `account` arg\\n * `_getContextSender` will return `msg.sender`\\n *\\n * @param account account address\\n * @param to array of batch recipients contracts\\n * @param data array of batch data\\n */\\n function sendBatchFromAccount(\\n address account,\\n address[] memory to,\\n bytes[] memory data\\n )\\n public\\n {\\n _sendBatch(\\n account,\\n msg.sender,\\n to,\\n data\\n );\\n }\\n\\n /**\\n * @notice Delegates batch from the account\\n * @dev Use `hashDelegatedBatch` to create sender message payload.\\n *\\n * `GatewayRecipient` context api:\\n * `_getContextAccount` will return `account` arg\\n * `_getContextSender` will return recovered address from `senderSignature` arg\\n *\\n * @param account account address\\n * @param nonce next account nonce\\n * @param to array of batch recipients contracts\\n * @param data array of batch data\\n * @param senderSignature sender signature\\n */\\n function delegateBatch(\\n address account,\\n uint256 nonce,\\n address[] memory to,\\n bytes[] memory data,\\n bytes memory senderSignature\\n )\\n public\\n {\\n require(\\n nonce > accountNonce[account],\\n \\\"Gateway: nonce is lower than current account nonce\\\"\\n );\\n\\n address sender = _hashDelegatedBatch(\\n account,\\n nonce,\\n to,\\n data\\n ).recoverAddress(senderSignature);\\n\\n accountNonce[account] = nonce;\\n\\n _sendBatch(\\n account,\\n sender,\\n to,\\n data\\n );\\n }\\n\\n /**\\n * @notice Delegates batch from the account (with gas price)\\n *\\n * @dev Use `hashDelegatedBatchWithGasPrice` to create sender message payload (tx.gasprice as gasPrice)\\n *\\n * `GatewayRecipient` context api:\\n * `_getContextAccount` will return `account` arg\\n * `_getContextSender` will return recovered address from `senderSignature` arg\\n *\\n * @param account account address\\n * @param nonce next account nonce\\n * @param to array of batch recipients contracts\\n * @param data array of batch data\\n * @param senderSignature sender signature\\n */\\n function delegateBatchWithGasPrice(\\n address account,\\n uint256 nonce,\\n address[] memory to,\\n bytes[] memory data,\\n bytes memory senderSignature\\n )\\n public\\n {\\n require(\\n nonce > accountNonce[account],\\n \\\"Gateway: nonce is lower than current account nonce\\\"\\n );\\n\\n address sender = _hashDelegatedBatchWithGasPrice(\\n account,\\n nonce,\\n to,\\n data,\\n tx.gasprice\\n ).recoverAddress(senderSignature);\\n\\n accountNonce[account] = nonce;\\n\\n _sendBatch(\\n account,\\n sender,\\n to,\\n data\\n );\\n }\\n\\n /**\\n * @notice Delegates multiple batches\\n * @dev It will revert when all batches fail\\n * @param batches array of batches\\n * @param revertOnFailure reverts on any error\\n */\\n function delegateBatches(\\n bytes[] memory batches,\\n bool revertOnFailure\\n )\\n public\\n {\\n require(\\n batches.length > 0,\\n \\\"Gateway: cannot delegate empty batches\\\"\\n );\\n\\n bool anySucceeded;\\n\\n for (uint256 i = 0; i < batches.length; i++) {\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool succeeded,) = address(this).call(batches[i]);\\n\\n if (revertOnFailure) {\\n require(\\n succeeded,\\n \\\"Gateway: batch reverted\\\"\\n );\\n } else if (succeeded && !anySucceeded) {\\n anySucceeded = true;\\n }\\n\\n emit BatchDelegated(\\n msg.sender,\\n batches[i],\\n succeeded\\n );\\n }\\n\\n if (!anySucceeded) {\\n revert(\\\"Gateway: all batches reverted\\\");\\n }\\n }\\n\\n // public functions (views)\\n\\n /**\\n * @notice Hashes `DelegatedBatch` message payload\\n * @param delegatedBatch struct\\n * @return hash\\n */\\n function hashDelegatedBatch(\\n DelegatedBatch memory delegatedBatch\\n )\\n public\\n view\\n returns (bytes32)\\n {\\n return _hashDelegatedBatch(\\n delegatedBatch.account,\\n delegatedBatch.nonce,\\n delegatedBatch.to,\\n delegatedBatch.data\\n );\\n }\\n\\n /**\\n * @notice Hashes `DelegatedBatchWithGasPrice` message payload\\n * @param delegatedBatch struct\\n * @return hash\\n */\\n function hashDelegatedBatchWithGasPrice(\\n DelegatedBatchWithGasPrice memory delegatedBatch\\n )\\n public\\n view\\n returns (bytes32)\\n {\\n return _hashDelegatedBatchWithGasPrice(\\n delegatedBatch.account,\\n delegatedBatch.nonce,\\n delegatedBatch.to,\\n delegatedBatch.data,\\n delegatedBatch.gasPrice\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Gets next account nonce\\n * @param account account address\\n * @return next nonce\\n */\\n function getAccountNextNonce(\\n address account\\n )\\n external\\n view\\n returns (uint256)\\n {\\n return accountNonce[account].add(1);\\n }\\n\\n // private functions\\n\\n function _sendBatch(\\n address account,\\n address sender,\\n address[] memory to,\\n bytes[] memory data\\n )\\n private\\n {\\n require(\\n account != address(0),\\n \\\"Gateway: cannot send from 0x0 account\\\"\\n );\\n require(\\n to.length > 0,\\n \\\"Gateway: cannot send empty batch\\\"\\n );\\n require(\\n data.length == to.length,\\n \\\"Gateway: invalid batch\\\"\\n );\\n\\n if (account != sender) {\\n require(\\n personalAccountRegistry.verifyAccountOwner(account, sender) ||\\n externalAccountRegistry.verifyAccountOwner(account, sender),\\n \\\"Gateway: sender is not the account owner\\\"\\n );\\n }\\n\\n bool succeeded;\\n\\n for (uint256 i = 0; i < data.length; i++) {\\n require(\\n to[i] != address(0),\\n \\\"Gateway: cannot send to 0x0\\\"\\n );\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (succeeded,) = to[i].call(abi.encodePacked(data[i], account, sender));\\n\\n require(\\n succeeded,\\n \\\"Gateway: batch transaction reverted\\\"\\n );\\n }\\n }\\n\\n // private functions (views)\\n\\n function _hashDelegatedBatch(\\n address account,\\n uint256 nonce,\\n address[] memory to,\\n bytes[] memory data\\n )\\n private\\n view\\n returns (bytes32)\\n {\\n return _hashMessagePayload(HASH_PREFIX_DELEGATED_BATCH, abi.encodePacked(\\n account,\\n nonce,\\n to,\\n _concatBytes(data)\\n ));\\n }\\n\\n function _hashDelegatedBatchWithGasPrice(\\n address account,\\n uint256 nonce,\\n address[] memory to,\\n bytes[] memory data,\\n uint256 gasPrice\\n )\\n private\\n view\\n returns (bytes32)\\n {\\n return _hashMessagePayload(HASH_PREFIX_DELEGATED_BATCH_WITH_GAS_PRICE, abi.encodePacked(\\n account,\\n nonce,\\n to,\\n _concatBytes(data),\\n gasPrice\\n ));\\n }\\n\\n// private functions (pure)\\n\\n function _concatBytes(bytes[] memory data)\\n private\\n pure\\n returns (bytes memory)\\n {\\n bytes memory result;\\n uint dataLen = data.length;\\n\\n for (uint i = 0 ; i < dataLen ; i++) {\\n result = abi.encodePacked(result, data[i]);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x666f10ebf96aef0a37607852871a6e1d816a271558b1dce43dda74fc73274ae4\",\"license\":\"MIT\"},\"src/gateway/GatewayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BytesLib.sol\\\";\\n\\n\\n/**\\n * @title Gateway recipient\\n *\\n * @notice Gateway target contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract GatewayRecipient {\\n using BytesLib for bytes;\\n\\n address public gateway;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `GatewayRecipient` contract\\n * @param gateway_ `Gateway` contract address\\n */\\n function _initializeGatewayRecipient(\\n address gateway_\\n )\\n internal\\n {\\n gateway = gateway_;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Gets gateway context account\\n * @return context account address\\n */\\n function _getContextAccount()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(40);\\n }\\n\\n /**\\n * @notice Gets gateway context sender\\n * @return context sender address\\n */\\n function _getContextSender()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(20);\\n }\\n\\n /**\\n * @notice Gets gateway context data\\n * @return context data\\n */\\n function _getContextData()\\n internal\\n view\\n returns (bytes calldata)\\n {\\n bytes calldata result;\\n\\n if (_isGatewaySender()) {\\n result = msg.data[:msg.data.length - 40];\\n } else {\\n result = msg.data;\\n }\\n\\n return result;\\n }\\n\\n // private functions (views)\\n\\n function _getContextAddress(\\n uint256 offset\\n )\\n private\\n view\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (_isGatewaySender()) {\\n uint from = msg.data.length - offset;\\n result = bytes(msg.data[from:from + 20]).toAddress();\\n } else {\\n result = msg.sender;\\n }\\n\\n return result;\\n }\\n\\n function _isGatewaySender()\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (msg.sender == gateway) {\\n require(\\n msg.data.length >= 44,\\n \\\"GatewayRecipient: invalid msg.data\\\"\\n );\\n\\n result = true;\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe3fd29479d748d67360c61a9cbaafc66eaca25f476e59a45e842472bcf5233fc\",\"license\":\"MIT\"},\"src/personal/PersonalAccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/access/Guarded.sol\\\";\\nimport \\\"../common/account/AccountController.sol\\\";\\nimport \\\"../common/account/AccountRegistry.sol\\\";\\nimport \\\"../common/libs/BlockLib.sol\\\";\\nimport \\\"../common/libs/ECDSALib.sol\\\";\\nimport \\\"../common/libs/ECDSAExtendedLib.sol\\\";\\nimport \\\"../common/libs/SafeMathLib.sol\\\";\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"../common/token/ERC20Token.sol\\\";\\nimport \\\"../gateway/GatewayRecipient.sol\\\";\\n\\n\\n/**\\n * @title Personal account registry\\n *\\n * @notice A registry for personal (controlled by owners) accounts\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract PersonalAccountRegistry is Guarded, AccountController, AccountRegistry, Initializable, GatewayRecipient {\\n using BlockLib for BlockLib.BlockRelated;\\n using SafeMathLib for uint256;\\n using ECDSALib for bytes32;\\n using ECDSAExtendedLib for bytes;\\n\\n struct Account {\\n bool deployed;\\n bytes32 salt;\\n mapping(address => BlockLib.BlockRelated) owners;\\n }\\n\\n mapping(address => Account) private accounts;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the new owner is added\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerAdded(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the existing owner is removed\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerRemoved(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the call is refunded\\n * @param account account address\\n * @param beneficiary beneficiary address\\n * @param token token address\\n * @param value value\\n */\\n event AccountCallRefunded(\\n address account,\\n address beneficiary,\\n address token,\\n uint256 value\\n );\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Initializable() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `PersonalAccountRegistry` contract\\n * @param guardians_ array of guardians addresses\\n * @param accountImplementation_ account implementation address\\n * @param gateway_ `Gateway` contract address\\n */\\n function initialize(\\n address[] calldata guardians_,\\n address accountImplementation_,\\n address gateway_\\n )\\n external\\n onlyInitializer\\n {\\n // Guarded\\n _initializeGuarded(guardians_);\\n\\n // AccountController\\n _initializeAccountController(address(this), accountImplementation_);\\n\\n // GatewayRecipient\\n _initializeGatewayRecipient(gateway_);\\n }\\n\\n /**\\n * @notice Upgrades `PersonalAccountRegistry` contract\\n * @param accountImplementation_ account implementation address\\n */\\n function upgrade(\\n address accountImplementation_\\n )\\n external\\n onlyGuardian\\n {\\n _setAccountImplementation(accountImplementation_, true);\\n }\\n\\n /**\\n * @notice Deploys account\\n * @param account account address\\n */\\n function deployAccount(\\n address account\\n )\\n external\\n {\\n _verifySender(account);\\n _deployAccount(account);\\n }\\n\\n /**\\n * @notice Upgrades account\\n * @param account account address\\n */\\n function upgradeAccount(\\n address account\\n )\\n external\\n {\\n _verifySender(account);\\n _upgradeAccount(account, true);\\n }\\n\\n /**\\n * @notice Adds a new account owner\\n * @param account account address\\n * @param owner owner address\\n */\\n function addAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n {\\n _verifySender(account);\\n\\n require(\\n owner != address(0),\\n \\\"PersonalAccountRegistry: cannot add 0x0 owner\\\"\\n );\\n\\n require(\\n !accounts[account].owners[owner].verifyAtCurrentBlock(),\\n \\\"PersonalAccountRegistry: owner already exists\\\"\\n );\\n\\n accounts[account].owners[owner].added = true;\\n accounts[account].owners[owner].removedAtBlockNumber = 0;\\n\\n emit AccountOwnerAdded(\\n account,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Removes the existing account owner\\n * @param account account address\\n * @param owner owner address\\n */\\n function removeAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n {\\n address sender = _verifySender(account);\\n\\n require(\\n owner != sender,\\n \\\"PersonalAccountRegistry: cannot remove self\\\"\\n );\\n\\n require(\\n accounts[account].owners[owner].verifyAtCurrentBlock(),\\n \\\"PersonalAccountRegistry: owner doesn't exist\\\"\\n );\\n\\n accounts[account].owners[owner].removedAtBlockNumber = block.number;\\n\\n emit AccountOwnerRemoved(\\n account,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Executes account transaction\\n * @dev Deploys an account if not deployed yet\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n */\\n function executeAccountTransaction(\\n address account,\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n {\\n _verifySender(account);\\n\\n _deployAccount(account);\\n\\n _executeAccountTransaction(\\n account,\\n to,\\n value,\\n data,\\n true\\n );\\n }\\n\\n /**\\n * @notice Refunds account call\\n * @dev Deploys an account if not deployed yet\\n * @param account account address\\n * @param token token address\\n * @param value value\\n */\\n function refundAccountCall(\\n address account,\\n address token,\\n uint256 value\\n )\\n external\\n {\\n _verifySender(account);\\n\\n _deployAccount(account);\\n\\n /* solhint-disable avoid-tx-origin */\\n\\n if (token == address(0)) {\\n _executeAccountTransaction(\\n account,\\n tx.origin,\\n value,\\n new bytes(0),\\n false\\n );\\n } else {\\n bytes memory response = _executeAccountTransaction(\\n account,\\n token,\\n 0,\\n abi.encodeWithSelector(\\n ERC20Token(token).transfer.selector,\\n tx.origin,\\n value\\n ),\\n false\\n );\\n\\n if (response.length > 0) {\\n require(\\n abi.decode(response, (bool)),\\n \\\"PersonalAccountRegistry: ERC20Token transfer reverted\\\"\\n );\\n }\\n }\\n\\n emit AccountCallRefunded(\\n account,\\n tx.origin,\\n token,\\n value\\n );\\n\\n /* solhint-enable avoid-tx-origin */\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Computes account address\\n * @param saltOwner salt owner address\\n * @return account address\\n */\\n function computeAccountAddress(\\n address saltOwner\\n )\\n external\\n view\\n returns (address)\\n {\\n return _computeAccountAddress(saltOwner);\\n }\\n\\n /**\\n * @notice Checks if account is deployed\\n * @param account account address\\n * @return true when account is deployed\\n */\\n function isAccountDeployed(\\n address account\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].deployed;\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at the current block\\n * @param account account address\\n * @param owner owner address\\n * @return true on correct account owner\\n */\\n function verifyAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(account, owner);\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at a specific block\\n * @param account account address\\n * @param owner owner address\\n * @param blockNumber block number to verify\\n * @return true on correct account owner\\n */\\n function verifyAccountOwnerAtBlock(\\n address account,\\n address owner,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n bool result = false;\\n\\n if (_verifyAccountOwner(account, owner)) {\\n result = true;\\n } else {\\n result = accounts[account].owners[owner].verifyAtBlock(blockNumber);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param messageHash message hash\\n * @param signature signature\\n * @return magic hash if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n override\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(\\n account,\\n messageHash.recoverAddress(signature)\\n );\\n }\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param message message\\n * @param signature signature\\n * @return magic hash if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes calldata message,\\n bytes calldata signature\\n )\\n override\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(\\n account,\\n message.toEthereumSignedMessageHash().recoverAddress(signature)\\n );\\n }\\n\\n // private functions\\n\\n function _verifySender(\\n address account\\n )\\n private\\n returns (address)\\n {\\n address sender = _getContextSender();\\n\\n if (accounts[account].owners[sender].added) {\\n require(\\n accounts[account].owners[sender].removedAtBlockNumber == 0,\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n } else {\\n require(\\n accounts[account].salt == 0,\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n\\n bytes32 salt = keccak256(\\n abi.encodePacked(sender)\\n );\\n\\n require(\\n account == _computeAccountAddress(salt),\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n\\n accounts[account].salt = salt;\\n accounts[account].owners[sender].added = true;\\n\\n emit AccountOwnerAdded(\\n account,\\n sender\\n );\\n }\\n\\n return sender;\\n }\\n\\n function _deployAccount(\\n address account\\n )\\n internal\\n {\\n if (!accounts[account].deployed) {\\n _deployAccount(\\n accounts[account].salt,\\n true\\n );\\n\\n accounts[account].deployed = true;\\n }\\n }\\n\\n // private functions (views)\\n\\n function _computeAccountAddress(\\n address saltOwner\\n )\\n private\\n view\\n returns (address)\\n {\\n bytes32 salt = keccak256(\\n abi.encodePacked(saltOwner)\\n );\\n\\n return _computeAccountAddress(salt);\\n }\\n\\n function _verifyAccountOwner(\\n address account,\\n address owner\\n )\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (accounts[account].owners[owner].added) {\\n result = accounts[account].owners[owner].removedAtBlockNumber == 0;\\n } else if (accounts[account].salt == 0) {\\n result = account == _computeAccountAddress(owner);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xdae162610e707ab8c394b3edf924b75ef1f315520935cb88f4280b29eeaf4b61\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600046905080600181905550506123f58061006d6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063867519c61161008c5780639f255626116100665780639f255626146101fe578063b5021b161461021a578063d2c83b9a14610236578063f92c5f7c14610254576100cf565b8063867519c6146101a657806387d31313146101c25780639a8a0592146101e0576100cf565b8063231badaf146100d4578063392e53cd146100f0578063485cc9551461010e5780635afaa7bb1461012a57806373e5a13f1461014657806376db2b4c14610176575b600080fd5b6100ee60048036038101906100e99190611438565b610284565b005b6100f861037f565b6040516101059190611e71565b60405180910390f35b610128600480360381019061012391906115e0565b6103d5565b005b610144600480360381019061013f9190611563565b610561565b005b610160600480360381019061015b919061165d565b610739565b60405161016d9190611e8c565b60405180910390f35b610190600480360381019061018b919061161c565b61075e565b60405161019d9190611e8c565b60405180910390f35b6101c060048036038101906101bb91906113b9565b610788565b005b6101ca610799565b6040516101d79190611f07565b60405180910390f35b6101e86107bf565b6040516101f591906120a2565b60405180910390f35b610218600480360381019061021391906114f7565b6107c5565b005b610234600480360381019061022f9190611438565b6107d5565b005b61023e6108d1565b60405161024b9190611eec565b60405180910390f35b61026e60048036038101906102699190611390565b6108f7565b60405161027b91906120a2565b60405180910390f35b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411610305576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102fc90611f82565b60405180910390fd5b60006103258261031788888888610953565b6109b690919063ffffffff16565b905084600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061037786828686610a71565b505050505050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610463576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161045a90611f42565b60405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516105559190611def565b60405180910390a15050565b60008251116105a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059c90611fc2565b60405180910390fd5b600080600090505b83518110156106f35760003073ffffffffffffffffffffffffffffffffffffffff168583815181106105db57fe5b60200260200101516040516105f09190611d0b565b6000604051808303816000865af19150503d806000811461062d576040519150601f19603f3d011682016040523d82523d6000602084013e610632565b606091505b505090508315610681578061067c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067390611f62565b60405180910390fd5b610697565b80801561068c575082155b1561069657600192505b5b7f361c14722cc344132c73396113f7164232448b09c544a149f09048648b43d872338684815181106106c557fe5b6020026020010151836040516106dd93929190611e0a565b60405180910390a15080806001019150506105ad565b5080610734576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072b90612082565b60405180910390fd5b505050565b60006107578260000151836020015184604001518560600151610953565b9050919050565b600061078182600001518360200151846040015185606001518660800151610edc565b9050919050565b61079483338484610a71565b505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b6107d133338484610a71565b5050565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084d90611f82565b60405180910390fd5b600061087782610869888888883a610edc565b6109b690919063ffffffff16565b905084600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108c986828686610a71565b505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061094c6001600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f4290919063ffffffff16565b9050919050565b60006109ac7f6848d0622081db2451400280dead7a739a080cb93852607c381af11e289769b286868661098587610f97565b6040516020016109989493929190611c6e565b604051602081830303815290604052610ffa565b9050949350505050565b60008060009050604183511415610a675760008060006020860151925060408601519150606086015160001a9050601b8160ff1610156109f757601b810190505b601b8160ff161480610a0c5750601c8160ff16145b15610a635760018782858560405160008152602001604052604051610a349493929190611ea7565b6020604051602081039080840390855afa158015610a56573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad890611fa2565b60405180910390fd5b6000825111610b25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1c90612062565b60405180910390fd5b8151815114610b69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6090612002565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610d3d57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b8152600401610bf9929190611e48565b60206040518083038186803b158015610c1157600080fd5b505afa158015610c25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4991906115b7565b80610cfd5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b8152600401610cac929190611e48565b60206040518083038186803b158015610cc457600080fd5b505afa158015610cd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfc91906115b7565b5b610d3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3390611fe2565b60405180910390fd5b5b600080600090505b8251811015610ed457600073ffffffffffffffffffffffffffffffffffffffff16848281518110610d7257fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415610dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc890611f22565b60405180910390fd5b838181518110610ddd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16838281518110610e0757fe5b60200260200101518787604051602001610e2393929190611d22565b604051602081830303815290604052604051610e3f9190611d0b565b6000604051808303816000865af19150503d8060008114610e7c576040519150601f19603f3d011682016040523d82523d6000602084013e610e81565b606091505b50508092505081610ec7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ebe90612022565b60405180910390fd5b8080600101915050610d45565b505050505050565b6000610f377f6f4e1b2b1e5e49f4269e19e16e67a00cb0a796d96d30be3e4b540d3732e8bcad878787610f0e88610f97565b87604051602001610f23959493929190611cb4565b604051602081830303815290604052610ffa565b905095945050505050565b600080828401905083811015610f8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8490612042565b60405180910390fd5b8091505092915050565b60608060008351905060005b81811015610fef5782858281518110610fb857fe5b6020026020010151604051602001610fd1929190611d5b565b60405160208183030381529060405292508080600101915050610fa3565b508192505050919050565b60006110336001543085856040516020016110189493929190611da5565b6040516020818303038152906040528051906020012061103b565b905092915050565b60008160405160200161104e9190611d7f565b604051602081830303815290604052805190602001209050919050565b60008135905061107a81612375565b92915050565b600082601f83011261109157600080fd5b81356110a461109f826120ea565b6120bd565b915081818352602084019350602081019050838560208402820111156110c957600080fd5b60005b838110156110f957816110df888261106b565b8452602084019350602083019250506001810190506110cc565b5050505092915050565b600082601f83011261111457600080fd5b813561112761112282612112565b6120bd565b9150818183526020840193506020810190508360005b8381101561116d578135860161115388826111a1565b84526020840193506020830192505060018101905061113d565b5050505092915050565b6000813590506111868161238c565b92915050565b60008151905061119b8161238c565b92915050565b600082601f8301126111b257600080fd5b81356111c56111c08261213a565b6120bd565b915080825260208301602083018583830111156111e157600080fd5b6111ec8382846122dd565b50505092915050565b600081359050611204816123a3565b92915050565b600081359050611219816123ba565b92915050565b600060a0828403121561123157600080fd5b61123b60a06120bd565b9050600061124b8482850161106b565b600083015250602061125f8482850161137b565b602083015250604082013567ffffffffffffffff81111561127f57600080fd5b61128b84828501611080565b604083015250606082013567ffffffffffffffff8111156112ab57600080fd5b6112b784828501611103565b60608301525060806112cb8482850161137b565b60808301525092915050565b6000608082840312156112e957600080fd5b6112f360806120bd565b905060006113038482850161106b565b60008301525060206113178482850161137b565b602083015250604082013567ffffffffffffffff81111561133757600080fd5b61134384828501611080565b604083015250606082013567ffffffffffffffff81111561136357600080fd5b61136f84828501611103565b60608301525092915050565b60008135905061138a816123d1565b92915050565b6000602082840312156113a257600080fd5b60006113b08482850161106b565b91505092915050565b6000806000606084860312156113ce57600080fd5b60006113dc8682870161106b565b935050602084013567ffffffffffffffff8111156113f957600080fd5b61140586828701611080565b925050604084013567ffffffffffffffff81111561142257600080fd5b61142e86828701611103565b9150509250925092565b600080600080600060a0868803121561145057600080fd5b600061145e8882890161106b565b955050602061146f8882890161137b565b945050604086013567ffffffffffffffff81111561148c57600080fd5b61149888828901611080565b935050606086013567ffffffffffffffff8111156114b557600080fd5b6114c188828901611103565b925050608086013567ffffffffffffffff8111156114de57600080fd5b6114ea888289016111a1565b9150509295509295909350565b6000806040838503121561150a57600080fd5b600083013567ffffffffffffffff81111561152457600080fd5b61153085828601611080565b925050602083013567ffffffffffffffff81111561154d57600080fd5b61155985828601611103565b9150509250929050565b6000806040838503121561157657600080fd5b600083013567ffffffffffffffff81111561159057600080fd5b61159c85828601611103565b92505060206115ad85828601611177565b9150509250929050565b6000602082840312156115c957600080fd5b60006115d78482850161118c565b91505092915050565b600080604083850312156115f357600080fd5b6000611601858286016111f5565b92505060206116128582860161120a565b9150509250929050565b60006020828403121561162e57600080fd5b600082013567ffffffffffffffff81111561164857600080fd5b6116548482850161121f565b91505092915050565b60006020828403121561166f57600080fd5b600082013567ffffffffffffffff81111561168957600080fd5b611695848285016112d7565b91505092915050565b60006116aa83836116d4565b60208301905092915050565b6116bf8161225f565b82525050565b6116ce816121dc565b82525050565b6116dd816121dc565b82525050565b6116f46116ef826121dc565b61231f565b82525050565b600061170582612176565b61170f8185612199565b935061171a83612166565b8060005b8381101561174b578151611732888261169e565b975061173d8361218c565b92505060018101905061171e565b5085935050505092915050565b611761816121ee565b82525050565b611770816121fa565b82525050565b611787611782826121fa565b612331565b82525050565b600061179882612181565b6117a281856121a4565b93506117b28185602086016122ec565b6117bb81612357565b840191505092915050565b60006117d182612181565b6117db81856121b5565b93506117eb8185602086016122ec565b80840191505092915050565b61180081612271565b82525050565b61180f81612295565b82525050565b6000611822601b836121c0565b91507f476174657761793a2063616e6e6f742073656e6420746f2030783000000000006000830152602082019050919050565b6000611862601c836121d1565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b60006118a2602f836121c0565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b60006119086017836121c0565b91507f476174657761793a2062617463682072657665727465640000000000000000006000830152602082019050919050565b60006119486032836121c0565b91507f476174657761793a206e6f6e6365206973206c6f776572207468616e2063757260008301527f72656e74206163636f756e74206e6f6e636500000000000000000000000000006020830152604082019050919050565b60006119ae6025836121c0565b91507f476174657761793a2063616e6e6f742073656e642066726f6d2030783020616360008301527f636f756e740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a146026836121c0565b91507f476174657761793a2063616e6e6f742064656c656761746520656d707479206260008301527f61746368657300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a7a6028836121c0565b91507f476174657761793a2073656e646572206973206e6f7420746865206163636f7560008301527f6e74206f776e65720000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611ae06016836121c0565b91507f476174657761793a20696e76616c6964206261746368000000000000000000006000830152602082019050919050565b6000611b206023836121c0565b91507f476174657761793a206261746368207472616e73616374696f6e20726576657260008301527f74656400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611b86601e836121c0565b91507f536166654d6174684c69623a206164646974696f6e206f766572666c6f7700006000830152602082019050919050565b6000611bc66020836121c0565b91507f476174657761793a2063616e6e6f742073656e6420656d7074792062617463686000830152602082019050919050565b6000611c06601d836121c0565b91507f476174657761793a20616c6c20626174636865732072657665727465640000006000830152602082019050919050565b611c4281612248565b82525050565b611c59611c5482612248565b61234d565b82525050565b611c6881612252565b82525050565b6000611c7a82876116e3565b601482019150611c8a8286611c48565b602082019150611c9a82856116fa565b9150611ca682846117c6565b915081905095945050505050565b6000611cc082886116e3565b601482019150611cd08287611c48565b602082019150611ce082866116fa565b9150611cec82856117c6565b9150611cf88284611c48565b6020820191508190509695505050505050565b6000611d1782846117c6565b915081905092915050565b6000611d2e82866117c6565b9150611d3a82856116e3565b601482019150611d4a82846116e3565b601482019150819050949350505050565b6000611d6782856117c6565b9150611d7382846117c6565b91508190509392505050565b6000611d8a82611855565b9150611d968284611776565b60208201915081905092915050565b6000611db18287611c48565b602082019150611dc182866116e3565b601482019150611dd18285611776565b602082019150611de182846117c6565b915081905095945050505050565b6000602082019050611e0460008301846116b6565b92915050565b6000606082019050611e1f60008301866116b6565b8181036020830152611e31818561178d565b9050611e406040830184611758565b949350505050565b6000604082019050611e5d60008301856116c5565b611e6a60208301846116c5565b9392505050565b6000602082019050611e866000830184611758565b92915050565b6000602082019050611ea16000830184611767565b92915050565b6000608082019050611ebc6000830187611767565b611ec96020830186611c5f565b611ed66040830185611767565b611ee36060830184611767565b95945050505050565b6000602082019050611f0160008301846117f7565b92915050565b6000602082019050611f1c6000830184611806565b92915050565b60006020820190508181036000830152611f3b81611815565b9050919050565b60006020820190508181036000830152611f5b81611895565b9050919050565b60006020820190508181036000830152611f7b816118fb565b9050919050565b60006020820190508181036000830152611f9b8161193b565b9050919050565b60006020820190508181036000830152611fbb816119a1565b9050919050565b60006020820190508181036000830152611fdb81611a07565b9050919050565b60006020820190508181036000830152611ffb81611a6d565b9050919050565b6000602082019050818103600083015261201b81611ad3565b9050919050565b6000602082019050818103600083015261203b81611b13565b9050919050565b6000602082019050818103600083015261205b81611b79565b9050919050565b6000602082019050818103600083015261207b81611bb9565b9050919050565b6000602082019050818103600083015261209b81611bf9565b9050919050565b60006020820190506120b76000830184611c39565b92915050565b6000604051905081810181811067ffffffffffffffff821117156120e057600080fd5b8060405250919050565b600067ffffffffffffffff82111561210157600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561212957600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561215157600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006121e782612228565b9050919050565b60008115159050919050565b6000819050919050565b600061220f826121dc565b9050919050565b6000612221826121dc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061226a826122b9565b9050919050565b600061227c82612283565b9050919050565b600061228e82612228565b9050919050565b60006122a0826122a7565b9050919050565b60006122b282612228565b9050919050565b60006122c4826122cb565b9050919050565b60006122d682612228565b9050919050565b82818337600083830152505050565b60005b8381101561230a5780820151818401526020810190506122ef565b83811115612319576000848401525b50505050565b600061232a8261233b565b9050919050565b6000819050919050565b600061234682612368565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61237e816121dc565b811461238957600080fd5b50565b612395816121ee565b81146123a057600080fd5b50565b6123ac81612204565b81146123b757600080fd5b50565b6123c381612216565b81146123ce57600080fd5b50565b6123da81612248565b81146123e557600080fd5b5056fea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063867519c61161008c5780639f255626116100665780639f255626146101fe578063b5021b161461021a578063d2c83b9a14610236578063f92c5f7c14610254576100cf565b8063867519c6146101a657806387d31313146101c25780639a8a0592146101e0576100cf565b8063231badaf146100d4578063392e53cd146100f0578063485cc9551461010e5780635afaa7bb1461012a57806373e5a13f1461014657806376db2b4c14610176575b600080fd5b6100ee60048036038101906100e99190611438565b610284565b005b6100f861037f565b6040516101059190611e71565b60405180910390f35b610128600480360381019061012391906115e0565b6103d5565b005b610144600480360381019061013f9190611563565b610561565b005b610160600480360381019061015b919061165d565b610739565b60405161016d9190611e8c565b60405180910390f35b610190600480360381019061018b919061161c565b61075e565b60405161019d9190611e8c565b60405180910390f35b6101c060048036038101906101bb91906113b9565b610788565b005b6101ca610799565b6040516101d79190611f07565b60405180910390f35b6101e86107bf565b6040516101f591906120a2565b60405180910390f35b610218600480360381019061021391906114f7565b6107c5565b005b610234600480360381019061022f9190611438565b6107d5565b005b61023e6108d1565b60405161024b9190611eec565b60405180910390f35b61026e60048036038101906102699190611390565b6108f7565b60405161027b91906120a2565b60405180910390f35b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411610305576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102fc90611f82565b60405180910390fd5b60006103258261031788888888610953565b6109b690919063ffffffff16565b905084600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061037786828686610a71565b505050505050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610463576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161045a90611f42565b60405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516105559190611def565b60405180910390a15050565b60008251116105a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059c90611fc2565b60405180910390fd5b600080600090505b83518110156106f35760003073ffffffffffffffffffffffffffffffffffffffff168583815181106105db57fe5b60200260200101516040516105f09190611d0b565b6000604051808303816000865af19150503d806000811461062d576040519150601f19603f3d011682016040523d82523d6000602084013e610632565b606091505b505090508315610681578061067c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067390611f62565b60405180910390fd5b610697565b80801561068c575082155b1561069657600192505b5b7f361c14722cc344132c73396113f7164232448b09c544a149f09048648b43d872338684815181106106c557fe5b6020026020010151836040516106dd93929190611e0a565b60405180910390a15080806001019150506105ad565b5080610734576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072b90612082565b60405180910390fd5b505050565b60006107578260000151836020015184604001518560600151610953565b9050919050565b600061078182600001518360200151846040015185606001518660800151610edc565b9050919050565b61079483338484610a71565b505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b6107d133338484610a71565b5050565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084d90611f82565b60405180910390fd5b600061087782610869888888883a610edc565b6109b690919063ffffffff16565b905084600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108c986828686610a71565b505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061094c6001600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f4290919063ffffffff16565b9050919050565b60006109ac7f6848d0622081db2451400280dead7a739a080cb93852607c381af11e289769b286868661098587610f97565b6040516020016109989493929190611c6e565b604051602081830303815290604052610ffa565b9050949350505050565b60008060009050604183511415610a675760008060006020860151925060408601519150606086015160001a9050601b8160ff1610156109f757601b810190505b601b8160ff161480610a0c5750601c8160ff16145b15610a635760018782858560405160008152602001604052604051610a349493929190611ea7565b6020604051602081039080840390855afa158015610a56573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad890611fa2565b60405180910390fd5b6000825111610b25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1c90612062565b60405180910390fd5b8151815114610b69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6090612002565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610d3d57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b8152600401610bf9929190611e48565b60206040518083038186803b158015610c1157600080fd5b505afa158015610c25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4991906115b7565b80610cfd5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b8152600401610cac929190611e48565b60206040518083038186803b158015610cc457600080fd5b505afa158015610cd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfc91906115b7565b5b610d3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3390611fe2565b60405180910390fd5b5b600080600090505b8251811015610ed457600073ffffffffffffffffffffffffffffffffffffffff16848281518110610d7257fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415610dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc890611f22565b60405180910390fd5b838181518110610ddd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16838281518110610e0757fe5b60200260200101518787604051602001610e2393929190611d22565b604051602081830303815290604052604051610e3f9190611d0b565b6000604051808303816000865af19150503d8060008114610e7c576040519150601f19603f3d011682016040523d82523d6000602084013e610e81565b606091505b50508092505081610ec7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ebe90612022565b60405180910390fd5b8080600101915050610d45565b505050505050565b6000610f377f6f4e1b2b1e5e49f4269e19e16e67a00cb0a796d96d30be3e4b540d3732e8bcad878787610f0e88610f97565b87604051602001610f23959493929190611cb4565b604051602081830303815290604052610ffa565b905095945050505050565b600080828401905083811015610f8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8490612042565b60405180910390fd5b8091505092915050565b60608060008351905060005b81811015610fef5782858281518110610fb857fe5b6020026020010151604051602001610fd1929190611d5b565b60405160208183030381529060405292508080600101915050610fa3565b508192505050919050565b60006110336001543085856040516020016110189493929190611da5565b6040516020818303038152906040528051906020012061103b565b905092915050565b60008160405160200161104e9190611d7f565b604051602081830303815290604052805190602001209050919050565b60008135905061107a81612375565b92915050565b600082601f83011261109157600080fd5b81356110a461109f826120ea565b6120bd565b915081818352602084019350602081019050838560208402820111156110c957600080fd5b60005b838110156110f957816110df888261106b565b8452602084019350602083019250506001810190506110cc565b5050505092915050565b600082601f83011261111457600080fd5b813561112761112282612112565b6120bd565b9150818183526020840193506020810190508360005b8381101561116d578135860161115388826111a1565b84526020840193506020830192505060018101905061113d565b5050505092915050565b6000813590506111868161238c565b92915050565b60008151905061119b8161238c565b92915050565b600082601f8301126111b257600080fd5b81356111c56111c08261213a565b6120bd565b915080825260208301602083018583830111156111e157600080fd5b6111ec8382846122dd565b50505092915050565b600081359050611204816123a3565b92915050565b600081359050611219816123ba565b92915050565b600060a0828403121561123157600080fd5b61123b60a06120bd565b9050600061124b8482850161106b565b600083015250602061125f8482850161137b565b602083015250604082013567ffffffffffffffff81111561127f57600080fd5b61128b84828501611080565b604083015250606082013567ffffffffffffffff8111156112ab57600080fd5b6112b784828501611103565b60608301525060806112cb8482850161137b565b60808301525092915050565b6000608082840312156112e957600080fd5b6112f360806120bd565b905060006113038482850161106b565b60008301525060206113178482850161137b565b602083015250604082013567ffffffffffffffff81111561133757600080fd5b61134384828501611080565b604083015250606082013567ffffffffffffffff81111561136357600080fd5b61136f84828501611103565b60608301525092915050565b60008135905061138a816123d1565b92915050565b6000602082840312156113a257600080fd5b60006113b08482850161106b565b91505092915050565b6000806000606084860312156113ce57600080fd5b60006113dc8682870161106b565b935050602084013567ffffffffffffffff8111156113f957600080fd5b61140586828701611080565b925050604084013567ffffffffffffffff81111561142257600080fd5b61142e86828701611103565b9150509250925092565b600080600080600060a0868803121561145057600080fd5b600061145e8882890161106b565b955050602061146f8882890161137b565b945050604086013567ffffffffffffffff81111561148c57600080fd5b61149888828901611080565b935050606086013567ffffffffffffffff8111156114b557600080fd5b6114c188828901611103565b925050608086013567ffffffffffffffff8111156114de57600080fd5b6114ea888289016111a1565b9150509295509295909350565b6000806040838503121561150a57600080fd5b600083013567ffffffffffffffff81111561152457600080fd5b61153085828601611080565b925050602083013567ffffffffffffffff81111561154d57600080fd5b61155985828601611103565b9150509250929050565b6000806040838503121561157657600080fd5b600083013567ffffffffffffffff81111561159057600080fd5b61159c85828601611103565b92505060206115ad85828601611177565b9150509250929050565b6000602082840312156115c957600080fd5b60006115d78482850161118c565b91505092915050565b600080604083850312156115f357600080fd5b6000611601858286016111f5565b92505060206116128582860161120a565b9150509250929050565b60006020828403121561162e57600080fd5b600082013567ffffffffffffffff81111561164857600080fd5b6116548482850161121f565b91505092915050565b60006020828403121561166f57600080fd5b600082013567ffffffffffffffff81111561168957600080fd5b611695848285016112d7565b91505092915050565b60006116aa83836116d4565b60208301905092915050565b6116bf8161225f565b82525050565b6116ce816121dc565b82525050565b6116dd816121dc565b82525050565b6116f46116ef826121dc565b61231f565b82525050565b600061170582612176565b61170f8185612199565b935061171a83612166565b8060005b8381101561174b578151611732888261169e565b975061173d8361218c565b92505060018101905061171e565b5085935050505092915050565b611761816121ee565b82525050565b611770816121fa565b82525050565b611787611782826121fa565b612331565b82525050565b600061179882612181565b6117a281856121a4565b93506117b28185602086016122ec565b6117bb81612357565b840191505092915050565b60006117d182612181565b6117db81856121b5565b93506117eb8185602086016122ec565b80840191505092915050565b61180081612271565b82525050565b61180f81612295565b82525050565b6000611822601b836121c0565b91507f476174657761793a2063616e6e6f742073656e6420746f2030783000000000006000830152602082019050919050565b6000611862601c836121d1565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b60006118a2602f836121c0565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b60006119086017836121c0565b91507f476174657761793a2062617463682072657665727465640000000000000000006000830152602082019050919050565b60006119486032836121c0565b91507f476174657761793a206e6f6e6365206973206c6f776572207468616e2063757260008301527f72656e74206163636f756e74206e6f6e636500000000000000000000000000006020830152604082019050919050565b60006119ae6025836121c0565b91507f476174657761793a2063616e6e6f742073656e642066726f6d2030783020616360008301527f636f756e740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a146026836121c0565b91507f476174657761793a2063616e6e6f742064656c656761746520656d707479206260008301527f61746368657300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a7a6028836121c0565b91507f476174657761793a2073656e646572206973206e6f7420746865206163636f7560008301527f6e74206f776e65720000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611ae06016836121c0565b91507f476174657761793a20696e76616c6964206261746368000000000000000000006000830152602082019050919050565b6000611b206023836121c0565b91507f476174657761793a206261746368207472616e73616374696f6e20726576657260008301527f74656400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611b86601e836121c0565b91507f536166654d6174684c69623a206164646974696f6e206f766572666c6f7700006000830152602082019050919050565b6000611bc66020836121c0565b91507f476174657761793a2063616e6e6f742073656e6420656d7074792062617463686000830152602082019050919050565b6000611c06601d836121c0565b91507f476174657761793a20616c6c20626174636865732072657665727465640000006000830152602082019050919050565b611c4281612248565b82525050565b611c59611c5482612248565b61234d565b82525050565b611c6881612252565b82525050565b6000611c7a82876116e3565b601482019150611c8a8286611c48565b602082019150611c9a82856116fa565b9150611ca682846117c6565b915081905095945050505050565b6000611cc082886116e3565b601482019150611cd08287611c48565b602082019150611ce082866116fa565b9150611cec82856117c6565b9150611cf88284611c48565b6020820191508190509695505050505050565b6000611d1782846117c6565b915081905092915050565b6000611d2e82866117c6565b9150611d3a82856116e3565b601482019150611d4a82846116e3565b601482019150819050949350505050565b6000611d6782856117c6565b9150611d7382846117c6565b91508190509392505050565b6000611d8a82611855565b9150611d968284611776565b60208201915081905092915050565b6000611db18287611c48565b602082019150611dc182866116e3565b601482019150611dd18285611776565b602082019150611de182846117c6565b915081905095945050505050565b6000602082019050611e0460008301846116b6565b92915050565b6000606082019050611e1f60008301866116b6565b8181036020830152611e31818561178d565b9050611e406040830184611758565b949350505050565b6000604082019050611e5d60008301856116c5565b611e6a60208301846116c5565b9392505050565b6000602082019050611e866000830184611758565b92915050565b6000602082019050611ea16000830184611767565b92915050565b6000608082019050611ebc6000830187611767565b611ec96020830186611c5f565b611ed66040830185611767565b611ee36060830184611767565b95945050505050565b6000602082019050611f0160008301846117f7565b92915050565b6000602082019050611f1c6000830184611806565b92915050565b60006020820190508181036000830152611f3b81611815565b9050919050565b60006020820190508181036000830152611f5b81611895565b9050919050565b60006020820190508181036000830152611f7b816118fb565b9050919050565b60006020820190508181036000830152611f9b8161193b565b9050919050565b60006020820190508181036000830152611fbb816119a1565b9050919050565b60006020820190508181036000830152611fdb81611a07565b9050919050565b60006020820190508181036000830152611ffb81611a6d565b9050919050565b6000602082019050818103600083015261201b81611ad3565b9050919050565b6000602082019050818103600083015261203b81611b13565b9050919050565b6000602082019050818103600083015261205b81611b79565b9050919050565b6000602082019050818103600083015261207b81611bb9565b9050919050565b6000602082019050818103600083015261209b81611bf9565b9050919050565b60006020820190506120b76000830184611c39565b92915050565b6000604051905081810181811067ffffffffffffffff821117156120e057600080fd5b8060405250919050565b600067ffffffffffffffff82111561210157600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561212957600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561215157600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006121e782612228565b9050919050565b60008115159050919050565b6000819050919050565b600061220f826121dc565b9050919050565b6000612221826121dc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061226a826122b9565b9050919050565b600061227c82612283565b9050919050565b600061228e82612228565b9050919050565b60006122a0826122a7565b9050919050565b60006122b282612228565b9050919050565b60006122c4826122cb565b9050919050565b60006122d682612228565b9050919050565b82818337600083830152505050565b60005b8381101561230a5780820151818401526020810190506122ef565b83811115612319576000848401525b50505050565b600061232a8261233b565b9050919050565b6000819050919050565b600061234682612368565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61237e816121dc565b811461238957600080fd5b50565b612395816121ee565b81146123a057600080fd5b50565b6123ac81612204565b81146123b757600080fd5b50565b6123c381612216565b81146123ce57600080fd5b50565b6123da81612248565b81146123e557600080fd5b5056fea164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "events": { + "BatchDelegated(address,bytes,bool)": { + "details": "Emitted when the single batch is delegated", + "params": { + "batch": "batch", + "sender": "sender address", + "succeeded": "if succeeded" + } + } + }, + "kind": "dev", + "methods": { + "constructor": { + "details": "Public constructor" + }, + "delegateBatch(address,uint256,address[],bytes[],bytes)": { + "details": "Use `hashDelegatedBatch` to create sender message payload. `GatewayRecipient` context api: `_getContextAccount` will return `account` arg `_getContextSender` will return recovered address from `senderSignature` arg", + "params": { + "account": "account address", + "data": "array of batch data", + "nonce": "next account nonce", + "senderSignature": "sender signature", + "to": "array of batch recipients contracts" + } + }, + "delegateBatchWithGasPrice(address,uint256,address[],bytes[],bytes)": { + "details": "Use `hashDelegatedBatchWithGasPrice` to create sender message payload (tx.gasprice as gasPrice) `GatewayRecipient` context api: `_getContextAccount` will return `account` arg `_getContextSender` will return recovered address from `senderSignature` arg", + "params": { + "account": "account address", + "data": "array of batch data", + "nonce": "next account nonce", + "senderSignature": "sender signature", + "to": "array of batch recipients contracts" + } + }, + "delegateBatches(bytes[],bool)": { + "details": "It will revert when all batches fail", + "params": { + "batches": "array of batches", + "revertOnFailure": "reverts on any error" + } + }, + "getAccountNextNonce(address)": { + "params": { + "account": "account address" + }, + "returns": { + "_0": "next nonce" + } + }, + "hashDelegatedBatch((address,uint256,address[],bytes[]))": { + "params": { + "delegatedBatch": "struct" + }, + "returns": { + "_0": "hash" + } + }, + "hashDelegatedBatchWithGasPrice((address,uint256,address[],bytes[],uint256))": { + "params": { + "delegatedBatch": "struct" + }, + "returns": { + "_0": "hash" + } + }, + "initialize(address,address)": { + "params": { + "externalAccountRegistry_": "`ExternalAccountRegistry` contract address", + "personalAccountRegistry_": "`PersonalAccountRegistry` contract address" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + }, + "sendBatch(address[],bytes[])": { + "details": "`GatewayRecipient` context api: `_getContextAccount` will return `msg.sender` `_getContextSender` will return `msg.sender`", + "params": { + "data": "array of batch data", + "to": "array of batch recipients contracts" + } + }, + "sendBatchFromAccount(address,address[],bytes[])": { + "details": "`GatewayRecipient` context api: `_getContextAccount` will return `account` arg `_getContextSender` will return `msg.sender`", + "params": { + "account": "account address", + "data": "array of batch data", + "to": "array of batch recipients contracts" + } + } + }, + "title": "Gateway", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "delegateBatch(address,uint256,address[],bytes[],bytes)": { + "notice": "Delegates batch from the account" + }, + "delegateBatchWithGasPrice(address,uint256,address[],bytes[],bytes)": { + "notice": "Delegates batch from the account (with gas price)" + }, + "delegateBatches(bytes[],bool)": { + "notice": "Delegates multiple batches" + }, + "getAccountNextNonce(address)": { + "notice": "Gets next account nonce" + }, + "hashDelegatedBatch((address,uint256,address[],bytes[]))": { + "notice": "Hashes `DelegatedBatch` message payload" + }, + "hashDelegatedBatchWithGasPrice((address,uint256,address[],bytes[],uint256))": { + "notice": "Hashes `DelegatedBatchWithGasPrice` message payload" + }, + "initialize(address,address)": { + "notice": "Initializes `Gateway` contract" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + }, + "sendBatch(address[],bytes[])": { + "notice": "Sends batch" + }, + "sendBatchFromAccount(address,address[],bytes[])": { + "notice": "Sends batch from the account" + } + }, + "notice": "GSN replacement", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1871, + "contract": "src/gateway/Gateway.sol:Gateway", + "label": "initializer", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1935, + "contract": "src/gateway/Gateway.sol:Gateway", + "label": "chainId", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 4647, + "contract": "src/gateway/Gateway.sol:Gateway", + "label": "externalAccountRegistry", + "offset": 0, + "slot": "2", + "type": "t_contract(ExternalAccountRegistry)4591" + }, + { + "astId": 4649, + "contract": "src/gateway/Gateway.sol:Gateway", + "label": "personalAccountRegistry", + "offset": 0, + "slot": "3", + "type": "t_contract(PersonalAccountRegistry)7452" + }, + { + "astId": 4653, + "contract": "src/gateway/Gateway.sol:Gateway", + "label": "accountNonce", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_contract(ExternalAccountRegistry)4591": { + "encoding": "inplace", + "label": "contract ExternalAccountRegistry", + "numberOfBytes": "20" + }, + "t_contract(PersonalAccountRegistry)7452": { + "encoding": "inplace", + "label": "contract PersonalAccountRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuse/OwnershipFacet.json b/deployments/fuse/OwnershipFacet.json new file mode 100644 index 00000000..a5e03c94 --- /dev/null +++ b/deployments/fuse/OwnershipFacet.json @@ -0,0 +1,85 @@ +{ + "address": "0xdd43fA3fCB57F9F075F48F0FA564162a0eE7fa70", + "abi": [ + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "owner_", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x6b077186eb6861290fb7f38c0d53e93b5e83f4e9e217b8d7dee5ab837c2cf4e8", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 31, + "gasUsed": "263109", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x56ab53d7cea184ca497d73eca714d8c44d76f09f8527fea5ce96e538844945d6", + "transactionHash": "0x6b077186eb6861290fb7f38c0d53e93b5e83f4e9e217b8d7dee5ab837c2cf4e8", + "logs": [], + "blockNumber": 17842223, + "cumulativeGasUsed": "2423701", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "7a183f869f73d4ccd46c6d23b208518b", + "metadata": "{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"returns\":{\"owner_\":\"The address of the owner.\"}},\"transferOwnership(address)\":{\"details\":\"Set _newOwner to address(0) to renounce any ownership.\",\"params\":{\"_newOwner\":\"The address of the new owner of the contract\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"owner()\":{\"notice\":\"Get the address of the owner\"},\"transferOwnership(address)\":{\"notice\":\"Set the address of the new owner of the contract\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/bridges/facets/OwnershipFacet.sol\":\"OwnershipFacet\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/bridges/facets/OwnershipFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { LibDiamond } from \\\"../libs/LibDiamond.sol\\\";\\nimport { IERC173 } from \\\"../interfaces/IERC173.sol\\\";\\n\\ncontract OwnershipFacet is IERC173 {\\n function transferOwnership(address _newOwner) external override {\\n LibDiamond.enforceIsContractOwner();\\n LibDiamond.setContractOwner(_newOwner);\\n }\\n\\n function owner() external view override returns (address owner_) {\\n owner_ = LibDiamond.contractOwner();\\n }\\n}\",\"keccak256\":\"0x5feebeb9ca9cff50e6a745b62ff9d3ae7de1bc5d61f2f9c99997560c9db195a9\",\"license\":\"MIT\"},\"src/bridges/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(\\n FacetCut[] calldata _diamondCut,\\n address _init,\\n bytes calldata _calldata\\n ) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0x608723d9599dc5de624ca7af0751f834bdff25c5b02bc9e817b6f490d3324069\",\"license\":\"MIT\"},\"src/bridges/interfaces/IERC173.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\n/// @title ERC-173 Contract Ownership Standard\\n/// Note: the ERC-165 identifier for this interface is 0x7f5828d0\\n/* is ERC165 */\\ninterface IERC173 {\\n /// @notice Get the address of the owner\\n /// @return owner_ The address of the owner.\\n function owner() external view returns (address owner_);\\n\\n /// @notice Set the address of the new owner of the contract\\n /// @dev Set _newOwner to address(0) to renounce any ownership.\\n /// @param _newOwner The address of the new owner of the contract\\n function transferOwnership(address _newOwner) external;\\n}\\n\",\"keccak256\":\"0xa05bf1c8a4181a509c5374e533e54debeca6a18bbe10972c49e4175ae9fda896\",\"license\":\"MIT\"},\"src/bridges/libs/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { IDiamondCut } from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 internal constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(\\n IDiamondCut.FacetCut[] memory _diamondCut,\\n address _init,\\n bytes memory _calldata\\n ) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(\\n DiamondStorage storage ds,\\n address _facetAddress,\\n bytes4 _selector\\n ) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x7a82c7c0bd4b049b5471c09127fad37873be021813abbe7ec07edb5a908c35e5\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506103cb806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80638da5cb5b1461003b578063f2fde38b14610059575b600080fd5b610043610075565b60405161005091906102da565b60405180910390f35b610073600480360381019061006e919061027f565b610084565b005b600061007f610098565b905090565b61008c6100cb565b61009581610166565b50565b60006100a261023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6100d361023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015b906102f5565b60405180910390fd5b565b600061017061023d565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b600081359050610279816103a7565b92915050565b60006020828403121561029157600080fd5b600061029f8482850161026a565b91505092915050565b6102b181610326565b82525050565b60006102c4602283610315565b91506102cf82610358565b604082019050919050565b60006020820190506102ef60008301846102a8565b92915050565b6000602082019050818103600083015261030e816102b7565b9050919050565b600082825260208201905092915050565b600061033182610338565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b6103b081610326565b81146103bb57600080fd5b5056fea164736f6c6343000804000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80638da5cb5b1461003b578063f2fde38b14610059575b600080fd5b610043610075565b60405161005091906102da565b60405180910390f35b610073600480360381019061006e919061027f565b610084565b005b600061007f610098565b905090565b61008c6100cb565b61009581610166565b50565b60006100a261023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6100d361023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015b906102f5565b60405180910390fd5b565b600061017061023d565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b600081359050610279816103a7565b92915050565b60006020828403121561029157600080fd5b600061029f8482850161026a565b91505092915050565b6102b181610326565b82525050565b60006102c4602283610315565b91506102cf82610358565b604082019050919050565b60006020820190506102ef60008301846102a8565b92915050565b6000602082019050818103600083015261030e816102b7565b9050919050565b600082825260208201905092915050565b600061033182610338565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b6103b081610326565b81146103bb57600080fd5b5056fea164736f6c6343000804000a", + "devdoc": { + "kind": "dev", + "methods": { + "owner()": { + "returns": { + "owner_": "The address of the owner." + } + }, + "transferOwnership(address)": { + "details": "Set _newOwner to address(0) to renounce any ownership.", + "params": { + "_newOwner": "The address of the new owner of the contract" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "owner()": { + "notice": "Get the address of the owner" + }, + "transferOwnership(address)": { + "notice": "Set the address of the new owner of the contract" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fuse/PaymentRegistry.json b/deployments/fuse/PaymentRegistry.json new file mode 100644 index 00000000..6dfdec8b --- /dev/null +++ b/deployments/fuse/PaymentRegistry.json @@ -0,0 +1,1434 @@ +{ + "address": "0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "DepositAccountDeployed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "DepositExitCompleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "DepositExitRejected", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockedUntil", + "type": "uint256" + } + ], + "name": "DepositExitRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "DepositWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "uid", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "PaymentChannelCommitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "channelHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "PaymentDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "channelHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositValue", + "type": "uint256" + } + ], + "name": "PaymentSplit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "channelHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "PaymentWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "addGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "chainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "uid", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "senderSignature", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "guardianSignature", + "type": "bytes" + } + ], + "name": "commitPaymentChannelAndDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "uid", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "depositPaymentValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "senderSignature", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "guardianSignature", + "type": "bytes" + } + ], + "name": "commitPaymentChannelAndSplit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "uid", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "senderSignature", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "guardianSignature", + "type": "bytes" + } + ], + "name": "commitPaymentChannelAndWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "computeDepositAccountAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "uid", + "type": "bytes32" + } + ], + "name": "computePaymentChannelHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployDepositAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "depositExitLockPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "externalAccountRegistry", + "outputs": [ + { + "internalType": "contract ExternalAccountRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gateway", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "getDepositExitLockedUntil", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "getDepositWithdrawnAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "getPaymentChannelCommittedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct PaymentRegistry.DepositWithdrawal", + "name": "depositWithdrawal", + "type": "tuple" + } + ], + "name": "hashDepositWithdrawal", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "uid", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct PaymentRegistry.PaymentChannelCommit", + "name": "paymentChannelCommit", + "type": "tuple" + } + ], + "name": "hashPaymentChannelCommit", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ExternalAccountRegistry", + "name": "externalAccountRegistry_", + "type": "address" + }, + { + "internalType": "contract PersonalAccountRegistry", + "name": "personalAccountRegistry_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "depositExitLockPeriod_", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "guardians_", + "type": "address[]" + }, + { + "internalType": "address", + "name": "gateway_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "isDepositAccountDeployed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "isGuardian", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "personalAccountRegistry", + "outputs": [ + { + "internalType": "contract PersonalAccountRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "processDepositExit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "removeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "requestDepositExit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "verifyGuardianSignature", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "guardianSignature", + "type": "bytes" + } + ], + "name": "withdrawDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x865afeb8d3433b53d27f54b124fc03593bc00abd4249c096cac3240764d15023", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 2, + "gasUsed": "4298759", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe0ff2836205beae15c7d2d1d3d4e99d97f9e09c92893c11f36f8e5db1012880e", + "transactionHash": "0x865afeb8d3433b53d27f54b124fc03593bc00abd4249c096cac3240764d15023", + "logs": [], + "blockNumber": 17842191, + "cumulativeGasUsed": "4497930", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"DepositAccountDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DepositExitCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"DepositExitRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lockedUntil\",\"type\":\"uint256\"}],\"name\":\"DepositExitRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DepositWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"GuardianAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"GuardianRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"PaymentChannelCommitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"channelHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"PaymentDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"channelHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositValue\",\"type\":\"uint256\"}],\"name\":\"PaymentSplit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"channelHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"PaymentWithdrawn\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"addGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"senderSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"guardianSignature\",\"type\":\"bytes\"}],\"name\":\"commitPaymentChannelAndDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"depositPaymentValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"senderSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"guardianSignature\",\"type\":\"bytes\"}],\"name\":\"commitPaymentChannelAndSplit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"senderSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"guardianSignature\",\"type\":\"bytes\"}],\"name\":\"commitPaymentChannelAndWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"computeDepositAccountAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"}],\"name\":\"computePaymentChannelHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"deployDepositAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositExitLockPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"externalAccountRegistry\",\"outputs\":[{\"internalType\":\"contract ExternalAccountRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getDepositExitLockedUntil\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getDepositWithdrawnAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"getPaymentChannelCommittedAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct PaymentRegistry.DepositWithdrawal\",\"name\":\"depositWithdrawal\",\"type\":\"tuple\"}],\"name\":\"hashDepositWithdrawal\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct PaymentRegistry.PaymentChannelCommit\",\"name\":\"paymentChannelCommit\",\"type\":\"tuple\"}],\"name\":\"hashPaymentChannelCommit\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ExternalAccountRegistry\",\"name\":\"externalAccountRegistry_\",\"type\":\"address\"},{\"internalType\":\"contract PersonalAccountRegistry\",\"name\":\"personalAccountRegistry_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"depositExitLockPeriod_\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"guardians_\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"gateway_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"isDepositAccountDeployed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"isGuardian\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"personalAccountRegistry\",\"outputs\":[{\"internalType\":\"contract PersonalAccountRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"processDepositExit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"removeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"requestDepositExit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"verifyGuardianSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"guardianSignature\",\"type\":\"bytes\"}],\"name\":\"withdrawDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"details\":\"the `DepositExit` process can be used in a case operator (guardian) couldn't sign commit / withdrawal message. Process will be rejected when any of senders channels will be committed.\",\"events\":{\"DepositAccountDeployed(address,address)\":{\"details\":\"Emitted when the deposit account is deployed\",\"params\":{\"depositAccount\":\"deposit account address\",\"owner\":\"owner address\"}},\"DepositExitCompleted(address,address,address,uint256)\":{\"details\":\"Emitted when the deposit exist is completed\",\"params\":{\"amount\":\"deposit exist amount\",\"depositAccount\":\"deposit account address\",\"owner\":\"owner address\",\"token\":\"token address\"}},\"DepositExitRejected(address,address,address)\":{\"details\":\"Emitted when the deposit exist is rejected\",\"params\":{\"depositAccount\":\"deposit account address\",\"owner\":\"owner address\",\"token\":\"token address\"}},\"DepositExitRequested(address,address,address,uint256)\":{\"details\":\"Emitted when the deposit exist is requested\",\"params\":{\"depositAccount\":\"deposit account address\",\"lockedUntil\":\"deposit exist locked util time\",\"owner\":\"owner address\",\"token\":\"token address\"}},\"DepositWithdrawn(address,address,address,uint256)\":{\"details\":\"Emitted when the deposit has been withdrawn\",\"params\":{\"amount\":\"withdrawn amount\",\"depositAccount\":\"deposit account address\",\"owner\":\"owner address\",\"token\":\"token address\"}},\"PaymentChannelCommitted(bytes32,address,address,address,bytes32,uint256)\":{\"details\":\"Emitted when the payment channel has been committed\",\"params\":{\"amount\":\"committed amount\",\"hash\":\"channel hash\",\"recipient\":\"recipient address\",\"sender\":\"sender address\",\"token\":\"token address\",\"uid\":\"unique channel id\"}},\"PaymentDeposited(bytes32,uint256)\":{\"details\":\"Emitted when the payment has been deposited\",\"params\":{\"channelHash\":\"channel hash\",\"value\":\"payment value\"}},\"PaymentSplit(bytes32,uint256,uint256)\":{\"details\":\"Emitted when the payment has been withdrawn and deposited (split)\",\"params\":{\"channelHash\":\"channel hash\",\"depositValue\":\"payment deposited value\",\"totalValue\":\"payment total value\"}},\"PaymentWithdrawn(bytes32,uint256)\":{\"details\":\"Emitted when the payment has been withdrawn\",\"params\":{\"channelHash\":\"channel hash\",\"value\":\"payment value\"}}},\"kind\":\"dev\",\"methods\":{\"addGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"}},\"commitPaymentChannelAndDeposit(address,address,bytes32,uint256,uint256,bytes,bytes)\":{\"params\":{\"amount\":\"amount to commit\",\"blockNumber\":\"block number\",\"guardianSignature\":\"guardian signature\",\"sender\":\"sender address\",\"senderSignature\":\"sender signature\",\"token\":\"token address\",\"uid\":\"unique channel id\"}},\"commitPaymentChannelAndSplit(address,address,bytes32,uint256,uint256,uint256,bytes,bytes)\":{\"params\":{\"amount\":\"amount to commit\",\"blockNumber\":\"block number\",\"depositPaymentValue\":\"amount to deposit\",\"guardianSignature\":\"guardian signature\",\"sender\":\"sender address\",\"senderSignature\":\"sender signature\",\"token\":\"token address\",\"uid\":\"unique channel id\"}},\"commitPaymentChannelAndWithdraw(address,address,bytes32,uint256,uint256,bytes,bytes)\":{\"params\":{\"amount\":\"amount to commit\",\"blockNumber\":\"block number\",\"guardianSignature\":\"guardian signature\",\"sender\":\"sender address\",\"senderSignature\":\"sender signature\",\"token\":\"token address\",\"uid\":\"unique channel id\"}},\"computeDepositAccountAddress(address)\":{\"params\":{\"owner\":\"owner address\"},\"returns\":{\"_0\":\"deposit account address\"}},\"computePaymentChannelHash(address,address,address,bytes32)\":{\"params\":{\"recipient\":\"recipient address\",\"sender\":\"sender address\",\"token\":\"token address\",\"uid\":\"unique channel id\"},\"returns\":{\"_0\":\"hash\"}},\"constructor\":{\"details\":\"Public constructor\"},\"deployDepositAccount(address)\":{\"params\":{\"owner\":\"owner address\"}},\"getDepositExitLockedUntil(address,address)\":{\"params\":{\"owner\":\"owner address\",\"token\":\"token address\"},\"returns\":{\"_0\":\"locked until time\"}},\"getDepositWithdrawnAmount(address,address)\":{\"params\":{\"owner\":\"owner address\",\"token\":\"token address\"},\"returns\":{\"_0\":\"withdrawn amount\"}},\"getPaymentChannelCommittedAmount(bytes32)\":{\"params\":{\"hash\":\"payment channel hash\"},\"returns\":{\"_0\":\"committed amount\"}},\"hashDepositWithdrawal((address,address,uint256))\":{\"params\":{\"depositWithdrawal\":\"struct\"},\"returns\":{\"_0\":\"hash\"}},\"hashPaymentChannelCommit((address,address,address,bytes32,uint256,uint256))\":{\"params\":{\"paymentChannelCommit\":\"struct\"},\"returns\":{\"_0\":\"hash\"}},\"initialize(address,address,uint256,address[],address)\":{\"params\":{\"depositExitLockPeriod_\":\"deposit exit lock period\",\"externalAccountRegistry_\":\"`ExternalAccountRegistry` contract address\",\"gateway_\":\"`Gateway` contract address\",\"guardians_\":\"array of guardians addresses\",\"personalAccountRegistry_\":\"`PersonalAccountRegistry` contract address\"}},\"isDepositAccountDeployed(address)\":{\"params\":{\"owner\":\"owner address\"},\"returns\":{\"_0\":\"true when deposit account is deployed\"}},\"isGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"},\"returns\":{\"_0\":\"true when guardian exists\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}},\"processDepositExit(address)\":{\"params\":{\"token\":\"token address\"}},\"removeGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"}},\"requestDepositExit(address)\":{\"params\":{\"token\":\"token address\"}},\"verifyGuardianSignature(bytes32,bytes)\":{\"params\":{\"messageHash\":\"message hash\",\"signature\":\"signature\"},\"returns\":{\"_0\":\"true on correct guardian signature\"}},\"withdrawDeposit(address,uint256,bytes)\":{\"params\":{\"amount\":\"amount to withdraw\",\"guardianSignature\":\"guardian signature\",\"token\":\"token address\"}}},\"title\":\"Payment registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addGuardian(address)\":{\"notice\":\"Adds a new guardian\"},\"commitPaymentChannelAndDeposit(address,address,bytes32,uint256,uint256,bytes,bytes)\":{\"notice\":\"Commits payment channel and deposit payment\"},\"commitPaymentChannelAndSplit(address,address,bytes32,uint256,uint256,uint256,bytes,bytes)\":{\"notice\":\"Commits payment channel, withdraws and deposits (split) payment\"},\"commitPaymentChannelAndWithdraw(address,address,bytes32,uint256,uint256,bytes,bytes)\":{\"notice\":\"Commits payment channel and withdraw payment\"},\"computeDepositAccountAddress(address)\":{\"notice\":\"Computes deposit account address\"},\"computePaymentChannelHash(address,address,address,bytes32)\":{\"notice\":\"Computes payment channel hash\"},\"deployDepositAccount(address)\":{\"notice\":\"Deploys deposit account\"},\"getDepositExitLockedUntil(address,address)\":{\"notice\":\"Gets deposit exit locked until time\"},\"getDepositWithdrawnAmount(address,address)\":{\"notice\":\"Gets deposit withdrawn amount\"},\"getPaymentChannelCommittedAmount(bytes32)\":{\"notice\":\"Gets payment channel committed amount\"},\"hashDepositWithdrawal((address,address,uint256))\":{\"notice\":\"Hashes `DepositWithdrawal` message payload\"},\"hashPaymentChannelCommit((address,address,address,bytes32,uint256,uint256))\":{\"notice\":\"Hashes `PaymentChannelCommit` message payload\"},\"initialize(address,address,uint256,address[],address)\":{\"notice\":\"Initialize `PaymentRegistry` contract\"},\"isDepositAccountDeployed(address)\":{\"notice\":\"Checks if deposit account is deployed\"},\"isGuardian(address)\":{\"notice\":\"Check if guardian exists\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"},\"processDepositExit(address)\":{\"notice\":\"Processes deposit exit\"},\"removeGuardian(address)\":{\"notice\":\"Removes the existing guardian\"},\"requestDepositExit(address)\":{\"notice\":\"Requests deposit exit\"},\"verifyGuardianSignature(bytes32,bytes)\":{\"notice\":\"Verifies guardian signature\"},\"withdrawDeposit(address,uint256,bytes)\":{\"notice\":\"Withdraws deposit\"}},\"notice\":\"A registry for payment and payment channels\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/payments/PaymentRegistry.sol\":\"PaymentRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/access/Controlled.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Controlled\\n *\\n * @dev Contract module which provides an access control mechanism.\\n * It ensures there is only one controlling account of the smart contract\\n * and grants that account exclusive access to specific functions.\\n *\\n * The controller account will be the one that deploys the contract.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Controlled {\\n /**\\n * @return controller account address\\n */\\n address public controller;\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if msg.sender is not the controller\\n */\\n modifier onlyController() {\\n require(\\n msg.sender == controller,\\n \\\"Controlled: msg.sender is not the controller\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n controller = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xdf03a0b7ec644da9925c5c1b6c8a86bb1cc1b9c5018bb265a1a4c5044b877af3\",\"license\":\"MIT\"},\"src/common/access/Guarded.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n\\n/**\\n * @title Guarded\\n *\\n * @dev Contract module which provides a guardian-type control mechanism.\\n * It allows key accounts to have guardians and restricts specific methods to be accessible by guardians only.\\n *\\n * Each guardian account can remove other guardians\\n *\\n * Use `_initializeGuarded` to initialize the contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Guarded {\\n using ECDSALib for bytes32;\\n\\n mapping(address => bool) private guardians;\\n\\n // events\\n\\n /**\\n * @dev Emitted when a new guardian is added\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianAdded(\\n address sender,\\n address guardian\\n );\\n\\n /**\\n * @dev Emitted when the existing guardian is removed\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianRemoved(\\n address sender,\\n address guardian\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not a guardian account\\n */\\n modifier onlyGuardian() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n guardians[tx.origin],\\n \\\"Guarded: tx.origin is not the guardian\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new guardian\\n * @param guardian guardian address\\n */\\n function addGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n _addGuardian(guardian);\\n }\\n\\n /**\\n * @notice Removes the existing guardian\\n * @param guardian guardian address\\n */\\n function removeGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin != guardian,\\n \\\"Guarded: cannot remove self\\\"\\n );\\n\\n require(\\n guardians[guardian],\\n \\\"Guarded: guardian doesn't exist\\\"\\n );\\n\\n guardians[guardian] = false;\\n\\n emit GuardianRemoved(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if guardian exists\\n * @param guardian guardian address\\n * @return true when guardian exists\\n */\\n function isGuardian(\\n address guardian\\n )\\n external\\n view\\n returns (bool)\\n {\\n return guardians[guardian];\\n }\\n\\n /**\\n * @notice Verifies guardian signature\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true on correct guardian signature\\n */\\n function verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyGuardianSignature(\\n messageHash,\\n signature\\n );\\n }\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `Guarded` contract\\n * @dev If `guardians_` array is empty `tx.origin` is added as guardian account\\n * @param guardians_ array of guardians addresses\\n */\\n function _initializeGuarded(\\n address[] memory guardians_\\n )\\n internal\\n {\\n if (guardians_.length == 0) {\\n // solhint-disable-next-line avoid-tx-origin\\n _addGuardian(tx.origin);\\n } else {\\n uint guardiansLen = guardians_.length;\\n for (uint i = 0; i < guardiansLen; i++) {\\n _addGuardian(guardians_[i]);\\n }\\n }\\n }\\n\\n\\n // internal functions (views)\\n\\n function _verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n view\\n returns (bool)\\n {\\n address guardian = messageHash.recoverAddress(signature);\\n\\n return guardians[guardian];\\n }\\n\\n // private functions\\n\\n function _addGuardian(\\n address guardian\\n )\\n private\\n {\\n require(\\n guardian != address(0),\\n \\\"Guarded: cannot add 0x0 guardian\\\"\\n );\\n\\n require(\\n !guardians[guardian],\\n \\\"Guarded: guardian already exists\\\"\\n );\\n\\n guardians[guardian] = true;\\n\\n emit GuardianAdded(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n}\\n\",\"keccak256\":\"0x4a5f5670041362e87ea267d81c55fc3edc1a78e81f6f17524b13267f91f31458\",\"license\":\"MIT\"},\"src/common/account/Account.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../access/Controlled.sol\\\";\\nimport \\\"./AccountBase.sol\\\";\\n\\n\\n/**\\n * @title Account\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Account is Controlled, AccountBase {\\n address public implementation;\\n\\n /**\\n * @dev Public constructor\\n * @param registry_ account registry address\\n * @param implementation_ account implementation address\\n */\\n constructor(\\n address registry_,\\n address implementation_\\n )\\n public\\n Controlled()\\n {\\n registry = registry_;\\n implementation = implementation_;\\n }\\n\\n // external functions\\n\\n /**\\n * @notice Payable receive\\n */\\n receive()\\n external\\n payable\\n {\\n //\\n }\\n\\n /**\\n * @notice Fallback\\n */\\n // solhint-disable-next-line payable-fallback\\n fallback()\\n external\\n {\\n if (msg.data.length != 0) {\\n address implementation_ = implementation;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let calldedatasize := calldatasize()\\n\\n calldatacopy(0, 0, calldedatasize)\\n\\n let result := delegatecall(gas(), implementation_, 0, calldedatasize, 0, 0)\\n let returneddatasize := returndatasize()\\n\\n returndatacopy(0, 0, returneddatasize)\\n\\n switch result\\n case 0 { revert(0, returneddatasize) }\\n default { return(0, returneddatasize) }\\n }\\n }\\n }\\n\\n /**\\n * @notice Sets implementation\\n * @param implementation_ implementation address\\n */\\n function setImplementation(\\n address implementation_\\n )\\n external\\n onlyController\\n {\\n implementation = implementation_;\\n }\\n\\n /**\\n * @notice Executes transaction\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @return transaction result\\n */\\n function executeTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n onlyController\\n returns (bytes memory)\\n {\\n bytes memory result;\\n bool succeeded;\\n\\n // solhint-disable-next-line avoid-call-value, avoid-low-level-calls\\n (succeeded, result) = payable(to).call{value: value}(data);\\n\\n require(\\n succeeded,\\n \\\"Account: transaction reverted\\\"\\n );\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe516c999a02a65ee99487d398d0c12589500680a9ca08c852540fb9473d70a26\",\"license\":\"MIT\"},\"src/common/account/AccountBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Account base\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountBase {\\n address public registry;\\n}\\n\",\"keccak256\":\"0xcadf29e389f8db823e14f3f92808fd135f07b0135eb4dcf29b89c85941b39862\",\"license\":\"MIT\"},\"src/common/account/AccountController.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./Account.sol\\\";\\n\\n\\n/**\\n * @title Account controller\\n *\\n * @dev Contract module which provides Account deployment mechanism\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountController {\\n address public accountRegistry;\\n address public accountImplementation;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the account registry is updated\\n * @param accountRegistry account registry address\\n */\\n event AccountRegistryUpdated(\\n address accountRegistry\\n );\\n\\n /**\\n * @dev Emitted when the account implementation is updated\\n * @param accountImplementation account implementation address\\n */\\n event AccountImplementationUpdated(\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the account is deployed\\n * @param account account address\\n * @param accountImplementation account implementation address\\n */\\n event AccountDeployed(\\n address account,\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the account is upgraded\\n * @param account account address\\n * @param accountImplementation account implementation address\\n */\\n event AccountUpgraded(\\n address account,\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the transaction is executed\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @param response response\\n */\\n event AccountTransactionExecuted(\\n address account,\\n address to,\\n uint256 value,\\n bytes data,\\n bytes response\\n );\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `AccountController` contract\\n * @param accountRegistry_ account registry address\\n * @param accountImplementation_ account implementation address\\n */\\n function _initializeAccountController(\\n address accountRegistry_,\\n address accountImplementation_\\n )\\n internal\\n {\\n _setAccountRegistry(accountRegistry_, false);\\n _setAccountImplementation(accountImplementation_, false);\\n }\\n\\n /**\\n * @notice Sets account registry\\n * @param accountRegistry_ account registry address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _setAccountRegistry(\\n address accountRegistry_,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n accountRegistry_ != address(0),\\n \\\"AccountController: cannot set account registry to 0x0\\\"\\n );\\n\\n accountRegistry = accountRegistry_;\\n\\n if (emitEvent) {\\n emit AccountRegistryUpdated(accountRegistry);\\n }\\n }\\n\\n /**\\n * @notice Sets account implementation\\n * @param accountImplementation_ account implementation address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _setAccountImplementation(\\n address accountImplementation_,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n accountImplementation_ != address(0),\\n \\\"AccountController: cannot set account Implementation to 0x0\\\"\\n );\\n\\n accountImplementation = accountImplementation_;\\n\\n if (emitEvent) {\\n emit AccountImplementationUpdated(accountImplementation);\\n }\\n }\\n\\n /**\\n * @notice Deploys account\\n * @param salt CREATE2 salt\\n * @param emitEvent it will emit event when flag is set to true\\n * @return account address\\n */\\n function _deployAccount(\\n bytes32 salt,\\n bool emitEvent\\n )\\n internal\\n returns (address)\\n {\\n address account = address(new Account{salt: salt}(\\n accountRegistry,\\n accountImplementation\\n ));\\n\\n if (emitEvent) {\\n emit AccountDeployed(\\n account,\\n accountImplementation\\n );\\n }\\n\\n return account;\\n }\\n\\n /**\\n * @notice Upgrades account\\n * @param account account address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _upgradeAccount(\\n address account,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n Account(payable(account)).implementation() != accountImplementation,\\n \\\"AccountController: account already upgraded\\\"\\n );\\n\\n Account(payable(account)).setImplementation(accountImplementation);\\n\\n if (emitEvent) {\\n emit AccountUpgraded(\\n account,\\n accountImplementation\\n );\\n }\\n }\\n\\n /**\\n * @notice Executes transaction from the account\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @param emitEvent it will emit event when flag is set to true\\n * @return transaction result\\n */\\n function _executeAccountTransaction(\\n address account,\\n address to,\\n uint256 value,\\n bytes memory data,\\n bool emitEvent\\n )\\n internal\\n returns (bytes memory)\\n {\\n require(\\n to != address(0),\\n \\\"AccountController: cannot send to 0x0\\\"\\n );\\n\\n require(\\n to != address(this),\\n \\\"AccountController: cannot send to controller\\\"\\n );\\n\\n require(\\n to != account,\\n \\\"AccountController: cannot send to self\\\"\\n );\\n\\n bytes memory response = Account(payable(account)).executeTransaction(\\n to,\\n value,\\n data\\n );\\n\\n if (emitEvent) {\\n emit AccountTransactionExecuted(\\n account,\\n to,\\n value,\\n data,\\n response\\n );\\n }\\n\\n return response;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Computes account CREATE2 address\\n * @param salt CREATE2 salt\\n * @return account address\\n */\\n function _computeAccountAddress(\\n bytes32 salt\\n )\\n internal\\n view\\n returns (address)\\n {\\n bytes memory creationCode = abi.encodePacked(\\n type(Account).creationCode,\\n bytes12(0),\\n accountRegistry,\\n bytes12(0),\\n accountImplementation\\n );\\n\\n bytes32 data = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n salt,\\n keccak256(creationCode)\\n )\\n );\\n\\n return address(uint160(uint256(data)));\\n }\\n}\\n\",\"keccak256\":\"0xe161f1f4f6ea5d3a9810f7c93764d55e473abe1054e6aa68fde791be7d70a26c\",\"license\":\"MIT\"},\"src/common/account/AccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./Account.sol\\\";\\n\\n\\n/**\\n * @title Account registry\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nabstract contract AccountRegistry {\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param message message\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes calldata message,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0x2d40245721f5f74219e5cf88713246dbe8b6d5404e941125d3e850b1f127ec34\",\"license\":\"MIT\"},\"src/common/libs/BlockLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Block library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BlockLib {\\n struct BlockRelated {\\n bool added;\\n uint256 removedAtBlockNumber;\\n }\\n\\n /**\\n * @notice Verifies self struct at current block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtCurrentBlock(\\n BlockRelated memory self\\n )\\n internal\\n view\\n returns (bool)\\n {\\n return verifyAtBlock(self, block.number);\\n }\\n\\n /**\\n * @notice Verifies self struct at any block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtAnyBlock(\\n BlockRelated memory self\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n return verifyAtBlock(self, 0);\\n }\\n\\n /**\\n * @notice Verifies self struct at specific block\\n * @param self self struct\\n * @param blockNumber block number to verify\\n * @return true on correct self struct\\n */\\n function verifyAtBlock(\\n BlockRelated memory self,\\n uint256 blockNumber\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n bool result = false;\\n\\n if (self.added) {\\n if (self.removedAtBlockNumber == 0) {\\n result = true;\\n } else if (blockNumber == 0) {\\n result = true;\\n } else {\\n result = self.removedAtBlockNumber > blockNumber;\\n }\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9205536bc211f86d1113118a44dddfa7a9b9772a918cf4b1575c982a05472587\",\"license\":\"MIT\"},\"src/common/libs/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Bytes library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BytesLib {\\n /**\\n * @notice Converts bytes to address\\n * @param data data\\n * @return address\\n */\\n function toAddress(\\n bytes memory data\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result;\\n\\n require(\\n data.length == 20,\\n \\\"BytesLib: invalid data length\\\"\\n );\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := div(mload(add(data, 0x20)), 0x1000000000000000000000000)\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x64c84964ea91bfb1f2d859eea6c57fe5b4a6f269951a4adf5f58d306c54c7f76\",\"license\":\"MIT\"},\"src/common/libs/ECDSAExtendedLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./StringsLib.sol\\\";\\n\\n\\n/**\\n * @title ECDSA extended library\\n */\\nlibrary ECDSAExtendedLib {\\n using StringsLib for uint;\\n\\n function toEthereumSignedMessageHash(\\n bytes memory message\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n\\\",\\n message.length.toString(),\\n abi.encodePacked(message)\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x83e6056caaba892d91de45324f4d2702ac01695fab2d34c86895d7d288547ba3\",\"license\":\"MIT\"},\"src/common/libs/ECDSALib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ECDSA library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/cryptography/ECDSA.sol#L26\\n */\\nlibrary ECDSALib {\\n function recoverAddress(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n\\n if (v < 27) {\\n v += 27;\\n }\\n\\n if (v == 27 || v == 28) {\\n result = ecrecover(messageHash, v, r, s);\\n }\\n }\\n\\n return result;\\n }\\n\\n function toEthereumSignedMessageHash(\\n bytes32 messageHash\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n messageHash\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x3b1460d688302eb595268c2af147ab532f29dbced66520e013f48d498eed3cec\",\"license\":\"MIT\"},\"src/common/libs/SafeMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Safe math library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/math/SafeMath.sol\\n */\\nlibrary SafeMathLib {\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n\\n require(c >= a, \\\"SafeMathLib: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMathLib: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n\\n return a - b;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n\\n require(c / a == b, \\\"SafeMathLib: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMathLib: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n\\n return a / b;\\n }\\n\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMathLib: modulo by zero\\\");\\n }\\n\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x6089f354ca754d9c5dd9e800ee5ed86717dbf8f9af470604e0be691ac57c0107\",\"license\":\"MIT\"},\"src/common/libs/StringsLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Strings library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/utils/Strings.sol#L12\\n */\\nlibrary StringsLib {\\n function toString(\\n uint256 value\\n )\\n internal\\n pure\\n returns (string memory)\\n {\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n\\n uint256 temp = value;\\n uint256 digits;\\n\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n\\n while (temp != 0) {\\n buffer[index--] = byte(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0x4110150d0c921fd31db34ca33672de8e81c3ae467076149a3a546f804d1f58dd\",\"license\":\"MIT\"},\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/common/signature/SignatureValidator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n/**\\n * @title Signature validator\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract SignatureValidator {\\n using ECDSALib for bytes32;\\n\\n uint256 public chainId;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {\\n uint256 chainId_;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n chainId_ := chainid()\\n }\\n\\n chainId = chainId_;\\n }\\n\\n // internal functions\\n\\n function _hashMessagePayload(\\n bytes32 messagePrefix,\\n bytes memory messagePayload\\n )\\n internal\\n view\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n chainId,\\n address(this),\\n messagePrefix,\\n messagePayload\\n )).toEthereumSignedMessageHash();\\n }\\n}\\n\",\"keccak256\":\"0xc1168f7ccb74aea67089941dc5e4c1d1c4aa766afca47a90c0b017b8445b8acf\",\"license\":\"MIT\"},\"src/common/token/ERC20Token.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/SafeMathLib.sol\\\";\\n\\n\\n/**\\n * @title ERC20 token\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/token/ERC20/ERC20.sol\\n */\\ncontract ERC20Token {\\n using SafeMathLib for uint256;\\n\\n string public name;\\n string public symbol;\\n uint8 public decimals;\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) internal balances;\\n mapping(address => mapping(address => uint256)) internal allowances;\\n\\n // events\\n\\n event Transfer(\\n address indexed from,\\n address indexed to,\\n uint256 value\\n );\\n\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n function transfer(\\n address to,\\n uint256 value\\n )\\n external\\n returns (bool)\\n {\\n _transfer(_getSender(), to, value);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n address sender = _getSender();\\n\\n _transfer(from, to, value);\\n _approve(from, sender, allowances[from][sender].sub(value));\\n\\n return true;\\n }\\n\\n function approve(\\n address spender,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n _approve(_getSender(), spender, value);\\n\\n return true;\\n }\\n\\n // external functions (views)\\n\\n function balanceOf(\\n address owner\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return balances[owner];\\n }\\n\\n function allowance(\\n address owner,\\n address spender\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[owner][spender];\\n }\\n\\n // internal functions\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n from != address(0),\\n \\\"ERC20Token: cannot transfer from 0x0 address\\\"\\n );\\n require(\\n to != address(0),\\n \\\"ERC20Token: cannot transfer to 0x0 address\\\"\\n );\\n\\n balances[from] = balances[from].sub(value);\\n balances[to] = balances[to].add(value);\\n\\n emit Transfer(from, to, value);\\n }\\n\\n function _approve(\\n address owner,\\n address spender,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot approve from 0x0 address\\\"\\n );\\n require(\\n spender != address(0),\\n \\\"ERC20Token: cannot approve to 0x0 address\\\"\\n );\\n\\n allowances[owner][spender] = value;\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function _mint(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot mint to 0x0 address\\\"\\n );\\n require(\\n value > 0,\\n \\\"ERC20Token: cannot mint 0 value\\\"\\n );\\n\\n balances[owner] = balances[owner].add(value);\\n totalSupply = totalSupply.add(value);\\n\\n emit Transfer(address(0), owner, value);\\n }\\n\\n function _burn(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot burn from 0x0 address\\\"\\n );\\n\\n balances[owner] = balances[owner].sub(\\n value,\\n \\\"ERC20Token: burn value exceeds balance\\\"\\n );\\n\\n totalSupply = totalSupply.sub(value);\\n\\n emit Transfer(owner, address(0), value);\\n }\\n\\n // internal functions (views)\\n\\n function _getSender()\\n virtual\\n internal\\n view\\n returns (address)\\n {\\n return msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x6f2b0bd08da549c6c1f5ceee85766832d587dde62c56bebc3a14bd9ea407e03d\",\"license\":\"MIT\"},\"src/external/ExternalAccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BlockLib.sol\\\";\\n\\n\\n/**\\n * @title External account registry\\n *\\n * @notice Global registry for keys and external (outside of the platform) contract based wallets\\n *\\n * @dev An account can call the registry to add (`addAccountOwner`) or remove (`removeAccountOwner`) its own owners.\\n * When the owner has been added, information about that fact will live in the registry forever.\\n * Removing an owner only affects the future blocks (until the owner is re-added).\\n *\\n * Given the fact, there is no way to sign the data using a contract based wallet,\\n * we created a registry to store signed by the key wallet proofs.\\n * ERC-1271 allows removing a signer after the signature was created. Thus store the signature for the later use\\n * doesn't guarantee the signer is still has access to that smart account.\\n * Because of that, the ERC1271's `isValidSignature()` cannot be used in e.g. `PaymentRegistry`.*\\n *\\n * An account can call the registry to add (`addAccountProof`) or remove (`removeAccountProof`) proof hash.\\n * When the proof has been added, information about that fact will live in the registry forever.\\n * Removing a proof only affects the future blocks (until the proof is re-added).\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract ExternalAccountRegistry {\\n using BlockLib for BlockLib.BlockRelated;\\n\\n struct Account {\\n mapping(address => BlockLib.BlockRelated) owners;\\n mapping(bytes32 => BlockLib.BlockRelated) proofs;\\n }\\n\\n mapping(address => Account) private accounts;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the new owner is added\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerAdded(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the existing owner is removed\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerRemoved(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the new proof is added\\n * @param account account address\\n * @param hash proof hash\\n */\\n event AccountProofAdded(\\n address account,\\n bytes32 hash\\n );\\n\\n /**\\n * @dev Emitted when the existing proof is removed\\n * @param account account address\\n * @param hash proof hash\\n */\\n event AccountProofRemoved(\\n address account,\\n bytes32 hash\\n );\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new account owner\\n * @param owner owner address\\n */\\n function addAccountOwner(\\n address owner\\n )\\n external\\n {\\n require(\\n owner != address(0),\\n \\\"ExternalAccountRegistry: cannot add 0x0 owner\\\"\\n );\\n\\n require(\\n !accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: owner already exists\\\"\\n );\\n\\n accounts[msg.sender].owners[owner].added = true;\\n accounts[msg.sender].owners[owner].removedAtBlockNumber = 0;\\n\\n emit AccountOwnerAdded(\\n msg.sender,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Removes existing account owner\\n * @param owner owner address\\n */\\n function removeAccountOwner(\\n address owner\\n )\\n external\\n {\\n require(\\n accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: owner doesn't exist\\\"\\n );\\n\\n accounts[msg.sender].owners[owner].removedAtBlockNumber = block.number;\\n\\n emit AccountOwnerRemoved(\\n msg.sender,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Adds a new account proof\\n * @param hash proof hash\\n */\\n function addAccountProof(\\n bytes32 hash\\n )\\n external\\n {\\n require(\\n !accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: proof already exists\\\"\\n );\\n\\n accounts[msg.sender].proofs[hash].added = true;\\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = 0;\\n\\n emit AccountProofAdded(\\n msg.sender,\\n hash\\n );\\n }\\n\\n /**\\n * @notice Removes existing account proof\\n * @param hash proof hash\\n */\\n function removeAccountProof(\\n bytes32 hash\\n )\\n external\\n {\\n require(\\n accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: proof doesn't exist\\\"\\n );\\n\\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = block.number;\\n\\n emit AccountProofRemoved(\\n msg.sender,\\n hash\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Verifies the owner of the account at current block\\n * @param account account address\\n * @param owner owner address\\n * @return true on correct account owner\\n */\\n function verifyAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].owners[owner].verifyAtCurrentBlock();\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at specific block\\n * @param account account address\\n * @param owner owner address\\n * @param blockNumber block number to verify\\n * @return true on correct account owner\\n */\\n function verifyAccountOwnerAtBlock(\\n address account,\\n address owner,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].owners[owner].verifyAtBlock(blockNumber);\\n }\\n\\n /**\\n * @notice Verifies the proof of the account at current block\\n * @param account account address\\n * @param hash proof hash\\n * @return true on correct account proof\\n */\\n function verifyAccountProof(\\n address account,\\n bytes32 hash\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].proofs[hash].verifyAtCurrentBlock();\\n }\\n\\n /**\\n * @notice Verifies the proof of the account at specific block\\n * @param account account address\\n * @param hash proof hash\\n * @param blockNumber block number to verify\\n * @return true on correct account proof\\n */\\n function verifyAccountProofAtBlock(\\n address account,\\n bytes32 hash,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].proofs[hash].verifyAtBlock(blockNumber);\\n }\\n}\\n\",\"keccak256\":\"0x8067b1fae41b73949f8d871a835533cbdd94b9ca3faa93b91f595c37e632ccdb\",\"license\":\"MIT\"},\"src/gateway/GatewayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BytesLib.sol\\\";\\n\\n\\n/**\\n * @title Gateway recipient\\n *\\n * @notice Gateway target contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract GatewayRecipient {\\n using BytesLib for bytes;\\n\\n address public gateway;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `GatewayRecipient` contract\\n * @param gateway_ `Gateway` contract address\\n */\\n function _initializeGatewayRecipient(\\n address gateway_\\n )\\n internal\\n {\\n gateway = gateway_;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Gets gateway context account\\n * @return context account address\\n */\\n function _getContextAccount()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(40);\\n }\\n\\n /**\\n * @notice Gets gateway context sender\\n * @return context sender address\\n */\\n function _getContextSender()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(20);\\n }\\n\\n /**\\n * @notice Gets gateway context data\\n * @return context data\\n */\\n function _getContextData()\\n internal\\n view\\n returns (bytes calldata)\\n {\\n bytes calldata result;\\n\\n if (_isGatewaySender()) {\\n result = msg.data[:msg.data.length - 40];\\n } else {\\n result = msg.data;\\n }\\n\\n return result;\\n }\\n\\n // private functions (views)\\n\\n function _getContextAddress(\\n uint256 offset\\n )\\n private\\n view\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (_isGatewaySender()) {\\n uint from = msg.data.length - offset;\\n result = bytes(msg.data[from:from + 20]).toAddress();\\n } else {\\n result = msg.sender;\\n }\\n\\n return result;\\n }\\n\\n function _isGatewaySender()\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (msg.sender == gateway) {\\n require(\\n msg.data.length >= 44,\\n \\\"GatewayRecipient: invalid msg.data\\\"\\n );\\n\\n result = true;\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe3fd29479d748d67360c61a9cbaafc66eaca25f476e59a45e842472bcf5233fc\",\"license\":\"MIT\"},\"src/payments/PaymentDepositAccount.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/access/Controlled.sol\\\";\\n\\n\\n/**\\n * @title Payment deposit account\\n *\\n * @dev Simple account contract with only one method - `executeTransaction`\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract PaymentDepositAccount is Controlled {\\n /**\\n * @dev Public constructor\\n */\\n constructor() public payable Controlled() {}\\n\\n /**\\n * @notice Allow receives\\n */\\n receive()\\n external\\n payable\\n {\\n //\\n }\\n\\n // external functions\\n\\n /**\\n * @notice Executes transaction\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @return transaction result\\n */\\n function executeTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n onlyController\\n returns (bytes memory)\\n {\\n bytes memory result;\\n bool succeeded;\\n\\n // solhint-disable-next-line avoid-call-value, avoid-low-level-calls\\n (succeeded, result) = payable(to).call{value: value}(data);\\n\\n require(\\n succeeded,\\n \\\"Account: transaction reverted\\\"\\n );\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xeac8f6b6b1cb749d72d8d5160a622fe4100a1e18a73635e51ce30e6f11029ad1\",\"license\":\"MIT\"},\"src/payments/PaymentRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../common/access/Guarded.sol\\\";\\nimport \\\"../common/libs/ECDSALib.sol\\\";\\nimport \\\"../common/libs/SafeMathLib.sol\\\";\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"../common/signature/SignatureValidator.sol\\\";\\nimport \\\"../common/token/ERC20Token.sol\\\";\\nimport \\\"../external/ExternalAccountRegistry.sol\\\";\\nimport \\\"../personal/PersonalAccountRegistry.sol\\\";\\nimport \\\"../gateway/GatewayRecipient.sol\\\";\\nimport \\\"./PaymentDepositAccount.sol\\\";\\n\\n\\n/**\\n * @title Payment registry\\n *\\n * @notice A registry for payment and payment channels\\n *\\n * @dev the `DepositExit` process can be used in a case operator (guardian) couldn't sign commit / withdrawal message.\\n * Process will be rejected when any of senders channels will be committed.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract PaymentRegistry is Guarded, Initializable, SignatureValidator, GatewayRecipient {\\n using ECDSALib for bytes32;\\n using SafeMathLib for uint256;\\n\\n struct Deposit {\\n address account;\\n mapping(address => uint256) withdrawnAmount;\\n mapping(address => uint256) exitLockedUntil;\\n }\\n\\n struct PaymentChannel {\\n uint256 committedAmount;\\n }\\n\\n struct DepositWithdrawal {\\n address owner;\\n address token;\\n uint256 amount;\\n }\\n\\n struct PaymentChannelCommit {\\n address sender;\\n address recipient;\\n address token;\\n bytes32 uid;\\n uint256 blockNumber;\\n uint256 amount;\\n }\\n\\n uint256 private constant DEFAULT_DEPOSIT_EXIT_LOCK_PERIOD = 28 days;\\n\\n bytes32 private constant HASH_PREFIX_DEPOSIT_WITHDRAWAL = keccak256(\\n \\\"DepositWithdrawal(address owner,address token,uint256 amount)\\\"\\n );\\n bytes32 private constant HASH_PREFIX_PAYMENT_CHANNEL_COMMIT = keccak256(\\n \\\"PaymentChannelCommit(address sender,address recipient,address token,bytes32 uid,uint256 blockNumber,uint256 amount)\\\"\\n );\\n\\n ExternalAccountRegistry public externalAccountRegistry;\\n PersonalAccountRegistry public personalAccountRegistry;\\n\\n uint256 public depositExitLockPeriod;\\n\\n mapping(address => Deposit) private deposits;\\n mapping(bytes32 => PaymentChannel) private paymentChannels;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the deposit account is deployed\\n * @param depositAccount deposit account address\\n * @param owner owner address\\n */\\n event DepositAccountDeployed(\\n address depositAccount,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the deposit exist is requested\\n * @param depositAccount deposit account address\\n * @param owner owner address\\n * @param token token address\\n * @param lockedUntil deposit exist locked util time\\n */\\n event DepositExitRequested(\\n address depositAccount,\\n address owner,\\n address token,\\n uint256 lockedUntil\\n );\\n\\n /**\\n * @dev Emitted when the deposit exist is completed\\n * @param depositAccount deposit account address\\n * @param owner owner address\\n * @param token token address\\n * @param amount deposit exist amount\\n */\\n event DepositExitCompleted(\\n address depositAccount,\\n address owner,\\n address token,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Emitted when the deposit exist is rejected\\n * @param depositAccount deposit account address\\n * @param owner owner address\\n * @param token token address\\n */\\n event DepositExitRejected(\\n address depositAccount,\\n address owner,\\n address token\\n );\\n\\n /**\\n * @dev Emitted when the deposit has been withdrawn\\n * @param depositAccount deposit account address\\n * @param owner owner address\\n * @param token token address\\n * @param amount withdrawn amount\\n */\\n event DepositWithdrawn(\\n address depositAccount,\\n address owner,\\n address token,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Emitted when the payment channel has been committed\\n * @param hash channel hash\\n * @param sender sender address\\n * @param recipient recipient address\\n * @param token token address\\n * @param uid unique channel id\\n * @param amount committed amount\\n */\\n event PaymentChannelCommitted(\\n bytes32 hash,\\n address sender,\\n address recipient,\\n address token,\\n bytes32 uid,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Emitted when the payment has been withdrawn\\n * @param channelHash channel hash\\n * @param value payment value\\n */\\n event PaymentWithdrawn(\\n bytes32 channelHash,\\n uint256 value\\n );\\n\\n /**\\n * @dev Emitted when the payment has been deposited\\n * @param channelHash channel hash\\n * @param value payment value\\n */\\n event PaymentDeposited(\\n bytes32 channelHash,\\n uint256 value\\n );\\n\\n /**\\n * @dev Emitted when the payment has been withdrawn and deposited (split)\\n * @param channelHash channel hash\\n * @param totalValue payment total value\\n * @param depositValue payment deposited value\\n */\\n event PaymentSplit(\\n bytes32 channelHash,\\n uint256 totalValue,\\n uint256 depositValue\\n );\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Initializable() SignatureValidator() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initialize `PaymentRegistry` contract\\n * @param externalAccountRegistry_ `ExternalAccountRegistry` contract address\\n * @param personalAccountRegistry_ `PersonalAccountRegistry` contract address\\n * @param depositExitLockPeriod_ deposit exit lock period\\n * @param guardians_ array of guardians addresses\\n * @param gateway_ `Gateway` contract address\\n */\\n function initialize(\\n ExternalAccountRegistry externalAccountRegistry_,\\n PersonalAccountRegistry personalAccountRegistry_,\\n uint256 depositExitLockPeriod_,\\n address[] calldata guardians_,\\n address gateway_\\n )\\n external\\n onlyInitializer\\n {\\n externalAccountRegistry = externalAccountRegistry_;\\n personalAccountRegistry = personalAccountRegistry_;\\n\\n if (depositExitLockPeriod_ == 0) {\\n depositExitLockPeriod = DEFAULT_DEPOSIT_EXIT_LOCK_PERIOD;\\n } else {\\n depositExitLockPeriod = depositExitLockPeriod_;\\n }\\n\\n // Guarded\\n _initializeGuarded(guardians_);\\n\\n // GatewayRecipient\\n _initializeGatewayRecipient(gateway_);\\n }\\n\\n /**\\n * @notice Deploys deposit account\\n * @param owner owner address\\n */\\n function deployDepositAccount(\\n address owner\\n )\\n external\\n {\\n _deployDepositAccount(owner);\\n }\\n\\n /**\\n * @notice Requests deposit exit\\n * @param token token address\\n */\\n function requestDepositExit(\\n address token\\n )\\n external\\n {\\n address owner = _getContextAccount();\\n uint256 lockedUntil = deposits[owner].exitLockedUntil[token];\\n\\n require(\\n lockedUntil == 0,\\n \\\"PaymentRegistry: deposit exit already requested\\\"\\n );\\n\\n _deployDepositAccount(owner);\\n\\n // solhint-disable-next-line not-rely-on-time\\n lockedUntil = now.add(depositExitLockPeriod);\\n\\n deposits[owner].exitLockedUntil[token] = lockedUntil;\\n\\n emit DepositExitRequested(\\n deposits[owner].account,\\n owner,\\n token,\\n lockedUntil\\n );\\n }\\n\\n /**\\n * @notice Processes deposit exit\\n * @param token token address\\n */\\n function processDepositExit(\\n address token\\n )\\n external\\n {\\n address owner = _getContextAccount();\\n uint256 lockedUntil = deposits[owner].exitLockedUntil[token];\\n\\n require(\\n lockedUntil != 0,\\n \\\"PaymentRegistry: deposit exit not requested\\\"\\n );\\n\\n require(\\n // solhint-disable-next-line not-rely-on-time\\n lockedUntil <= now,\\n \\\"PaymentRegistry: deposit exit locked\\\"\\n );\\n\\n deposits[owner].exitLockedUntil[token] = 0;\\n\\n address depositAccount = deposits[owner].account;\\n uint256 depositValue;\\n\\n if (token == address(0)) {\\n depositValue = depositAccount.balance;\\n } else {\\n depositValue = ERC20Token(token).balanceOf(depositAccount);\\n }\\n\\n _transferFromDeposit(\\n depositAccount,\\n owner,\\n token,\\n depositValue\\n );\\n\\n emit DepositExitCompleted(\\n depositAccount,\\n owner,\\n token,\\n depositValue\\n );\\n }\\n\\n /**\\n * @notice Withdraws deposit\\n * @param token token address\\n * @param amount amount to withdraw\\n * @param guardianSignature guardian signature\\n */\\n function withdrawDeposit(\\n address token,\\n uint256 amount,\\n bytes calldata guardianSignature\\n )\\n external\\n {\\n address owner = _getContextAccount();\\n uint256 value = amount.sub(deposits[owner].withdrawnAmount[token]);\\n\\n require(\\n value > 0,\\n \\\"PaymentRegistry: invalid amount\\\"\\n );\\n\\n bytes32 messageHash = _hashDepositWithdrawal(\\n owner,\\n token,\\n amount\\n );\\n\\n require(\\n _verifyGuardianSignature(messageHash, guardianSignature),\\n \\\"PaymentRegistry: invalid guardian signature\\\"\\n );\\n\\n deposits[owner].withdrawnAmount[token] = amount;\\n\\n _verifyDepositExitOrDeployAccount(owner, token);\\n\\n _transferFromDeposit(\\n deposits[owner].account,\\n owner,\\n token,\\n value\\n );\\n\\n emit DepositWithdrawn(\\n deposits[owner].account,\\n owner,\\n token,\\n amount\\n );\\n }\\n\\n /**\\n * @notice Commits payment channel and withdraw payment\\n * @param sender sender address\\n * @param token token address\\n * @param uid unique channel id\\n * @param blockNumber block number\\n * @param amount amount to commit\\n * @param senderSignature sender signature\\n * @param guardianSignature guardian signature\\n */\\n function commitPaymentChannelAndWithdraw(\\n address sender,\\n address token,\\n bytes32 uid,\\n uint256 blockNumber,\\n uint256 amount,\\n bytes calldata senderSignature,\\n bytes calldata guardianSignature\\n )\\n external\\n {\\n address recipient = _getContextAccount();\\n\\n (bytes32 hash, address depositAccount, uint256 paymentValue) = _commitPaymentChannel(\\n sender,\\n recipient,\\n token,\\n uid,\\n blockNumber,\\n amount,\\n senderSignature,\\n guardianSignature\\n );\\n\\n _transferFromDeposit(\\n depositAccount,\\n recipient,\\n token,\\n paymentValue\\n );\\n\\n emit PaymentWithdrawn(hash, paymentValue);\\n }\\n\\n /**\\n * @notice Commits payment channel and deposit payment\\n * @param sender sender address\\n * @param token token address\\n * @param uid unique channel id\\n * @param blockNumber block number\\n * @param amount amount to commit\\n * @param senderSignature sender signature\\n * @param guardianSignature guardian signature\\n */\\n function commitPaymentChannelAndDeposit(\\n address sender,\\n address token,\\n bytes32 uid,\\n uint256 blockNumber,\\n uint256 amount,\\n bytes calldata senderSignature,\\n bytes calldata guardianSignature\\n )\\n external\\n {\\n address recipient = _getContextAccount();\\n\\n (bytes32 hash, address depositAccount, uint256 paymentValue) = _commitPaymentChannel(\\n sender,\\n recipient,\\n token,\\n uid,\\n blockNumber,\\n amount,\\n senderSignature,\\n guardianSignature\\n );\\n\\n _transferFromDeposit(\\n depositAccount,\\n _computeDepositAccountAddress(recipient),\\n token,\\n paymentValue\\n );\\n\\n emit PaymentDeposited(hash, paymentValue);\\n }\\n\\n /**\\n * @notice Commits payment channel, withdraws and deposits (split) payment\\n * @param sender sender address\\n * @param token token address\\n * @param uid unique channel id\\n * @param blockNumber block number\\n * @param amount amount to commit\\n * @param depositPaymentValue amount to deposit\\n * @param senderSignature sender signature\\n * @param guardianSignature guardian signature\\n */\\n function commitPaymentChannelAndSplit(\\n address sender,\\n address token,\\n bytes32 uid,\\n uint256 blockNumber,\\n uint256 amount,\\n uint256 depositPaymentValue,\\n bytes calldata senderSignature,\\n bytes calldata guardianSignature\\n )\\n external\\n {\\n address recipient = _getContextAccount();\\n\\n (bytes32 hash, address depositAccount, uint256 paymentValue) = _commitPaymentChannel(\\n sender,\\n recipient,\\n token,\\n uid,\\n blockNumber,\\n amount,\\n senderSignature,\\n guardianSignature\\n );\\n\\n _transferSplitFromDeposit(\\n depositAccount,\\n recipient,\\n token,\\n paymentValue,\\n depositPaymentValue\\n );\\n\\n emit PaymentSplit(hash, paymentValue, depositPaymentValue);\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Computes deposit account address\\n * @param owner owner address\\n * @return deposit account address\\n */\\n function computeDepositAccountAddress(\\n address owner\\n )\\n external\\n view\\n returns (address)\\n {\\n return _computeDepositAccountAddress(owner);\\n }\\n\\n /**\\n * @notice Checks if deposit account is deployed\\n * @param owner owner address\\n * @return true when deposit account is deployed\\n */\\n function isDepositAccountDeployed(\\n address owner\\n )\\n external\\n view\\n returns (bool)\\n {\\n return deposits[owner].account != address(0);\\n }\\n\\n /**\\n * @notice Gets deposit exit locked until time\\n * @param owner owner address\\n * @param token token address\\n * @return locked until time\\n */\\n function getDepositExitLockedUntil(\\n address owner,\\n address token\\n )\\n external\\n view\\n returns (uint256)\\n {\\n return deposits[owner].exitLockedUntil[token];\\n }\\n\\n /**\\n * @notice Gets deposit withdrawn amount\\n * @param owner owner address\\n * @param token token address\\n * @return withdrawn amount\\n */\\n function getDepositWithdrawnAmount(\\n address owner,\\n address token\\n )\\n external\\n view\\n returns (uint256)\\n {\\n return deposits[owner].withdrawnAmount[token];\\n }\\n\\n /**\\n * @notice Gets payment channel committed amount\\n * @param hash payment channel hash\\n * @return committed amount\\n */\\n function getPaymentChannelCommittedAmount(\\n bytes32 hash\\n )\\n external\\n view\\n returns (uint256)\\n {\\n return paymentChannels[hash].committedAmount;\\n }\\n\\n // external functions (pure)\\n\\n /**\\n * @notice Computes payment channel hash\\n * @param sender sender address\\n * @param recipient recipient address\\n * @param token token address\\n * @param uid unique channel id\\n * @return hash\\n */\\n function computePaymentChannelHash(\\n address sender,\\n address recipient,\\n address token,\\n bytes32 uid\\n )\\n external\\n pure\\n returns (bytes32)\\n {\\n return _computePaymentChannelHash(\\n sender,\\n recipient,\\n token,\\n uid\\n );\\n }\\n\\n // public functions (views)\\n\\n /**\\n * @notice Hashes `DepositWithdrawal` message payload\\n * @param depositWithdrawal struct\\n * @return hash\\n */\\n function hashDepositWithdrawal(\\n DepositWithdrawal memory depositWithdrawal\\n )\\n public\\n view\\n returns (bytes32)\\n {\\n return _hashDepositWithdrawal(\\n depositWithdrawal.owner,\\n depositWithdrawal.token,\\n depositWithdrawal.amount\\n );\\n }\\n\\n /**\\n * @notice Hashes `PaymentChannelCommit` message payload\\n * @param paymentChannelCommit struct\\n * @return hash\\n */\\n function hashPaymentChannelCommit(\\n PaymentChannelCommit memory paymentChannelCommit\\n )\\n public\\n view\\n returns (bytes32)\\n {\\n return _hashPaymentChannelCommit(\\n paymentChannelCommit.sender,\\n paymentChannelCommit.recipient,\\n paymentChannelCommit.token,\\n paymentChannelCommit.uid,\\n paymentChannelCommit.blockNumber,\\n paymentChannelCommit.amount\\n );\\n }\\n\\n // private functions\\n\\n function _deployDepositAccount(\\n address owner\\n )\\n private\\n {\\n if (deposits[owner].account == address(0)) {\\n bytes32 salt = keccak256(\\n abi.encodePacked(\\n owner\\n )\\n );\\n\\n deposits[owner].account = address(new PaymentDepositAccount{salt: salt}());\\n\\n emit DepositAccountDeployed(\\n deposits[owner].account,\\n owner\\n );\\n }\\n }\\n\\n function _verifyDepositExitOrDeployAccount(\\n address owner,\\n address token\\n )\\n private\\n {\\n if (deposits[owner].exitLockedUntil[token] > 0) {\\n deposits[owner].exitLockedUntil[token] = 0;\\n\\n emit DepositExitRejected(\\n deposits[owner].account,\\n owner,\\n token\\n );\\n } else {\\n _deployDepositAccount(owner);\\n }\\n }\\n\\n function _commitPaymentChannel(\\n address sender,\\n address recipient,\\n address token,\\n bytes32 uid,\\n uint256 blockNumber,\\n uint256 amount,\\n bytes memory senderSignature,\\n bytes memory guardianSignature\\n )\\n private\\n returns (bytes32 hash, address depositAccount, uint256 paymentValue)\\n {\\n bytes32 messageHash = _hashPaymentChannelCommit(\\n sender,\\n recipient,\\n token,\\n uid,\\n blockNumber,\\n amount\\n );\\n\\n if (senderSignature.length == 0) {\\n require(\\n externalAccountRegistry.verifyAccountProofAtBlock(sender, messageHash, blockNumber),\\n \\\"PaymentRegistry: invalid guardian signature\\\"\\n );\\n } else {\\n address signer = messageHash.recoverAddress(senderSignature);\\n\\n if (sender != signer) {\\n require(\\n personalAccountRegistry.verifyAccountOwnerAtBlock(sender, signer, blockNumber) ||\\n externalAccountRegistry.verifyAccountOwnerAtBlock(sender, signer, blockNumber),\\n \\\"PaymentRegistry: invalid sender signature\\\"\\n );\\n }\\n }\\n\\n require(\\n _verifyGuardianSignature(messageHash, guardianSignature),\\n \\\"PaymentRegistry: invalid guardian signature\\\"\\n );\\n\\n hash = _computePaymentChannelHash(\\n sender,\\n recipient,\\n token,\\n uid\\n );\\n\\n /// @dev calc payment value\\n paymentValue = amount.sub(paymentChannels[hash].committedAmount);\\n\\n require(\\n paymentValue != 0,\\n \\\"PaymentRegistry: invalid payment value\\\"\\n );\\n\\n paymentChannels[hash].committedAmount = amount;\\n\\n _verifyDepositExitOrDeployAccount(sender, token);\\n\\n depositAccount = deposits[sender].account;\\n\\n emit PaymentChannelCommitted(\\n hash,\\n sender,\\n recipient,\\n token,\\n uid,\\n amount\\n );\\n\\n return (hash, depositAccount, paymentValue);\\n }\\n\\n function _transferFromDeposit(\\n address depositAccount,\\n address to,\\n address token,\\n uint256 value\\n )\\n private\\n {\\n if (token == address(0)) {\\n PaymentDepositAccount(payable(depositAccount)).executeTransaction(\\n to,\\n value,\\n new bytes(0)\\n );\\n } else {\\n bytes memory response = PaymentDepositAccount(payable(depositAccount)).executeTransaction(\\n token,\\n 0,\\n abi.encodeWithSelector(\\n ERC20Token(token).transfer.selector,\\n to,\\n value\\n )\\n );\\n\\n if (response.length > 0) {\\n require(\\n abi.decode(response, (bool)),\\n \\\"PaymentRegistry: ERC20Token transfer reverted\\\"\\n );\\n }\\n }\\n }\\n\\n function _transferSplitFromDeposit(\\n address depositAccount,\\n address to,\\n address token,\\n uint256 paymentValue,\\n uint256 depositValue\\n )\\n private\\n {\\n require(\\n depositValue > 0,\\n \\\"PaymentRegistry: invalid deposit value\\\"\\n );\\n\\n uint256 withdrawValue = paymentValue.sub(depositValue);\\n\\n require(\\n withdrawValue > 0,\\n \\\"PaymentRegistry: invalid withdraw value\\\"\\n );\\n\\n _transferFromDeposit(\\n depositAccount,\\n to,\\n token,\\n withdrawValue\\n );\\n\\n _transferFromDeposit(\\n depositAccount,\\n _computeDepositAccountAddress(to),\\n token,\\n depositValue\\n );\\n }\\n\\n // private functions (views)\\n\\n function _computeDepositAccountAddress(\\n address owner\\n )\\n private\\n view\\n returns (address)\\n {\\n bytes32 salt = keccak256(\\n abi.encodePacked(\\n owner\\n )\\n );\\n\\n bytes memory creationCode = type(PaymentDepositAccount).creationCode;\\n\\n bytes32 data = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n salt,\\n keccak256(creationCode)\\n )\\n );\\n\\n return address(uint160(uint256(data)));\\n }\\n\\n function _hashDepositWithdrawal(\\n address owner,\\n address token,\\n uint256 amount\\n )\\n private\\n view\\n returns (bytes32)\\n {\\n return _hashMessagePayload(HASH_PREFIX_DEPOSIT_WITHDRAWAL, abi.encodePacked(\\n owner,\\n token,\\n amount\\n ));\\n }\\n\\n function _hashPaymentChannelCommit(\\n address sender,\\n address recipient,\\n address token,\\n bytes32 uid,\\n uint256 blockNumber,\\n uint256 amount\\n )\\n private\\n view\\n returns (bytes32)\\n {\\n return _hashMessagePayload(HASH_PREFIX_PAYMENT_CHANNEL_COMMIT, abi.encodePacked(\\n sender,\\n recipient,\\n token,\\n uid,\\n blockNumber,\\n amount\\n ));\\n }\\n\\n // private functions (pure)\\n\\n function _computePaymentChannelHash(\\n address sender,\\n address recipient,\\n address token,\\n bytes32 uid\\n )\\n private\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encodePacked(\\n sender,\\n recipient,\\n token,\\n uid\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0x84d3f908a35ba0f9dcc3e37808b42cdad0b81285ec006c96d25302d8dffa2704\",\"license\":\"MIT\"},\"src/personal/PersonalAccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/access/Guarded.sol\\\";\\nimport \\\"../common/account/AccountController.sol\\\";\\nimport \\\"../common/account/AccountRegistry.sol\\\";\\nimport \\\"../common/libs/BlockLib.sol\\\";\\nimport \\\"../common/libs/ECDSALib.sol\\\";\\nimport \\\"../common/libs/ECDSAExtendedLib.sol\\\";\\nimport \\\"../common/libs/SafeMathLib.sol\\\";\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"../common/token/ERC20Token.sol\\\";\\nimport \\\"../gateway/GatewayRecipient.sol\\\";\\n\\n\\n/**\\n * @title Personal account registry\\n *\\n * @notice A registry for personal (controlled by owners) accounts\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract PersonalAccountRegistry is Guarded, AccountController, AccountRegistry, Initializable, GatewayRecipient {\\n using BlockLib for BlockLib.BlockRelated;\\n using SafeMathLib for uint256;\\n using ECDSALib for bytes32;\\n using ECDSAExtendedLib for bytes;\\n\\n struct Account {\\n bool deployed;\\n bytes32 salt;\\n mapping(address => BlockLib.BlockRelated) owners;\\n }\\n\\n mapping(address => Account) private accounts;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the new owner is added\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerAdded(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the existing owner is removed\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerRemoved(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the call is refunded\\n * @param account account address\\n * @param beneficiary beneficiary address\\n * @param token token address\\n * @param value value\\n */\\n event AccountCallRefunded(\\n address account,\\n address beneficiary,\\n address token,\\n uint256 value\\n );\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Initializable() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `PersonalAccountRegistry` contract\\n * @param guardians_ array of guardians addresses\\n * @param accountImplementation_ account implementation address\\n * @param gateway_ `Gateway` contract address\\n */\\n function initialize(\\n address[] calldata guardians_,\\n address accountImplementation_,\\n address gateway_\\n )\\n external\\n onlyInitializer\\n {\\n // Guarded\\n _initializeGuarded(guardians_);\\n\\n // AccountController\\n _initializeAccountController(address(this), accountImplementation_);\\n\\n // GatewayRecipient\\n _initializeGatewayRecipient(gateway_);\\n }\\n\\n /**\\n * @notice Upgrades `PersonalAccountRegistry` contract\\n * @param accountImplementation_ account implementation address\\n */\\n function upgrade(\\n address accountImplementation_\\n )\\n external\\n onlyGuardian\\n {\\n _setAccountImplementation(accountImplementation_, true);\\n }\\n\\n /**\\n * @notice Deploys account\\n * @param account account address\\n */\\n function deployAccount(\\n address account\\n )\\n external\\n {\\n _verifySender(account);\\n _deployAccount(account);\\n }\\n\\n /**\\n * @notice Upgrades account\\n * @param account account address\\n */\\n function upgradeAccount(\\n address account\\n )\\n external\\n {\\n _verifySender(account);\\n _upgradeAccount(account, true);\\n }\\n\\n /**\\n * @notice Adds a new account owner\\n * @param account account address\\n * @param owner owner address\\n */\\n function addAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n {\\n _verifySender(account);\\n\\n require(\\n owner != address(0),\\n \\\"PersonalAccountRegistry: cannot add 0x0 owner\\\"\\n );\\n\\n require(\\n !accounts[account].owners[owner].verifyAtCurrentBlock(),\\n \\\"PersonalAccountRegistry: owner already exists\\\"\\n );\\n\\n accounts[account].owners[owner].added = true;\\n accounts[account].owners[owner].removedAtBlockNumber = 0;\\n\\n emit AccountOwnerAdded(\\n account,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Removes the existing account owner\\n * @param account account address\\n * @param owner owner address\\n */\\n function removeAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n {\\n address sender = _verifySender(account);\\n\\n require(\\n owner != sender,\\n \\\"PersonalAccountRegistry: cannot remove self\\\"\\n );\\n\\n require(\\n accounts[account].owners[owner].verifyAtCurrentBlock(),\\n \\\"PersonalAccountRegistry: owner doesn't exist\\\"\\n );\\n\\n accounts[account].owners[owner].removedAtBlockNumber = block.number;\\n\\n emit AccountOwnerRemoved(\\n account,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Executes account transaction\\n * @dev Deploys an account if not deployed yet\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n */\\n function executeAccountTransaction(\\n address account,\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n {\\n _verifySender(account);\\n\\n _deployAccount(account);\\n\\n _executeAccountTransaction(\\n account,\\n to,\\n value,\\n data,\\n true\\n );\\n }\\n\\n /**\\n * @notice Refunds account call\\n * @dev Deploys an account if not deployed yet\\n * @param account account address\\n * @param token token address\\n * @param value value\\n */\\n function refundAccountCall(\\n address account,\\n address token,\\n uint256 value\\n )\\n external\\n {\\n _verifySender(account);\\n\\n _deployAccount(account);\\n\\n /* solhint-disable avoid-tx-origin */\\n\\n if (token == address(0)) {\\n _executeAccountTransaction(\\n account,\\n tx.origin,\\n value,\\n new bytes(0),\\n false\\n );\\n } else {\\n bytes memory response = _executeAccountTransaction(\\n account,\\n token,\\n 0,\\n abi.encodeWithSelector(\\n ERC20Token(token).transfer.selector,\\n tx.origin,\\n value\\n ),\\n false\\n );\\n\\n if (response.length > 0) {\\n require(\\n abi.decode(response, (bool)),\\n \\\"PersonalAccountRegistry: ERC20Token transfer reverted\\\"\\n );\\n }\\n }\\n\\n emit AccountCallRefunded(\\n account,\\n tx.origin,\\n token,\\n value\\n );\\n\\n /* solhint-enable avoid-tx-origin */\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Computes account address\\n * @param saltOwner salt owner address\\n * @return account address\\n */\\n function computeAccountAddress(\\n address saltOwner\\n )\\n external\\n view\\n returns (address)\\n {\\n return _computeAccountAddress(saltOwner);\\n }\\n\\n /**\\n * @notice Checks if account is deployed\\n * @param account account address\\n * @return true when account is deployed\\n */\\n function isAccountDeployed(\\n address account\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].deployed;\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at the current block\\n * @param account account address\\n * @param owner owner address\\n * @return true on correct account owner\\n */\\n function verifyAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(account, owner);\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at a specific block\\n * @param account account address\\n * @param owner owner address\\n * @param blockNumber block number to verify\\n * @return true on correct account owner\\n */\\n function verifyAccountOwnerAtBlock(\\n address account,\\n address owner,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n bool result = false;\\n\\n if (_verifyAccountOwner(account, owner)) {\\n result = true;\\n } else {\\n result = accounts[account].owners[owner].verifyAtBlock(blockNumber);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param messageHash message hash\\n * @param signature signature\\n * @return magic hash if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n override\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(\\n account,\\n messageHash.recoverAddress(signature)\\n );\\n }\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param message message\\n * @param signature signature\\n * @return magic hash if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes calldata message,\\n bytes calldata signature\\n )\\n override\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(\\n account,\\n message.toEthereumSignedMessageHash().recoverAddress(signature)\\n );\\n }\\n\\n // private functions\\n\\n function _verifySender(\\n address account\\n )\\n private\\n returns (address)\\n {\\n address sender = _getContextSender();\\n\\n if (accounts[account].owners[sender].added) {\\n require(\\n accounts[account].owners[sender].removedAtBlockNumber == 0,\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n } else {\\n require(\\n accounts[account].salt == 0,\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n\\n bytes32 salt = keccak256(\\n abi.encodePacked(sender)\\n );\\n\\n require(\\n account == _computeAccountAddress(salt),\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n\\n accounts[account].salt = salt;\\n accounts[account].owners[sender].added = true;\\n\\n emit AccountOwnerAdded(\\n account,\\n sender\\n );\\n }\\n\\n return sender;\\n }\\n\\n function _deployAccount(\\n address account\\n )\\n internal\\n {\\n if (!accounts[account].deployed) {\\n _deployAccount(\\n accounts[account].salt,\\n true\\n );\\n\\n accounts[account].deployed = true;\\n }\\n }\\n\\n // private functions (views)\\n\\n function _computeAccountAddress(\\n address saltOwner\\n )\\n private\\n view\\n returns (address)\\n {\\n bytes32 salt = keccak256(\\n abi.encodePacked(saltOwner)\\n );\\n\\n return _computeAccountAddress(salt);\\n }\\n\\n function _verifyAccountOwner(\\n address account,\\n address owner\\n )\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (accounts[account].owners[owner].added) {\\n result = accounts[account].owners[owner].removedAtBlockNumber == 0;\\n } else if (accounts[account].salt == 0) {\\n result = account == _computeAccountAddress(owner);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xdae162610e707ab8c394b3edf924b75ef1f315520935cb88f4280b29eeaf4b61\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5032600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060004690508060028190555050614c138061006e6000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c80639130c06e116100de578063c36326e711610097578063da1b213d11610071578063da1b213d146104bb578063dc7d6c31146104d7578063df04338014610507578063e0fe396e146105235761018e565b8063c36326e71461043d578063d0f710d61461046d578063d2c83b9a1461049d5761018e565b80639130c06e146103915780639a85fae2146103ad5780639a8a0592146103c9578063a526d83b146103e7578063b0274a7314610403578063bdff4b3b1461041f5761018e565b80636121fcfc1161014b578063714041561161012557806371404156146102f757806384389a2b1461031357806387d31313146103435780638a1773ab146103615761018e565b80636121fcfc1461028f5780636524a947146102bf5780636866da52146102db5761018e565b80630c68ba2114610193578063116191b6146101c35780632e4f161e146101e15780632e7037a014610211578063392e53cd1461024157806360bf4df21461025f575b600080fd5b6101ad60048036038101906101a89190612f83565b61053f565b6040516101ba91906140a9565b60405180910390f35b6101cb610594565b6040516101d89190613e92565b60405180910390f35b6101fb60048036038101906101f69190612fe8565b6105ba565b60405161020891906140c4565b60405180910390f35b61022b600480360381019061022691906133f5565b6105d2565b60405161023891906140c4565b60405180910390f35b6102496105f2565b60405161025691906140a9565b60405180910390f35b61027960048036038101906102749190612f83565b61064a565b6040516102869190613e92565b60405180910390f35b6102a960048036038101906102a49190612f83565b61065c565b6040516102b691906140a9565b60405180910390f35b6102d960048036038101906102d49190612f83565b6106f7565b005b6102f560048036038101906102f0919061320c565b610703565b005b610311600480360381019061030c9190612f83565b610a28565b005b61032d6004803603810190610328919061341e565b610c40565b60405161033a91906140c4565b60405180910390f35b61034b610c6f565b6040516103589190614200565b60405180910390f35b61037b600480360381019061037691906132a1565b610c95565b604051610388919061449d565b60405180910390f35b6103ab60048036038101906103a69190612f83565b610cb5565b005b6103c760048036038101906103c2919061304b565b610fe9565b005b6103d16110f4565b6040516103de919061449d565b60405180910390f35b61040160048036038101906103fc9190612f83565b6110fa565b005b61041d60048036038101906104189190612f83565b611191565b005b6104276113ac565b604051610434919061449d565b60405180910390f35b61045760048036038101906104529190612fac565b6113b2565b604051610464919061449d565b60405180910390f35b610487600480360381019061048291906132ca565b61143c565b60405161049491906140a9565b60405180910390f35b6104a5611495565b6040516104b291906141e5565b60405180910390f35b6104d560048036038101906104d09190613121565b6114bb565b005b6104f160048036038101906104ec9190612fac565b6115c2565b6040516104fe919061449d565b60405180910390f35b610521600480360381019061051c919061304b565b61164c565b005b61053d60048036038101906105389190613363565b61174f565b005b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006105c885858585611955565b9050949350505050565b60006105eb82600001518360200151846040015161198e565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b6000610655826119e6565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff16600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b61070081611a84565b50565b600061070d611c94565b905060006107a3600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205486611ca590919063ffffffff16565b9050600081116107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df9061435d565b60405180910390fd5b60006107f583888861198e565b90506108458186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611cd2565b610884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087b9061447d565b60405180910390fd5b85600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506109128388611d3f565b610980600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848985611efc565b7f95f66b073d65f18e43f6b76c7ab8557787f5f766d86cab7c9c76f41be9f8abc6600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848989604051610a179493929190613f51565b60405180910390a150505050505050565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610ab3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aaa9061433d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161415610b22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b199061443d565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610bad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba4906143dd565b60405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b3282604051610c35929190613ec8565b60405180910390a150565b6000610c68826000015183602001518460400151856060015186608001518760a0015161218c565b9050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060086000838152602001908152602001600020600001549050919050565b6000610cbf611c94565b90506000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811415610d89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d80906142fd565b60405180910390fd5b42811115610dcc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc39061437d565b60405180910390fd5b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610f0d578173ffffffffffffffffffffffffffffffffffffffff16319050610f99565b8473ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401610f469190613e92565b60206040518083038186803b158015610f5e57600080fd5b505afa158015610f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f969190613447565b90505b610fa582858784611efc565b7f5300d9a2838baade7cdc628c82cb80c1298853ba5f389d51e2b47330336aeffc82858784604051610fda9493929190613f51565b60405180910390a15050505050565b6000610ff3611c94565b905060008060006110928d858e8e8e8e8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506121ed565b9250925092506110ac826110a5866119e6565b8e84611efc565b7f771bc0494e1a2fcbef19a8762845000d8c4500454c756a7370c955e39ed60fd483826040516110dd929190614140565b60405180910390a150505050505050505050505050565b60025481565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117c9061433d565b60405180910390fd5b61118e81612691565b50565b600061119b611c94565b90506000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114611264576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125b9061429d565b60405180910390fd5b61126d82611a84565b6112826006544261282090919063ffffffff16565b905080600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fed3c8c6cdfc6d7b91dc9db3e1f54866587c26c3c3e0f9e32cd1944974be43a50600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683858460405161139f9493929190613f51565b60405180910390a1505050565b60065481565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600061148c8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611cd2565b90509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006114c5611c94565b905060008060006115648e858f8f8f8f8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506121ed565b92509250925061157782858f848d612875565b7f8b67efde501ee9cd0e771f7436554c44a5c076239ff3a6fbb397646a4689c0f283828b6040516115aa93929190614169565b60405180910390a15050505050505050505050505050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000611656611c94565b905060008060006116f58d858e8e8e8e8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506121ed565b92509250925061170782858e84611efc565b7f6675346cd43846f7d47c310d39fb5c15bc7db66b3770338cdf1f133613a5ae988382604051611738929190614140565b60405180910390a150505050505050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146117df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d69061427d565b60405180910390fd5b6000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008414156118bb576224ea006006819055506118c3565b836006819055505b61190d838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061293a565b61191681612992565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516119459190613ead565b60405180910390a1505050505050565b60008484848460405160200161196e9493929190613cd9565b604051602081830303815290604052805190602001209050949350505050565b60006119dd7f3b3087c8f883f1f44cabe66444f5f9d96f69de6a88f364ea10959eef0331414a8585856040516020016119c993929190613d97565b6040516020818303038152906040526129d6565b90509392505050565b600080826040516020016119fa9190613cbe565b604051602081830303815290604052805190602001209050606060405180602001611a2490612cff565b6020820181038252601f19601f820116604052509050600060ff60f81b30848480519060200120604051602001611a5e9493929190613dd4565b6040516020818303038152906040528051906020012090508060001c9350505050919050565b600073ffffffffffffffffffffffffffffffffffffffff16600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611c9157600081604051602001611b2e9190613cbe565b60405160208183030381529060405280519060200120905080604051611b5390612cff565b8190604051809103906000f5905080158015611b73573d6000803e3d6000fd5b50600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd80572c0f2f24f2d9d726d831bd860ed82b12bafaf01cfb6e4d38fb23c4347e9600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683604051611c87929190613ef1565b60405180910390a1505b50565b6000611ca06028612a17565b905090565b6000611cca8383604051806060016040528060218152602001614be660219139612aac565b905092915050565b600080611ce88385612b0190919063ffffffff16565b90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115611eee576000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fa19281a6f3163da06f6b82f3ecf0130493c52aba23cdc2a312f652742f0d1801600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383604051611ee193929190613f1a565b60405180910390a1611ef8565b611ef782611a84565b5b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612016578373ffffffffffffffffffffffffffffffffffffffff16633f579f428483600067ffffffffffffffff81118015611f6757600080fd5b506040519080825280601f01601f191660200182016040528015611f9a5781602001600182028036833780820191505090505b506040518463ffffffff1660e01b8152600401611fb99392919061406b565b600060405180830381600087803b158015611fd357600080fd5b505af1158015611fe7573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906120109190613322565b50612186565b60608473ffffffffffffffffffffffffffffffffffffffff16633f579f4284600063a9059cbb60e01b8887604051602401612052929190614042565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518463ffffffff1660e01b81526004016120cd93929190614004565b600060405180830381600087803b1580156120e757600080fd5b505af11580156120fb573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906121249190613322565b905060008151111561218457808060200190518101906121449190613278565b612183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217a9061431d565b60405180910390fd5b5b505b50505050565b60006121e17f745089e29f2abf28f618236a5dc04d214ac05ead3440ba532b69e9d160ba2e728888888888886040516020016121cd96959493929190613d27565b6040516020818303038152906040526129d6565b90509695505050505050565b6000806000806122018c8c8c8c8c8c61218c565b905060008651141561230057600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166359b52ef88d838b6040518463ffffffff1660e01b815260040161226c93929190613fcd565b60206040518083038186803b15801561228457600080fd5b505afa158015612298573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122bc9190613278565b6122fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122f29061447d565b60405180910390fd5b6124f1565b60006123158783612b0190919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff16146124ef57600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334d323a48e838c6040518463ffffffff1660e01b81526004016123a993929190613f96565b60206040518083038186803b1580156123c157600080fd5b505afa1580156123d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f99190613278565b806124af5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334d323a48e838c6040518463ffffffff1660e01b815260040161245e93929190613f96565b60206040518083038186803b15801561247657600080fd5b505afa15801561248a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ae9190613278565b5b6124ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124e5906143bd565b60405180910390fd5b5b505b6124fb8186611cd2565b61253a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125319061447d565b60405180910390fd5b6125468c8c8c8c611955565b9350612571600860008681526020019081526020016000206000015488611ca590919063ffffffff16565b915060008214156125b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125ae906142bd565b60405180910390fd5b8660086000868152602001908152602001600020600001819055506125dc8c8b611d3f565b600760008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1692507f0d1cb77d1fe491f98926195d0b885509da18bc305dd1489f45610237d971ed46848d8d8d8d8c60405161267a969594939291906140df565b60405180910390a150985098509895505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612701576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126f89061425d565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561278d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127849061441d565b60405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051612815929190613ec8565b60405180910390a150565b60008082840190508381101561286b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612862906143fd565b60405180910390fd5b8091505092915050565b600081116128b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128af9061423d565b60405180910390fd5b60006128cd8284611ca590919063ffffffff16565b905060008111612912576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129099061439d565b60405180910390fd5b61291e86868684611efc565b6129328661292b876119e6565b8685611efc565b505050505050565b6000815114156129525761294d32612691565b61298f565b60008151905060005b8181101561298c5761297f83828151811061297257fe5b6020026020010151612691565b808060010191505061295b565b50505b50565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000612a0f6002543085856040516020016129f49493929190613e48565b60405160208183030381529060405280519060200120612bbc565b905092915050565b60008060009050612a26612bec565b15612a9f576000836000369050039050612a9760003683906014850192612a4f9392919061455f565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612c99565b915050612aa3565b3390505b80915050919050565b6000838311158290612af4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aeb919061421b565b60405180910390fd5b5082840390509392505050565b60008060009050604183511415612bb25760008060006020860151925060408601519150606086015160001a9050601b8160ff161015612b4257601b810190505b601b8160ff161480612b575750601c8160ff16145b15612bae5760018782858560405160008152602001604052604051612b7f94939291906141a0565b6020604051602081039080840390855afa158015612ba1573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b600081604051602001612bcf9190613e22565b604051602081830303815290604052805190602001209050919050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415612c9257602c60003690501015612c8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c84906142dd565b60405180910390fd5b600190505b8091505090565b6000806014835114612ce0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cd79061445d565b60405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b6103f7806147ef83390190565b600081359050612d1b81614764565b92915050565b60008083601f840112612d3357600080fd5b8235905067ffffffffffffffff811115612d4c57600080fd5b602083019150836020820283011115612d6457600080fd5b9250929050565b600081519050612d7a8161477b565b92915050565b600081359050612d8f81614792565b92915050565b60008083601f840112612da757600080fd5b8235905067ffffffffffffffff811115612dc057600080fd5b602083019150836001820283011115612dd857600080fd5b9250929050565b600082601f830112612df057600080fd5b8151612e03612dfe826144e5565b6144b8565b91508082526020830160208301858383011115612e1f57600080fd5b612e2a8382846146d1565b50505092915050565b600081359050612e42816147a9565b92915050565b600081359050612e57816147c0565b92915050565b600060608284031215612e6f57600080fd5b612e7960606144b8565b90506000612e8984828501612d0c565b6000830152506020612e9d84828501612d0c565b6020830152506040612eb184828501612f59565b60408301525092915050565b600060c08284031215612ecf57600080fd5b612ed960c06144b8565b90506000612ee984828501612d0c565b6000830152506020612efd84828501612d0c565b6020830152506040612f1184828501612d0c565b6040830152506060612f2584828501612d80565b6060830152506080612f3984828501612f59565b60808301525060a0612f4d84828501612f59565b60a08301525092915050565b600081359050612f68816147d7565b92915050565b600081519050612f7d816147d7565b92915050565b600060208284031215612f9557600080fd5b6000612fa384828501612d0c565b91505092915050565b60008060408385031215612fbf57600080fd5b6000612fcd85828601612d0c565b9250506020612fde85828601612d0c565b9150509250929050565b60008060008060808587031215612ffe57600080fd5b600061300c87828801612d0c565b945050602061301d87828801612d0c565b935050604061302e87828801612d0c565b925050606061303f87828801612d80565b91505092959194509250565b600080600080600080600080600060e08a8c03121561306957600080fd5b60006130778c828d01612d0c565b99505060206130888c828d01612d0c565b98505060406130998c828d01612d80565b97505060606130aa8c828d01612f59565b96505060806130bb8c828d01612f59565b95505060a08a013567ffffffffffffffff8111156130d857600080fd5b6130e48c828d01612d95565b945094505060c08a013567ffffffffffffffff81111561310357600080fd5b61310f8c828d01612d95565b92509250509295985092959850929598565b6000806000806000806000806000806101008b8d03121561314157600080fd5b600061314f8d828e01612d0c565b9a505060206131608d828e01612d0c565b99505060406131718d828e01612d80565b98505060606131828d828e01612f59565b97505060806131938d828e01612f59565b96505060a06131a48d828e01612f59565b95505060c08b013567ffffffffffffffff8111156131c157600080fd5b6131cd8d828e01612d95565b945094505060e08b013567ffffffffffffffff8111156131ec57600080fd5b6131f88d828e01612d95565b92509250509295989b9194979a5092959850565b6000806000806060858703121561322257600080fd5b600061323087828801612d0c565b945050602061324187828801612f59565b935050604085013567ffffffffffffffff81111561325e57600080fd5b61326a87828801612d95565b925092505092959194509250565b60006020828403121561328a57600080fd5b600061329884828501612d6b565b91505092915050565b6000602082840312156132b357600080fd5b60006132c184828501612d80565b91505092915050565b6000806000604084860312156132df57600080fd5b60006132ed86828701612d80565b935050602084013567ffffffffffffffff81111561330a57600080fd5b61331686828701612d95565b92509250509250925092565b60006020828403121561333457600080fd5b600082015167ffffffffffffffff81111561334e57600080fd5b61335a84828501612ddf565b91505092915050565b60008060008060008060a0878903121561337c57600080fd5b600061338a89828a01612e33565b965050602061339b89828a01612e48565b95505060406133ac89828a01612f59565b945050606087013567ffffffffffffffff8111156133c957600080fd5b6133d589828a01612d21565b935093505060806133e889828a01612d0c565b9150509295509295509295565b60006060828403121561340757600080fd5b600061341584828501612e5d565b91505092915050565b600060c0828403121561343057600080fd5b600061343e84828501612ebd565b91505092915050565b60006020828403121561345957600080fd5b600061346784828501612f6e565b91505092915050565b61347981614641565b82525050565b61348881614592565b82525050565b61349f61349a82614592565b614704565b82525050565b6134ae816145a4565b82525050565b6134c56134c0826145b0565b614716565b82525050565b6134d4816145dc565b82525050565b6134eb6134e6826145dc565b614720565b82525050565b60006134fc82614511565b6135068185614527565b93506135168185602086016146d1565b61351f81614746565b840191505092915050565b600061353582614511565b61353f8185614538565b935061354f8185602086016146d1565b80840191505092915050565b61356481614653565b82525050565b61357381614677565b82525050565b6135828161469b565b82525050565b60006135938261451c565b61359d8185614543565b93506135ad8185602086016146d1565b6135b681614746565b840191505092915050565b60006135ce602683614543565b91507f5061796d656e7452656769737472793a20696e76616c6964206465706f73697460008301527f2076616c756500000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613634601c83614554565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b6000613674602083614543565b91507f477561726465643a2063616e6e6f74206164642030783020677561726469616e6000830152602082019050919050565b60006136b4602f83614543565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b600061371a602f83614543565b91507f5061796d656e7452656769737472793a206465706f736974206578697420616c60008301527f72656164792072657175657374656400000000000000000000000000000000006020830152604082019050919050565b6000613780602683614543565b91507f5061796d656e7452656769737472793a20696e76616c6964207061796d656e7460008301527f2076616c756500000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006137e6602283614543565b91507f47617465776179526563697069656e743a20696e76616c6964206d73672e646160008301527f74610000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061384c602b83614543565b91507f5061796d656e7452656769737472793a206465706f7369742065786974206e6f60008301527f74207265717565737465640000000000000000000000000000000000000000006020830152604082019050919050565b60006138b2602d83614543565b91507f5061796d656e7452656769737472793a204552433230546f6b656e207472616e60008301527f73666572207265766572746564000000000000000000000000000000000000006020830152604082019050919050565b6000613918602683614543565b91507f477561726465643a2074782e6f726967696e206973206e6f742074686520677560008301527f61726469616e00000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061397e601f83614543565b91507f5061796d656e7452656769737472793a20696e76616c696420616d6f756e74006000830152602082019050919050565b60006139be602483614543565b91507f5061796d656e7452656769737472793a206465706f7369742065786974206c6f60008301527f636b6564000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613a24602783614543565b91507f5061796d656e7452656769737472793a20696e76616c6964207769746864726160008301527f772076616c7565000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613a8a602983614543565b91507f5061796d656e7452656769737472793a20696e76616c69642073656e6465722060008301527f7369676e617475726500000000000000000000000000000000000000000000006020830152604082019050919050565b6000613af0601f83614543565b91507f477561726465643a20677561726469616e20646f65736e2774206578697374006000830152602082019050919050565b6000613b30601e83614543565b91507f536166654d6174684c69623a206164646974696f6e206f766572666c6f7700006000830152602082019050919050565b6000613b70602083614543565b91507f477561726465643a20677561726469616e20616c7265616479206578697374736000830152602082019050919050565b6000613bb0601b83614543565b91507f477561726465643a2063616e6e6f742072656d6f76652073656c6600000000006000830152602082019050919050565b6000613bf0601d83614543565b91507f42797465734c69623a20696e76616c69642064617461206c656e6774680000006000830152602082019050919050565b6000613c30602b83614543565b91507f5061796d656e7452656769737472793a20696e76616c6964206775617264696160008301527f6e207369676e61747572650000000000000000000000000000000000000000006020830152604082019050919050565b613c928161462a565b82525050565b613ca9613ca48261462a565b61473c565b82525050565b613cb881614634565b82525050565b6000613cca828461348e565b60148201915081905092915050565b6000613ce5828761348e565b601482019150613cf5828661348e565b601482019150613d05828561348e565b601482019150613d1582846134da565b60208201915081905095945050505050565b6000613d33828961348e565b601482019150613d43828861348e565b601482019150613d53828761348e565b601482019150613d6382866134da565b602082019150613d738285613c98565b602082019150613d838284613c98565b602082019150819050979650505050505050565b6000613da3828661348e565b601482019150613db3828561348e565b601482019150613dc38284613c98565b602082019150819050949350505050565b6000613de082876134b4565b600182019150613df0828661348e565b601482019150613e0082856134da565b602082019150613e1082846134da565b60208201915081905095945050505050565b6000613e2d82613627565b9150613e3982846134da565b60208201915081905092915050565b6000613e548287613c98565b602082019150613e64828661348e565b601482019150613e7482856134da565b602082019150613e84828461352a565b915081905095945050505050565b6000602082019050613ea7600083018461347f565b92915050565b6000602082019050613ec26000830184613470565b92915050565b6000604082019050613edd6000830185613470565b613eea602083018461347f565b9392505050565b6000604082019050613f06600083018561347f565b613f13602083018461347f565b9392505050565b6000606082019050613f2f600083018661347f565b613f3c602083018561347f565b613f49604083018461347f565b949350505050565b6000608082019050613f66600083018761347f565b613f73602083018661347f565b613f80604083018561347f565b613f8d6060830184613c89565b95945050505050565b6000606082019050613fab600083018661347f565b613fb8602083018561347f565b613fc56040830184613c89565b949350505050565b6000606082019050613fe2600083018661347f565b613fef60208301856134cb565b613ffc6040830184613c89565b949350505050565b6000606082019050614019600083018661347f565b6140266020830185613579565b818103604083015261403881846134f1565b9050949350505050565b6000604082019050614057600083018561347f565b6140646020830184613c89565b9392505050565b6000606082019050614080600083018661347f565b61408d6020830185613c89565b818103604083015261409f81846134f1565b9050949350505050565b60006020820190506140be60008301846134a5565b92915050565b60006020820190506140d960008301846134cb565b92915050565b600060c0820190506140f460008301896134cb565b614101602083018861347f565b61410e604083018761347f565b61411b606083018661347f565b61412860808301856134cb565b61413560a0830184613c89565b979650505050505050565b600060408201905061415560008301856134cb565b6141626020830184613c89565b9392505050565b600060608201905061417e60008301866134cb565b61418b6020830185613c89565b6141986040830184613c89565b949350505050565b60006080820190506141b560008301876134cb565b6141c26020830186613caf565b6141cf60408301856134cb565b6141dc60608301846134cb565b95945050505050565b60006020820190506141fa600083018461355b565b92915050565b6000602082019050614215600083018461356a565b92915050565b600060208201905081810360008301526142358184613588565b905092915050565b60006020820190508181036000830152614256816135c1565b9050919050565b6000602082019050818103600083015261427681613667565b9050919050565b60006020820190508181036000830152614296816136a7565b9050919050565b600060208201905081810360008301526142b68161370d565b9050919050565b600060208201905081810360008301526142d681613773565b9050919050565b600060208201905081810360008301526142f6816137d9565b9050919050565b600060208201905081810360008301526143168161383f565b9050919050565b60006020820190508181036000830152614336816138a5565b9050919050565b600060208201905081810360008301526143568161390b565b9050919050565b6000602082019050818103600083015261437681613971565b9050919050565b60006020820190508181036000830152614396816139b1565b9050919050565b600060208201905081810360008301526143b681613a17565b9050919050565b600060208201905081810360008301526143d681613a7d565b9050919050565b600060208201905081810360008301526143f681613ae3565b9050919050565b6000602082019050818103600083015261441681613b23565b9050919050565b6000602082019050818103600083015261443681613b63565b9050919050565b6000602082019050818103600083015261445681613ba3565b9050919050565b6000602082019050818103600083015261447681613be3565b9050919050565b6000602082019050818103600083015261449681613c23565b9050919050565b60006020820190506144b26000830184613c89565b92915050565b6000604051905081810181811067ffffffffffffffff821117156144db57600080fd5b8060405250919050565b600067ffffffffffffffff8211156144fc57600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000808585111561456f57600080fd5b8386111561457c57600080fd5b6001850283019150848603905094509492505050565b600061459d8261460a565b9050919050565b60008115159050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b60006145f182614592565b9050919050565b600061460382614592565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061464c826146ad565b9050919050565b600061465e82614665565b9050919050565b60006146708261460a565b9050919050565b600061468282614689565b9050919050565b60006146948261460a565b9050919050565b60006146a68261462a565b9050919050565b60006146b8826146bf565b9050919050565b60006146ca8261460a565b9050919050565b60005b838110156146ef5780820151818401526020810190506146d4565b838111156146fe576000848401525b50505050565b600061470f8261472a565b9050919050565b6000819050919050565b6000819050919050565b600061473582614757565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61476d81614592565b811461477857600080fd5b50565b614784816145a4565b811461478f57600080fd5b50565b61479b816145dc565b81146147a657600080fd5b50565b6147b2816145e6565b81146147bd57600080fd5b50565b6147c9816145f8565b81146147d457600080fd5b50565b6147e08161462a565b81146147eb57600080fd5b5056fe6080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506103a4806100536000396000f3fe60806040526004361061002d5760003560e01c80633f579f4214610039578063f77c47911461016257610034565b3661003457005b600080fd5b34801561004557600080fd5b506100e76004803603606081101561005c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156100a357600080fd5b8201836020820111156100b557600080fd5b803590602001918460018302840111640100000000831117156100d757600080fd5b90919293919293905050506101a3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561012757808201518184015260208101905061010c565b50505050905090810190601f1680156101545780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016e57600080fd5b50610177610347565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610249576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061036c602c913960400191505060405180910390fd5b606060008673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d80600081146102b9576040519150601f19603f3d011682016040523d82523d6000602084013e6102be565b606091505b5080935081925050508061033a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b8192505050949350505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a536166654d6174684c69623a207375627472616374696f6e206f766572666c6f77a164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061018e5760003560e01c80639130c06e116100de578063c36326e711610097578063da1b213d11610071578063da1b213d146104bb578063dc7d6c31146104d7578063df04338014610507578063e0fe396e146105235761018e565b8063c36326e71461043d578063d0f710d61461046d578063d2c83b9a1461049d5761018e565b80639130c06e146103915780639a85fae2146103ad5780639a8a0592146103c9578063a526d83b146103e7578063b0274a7314610403578063bdff4b3b1461041f5761018e565b80636121fcfc1161014b578063714041561161012557806371404156146102f757806384389a2b1461031357806387d31313146103435780638a1773ab146103615761018e565b80636121fcfc1461028f5780636524a947146102bf5780636866da52146102db5761018e565b80630c68ba2114610193578063116191b6146101c35780632e4f161e146101e15780632e7037a014610211578063392e53cd1461024157806360bf4df21461025f575b600080fd5b6101ad60048036038101906101a89190612f83565b61053f565b6040516101ba91906140a9565b60405180910390f35b6101cb610594565b6040516101d89190613e92565b60405180910390f35b6101fb60048036038101906101f69190612fe8565b6105ba565b60405161020891906140c4565b60405180910390f35b61022b600480360381019061022691906133f5565b6105d2565b60405161023891906140c4565b60405180910390f35b6102496105f2565b60405161025691906140a9565b60405180910390f35b61027960048036038101906102749190612f83565b61064a565b6040516102869190613e92565b60405180910390f35b6102a960048036038101906102a49190612f83565b61065c565b6040516102b691906140a9565b60405180910390f35b6102d960048036038101906102d49190612f83565b6106f7565b005b6102f560048036038101906102f0919061320c565b610703565b005b610311600480360381019061030c9190612f83565b610a28565b005b61032d6004803603810190610328919061341e565b610c40565b60405161033a91906140c4565b60405180910390f35b61034b610c6f565b6040516103589190614200565b60405180910390f35b61037b600480360381019061037691906132a1565b610c95565b604051610388919061449d565b60405180910390f35b6103ab60048036038101906103a69190612f83565b610cb5565b005b6103c760048036038101906103c2919061304b565b610fe9565b005b6103d16110f4565b6040516103de919061449d565b60405180910390f35b61040160048036038101906103fc9190612f83565b6110fa565b005b61041d60048036038101906104189190612f83565b611191565b005b6104276113ac565b604051610434919061449d565b60405180910390f35b61045760048036038101906104529190612fac565b6113b2565b604051610464919061449d565b60405180910390f35b610487600480360381019061048291906132ca565b61143c565b60405161049491906140a9565b60405180910390f35b6104a5611495565b6040516104b291906141e5565b60405180910390f35b6104d560048036038101906104d09190613121565b6114bb565b005b6104f160048036038101906104ec9190612fac565b6115c2565b6040516104fe919061449d565b60405180910390f35b610521600480360381019061051c919061304b565b61164c565b005b61053d60048036038101906105389190613363565b61174f565b005b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006105c885858585611955565b9050949350505050565b60006105eb82600001518360200151846040015161198e565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b6000610655826119e6565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff16600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b61070081611a84565b50565b600061070d611c94565b905060006107a3600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205486611ca590919063ffffffff16565b9050600081116107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df9061435d565b60405180910390fd5b60006107f583888861198e565b90506108458186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611cd2565b610884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087b9061447d565b60405180910390fd5b85600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506109128388611d3f565b610980600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848985611efc565b7f95f66b073d65f18e43f6b76c7ab8557787f5f766d86cab7c9c76f41be9f8abc6600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848989604051610a179493929190613f51565b60405180910390a150505050505050565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610ab3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aaa9061433d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161415610b22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b199061443d565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610bad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba4906143dd565b60405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b3282604051610c35929190613ec8565b60405180910390a150565b6000610c68826000015183602001518460400151856060015186608001518760a0015161218c565b9050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060086000838152602001908152602001600020600001549050919050565b6000610cbf611c94565b90506000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811415610d89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d80906142fd565b60405180910390fd5b42811115610dcc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc39061437d565b60405180910390fd5b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610f0d578173ffffffffffffffffffffffffffffffffffffffff16319050610f99565b8473ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401610f469190613e92565b60206040518083038186803b158015610f5e57600080fd5b505afa158015610f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f969190613447565b90505b610fa582858784611efc565b7f5300d9a2838baade7cdc628c82cb80c1298853ba5f389d51e2b47330336aeffc82858784604051610fda9493929190613f51565b60405180910390a15050505050565b6000610ff3611c94565b905060008060006110928d858e8e8e8e8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506121ed565b9250925092506110ac826110a5866119e6565b8e84611efc565b7f771bc0494e1a2fcbef19a8762845000d8c4500454c756a7370c955e39ed60fd483826040516110dd929190614140565b60405180910390a150505050505050505050505050565b60025481565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117c9061433d565b60405180910390fd5b61118e81612691565b50565b600061119b611c94565b90506000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114611264576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125b9061429d565b60405180910390fd5b61126d82611a84565b6112826006544261282090919063ffffffff16565b905080600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fed3c8c6cdfc6d7b91dc9db3e1f54866587c26c3c3e0f9e32cd1944974be43a50600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683858460405161139f9493929190613f51565b60405180910390a1505050565b60065481565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600061148c8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611cd2565b90509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006114c5611c94565b905060008060006115648e858f8f8f8f8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506121ed565b92509250925061157782858f848d612875565b7f8b67efde501ee9cd0e771f7436554c44a5c076239ff3a6fbb397646a4689c0f283828b6040516115aa93929190614169565b60405180910390a15050505050505050505050505050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000611656611c94565b905060008060006116f58d858e8e8e8e8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506121ed565b92509250925061170782858e84611efc565b7f6675346cd43846f7d47c310d39fb5c15bc7db66b3770338cdf1f133613a5ae988382604051611738929190614140565b60405180910390a150505050505050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146117df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d69061427d565b60405180910390fd5b6000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008414156118bb576224ea006006819055506118c3565b836006819055505b61190d838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061293a565b61191681612992565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516119459190613ead565b60405180910390a1505050505050565b60008484848460405160200161196e9493929190613cd9565b604051602081830303815290604052805190602001209050949350505050565b60006119dd7f3b3087c8f883f1f44cabe66444f5f9d96f69de6a88f364ea10959eef0331414a8585856040516020016119c993929190613d97565b6040516020818303038152906040526129d6565b90509392505050565b600080826040516020016119fa9190613cbe565b604051602081830303815290604052805190602001209050606060405180602001611a2490612cff565b6020820181038252601f19601f820116604052509050600060ff60f81b30848480519060200120604051602001611a5e9493929190613dd4565b6040516020818303038152906040528051906020012090508060001c9350505050919050565b600073ffffffffffffffffffffffffffffffffffffffff16600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611c9157600081604051602001611b2e9190613cbe565b60405160208183030381529060405280519060200120905080604051611b5390612cff565b8190604051809103906000f5905080158015611b73573d6000803e3d6000fd5b50600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd80572c0f2f24f2d9d726d831bd860ed82b12bafaf01cfb6e4d38fb23c4347e9600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683604051611c87929190613ef1565b60405180910390a1505b50565b6000611ca06028612a17565b905090565b6000611cca8383604051806060016040528060218152602001614be660219139612aac565b905092915050565b600080611ce88385612b0190919063ffffffff16565b90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115611eee576000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fa19281a6f3163da06f6b82f3ecf0130493c52aba23cdc2a312f652742f0d1801600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383604051611ee193929190613f1a565b60405180910390a1611ef8565b611ef782611a84565b5b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612016578373ffffffffffffffffffffffffffffffffffffffff16633f579f428483600067ffffffffffffffff81118015611f6757600080fd5b506040519080825280601f01601f191660200182016040528015611f9a5781602001600182028036833780820191505090505b506040518463ffffffff1660e01b8152600401611fb99392919061406b565b600060405180830381600087803b158015611fd357600080fd5b505af1158015611fe7573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906120109190613322565b50612186565b60608473ffffffffffffffffffffffffffffffffffffffff16633f579f4284600063a9059cbb60e01b8887604051602401612052929190614042565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518463ffffffff1660e01b81526004016120cd93929190614004565b600060405180830381600087803b1580156120e757600080fd5b505af11580156120fb573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906121249190613322565b905060008151111561218457808060200190518101906121449190613278565b612183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217a9061431d565b60405180910390fd5b5b505b50505050565b60006121e17f745089e29f2abf28f618236a5dc04d214ac05ead3440ba532b69e9d160ba2e728888888888886040516020016121cd96959493929190613d27565b6040516020818303038152906040526129d6565b90509695505050505050565b6000806000806122018c8c8c8c8c8c61218c565b905060008651141561230057600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166359b52ef88d838b6040518463ffffffff1660e01b815260040161226c93929190613fcd565b60206040518083038186803b15801561228457600080fd5b505afa158015612298573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122bc9190613278565b6122fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122f29061447d565b60405180910390fd5b6124f1565b60006123158783612b0190919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff16146124ef57600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334d323a48e838c6040518463ffffffff1660e01b81526004016123a993929190613f96565b60206040518083038186803b1580156123c157600080fd5b505afa1580156123d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f99190613278565b806124af5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334d323a48e838c6040518463ffffffff1660e01b815260040161245e93929190613f96565b60206040518083038186803b15801561247657600080fd5b505afa15801561248a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ae9190613278565b5b6124ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124e5906143bd565b60405180910390fd5b5b505b6124fb8186611cd2565b61253a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125319061447d565b60405180910390fd5b6125468c8c8c8c611955565b9350612571600860008681526020019081526020016000206000015488611ca590919063ffffffff16565b915060008214156125b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125ae906142bd565b60405180910390fd5b8660086000868152602001908152602001600020600001819055506125dc8c8b611d3f565b600760008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1692507f0d1cb77d1fe491f98926195d0b885509da18bc305dd1489f45610237d971ed46848d8d8d8d8c60405161267a969594939291906140df565b60405180910390a150985098509895505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612701576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126f89061425d565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561278d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127849061441d565b60405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051612815929190613ec8565b60405180910390a150565b60008082840190508381101561286b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612862906143fd565b60405180910390fd5b8091505092915050565b600081116128b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128af9061423d565b60405180910390fd5b60006128cd8284611ca590919063ffffffff16565b905060008111612912576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129099061439d565b60405180910390fd5b61291e86868684611efc565b6129328661292b876119e6565b8685611efc565b505050505050565b6000815114156129525761294d32612691565b61298f565b60008151905060005b8181101561298c5761297f83828151811061297257fe5b6020026020010151612691565b808060010191505061295b565b50505b50565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000612a0f6002543085856040516020016129f49493929190613e48565b60405160208183030381529060405280519060200120612bbc565b905092915050565b60008060009050612a26612bec565b15612a9f576000836000369050039050612a9760003683906014850192612a4f9392919061455f565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612c99565b915050612aa3565b3390505b80915050919050565b6000838311158290612af4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aeb919061421b565b60405180910390fd5b5082840390509392505050565b60008060009050604183511415612bb25760008060006020860151925060408601519150606086015160001a9050601b8160ff161015612b4257601b810190505b601b8160ff161480612b575750601c8160ff16145b15612bae5760018782858560405160008152602001604052604051612b7f94939291906141a0565b6020604051602081039080840390855afa158015612ba1573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b600081604051602001612bcf9190613e22565b604051602081830303815290604052805190602001209050919050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415612c9257602c60003690501015612c8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c84906142dd565b60405180910390fd5b600190505b8091505090565b6000806014835114612ce0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cd79061445d565b60405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b6103f7806147ef83390190565b600081359050612d1b81614764565b92915050565b60008083601f840112612d3357600080fd5b8235905067ffffffffffffffff811115612d4c57600080fd5b602083019150836020820283011115612d6457600080fd5b9250929050565b600081519050612d7a8161477b565b92915050565b600081359050612d8f81614792565b92915050565b60008083601f840112612da757600080fd5b8235905067ffffffffffffffff811115612dc057600080fd5b602083019150836001820283011115612dd857600080fd5b9250929050565b600082601f830112612df057600080fd5b8151612e03612dfe826144e5565b6144b8565b91508082526020830160208301858383011115612e1f57600080fd5b612e2a8382846146d1565b50505092915050565b600081359050612e42816147a9565b92915050565b600081359050612e57816147c0565b92915050565b600060608284031215612e6f57600080fd5b612e7960606144b8565b90506000612e8984828501612d0c565b6000830152506020612e9d84828501612d0c565b6020830152506040612eb184828501612f59565b60408301525092915050565b600060c08284031215612ecf57600080fd5b612ed960c06144b8565b90506000612ee984828501612d0c565b6000830152506020612efd84828501612d0c565b6020830152506040612f1184828501612d0c565b6040830152506060612f2584828501612d80565b6060830152506080612f3984828501612f59565b60808301525060a0612f4d84828501612f59565b60a08301525092915050565b600081359050612f68816147d7565b92915050565b600081519050612f7d816147d7565b92915050565b600060208284031215612f9557600080fd5b6000612fa384828501612d0c565b91505092915050565b60008060408385031215612fbf57600080fd5b6000612fcd85828601612d0c565b9250506020612fde85828601612d0c565b9150509250929050565b60008060008060808587031215612ffe57600080fd5b600061300c87828801612d0c565b945050602061301d87828801612d0c565b935050604061302e87828801612d0c565b925050606061303f87828801612d80565b91505092959194509250565b600080600080600080600080600060e08a8c03121561306957600080fd5b60006130778c828d01612d0c565b99505060206130888c828d01612d0c565b98505060406130998c828d01612d80565b97505060606130aa8c828d01612f59565b96505060806130bb8c828d01612f59565b95505060a08a013567ffffffffffffffff8111156130d857600080fd5b6130e48c828d01612d95565b945094505060c08a013567ffffffffffffffff81111561310357600080fd5b61310f8c828d01612d95565b92509250509295985092959850929598565b6000806000806000806000806000806101008b8d03121561314157600080fd5b600061314f8d828e01612d0c565b9a505060206131608d828e01612d0c565b99505060406131718d828e01612d80565b98505060606131828d828e01612f59565b97505060806131938d828e01612f59565b96505060a06131a48d828e01612f59565b95505060c08b013567ffffffffffffffff8111156131c157600080fd5b6131cd8d828e01612d95565b945094505060e08b013567ffffffffffffffff8111156131ec57600080fd5b6131f88d828e01612d95565b92509250509295989b9194979a5092959850565b6000806000806060858703121561322257600080fd5b600061323087828801612d0c565b945050602061324187828801612f59565b935050604085013567ffffffffffffffff81111561325e57600080fd5b61326a87828801612d95565b925092505092959194509250565b60006020828403121561328a57600080fd5b600061329884828501612d6b565b91505092915050565b6000602082840312156132b357600080fd5b60006132c184828501612d80565b91505092915050565b6000806000604084860312156132df57600080fd5b60006132ed86828701612d80565b935050602084013567ffffffffffffffff81111561330a57600080fd5b61331686828701612d95565b92509250509250925092565b60006020828403121561333457600080fd5b600082015167ffffffffffffffff81111561334e57600080fd5b61335a84828501612ddf565b91505092915050565b60008060008060008060a0878903121561337c57600080fd5b600061338a89828a01612e33565b965050602061339b89828a01612e48565b95505060406133ac89828a01612f59565b945050606087013567ffffffffffffffff8111156133c957600080fd5b6133d589828a01612d21565b935093505060806133e889828a01612d0c565b9150509295509295509295565b60006060828403121561340757600080fd5b600061341584828501612e5d565b91505092915050565b600060c0828403121561343057600080fd5b600061343e84828501612ebd565b91505092915050565b60006020828403121561345957600080fd5b600061346784828501612f6e565b91505092915050565b61347981614641565b82525050565b61348881614592565b82525050565b61349f61349a82614592565b614704565b82525050565b6134ae816145a4565b82525050565b6134c56134c0826145b0565b614716565b82525050565b6134d4816145dc565b82525050565b6134eb6134e6826145dc565b614720565b82525050565b60006134fc82614511565b6135068185614527565b93506135168185602086016146d1565b61351f81614746565b840191505092915050565b600061353582614511565b61353f8185614538565b935061354f8185602086016146d1565b80840191505092915050565b61356481614653565b82525050565b61357381614677565b82525050565b6135828161469b565b82525050565b60006135938261451c565b61359d8185614543565b93506135ad8185602086016146d1565b6135b681614746565b840191505092915050565b60006135ce602683614543565b91507f5061796d656e7452656769737472793a20696e76616c6964206465706f73697460008301527f2076616c756500000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613634601c83614554565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b6000613674602083614543565b91507f477561726465643a2063616e6e6f74206164642030783020677561726469616e6000830152602082019050919050565b60006136b4602f83614543565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b600061371a602f83614543565b91507f5061796d656e7452656769737472793a206465706f736974206578697420616c60008301527f72656164792072657175657374656400000000000000000000000000000000006020830152604082019050919050565b6000613780602683614543565b91507f5061796d656e7452656769737472793a20696e76616c6964207061796d656e7460008301527f2076616c756500000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006137e6602283614543565b91507f47617465776179526563697069656e743a20696e76616c6964206d73672e646160008301527f74610000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061384c602b83614543565b91507f5061796d656e7452656769737472793a206465706f7369742065786974206e6f60008301527f74207265717565737465640000000000000000000000000000000000000000006020830152604082019050919050565b60006138b2602d83614543565b91507f5061796d656e7452656769737472793a204552433230546f6b656e207472616e60008301527f73666572207265766572746564000000000000000000000000000000000000006020830152604082019050919050565b6000613918602683614543565b91507f477561726465643a2074782e6f726967696e206973206e6f742074686520677560008301527f61726469616e00000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061397e601f83614543565b91507f5061796d656e7452656769737472793a20696e76616c696420616d6f756e74006000830152602082019050919050565b60006139be602483614543565b91507f5061796d656e7452656769737472793a206465706f7369742065786974206c6f60008301527f636b6564000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613a24602783614543565b91507f5061796d656e7452656769737472793a20696e76616c6964207769746864726160008301527f772076616c7565000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613a8a602983614543565b91507f5061796d656e7452656769737472793a20696e76616c69642073656e6465722060008301527f7369676e617475726500000000000000000000000000000000000000000000006020830152604082019050919050565b6000613af0601f83614543565b91507f477561726465643a20677561726469616e20646f65736e2774206578697374006000830152602082019050919050565b6000613b30601e83614543565b91507f536166654d6174684c69623a206164646974696f6e206f766572666c6f7700006000830152602082019050919050565b6000613b70602083614543565b91507f477561726465643a20677561726469616e20616c7265616479206578697374736000830152602082019050919050565b6000613bb0601b83614543565b91507f477561726465643a2063616e6e6f742072656d6f76652073656c6600000000006000830152602082019050919050565b6000613bf0601d83614543565b91507f42797465734c69623a20696e76616c69642064617461206c656e6774680000006000830152602082019050919050565b6000613c30602b83614543565b91507f5061796d656e7452656769737472793a20696e76616c6964206775617264696160008301527f6e207369676e61747572650000000000000000000000000000000000000000006020830152604082019050919050565b613c928161462a565b82525050565b613ca9613ca48261462a565b61473c565b82525050565b613cb881614634565b82525050565b6000613cca828461348e565b60148201915081905092915050565b6000613ce5828761348e565b601482019150613cf5828661348e565b601482019150613d05828561348e565b601482019150613d1582846134da565b60208201915081905095945050505050565b6000613d33828961348e565b601482019150613d43828861348e565b601482019150613d53828761348e565b601482019150613d6382866134da565b602082019150613d738285613c98565b602082019150613d838284613c98565b602082019150819050979650505050505050565b6000613da3828661348e565b601482019150613db3828561348e565b601482019150613dc38284613c98565b602082019150819050949350505050565b6000613de082876134b4565b600182019150613df0828661348e565b601482019150613e0082856134da565b602082019150613e1082846134da565b60208201915081905095945050505050565b6000613e2d82613627565b9150613e3982846134da565b60208201915081905092915050565b6000613e548287613c98565b602082019150613e64828661348e565b601482019150613e7482856134da565b602082019150613e84828461352a565b915081905095945050505050565b6000602082019050613ea7600083018461347f565b92915050565b6000602082019050613ec26000830184613470565b92915050565b6000604082019050613edd6000830185613470565b613eea602083018461347f565b9392505050565b6000604082019050613f06600083018561347f565b613f13602083018461347f565b9392505050565b6000606082019050613f2f600083018661347f565b613f3c602083018561347f565b613f49604083018461347f565b949350505050565b6000608082019050613f66600083018761347f565b613f73602083018661347f565b613f80604083018561347f565b613f8d6060830184613c89565b95945050505050565b6000606082019050613fab600083018661347f565b613fb8602083018561347f565b613fc56040830184613c89565b949350505050565b6000606082019050613fe2600083018661347f565b613fef60208301856134cb565b613ffc6040830184613c89565b949350505050565b6000606082019050614019600083018661347f565b6140266020830185613579565b818103604083015261403881846134f1565b9050949350505050565b6000604082019050614057600083018561347f565b6140646020830184613c89565b9392505050565b6000606082019050614080600083018661347f565b61408d6020830185613c89565b818103604083015261409f81846134f1565b9050949350505050565b60006020820190506140be60008301846134a5565b92915050565b60006020820190506140d960008301846134cb565b92915050565b600060c0820190506140f460008301896134cb565b614101602083018861347f565b61410e604083018761347f565b61411b606083018661347f565b61412860808301856134cb565b61413560a0830184613c89565b979650505050505050565b600060408201905061415560008301856134cb565b6141626020830184613c89565b9392505050565b600060608201905061417e60008301866134cb565b61418b6020830185613c89565b6141986040830184613c89565b949350505050565b60006080820190506141b560008301876134cb565b6141c26020830186613caf565b6141cf60408301856134cb565b6141dc60608301846134cb565b95945050505050565b60006020820190506141fa600083018461355b565b92915050565b6000602082019050614215600083018461356a565b92915050565b600060208201905081810360008301526142358184613588565b905092915050565b60006020820190508181036000830152614256816135c1565b9050919050565b6000602082019050818103600083015261427681613667565b9050919050565b60006020820190508181036000830152614296816136a7565b9050919050565b600060208201905081810360008301526142b68161370d565b9050919050565b600060208201905081810360008301526142d681613773565b9050919050565b600060208201905081810360008301526142f6816137d9565b9050919050565b600060208201905081810360008301526143168161383f565b9050919050565b60006020820190508181036000830152614336816138a5565b9050919050565b600060208201905081810360008301526143568161390b565b9050919050565b6000602082019050818103600083015261437681613971565b9050919050565b60006020820190508181036000830152614396816139b1565b9050919050565b600060208201905081810360008301526143b681613a17565b9050919050565b600060208201905081810360008301526143d681613a7d565b9050919050565b600060208201905081810360008301526143f681613ae3565b9050919050565b6000602082019050818103600083015261441681613b23565b9050919050565b6000602082019050818103600083015261443681613b63565b9050919050565b6000602082019050818103600083015261445681613ba3565b9050919050565b6000602082019050818103600083015261447681613be3565b9050919050565b6000602082019050818103600083015261449681613c23565b9050919050565b60006020820190506144b26000830184613c89565b92915050565b6000604051905081810181811067ffffffffffffffff821117156144db57600080fd5b8060405250919050565b600067ffffffffffffffff8211156144fc57600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000808585111561456f57600080fd5b8386111561457c57600080fd5b6001850283019150848603905094509492505050565b600061459d8261460a565b9050919050565b60008115159050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b60006145f182614592565b9050919050565b600061460382614592565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061464c826146ad565b9050919050565b600061465e82614665565b9050919050565b60006146708261460a565b9050919050565b600061468282614689565b9050919050565b60006146948261460a565b9050919050565b60006146a68261462a565b9050919050565b60006146b8826146bf565b9050919050565b60006146ca8261460a565b9050919050565b60005b838110156146ef5780820151818401526020810190506146d4565b838111156146fe576000848401525b50505050565b600061470f8261472a565b9050919050565b6000819050919050565b6000819050919050565b600061473582614757565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61476d81614592565b811461477857600080fd5b50565b614784816145a4565b811461478f57600080fd5b50565b61479b816145dc565b81146147a657600080fd5b50565b6147b2816145e6565b81146147bd57600080fd5b50565b6147c9816145f8565b81146147d457600080fd5b50565b6147e08161462a565b81146147eb57600080fd5b5056fe6080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506103a4806100536000396000f3fe60806040526004361061002d5760003560e01c80633f579f4214610039578063f77c47911461016257610034565b3661003457005b600080fd5b34801561004557600080fd5b506100e76004803603606081101561005c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156100a357600080fd5b8201836020820111156100b557600080fd5b803590602001918460018302840111640100000000831117156100d757600080fd5b90919293919293905050506101a3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561012757808201518184015260208101905061010c565b50505050905090810190601f1680156101545780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016e57600080fd5b50610177610347565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610249576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061036c602c913960400191505060405180910390fd5b606060008673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d80600081146102b9576040519150601f19603f3d011682016040523d82523d6000602084013e6102be565b606091505b5080935081925050508061033a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b8192505050949350505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a536166654d6174684c69623a207375627472616374696f6e206f766572666c6f77a164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "details": "the `DepositExit` process can be used in a case operator (guardian) couldn't sign commit / withdrawal message. Process will be rejected when any of senders channels will be committed.", + "events": { + "DepositAccountDeployed(address,address)": { + "details": "Emitted when the deposit account is deployed", + "params": { + "depositAccount": "deposit account address", + "owner": "owner address" + } + }, + "DepositExitCompleted(address,address,address,uint256)": { + "details": "Emitted when the deposit exist is completed", + "params": { + "amount": "deposit exist amount", + "depositAccount": "deposit account address", + "owner": "owner address", + "token": "token address" + } + }, + "DepositExitRejected(address,address,address)": { + "details": "Emitted when the deposit exist is rejected", + "params": { + "depositAccount": "deposit account address", + "owner": "owner address", + "token": "token address" + } + }, + "DepositExitRequested(address,address,address,uint256)": { + "details": "Emitted when the deposit exist is requested", + "params": { + "depositAccount": "deposit account address", + "lockedUntil": "deposit exist locked util time", + "owner": "owner address", + "token": "token address" + } + }, + "DepositWithdrawn(address,address,address,uint256)": { + "details": "Emitted when the deposit has been withdrawn", + "params": { + "amount": "withdrawn amount", + "depositAccount": "deposit account address", + "owner": "owner address", + "token": "token address" + } + }, + "PaymentChannelCommitted(bytes32,address,address,address,bytes32,uint256)": { + "details": "Emitted when the payment channel has been committed", + "params": { + "amount": "committed amount", + "hash": "channel hash", + "recipient": "recipient address", + "sender": "sender address", + "token": "token address", + "uid": "unique channel id" + } + }, + "PaymentDeposited(bytes32,uint256)": { + "details": "Emitted when the payment has been deposited", + "params": { + "channelHash": "channel hash", + "value": "payment value" + } + }, + "PaymentSplit(bytes32,uint256,uint256)": { + "details": "Emitted when the payment has been withdrawn and deposited (split)", + "params": { + "channelHash": "channel hash", + "depositValue": "payment deposited value", + "totalValue": "payment total value" + } + }, + "PaymentWithdrawn(bytes32,uint256)": { + "details": "Emitted when the payment has been withdrawn", + "params": { + "channelHash": "channel hash", + "value": "payment value" + } + } + }, + "kind": "dev", + "methods": { + "addGuardian(address)": { + "params": { + "guardian": "guardian address" + } + }, + "commitPaymentChannelAndDeposit(address,address,bytes32,uint256,uint256,bytes,bytes)": { + "params": { + "amount": "amount to commit", + "blockNumber": "block number", + "guardianSignature": "guardian signature", + "sender": "sender address", + "senderSignature": "sender signature", + "token": "token address", + "uid": "unique channel id" + } + }, + "commitPaymentChannelAndSplit(address,address,bytes32,uint256,uint256,uint256,bytes,bytes)": { + "params": { + "amount": "amount to commit", + "blockNumber": "block number", + "depositPaymentValue": "amount to deposit", + "guardianSignature": "guardian signature", + "sender": "sender address", + "senderSignature": "sender signature", + "token": "token address", + "uid": "unique channel id" + } + }, + "commitPaymentChannelAndWithdraw(address,address,bytes32,uint256,uint256,bytes,bytes)": { + "params": { + "amount": "amount to commit", + "blockNumber": "block number", + "guardianSignature": "guardian signature", + "sender": "sender address", + "senderSignature": "sender signature", + "token": "token address", + "uid": "unique channel id" + } + }, + "computeDepositAccountAddress(address)": { + "params": { + "owner": "owner address" + }, + "returns": { + "_0": "deposit account address" + } + }, + "computePaymentChannelHash(address,address,address,bytes32)": { + "params": { + "recipient": "recipient address", + "sender": "sender address", + "token": "token address", + "uid": "unique channel id" + }, + "returns": { + "_0": "hash" + } + }, + "constructor": { + "details": "Public constructor" + }, + "deployDepositAccount(address)": { + "params": { + "owner": "owner address" + } + }, + "getDepositExitLockedUntil(address,address)": { + "params": { + "owner": "owner address", + "token": "token address" + }, + "returns": { + "_0": "locked until time" + } + }, + "getDepositWithdrawnAmount(address,address)": { + "params": { + "owner": "owner address", + "token": "token address" + }, + "returns": { + "_0": "withdrawn amount" + } + }, + "getPaymentChannelCommittedAmount(bytes32)": { + "params": { + "hash": "payment channel hash" + }, + "returns": { + "_0": "committed amount" + } + }, + "hashDepositWithdrawal((address,address,uint256))": { + "params": { + "depositWithdrawal": "struct" + }, + "returns": { + "_0": "hash" + } + }, + "hashPaymentChannelCommit((address,address,address,bytes32,uint256,uint256))": { + "params": { + "paymentChannelCommit": "struct" + }, + "returns": { + "_0": "hash" + } + }, + "initialize(address,address,uint256,address[],address)": { + "params": { + "depositExitLockPeriod_": "deposit exit lock period", + "externalAccountRegistry_": "`ExternalAccountRegistry` contract address", + "gateway_": "`Gateway` contract address", + "guardians_": "array of guardians addresses", + "personalAccountRegistry_": "`PersonalAccountRegistry` contract address" + } + }, + "isDepositAccountDeployed(address)": { + "params": { + "owner": "owner address" + }, + "returns": { + "_0": "true when deposit account is deployed" + } + }, + "isGuardian(address)": { + "params": { + "guardian": "guardian address" + }, + "returns": { + "_0": "true when guardian exists" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + }, + "processDepositExit(address)": { + "params": { + "token": "token address" + } + }, + "removeGuardian(address)": { + "params": { + "guardian": "guardian address" + } + }, + "requestDepositExit(address)": { + "params": { + "token": "token address" + } + }, + "verifyGuardianSignature(bytes32,bytes)": { + "params": { + "messageHash": "message hash", + "signature": "signature" + }, + "returns": { + "_0": "true on correct guardian signature" + } + }, + "withdrawDeposit(address,uint256,bytes)": { + "params": { + "amount": "amount to withdraw", + "guardianSignature": "guardian signature", + "token": "token address" + } + } + }, + "title": "Payment registry", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addGuardian(address)": { + "notice": "Adds a new guardian" + }, + "commitPaymentChannelAndDeposit(address,address,bytes32,uint256,uint256,bytes,bytes)": { + "notice": "Commits payment channel and deposit payment" + }, + "commitPaymentChannelAndSplit(address,address,bytes32,uint256,uint256,uint256,bytes,bytes)": { + "notice": "Commits payment channel, withdraws and deposits (split) payment" + }, + "commitPaymentChannelAndWithdraw(address,address,bytes32,uint256,uint256,bytes,bytes)": { + "notice": "Commits payment channel and withdraw payment" + }, + "computeDepositAccountAddress(address)": { + "notice": "Computes deposit account address" + }, + "computePaymentChannelHash(address,address,address,bytes32)": { + "notice": "Computes payment channel hash" + }, + "deployDepositAccount(address)": { + "notice": "Deploys deposit account" + }, + "getDepositExitLockedUntil(address,address)": { + "notice": "Gets deposit exit locked until time" + }, + "getDepositWithdrawnAmount(address,address)": { + "notice": "Gets deposit withdrawn amount" + }, + "getPaymentChannelCommittedAmount(bytes32)": { + "notice": "Gets payment channel committed amount" + }, + "hashDepositWithdrawal((address,address,uint256))": { + "notice": "Hashes `DepositWithdrawal` message payload" + }, + "hashPaymentChannelCommit((address,address,address,bytes32,uint256,uint256))": { + "notice": "Hashes `PaymentChannelCommit` message payload" + }, + "initialize(address,address,uint256,address[],address)": { + "notice": "Initialize `PaymentRegistry` contract" + }, + "isDepositAccountDeployed(address)": { + "notice": "Checks if deposit account is deployed" + }, + "isGuardian(address)": { + "notice": "Check if guardian exists" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + }, + "processDepositExit(address)": { + "notice": "Processes deposit exit" + }, + "removeGuardian(address)": { + "notice": "Removes the existing guardian" + }, + "requestDepositExit(address)": { + "notice": "Requests deposit exit" + }, + "verifyGuardianSignature(bytes32,bytes)": { + "notice": "Verifies guardian signature" + }, + "withdrawDeposit(address,uint256,bytes)": { + "notice": "Withdraws deposit" + } + }, + "notice": "A registry for payment and payment channels", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 40, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "guardians", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 1871, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "initializer", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1935, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "chainId", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 5197, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "gateway", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 5526, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "externalAccountRegistry", + "offset": 0, + "slot": "4", + "type": "t_contract(ExternalAccountRegistry)4591" + }, + { + "astId": 5528, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "personalAccountRegistry", + "offset": 0, + "slot": "5", + "type": "t_contract(PersonalAccountRegistry)7452" + }, + { + "astId": 5530, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "depositExitLockPeriod", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 5534, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "deposits", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_struct(Deposit)5488_storage)" + }, + { + "astId": 5538, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "paymentChannels", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_bytes32,t_struct(PaymentChannel)5491_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(ExternalAccountRegistry)4591": { + "encoding": "inplace", + "label": "contract ExternalAccountRegistry", + "numberOfBytes": "20" + }, + "t_contract(PersonalAccountRegistry)7452": { + "encoding": "inplace", + "label": "contract PersonalAccountRegistry", + "numberOfBytes": "20" + }, + "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_struct(Deposit)5488_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct PaymentRegistry.Deposit)", + "numberOfBytes": "32", + "value": "t_struct(Deposit)5488_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(PaymentChannel)5491_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct PaymentRegistry.PaymentChannel)", + "numberOfBytes": "32", + "value": "t_struct(PaymentChannel)5491_storage" + }, + "t_struct(Deposit)5488_storage": { + "encoding": "inplace", + "label": "struct PaymentRegistry.Deposit", + "members": [ + { + "astId": 5479, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "account", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 5483, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "withdrawnAmount", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 5487, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "exitLockedUntil", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "numberOfBytes": "96" + }, + "t_struct(PaymentChannel)5491_storage": { + "encoding": "inplace", + "label": "struct PaymentRegistry.PaymentChannel", + "members": [ + { + "astId": 5490, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "committedAmount", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuse/PersonalAccountImplementationV1.json b/deployments/fuse/PersonalAccountImplementationV1.json new file mode 100644 index 00000000..3d240277 --- /dev/null +++ b/deployments/fuse/PersonalAccountImplementationV1.json @@ -0,0 +1,326 @@ +{ + "address": "0x0672aF0018fdEbACcc93c7D047D62b72CB12883A", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "interfaceHash", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "canImplementInterfaceForAddress", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "registry_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "tokensReceived", + "outputs": [], + "stateMutability": "pure", + "type": "function" + } + ], + "transactionHash": "0x197b5bf90ae186f7e6773dcea88ea5ee4218c2faa8abeb8baf1bfcba8af13ce2", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "777227", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x9c12e952a46af9117424938790d408d8a95ba9ed57015df0cf0d39a8f0dac748", + "transactionHash": "0x197b5bf90ae186f7e6773dcea88ea5ee4218c2faa8abeb8baf1bfcba8af13ce2", + "logs": [], + "blockNumber": 17842192, + "cumulativeGasUsed": "777227", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"interfaceHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"canImplementInterfaceForAddress\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"isValidSignature\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"isValidSignature\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"tokensReceived\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Public constructor\"},\"initialize(address)\":{\"params\":{\"registry_\":\"registry address\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}}},\"title\":\"Personal account implementation (version 1)\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initialize(address)\":{\"notice\":\"Initializes `AccountImplementation` contract\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/personal/PersonalAccountImplementationV1.sol\":\"PersonalAccountImplementationV1\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/access/Controlled.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Controlled\\n *\\n * @dev Contract module which provides an access control mechanism.\\n * It ensures there is only one controlling account of the smart contract\\n * and grants that account exclusive access to specific functions.\\n *\\n * The controller account will be the one that deploys the contract.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Controlled {\\n /**\\n * @return controller account address\\n */\\n address public controller;\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if msg.sender is not the controller\\n */\\n modifier onlyController() {\\n require(\\n msg.sender == controller,\\n \\\"Controlled: msg.sender is not the controller\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n controller = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xdf03a0b7ec644da9925c5c1b6c8a86bb1cc1b9c5018bb265a1a4c5044b877af3\",\"license\":\"MIT\"},\"src/common/account/Account.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../access/Controlled.sol\\\";\\nimport \\\"./AccountBase.sol\\\";\\n\\n\\n/**\\n * @title Account\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Account is Controlled, AccountBase {\\n address public implementation;\\n\\n /**\\n * @dev Public constructor\\n * @param registry_ account registry address\\n * @param implementation_ account implementation address\\n */\\n constructor(\\n address registry_,\\n address implementation_\\n )\\n public\\n Controlled()\\n {\\n registry = registry_;\\n implementation = implementation_;\\n }\\n\\n // external functions\\n\\n /**\\n * @notice Payable receive\\n */\\n receive()\\n external\\n payable\\n {\\n //\\n }\\n\\n /**\\n * @notice Fallback\\n */\\n // solhint-disable-next-line payable-fallback\\n fallback()\\n external\\n {\\n if (msg.data.length != 0) {\\n address implementation_ = implementation;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let calldedatasize := calldatasize()\\n\\n calldatacopy(0, 0, calldedatasize)\\n\\n let result := delegatecall(gas(), implementation_, 0, calldedatasize, 0, 0)\\n let returneddatasize := returndatasize()\\n\\n returndatacopy(0, 0, returneddatasize)\\n\\n switch result\\n case 0 { revert(0, returneddatasize) }\\n default { return(0, returneddatasize) }\\n }\\n }\\n }\\n\\n /**\\n * @notice Sets implementation\\n * @param implementation_ implementation address\\n */\\n function setImplementation(\\n address implementation_\\n )\\n external\\n onlyController\\n {\\n implementation = implementation_;\\n }\\n\\n /**\\n * @notice Executes transaction\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @return transaction result\\n */\\n function executeTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n onlyController\\n returns (bytes memory)\\n {\\n bytes memory result;\\n bool succeeded;\\n\\n // solhint-disable-next-line avoid-call-value, avoid-low-level-calls\\n (succeeded, result) = payable(to).call{value: value}(data);\\n\\n require(\\n succeeded,\\n \\\"Account: transaction reverted\\\"\\n );\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe516c999a02a65ee99487d398d0c12589500680a9ca08c852540fb9473d70a26\",\"license\":\"MIT\"},\"src/common/account/AccountBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Account base\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountBase {\\n address public registry;\\n}\\n\",\"keccak256\":\"0xcadf29e389f8db823e14f3f92808fd135f07b0135eb4dcf29b89c85941b39862\",\"license\":\"MIT\"},\"src/common/account/AccountImplementationV1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../lifecycle/Initializable.sol\\\";\\nimport \\\"./AccountBase.sol\\\";\\nimport \\\"./AccountRegistry.sol\\\";\\n\\n\\n/**\\n * @title Account implementation (version 1)\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountImplementationV1 is Initializable, AccountBase {\\n bytes32 constant private ERC777_TOKENS_RECIPIENT_INTERFACE_HASH = keccak256(abi.encodePacked(\\\"ERC777TokensRecipient\\\"));\\n bytes32 constant private ERC1820_ACCEPT_MAGIC = keccak256(abi.encodePacked(\\\"ERC1820_ACCEPT_MAGIC\\\"));\\n\\n bytes4 constant private ERC1271_VALID_MESSAGE_HASH_SIGNATURE = bytes4(keccak256(abi.encodePacked(\\\"isValidSignature(bytes32,bytes)\\\")));\\n bytes4 constant private ERC1271_VALID_MESSAGE_SIGNATURE = bytes4(keccak256(abi.encodePacked(\\\"isValidSignature(bytes,bytes)\\\")));\\n bytes4 constant private ERC1271_INVALID_SIGNATURE = 0xffffffff;\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal Initializable() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `AccountImplementation` contract\\n * @param registry_ registry address\\n */\\n function initialize(\\n address registry_\\n )\\n external\\n onlyInitializer\\n {\\n registry = registry_;\\n }\\n\\n // external functions (views)\\n\\n // ERC1820\\n\\n function canImplementInterfaceForAddress(\\n bytes32 interfaceHash,\\n address addr\\n )\\n external\\n view\\n returns(bytes32)\\n {\\n bytes32 result;\\n\\n if (interfaceHash == ERC777_TOKENS_RECIPIENT_INTERFACE_HASH && addr == address(this)) {\\n result = ERC1820_ACCEPT_MAGIC;\\n }\\n\\n return result;\\n }\\n\\n // ERC1271\\n\\n function isValidSignature(\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n external\\n view\\n returns (bytes4)\\n {\\n return AccountRegistry(registry).isValidAccountSignature(address(this), messageHash, signature)\\n ? ERC1271_VALID_MESSAGE_HASH_SIGNATURE\\n : ERC1271_INVALID_SIGNATURE;\\n }\\n\\n function isValidSignature(\\n bytes calldata message,\\n bytes calldata signature\\n )\\n external\\n view\\n returns (bytes4)\\n {\\n return AccountRegistry(registry).isValidAccountSignature(address(this), message, signature)\\n ? ERC1271_VALID_MESSAGE_SIGNATURE\\n : ERC1271_INVALID_SIGNATURE;\\n }\\n\\n // external functions (pure)\\n\\n // ERC721\\n\\n function onERC721Received(\\n address,\\n address,\\n uint256,\\n bytes calldata\\n )\\n external\\n pure\\n returns (bytes4)\\n {\\n return this.onERC721Received.selector;\\n }\\n\\n // ERC1155\\n\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes calldata\\n )\\n external\\n pure\\n returns (bytes4)\\n {\\n return this.onERC1155Received.selector;\\n }\\n\\n // ERC777\\n\\n function tokensReceived(\\n address,\\n address,\\n address,\\n uint256,\\n bytes calldata,\\n bytes calldata\\n )\\n external\\n pure\\n {}\\n}\\n\",\"keccak256\":\"0x7ec22f77f8e2c3059a9c728d463b1519f8d975b0d42d6a986cd45e22d62d59e8\",\"license\":\"MIT\"},\"src/common/account/AccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./Account.sol\\\";\\n\\n\\n/**\\n * @title Account registry\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nabstract contract AccountRegistry {\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param message message\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes calldata message,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0x2d40245721f5f74219e5cf88713246dbe8b6d5404e941125d3e850b1f127ec34\",\"license\":\"MIT\"},\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/personal/PersonalAccountImplementationV1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/account/AccountImplementationV1.sol\\\";\\n\\n\\n/**\\n * @title Personal account implementation (version 1)\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract PersonalAccountImplementationV1 is AccountImplementationV1 {\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public AccountImplementationV1() {}\\n}\\n\",\"keccak256\":\"0xd5a860c49ec0863366f4ecb583f87b48696e7edc3535e61f4b635a94b7255989\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610caa806100606000396000f3fe608060405234801561001057600080fd5b50600436106100925760003560e01c8063249cb3fa11610066578063249cb3fa1461047c578063392e53cd146104de5780637b103999146104fe578063c4d66de814610532578063f23a6e611461057657610092565b806223de2914610097578063150b7a02146101cf5780631626ba7e146102c557806320c13b0b1461037b575b600080fd5b6101cd600480360360c08110156100ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561013457600080fd5b82018360208201111561014657600080fd5b8035906020019184600183028401116401000000008311171561016857600080fd5b90919293919293908035906020019064010000000081111561018957600080fd5b82018360208201111561019b57600080fd5b803590602001918460018302840111640100000000831117156101bd57600080fd5b9091929391929390505050610676565b005b610290600480360360808110156101e557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561024c57600080fd5b82018360208201111561025e57600080fd5b8035906020019184600183028401116401000000008311171561028057600080fd5b9091929391929390505050610680565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b610346600480360360408110156102db57600080fd5b81019080803590602001909291908035906020019064010000000081111561030257600080fd5b82018360208201111561031457600080fd5b8035906020019184600183028401116401000000008311171561033657600080fd5b9091929391929390505050610695565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104476004803603604081101561039157600080fd5b81019080803590602001906401000000008111156103ae57600080fd5b8201836020820111156103c057600080fd5b803590602001918460018302840111640100000000831117156103e257600080fd5b90919293919293908035906020019064010000000081111561040357600080fd5b82018360208201111561041557600080fd5b8035906020019184600183028401116401000000008311171561043757600080fd5b90919293919293905050506107f9565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104c86004803603604081101561049257600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061098a565b6040518082815260200191505060405180910390f35b6104e6610a66565b60405180821515815260200191505060405180910390f35b610506610abc565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105746004803603602081101561054857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae2565b005b610641600480360360a081101561058c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156105fd57600080fd5b82018360208201111561060f57600080fd5b8035906020019184600183028401116401000000008311171561063157600080fd5b9091929391929390505050610c58565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b5050505050505050565b600063150b7a0260e01b905095945050505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e1e382ce308686866040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060206040518083038186803b15801561075c57600080fd5b505afa158015610770573d6000803e3d6000fd5b505050506040513d602081101561078657600080fd5b81019080805190602001909291905050506107a85763ffffffff60e01b6107f0565b60405160200180807f697356616c69645369676e617475726528627974657333322c62797465732900815250601f019050604051602081830303815290604052805190602001205b90509392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663124e9eb330878787876040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f82011690508083019250505097505050505050505060206040518083038186803b1580156108ec57600080fd5b505afa158015610900573d6000803e3d6000fd5b505050506040513d602081101561091657600080fd5b81019080805190602001909291905050506109385763ffffffff60e01b610980565b60405160200180807f697356616c69645369676e61747572652862797465732c627974657329000000815250601d019050604051602081830303815290604052805190602001205b9050949350505050565b60008060405160200180807f455243373737546f6b656e73526563697069656e74000000000000000000000081525060150190506040516020818303038152906040528051906020012084148015610a0d57503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610a5c5760405160200180807f455243313832305f4143434550545f4d4147494300000000000000000000000081525060140190506040516020818303038152906040528051906020012090505b8091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610b86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180610c6f602f913960400191505060405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600063f23a6e6160e01b9050969550505050505056fe496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a6572a164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100925760003560e01c8063249cb3fa11610066578063249cb3fa1461047c578063392e53cd146104de5780637b103999146104fe578063c4d66de814610532578063f23a6e611461057657610092565b806223de2914610097578063150b7a02146101cf5780631626ba7e146102c557806320c13b0b1461037b575b600080fd5b6101cd600480360360c08110156100ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561013457600080fd5b82018360208201111561014657600080fd5b8035906020019184600183028401116401000000008311171561016857600080fd5b90919293919293908035906020019064010000000081111561018957600080fd5b82018360208201111561019b57600080fd5b803590602001918460018302840111640100000000831117156101bd57600080fd5b9091929391929390505050610676565b005b610290600480360360808110156101e557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561024c57600080fd5b82018360208201111561025e57600080fd5b8035906020019184600183028401116401000000008311171561028057600080fd5b9091929391929390505050610680565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b610346600480360360408110156102db57600080fd5b81019080803590602001909291908035906020019064010000000081111561030257600080fd5b82018360208201111561031457600080fd5b8035906020019184600183028401116401000000008311171561033657600080fd5b9091929391929390505050610695565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104476004803603604081101561039157600080fd5b81019080803590602001906401000000008111156103ae57600080fd5b8201836020820111156103c057600080fd5b803590602001918460018302840111640100000000831117156103e257600080fd5b90919293919293908035906020019064010000000081111561040357600080fd5b82018360208201111561041557600080fd5b8035906020019184600183028401116401000000008311171561043757600080fd5b90919293919293905050506107f9565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104c86004803603604081101561049257600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061098a565b6040518082815260200191505060405180910390f35b6104e6610a66565b60405180821515815260200191505060405180910390f35b610506610abc565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105746004803603602081101561054857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae2565b005b610641600480360360a081101561058c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156105fd57600080fd5b82018360208201111561060f57600080fd5b8035906020019184600183028401116401000000008311171561063157600080fd5b9091929391929390505050610c58565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b5050505050505050565b600063150b7a0260e01b905095945050505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e1e382ce308686866040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060206040518083038186803b15801561075c57600080fd5b505afa158015610770573d6000803e3d6000fd5b505050506040513d602081101561078657600080fd5b81019080805190602001909291905050506107a85763ffffffff60e01b6107f0565b60405160200180807f697356616c69645369676e617475726528627974657333322c62797465732900815250601f019050604051602081830303815290604052805190602001205b90509392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663124e9eb330878787876040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f82011690508083019250505097505050505050505060206040518083038186803b1580156108ec57600080fd5b505afa158015610900573d6000803e3d6000fd5b505050506040513d602081101561091657600080fd5b81019080805190602001909291905050506109385763ffffffff60e01b610980565b60405160200180807f697356616c69645369676e61747572652862797465732c627974657329000000815250601d019050604051602081830303815290604052805190602001205b9050949350505050565b60008060405160200180807f455243373737546f6b656e73526563697069656e74000000000000000000000081525060150190506040516020818303038152906040528051906020012084148015610a0d57503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610a5c5760405160200180807f455243313832305f4143434550545f4d4147494300000000000000000000000081525060140190506040516020818303038152906040528051906020012090505b8091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610b86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180610c6f602f913960400191505060405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600063f23a6e6160e01b9050969550505050505056fe496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a6572a164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "kind": "dev", + "methods": { + "constructor": { + "details": "Public constructor" + }, + "initialize(address)": { + "params": { + "registry_": "registry address" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + } + }, + "title": "Personal account implementation (version 1)", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "initialize(address)": { + "notice": "Initializes `AccountImplementation` contract" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1871, + "contract": "src/personal/PersonalAccountImplementationV1.sol:PersonalAccountImplementationV1", + "label": "initializer", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 383, + "contract": "src/personal/PersonalAccountImplementationV1.sol:PersonalAccountImplementationV1", + "label": "registry", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuse/PersonalAccountRegistry.json b/deployments/fuse/PersonalAccountRegistry.json new file mode 100644 index 00000000..373b58cb --- /dev/null +++ b/deployments/fuse/PersonalAccountRegistry.json @@ -0,0 +1,1058 @@ +{ + "address": "0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "AccountCallRefunded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "accountImplementation", + "type": "address" + } + ], + "name": "AccountDeployed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "accountImplementation", + "type": "address" + } + ], + "name": "AccountImplementationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "AccountOwnerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "AccountOwnerRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "accountRegistry", + "type": "address" + } + ], + "name": "AccountRegistryUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "response", + "type": "bytes" + } + ], + "name": "AccountTransactionExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "accountImplementation", + "type": "address" + } + ], + "name": "AccountUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "accountImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accountRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "addAccountOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "addGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "saltOwner", + "type": "address" + } + ], + "name": "computeAccountAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "deployAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "executeAccountTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "gateway", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "guardians_", + "type": "address[]" + }, + { + "internalType": "address", + "name": "accountImplementation_", + "type": "address" + }, + { + "internalType": "address", + "name": "gateway_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "isAccountDeployed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "isGuardian", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidAccountSignature", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidAccountSignature", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "refundAccountCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "removeAccountOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "removeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accountImplementation_", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "upgradeAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "verifyAccountOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "verifyAccountOwnerAtBlock", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "verifyGuardianSignature", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xde64b23f59348247db1d8ac7f4c7377cd8555dfd39a2d35f718f0a1db78a6210", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 1, + "gasUsed": "3878167", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa6d4e64efc18d990975be092323280124cdca1069da298ff934a06d865c9facf", + "transactionHash": "0xde64b23f59348247db1d8ac7f4c7377cd8555dfd39a2d35f718f0a1db78a6210", + "logs": [], + "blockNumber": 17842193, + "cumulativeGasUsed": "3949388", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"AccountCallRefunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"accountImplementation\",\"type\":\"address\"}],\"name\":\"AccountDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"accountImplementation\",\"type\":\"address\"}],\"name\":\"AccountImplementationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AccountOwnerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AccountOwnerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"accountRegistry\",\"type\":\"address\"}],\"name\":\"AccountRegistryUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"response\",\"type\":\"bytes\"}],\"name\":\"AccountTransactionExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"accountImplementation\",\"type\":\"address\"}],\"name\":\"AccountUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"GuardianAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"GuardianRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"accountImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accountRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"addAccountOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"addGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"saltOwner\",\"type\":\"address\"}],\"name\":\"computeAccountAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"deployAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"executeAccountTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"guardians_\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"accountImplementation_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"gateway_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isAccountDeployed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"isGuardian\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"isValidAccountSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"isValidAccountSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"refundAccountCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"removeAccountOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"removeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accountImplementation_\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"upgradeAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"verifyAccountOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"verifyAccountOwnerAtBlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"verifyGuardianSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"events\":{\"AccountCallRefunded(address,address,address,uint256)\":{\"details\":\"Emitted when the call is refunded\",\"params\":{\"account\":\"account address\",\"beneficiary\":\"beneficiary address\",\"token\":\"token address\",\"value\":\"value\"}},\"AccountOwnerAdded(address,address)\":{\"details\":\"Emitted when the new owner is added\",\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"}},\"AccountOwnerRemoved(address,address)\":{\"details\":\"Emitted when the existing owner is removed\",\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"}}},\"kind\":\"dev\",\"methods\":{\"addAccountOwner(address,address)\":{\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"}},\"addGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"}},\"computeAccountAddress(address)\":{\"params\":{\"saltOwner\":\"salt owner address\"},\"returns\":{\"_0\":\"account address\"}},\"constructor\":{\"details\":\"Public constructor\"},\"deployAccount(address)\":{\"params\":{\"account\":\"account address\"}},\"executeAccountTransaction(address,address,uint256,bytes)\":{\"details\":\"Deploys an account if not deployed yet\",\"params\":{\"account\":\"account address\",\"data\":\"data\",\"to\":\"to address\",\"value\":\"value\"}},\"initialize(address[],address,address)\":{\"params\":{\"accountImplementation_\":\"account implementation address\",\"gateway_\":\"`Gateway` contract address\",\"guardians_\":\"array of guardians addresses\"}},\"isAccountDeployed(address)\":{\"params\":{\"account\":\"account address\"},\"returns\":{\"_0\":\"true when account is deployed\"}},\"isGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"},\"returns\":{\"_0\":\"true when guardian exists\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}},\"isValidAccountSignature(address,bytes,bytes)\":{\"params\":{\"account\":\"account address\",\"message\":\"message\",\"signature\":\"signature\"},\"returns\":{\"_0\":\"magic hash if valid\"}},\"isValidAccountSignature(address,bytes32,bytes)\":{\"params\":{\"account\":\"account address\",\"messageHash\":\"message hash\",\"signature\":\"signature\"},\"returns\":{\"_0\":\"magic hash if valid\"}},\"refundAccountCall(address,address,uint256)\":{\"details\":\"Deploys an account if not deployed yet\",\"params\":{\"account\":\"account address\",\"token\":\"token address\",\"value\":\"value\"}},\"removeAccountOwner(address,address)\":{\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"}},\"removeGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"}},\"upgrade(address)\":{\"params\":{\"accountImplementation_\":\"account implementation address\"}},\"upgradeAccount(address)\":{\"params\":{\"account\":\"account address\"}},\"verifyAccountOwner(address,address)\":{\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"},\"returns\":{\"_0\":\"true on correct account owner\"}},\"verifyAccountOwnerAtBlock(address,address,uint256)\":{\"params\":{\"account\":\"account address\",\"blockNumber\":\"block number to verify\",\"owner\":\"owner address\"},\"returns\":{\"_0\":\"true on correct account owner\"}},\"verifyGuardianSignature(bytes32,bytes)\":{\"params\":{\"messageHash\":\"message hash\",\"signature\":\"signature\"},\"returns\":{\"_0\":\"true on correct guardian signature\"}}},\"title\":\"Personal account registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addAccountOwner(address,address)\":{\"notice\":\"Adds a new account owner\"},\"addGuardian(address)\":{\"notice\":\"Adds a new guardian\"},\"computeAccountAddress(address)\":{\"notice\":\"Computes account address\"},\"deployAccount(address)\":{\"notice\":\"Deploys account\"},\"executeAccountTransaction(address,address,uint256,bytes)\":{\"notice\":\"Executes account transaction\"},\"initialize(address[],address,address)\":{\"notice\":\"Initializes `PersonalAccountRegistry` contract\"},\"isAccountDeployed(address)\":{\"notice\":\"Checks if account is deployed\"},\"isGuardian(address)\":{\"notice\":\"Check if guardian exists\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"},\"isValidAccountSignature(address,bytes,bytes)\":{\"notice\":\"Verifies account signature\"},\"isValidAccountSignature(address,bytes32,bytes)\":{\"notice\":\"Verifies account signature\"},\"refundAccountCall(address,address,uint256)\":{\"notice\":\"Refunds account call\"},\"removeAccountOwner(address,address)\":{\"notice\":\"Removes the existing account owner\"},\"removeGuardian(address)\":{\"notice\":\"Removes the existing guardian\"},\"upgrade(address)\":{\"notice\":\"Upgrades `PersonalAccountRegistry` contract\"},\"upgradeAccount(address)\":{\"notice\":\"Upgrades account\"},\"verifyAccountOwner(address,address)\":{\"notice\":\"Verifies the owner of the account at the current block\"},\"verifyAccountOwnerAtBlock(address,address,uint256)\":{\"notice\":\"Verifies the owner of the account at a specific block\"},\"verifyGuardianSignature(bytes32,bytes)\":{\"notice\":\"Verifies guardian signature\"}},\"notice\":\"A registry for personal (controlled by owners) accounts\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/personal/PersonalAccountRegistry.sol\":\"PersonalAccountRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/access/Controlled.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Controlled\\n *\\n * @dev Contract module which provides an access control mechanism.\\n * It ensures there is only one controlling account of the smart contract\\n * and grants that account exclusive access to specific functions.\\n *\\n * The controller account will be the one that deploys the contract.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Controlled {\\n /**\\n * @return controller account address\\n */\\n address public controller;\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if msg.sender is not the controller\\n */\\n modifier onlyController() {\\n require(\\n msg.sender == controller,\\n \\\"Controlled: msg.sender is not the controller\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n controller = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xdf03a0b7ec644da9925c5c1b6c8a86bb1cc1b9c5018bb265a1a4c5044b877af3\",\"license\":\"MIT\"},\"src/common/access/Guarded.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n\\n/**\\n * @title Guarded\\n *\\n * @dev Contract module which provides a guardian-type control mechanism.\\n * It allows key accounts to have guardians and restricts specific methods to be accessible by guardians only.\\n *\\n * Each guardian account can remove other guardians\\n *\\n * Use `_initializeGuarded` to initialize the contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Guarded {\\n using ECDSALib for bytes32;\\n\\n mapping(address => bool) private guardians;\\n\\n // events\\n\\n /**\\n * @dev Emitted when a new guardian is added\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianAdded(\\n address sender,\\n address guardian\\n );\\n\\n /**\\n * @dev Emitted when the existing guardian is removed\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianRemoved(\\n address sender,\\n address guardian\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not a guardian account\\n */\\n modifier onlyGuardian() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n guardians[tx.origin],\\n \\\"Guarded: tx.origin is not the guardian\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new guardian\\n * @param guardian guardian address\\n */\\n function addGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n _addGuardian(guardian);\\n }\\n\\n /**\\n * @notice Removes the existing guardian\\n * @param guardian guardian address\\n */\\n function removeGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin != guardian,\\n \\\"Guarded: cannot remove self\\\"\\n );\\n\\n require(\\n guardians[guardian],\\n \\\"Guarded: guardian doesn't exist\\\"\\n );\\n\\n guardians[guardian] = false;\\n\\n emit GuardianRemoved(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if guardian exists\\n * @param guardian guardian address\\n * @return true when guardian exists\\n */\\n function isGuardian(\\n address guardian\\n )\\n external\\n view\\n returns (bool)\\n {\\n return guardians[guardian];\\n }\\n\\n /**\\n * @notice Verifies guardian signature\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true on correct guardian signature\\n */\\n function verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyGuardianSignature(\\n messageHash,\\n signature\\n );\\n }\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `Guarded` contract\\n * @dev If `guardians_` array is empty `tx.origin` is added as guardian account\\n * @param guardians_ array of guardians addresses\\n */\\n function _initializeGuarded(\\n address[] memory guardians_\\n )\\n internal\\n {\\n if (guardians_.length == 0) {\\n // solhint-disable-next-line avoid-tx-origin\\n _addGuardian(tx.origin);\\n } else {\\n uint guardiansLen = guardians_.length;\\n for (uint i = 0; i < guardiansLen; i++) {\\n _addGuardian(guardians_[i]);\\n }\\n }\\n }\\n\\n\\n // internal functions (views)\\n\\n function _verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n view\\n returns (bool)\\n {\\n address guardian = messageHash.recoverAddress(signature);\\n\\n return guardians[guardian];\\n }\\n\\n // private functions\\n\\n function _addGuardian(\\n address guardian\\n )\\n private\\n {\\n require(\\n guardian != address(0),\\n \\\"Guarded: cannot add 0x0 guardian\\\"\\n );\\n\\n require(\\n !guardians[guardian],\\n \\\"Guarded: guardian already exists\\\"\\n );\\n\\n guardians[guardian] = true;\\n\\n emit GuardianAdded(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n}\\n\",\"keccak256\":\"0x4a5f5670041362e87ea267d81c55fc3edc1a78e81f6f17524b13267f91f31458\",\"license\":\"MIT\"},\"src/common/account/Account.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../access/Controlled.sol\\\";\\nimport \\\"./AccountBase.sol\\\";\\n\\n\\n/**\\n * @title Account\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Account is Controlled, AccountBase {\\n address public implementation;\\n\\n /**\\n * @dev Public constructor\\n * @param registry_ account registry address\\n * @param implementation_ account implementation address\\n */\\n constructor(\\n address registry_,\\n address implementation_\\n )\\n public\\n Controlled()\\n {\\n registry = registry_;\\n implementation = implementation_;\\n }\\n\\n // external functions\\n\\n /**\\n * @notice Payable receive\\n */\\n receive()\\n external\\n payable\\n {\\n //\\n }\\n\\n /**\\n * @notice Fallback\\n */\\n // solhint-disable-next-line payable-fallback\\n fallback()\\n external\\n {\\n if (msg.data.length != 0) {\\n address implementation_ = implementation;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let calldedatasize := calldatasize()\\n\\n calldatacopy(0, 0, calldedatasize)\\n\\n let result := delegatecall(gas(), implementation_, 0, calldedatasize, 0, 0)\\n let returneddatasize := returndatasize()\\n\\n returndatacopy(0, 0, returneddatasize)\\n\\n switch result\\n case 0 { revert(0, returneddatasize) }\\n default { return(0, returneddatasize) }\\n }\\n }\\n }\\n\\n /**\\n * @notice Sets implementation\\n * @param implementation_ implementation address\\n */\\n function setImplementation(\\n address implementation_\\n )\\n external\\n onlyController\\n {\\n implementation = implementation_;\\n }\\n\\n /**\\n * @notice Executes transaction\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @return transaction result\\n */\\n function executeTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n onlyController\\n returns (bytes memory)\\n {\\n bytes memory result;\\n bool succeeded;\\n\\n // solhint-disable-next-line avoid-call-value, avoid-low-level-calls\\n (succeeded, result) = payable(to).call{value: value}(data);\\n\\n require(\\n succeeded,\\n \\\"Account: transaction reverted\\\"\\n );\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe516c999a02a65ee99487d398d0c12589500680a9ca08c852540fb9473d70a26\",\"license\":\"MIT\"},\"src/common/account/AccountBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Account base\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountBase {\\n address public registry;\\n}\\n\",\"keccak256\":\"0xcadf29e389f8db823e14f3f92808fd135f07b0135eb4dcf29b89c85941b39862\",\"license\":\"MIT\"},\"src/common/account/AccountController.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./Account.sol\\\";\\n\\n\\n/**\\n * @title Account controller\\n *\\n * @dev Contract module which provides Account deployment mechanism\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountController {\\n address public accountRegistry;\\n address public accountImplementation;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the account registry is updated\\n * @param accountRegistry account registry address\\n */\\n event AccountRegistryUpdated(\\n address accountRegistry\\n );\\n\\n /**\\n * @dev Emitted when the account implementation is updated\\n * @param accountImplementation account implementation address\\n */\\n event AccountImplementationUpdated(\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the account is deployed\\n * @param account account address\\n * @param accountImplementation account implementation address\\n */\\n event AccountDeployed(\\n address account,\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the account is upgraded\\n * @param account account address\\n * @param accountImplementation account implementation address\\n */\\n event AccountUpgraded(\\n address account,\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the transaction is executed\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @param response response\\n */\\n event AccountTransactionExecuted(\\n address account,\\n address to,\\n uint256 value,\\n bytes data,\\n bytes response\\n );\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `AccountController` contract\\n * @param accountRegistry_ account registry address\\n * @param accountImplementation_ account implementation address\\n */\\n function _initializeAccountController(\\n address accountRegistry_,\\n address accountImplementation_\\n )\\n internal\\n {\\n _setAccountRegistry(accountRegistry_, false);\\n _setAccountImplementation(accountImplementation_, false);\\n }\\n\\n /**\\n * @notice Sets account registry\\n * @param accountRegistry_ account registry address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _setAccountRegistry(\\n address accountRegistry_,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n accountRegistry_ != address(0),\\n \\\"AccountController: cannot set account registry to 0x0\\\"\\n );\\n\\n accountRegistry = accountRegistry_;\\n\\n if (emitEvent) {\\n emit AccountRegistryUpdated(accountRegistry);\\n }\\n }\\n\\n /**\\n * @notice Sets account implementation\\n * @param accountImplementation_ account implementation address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _setAccountImplementation(\\n address accountImplementation_,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n accountImplementation_ != address(0),\\n \\\"AccountController: cannot set account Implementation to 0x0\\\"\\n );\\n\\n accountImplementation = accountImplementation_;\\n\\n if (emitEvent) {\\n emit AccountImplementationUpdated(accountImplementation);\\n }\\n }\\n\\n /**\\n * @notice Deploys account\\n * @param salt CREATE2 salt\\n * @param emitEvent it will emit event when flag is set to true\\n * @return account address\\n */\\n function _deployAccount(\\n bytes32 salt,\\n bool emitEvent\\n )\\n internal\\n returns (address)\\n {\\n address account = address(new Account{salt: salt}(\\n accountRegistry,\\n accountImplementation\\n ));\\n\\n if (emitEvent) {\\n emit AccountDeployed(\\n account,\\n accountImplementation\\n );\\n }\\n\\n return account;\\n }\\n\\n /**\\n * @notice Upgrades account\\n * @param account account address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _upgradeAccount(\\n address account,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n Account(payable(account)).implementation() != accountImplementation,\\n \\\"AccountController: account already upgraded\\\"\\n );\\n\\n Account(payable(account)).setImplementation(accountImplementation);\\n\\n if (emitEvent) {\\n emit AccountUpgraded(\\n account,\\n accountImplementation\\n );\\n }\\n }\\n\\n /**\\n * @notice Executes transaction from the account\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @param emitEvent it will emit event when flag is set to true\\n * @return transaction result\\n */\\n function _executeAccountTransaction(\\n address account,\\n address to,\\n uint256 value,\\n bytes memory data,\\n bool emitEvent\\n )\\n internal\\n returns (bytes memory)\\n {\\n require(\\n to != address(0),\\n \\\"AccountController: cannot send to 0x0\\\"\\n );\\n\\n require(\\n to != address(this),\\n \\\"AccountController: cannot send to controller\\\"\\n );\\n\\n require(\\n to != account,\\n \\\"AccountController: cannot send to self\\\"\\n );\\n\\n bytes memory response = Account(payable(account)).executeTransaction(\\n to,\\n value,\\n data\\n );\\n\\n if (emitEvent) {\\n emit AccountTransactionExecuted(\\n account,\\n to,\\n value,\\n data,\\n response\\n );\\n }\\n\\n return response;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Computes account CREATE2 address\\n * @param salt CREATE2 salt\\n * @return account address\\n */\\n function _computeAccountAddress(\\n bytes32 salt\\n )\\n internal\\n view\\n returns (address)\\n {\\n bytes memory creationCode = abi.encodePacked(\\n type(Account).creationCode,\\n bytes12(0),\\n accountRegistry,\\n bytes12(0),\\n accountImplementation\\n );\\n\\n bytes32 data = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n salt,\\n keccak256(creationCode)\\n )\\n );\\n\\n return address(uint160(uint256(data)));\\n }\\n}\\n\",\"keccak256\":\"0xe161f1f4f6ea5d3a9810f7c93764d55e473abe1054e6aa68fde791be7d70a26c\",\"license\":\"MIT\"},\"src/common/account/AccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./Account.sol\\\";\\n\\n\\n/**\\n * @title Account registry\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nabstract contract AccountRegistry {\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param message message\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes calldata message,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0x2d40245721f5f74219e5cf88713246dbe8b6d5404e941125d3e850b1f127ec34\",\"license\":\"MIT\"},\"src/common/libs/BlockLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Block library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BlockLib {\\n struct BlockRelated {\\n bool added;\\n uint256 removedAtBlockNumber;\\n }\\n\\n /**\\n * @notice Verifies self struct at current block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtCurrentBlock(\\n BlockRelated memory self\\n )\\n internal\\n view\\n returns (bool)\\n {\\n return verifyAtBlock(self, block.number);\\n }\\n\\n /**\\n * @notice Verifies self struct at any block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtAnyBlock(\\n BlockRelated memory self\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n return verifyAtBlock(self, 0);\\n }\\n\\n /**\\n * @notice Verifies self struct at specific block\\n * @param self self struct\\n * @param blockNumber block number to verify\\n * @return true on correct self struct\\n */\\n function verifyAtBlock(\\n BlockRelated memory self,\\n uint256 blockNumber\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n bool result = false;\\n\\n if (self.added) {\\n if (self.removedAtBlockNumber == 0) {\\n result = true;\\n } else if (blockNumber == 0) {\\n result = true;\\n } else {\\n result = self.removedAtBlockNumber > blockNumber;\\n }\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9205536bc211f86d1113118a44dddfa7a9b9772a918cf4b1575c982a05472587\",\"license\":\"MIT\"},\"src/common/libs/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Bytes library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BytesLib {\\n /**\\n * @notice Converts bytes to address\\n * @param data data\\n * @return address\\n */\\n function toAddress(\\n bytes memory data\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result;\\n\\n require(\\n data.length == 20,\\n \\\"BytesLib: invalid data length\\\"\\n );\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := div(mload(add(data, 0x20)), 0x1000000000000000000000000)\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x64c84964ea91bfb1f2d859eea6c57fe5b4a6f269951a4adf5f58d306c54c7f76\",\"license\":\"MIT\"},\"src/common/libs/ECDSAExtendedLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./StringsLib.sol\\\";\\n\\n\\n/**\\n * @title ECDSA extended library\\n */\\nlibrary ECDSAExtendedLib {\\n using StringsLib for uint;\\n\\n function toEthereumSignedMessageHash(\\n bytes memory message\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n\\\",\\n message.length.toString(),\\n abi.encodePacked(message)\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x83e6056caaba892d91de45324f4d2702ac01695fab2d34c86895d7d288547ba3\",\"license\":\"MIT\"},\"src/common/libs/ECDSALib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ECDSA library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/cryptography/ECDSA.sol#L26\\n */\\nlibrary ECDSALib {\\n function recoverAddress(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n\\n if (v < 27) {\\n v += 27;\\n }\\n\\n if (v == 27 || v == 28) {\\n result = ecrecover(messageHash, v, r, s);\\n }\\n }\\n\\n return result;\\n }\\n\\n function toEthereumSignedMessageHash(\\n bytes32 messageHash\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n messageHash\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x3b1460d688302eb595268c2af147ab532f29dbced66520e013f48d498eed3cec\",\"license\":\"MIT\"},\"src/common/libs/SafeMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Safe math library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/math/SafeMath.sol\\n */\\nlibrary SafeMathLib {\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n\\n require(c >= a, \\\"SafeMathLib: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMathLib: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n\\n return a - b;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n\\n require(c / a == b, \\\"SafeMathLib: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMathLib: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n\\n return a / b;\\n }\\n\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMathLib: modulo by zero\\\");\\n }\\n\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x6089f354ca754d9c5dd9e800ee5ed86717dbf8f9af470604e0be691ac57c0107\",\"license\":\"MIT\"},\"src/common/libs/StringsLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Strings library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/utils/Strings.sol#L12\\n */\\nlibrary StringsLib {\\n function toString(\\n uint256 value\\n )\\n internal\\n pure\\n returns (string memory)\\n {\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n\\n uint256 temp = value;\\n uint256 digits;\\n\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n\\n while (temp != 0) {\\n buffer[index--] = byte(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0x4110150d0c921fd31db34ca33672de8e81c3ae467076149a3a546f804d1f58dd\",\"license\":\"MIT\"},\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/common/token/ERC20Token.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/SafeMathLib.sol\\\";\\n\\n\\n/**\\n * @title ERC20 token\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/token/ERC20/ERC20.sol\\n */\\ncontract ERC20Token {\\n using SafeMathLib for uint256;\\n\\n string public name;\\n string public symbol;\\n uint8 public decimals;\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) internal balances;\\n mapping(address => mapping(address => uint256)) internal allowances;\\n\\n // events\\n\\n event Transfer(\\n address indexed from,\\n address indexed to,\\n uint256 value\\n );\\n\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n function transfer(\\n address to,\\n uint256 value\\n )\\n external\\n returns (bool)\\n {\\n _transfer(_getSender(), to, value);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n address sender = _getSender();\\n\\n _transfer(from, to, value);\\n _approve(from, sender, allowances[from][sender].sub(value));\\n\\n return true;\\n }\\n\\n function approve(\\n address spender,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n _approve(_getSender(), spender, value);\\n\\n return true;\\n }\\n\\n // external functions (views)\\n\\n function balanceOf(\\n address owner\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return balances[owner];\\n }\\n\\n function allowance(\\n address owner,\\n address spender\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[owner][spender];\\n }\\n\\n // internal functions\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n from != address(0),\\n \\\"ERC20Token: cannot transfer from 0x0 address\\\"\\n );\\n require(\\n to != address(0),\\n \\\"ERC20Token: cannot transfer to 0x0 address\\\"\\n );\\n\\n balances[from] = balances[from].sub(value);\\n balances[to] = balances[to].add(value);\\n\\n emit Transfer(from, to, value);\\n }\\n\\n function _approve(\\n address owner,\\n address spender,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot approve from 0x0 address\\\"\\n );\\n require(\\n spender != address(0),\\n \\\"ERC20Token: cannot approve to 0x0 address\\\"\\n );\\n\\n allowances[owner][spender] = value;\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function _mint(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot mint to 0x0 address\\\"\\n );\\n require(\\n value > 0,\\n \\\"ERC20Token: cannot mint 0 value\\\"\\n );\\n\\n balances[owner] = balances[owner].add(value);\\n totalSupply = totalSupply.add(value);\\n\\n emit Transfer(address(0), owner, value);\\n }\\n\\n function _burn(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot burn from 0x0 address\\\"\\n );\\n\\n balances[owner] = balances[owner].sub(\\n value,\\n \\\"ERC20Token: burn value exceeds balance\\\"\\n );\\n\\n totalSupply = totalSupply.sub(value);\\n\\n emit Transfer(owner, address(0), value);\\n }\\n\\n // internal functions (views)\\n\\n function _getSender()\\n virtual\\n internal\\n view\\n returns (address)\\n {\\n return msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x6f2b0bd08da549c6c1f5ceee85766832d587dde62c56bebc3a14bd9ea407e03d\",\"license\":\"MIT\"},\"src/gateway/GatewayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BytesLib.sol\\\";\\n\\n\\n/**\\n * @title Gateway recipient\\n *\\n * @notice Gateway target contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract GatewayRecipient {\\n using BytesLib for bytes;\\n\\n address public gateway;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `GatewayRecipient` contract\\n * @param gateway_ `Gateway` contract address\\n */\\n function _initializeGatewayRecipient(\\n address gateway_\\n )\\n internal\\n {\\n gateway = gateway_;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Gets gateway context account\\n * @return context account address\\n */\\n function _getContextAccount()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(40);\\n }\\n\\n /**\\n * @notice Gets gateway context sender\\n * @return context sender address\\n */\\n function _getContextSender()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(20);\\n }\\n\\n /**\\n * @notice Gets gateway context data\\n * @return context data\\n */\\n function _getContextData()\\n internal\\n view\\n returns (bytes calldata)\\n {\\n bytes calldata result;\\n\\n if (_isGatewaySender()) {\\n result = msg.data[:msg.data.length - 40];\\n } else {\\n result = msg.data;\\n }\\n\\n return result;\\n }\\n\\n // private functions (views)\\n\\n function _getContextAddress(\\n uint256 offset\\n )\\n private\\n view\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (_isGatewaySender()) {\\n uint from = msg.data.length - offset;\\n result = bytes(msg.data[from:from + 20]).toAddress();\\n } else {\\n result = msg.sender;\\n }\\n\\n return result;\\n }\\n\\n function _isGatewaySender()\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (msg.sender == gateway) {\\n require(\\n msg.data.length >= 44,\\n \\\"GatewayRecipient: invalid msg.data\\\"\\n );\\n\\n result = true;\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe3fd29479d748d67360c61a9cbaafc66eaca25f476e59a45e842472bcf5233fc\",\"license\":\"MIT\"},\"src/personal/PersonalAccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/access/Guarded.sol\\\";\\nimport \\\"../common/account/AccountController.sol\\\";\\nimport \\\"../common/account/AccountRegistry.sol\\\";\\nimport \\\"../common/libs/BlockLib.sol\\\";\\nimport \\\"../common/libs/ECDSALib.sol\\\";\\nimport \\\"../common/libs/ECDSAExtendedLib.sol\\\";\\nimport \\\"../common/libs/SafeMathLib.sol\\\";\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"../common/token/ERC20Token.sol\\\";\\nimport \\\"../gateway/GatewayRecipient.sol\\\";\\n\\n\\n/**\\n * @title Personal account registry\\n *\\n * @notice A registry for personal (controlled by owners) accounts\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract PersonalAccountRegistry is Guarded, AccountController, AccountRegistry, Initializable, GatewayRecipient {\\n using BlockLib for BlockLib.BlockRelated;\\n using SafeMathLib for uint256;\\n using ECDSALib for bytes32;\\n using ECDSAExtendedLib for bytes;\\n\\n struct Account {\\n bool deployed;\\n bytes32 salt;\\n mapping(address => BlockLib.BlockRelated) owners;\\n }\\n\\n mapping(address => Account) private accounts;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the new owner is added\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerAdded(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the existing owner is removed\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerRemoved(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the call is refunded\\n * @param account account address\\n * @param beneficiary beneficiary address\\n * @param token token address\\n * @param value value\\n */\\n event AccountCallRefunded(\\n address account,\\n address beneficiary,\\n address token,\\n uint256 value\\n );\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Initializable() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `PersonalAccountRegistry` contract\\n * @param guardians_ array of guardians addresses\\n * @param accountImplementation_ account implementation address\\n * @param gateway_ `Gateway` contract address\\n */\\n function initialize(\\n address[] calldata guardians_,\\n address accountImplementation_,\\n address gateway_\\n )\\n external\\n onlyInitializer\\n {\\n // Guarded\\n _initializeGuarded(guardians_);\\n\\n // AccountController\\n _initializeAccountController(address(this), accountImplementation_);\\n\\n // GatewayRecipient\\n _initializeGatewayRecipient(gateway_);\\n }\\n\\n /**\\n * @notice Upgrades `PersonalAccountRegistry` contract\\n * @param accountImplementation_ account implementation address\\n */\\n function upgrade(\\n address accountImplementation_\\n )\\n external\\n onlyGuardian\\n {\\n _setAccountImplementation(accountImplementation_, true);\\n }\\n\\n /**\\n * @notice Deploys account\\n * @param account account address\\n */\\n function deployAccount(\\n address account\\n )\\n external\\n {\\n _verifySender(account);\\n _deployAccount(account);\\n }\\n\\n /**\\n * @notice Upgrades account\\n * @param account account address\\n */\\n function upgradeAccount(\\n address account\\n )\\n external\\n {\\n _verifySender(account);\\n _upgradeAccount(account, true);\\n }\\n\\n /**\\n * @notice Adds a new account owner\\n * @param account account address\\n * @param owner owner address\\n */\\n function addAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n {\\n _verifySender(account);\\n\\n require(\\n owner != address(0),\\n \\\"PersonalAccountRegistry: cannot add 0x0 owner\\\"\\n );\\n\\n require(\\n !accounts[account].owners[owner].verifyAtCurrentBlock(),\\n \\\"PersonalAccountRegistry: owner already exists\\\"\\n );\\n\\n accounts[account].owners[owner].added = true;\\n accounts[account].owners[owner].removedAtBlockNumber = 0;\\n\\n emit AccountOwnerAdded(\\n account,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Removes the existing account owner\\n * @param account account address\\n * @param owner owner address\\n */\\n function removeAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n {\\n address sender = _verifySender(account);\\n\\n require(\\n owner != sender,\\n \\\"PersonalAccountRegistry: cannot remove self\\\"\\n );\\n\\n require(\\n accounts[account].owners[owner].verifyAtCurrentBlock(),\\n \\\"PersonalAccountRegistry: owner doesn't exist\\\"\\n );\\n\\n accounts[account].owners[owner].removedAtBlockNumber = block.number;\\n\\n emit AccountOwnerRemoved(\\n account,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Executes account transaction\\n * @dev Deploys an account if not deployed yet\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n */\\n function executeAccountTransaction(\\n address account,\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n {\\n _verifySender(account);\\n\\n _deployAccount(account);\\n\\n _executeAccountTransaction(\\n account,\\n to,\\n value,\\n data,\\n true\\n );\\n }\\n\\n /**\\n * @notice Refunds account call\\n * @dev Deploys an account if not deployed yet\\n * @param account account address\\n * @param token token address\\n * @param value value\\n */\\n function refundAccountCall(\\n address account,\\n address token,\\n uint256 value\\n )\\n external\\n {\\n _verifySender(account);\\n\\n _deployAccount(account);\\n\\n /* solhint-disable avoid-tx-origin */\\n\\n if (token == address(0)) {\\n _executeAccountTransaction(\\n account,\\n tx.origin,\\n value,\\n new bytes(0),\\n false\\n );\\n } else {\\n bytes memory response = _executeAccountTransaction(\\n account,\\n token,\\n 0,\\n abi.encodeWithSelector(\\n ERC20Token(token).transfer.selector,\\n tx.origin,\\n value\\n ),\\n false\\n );\\n\\n if (response.length > 0) {\\n require(\\n abi.decode(response, (bool)),\\n \\\"PersonalAccountRegistry: ERC20Token transfer reverted\\\"\\n );\\n }\\n }\\n\\n emit AccountCallRefunded(\\n account,\\n tx.origin,\\n token,\\n value\\n );\\n\\n /* solhint-enable avoid-tx-origin */\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Computes account address\\n * @param saltOwner salt owner address\\n * @return account address\\n */\\n function computeAccountAddress(\\n address saltOwner\\n )\\n external\\n view\\n returns (address)\\n {\\n return _computeAccountAddress(saltOwner);\\n }\\n\\n /**\\n * @notice Checks if account is deployed\\n * @param account account address\\n * @return true when account is deployed\\n */\\n function isAccountDeployed(\\n address account\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].deployed;\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at the current block\\n * @param account account address\\n * @param owner owner address\\n * @return true on correct account owner\\n */\\n function verifyAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(account, owner);\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at a specific block\\n * @param account account address\\n * @param owner owner address\\n * @param blockNumber block number to verify\\n * @return true on correct account owner\\n */\\n function verifyAccountOwnerAtBlock(\\n address account,\\n address owner,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n bool result = false;\\n\\n if (_verifyAccountOwner(account, owner)) {\\n result = true;\\n } else {\\n result = accounts[account].owners[owner].verifyAtBlock(blockNumber);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param messageHash message hash\\n * @param signature signature\\n * @return magic hash if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n override\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(\\n account,\\n messageHash.recoverAddress(signature)\\n );\\n }\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param message message\\n * @param signature signature\\n * @return magic hash if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes calldata message,\\n bytes calldata signature\\n )\\n override\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(\\n account,\\n message.toEthereumSignedMessageHash().recoverAddress(signature)\\n );\\n }\\n\\n // private functions\\n\\n function _verifySender(\\n address account\\n )\\n private\\n returns (address)\\n {\\n address sender = _getContextSender();\\n\\n if (accounts[account].owners[sender].added) {\\n require(\\n accounts[account].owners[sender].removedAtBlockNumber == 0,\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n } else {\\n require(\\n accounts[account].salt == 0,\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n\\n bytes32 salt = keccak256(\\n abi.encodePacked(sender)\\n );\\n\\n require(\\n account == _computeAccountAddress(salt),\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n\\n accounts[account].salt = salt;\\n accounts[account].owners[sender].added = true;\\n\\n emit AccountOwnerAdded(\\n account,\\n sender\\n );\\n }\\n\\n return sender;\\n }\\n\\n function _deployAccount(\\n address account\\n )\\n internal\\n {\\n if (!accounts[account].deployed) {\\n _deployAccount(\\n accounts[account].salt,\\n true\\n );\\n\\n accounts[account].deployed = true;\\n }\\n }\\n\\n // private functions (views)\\n\\n function _computeAccountAddress(\\n address saltOwner\\n )\\n private\\n view\\n returns (address)\\n {\\n bytes32 salt = keccak256(\\n abi.encodePacked(saltOwner)\\n );\\n\\n return _computeAccountAddress(salt);\\n }\\n\\n function _verifyAccountOwner(\\n address account,\\n address owner\\n )\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (accounts[account].owners[owner].added) {\\n result = accounts[account].owners[owner].removedAtBlockNumber == 0;\\n } else if (accounts[account].salt == 0) {\\n result = account == _computeAccountAddress(owner);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xdae162610e707ab8c394b3edf924b75ef1f315520935cb88f4280b29eeaf4b61\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5032600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506144d1806100616000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806390482d72116100b8578063d0f710d61161007c578063d0f710d61461075e578063da9fc1ae146107f7578063db63f5821461083b578063e1e382ce1461089f578063e5c7278f14610958578063f4876c7414610a1b57610142565b806390482d7214610545578063a526d83b146105fe578063bb890d3f14610642578063cade6a5d146106bc578063d089e11a1461072a57610142565b80631a8414031161010a5780631a841403146103515780633164b5e1146103bf57806334d323a414610419578063392e53cd1461049d57806343013c24146104bd578063714041561461050157610142565b80630900f010146101475780630c68ba211461018b57806311464fbe146101e5578063116191b614610219578063124e9eb31461024d575b600080fd5b6101896004803603602081101561015d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a7f565b005b6101cd600480360360208110156101a157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b2e565b60405180821515815260200191505060405180910390f35b6101ed610b83565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610221610ba9565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103396004803603606081101561026357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156102a057600080fd5b8201836020820111156102b257600080fd5b803590602001918460018302840111640100000000831117156102d457600080fd5b9091929391929390803590602001906401000000008111156102f557600080fd5b82018360208201111561030757600080fd5b8035906020019184600183028401116401000000008311171561032957600080fd5b9091929391929390505050610bcf565b60405180821515815260200191505060405180910390f35b6103bd6004803603606081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c88565b005b610401600480360360208110156103d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ef3565b60405180821515815260200191505060405180910390f35b6104856004803603606081101561042f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f4c565b60405180821515815260200191505060405180910390f35b6104a561103a565b60405180821515815260200191505060405180910390f35b6104ff600480360360208110156104d357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611092565b005b6105436004803603602081101561051757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110aa565b005b6105fc6004803603606081101561055b57600080fd5b810190808035906020019064010000000081111561057857600080fd5b82018360208201111561058a57600080fd5b803590602001918460208302840111640100000000831117156105ac57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611370565b005b6106406004803603602081101561061457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611508565b005b6106a46004803603604081101561065857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115b5565b60405180821515815260200191505060405180910390f35b6106fe600480360360208110156106d257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115c9565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107326115db565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107df6004803603604081101561077457600080fd5b81019080803590602001909291908035906020019064010000000081111561079b57600080fd5b8201836020820111156107ad57600080fd5b803590602001918460018302840111640100000000831117156107cf57600080fd5b9091929391929390505050611601565b60405180821515815260200191505060405180910390f35b6108396004803603602081101561080d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061165a565b005b61089d6004803603604081101561085157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611670565b005b610940600480360360608110156108b557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156108fc57600080fd5b82018360208201111561090e57600080fd5b8035906020019184600183028401116401000000008311171561093057600080fd5b9091929391929390505050611905565b60405180821515815260200191505060405180910390f35b610a196004803603608081101561096e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156109d557600080fd5b8201836020820111156109e757600080fd5b80359060200191846001830284011164010000000083111715610a0957600080fd5b9091929391929390505050611971565b005b610a7d60048036036040811015610a3157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119de565b005b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610b20576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806143e46026913960400191505060405180910390fd5b610b2b816001611d0d565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000610c7d86610c7885858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c6a89898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611e4e565b611fb790919063ffffffff16565b612087565b905095945050505050565b610c918361223e565b50610c9b83612685565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d2f57610d29833283600067ffffffffffffffff81118015610cee57600080fd5b506040519080825280601f01601f191660200182016040528015610d215781602001600182028036833780820191505090505b506000612786565b50610e5d565b6060610dd38484600063a9059cbb60e01b3287604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506000612786565b9050600081511115610e5b57808060200190516020811015610df457600080fd5b8101908080519060200190929190505050610e5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018061440a6035913960400191505060405180910390fd5b5b505b7feb5511fbef89123439f12682f0e9d0fc9696913b26eee55434c77d62c30aa7ca83328484604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200194505050505060405180910390a1505050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff169050919050565b60008060009050610f5d8585612087565b15610f6b576001905061102f565b61102c83600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050612c5490919063ffffffff16565b90505b809150509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b61109b8161223e565b506110a7816001612ca3565b50565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661114b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806143e46026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614156111ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f477561726465643a2063616e6e6f742072656d6f76652073656c66000000000081525060200191505060405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166112ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f477561726465643a20677561726469616e20646f65736e27742065786973740081525060200191505060405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611416576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180614318602f913960400191505060405180910390fd5b6000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506114a2848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050612f05565b6114ac3083612f5d565b6114b581612f77565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150505050565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166115a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806143e46026913960400191505060405180910390fd5b6115b281612fbb565b50565b60006115c18383612087565b905092915050565b60006115d4826131e2565b9050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006116518484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050613238565b90509392505050565b6116638161223e565b5061166d81612685565b50565b600061167b8361223e565b90508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611702576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806143b9602b913960400191505060405180910390fd5b6117b9600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506132a5565b61180e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806142b7602c913960400191505060405180910390fd5b43600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f1ce3cbbc43ee231e5b950332f2b0b9dd7d349291a3ee411ce5c5c7ed745661bb8383604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1505050565b60006119678561196285858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505087611fb790919063ffffffff16565b612087565b9050949350505050565b61197a8561223e565b5061198485612685565b6119d685858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506001612786565b505050505050565b6119e78261223e565b50600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611a6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180614498602d913960400191505060405180910390fd5b611b25600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506132a5565b15611b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d81526020018061446b602d913960400191505060405180910390fd5b6001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055506000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644688282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611d93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018061421e603b913960400191505060405180910390fd5b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015611e4a577f70d9f5a076620216a6050e493f3ce69749de0b68fa4b839ba2518660ba8b9cf0600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b5050565b6000611e5a82516132b8565b826040516020018082805190602001908083835b60208310611e915780518252602082019150602081019050602083039250611e6e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405260405160200180807f19457468657265756d205369676e6564204d6573736167653a0a000000000000815250601a0183805190602001908083835b60208310611f235780518252602082019150602081019050602083039250611f00565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310611f745780518252602082019150602081019050602083039250611f51565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052805190602001209050919050565b6000806000905060418351141561207d5760008060006020860151925060408601519150606086015160001a9050601b8160ff161015611ff857601b810190505b601b8160ff16148061200d5750601c8160ff16145b156120795760018782858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561206c573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b600080600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16156121ac576000600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154149050612234565b6000801b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154141561223357612202836131e2565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161490505b5b8091505092915050565b6000806122496133ff565b9050600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16156123c0576000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154146123bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806142596038913960400191505060405180910390fd5b61267c565b6000801b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541461245d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806142596038913960400191505060405180910390fd5b600081604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040528051906020012090506124aa81613410565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461252d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806142596038913960400191505060405180910390fd5b80600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055506001600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055507f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644688483604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1505b80915050919050565b600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1661278357612726600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546001613606565b506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055505b50565b6060600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561280e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806143476025913960400191505060405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061443f602c913960400191505060405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612918576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806142916026913960400191505060405180910390fd5b60608673ffffffffffffffffffffffffffffffffffffffff16633f579f428787876040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156129aa57808201518184015260208101905061298f565b50505050905090810190601f1680156129d75780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156129f857600080fd5b505af1158015612a0c573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015612a3657600080fd5b8101908080516040519392919084640100000000821115612a5657600080fd5b83820191506020820185811115612a6c57600080fd5b8251866001820283011164010000000082111715612a8957600080fd5b8083526020830192505050908051906020019080838360005b83811015612abd578082015181840152602081019050612aa2565b50505050905090810190601f168015612aea5780820380516001836020036101000a031916815260200191505b5060405250505090508215612c47577f99eeae1fb8801e2e878e060ec5e5b3557b3c4f8106e35d88cb573f293dae4e248787878785604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015612ba1578082015181840152602081019050612b86565b50505050905090810190601f168015612bce5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015612c07578082015181840152602081019050612bec565b50505050905090810190601f168015612c345780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a15b8091505095945050505050565b60008060009050836000015115612c9957600084602001511415612c7b5760019050612c98565b6000831415612c8d5760019050612c97565b8284602001511190505b5b5b8091505092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d2257600080fd5b505afa158015612d36573d6000803e3d6000fd5b505050506040513d6020811015612d4c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161415612dca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018061438e602b913960400191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663d784d426600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015612e5557600080fd5b505af1158015612e69573d6000803e3d6000fd5b505050508015612f01577feec27cdb8bd6f55c2c537deb52ab094a2437e85ef5197e6f064f90bff3ff563f82600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b5050565b600081511415612f1d57612f1832612fbb565b612f5a565b60008151905060005b81811015612f5757612f4a838281518110612f3d57fe5b6020026020010151612fbb565b8080600101915050612f26565b50505b50565b612f6882600061375a565b612f73816000611d0d565b5050565b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561305e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a2063616e6e6f74206164642030783020677561726469616e81525060200191505060405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561311d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a20677561726469616e20616c72656164792065786973747381525060200191505060405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b60008082604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b815260140191505060405160208183030381529060405280519060200120905061323081613410565b915050919050565b60008061324e8385611fb790919063ffffffff16565b90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b60006132b18243612c54565b9050919050565b60606000821415613300576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506133fa565b600082905060005b6000821461332a578080600101915050600a828161332257fe5b049150613308565b60608167ffffffffffffffff8111801561334357600080fd5b506040519080825280601f01601f1916602001820160405280156133765781602001600182028036833780820191505090505b50905060006001830390508593505b600084146133f257600a848161339757fe5b0660300160f81b828280600190039350815181106133b157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84816133ea57fe5b049350613385565b819450505050505b919050565b600061340b601461389b565b905090565b600060606040518060200161342490613a8c565b6020820181038252601f19601f82011660405250600060a01b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060a01b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516020018086805190602001908083835b602083106134be578051825260208201915060208101905060208303925061349b565b6001836020036101000a0380198251168184511680821785525050505050509050018573ffffffffffffffffffffffffffffffffffffffff19168152600c018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018373ffffffffffffffffffffffffffffffffffffffff19168152600c018273ffffffffffffffffffffffffffffffffffffffff1660601b8152601401955050505050506040516020818303038152906040529050600060ff60f81b3085848051906020012060405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018381526020018281526020019450505050506040516020818303038152906040528051906020012090508060001c92505050919050565b60008083600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161365c90613a8c565b808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff168152602001925050508190604051809103906000f59050801580156136b9573d6000803e3d6000fd5b5090508215613750577f2682a218602b9036c9869f006c5405ee4a1a65267653eb7e286123e5e1afde4c81600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156137e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260358152602001806142e36035913960400191505060405180910390fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015613897577f02e3c47057b8dc27a0929d3c394c314c73aa002d46939c31c9f71d1e77e86c10600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b5050565b600080600090506138aa613930565b1561392357600083600036905003905061391b600036839060148501926138d393929190613a99565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506139f3565b915050613927565b3390505b80915050919050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156139ec57602c600036905010156139e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061436c6022913960400191505060405180910390fd5b600190505b8091505090565b6000806014835114613a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f42797465734c69623a20696e76616c69642064617461206c656e67746800000081525060200191505060405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b61075180613acd83390190565b60008085851115613aa957600080fd5b83861115613ab657600080fd5b600185028301915084860390509450949250505056fe608060405234801561001057600080fd5b506040516107513803806107518339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050610630806101216000396000f3fe60806040526004361061004e5760003560e01c80633f579f42146100be5780635c60da1b146101e75780637b10399914610228578063d784d42614610269578063f77c4791146102ba57610055565b3661005557005b34801561006157600080fd5b50600080369050146100bc576000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050368060008037600080826000855af43d806000803e81600081146100b757816000f35b816000fd5b005b3480156100ca57600080fd5b5061016c600480360360608110156100e157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561012857600080fd5b82018360208201111561013a57600080fd5b8035906020019184600183028401116401000000008311171561015c57600080fd5b90919293919293905050506102fb565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101ac578082015181840152602081019050610191565b50505050905090810190601f1680156101d95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101f357600080fd5b506101fc61049f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561023457600080fd5b5061023d6104c5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027557600080fd5b506102b86004803603602081101561028c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104eb565b005b3480156102c657600080fd5b506102cf6105d3565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806105f8602c913960400191505060405180910390fd5b606060008673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d8060008114610411576040519150601f19603f3d011682016040523d82523d6000602084013e610416565b606091505b50809350819250505080610492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b8192505050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461058f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806105f8602c913960400191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a4163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420496d706c656d656e746174696f6e20746f20307830506572736f6e616c4163636f756e7452656769737472793a2073656e646572206973206e6f7420746865206163636f756e74206f776e65724163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f2073656c66506572736f6e616c4163636f756e7452656769737472793a206f776e657220646f65736e27742065786973744163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420726567697374727920746f20307830496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a65724163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f2030783047617465776179526563697069656e743a20696e76616c6964206d73672e646174614163636f756e74436f6e74726f6c6c65723a206163636f756e7420616c7265616479207570677261646564506572736f6e616c4163636f756e7452656769737472793a2063616e6e6f742072656d6f76652073656c66477561726465643a2074782e6f726967696e206973206e6f742074686520677561726469616e506572736f6e616c4163636f756e7452656769737472793a204552433230546f6b656e207472616e736665722072657665727465644163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f20636f6e74726f6c6c6572506572736f6e616c4163636f756e7452656769737472793a206f776e657220616c726561647920657869737473506572736f6e616c4163636f756e7452656769737472793a2063616e6e6f742061646420307830206f776e6572a164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101425760003560e01c806390482d72116100b8578063d0f710d61161007c578063d0f710d61461075e578063da9fc1ae146107f7578063db63f5821461083b578063e1e382ce1461089f578063e5c7278f14610958578063f4876c7414610a1b57610142565b806390482d7214610545578063a526d83b146105fe578063bb890d3f14610642578063cade6a5d146106bc578063d089e11a1461072a57610142565b80631a8414031161010a5780631a841403146103515780633164b5e1146103bf57806334d323a414610419578063392e53cd1461049d57806343013c24146104bd578063714041561461050157610142565b80630900f010146101475780630c68ba211461018b57806311464fbe146101e5578063116191b614610219578063124e9eb31461024d575b600080fd5b6101896004803603602081101561015d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a7f565b005b6101cd600480360360208110156101a157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b2e565b60405180821515815260200191505060405180910390f35b6101ed610b83565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610221610ba9565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103396004803603606081101561026357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156102a057600080fd5b8201836020820111156102b257600080fd5b803590602001918460018302840111640100000000831117156102d457600080fd5b9091929391929390803590602001906401000000008111156102f557600080fd5b82018360208201111561030757600080fd5b8035906020019184600183028401116401000000008311171561032957600080fd5b9091929391929390505050610bcf565b60405180821515815260200191505060405180910390f35b6103bd6004803603606081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c88565b005b610401600480360360208110156103d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ef3565b60405180821515815260200191505060405180910390f35b6104856004803603606081101561042f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f4c565b60405180821515815260200191505060405180910390f35b6104a561103a565b60405180821515815260200191505060405180910390f35b6104ff600480360360208110156104d357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611092565b005b6105436004803603602081101561051757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110aa565b005b6105fc6004803603606081101561055b57600080fd5b810190808035906020019064010000000081111561057857600080fd5b82018360208201111561058a57600080fd5b803590602001918460208302840111640100000000831117156105ac57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611370565b005b6106406004803603602081101561061457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611508565b005b6106a46004803603604081101561065857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115b5565b60405180821515815260200191505060405180910390f35b6106fe600480360360208110156106d257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115c9565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107326115db565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107df6004803603604081101561077457600080fd5b81019080803590602001909291908035906020019064010000000081111561079b57600080fd5b8201836020820111156107ad57600080fd5b803590602001918460018302840111640100000000831117156107cf57600080fd5b9091929391929390505050611601565b60405180821515815260200191505060405180910390f35b6108396004803603602081101561080d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061165a565b005b61089d6004803603604081101561085157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611670565b005b610940600480360360608110156108b557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156108fc57600080fd5b82018360208201111561090e57600080fd5b8035906020019184600183028401116401000000008311171561093057600080fd5b9091929391929390505050611905565b60405180821515815260200191505060405180910390f35b610a196004803603608081101561096e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156109d557600080fd5b8201836020820111156109e757600080fd5b80359060200191846001830284011164010000000083111715610a0957600080fd5b9091929391929390505050611971565b005b610a7d60048036036040811015610a3157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119de565b005b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610b20576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806143e46026913960400191505060405180910390fd5b610b2b816001611d0d565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000610c7d86610c7885858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c6a89898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611e4e565b611fb790919063ffffffff16565b612087565b905095945050505050565b610c918361223e565b50610c9b83612685565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d2f57610d29833283600067ffffffffffffffff81118015610cee57600080fd5b506040519080825280601f01601f191660200182016040528015610d215781602001600182028036833780820191505090505b506000612786565b50610e5d565b6060610dd38484600063a9059cbb60e01b3287604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506000612786565b9050600081511115610e5b57808060200190516020811015610df457600080fd5b8101908080519060200190929190505050610e5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018061440a6035913960400191505060405180910390fd5b5b505b7feb5511fbef89123439f12682f0e9d0fc9696913b26eee55434c77d62c30aa7ca83328484604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200194505050505060405180910390a1505050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff169050919050565b60008060009050610f5d8585612087565b15610f6b576001905061102f565b61102c83600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050612c5490919063ffffffff16565b90505b809150509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b61109b8161223e565b506110a7816001612ca3565b50565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661114b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806143e46026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614156111ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f477561726465643a2063616e6e6f742072656d6f76652073656c66000000000081525060200191505060405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166112ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f477561726465643a20677561726469616e20646f65736e27742065786973740081525060200191505060405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611416576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180614318602f913960400191505060405180910390fd5b6000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506114a2848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050612f05565b6114ac3083612f5d565b6114b581612f77565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150505050565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166115a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806143e46026913960400191505060405180910390fd5b6115b281612fbb565b50565b60006115c18383612087565b905092915050565b60006115d4826131e2565b9050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006116518484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050613238565b90509392505050565b6116638161223e565b5061166d81612685565b50565b600061167b8361223e565b90508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611702576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806143b9602b913960400191505060405180910390fd5b6117b9600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506132a5565b61180e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806142b7602c913960400191505060405180910390fd5b43600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f1ce3cbbc43ee231e5b950332f2b0b9dd7d349291a3ee411ce5c5c7ed745661bb8383604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1505050565b60006119678561196285858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505087611fb790919063ffffffff16565b612087565b9050949350505050565b61197a8561223e565b5061198485612685565b6119d685858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506001612786565b505050505050565b6119e78261223e565b50600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611a6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180614498602d913960400191505060405180910390fd5b611b25600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506132a5565b15611b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d81526020018061446b602d913960400191505060405180910390fd5b6001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055506000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644688282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611d93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018061421e603b913960400191505060405180910390fd5b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015611e4a577f70d9f5a076620216a6050e493f3ce69749de0b68fa4b839ba2518660ba8b9cf0600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b5050565b6000611e5a82516132b8565b826040516020018082805190602001908083835b60208310611e915780518252602082019150602081019050602083039250611e6e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405260405160200180807f19457468657265756d205369676e6564204d6573736167653a0a000000000000815250601a0183805190602001908083835b60208310611f235780518252602082019150602081019050602083039250611f00565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310611f745780518252602082019150602081019050602083039250611f51565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052805190602001209050919050565b6000806000905060418351141561207d5760008060006020860151925060408601519150606086015160001a9050601b8160ff161015611ff857601b810190505b601b8160ff16148061200d5750601c8160ff16145b156120795760018782858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561206c573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b600080600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16156121ac576000600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154149050612234565b6000801b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154141561223357612202836131e2565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161490505b5b8091505092915050565b6000806122496133ff565b9050600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16156123c0576000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154146123bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806142596038913960400191505060405180910390fd5b61267c565b6000801b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541461245d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806142596038913960400191505060405180910390fd5b600081604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040528051906020012090506124aa81613410565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461252d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806142596038913960400191505060405180910390fd5b80600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055506001600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055507f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644688483604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1505b80915050919050565b600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1661278357612726600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546001613606565b506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055505b50565b6060600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561280e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806143476025913960400191505060405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061443f602c913960400191505060405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612918576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806142916026913960400191505060405180910390fd5b60608673ffffffffffffffffffffffffffffffffffffffff16633f579f428787876040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156129aa57808201518184015260208101905061298f565b50505050905090810190601f1680156129d75780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156129f857600080fd5b505af1158015612a0c573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015612a3657600080fd5b8101908080516040519392919084640100000000821115612a5657600080fd5b83820191506020820185811115612a6c57600080fd5b8251866001820283011164010000000082111715612a8957600080fd5b8083526020830192505050908051906020019080838360005b83811015612abd578082015181840152602081019050612aa2565b50505050905090810190601f168015612aea5780820380516001836020036101000a031916815260200191505b5060405250505090508215612c47577f99eeae1fb8801e2e878e060ec5e5b3557b3c4f8106e35d88cb573f293dae4e248787878785604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015612ba1578082015181840152602081019050612b86565b50505050905090810190601f168015612bce5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015612c07578082015181840152602081019050612bec565b50505050905090810190601f168015612c345780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a15b8091505095945050505050565b60008060009050836000015115612c9957600084602001511415612c7b5760019050612c98565b6000831415612c8d5760019050612c97565b8284602001511190505b5b5b8091505092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d2257600080fd5b505afa158015612d36573d6000803e3d6000fd5b505050506040513d6020811015612d4c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161415612dca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018061438e602b913960400191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663d784d426600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015612e5557600080fd5b505af1158015612e69573d6000803e3d6000fd5b505050508015612f01577feec27cdb8bd6f55c2c537deb52ab094a2437e85ef5197e6f064f90bff3ff563f82600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b5050565b600081511415612f1d57612f1832612fbb565b612f5a565b60008151905060005b81811015612f5757612f4a838281518110612f3d57fe5b6020026020010151612fbb565b8080600101915050612f26565b50505b50565b612f6882600061375a565b612f73816000611d0d565b5050565b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561305e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a2063616e6e6f74206164642030783020677561726469616e81525060200191505060405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561311d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a20677561726469616e20616c72656164792065786973747381525060200191505060405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b60008082604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b815260140191505060405160208183030381529060405280519060200120905061323081613410565b915050919050565b60008061324e8385611fb790919063ffffffff16565b90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b60006132b18243612c54565b9050919050565b60606000821415613300576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506133fa565b600082905060005b6000821461332a578080600101915050600a828161332257fe5b049150613308565b60608167ffffffffffffffff8111801561334357600080fd5b506040519080825280601f01601f1916602001820160405280156133765781602001600182028036833780820191505090505b50905060006001830390508593505b600084146133f257600a848161339757fe5b0660300160f81b828280600190039350815181106133b157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84816133ea57fe5b049350613385565b819450505050505b919050565b600061340b601461389b565b905090565b600060606040518060200161342490613a8c565b6020820181038252601f19601f82011660405250600060a01b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060a01b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516020018086805190602001908083835b602083106134be578051825260208201915060208101905060208303925061349b565b6001836020036101000a0380198251168184511680821785525050505050509050018573ffffffffffffffffffffffffffffffffffffffff19168152600c018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018373ffffffffffffffffffffffffffffffffffffffff19168152600c018273ffffffffffffffffffffffffffffffffffffffff1660601b8152601401955050505050506040516020818303038152906040529050600060ff60f81b3085848051906020012060405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018381526020018281526020019450505050506040516020818303038152906040528051906020012090508060001c92505050919050565b60008083600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161365c90613a8c565b808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff168152602001925050508190604051809103906000f59050801580156136b9573d6000803e3d6000fd5b5090508215613750577f2682a218602b9036c9869f006c5405ee4a1a65267653eb7e286123e5e1afde4c81600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156137e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260358152602001806142e36035913960400191505060405180910390fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015613897577f02e3c47057b8dc27a0929d3c394c314c73aa002d46939c31c9f71d1e77e86c10600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b5050565b600080600090506138aa613930565b1561392357600083600036905003905061391b600036839060148501926138d393929190613a99565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506139f3565b915050613927565b3390505b80915050919050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156139ec57602c600036905010156139e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061436c6022913960400191505060405180910390fd5b600190505b8091505090565b6000806014835114613a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f42797465734c69623a20696e76616c69642064617461206c656e67746800000081525060200191505060405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b61075180613acd83390190565b60008085851115613aa957600080fd5b83861115613ab657600080fd5b600185028301915084860390509450949250505056fe608060405234801561001057600080fd5b506040516107513803806107518339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050610630806101216000396000f3fe60806040526004361061004e5760003560e01c80633f579f42146100be5780635c60da1b146101e75780637b10399914610228578063d784d42614610269578063f77c4791146102ba57610055565b3661005557005b34801561006157600080fd5b50600080369050146100bc576000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050368060008037600080826000855af43d806000803e81600081146100b757816000f35b816000fd5b005b3480156100ca57600080fd5b5061016c600480360360608110156100e157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561012857600080fd5b82018360208201111561013a57600080fd5b8035906020019184600183028401116401000000008311171561015c57600080fd5b90919293919293905050506102fb565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101ac578082015181840152602081019050610191565b50505050905090810190601f1680156101d95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101f357600080fd5b506101fc61049f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561023457600080fd5b5061023d6104c5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027557600080fd5b506102b86004803603602081101561028c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104eb565b005b3480156102c657600080fd5b506102cf6105d3565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806105f8602c913960400191505060405180910390fd5b606060008673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d8060008114610411576040519150601f19603f3d011682016040523d82523d6000602084013e610416565b606091505b50809350819250505080610492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b8192505050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461058f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806105f8602c913960400191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a4163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420496d706c656d656e746174696f6e20746f20307830506572736f6e616c4163636f756e7452656769737472793a2073656e646572206973206e6f7420746865206163636f756e74206f776e65724163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f2073656c66506572736f6e616c4163636f756e7452656769737472793a206f776e657220646f65736e27742065786973744163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420726567697374727920746f20307830496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a65724163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f2030783047617465776179526563697069656e743a20696e76616c6964206d73672e646174614163636f756e74436f6e74726f6c6c65723a206163636f756e7420616c7265616479207570677261646564506572736f6e616c4163636f756e7452656769737472793a2063616e6e6f742072656d6f76652073656c66477561726465643a2074782e6f726967696e206973206e6f742074686520677561726469616e506572736f6e616c4163636f756e7452656769737472793a204552433230546f6b656e207472616e736665722072657665727465644163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f20636f6e74726f6c6c6572506572736f6e616c4163636f756e7452656769737472793a206f776e657220616c726561647920657869737473506572736f6e616c4163636f756e7452656769737472793a2063616e6e6f742061646420307830206f776e6572a164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "events": { + "AccountCallRefunded(address,address,address,uint256)": { + "details": "Emitted when the call is refunded", + "params": { + "account": "account address", + "beneficiary": "beneficiary address", + "token": "token address", + "value": "value" + } + }, + "AccountOwnerAdded(address,address)": { + "details": "Emitted when the new owner is added", + "params": { + "account": "account address", + "owner": "owner address" + } + }, + "AccountOwnerRemoved(address,address)": { + "details": "Emitted when the existing owner is removed", + "params": { + "account": "account address", + "owner": "owner address" + } + } + }, + "kind": "dev", + "methods": { + "addAccountOwner(address,address)": { + "params": { + "account": "account address", + "owner": "owner address" + } + }, + "addGuardian(address)": { + "params": { + "guardian": "guardian address" + } + }, + "computeAccountAddress(address)": { + "params": { + "saltOwner": "salt owner address" + }, + "returns": { + "_0": "account address" + } + }, + "constructor": { + "details": "Public constructor" + }, + "deployAccount(address)": { + "params": { + "account": "account address" + } + }, + "executeAccountTransaction(address,address,uint256,bytes)": { + "details": "Deploys an account if not deployed yet", + "params": { + "account": "account address", + "data": "data", + "to": "to address", + "value": "value" + } + }, + "initialize(address[],address,address)": { + "params": { + "accountImplementation_": "account implementation address", + "gateway_": "`Gateway` contract address", + "guardians_": "array of guardians addresses" + } + }, + "isAccountDeployed(address)": { + "params": { + "account": "account address" + }, + "returns": { + "_0": "true when account is deployed" + } + }, + "isGuardian(address)": { + "params": { + "guardian": "guardian address" + }, + "returns": { + "_0": "true when guardian exists" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + }, + "isValidAccountSignature(address,bytes,bytes)": { + "params": { + "account": "account address", + "message": "message", + "signature": "signature" + }, + "returns": { + "_0": "magic hash if valid" + } + }, + "isValidAccountSignature(address,bytes32,bytes)": { + "params": { + "account": "account address", + "messageHash": "message hash", + "signature": "signature" + }, + "returns": { + "_0": "magic hash if valid" + } + }, + "refundAccountCall(address,address,uint256)": { + "details": "Deploys an account if not deployed yet", + "params": { + "account": "account address", + "token": "token address", + "value": "value" + } + }, + "removeAccountOwner(address,address)": { + "params": { + "account": "account address", + "owner": "owner address" + } + }, + "removeGuardian(address)": { + "params": { + "guardian": "guardian address" + } + }, + "upgrade(address)": { + "params": { + "accountImplementation_": "account implementation address" + } + }, + "upgradeAccount(address)": { + "params": { + "account": "account address" + } + }, + "verifyAccountOwner(address,address)": { + "params": { + "account": "account address", + "owner": "owner address" + }, + "returns": { + "_0": "true on correct account owner" + } + }, + "verifyAccountOwnerAtBlock(address,address,uint256)": { + "params": { + "account": "account address", + "blockNumber": "block number to verify", + "owner": "owner address" + }, + "returns": { + "_0": "true on correct account owner" + } + }, + "verifyGuardianSignature(bytes32,bytes)": { + "params": { + "messageHash": "message hash", + "signature": "signature" + }, + "returns": { + "_0": "true on correct guardian signature" + } + } + }, + "title": "Personal account registry", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addAccountOwner(address,address)": { + "notice": "Adds a new account owner" + }, + "addGuardian(address)": { + "notice": "Adds a new guardian" + }, + "computeAccountAddress(address)": { + "notice": "Computes account address" + }, + "deployAccount(address)": { + "notice": "Deploys account" + }, + "executeAccountTransaction(address,address,uint256,bytes)": { + "notice": "Executes account transaction" + }, + "initialize(address[],address,address)": { + "notice": "Initializes `PersonalAccountRegistry` contract" + }, + "isAccountDeployed(address)": { + "notice": "Checks if account is deployed" + }, + "isGuardian(address)": { + "notice": "Check if guardian exists" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + }, + "isValidAccountSignature(address,bytes,bytes)": { + "notice": "Verifies account signature" + }, + "isValidAccountSignature(address,bytes32,bytes)": { + "notice": "Verifies account signature" + }, + "refundAccountCall(address,address,uint256)": { + "notice": "Refunds account call" + }, + "removeAccountOwner(address,address)": { + "notice": "Removes the existing account owner" + }, + "removeGuardian(address)": { + "notice": "Removes the existing guardian" + }, + "upgrade(address)": { + "notice": "Upgrades `PersonalAccountRegistry` contract" + }, + "upgradeAccount(address)": { + "notice": "Upgrades account" + }, + "verifyAccountOwner(address,address)": { + "notice": "Verifies the owner of the account at the current block" + }, + "verifyAccountOwnerAtBlock(address,address,uint256)": { + "notice": "Verifies the owner of the account at a specific block" + }, + "verifyGuardianSignature(bytes32,bytes)": { + "notice": "Verifies guardian signature" + } + }, + "notice": "A registry for personal (controlled by owners) accounts", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 40, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "guardians", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 390, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "accountRegistry", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 392, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "accountImplementation", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 1871, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "initializer", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 5197, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "gateway", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 6799, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "accounts", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_struct(Account)6795_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "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_struct(Account)6795_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct PersonalAccountRegistry.Account)", + "numberOfBytes": "32", + "value": "t_struct(Account)6795_storage" + }, + "t_mapping(t_address,t_struct(BlockRelated)1382_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct BlockLib.BlockRelated)", + "numberOfBytes": "32", + "value": "t_struct(BlockRelated)1382_storage" + }, + "t_struct(Account)6795_storage": { + "encoding": "inplace", + "label": "struct PersonalAccountRegistry.Account", + "members": [ + { + "astId": 6788, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "deployed", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6790, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "salt", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 6794, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "owners", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(BlockRelated)1382_storage)" + } + ], + "numberOfBytes": "96" + }, + "t_struct(BlockRelated)1382_storage": { + "encoding": "inplace", + "label": "struct BlockLib.BlockRelated", + "members": [ + { + "astId": 1379, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "added", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1381, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "removedAtBlockNumber", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuse/WrappedWeiToken.json b/deployments/fuse/WrappedWeiToken.json new file mode 100644 index 00000000..495af00e --- /dev/null +++ b/deployments/fuse/WrappedWeiToken.json @@ -0,0 +1,670 @@ +{ + "address": "0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "consumer", + "type": "address" + } + ], + "name": "ConsumerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "consumer", + "type": "address" + } + ], + "name": "ConsumerRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "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" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "depositTo", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "gateway", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "consumers_", + "type": "address[]" + }, + { + "internalType": "address", + "name": "gateway_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "consumer", + "type": "address" + } + ], + "name": "isConsumer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "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": "startConsuming", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stopConsuming", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "withdrawAllTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x72d998bc58dec925507fda0b52185fdc6af01094e12f67758f9e2d9231f34a05", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 2, + "gasUsed": "1931765", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x126ca88f6f03a18f9d1e8b2df1786f4c3b90029c3070339a56b968e9fd339ba3", + "transactionHash": "0x72d998bc58dec925507fda0b52185fdc6af01094e12f67758f9e2d9231f34a05", + "logs": [], + "blockNumber": 17842194, + "cumulativeGasUsed": "2293789", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"ConsumerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"ConsumerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"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\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"depositTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers_\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"gateway_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"isConsumer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"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\":\"startConsuming\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stopConsuming\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawAllTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"details\":\"After the transfer to consumer's account is done, the token will be automatically burned and withdrawn. Use `startConsuming` to become a consumer.\",\"events\":{\"ConsumerAdded(address)\":{\"details\":\"Emitted when the new consumer is added\",\"params\":{\"consumer\":\"consumer address\"}},\"ConsumerRemoved(address)\":{\"details\":\"Emitted when the existing consumer is removed\",\"params\":{\"consumer\":\"consumer address\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Public constructor\"},\"depositTo(address)\":{\"params\":{\"to\":\"to address\"}},\"initialize(address[],address)\":{\"params\":{\"consumers_\":\"array of consumers addresses\",\"gateway_\":\"`Gateway` contract address\"}},\"isConsumer(address)\":{\"params\":{\"consumer\":\"consumer address\"},\"returns\":{\"_0\":\"true if consumer exists\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}},\"startConsuming()\":{\"details\":\"Add caller as a consumer\"},\"stopConsuming()\":{\"details\":\"Remove caller from consumers\"},\"withdraw(uint256)\":{\"params\":{\"value\":\"value to withdraw\"}},\"withdrawAllTo(address)\":{\"params\":{\"to\":\"to address\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"to\":\"to address\",\"value\":\"value to withdraw\"}}},\"title\":\"Wrapped wei token\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"depositTo(address)\":{\"notice\":\"Deposits `msg.value` to address\"},\"initialize(address[],address)\":{\"notice\":\"Initializes `WrappedWeiToken` contract\"},\"isConsumer(address)\":{\"notice\":\"Checks if consumer exists\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"},\"startConsuming()\":{\"notice\":\"Starts consuming\"},\"stopConsuming()\":{\"notice\":\"Stops consuming\"},\"withdraw(uint256)\":{\"notice\":\"Withdraws\"},\"withdrawAll()\":{\"notice\":\"Withdraws all\"},\"withdrawAllTo(address)\":{\"notice\":\"Withdraws all to address\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraws to address\"}},\"notice\":\"One to one wei consumable ERC20 token\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/tokens/WrappedWeiToken.sol\":\"WrappedWeiToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/libs/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Bytes library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BytesLib {\\n /**\\n * @notice Converts bytes to address\\n * @param data data\\n * @return address\\n */\\n function toAddress(\\n bytes memory data\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result;\\n\\n require(\\n data.length == 20,\\n \\\"BytesLib: invalid data length\\\"\\n );\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := div(mload(add(data, 0x20)), 0x1000000000000000000000000)\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x64c84964ea91bfb1f2d859eea6c57fe5b4a6f269951a4adf5f58d306c54c7f76\",\"license\":\"MIT\"},\"src/common/libs/SafeMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Safe math library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/math/SafeMath.sol\\n */\\nlibrary SafeMathLib {\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n\\n require(c >= a, \\\"SafeMathLib: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMathLib: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n\\n return a - b;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n\\n require(c / a == b, \\\"SafeMathLib: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMathLib: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n\\n return a / b;\\n }\\n\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMathLib: modulo by zero\\\");\\n }\\n\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x6089f354ca754d9c5dd9e800ee5ed86717dbf8f9af470604e0be691ac57c0107\",\"license\":\"MIT\"},\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/common/token/ERC20Token.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/SafeMathLib.sol\\\";\\n\\n\\n/**\\n * @title ERC20 token\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/token/ERC20/ERC20.sol\\n */\\ncontract ERC20Token {\\n using SafeMathLib for uint256;\\n\\n string public name;\\n string public symbol;\\n uint8 public decimals;\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) internal balances;\\n mapping(address => mapping(address => uint256)) internal allowances;\\n\\n // events\\n\\n event Transfer(\\n address indexed from,\\n address indexed to,\\n uint256 value\\n );\\n\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n function transfer(\\n address to,\\n uint256 value\\n )\\n external\\n returns (bool)\\n {\\n _transfer(_getSender(), to, value);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n address sender = _getSender();\\n\\n _transfer(from, to, value);\\n _approve(from, sender, allowances[from][sender].sub(value));\\n\\n return true;\\n }\\n\\n function approve(\\n address spender,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n _approve(_getSender(), spender, value);\\n\\n return true;\\n }\\n\\n // external functions (views)\\n\\n function balanceOf(\\n address owner\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return balances[owner];\\n }\\n\\n function allowance(\\n address owner,\\n address spender\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[owner][spender];\\n }\\n\\n // internal functions\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n from != address(0),\\n \\\"ERC20Token: cannot transfer from 0x0 address\\\"\\n );\\n require(\\n to != address(0),\\n \\\"ERC20Token: cannot transfer to 0x0 address\\\"\\n );\\n\\n balances[from] = balances[from].sub(value);\\n balances[to] = balances[to].add(value);\\n\\n emit Transfer(from, to, value);\\n }\\n\\n function _approve(\\n address owner,\\n address spender,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot approve from 0x0 address\\\"\\n );\\n require(\\n spender != address(0),\\n \\\"ERC20Token: cannot approve to 0x0 address\\\"\\n );\\n\\n allowances[owner][spender] = value;\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function _mint(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot mint to 0x0 address\\\"\\n );\\n require(\\n value > 0,\\n \\\"ERC20Token: cannot mint 0 value\\\"\\n );\\n\\n balances[owner] = balances[owner].add(value);\\n totalSupply = totalSupply.add(value);\\n\\n emit Transfer(address(0), owner, value);\\n }\\n\\n function _burn(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot burn from 0x0 address\\\"\\n );\\n\\n balances[owner] = balances[owner].sub(\\n value,\\n \\\"ERC20Token: burn value exceeds balance\\\"\\n );\\n\\n totalSupply = totalSupply.sub(value);\\n\\n emit Transfer(owner, address(0), value);\\n }\\n\\n // internal functions (views)\\n\\n function _getSender()\\n virtual\\n internal\\n view\\n returns (address)\\n {\\n return msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x6f2b0bd08da549c6c1f5ceee85766832d587dde62c56bebc3a14bd9ea407e03d\",\"license\":\"MIT\"},\"src/gateway/GatewayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BytesLib.sol\\\";\\n\\n\\n/**\\n * @title Gateway recipient\\n *\\n * @notice Gateway target contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract GatewayRecipient {\\n using BytesLib for bytes;\\n\\n address public gateway;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `GatewayRecipient` contract\\n * @param gateway_ `Gateway` contract address\\n */\\n function _initializeGatewayRecipient(\\n address gateway_\\n )\\n internal\\n {\\n gateway = gateway_;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Gets gateway context account\\n * @return context account address\\n */\\n function _getContextAccount()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(40);\\n }\\n\\n /**\\n * @notice Gets gateway context sender\\n * @return context sender address\\n */\\n function _getContextSender()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(20);\\n }\\n\\n /**\\n * @notice Gets gateway context data\\n * @return context data\\n */\\n function _getContextData()\\n internal\\n view\\n returns (bytes calldata)\\n {\\n bytes calldata result;\\n\\n if (_isGatewaySender()) {\\n result = msg.data[:msg.data.length - 40];\\n } else {\\n result = msg.data;\\n }\\n\\n return result;\\n }\\n\\n // private functions (views)\\n\\n function _getContextAddress(\\n uint256 offset\\n )\\n private\\n view\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (_isGatewaySender()) {\\n uint from = msg.data.length - offset;\\n result = bytes(msg.data[from:from + 20]).toAddress();\\n } else {\\n result = msg.sender;\\n }\\n\\n return result;\\n }\\n\\n function _isGatewaySender()\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (msg.sender == gateway) {\\n require(\\n msg.data.length >= 44,\\n \\\"GatewayRecipient: invalid msg.data\\\"\\n );\\n\\n result = true;\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe3fd29479d748d67360c61a9cbaafc66eaca25f476e59a45e842472bcf5233fc\",\"license\":\"MIT\"},\"src/tokens/WrappedWeiToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"../common/token/ERC20Token.sol\\\";\\nimport \\\"../gateway/GatewayRecipient.sol\\\";\\n\\n\\n/**\\n * @title Wrapped wei token\\n *\\n * @notice One to one wei consumable ERC20 token\\n *\\n * @dev After the transfer to consumer's account is done, the token will be automatically burned and withdrawn.\\n *\\n * Use `startConsuming` to become a consumer.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract WrappedWeiToken is Initializable, ERC20Token, GatewayRecipient {\\n mapping(address => bool) private consumers;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the new consumer is added\\n * @param consumer consumer address\\n */\\n event ConsumerAdded(\\n address consumer\\n );\\n\\n /**\\n * @dev Emitted when the existing consumer is removed\\n * @param consumer consumer address\\n */\\n event ConsumerRemoved(\\n address consumer\\n );\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor()\\n public\\n Initializable()\\n {\\n name = \\\"Wrapped Wei\\\";\\n symbol = \\\"WWEI\\\";\\n }\\n\\n /**\\n * @notice Receive fallback\\n */\\n receive()\\n external\\n payable\\n {\\n _mint(_getSender(), msg.value);\\n }\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `WrappedWeiToken` contract\\n * @param consumers_ array of consumers addresses\\n * @param gateway_ `Gateway` contract address\\n */\\n function initialize(\\n address[] calldata consumers_,\\n address gateway_\\n )\\n external\\n onlyInitializer\\n {\\n if (consumers_.length != 0) {\\n uint consumersLen = consumers_.length;\\n for (uint i = 0; i < consumersLen; i++) {\\n _addConsumer(consumers_[i]);\\n }\\n }\\n\\n _initializeGatewayRecipient(gateway_);\\n }\\n\\n /**\\n * @notice Starts consuming\\n * @dev Add caller as a consumer\\n */\\n function startConsuming()\\n external\\n {\\n _addConsumer(_getSender());\\n }\\n\\n /**\\n * @notice Stops consuming\\n * @dev Remove caller from consumers\\n */\\n function stopConsuming()\\n external\\n {\\n address consumer = _getSender();\\n\\n require(\\n consumers[consumer],\\n \\\"WrappedWeiToken: consumer doesn't exist\\\"\\n );\\n\\n consumers[consumer] = false;\\n\\n emit ConsumerRemoved(consumer);\\n }\\n\\n /**\\n * @notice Deposits `msg.value` to address\\n * @param to to address\\n */\\n function depositTo(\\n address to\\n )\\n external\\n payable\\n {\\n _mint(to, msg.value);\\n }\\n\\n /**\\n * @notice Withdraws\\n * @param value value to withdraw\\n */\\n function withdraw(\\n uint256 value\\n )\\n external\\n {\\n _withdraw(_getSender(), _getSender(), value);\\n }\\n\\n /**\\n * @notice Withdraws to address\\n * @param to to address\\n * @param value value to withdraw\\n */\\n function withdrawTo(\\n address to,\\n uint256 value\\n )\\n external\\n {\\n _withdraw(_getSender(), to, value);\\n }\\n\\n /**\\n * @notice Withdraws all\\n */\\n function withdrawAll()\\n external\\n {\\n address sender = _getSender();\\n\\n _withdraw(sender, sender, balances[sender]);\\n }\\n\\n /**\\n * @notice Withdraws all to address\\n * @param to to address\\n */\\n function withdrawAllTo(\\n address to\\n )\\n external\\n {\\n address sender = _getSender();\\n\\n _withdraw(sender, to, balances[sender]);\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Checks if consumer exists\\n * @param consumer consumer address\\n * @return true if consumer exists\\n */\\n function isConsumer(\\n address consumer\\n )\\n external\\n view\\n returns (bool)\\n {\\n return consumers[consumer];\\n }\\n\\n // internal functions\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 value\\n )\\n override\\n internal\\n {\\n if (consumers[to]) {\\n _withdraw(from, to, value);\\n } else {\\n super._transfer(from, to, value);\\n }\\n }\\n\\n // internal functions (views)\\n\\n function _getSender()\\n override\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAccount();\\n }\\n\\n // private functions\\n\\n function _addConsumer(\\n address consumer\\n )\\n private\\n {\\n require(\\n !consumers[consumer],\\n \\\"WrappedWeiToken: consumer already exists\\\"\\n );\\n\\n consumers[consumer] = true;\\n\\n emit ConsumerAdded(consumer);\\n }\\n\\n function _withdraw(\\n address from,\\n address to,\\n uint256 value\\n )\\n private\\n {\\n _burn(from, value);\\n\\n require(\\n // solhint-disable-next-line check-send-result\\n payable(to).send(value),\\n \\\"WrappedWeiToken: transaction reverted\\\"\\n );\\n }\\n}\\n\",\"keccak256\":\"0xa4e1ef99b7ce5b92cedb73387e5954824815e13ac23acef38d7fcf234d8fc017\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040518060400160405280600b81526020017f5772617070656420576569000000000000000000000000000000000000000000815250600190805190602001906200009f929190620000f4565b506040518060400160405280600481526020017f575745490000000000000000000000000000000000000000000000000000000081525060029080519060200190620000ed929190620000f4565b506200019a565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200013757805160ff191683800117855562000168565b8280016001018555821562000168579182015b82811115620001675782518255916020019190600101906200014a565b5b5090506200017791906200017b565b5090565b5b80821115620001965760008160009055506001016200017c565b5090565b6120b080620001aa6000396000f3fe6080604052600436106101235760003560e01c806356a3b64b116100a0578063a9059cbb11610064578063a9059cbb1461065f578063b760faf9146106d0578063ca9add8f14610714578063dd62ed3e14610765578063f55647e0146107ea5761013b565b806356a3b64b146104d557806370a08231146104ec578063834ff73914610551578063853828b6146105b857806395d89b41146105cf5761013b565b806323b872dd116100e757806323b872dd146103085780632e1a7d4d14610399578063313ce567146103d4578063392e53cd14610402578063462d0b2e1461042f5761013b565b806306fdde0314610140578063095ea7b3146101d0578063116191b61461024157806318160ddd14610282578063205c2878146102ad5761013b565b3661013b57610139610133610801565b34610810565b005b600080fd5b34801561014c57600080fd5b50610155610a26565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561019557808201518184015260208101905061017a565b50505050905090810190601f1680156101c25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101dc57600080fd5b50610229600480360360408110156101f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ac4565b60405180821515815260200191505060405180910390f35b34801561024d57600080fd5b50610256610ae2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028e57600080fd5b50610297610b08565b6040518082815260200191505060405180910390f35b3480156102b957600080fd5b50610306600480360360408110156102d057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b0e565b005b34801561031457600080fd5b506103816004803603606081101561032b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b24565b60405180821515815260200191505060405180910390f35b3480156103a557600080fd5b506103d2600480360360208110156103bc57600080fd5b8101908080359060200190929190505050610be1565b005b3480156103e057600080fd5b506103e9610bfd565b604051808260ff16815260200191505060405180910390f35b34801561040e57600080fd5b50610417610c10565b60405180821515815260200191505060405180910390f35b34801561043b57600080fd5b506104d36004803603604081101561045257600080fd5b810190808035906020019064010000000081111561046f57600080fd5b82018360208201111561048157600080fd5b803590602001918460208302840111640100000000831117156104a357600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c66565b005b3480156104e157600080fd5b506104ea610e05565b005b3480156104f857600080fd5b5061053b6004803603602081101561050f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e17565b6040518082815260200191505060405180910390f35b34801561055d57600080fd5b506105a06004803603602081101561057457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e60565b60405180821515815260200191505060405180910390f35b3480156105c457600080fd5b506105cd610eb6565b005b3480156105db57600080fd5b506105e4610f0f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610624578082015181840152602081019050610609565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561066b57600080fd5b506106b86004803603604081101561068257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fad565b60405180821515815260200191505060405180910390f35b610712600480360360208110156106e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fcb565b005b34801561072057600080fd5b506107636004803603602081101561073757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fd8565b005b34801561077157600080fd5b506107d46004803603604081101561078857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611032565b6040518082815260200191505060405180910390f35b3480156107f657600080fd5b506107ff6110b9565b005b600061080b61120f565b905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610896576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611fb66026913960400191505060405180910390fd5b6000811161090c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4552433230546f6b656e3a2063616e6e6f74206d696e7420302076616c75650081525060200191505060405180910390fd5b61095e81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461122090919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506109b68160045461122090919063ffffffff16565b6004819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610abc5780601f10610a9157610100808354040283529160200191610abc565b820191906000526020600020905b815481529060010190602001808311610a9f57829003601f168201915b505050505081565b6000610ad8610ad1610801565b84846112a8565b6001905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b610b20610b19610801565b838361149f565b5050565b600080610b2f610801565b9050610b3c858585611538565b610bd58582610bd086600660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115ab90919063ffffffff16565b6112a8565b60019150509392505050565b610bfa610bec610801565b610bf4610801565b8361149f565b50565b600360009054906101000a900460ff1681565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610d0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180611ec8602f913960400191505060405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008383905014610daa57600083839050905060005b81811015610da757610d9a858583818110610d7857fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff166115d8565b8080600101915050610d61565b50505b610db381611723565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1505050565b610e15610e10610801565b6115d8565b565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000610ec0610801565b9050610f0c8182600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461149f565b50565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610fa55780601f10610f7a57610100808354040283529160200191610fa5565b820191906000526020600020905b815481529060010190602001808311610f8857829003601f168201915b505050505081565b6000610fc1610fba610801565b8484611538565b6001905092915050565b610fd58134610810565b50565b6000610fe2610801565b905061102e8183600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461149f565b5050565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006110c3610801565b9050600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611167576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806120066027913960400191505060405180910390fd5b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fe3f5ed5f263f1f01764a96edfc7d025f511ec5f7d180e8816908b78bcf74f09881604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600061121b6028611767565b905090565b60008082840190508381101561129e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174684c69623a206164646974696f6e206f766572666c6f77000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561132e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180611f8b602b913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113b4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180611f416029913960400191505060405180910390fd5b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6114a983826117fc565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050611533576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061202d6025913960400191505060405180910390fd5b505050565b600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561159a5761159583838361149f565b6115a6565b6115a58383836119b6565b5b505050565b60006115d08383604051806060016040528060218152602001611f6a60219139611c56565b905092915050565b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561167b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611ef76028913960400191505060405180910390fd5b6001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f28b26e7a3d20aedbc5f8f2ebf7da671c0491723a2b78f47a097b0e46dee0714281604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009050611776611d10565b156117ef5760008360003690500390506117e76000368390601485019261179f93929190611e6c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611dd3565b9150506117f3565b3390505b80915050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611882576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611ea06028913960400191505060405180910390fd5b6118ee8160405180606001604052806026815260200161205260269139600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c569092919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611946816004546115ab90919063ffffffff16565b600481905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612078602c913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611ac2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611fdc602a913960400191505060405180910390fd5b611b1481600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115ab90919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ba981600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461122090919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611d03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611cc8578082015181840152602081019050611cad565b50505050905090810190601f168015611cf55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082840390509392505050565b600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415611dcc57602c60003690501015611dc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611f1f6022913960400191505060405180910390fd5b600190505b8091505090565b6000806014835114611e4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f42797465734c69623a20696e76616c69642064617461206c656e67746800000081525060200191505060405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b60008085851115611e7c57600080fd5b83861115611e8957600080fd5b600185028301915084860390509450949250505056fe4552433230546f6b656e3a2063616e6e6f74206275726e2066726f6d203078302061646472657373496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a657257726170706564576569546f6b656e3a20636f6e73756d657220616c72656164792065786973747347617465776179526563697069656e743a20696e76616c6964206d73672e646174614552433230546f6b656e3a2063616e6e6f7420617070726f766520746f203078302061646472657373536166654d6174684c69623a207375627472616374696f6e206f766572666c6f774552433230546f6b656e3a2063616e6e6f7420617070726f76652066726f6d2030783020616464726573734552433230546f6b656e3a2063616e6e6f74206d696e7420746f2030783020616464726573734552433230546f6b656e3a2063616e6e6f74207472616e7366657220746f20307830206164647265737357726170706564576569546f6b656e3a20636f6e73756d657220646f65736e277420657869737457726170706564576569546f6b656e3a207472616e73616374696f6e2072657665727465644552433230546f6b656e3a206275726e2076616c756520657863656564732062616c616e63654552433230546f6b656e3a2063616e6e6f74207472616e736665722066726f6d203078302061646472657373a164736f6c634300060c000a", + "deployedBytecode": "0x6080604052600436106101235760003560e01c806356a3b64b116100a0578063a9059cbb11610064578063a9059cbb1461065f578063b760faf9146106d0578063ca9add8f14610714578063dd62ed3e14610765578063f55647e0146107ea5761013b565b806356a3b64b146104d557806370a08231146104ec578063834ff73914610551578063853828b6146105b857806395d89b41146105cf5761013b565b806323b872dd116100e757806323b872dd146103085780632e1a7d4d14610399578063313ce567146103d4578063392e53cd14610402578063462d0b2e1461042f5761013b565b806306fdde0314610140578063095ea7b3146101d0578063116191b61461024157806318160ddd14610282578063205c2878146102ad5761013b565b3661013b57610139610133610801565b34610810565b005b600080fd5b34801561014c57600080fd5b50610155610a26565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561019557808201518184015260208101905061017a565b50505050905090810190601f1680156101c25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101dc57600080fd5b50610229600480360360408110156101f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ac4565b60405180821515815260200191505060405180910390f35b34801561024d57600080fd5b50610256610ae2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028e57600080fd5b50610297610b08565b6040518082815260200191505060405180910390f35b3480156102b957600080fd5b50610306600480360360408110156102d057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b0e565b005b34801561031457600080fd5b506103816004803603606081101561032b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b24565b60405180821515815260200191505060405180910390f35b3480156103a557600080fd5b506103d2600480360360208110156103bc57600080fd5b8101908080359060200190929190505050610be1565b005b3480156103e057600080fd5b506103e9610bfd565b604051808260ff16815260200191505060405180910390f35b34801561040e57600080fd5b50610417610c10565b60405180821515815260200191505060405180910390f35b34801561043b57600080fd5b506104d36004803603604081101561045257600080fd5b810190808035906020019064010000000081111561046f57600080fd5b82018360208201111561048157600080fd5b803590602001918460208302840111640100000000831117156104a357600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c66565b005b3480156104e157600080fd5b506104ea610e05565b005b3480156104f857600080fd5b5061053b6004803603602081101561050f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e17565b6040518082815260200191505060405180910390f35b34801561055d57600080fd5b506105a06004803603602081101561057457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e60565b60405180821515815260200191505060405180910390f35b3480156105c457600080fd5b506105cd610eb6565b005b3480156105db57600080fd5b506105e4610f0f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610624578082015181840152602081019050610609565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561066b57600080fd5b506106b86004803603604081101561068257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fad565b60405180821515815260200191505060405180910390f35b610712600480360360208110156106e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fcb565b005b34801561072057600080fd5b506107636004803603602081101561073757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fd8565b005b34801561077157600080fd5b506107d46004803603604081101561078857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611032565b6040518082815260200191505060405180910390f35b3480156107f657600080fd5b506107ff6110b9565b005b600061080b61120f565b905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610896576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611fb66026913960400191505060405180910390fd5b6000811161090c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4552433230546f6b656e3a2063616e6e6f74206d696e7420302076616c75650081525060200191505060405180910390fd5b61095e81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461122090919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506109b68160045461122090919063ffffffff16565b6004819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610abc5780601f10610a9157610100808354040283529160200191610abc565b820191906000526020600020905b815481529060010190602001808311610a9f57829003601f168201915b505050505081565b6000610ad8610ad1610801565b84846112a8565b6001905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b610b20610b19610801565b838361149f565b5050565b600080610b2f610801565b9050610b3c858585611538565b610bd58582610bd086600660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115ab90919063ffffffff16565b6112a8565b60019150509392505050565b610bfa610bec610801565b610bf4610801565b8361149f565b50565b600360009054906101000a900460ff1681565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610d0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180611ec8602f913960400191505060405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008383905014610daa57600083839050905060005b81811015610da757610d9a858583818110610d7857fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff166115d8565b8080600101915050610d61565b50505b610db381611723565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1505050565b610e15610e10610801565b6115d8565b565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000610ec0610801565b9050610f0c8182600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461149f565b50565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610fa55780601f10610f7a57610100808354040283529160200191610fa5565b820191906000526020600020905b815481529060010190602001808311610f8857829003601f168201915b505050505081565b6000610fc1610fba610801565b8484611538565b6001905092915050565b610fd58134610810565b50565b6000610fe2610801565b905061102e8183600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461149f565b5050565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006110c3610801565b9050600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611167576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806120066027913960400191505060405180910390fd5b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fe3f5ed5f263f1f01764a96edfc7d025f511ec5f7d180e8816908b78bcf74f09881604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600061121b6028611767565b905090565b60008082840190508381101561129e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174684c69623a206164646974696f6e206f766572666c6f77000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561132e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180611f8b602b913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113b4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180611f416029913960400191505060405180910390fd5b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6114a983826117fc565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050611533576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061202d6025913960400191505060405180910390fd5b505050565b600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561159a5761159583838361149f565b6115a6565b6115a58383836119b6565b5b505050565b60006115d08383604051806060016040528060218152602001611f6a60219139611c56565b905092915050565b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561167b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611ef76028913960400191505060405180910390fd5b6001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f28b26e7a3d20aedbc5f8f2ebf7da671c0491723a2b78f47a097b0e46dee0714281604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009050611776611d10565b156117ef5760008360003690500390506117e76000368390601485019261179f93929190611e6c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611dd3565b9150506117f3565b3390505b80915050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611882576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611ea06028913960400191505060405180910390fd5b6118ee8160405180606001604052806026815260200161205260269139600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c569092919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611946816004546115ab90919063ffffffff16565b600481905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612078602c913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611ac2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611fdc602a913960400191505060405180910390fd5b611b1481600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115ab90919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ba981600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461122090919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611d03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611cc8578082015181840152602081019050611cad565b50505050905090810190601f168015611cf55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082840390509392505050565b600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415611dcc57602c60003690501015611dc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611f1f6022913960400191505060405180910390fd5b600190505b8091505090565b6000806014835114611e4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f42797465734c69623a20696e76616c69642064617461206c656e67746800000081525060200191505060405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b60008085851115611e7c57600080fd5b83861115611e8957600080fd5b600185028301915084860390509450949250505056fe4552433230546f6b656e3a2063616e6e6f74206275726e2066726f6d203078302061646472657373496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a657257726170706564576569546f6b656e3a20636f6e73756d657220616c72656164792065786973747347617465776179526563697069656e743a20696e76616c6964206d73672e646174614552433230546f6b656e3a2063616e6e6f7420617070726f766520746f203078302061646472657373536166654d6174684c69623a207375627472616374696f6e206f766572666c6f774552433230546f6b656e3a2063616e6e6f7420617070726f76652066726f6d2030783020616464726573734552433230546f6b656e3a2063616e6e6f74206d696e7420746f2030783020616464726573734552433230546f6b656e3a2063616e6e6f74207472616e7366657220746f20307830206164647265737357726170706564576569546f6b656e3a20636f6e73756d657220646f65736e277420657869737457726170706564576569546f6b656e3a207472616e73616374696f6e2072657665727465644552433230546f6b656e3a206275726e2076616c756520657863656564732062616c616e63654552433230546f6b656e3a2063616e6e6f74207472616e736665722066726f6d203078302061646472657373a164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "details": "After the transfer to consumer's account is done, the token will be automatically burned and withdrawn. Use `startConsuming` to become a consumer.", + "events": { + "ConsumerAdded(address)": { + "details": "Emitted when the new consumer is added", + "params": { + "consumer": "consumer address" + } + }, + "ConsumerRemoved(address)": { + "details": "Emitted when the existing consumer is removed", + "params": { + "consumer": "consumer address" + } + } + }, + "kind": "dev", + "methods": { + "constructor": { + "details": "Public constructor" + }, + "depositTo(address)": { + "params": { + "to": "to address" + } + }, + "initialize(address[],address)": { + "params": { + "consumers_": "array of consumers addresses", + "gateway_": "`Gateway` contract address" + } + }, + "isConsumer(address)": { + "params": { + "consumer": "consumer address" + }, + "returns": { + "_0": "true if consumer exists" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + }, + "startConsuming()": { + "details": "Add caller as a consumer" + }, + "stopConsuming()": { + "details": "Remove caller from consumers" + }, + "withdraw(uint256)": { + "params": { + "value": "value to withdraw" + } + }, + "withdrawAllTo(address)": { + "params": { + "to": "to address" + } + }, + "withdrawTo(address,uint256)": { + "params": { + "to": "to address", + "value": "value to withdraw" + } + } + }, + "title": "Wrapped wei token", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "depositTo(address)": { + "notice": "Deposits `msg.value` to address" + }, + "initialize(address[],address)": { + "notice": "Initializes `WrappedWeiToken` contract" + }, + "isConsumer(address)": { + "notice": "Checks if consumer exists" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + }, + "startConsuming()": { + "notice": "Starts consuming" + }, + "stopConsuming()": { + "notice": "Stops consuming" + }, + "withdraw(uint256)": { + "notice": "Withdraws" + }, + "withdrawAll()": { + "notice": "Withdraws all" + }, + "withdrawAllTo(address)": { + "notice": "Withdraws all to address" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraws to address" + } + }, + "notice": "One to one wei consumable ERC20 token", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1871, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "initializer", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1983, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "name", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 1985, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "symbol", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 1987, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "decimals", + "offset": 0, + "slot": "3", + "type": "t_uint8" + }, + { + "astId": 1989, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "totalSupply", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 1993, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "balances", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1999, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "allowances", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 5197, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "gateway", + "offset": 0, + "slot": "7", + "type": "t_address" + }, + { + "astId": 7468, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "consumers", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_bool)" + } + ], + "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" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuse/solcInputs/1bdf84d4bd28700579af1cc4796e2cae.json b/deployments/fuse/solcInputs/1bdf84d4bd28700579af1cc4796e2cae.json new file mode 100644 index 00000000..e1114a03 --- /dev/null +++ b/deployments/fuse/solcInputs/1bdf84d4bd28700579af1cc4796e2cae.json @@ -0,0 +1,154 @@ +{ + "language": "Solidity", + "sources": { + "src/common/access/Controlled.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Controlled\n *\n * @dev Contract module which provides an access control mechanism.\n * It ensures there is only one controlling account of the smart contract\n * and grants that account exclusive access to specific functions.\n *\n * The controller account will be the one that deploys the contract.\n *\n * @author Stanisław Głogowski \n */\ncontract Controlled {\n /**\n * @return controller account address\n */\n address public controller;\n\n // modifiers\n\n /**\n * @dev Throws if msg.sender is not the controller\n */\n modifier onlyController() {\n require(\n msg.sender == controller,\n \"Controlled: msg.sender is not the controller\"\n );\n\n _;\n }\n\n /**\n * @dev Internal constructor\n */\n constructor()\n internal\n {\n controller = msg.sender;\n }\n}\n" + }, + "src/payments/PaymentDepositAccount.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../common/access/Controlled.sol\";\n\n\n/**\n * @title Payment deposit account\n *\n * @dev Simple account contract with only one method - `executeTransaction`\n *\n * @author Stanisław Głogowski \n */\ncontract PaymentDepositAccount is Controlled {\n /**\n * @dev Public constructor\n */\n constructor() public payable Controlled() {}\n\n /**\n * @notice Allow receives\n */\n receive()\n external\n payable\n {\n //\n }\n\n // external functions\n\n /**\n * @notice Executes transaction\n * @param to to address\n * @param value value\n * @param data data\n * @return transaction result\n */\n function executeTransaction(\n address to,\n uint256 value,\n bytes calldata data\n )\n external\n onlyController\n returns (bytes memory)\n {\n bytes memory result;\n bool succeeded;\n\n // solhint-disable-next-line avoid-call-value, avoid-low-level-calls\n (succeeded, result) = payable(to).call{value: value}(data);\n\n require(\n succeeded,\n \"Account: transaction reverted\"\n );\n\n return result;\n }\n}\n" + }, + "src/payments/PaymentRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\npragma experimental ABIEncoderV2;\n\nimport \"../common/access/Guarded.sol\";\nimport \"../common/libs/ECDSALib.sol\";\nimport \"../common/libs/SafeMathLib.sol\";\nimport \"../common/lifecycle/Initializable.sol\";\nimport \"../common/signature/SignatureValidator.sol\";\nimport \"../common/token/ERC20Token.sol\";\nimport \"../external/ExternalAccountRegistry.sol\";\nimport \"../personal/PersonalAccountRegistry.sol\";\nimport \"../gateway/GatewayRecipient.sol\";\nimport \"./PaymentDepositAccount.sol\";\n\n\n/**\n * @title Payment registry\n *\n * @notice A registry for payment and payment channels\n *\n * @dev the `DepositExit` process can be used in a case operator (guardian) couldn't sign commit / withdrawal message.\n * Process will be rejected when any of senders channels will be committed.\n *\n * @author Stanisław Głogowski \n */\ncontract PaymentRegistry is Guarded, Initializable, SignatureValidator, GatewayRecipient {\n using ECDSALib for bytes32;\n using SafeMathLib for uint256;\n\n struct Deposit {\n address account;\n mapping(address => uint256) withdrawnAmount;\n mapping(address => uint256) exitLockedUntil;\n }\n\n struct PaymentChannel {\n uint256 committedAmount;\n }\n\n struct DepositWithdrawal {\n address owner;\n address token;\n uint256 amount;\n }\n\n struct PaymentChannelCommit {\n address sender;\n address recipient;\n address token;\n bytes32 uid;\n uint256 blockNumber;\n uint256 amount;\n }\n\n uint256 private constant DEFAULT_DEPOSIT_EXIT_LOCK_PERIOD = 28 days;\n\n bytes32 private constant HASH_PREFIX_DEPOSIT_WITHDRAWAL = keccak256(\n \"DepositWithdrawal(address owner,address token,uint256 amount)\"\n );\n bytes32 private constant HASH_PREFIX_PAYMENT_CHANNEL_COMMIT = keccak256(\n \"PaymentChannelCommit(address sender,address recipient,address token,bytes32 uid,uint256 blockNumber,uint256 amount)\"\n );\n\n ExternalAccountRegistry public externalAccountRegistry;\n PersonalAccountRegistry public personalAccountRegistry;\n\n uint256 public depositExitLockPeriod;\n\n mapping(address => Deposit) private deposits;\n mapping(bytes32 => PaymentChannel) private paymentChannels;\n\n // events\n\n /**\n * @dev Emitted when the deposit account is deployed\n * @param depositAccount deposit account address\n * @param owner owner address\n */\n event DepositAccountDeployed(\n address depositAccount,\n address owner\n );\n\n /**\n * @dev Emitted when the deposit exist is requested\n * @param depositAccount deposit account address\n * @param owner owner address\n * @param token token address\n * @param lockedUntil deposit exist locked util time\n */\n event DepositExitRequested(\n address depositAccount,\n address owner,\n address token,\n uint256 lockedUntil\n );\n\n /**\n * @dev Emitted when the deposit exist is completed\n * @param depositAccount deposit account address\n * @param owner owner address\n * @param token token address\n * @param amount deposit exist amount\n */\n event DepositExitCompleted(\n address depositAccount,\n address owner,\n address token,\n uint256 amount\n );\n\n /**\n * @dev Emitted when the deposit exist is rejected\n * @param depositAccount deposit account address\n * @param owner owner address\n * @param token token address\n */\n event DepositExitRejected(\n address depositAccount,\n address owner,\n address token\n );\n\n /**\n * @dev Emitted when the deposit has been withdrawn\n * @param depositAccount deposit account address\n * @param owner owner address\n * @param token token address\n * @param amount withdrawn amount\n */\n event DepositWithdrawn(\n address depositAccount,\n address owner,\n address token,\n uint256 amount\n );\n\n /**\n * @dev Emitted when the payment channel has been committed\n * @param hash channel hash\n * @param sender sender address\n * @param recipient recipient address\n * @param token token address\n * @param uid unique channel id\n * @param amount committed amount\n */\n event PaymentChannelCommitted(\n bytes32 hash,\n address sender,\n address recipient,\n address token,\n bytes32 uid,\n uint256 amount\n );\n\n /**\n * @dev Emitted when the payment has been withdrawn\n * @param channelHash channel hash\n * @param value payment value\n */\n event PaymentWithdrawn(\n bytes32 channelHash,\n uint256 value\n );\n\n /**\n * @dev Emitted when the payment has been deposited\n * @param channelHash channel hash\n * @param value payment value\n */\n event PaymentDeposited(\n bytes32 channelHash,\n uint256 value\n );\n\n /**\n * @dev Emitted when the payment has been withdrawn and deposited (split)\n * @param channelHash channel hash\n * @param totalValue payment total value\n * @param depositValue payment deposited value\n */\n event PaymentSplit(\n bytes32 channelHash,\n uint256 totalValue,\n uint256 depositValue\n );\n\n /**\n * @dev Public constructor\n */\n constructor() public Initializable() SignatureValidator() {}\n\n // external functions\n\n /**\n * @notice Initialize `PaymentRegistry` contract\n * @param externalAccountRegistry_ `ExternalAccountRegistry` contract address\n * @param personalAccountRegistry_ `PersonalAccountRegistry` contract address\n * @param depositExitLockPeriod_ deposit exit lock period\n * @param guardians_ array of guardians addresses\n * @param gateway_ `Gateway` contract address\n */\n function initialize(\n ExternalAccountRegistry externalAccountRegistry_,\n PersonalAccountRegistry personalAccountRegistry_,\n uint256 depositExitLockPeriod_,\n address[] calldata guardians_,\n address gateway_\n )\n external\n onlyInitializer\n {\n externalAccountRegistry = externalAccountRegistry_;\n personalAccountRegistry = personalAccountRegistry_;\n\n if (depositExitLockPeriod_ == 0) {\n depositExitLockPeriod = DEFAULT_DEPOSIT_EXIT_LOCK_PERIOD;\n } else {\n depositExitLockPeriod = depositExitLockPeriod_;\n }\n\n // Guarded\n _initializeGuarded(guardians_);\n\n // GatewayRecipient\n _initializeGatewayRecipient(gateway_);\n }\n\n /**\n * @notice Deploys deposit account\n * @param owner owner address\n */\n function deployDepositAccount(\n address owner\n )\n external\n {\n _deployDepositAccount(owner);\n }\n\n /**\n * @notice Requests deposit exit\n * @param token token address\n */\n function requestDepositExit(\n address token\n )\n external\n {\n address owner = _getContextAccount();\n uint256 lockedUntil = deposits[owner].exitLockedUntil[token];\n\n require(\n lockedUntil == 0,\n \"PaymentRegistry: deposit exit already requested\"\n );\n\n _deployDepositAccount(owner);\n\n // solhint-disable-next-line not-rely-on-time\n lockedUntil = now.add(depositExitLockPeriod);\n\n deposits[owner].exitLockedUntil[token] = lockedUntil;\n\n emit DepositExitRequested(\n deposits[owner].account,\n owner,\n token,\n lockedUntil\n );\n }\n\n /**\n * @notice Processes deposit exit\n * @param token token address\n */\n function processDepositExit(\n address token\n )\n external\n {\n address owner = _getContextAccount();\n uint256 lockedUntil = deposits[owner].exitLockedUntil[token];\n\n require(\n lockedUntil != 0,\n \"PaymentRegistry: deposit exit not requested\"\n );\n\n require(\n // solhint-disable-next-line not-rely-on-time\n lockedUntil <= now,\n \"PaymentRegistry: deposit exit locked\"\n );\n\n deposits[owner].exitLockedUntil[token] = 0;\n\n address depositAccount = deposits[owner].account;\n uint256 depositValue;\n\n if (token == address(0)) {\n depositValue = depositAccount.balance;\n } else {\n depositValue = ERC20Token(token).balanceOf(depositAccount);\n }\n\n _transferFromDeposit(\n depositAccount,\n owner,\n token,\n depositValue\n );\n\n emit DepositExitCompleted(\n depositAccount,\n owner,\n token,\n depositValue\n );\n }\n\n /**\n * @notice Withdraws deposit\n * @param token token address\n * @param amount amount to withdraw\n * @param guardianSignature guardian signature\n */\n function withdrawDeposit(\n address token,\n uint256 amount,\n bytes calldata guardianSignature\n )\n external\n {\n address owner = _getContextAccount();\n uint256 value = amount.sub(deposits[owner].withdrawnAmount[token]);\n\n require(\n value > 0,\n \"PaymentRegistry: invalid amount\"\n );\n\n bytes32 messageHash = _hashDepositWithdrawal(\n owner,\n token,\n amount\n );\n\n require(\n _verifyGuardianSignature(messageHash, guardianSignature),\n \"PaymentRegistry: invalid guardian signature\"\n );\n\n deposits[owner].withdrawnAmount[token] = amount;\n\n _verifyDepositExitOrDeployAccount(owner, token);\n\n _transferFromDeposit(\n deposits[owner].account,\n owner,\n token,\n value\n );\n\n emit DepositWithdrawn(\n deposits[owner].account,\n owner,\n token,\n amount\n );\n }\n\n /**\n * @notice Commits payment channel and withdraw payment\n * @param sender sender address\n * @param token token address\n * @param uid unique channel id\n * @param blockNumber block number\n * @param amount amount to commit\n * @param senderSignature sender signature\n * @param guardianSignature guardian signature\n */\n function commitPaymentChannelAndWithdraw(\n address sender,\n address token,\n bytes32 uid,\n uint256 blockNumber,\n uint256 amount,\n bytes calldata senderSignature,\n bytes calldata guardianSignature\n )\n external\n {\n address recipient = _getContextAccount();\n\n (bytes32 hash, address depositAccount, uint256 paymentValue) = _commitPaymentChannel(\n sender,\n recipient,\n token,\n uid,\n blockNumber,\n amount,\n senderSignature,\n guardianSignature\n );\n\n _transferFromDeposit(\n depositAccount,\n recipient,\n token,\n paymentValue\n );\n\n emit PaymentWithdrawn(hash, paymentValue);\n }\n\n /**\n * @notice Commits payment channel and deposit payment\n * @param sender sender address\n * @param token token address\n * @param uid unique channel id\n * @param blockNumber block number\n * @param amount amount to commit\n * @param senderSignature sender signature\n * @param guardianSignature guardian signature\n */\n function commitPaymentChannelAndDeposit(\n address sender,\n address token,\n bytes32 uid,\n uint256 blockNumber,\n uint256 amount,\n bytes calldata senderSignature,\n bytes calldata guardianSignature\n )\n external\n {\n address recipient = _getContextAccount();\n\n (bytes32 hash, address depositAccount, uint256 paymentValue) = _commitPaymentChannel(\n sender,\n recipient,\n token,\n uid,\n blockNumber,\n amount,\n senderSignature,\n guardianSignature\n );\n\n _transferFromDeposit(\n depositAccount,\n _computeDepositAccountAddress(recipient),\n token,\n paymentValue\n );\n\n emit PaymentDeposited(hash, paymentValue);\n }\n\n /**\n * @notice Commits payment channel, withdraws and deposits (split) payment\n * @param sender sender address\n * @param token token address\n * @param uid unique channel id\n * @param blockNumber block number\n * @param amount amount to commit\n * @param depositPaymentValue amount to deposit\n * @param senderSignature sender signature\n * @param guardianSignature guardian signature\n */\n function commitPaymentChannelAndSplit(\n address sender,\n address token,\n bytes32 uid,\n uint256 blockNumber,\n uint256 amount,\n uint256 depositPaymentValue,\n bytes calldata senderSignature,\n bytes calldata guardianSignature\n )\n external\n {\n address recipient = _getContextAccount();\n\n (bytes32 hash, address depositAccount, uint256 paymentValue) = _commitPaymentChannel(\n sender,\n recipient,\n token,\n uid,\n blockNumber,\n amount,\n senderSignature,\n guardianSignature\n );\n\n _transferSplitFromDeposit(\n depositAccount,\n recipient,\n token,\n paymentValue,\n depositPaymentValue\n );\n\n emit PaymentSplit(hash, paymentValue, depositPaymentValue);\n }\n\n // external functions (views)\n\n /**\n * @notice Computes deposit account address\n * @param owner owner address\n * @return deposit account address\n */\n function computeDepositAccountAddress(\n address owner\n )\n external\n view\n returns (address)\n {\n return _computeDepositAccountAddress(owner);\n }\n\n /**\n * @notice Checks if deposit account is deployed\n * @param owner owner address\n * @return true when deposit account is deployed\n */\n function isDepositAccountDeployed(\n address owner\n )\n external\n view\n returns (bool)\n {\n return deposits[owner].account != address(0);\n }\n\n /**\n * @notice Gets deposit exit locked until time\n * @param owner owner address\n * @param token token address\n * @return locked until time\n */\n function getDepositExitLockedUntil(\n address owner,\n address token\n )\n external\n view\n returns (uint256)\n {\n return deposits[owner].exitLockedUntil[token];\n }\n\n /**\n * @notice Gets deposit withdrawn amount\n * @param owner owner address\n * @param token token address\n * @return withdrawn amount\n */\n function getDepositWithdrawnAmount(\n address owner,\n address token\n )\n external\n view\n returns (uint256)\n {\n return deposits[owner].withdrawnAmount[token];\n }\n\n /**\n * @notice Gets payment channel committed amount\n * @param hash payment channel hash\n * @return committed amount\n */\n function getPaymentChannelCommittedAmount(\n bytes32 hash\n )\n external\n view\n returns (uint256)\n {\n return paymentChannels[hash].committedAmount;\n }\n\n // external functions (pure)\n\n /**\n * @notice Computes payment channel hash\n * @param sender sender address\n * @param recipient recipient address\n * @param token token address\n * @param uid unique channel id\n * @return hash\n */\n function computePaymentChannelHash(\n address sender,\n address recipient,\n address token,\n bytes32 uid\n )\n external\n pure\n returns (bytes32)\n {\n return _computePaymentChannelHash(\n sender,\n recipient,\n token,\n uid\n );\n }\n\n // public functions (views)\n\n /**\n * @notice Hashes `DepositWithdrawal` message payload\n * @param depositWithdrawal struct\n * @return hash\n */\n function hashDepositWithdrawal(\n DepositWithdrawal memory depositWithdrawal\n )\n public\n view\n returns (bytes32)\n {\n return _hashDepositWithdrawal(\n depositWithdrawal.owner,\n depositWithdrawal.token,\n depositWithdrawal.amount\n );\n }\n\n /**\n * @notice Hashes `PaymentChannelCommit` message payload\n * @param paymentChannelCommit struct\n * @return hash\n */\n function hashPaymentChannelCommit(\n PaymentChannelCommit memory paymentChannelCommit\n )\n public\n view\n returns (bytes32)\n {\n return _hashPaymentChannelCommit(\n paymentChannelCommit.sender,\n paymentChannelCommit.recipient,\n paymentChannelCommit.token,\n paymentChannelCommit.uid,\n paymentChannelCommit.blockNumber,\n paymentChannelCommit.amount\n );\n }\n\n // private functions\n\n function _deployDepositAccount(\n address owner\n )\n private\n {\n if (deposits[owner].account == address(0)) {\n bytes32 salt = keccak256(\n abi.encodePacked(\n owner\n )\n );\n\n deposits[owner].account = address(new PaymentDepositAccount{salt: salt}());\n\n emit DepositAccountDeployed(\n deposits[owner].account,\n owner\n );\n }\n }\n\n function _verifyDepositExitOrDeployAccount(\n address owner,\n address token\n )\n private\n {\n if (deposits[owner].exitLockedUntil[token] > 0) {\n deposits[owner].exitLockedUntil[token] = 0;\n\n emit DepositExitRejected(\n deposits[owner].account,\n owner,\n token\n );\n } else {\n _deployDepositAccount(owner);\n }\n }\n\n function _commitPaymentChannel(\n address sender,\n address recipient,\n address token,\n bytes32 uid,\n uint256 blockNumber,\n uint256 amount,\n bytes memory senderSignature,\n bytes memory guardianSignature\n )\n private\n returns (bytes32 hash, address depositAccount, uint256 paymentValue)\n {\n bytes32 messageHash = _hashPaymentChannelCommit(\n sender,\n recipient,\n token,\n uid,\n blockNumber,\n amount\n );\n\n if (senderSignature.length == 0) {\n require(\n externalAccountRegistry.verifyAccountProofAtBlock(sender, messageHash, blockNumber),\n \"PaymentRegistry: invalid guardian signature\"\n );\n } else {\n address signer = messageHash.recoverAddress(senderSignature);\n\n if (sender != signer) {\n require(\n personalAccountRegistry.verifyAccountOwnerAtBlock(sender, signer, blockNumber) ||\n externalAccountRegistry.verifyAccountOwnerAtBlock(sender, signer, blockNumber),\n \"PaymentRegistry: invalid sender signature\"\n );\n }\n }\n\n require(\n _verifyGuardianSignature(messageHash, guardianSignature),\n \"PaymentRegistry: invalid guardian signature\"\n );\n\n hash = _computePaymentChannelHash(\n sender,\n recipient,\n token,\n uid\n );\n\n /// @dev calc payment value\n paymentValue = amount.sub(paymentChannels[hash].committedAmount);\n\n require(\n paymentValue != 0,\n \"PaymentRegistry: invalid payment value\"\n );\n\n paymentChannels[hash].committedAmount = amount;\n\n _verifyDepositExitOrDeployAccount(sender, token);\n\n depositAccount = deposits[sender].account;\n\n emit PaymentChannelCommitted(\n hash,\n sender,\n recipient,\n token,\n uid,\n amount\n );\n\n return (hash, depositAccount, paymentValue);\n }\n\n function _transferFromDeposit(\n address depositAccount,\n address to,\n address token,\n uint256 value\n )\n private\n {\n if (token == address(0)) {\n PaymentDepositAccount(payable(depositAccount)).executeTransaction(\n to,\n value,\n new bytes(0)\n );\n } else {\n bytes memory response = PaymentDepositAccount(payable(depositAccount)).executeTransaction(\n token,\n 0,\n abi.encodeWithSelector(\n ERC20Token(token).transfer.selector,\n to,\n value\n )\n );\n\n if (response.length > 0) {\n require(\n abi.decode(response, (bool)),\n \"PaymentRegistry: ERC20Token transfer reverted\"\n );\n }\n }\n }\n\n function _transferSplitFromDeposit(\n address depositAccount,\n address to,\n address token,\n uint256 paymentValue,\n uint256 depositValue\n )\n private\n {\n require(\n depositValue > 0,\n \"PaymentRegistry: invalid deposit value\"\n );\n\n uint256 withdrawValue = paymentValue.sub(depositValue);\n\n require(\n withdrawValue > 0,\n \"PaymentRegistry: invalid withdraw value\"\n );\n\n _transferFromDeposit(\n depositAccount,\n to,\n token,\n withdrawValue\n );\n\n _transferFromDeposit(\n depositAccount,\n _computeDepositAccountAddress(to),\n token,\n depositValue\n );\n }\n\n // private functions (views)\n\n function _computeDepositAccountAddress(\n address owner\n )\n private\n view\n returns (address)\n {\n bytes32 salt = keccak256(\n abi.encodePacked(\n owner\n )\n );\n\n bytes memory creationCode = type(PaymentDepositAccount).creationCode;\n\n bytes32 data = keccak256(\n abi.encodePacked(\n bytes1(0xff),\n address(this),\n salt,\n keccak256(creationCode)\n )\n );\n\n return address(uint160(uint256(data)));\n }\n\n function _hashDepositWithdrawal(\n address owner,\n address token,\n uint256 amount\n )\n private\n view\n returns (bytes32)\n {\n return _hashMessagePayload(HASH_PREFIX_DEPOSIT_WITHDRAWAL, abi.encodePacked(\n owner,\n token,\n amount\n ));\n }\n\n function _hashPaymentChannelCommit(\n address sender,\n address recipient,\n address token,\n bytes32 uid,\n uint256 blockNumber,\n uint256 amount\n )\n private\n view\n returns (bytes32)\n {\n return _hashMessagePayload(HASH_PREFIX_PAYMENT_CHANNEL_COMMIT, abi.encodePacked(\n sender,\n recipient,\n token,\n uid,\n blockNumber,\n amount\n ));\n }\n\n // private functions (pure)\n\n function _computePaymentChannelHash(\n address sender,\n address recipient,\n address token,\n bytes32 uid\n )\n private\n pure\n returns (bytes32)\n {\n return keccak256(\n abi.encodePacked(\n sender,\n recipient,\n token,\n uid\n )\n );\n }\n}\n" + }, + "src/common/access/Guarded.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../libs/ECDSALib.sol\";\n\n\n/**\n * @title Guarded\n *\n * @dev Contract module which provides a guardian-type control mechanism.\n * It allows key accounts to have guardians and restricts specific methods to be accessible by guardians only.\n *\n * Each guardian account can remove other guardians\n *\n * Use `_initializeGuarded` to initialize the contract\n *\n * @author Stanisław Głogowski \n */\ncontract Guarded {\n using ECDSALib for bytes32;\n\n mapping(address => bool) private guardians;\n\n // events\n\n /**\n * @dev Emitted when a new guardian is added\n * @param sender sender address\n * @param guardian guardian address\n */\n event GuardianAdded(\n address sender,\n address guardian\n );\n\n /**\n * @dev Emitted when the existing guardian is removed\n * @param sender sender address\n * @param guardian guardian address\n */\n event GuardianRemoved(\n address sender,\n address guardian\n );\n\n // modifiers\n\n /**\n * @dev Throws if tx.origin is not a guardian account\n */\n modifier onlyGuardian() {\n require(\n // solhint-disable-next-line avoid-tx-origin\n guardians[tx.origin],\n \"Guarded: tx.origin is not the guardian\"\n );\n\n _;\n }\n\n /**\n * @dev Internal constructor\n */\n constructor() internal {}\n\n // external functions\n\n /**\n * @notice Adds a new guardian\n * @param guardian guardian address\n */\n function addGuardian(\n address guardian\n )\n external\n onlyGuardian\n {\n _addGuardian(guardian);\n }\n\n /**\n * @notice Removes the existing guardian\n * @param guardian guardian address\n */\n function removeGuardian(\n address guardian\n )\n external\n onlyGuardian\n {\n require(\n // solhint-disable-next-line avoid-tx-origin\n tx.origin != guardian,\n \"Guarded: cannot remove self\"\n );\n\n require(\n guardians[guardian],\n \"Guarded: guardian doesn't exist\"\n );\n\n guardians[guardian] = false;\n\n emit GuardianRemoved(\n // solhint-disable-next-line avoid-tx-origin\n tx.origin,\n guardian\n );\n }\n\n // external functions (views)\n\n /**\n * @notice Check if guardian exists\n * @param guardian guardian address\n * @return true when guardian exists\n */\n function isGuardian(\n address guardian\n )\n external\n view\n returns (bool)\n {\n return guardians[guardian];\n }\n\n /**\n * @notice Verifies guardian signature\n * @param messageHash message hash\n * @param signature signature\n * @return true on correct guardian signature\n */\n function verifyGuardianSignature(\n bytes32 messageHash,\n bytes calldata signature\n )\n external\n view\n returns (bool)\n {\n return _verifyGuardianSignature(\n messageHash,\n signature\n );\n }\n\n // internal functions\n\n /**\n * @notice Initializes `Guarded` contract\n * @dev If `guardians_` array is empty `tx.origin` is added as guardian account\n * @param guardians_ array of guardians addresses\n */\n function _initializeGuarded(\n address[] memory guardians_\n )\n internal\n {\n if (guardians_.length == 0) {\n // solhint-disable-next-line avoid-tx-origin\n _addGuardian(tx.origin);\n } else {\n uint guardiansLen = guardians_.length;\n for (uint i = 0; i < guardiansLen; i++) {\n _addGuardian(guardians_[i]);\n }\n }\n }\n\n\n // internal functions (views)\n\n function _verifyGuardianSignature(\n bytes32 messageHash,\n bytes memory signature\n )\n internal\n view\n returns (bool)\n {\n address guardian = messageHash.recoverAddress(signature);\n\n return guardians[guardian];\n }\n\n // private functions\n\n function _addGuardian(\n address guardian\n )\n private\n {\n require(\n guardian != address(0),\n \"Guarded: cannot add 0x0 guardian\"\n );\n\n require(\n !guardians[guardian],\n \"Guarded: guardian already exists\"\n );\n\n guardians[guardian] = true;\n\n emit GuardianAdded(\n // solhint-disable-next-line avoid-tx-origin\n tx.origin,\n guardian\n );\n }\n}\n" + }, + "src/common/libs/ECDSALib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title ECDSA library\n *\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/cryptography/ECDSA.sol#L26\n */\nlibrary ECDSALib {\n function recoverAddress(\n bytes32 messageHash,\n bytes memory signature\n )\n internal\n pure\n returns (address)\n {\n address result = address(0);\n\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n\n if (v < 27) {\n v += 27;\n }\n\n if (v == 27 || v == 28) {\n result = ecrecover(messageHash, v, r, s);\n }\n }\n\n return result;\n }\n\n function toEthereumSignedMessageHash(\n bytes32 messageHash\n )\n internal\n pure\n returns (bytes32)\n {\n return keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n messageHash\n ));\n }\n}\n" + }, + "src/common/libs/SafeMathLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Safe math library\n *\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/math/SafeMath.sol\n */\nlibrary SafeMathLib {\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n\n require(c >= a, \"SafeMathLib: addition overflow\");\n\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMathLib: subtraction overflow\");\n }\n\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n\n return a - b;\n }\n\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n\n require(c / a == b, \"SafeMathLib: multiplication overflow\");\n\n return c;\n }\n\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMathLib: division by zero\");\n }\n\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n\n return a / b;\n }\n\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMathLib: modulo by zero\");\n }\n\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n\n return a % b;\n }\n}\n" + }, + "src/common/lifecycle/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Initializable\n *\n * @dev Contract module which provides access control mechanism, where\n * there is the initializer account that can be granted exclusive access to\n * specific functions.\n *\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\n * Use `onlyInitializer` modifier on contract initialize process.\n *\n * @author Stanisław Głogowski \n */\ncontract Initializable {\n address private initializer;\n\n // events\n\n /**\n * @dev Emitted after `onlyInitializer`\n * @param initializer initializer address\n */\n event Initialized(\n address initializer\n );\n\n // modifiers\n\n /**\n * @dev Throws if tx.origin is not the initializer\n */\n modifier onlyInitializer() {\n require(\n // solhint-disable-next-line avoid-tx-origin\n tx.origin == initializer,\n \"Initializable: tx.origin is not the initializer\"\n );\n\n /// @dev removes initializer\n initializer = address(0);\n\n _;\n\n emit Initialized(\n // solhint-disable-next-line avoid-tx-origin\n tx.origin\n );\n }\n\n /**\n * @dev Internal constructor\n */\n constructor()\n internal\n {\n // solhint-disable-next-line avoid-tx-origin\n initializer = tx.origin;\n }\n\n // external functions (views)\n\n /**\n * @notice Check if contract is initialized\n * @return true when contract is initialized\n */\n function isInitialized()\n external\n view\n returns (bool)\n {\n return initializer == address(0);\n }\n}\n" + }, + "src/common/signature/SignatureValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../libs/ECDSALib.sol\";\n\n/**\n * @title Signature validator\n *\n * @author Stanisław Głogowski \n */\ncontract SignatureValidator {\n using ECDSALib for bytes32;\n\n uint256 public chainId;\n\n /**\n * @dev internal constructor\n */\n constructor() internal {\n uint256 chainId_;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n chainId_ := chainid()\n }\n\n chainId = chainId_;\n }\n\n // internal functions\n\n function _hashMessagePayload(\n bytes32 messagePrefix,\n bytes memory messagePayload\n )\n internal\n view\n returns (bytes32)\n {\n return keccak256(abi.encodePacked(\n chainId,\n address(this),\n messagePrefix,\n messagePayload\n )).toEthereumSignedMessageHash();\n }\n}\n" + }, + "src/common/token/ERC20Token.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../libs/SafeMathLib.sol\";\n\n\n/**\n * @title ERC20 token\n *\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/token/ERC20/ERC20.sol\n */\ncontract ERC20Token {\n using SafeMathLib for uint256;\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 public totalSupply;\n\n mapping(address => uint256) internal balances;\n mapping(address => mapping(address => uint256)) internal allowances;\n\n // events\n\n event Transfer(\n address indexed from,\n address indexed to,\n uint256 value\n );\n\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n\n /**\n * @dev internal constructor\n */\n constructor() internal {}\n\n // external functions\n\n function transfer(\n address to,\n uint256 value\n )\n external\n returns (bool)\n {\n _transfer(_getSender(), to, value);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n )\n virtual\n external\n returns (bool)\n {\n address sender = _getSender();\n\n _transfer(from, to, value);\n _approve(from, sender, allowances[from][sender].sub(value));\n\n return true;\n }\n\n function approve(\n address spender,\n uint256 value\n )\n virtual\n external\n returns (bool)\n {\n _approve(_getSender(), spender, value);\n\n return true;\n }\n\n // external functions (views)\n\n function balanceOf(\n address owner\n )\n virtual\n external\n view\n returns (uint256)\n {\n return balances[owner];\n }\n\n function allowance(\n address owner,\n address spender\n )\n virtual\n external\n view\n returns (uint256)\n {\n return allowances[owner][spender];\n }\n\n // internal functions\n\n function _transfer(\n address from,\n address to,\n uint256 value\n )\n virtual\n internal\n {\n require(\n from != address(0),\n \"ERC20Token: cannot transfer from 0x0 address\"\n );\n require(\n to != address(0),\n \"ERC20Token: cannot transfer to 0x0 address\"\n );\n\n balances[from] = balances[from].sub(value);\n balances[to] = balances[to].add(value);\n\n emit Transfer(from, to, value);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 value\n )\n virtual\n internal\n {\n require(\n owner != address(0),\n \"ERC20Token: cannot approve from 0x0 address\"\n );\n require(\n spender != address(0),\n \"ERC20Token: cannot approve to 0x0 address\"\n );\n\n allowances[owner][spender] = value;\n\n emit Approval(owner, spender, value);\n }\n\n function _mint(\n address owner,\n uint256 value\n )\n virtual\n internal\n {\n require(\n owner != address(0),\n \"ERC20Token: cannot mint to 0x0 address\"\n );\n require(\n value > 0,\n \"ERC20Token: cannot mint 0 value\"\n );\n\n balances[owner] = balances[owner].add(value);\n totalSupply = totalSupply.add(value);\n\n emit Transfer(address(0), owner, value);\n }\n\n function _burn(\n address owner,\n uint256 value\n )\n virtual\n internal\n {\n require(\n owner != address(0),\n \"ERC20Token: cannot burn from 0x0 address\"\n );\n\n balances[owner] = balances[owner].sub(\n value,\n \"ERC20Token: burn value exceeds balance\"\n );\n\n totalSupply = totalSupply.sub(value);\n\n emit Transfer(owner, address(0), value);\n }\n\n // internal functions (views)\n\n function _getSender()\n virtual\n internal\n view\n returns (address)\n {\n return msg.sender;\n }\n}\n" + }, + "src/external/ExternalAccountRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../common/libs/BlockLib.sol\";\n\n\n/**\n * @title External account registry\n *\n * @notice Global registry for keys and external (outside of the platform) contract based wallets\n *\n * @dev An account can call the registry to add (`addAccountOwner`) or remove (`removeAccountOwner`) its own owners.\n * When the owner has been added, information about that fact will live in the registry forever.\n * Removing an owner only affects the future blocks (until the owner is re-added).\n *\n * Given the fact, there is no way to sign the data using a contract based wallet,\n * we created a registry to store signed by the key wallet proofs.\n * ERC-1271 allows removing a signer after the signature was created. Thus store the signature for the later use\n * doesn't guarantee the signer is still has access to that smart account.\n * Because of that, the ERC1271's `isValidSignature()` cannot be used in e.g. `PaymentRegistry`.*\n *\n * An account can call the registry to add (`addAccountProof`) or remove (`removeAccountProof`) proof hash.\n * When the proof has been added, information about that fact will live in the registry forever.\n * Removing a proof only affects the future blocks (until the proof is re-added).\n *\n * @author Stanisław Głogowski \n */\ncontract ExternalAccountRegistry {\n using BlockLib for BlockLib.BlockRelated;\n\n struct Account {\n mapping(address => BlockLib.BlockRelated) owners;\n mapping(bytes32 => BlockLib.BlockRelated) proofs;\n }\n\n mapping(address => Account) private accounts;\n\n // events\n\n /**\n * @dev Emitted when the new owner is added\n * @param account account address\n * @param owner owner address\n */\n event AccountOwnerAdded(\n address account,\n address owner\n );\n\n /**\n * @dev Emitted when the existing owner is removed\n * @param account account address\n * @param owner owner address\n */\n event AccountOwnerRemoved(\n address account,\n address owner\n );\n\n /**\n * @dev Emitted when the new proof is added\n * @param account account address\n * @param hash proof hash\n */\n event AccountProofAdded(\n address account,\n bytes32 hash\n );\n\n /**\n * @dev Emitted when the existing proof is removed\n * @param account account address\n * @param hash proof hash\n */\n event AccountProofRemoved(\n address account,\n bytes32 hash\n );\n\n // external functions\n\n /**\n * @notice Adds a new account owner\n * @param owner owner address\n */\n function addAccountOwner(\n address owner\n )\n external\n {\n require(\n owner != address(0),\n \"ExternalAccountRegistry: cannot add 0x0 owner\"\n );\n\n require(\n !accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\n \"ExternalAccountRegistry: owner already exists\"\n );\n\n accounts[msg.sender].owners[owner].added = true;\n accounts[msg.sender].owners[owner].removedAtBlockNumber = 0;\n\n emit AccountOwnerAdded(\n msg.sender,\n owner\n );\n }\n\n /**\n * @notice Removes existing account owner\n * @param owner owner address\n */\n function removeAccountOwner(\n address owner\n )\n external\n {\n require(\n accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\n \"ExternalAccountRegistry: owner doesn't exist\"\n );\n\n accounts[msg.sender].owners[owner].removedAtBlockNumber = block.number;\n\n emit AccountOwnerRemoved(\n msg.sender,\n owner\n );\n }\n\n /**\n * @notice Adds a new account proof\n * @param hash proof hash\n */\n function addAccountProof(\n bytes32 hash\n )\n external\n {\n require(\n !accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\n \"ExternalAccountRegistry: proof already exists\"\n );\n\n accounts[msg.sender].proofs[hash].added = true;\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = 0;\n\n emit AccountProofAdded(\n msg.sender,\n hash\n );\n }\n\n /**\n * @notice Removes existing account proof\n * @param hash proof hash\n */\n function removeAccountProof(\n bytes32 hash\n )\n external\n {\n require(\n accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\n \"ExternalAccountRegistry: proof doesn't exist\"\n );\n\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = block.number;\n\n emit AccountProofRemoved(\n msg.sender,\n hash\n );\n }\n\n // external functions (views)\n\n /**\n * @notice Verifies the owner of the account at current block\n * @param account account address\n * @param owner owner address\n * @return true on correct account owner\n */\n function verifyAccountOwner(\n address account,\n address owner\n )\n external\n view\n returns (bool)\n {\n return accounts[account].owners[owner].verifyAtCurrentBlock();\n }\n\n /**\n * @notice Verifies the owner of the account at specific block\n * @param account account address\n * @param owner owner address\n * @param blockNumber block number to verify\n * @return true on correct account owner\n */\n function verifyAccountOwnerAtBlock(\n address account,\n address owner,\n uint256 blockNumber\n )\n external\n view\n returns (bool)\n {\n return accounts[account].owners[owner].verifyAtBlock(blockNumber);\n }\n\n /**\n * @notice Verifies the proof of the account at current block\n * @param account account address\n * @param hash proof hash\n * @return true on correct account proof\n */\n function verifyAccountProof(\n address account,\n bytes32 hash\n )\n external\n view\n returns (bool)\n {\n return accounts[account].proofs[hash].verifyAtCurrentBlock();\n }\n\n /**\n * @notice Verifies the proof of the account at specific block\n * @param account account address\n * @param hash proof hash\n * @param blockNumber block number to verify\n * @return true on correct account proof\n */\n function verifyAccountProofAtBlock(\n address account,\n bytes32 hash,\n uint256 blockNumber\n )\n external\n view\n returns (bool)\n {\n return accounts[account].proofs[hash].verifyAtBlock(blockNumber);\n }\n}\n" + }, + "src/personal/PersonalAccountRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../common/access/Guarded.sol\";\nimport \"../common/account/AccountController.sol\";\nimport \"../common/account/AccountRegistry.sol\";\nimport \"../common/libs/BlockLib.sol\";\nimport \"../common/libs/ECDSALib.sol\";\nimport \"../common/libs/ECDSAExtendedLib.sol\";\nimport \"../common/libs/SafeMathLib.sol\";\nimport \"../common/lifecycle/Initializable.sol\";\nimport \"../common/token/ERC20Token.sol\";\nimport \"../gateway/GatewayRecipient.sol\";\n\n\n/**\n * @title Personal account registry\n *\n * @notice A registry for personal (controlled by owners) accounts\n *\n * @author Stanisław Głogowski \n */\ncontract PersonalAccountRegistry is Guarded, AccountController, AccountRegistry, Initializable, GatewayRecipient {\n using BlockLib for BlockLib.BlockRelated;\n using SafeMathLib for uint256;\n using ECDSALib for bytes32;\n using ECDSAExtendedLib for bytes;\n\n struct Account {\n bool deployed;\n bytes32 salt;\n mapping(address => BlockLib.BlockRelated) owners;\n }\n\n mapping(address => Account) private accounts;\n\n // events\n\n /**\n * @dev Emitted when the new owner is added\n * @param account account address\n * @param owner owner address\n */\n event AccountOwnerAdded(\n address account,\n address owner\n );\n\n /**\n * @dev Emitted when the existing owner is removed\n * @param account account address\n * @param owner owner address\n */\n event AccountOwnerRemoved(\n address account,\n address owner\n );\n\n /**\n * @dev Emitted when the call is refunded\n * @param account account address\n * @param beneficiary beneficiary address\n * @param token token address\n * @param value value\n */\n event AccountCallRefunded(\n address account,\n address beneficiary,\n address token,\n uint256 value\n );\n\n /**\n * @dev Public constructor\n */\n constructor() public Initializable() {}\n\n // external functions\n\n /**\n * @notice Initializes `PersonalAccountRegistry` contract\n * @param guardians_ array of guardians addresses\n * @param accountImplementation_ account implementation address\n * @param gateway_ `Gateway` contract address\n */\n function initialize(\n address[] calldata guardians_,\n address accountImplementation_,\n address gateway_\n )\n external\n onlyInitializer\n {\n // Guarded\n _initializeGuarded(guardians_);\n\n // AccountController\n _initializeAccountController(address(this), accountImplementation_);\n\n // GatewayRecipient\n _initializeGatewayRecipient(gateway_);\n }\n\n /**\n * @notice Upgrades `PersonalAccountRegistry` contract\n * @param accountImplementation_ account implementation address\n */\n function upgrade(\n address accountImplementation_\n )\n external\n onlyGuardian\n {\n _setAccountImplementation(accountImplementation_, true);\n }\n\n /**\n * @notice Deploys account\n * @param account account address\n */\n function deployAccount(\n address account\n )\n external\n {\n _verifySender(account);\n _deployAccount(account);\n }\n\n /**\n * @notice Upgrades account\n * @param account account address\n */\n function upgradeAccount(\n address account\n )\n external\n {\n _verifySender(account);\n _upgradeAccount(account, true);\n }\n\n /**\n * @notice Adds a new account owner\n * @param account account address\n * @param owner owner address\n */\n function addAccountOwner(\n address account,\n address owner\n )\n external\n {\n _verifySender(account);\n\n require(\n owner != address(0),\n \"PersonalAccountRegistry: cannot add 0x0 owner\"\n );\n\n require(\n !accounts[account].owners[owner].verifyAtCurrentBlock(),\n \"PersonalAccountRegistry: owner already exists\"\n );\n\n accounts[account].owners[owner].added = true;\n accounts[account].owners[owner].removedAtBlockNumber = 0;\n\n emit AccountOwnerAdded(\n account,\n owner\n );\n }\n\n /**\n * @notice Removes the existing account owner\n * @param account account address\n * @param owner owner address\n */\n function removeAccountOwner(\n address account,\n address owner\n )\n external\n {\n address sender = _verifySender(account);\n\n require(\n owner != sender,\n \"PersonalAccountRegistry: cannot remove self\"\n );\n\n require(\n accounts[account].owners[owner].verifyAtCurrentBlock(),\n \"PersonalAccountRegistry: owner doesn't exist\"\n );\n\n accounts[account].owners[owner].removedAtBlockNumber = block.number;\n\n emit AccountOwnerRemoved(\n account,\n owner\n );\n }\n\n /**\n * @notice Executes account transaction\n * @dev Deploys an account if not deployed yet\n * @param account account address\n * @param to to address\n * @param value value\n * @param data data\n */\n function executeAccountTransaction(\n address account,\n address to,\n uint256 value,\n bytes calldata data\n )\n external\n {\n _verifySender(account);\n\n _deployAccount(account);\n\n _executeAccountTransaction(\n account,\n to,\n value,\n data,\n true\n );\n }\n\n /**\n * @notice Refunds account call\n * @dev Deploys an account if not deployed yet\n * @param account account address\n * @param token token address\n * @param value value\n */\n function refundAccountCall(\n address account,\n address token,\n uint256 value\n )\n external\n {\n _verifySender(account);\n\n _deployAccount(account);\n\n /* solhint-disable avoid-tx-origin */\n\n if (token == address(0)) {\n _executeAccountTransaction(\n account,\n tx.origin,\n value,\n new bytes(0),\n false\n );\n } else {\n bytes memory response = _executeAccountTransaction(\n account,\n token,\n 0,\n abi.encodeWithSelector(\n ERC20Token(token).transfer.selector,\n tx.origin,\n value\n ),\n false\n );\n\n if (response.length > 0) {\n require(\n abi.decode(response, (bool)),\n \"PersonalAccountRegistry: ERC20Token transfer reverted\"\n );\n }\n }\n\n emit AccountCallRefunded(\n account,\n tx.origin,\n token,\n value\n );\n\n /* solhint-enable avoid-tx-origin */\n }\n\n // external functions (views)\n\n /**\n * @notice Computes account address\n * @param saltOwner salt owner address\n * @return account address\n */\n function computeAccountAddress(\n address saltOwner\n )\n external\n view\n returns (address)\n {\n return _computeAccountAddress(saltOwner);\n }\n\n /**\n * @notice Checks if account is deployed\n * @param account account address\n * @return true when account is deployed\n */\n function isAccountDeployed(\n address account\n )\n external\n view\n returns (bool)\n {\n return accounts[account].deployed;\n }\n\n /**\n * @notice Verifies the owner of the account at the current block\n * @param account account address\n * @param owner owner address\n * @return true on correct account owner\n */\n function verifyAccountOwner(\n address account,\n address owner\n )\n external\n view\n returns (bool)\n {\n return _verifyAccountOwner(account, owner);\n }\n\n /**\n * @notice Verifies the owner of the account at a specific block\n * @param account account address\n * @param owner owner address\n * @param blockNumber block number to verify\n * @return true on correct account owner\n */\n function verifyAccountOwnerAtBlock(\n address account,\n address owner,\n uint256 blockNumber\n )\n external\n view\n returns (bool)\n {\n bool result = false;\n\n if (_verifyAccountOwner(account, owner)) {\n result = true;\n } else {\n result = accounts[account].owners[owner].verifyAtBlock(blockNumber);\n }\n\n return result;\n }\n\n /**\n * @notice Verifies account signature\n * @param account account address\n * @param messageHash message hash\n * @param signature signature\n * @return magic hash if valid\n */\n function isValidAccountSignature(\n address account,\n bytes32 messageHash,\n bytes calldata signature\n )\n override\n external\n view\n returns (bool)\n {\n return _verifyAccountOwner(\n account,\n messageHash.recoverAddress(signature)\n );\n }\n\n /**\n * @notice Verifies account signature\n * @param account account address\n * @param message message\n * @param signature signature\n * @return magic hash if valid\n */\n function isValidAccountSignature(\n address account,\n bytes calldata message,\n bytes calldata signature\n )\n override\n external\n view\n returns (bool)\n {\n return _verifyAccountOwner(\n account,\n message.toEthereumSignedMessageHash().recoverAddress(signature)\n );\n }\n\n // private functions\n\n function _verifySender(\n address account\n )\n private\n returns (address)\n {\n address sender = _getContextSender();\n\n if (accounts[account].owners[sender].added) {\n require(\n accounts[account].owners[sender].removedAtBlockNumber == 0,\n \"PersonalAccountRegistry: sender is not the account owner\"\n );\n } else {\n require(\n accounts[account].salt == 0,\n \"PersonalAccountRegistry: sender is not the account owner\"\n );\n\n bytes32 salt = keccak256(\n abi.encodePacked(sender)\n );\n\n require(\n account == _computeAccountAddress(salt),\n \"PersonalAccountRegistry: sender is not the account owner\"\n );\n\n accounts[account].salt = salt;\n accounts[account].owners[sender].added = true;\n\n emit AccountOwnerAdded(\n account,\n sender\n );\n }\n\n return sender;\n }\n\n function _deployAccount(\n address account\n )\n internal\n {\n if (!accounts[account].deployed) {\n _deployAccount(\n accounts[account].salt,\n true\n );\n\n accounts[account].deployed = true;\n }\n }\n\n // private functions (views)\n\n function _computeAccountAddress(\n address saltOwner\n )\n private\n view\n returns (address)\n {\n bytes32 salt = keccak256(\n abi.encodePacked(saltOwner)\n );\n\n return _computeAccountAddress(salt);\n }\n\n function _verifyAccountOwner(\n address account,\n address owner\n )\n private\n view\n returns (bool)\n {\n bool result;\n\n if (accounts[account].owners[owner].added) {\n result = accounts[account].owners[owner].removedAtBlockNumber == 0;\n } else if (accounts[account].salt == 0) {\n result = account == _computeAccountAddress(owner);\n }\n\n return result;\n }\n}\n" + }, + "src/gateway/GatewayRecipient.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../common/libs/BytesLib.sol\";\n\n\n/**\n * @title Gateway recipient\n *\n * @notice Gateway target contract\n *\n * @author Stanisław Głogowski \n */\ncontract GatewayRecipient {\n using BytesLib for bytes;\n\n address public gateway;\n\n /**\n * @dev internal constructor\n */\n constructor() internal {}\n\n // internal functions\n\n /**\n * @notice Initializes `GatewayRecipient` contract\n * @param gateway_ `Gateway` contract address\n */\n function _initializeGatewayRecipient(\n address gateway_\n )\n internal\n {\n gateway = gateway_;\n }\n\n // internal functions (views)\n\n /**\n * @notice Gets gateway context account\n * @return context account address\n */\n function _getContextAccount()\n internal\n view\n returns (address)\n {\n return _getContextAddress(40);\n }\n\n /**\n * @notice Gets gateway context sender\n * @return context sender address\n */\n function _getContextSender()\n internal\n view\n returns (address)\n {\n return _getContextAddress(20);\n }\n\n /**\n * @notice Gets gateway context data\n * @return context data\n */\n function _getContextData()\n internal\n view\n returns (bytes calldata)\n {\n bytes calldata result;\n\n if (_isGatewaySender()) {\n result = msg.data[:msg.data.length - 40];\n } else {\n result = msg.data;\n }\n\n return result;\n }\n\n // private functions (views)\n\n function _getContextAddress(\n uint256 offset\n )\n private\n view\n returns (address)\n {\n address result = address(0);\n\n if (_isGatewaySender()) {\n uint from = msg.data.length - offset;\n result = bytes(msg.data[from:from + 20]).toAddress();\n } else {\n result = msg.sender;\n }\n\n return result;\n }\n\n function _isGatewaySender()\n private\n view\n returns (bool)\n {\n bool result;\n\n if (msg.sender == gateway) {\n require(\n msg.data.length >= 44,\n \"GatewayRecipient: invalid msg.data\"\n );\n\n result = true;\n }\n\n return result;\n }\n}\n" + }, + "src/common/libs/BlockLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Block library\n *\n * @author Stanisław Głogowski \n */\nlibrary BlockLib {\n struct BlockRelated {\n bool added;\n uint256 removedAtBlockNumber;\n }\n\n /**\n * @notice Verifies self struct at current block\n * @param self self struct\n * @return true on correct self struct\n */\n function verifyAtCurrentBlock(\n BlockRelated memory self\n )\n internal\n view\n returns (bool)\n {\n return verifyAtBlock(self, block.number);\n }\n\n /**\n * @notice Verifies self struct at any block\n * @param self self struct\n * @return true on correct self struct\n */\n function verifyAtAnyBlock(\n BlockRelated memory self\n )\n internal\n pure\n returns (bool)\n {\n return verifyAtBlock(self, 0);\n }\n\n /**\n * @notice Verifies self struct at specific block\n * @param self self struct\n * @param blockNumber block number to verify\n * @return true on correct self struct\n */\n function verifyAtBlock(\n BlockRelated memory self,\n uint256 blockNumber\n )\n internal\n pure\n returns (bool)\n {\n bool result = false;\n\n if (self.added) {\n if (self.removedAtBlockNumber == 0) {\n result = true;\n } else if (blockNumber == 0) {\n result = true;\n } else {\n result = self.removedAtBlockNumber > blockNumber;\n }\n }\n\n return result;\n }\n}\n" + }, + "src/common/account/AccountController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"./Account.sol\";\n\n\n/**\n * @title Account controller\n *\n * @dev Contract module which provides Account deployment mechanism\n *\n * @author Stanisław Głogowski \n */\ncontract AccountController {\n address public accountRegistry;\n address public accountImplementation;\n\n // events\n\n /**\n * @dev Emitted when the account registry is updated\n * @param accountRegistry account registry address\n */\n event AccountRegistryUpdated(\n address accountRegistry\n );\n\n /**\n * @dev Emitted when the account implementation is updated\n * @param accountImplementation account implementation address\n */\n event AccountImplementationUpdated(\n address accountImplementation\n );\n\n /**\n * @dev Emitted when the account is deployed\n * @param account account address\n * @param accountImplementation account implementation address\n */\n event AccountDeployed(\n address account,\n address accountImplementation\n );\n\n /**\n * @dev Emitted when the account is upgraded\n * @param account account address\n * @param accountImplementation account implementation address\n */\n event AccountUpgraded(\n address account,\n address accountImplementation\n );\n\n /**\n * @dev Emitted when the transaction is executed\n * @param account account address\n * @param to to address\n * @param value value\n * @param data data\n * @param response response\n */\n event AccountTransactionExecuted(\n address account,\n address to,\n uint256 value,\n bytes data,\n bytes response\n );\n\n /**\n * @dev Internal constructor\n */\n constructor() internal {}\n\n // internal functions\n\n /**\n * @notice Initializes `AccountController` contract\n * @param accountRegistry_ account registry address\n * @param accountImplementation_ account implementation address\n */\n function _initializeAccountController(\n address accountRegistry_,\n address accountImplementation_\n )\n internal\n {\n _setAccountRegistry(accountRegistry_, false);\n _setAccountImplementation(accountImplementation_, false);\n }\n\n /**\n * @notice Sets account registry\n * @param accountRegistry_ account registry address\n * @param emitEvent it will emit event when flag is set to true\n */\n function _setAccountRegistry(\n address accountRegistry_,\n bool emitEvent\n )\n internal\n {\n require(\n accountRegistry_ != address(0),\n \"AccountController: cannot set account registry to 0x0\"\n );\n\n accountRegistry = accountRegistry_;\n\n if (emitEvent) {\n emit AccountRegistryUpdated(accountRegistry);\n }\n }\n\n /**\n * @notice Sets account implementation\n * @param accountImplementation_ account implementation address\n * @param emitEvent it will emit event when flag is set to true\n */\n function _setAccountImplementation(\n address accountImplementation_,\n bool emitEvent\n )\n internal\n {\n require(\n accountImplementation_ != address(0),\n \"AccountController: cannot set account Implementation to 0x0\"\n );\n\n accountImplementation = accountImplementation_;\n\n if (emitEvent) {\n emit AccountImplementationUpdated(accountImplementation);\n }\n }\n\n /**\n * @notice Deploys account\n * @param salt CREATE2 salt\n * @param emitEvent it will emit event when flag is set to true\n * @return account address\n */\n function _deployAccount(\n bytes32 salt,\n bool emitEvent\n )\n internal\n returns (address)\n {\n address account = address(new Account{salt: salt}(\n accountRegistry,\n accountImplementation\n ));\n\n if (emitEvent) {\n emit AccountDeployed(\n account,\n accountImplementation\n );\n }\n\n return account;\n }\n\n /**\n * @notice Upgrades account\n * @param account account address\n * @param emitEvent it will emit event when flag is set to true\n */\n function _upgradeAccount(\n address account,\n bool emitEvent\n )\n internal\n {\n require(\n Account(payable(account)).implementation() != accountImplementation,\n \"AccountController: account already upgraded\"\n );\n\n Account(payable(account)).setImplementation(accountImplementation);\n\n if (emitEvent) {\n emit AccountUpgraded(\n account,\n accountImplementation\n );\n }\n }\n\n /**\n * @notice Executes transaction from the account\n * @param account account address\n * @param to to address\n * @param value value\n * @param data data\n * @param emitEvent it will emit event when flag is set to true\n * @return transaction result\n */\n function _executeAccountTransaction(\n address account,\n address to,\n uint256 value,\n bytes memory data,\n bool emitEvent\n )\n internal\n returns (bytes memory)\n {\n require(\n to != address(0),\n \"AccountController: cannot send to 0x0\"\n );\n\n require(\n to != address(this),\n \"AccountController: cannot send to controller\"\n );\n\n require(\n to != account,\n \"AccountController: cannot send to self\"\n );\n\n bytes memory response = Account(payable(account)).executeTransaction(\n to,\n value,\n data\n );\n\n if (emitEvent) {\n emit AccountTransactionExecuted(\n account,\n to,\n value,\n data,\n response\n );\n }\n\n return response;\n }\n\n // internal functions (views)\n\n /**\n * @notice Computes account CREATE2 address\n * @param salt CREATE2 salt\n * @return account address\n */\n function _computeAccountAddress(\n bytes32 salt\n )\n internal\n view\n returns (address)\n {\n bytes memory creationCode = abi.encodePacked(\n type(Account).creationCode,\n bytes12(0),\n accountRegistry,\n bytes12(0),\n accountImplementation\n );\n\n bytes32 data = keccak256(\n abi.encodePacked(\n bytes1(0xff),\n address(this),\n salt,\n keccak256(creationCode)\n )\n );\n\n return address(uint160(uint256(data)));\n }\n}\n" + }, + "src/common/account/AccountRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"./Account.sol\";\n\n\n/**\n * @title Account registry\n *\n * @author Stanisław Głogowski \n */\nabstract contract AccountRegistry {\n /**\n * @notice Verifies account signature\n * @param account account address\n * @param messageHash message hash\n * @param signature signature\n * @return true if valid\n */\n function isValidAccountSignature(\n address account,\n bytes32 messageHash,\n bytes calldata signature\n )\n virtual\n external\n view\n returns (bool);\n\n /**\n * @notice Verifies account signature\n * @param account account address\n * @param message message\n * @param signature signature\n * @return true if valid\n */\n function isValidAccountSignature(\n address account,\n bytes calldata message,\n bytes calldata signature\n )\n virtual\n external\n view\n returns (bool);\n}\n" + }, + "src/common/libs/ECDSAExtendedLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"./StringsLib.sol\";\n\n\n/**\n * @title ECDSA extended library\n */\nlibrary ECDSAExtendedLib {\n using StringsLib for uint;\n\n function toEthereumSignedMessageHash(\n bytes memory message\n )\n internal\n pure\n returns (bytes32)\n {\n return keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n\",\n message.length.toString(),\n abi.encodePacked(message)\n ));\n }\n}\n" + }, + "src/common/account/Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../access/Controlled.sol\";\nimport \"./AccountBase.sol\";\n\n\n/**\n * @title Account\n *\n * @author Stanisław Głogowski \n */\ncontract Account is Controlled, AccountBase {\n address public implementation;\n\n /**\n * @dev Public constructor\n * @param registry_ account registry address\n * @param implementation_ account implementation address\n */\n constructor(\n address registry_,\n address implementation_\n )\n public\n Controlled()\n {\n registry = registry_;\n implementation = implementation_;\n }\n\n // external functions\n\n /**\n * @notice Payable receive\n */\n receive()\n external\n payable\n {\n //\n }\n\n /**\n * @notice Fallback\n */\n // solhint-disable-next-line payable-fallback\n fallback()\n external\n {\n if (msg.data.length != 0) {\n address implementation_ = implementation;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let calldedatasize := calldatasize()\n\n calldatacopy(0, 0, calldedatasize)\n\n let result := delegatecall(gas(), implementation_, 0, calldedatasize, 0, 0)\n let returneddatasize := returndatasize()\n\n returndatacopy(0, 0, returneddatasize)\n\n switch result\n case 0 { revert(0, returneddatasize) }\n default { return(0, returneddatasize) }\n }\n }\n }\n\n /**\n * @notice Sets implementation\n * @param implementation_ implementation address\n */\n function setImplementation(\n address implementation_\n )\n external\n onlyController\n {\n implementation = implementation_;\n }\n\n /**\n * @notice Executes transaction\n * @param to to address\n * @param value value\n * @param data data\n * @return transaction result\n */\n function executeTransaction(\n address to,\n uint256 value,\n bytes calldata data\n )\n external\n onlyController\n returns (bytes memory)\n {\n bytes memory result;\n bool succeeded;\n\n // solhint-disable-next-line avoid-call-value, avoid-low-level-calls\n (succeeded, result) = payable(to).call{value: value}(data);\n\n require(\n succeeded,\n \"Account: transaction reverted\"\n );\n\n return result;\n }\n}\n" + }, + "src/common/account/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Account base\n *\n * @author Stanisław Głogowski \n */\ncontract AccountBase {\n address public registry;\n}\n" + }, + "src/common/libs/StringsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Strings library\n *\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/utils/Strings.sol#L12\n */\nlibrary StringsLib {\n function toString(\n uint256 value\n )\n internal\n pure\n returns (string memory)\n {\n if (value == 0) {\n return \"0\";\n }\n\n uint256 temp = value;\n uint256 digits;\n\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n\n bytes memory buffer = new bytes(digits);\n uint256 index = digits - 1;\n temp = value;\n\n while (temp != 0) {\n buffer[index--] = byte(uint8(48 + temp % 10));\n temp /= 10;\n }\n\n return string(buffer);\n }\n}\n" + }, + "src/common/libs/BytesLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Bytes library\n *\n * @author Stanisław Głogowski \n */\nlibrary BytesLib {\n /**\n * @notice Converts bytes to address\n * @param data data\n * @return address\n */\n function toAddress(\n bytes memory data\n )\n internal\n pure\n returns (address)\n {\n address result;\n\n require(\n data.length == 20,\n \"BytesLib: invalid data length\"\n );\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n result := div(mload(add(data, 0x20)), 0x1000000000000000000000000)\n }\n\n return result;\n }\n}\n" + }, + "src/tokens/WrappedWeiToken.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../common/lifecycle/Initializable.sol\";\nimport \"../common/token/ERC20Token.sol\";\nimport \"../gateway/GatewayRecipient.sol\";\n\n\n/**\n * @title Wrapped wei token\n *\n * @notice One to one wei consumable ERC20 token\n *\n * @dev After the transfer to consumer's account is done, the token will be automatically burned and withdrawn.\n *\n * Use `startConsuming` to become a consumer.\n *\n * @author Stanisław Głogowski \n */\ncontract WrappedWeiToken is Initializable, ERC20Token, GatewayRecipient {\n mapping(address => bool) private consumers;\n\n // events\n\n /**\n * @dev Emitted when the new consumer is added\n * @param consumer consumer address\n */\n event ConsumerAdded(\n address consumer\n );\n\n /**\n * @dev Emitted when the existing consumer is removed\n * @param consumer consumer address\n */\n event ConsumerRemoved(\n address consumer\n );\n\n /**\n * @dev Public constructor\n */\n constructor()\n public\n Initializable()\n {\n name = \"Wrapped Wei\";\n symbol = \"WWEI\";\n }\n\n /**\n * @notice Receive fallback\n */\n receive()\n external\n payable\n {\n _mint(_getSender(), msg.value);\n }\n\n // external functions\n\n /**\n * @notice Initializes `WrappedWeiToken` contract\n * @param consumers_ array of consumers addresses\n * @param gateway_ `Gateway` contract address\n */\n function initialize(\n address[] calldata consumers_,\n address gateway_\n )\n external\n onlyInitializer\n {\n if (consumers_.length != 0) {\n uint consumersLen = consumers_.length;\n for (uint i = 0; i < consumersLen; i++) {\n _addConsumer(consumers_[i]);\n }\n }\n\n _initializeGatewayRecipient(gateway_);\n }\n\n /**\n * @notice Starts consuming\n * @dev Add caller as a consumer\n */\n function startConsuming()\n external\n {\n _addConsumer(_getSender());\n }\n\n /**\n * @notice Stops consuming\n * @dev Remove caller from consumers\n */\n function stopConsuming()\n external\n {\n address consumer = _getSender();\n\n require(\n consumers[consumer],\n \"WrappedWeiToken: consumer doesn't exist\"\n );\n\n consumers[consumer] = false;\n\n emit ConsumerRemoved(consumer);\n }\n\n /**\n * @notice Deposits `msg.value` to address\n * @param to to address\n */\n function depositTo(\n address to\n )\n external\n payable\n {\n _mint(to, msg.value);\n }\n\n /**\n * @notice Withdraws\n * @param value value to withdraw\n */\n function withdraw(\n uint256 value\n )\n external\n {\n _withdraw(_getSender(), _getSender(), value);\n }\n\n /**\n * @notice Withdraws to address\n * @param to to address\n * @param value value to withdraw\n */\n function withdrawTo(\n address to,\n uint256 value\n )\n external\n {\n _withdraw(_getSender(), to, value);\n }\n\n /**\n * @notice Withdraws all\n */\n function withdrawAll()\n external\n {\n address sender = _getSender();\n\n _withdraw(sender, sender, balances[sender]);\n }\n\n /**\n * @notice Withdraws all to address\n * @param to to address\n */\n function withdrawAllTo(\n address to\n )\n external\n {\n address sender = _getSender();\n\n _withdraw(sender, to, balances[sender]);\n }\n\n // external functions (views)\n\n /**\n * @notice Checks if consumer exists\n * @param consumer consumer address\n * @return true if consumer exists\n */\n function isConsumer(\n address consumer\n )\n external\n view\n returns (bool)\n {\n return consumers[consumer];\n }\n\n // internal functions\n\n function _transfer(\n address from,\n address to,\n uint256 value\n )\n override\n internal\n {\n if (consumers[to]) {\n _withdraw(from, to, value);\n } else {\n super._transfer(from, to, value);\n }\n }\n\n // internal functions (views)\n\n function _getSender()\n override\n internal\n view\n returns (address)\n {\n return _getContextAccount();\n }\n\n // private functions\n\n function _addConsumer(\n address consumer\n )\n private\n {\n require(\n !consumers[consumer],\n \"WrappedWeiToken: consumer already exists\"\n );\n\n consumers[consumer] = true;\n\n emit ConsumerAdded(consumer);\n }\n\n function _withdraw(\n address from,\n address to,\n uint256 value\n )\n private\n {\n _burn(from, value);\n\n require(\n // solhint-disable-next-line check-send-result\n payable(to).send(value),\n \"WrappedWeiToken: transaction reverted\"\n );\n }\n}\n" + }, + "src/gateway/Gateway.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\npragma experimental ABIEncoderV2;\n\nimport \"../common/libs/ECDSALib.sol\";\nimport \"../common/libs/SafeMathLib.sol\";\nimport \"../common/lifecycle/Initializable.sol\";\nimport \"../common/signature/SignatureValidator.sol\";\nimport \"../external/ExternalAccountRegistry.sol\";\nimport \"../personal/PersonalAccountRegistry.sol\";\n\n\n/**\n * @title Gateway\n *\n * @notice GSN replacement\n *\n * @author Stanisław Głogowski \n */\ncontract Gateway is Initializable, SignatureValidator {\n using ECDSALib for bytes32;\n using SafeMathLib for uint256;\n\n struct DelegatedBatch {\n address account;\n uint256 nonce;\n address[] to;\n bytes[] data;\n }\n\n struct DelegatedBatchWithGasPrice {\n address account;\n uint256 nonce;\n address[] to;\n bytes[] data;\n uint256 gasPrice;\n }\n\n bytes32 private constant HASH_PREFIX_DELEGATED_BATCH = keccak256(\n \"DelegatedBatch(address account,uint256 nonce,address[] to,bytes[] data)\"\n );\n\n bytes32 private constant HASH_PREFIX_DELEGATED_BATCH_WITH_GAS_PRICE = keccak256(\n \"DelegatedBatchWithGasPrice(address account,uint256 nonce,address[] to,bytes[] data,uint256 gasPrice)\"\n );\n\n ExternalAccountRegistry public externalAccountRegistry;\n PersonalAccountRegistry public personalAccountRegistry;\n\n mapping(address => uint256) private accountNonce;\n\n // events\n\n /**\n * @dev Emitted when the single batch is delegated\n * @param sender sender address\n * @param batch batch\n * @param succeeded if succeeded\n */\n event BatchDelegated(\n address sender,\n bytes batch,\n bool succeeded\n );\n\n /**\n * @dev Public constructor\n */\n constructor() public Initializable() SignatureValidator() {}\n\n // external functions\n\n /**\n * @notice Initializes `Gateway` contract\n * @param externalAccountRegistry_ `ExternalAccountRegistry` contract address\n * @param personalAccountRegistry_ `PersonalAccountRegistry` contract address\n */\n function initialize(\n ExternalAccountRegistry externalAccountRegistry_,\n PersonalAccountRegistry personalAccountRegistry_\n )\n external\n onlyInitializer\n {\n externalAccountRegistry = externalAccountRegistry_;\n personalAccountRegistry = personalAccountRegistry_;\n }\n\n // public functions\n\n /**\n * @notice Sends batch\n * @dev `GatewayRecipient` context api:\n * `_getContextAccount` will return `msg.sender`\n * `_getContextSender` will return `msg.sender`\n *\n * @param to array of batch recipients contracts\n * @param data array of batch data\n */\n function sendBatch(\n address[] memory to,\n bytes[] memory data\n )\n public\n {\n _sendBatch(\n msg.sender,\n msg.sender,\n to,\n data\n );\n }\n\n /**\n * @notice Sends batch from the account\n * @dev `GatewayRecipient` context api:\n * `_getContextAccount` will return `account` arg\n * `_getContextSender` will return `msg.sender`\n *\n * @param account account address\n * @param to array of batch recipients contracts\n * @param data array of batch data\n */\n function sendBatchFromAccount(\n address account,\n address[] memory to,\n bytes[] memory data\n )\n public\n {\n _sendBatch(\n account,\n msg.sender,\n to,\n data\n );\n }\n\n /**\n * @notice Delegates batch from the account\n * @dev Use `hashDelegatedBatch` to create sender message payload.\n *\n * `GatewayRecipient` context api:\n * `_getContextAccount` will return `account` arg\n * `_getContextSender` will return recovered address from `senderSignature` arg\n *\n * @param account account address\n * @param nonce next account nonce\n * @param to array of batch recipients contracts\n * @param data array of batch data\n * @param senderSignature sender signature\n */\n function delegateBatch(\n address account,\n uint256 nonce,\n address[] memory to,\n bytes[] memory data,\n bytes memory senderSignature\n )\n public\n {\n require(\n nonce > accountNonce[account],\n \"Gateway: nonce is lower than current account nonce\"\n );\n\n address sender = _hashDelegatedBatch(\n account,\n nonce,\n to,\n data\n ).recoverAddress(senderSignature);\n\n accountNonce[account] = nonce;\n\n _sendBatch(\n account,\n sender,\n to,\n data\n );\n }\n\n /**\n * @notice Delegates batch from the account (with gas price)\n *\n * @dev Use `hashDelegatedBatchWithGasPrice` to create sender message payload (tx.gasprice as gasPrice)\n *\n * `GatewayRecipient` context api:\n * `_getContextAccount` will return `account` arg\n * `_getContextSender` will return recovered address from `senderSignature` arg\n *\n * @param account account address\n * @param nonce next account nonce\n * @param to array of batch recipients contracts\n * @param data array of batch data\n * @param senderSignature sender signature\n */\n function delegateBatchWithGasPrice(\n address account,\n uint256 nonce,\n address[] memory to,\n bytes[] memory data,\n bytes memory senderSignature\n )\n public\n {\n require(\n nonce > accountNonce[account],\n \"Gateway: nonce is lower than current account nonce\"\n );\n\n address sender = _hashDelegatedBatchWithGasPrice(\n account,\n nonce,\n to,\n data,\n tx.gasprice\n ).recoverAddress(senderSignature);\n\n accountNonce[account] = nonce;\n\n _sendBatch(\n account,\n sender,\n to,\n data\n );\n }\n\n /**\n * @notice Delegates multiple batches\n * @dev It will revert when all batches fail\n * @param batches array of batches\n * @param revertOnFailure reverts on any error\n */\n function delegateBatches(\n bytes[] memory batches,\n bool revertOnFailure\n )\n public\n {\n require(\n batches.length > 0,\n \"Gateway: cannot delegate empty batches\"\n );\n\n bool anySucceeded;\n\n for (uint256 i = 0; i < batches.length; i++) {\n // solhint-disable-next-line avoid-low-level-calls\n (bool succeeded,) = address(this).call(batches[i]);\n\n if (revertOnFailure) {\n require(\n succeeded,\n \"Gateway: batch reverted\"\n );\n } else if (succeeded && !anySucceeded) {\n anySucceeded = true;\n }\n\n emit BatchDelegated(\n msg.sender,\n batches[i],\n succeeded\n );\n }\n\n if (!anySucceeded) {\n revert(\"Gateway: all batches reverted\");\n }\n }\n\n // public functions (views)\n\n /**\n * @notice Hashes `DelegatedBatch` message payload\n * @param delegatedBatch struct\n * @return hash\n */\n function hashDelegatedBatch(\n DelegatedBatch memory delegatedBatch\n )\n public\n view\n returns (bytes32)\n {\n return _hashDelegatedBatch(\n delegatedBatch.account,\n delegatedBatch.nonce,\n delegatedBatch.to,\n delegatedBatch.data\n );\n }\n\n /**\n * @notice Hashes `DelegatedBatchWithGasPrice` message payload\n * @param delegatedBatch struct\n * @return hash\n */\n function hashDelegatedBatchWithGasPrice(\n DelegatedBatchWithGasPrice memory delegatedBatch\n )\n public\n view\n returns (bytes32)\n {\n return _hashDelegatedBatchWithGasPrice(\n delegatedBatch.account,\n delegatedBatch.nonce,\n delegatedBatch.to,\n delegatedBatch.data,\n delegatedBatch.gasPrice\n );\n }\n\n // external functions (views)\n\n /**\n * @notice Gets next account nonce\n * @param account account address\n * @return next nonce\n */\n function getAccountNextNonce(\n address account\n )\n external\n view\n returns (uint256)\n {\n return accountNonce[account].add(1);\n }\n\n // private functions\n\n function _sendBatch(\n address account,\n address sender,\n address[] memory to,\n bytes[] memory data\n )\n private\n {\n require(\n account != address(0),\n \"Gateway: cannot send from 0x0 account\"\n );\n require(\n to.length > 0,\n \"Gateway: cannot send empty batch\"\n );\n require(\n data.length == to.length,\n \"Gateway: invalid batch\"\n );\n\n if (account != sender) {\n require(\n personalAccountRegistry.verifyAccountOwner(account, sender) ||\n externalAccountRegistry.verifyAccountOwner(account, sender),\n \"Gateway: sender is not the account owner\"\n );\n }\n\n bool succeeded;\n\n for (uint256 i = 0; i < data.length; i++) {\n require(\n to[i] != address(0),\n \"Gateway: cannot send to 0x0\"\n );\n\n // solhint-disable-next-line avoid-low-level-calls\n (succeeded,) = to[i].call(abi.encodePacked(data[i], account, sender));\n\n require(\n succeeded,\n \"Gateway: batch transaction reverted\"\n );\n }\n }\n\n // private functions (views)\n\n function _hashDelegatedBatch(\n address account,\n uint256 nonce,\n address[] memory to,\n bytes[] memory data\n )\n private\n view\n returns (bytes32)\n {\n return _hashMessagePayload(HASH_PREFIX_DELEGATED_BATCH, abi.encodePacked(\n account,\n nonce,\n to,\n _concatBytes(data)\n ));\n }\n\n function _hashDelegatedBatchWithGasPrice(\n address account,\n uint256 nonce,\n address[] memory to,\n bytes[] memory data,\n uint256 gasPrice\n )\n private\n view\n returns (bytes32)\n {\n return _hashMessagePayload(HASH_PREFIX_DELEGATED_BATCH_WITH_GAS_PRICE, abi.encodePacked(\n account,\n nonce,\n to,\n _concatBytes(data),\n gasPrice\n ));\n }\n\n// private functions (pure)\n\n function _concatBytes(bytes[] memory data)\n private\n pure\n returns (bytes memory)\n {\n bytes memory result;\n uint dataLen = data.length;\n\n for (uint i = 0 ; i < dataLen ; i++) {\n result = abi.encodePacked(result, data[i]);\n }\n\n return result;\n }\n}\n" + }, + "src/ens/ENSController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\npragma experimental ABIEncoderV2;\n\nimport \"../common/access/Guarded.sol\";\nimport \"../common/lifecycle/Initializable.sol\";\nimport \"../common/signature/SignatureValidator.sol\";\nimport \"../gateway/GatewayRecipient.sol\";\nimport \"./resolvers/ENSAddressResolver.sol\";\nimport \"./resolvers/ENSNameResolver.sol\";\nimport \"./resolvers/ENSPubKeyResolver.sol\";\nimport \"./resolvers/ENSTextResolver.sol\";\nimport \"./ENSRegistry.sol\";\n\n\n/**\n * @title ENS controller\n *\n * @notice ENS subnode registrar\n *\n * @dev The process of adding root node consists of 3 steps:\n * 1. `submitNode` - should be called from ENS node owner,\n * 2. Change ENS node owner in ENS registry to ENS controller,\n * 3. `verifyNode` - should be called from previous ENS node owner,\n *\n * To register sub node, `msg.sender` need to send valid signature from one of guardian key.\n * Once registration is complete `msg.sender` becoming both node owner and `addr` record value.\n *\n * After registration sub node cannot be replaced.\n *\n * @author Stanisław Głogowski \n */\ncontract ENSController is Guarded, Initializable, SignatureValidator, GatewayRecipient, ENSAddressResolver, ENSNameResolver, ENSPubKeyResolver, ENSTextResolver {\n struct SubNodeRegistration {\n address account;\n bytes32 node;\n bytes32 label;\n }\n\n bytes4 private constant INTERFACE_META_ID = bytes4(keccak256(abi.encodePacked(\"supportsInterface(bytes4)\")));\n\n bytes32 private constant HASH_PREFIX_SUB_NODE_REGISTRATION = keccak256(\n \"SubNodeRegistration(address account,bytes32 node,bytes32 label)\"\n );\n\n ENSRegistry public registry;\n\n mapping(bytes32 => address) public nodeOwners;\n\n // events\n\n /**\n * @dev Emitted when new node is submitted\n * @param node node name hash\n * @param owner owner address\n */\n event NodeSubmitted(\n bytes32 node,\n address owner\n );\n\n /**\n * @dev Emitted when the existing owner is verified\n * @param node node name hash\n */\n event NodeVerified(\n bytes32 node\n );\n\n /**\n * @dev Emitted when new node is released\n * @param node node name hash\n * @param owner owner address\n */\n event NodeReleased(\n bytes32 node,\n address owner\n );\n\n /**\n * @dev Emitted when ENS registry address is changed\n * @param registry registry address\n */\n event RegistryChanged(\n address registry\n );\n\n /**\n * @dev Public constructor\n */\n constructor() public Guarded() Initializable() SignatureValidator() {}\n\n // external functions\n\n /**\n * @notice Initializes `ENSController` contract\n * @param registry_ ENS registry address\n * @param gateway_ gateway address\n */\n function initialize(\n ENSRegistry registry_,\n address[] calldata guardians_,\n address gateway_\n )\n external\n onlyInitializer\n {\n require(\n address(registry_) != address(0),\n \"ENSController: cannot set 0x0 registry\"\n );\n\n registry = registry_;\n\n // Guarded\n _initializeGuarded(guardians_);\n\n // GatewayRecipient\n _initializeGatewayRecipient(gateway_);\n }\n\n /**\n * @notice Sets registry\n * @param registry_ registry address\n */\n function setRegistry(\n ENSRegistry registry_\n )\n external\n onlyGuardian\n {\n require(\n address(registry_) != address(0),\n \"ENSController: cannot set 0x0 registry\"\n );\n\n require(\n registry_ != registry,\n \"ENSController: registry already set\"\n );\n\n registry = registry_;\n\n emit RegistryChanged(\n address(registry)\n );\n }\n\n /**\n * @notice Submits node\n * @dev Should be called from the current ENS node owner\n * @param node node name hash\n */\n function submitNode(\n bytes32 node\n )\n external\n {\n address owner = _getContextAccount();\n\n require(\n _addr(node) == address(0),\n \"ENSController: node already exists\"\n );\n\n require(\n nodeOwners[node] == address(0),\n \"ENSController: node already submitted\"\n );\n\n require(\n registry.owner(node) == owner,\n \"ENSController: invalid ens node owner\"\n );\n\n nodeOwners[node] = owner;\n\n emit NodeSubmitted(node, owner);\n }\n\n /**\n * @notice Verifies node\n * @dev Should be called from the previous ENS node owner\n * @param node node name hash\n */\n function verifyNode(\n bytes32 node\n )\n external\n {\n address owner = _getContextAccount();\n\n require(\n _addr(node) == address(0),\n \"ENSController: node already exists\"\n );\n\n require(\n nodeOwners[node] == owner,\n \"ENSController: invalid node owner\"\n );\n\n require(\n registry.owner(node) == address(this),\n \"ENSController: invalid ens node owner\"\n );\n\n _setAddr(node, address(this));\n\n registry.setResolver(node, address(this));\n\n emit NodeVerified(node);\n }\n\n /**\n * @notice Releases node\n * @dev Should be called from the previous ENS node owner\n * @param node node name hash\n */\n function releaseNode(\n bytes32 node\n )\n external\n {\n address owner = _getContextAccount();\n\n require(\n _addr(node) == address(this),\n \"ENSController: node doesn't exist\"\n );\n\n require(\n nodeOwners[node] == owner,\n \"ENSController: invalid node owner\"\n );\n\n registry.setOwner(node, owner);\n\n delete nodeOwners[node];\n\n emit NodeReleased(node, owner);\n }\n\n /**\n * @notice Sync address\n * @param node node name hash\n */\n function syncAddr(\n bytes32 node\n )\n external\n {\n address account = _getContextAccount();\n\n require(\n account == registry.owner(node),\n \"ENSController: caller is not the node owner\"\n );\n\n require(\n registry.resolver(node) == address(this),\n \"ENSController: invalid node resolver\"\n );\n\n require(\n _addr(node) == address(0),\n \"ENSController: node already in sync\"\n );\n\n _setAddr(node, account);\n }\n\n /**\n * @notice Registers sub node\n * @param node node name hash\n * @param label label hash\n * @param guardianSignature guardian signature\n */\n function registerSubNode(\n bytes32 node,\n bytes32 label,\n bytes calldata guardianSignature\n )\n external\n {\n address account = _getContextAccount();\n\n bytes32 messageHash = _hashSubNodeRegistration(\n account,\n node,\n label\n );\n\n require(\n _verifyGuardianSignature(messageHash, guardianSignature),\n \"ENSController: invalid guardian signature\"\n );\n\n bytes32 subNode = keccak256(\n abi.encodePacked(\n node,\n label\n )\n );\n\n require(\n _addr(node) == address(this),\n \"ENSController: invalid node\"\n );\n\n require(\n _addr(subNode) == address(0),\n \"ENSController: label already taken\"\n );\n\n registry.setSubnodeRecord(node, label, address(this), address(this), 0);\n registry.setOwner(subNode, account);\n\n _setAddr(subNode, account);\n }\n\n // external functions (pure)\n function supportsInterface(\n bytes4 interfaceID\n )\n external\n pure\n returns(bool)\n {\n return interfaceID == INTERFACE_META_ID ||\n interfaceID == INTERFACE_ADDR_ID ||\n interfaceID == INTERFACE_ADDRESS_ID ||\n interfaceID == INTERFACE_NAME_ID ||\n interfaceID == INTERFACE_PUB_KEY_ID ||\n interfaceID == INTERFACE_TEXT_ID;\n }\n\n // public functions (views)\n\n /**\n * @notice Hashes `SubNodeRegistration` message payload\n * @param subNodeRegistration struct\n * @return hash\n */\n function hashSubNodeRegistration(\n SubNodeRegistration memory subNodeRegistration\n )\n public\n view\n returns (bytes32)\n {\n return _hashSubNodeRegistration(\n subNodeRegistration.account,\n subNodeRegistration.node,\n subNodeRegistration.label\n );\n }\n\n // internal functions (views)\n\n function _isNodeOwner(\n bytes32 node\n )\n internal\n override\n view\n returns (bool)\n {\n return registry.owner(node) == _getContextAccount();\n }\n\n // private functions (views)\n\n function _hashSubNodeRegistration(\n address account,\n bytes32 node,\n bytes32 label\n )\n private\n view\n returns (bytes32)\n {\n return _hashMessagePayload(HASH_PREFIX_SUB_NODE_REGISTRATION, abi.encodePacked(\n account,\n node,\n label\n ));\n }\n}\n" + }, + "src/ens/resolvers/ENSAddressResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"./ENSAbstractResolver.sol\";\n\n\n/**\n * @title ENS abstract address resolver\n *\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/AddrResolver.sol\n */\nabstract contract ENSAddressResolver is ENSAbstractResolver {\n bytes4 internal constant INTERFACE_ADDR_ID = bytes4(keccak256(abi.encodePacked(\"addr(bytes32)\")));\n bytes4 internal constant INTERFACE_ADDRESS_ID = bytes4(keccak256(abi.encodePacked(\"addr(bytes32,uint)\")));\n\n uint internal constant COIN_TYPE_ETH = 60;\n\n mapping(bytes32 => mapping(uint => bytes)) internal resolverAddresses;\n\n // events\n\n event AddrChanged(\n bytes32 indexed node,\n address addr\n );\n\n event AddressChanged(\n bytes32 indexed node,\n uint coinType,\n bytes newAddress\n );\n\n // external functions\n\n function setAddr(\n bytes32 node,\n address addr_\n )\n external\n onlyNodeOwner(node)\n {\n _setAddr(node, addr_);\n }\n\n function setAddr(\n bytes32 node,\n uint coinType,\n bytes memory addr_\n )\n external\n onlyNodeOwner(node)\n {\n _setAddr(node, coinType, addr_);\n }\n\n // external functions (views)\n\n function addr(\n bytes32 node\n )\n external\n view\n returns (address)\n {\n return _addr(node);\n }\n\n function addr(\n bytes32 node,\n uint coinType\n )\n external\n view\n returns (bytes memory)\n {\n return resolverAddresses[node][coinType];\n }\n\n // internal functions\n\n function _setAddr(\n bytes32 node,\n address addr_\n )\n internal\n {\n _setAddr(node, COIN_TYPE_ETH, _addressToBytes(addr_));\n }\n\n function _setAddr(\n bytes32 node,\n uint coinType,\n bytes memory addr_\n )\n internal\n {\n emit AddressChanged(node, coinType, addr_);\n\n if(coinType == COIN_TYPE_ETH) {\n emit AddrChanged(node, _bytesToAddress(addr_));\n }\n\n resolverAddresses[node][coinType] = addr_;\n }\n\n // internal functions (views)\n\n function _addr(\n bytes32 node\n )\n internal\n view\n returns (address)\n {\n address result;\n\n bytes memory addr_ = resolverAddresses[node][COIN_TYPE_ETH];\n\n if (addr_.length > 0) {\n result = _bytesToAddress(addr_);\n }\n\n return result;\n }\n\n // private function (pure)\n\n function _bytesToAddress(\n bytes memory data\n )\n private\n pure\n returns(address payable)\n {\n address payable result;\n\n require(data.length == 20);\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n result := div(mload(add(data, 32)), exp(256, 12))\n }\n\n return result;\n }\n\n function _addressToBytes(\n address addr_\n )\n private\n pure\n returns(bytes memory)\n {\n bytes memory result = new bytes(20);\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(add(result, 32), mul(addr_, exp(256, 12)))\n }\n\n return result;\n }\n}\n" + }, + "src/ens/resolvers/ENSNameResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"./ENSAbstractResolver.sol\";\n\n\n/**\n * @title ENS abstract name resolver\n *\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/NameResolver.sol\n */\nabstract contract ENSNameResolver is ENSAbstractResolver {\n bytes4 internal constant INTERFACE_NAME_ID = bytes4(keccak256(abi.encodePacked(\"name(bytes32)\")));\n\n mapping(bytes32 => string) internal resolverNames;\n\n // events\n\n event NameChanged(\n bytes32 indexed node,\n string name\n );\n\n // external functions\n\n function setName(\n bytes32 node,\n string calldata name\n )\n external\n onlyNodeOwner(node)\n {\n resolverNames[node] = name;\n\n emit NameChanged(node, name);\n }\n\n // external functions (views)\n\n function name(\n bytes32 node\n )\n external\n view\n returns (string memory)\n {\n return resolverNames[node];\n }\n}\n" + }, + "src/ens/resolvers/ENSPubKeyResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"./ENSAbstractResolver.sol\";\n\n\n/**\n * @title ENS abstract pub key resolver\n *\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/PubkeyResolver.sol\n */\nabstract contract ENSPubKeyResolver is ENSAbstractResolver {\n bytes4 internal constant INTERFACE_PUB_KEY_ID = bytes4(keccak256(abi.encodePacked(\"pubkey(bytes32)\")));\n\n struct PubKey {\n bytes32 x;\n bytes32 y;\n }\n\n mapping(bytes32 => PubKey) internal resolverPubKeys;\n\n // events\n\n event PubkeyChanged(\n bytes32 indexed node,\n bytes32 x,\n bytes32 y\n );\n\n // external functions (views)\n\n function setPubkey(\n bytes32 node,\n bytes32 x,\n bytes32 y\n )\n external\n onlyNodeOwner(node)\n {\n resolverPubKeys[node] = PubKey(x, y);\n\n emit PubkeyChanged(node, x, y);\n }\n\n // external functions (views)\n\n function pubkey(\n bytes32 node\n )\n external\n view\n returns (bytes32 x, bytes32 y)\n {\n return (resolverPubKeys[node].x, resolverPubKeys[node].y);\n }\n}\n" + }, + "src/ens/resolvers/ENSTextResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"./ENSAbstractResolver.sol\";\n\n\n/**\n * @title ENS abstract text resolver\n *\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/TextResolver.sol\n */\nabstract contract ENSTextResolver is ENSAbstractResolver {\n bytes4 internal constant INTERFACE_TEXT_ID = bytes4(keccak256(abi.encodePacked(\"text(bytes32,string)\")));\n\n mapping(bytes32 => mapping(string => string)) internal resolverTexts;\n\n // events\n\n event TextChanged(\n bytes32 indexed node,\n string indexed indexedKey,\n string key\n );\n\n // external functions (views)\n\n function setText(\n bytes32 node,\n string calldata key,\n string calldata value\n )\n external\n onlyNodeOwner(node)\n {\n resolverTexts[node][key] = value;\n\n emit TextChanged(node, key, key);\n }\n\n // external functions (views)\n\n function text(\n bytes32 node,\n string calldata key\n )\n external\n view\n returns (string memory)\n {\n return resolverTexts[node][key];\n }\n}\n" + }, + "src/ens/ENSRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title ENS registry\n *\n * @dev Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ENSRegistry.sol\n */\ncontract ENSRegistry {\n struct Record {\n address owner;\n address resolver;\n uint64 ttl;\n }\n\n mapping (bytes32 => Record) private records;\n mapping (address => mapping(address => bool)) private operators;\n\n // events\n\n event NewOwner(\n bytes32 indexed node,\n bytes32 indexed label,\n address owner\n );\n\n event Transfer(\n bytes32 indexed node,\n address owner\n );\n\n event NewResolver(\n bytes32 indexed node,\n address resolver\n );\n\n event NewTTL(\n bytes32 indexed node,\n uint64 ttl\n );\n\n event ApprovalForAll(\n address indexed owner,\n address indexed operator,\n bool approved\n );\n\n // modifiers\n\n modifier authorised(\n bytes32 node\n )\n {\n address owner = records[node].owner;\n\n require(\n owner == msg.sender || operators[owner][msg.sender],\n \"ENSRegistry: reverted by authorised modifier\"\n );\n\n _;\n }\n\n /**\n * @dev Public constructor\n */\n constructor()\n public\n {\n // solhint-disable-next-line avoid-tx-origin\n records[0x0].owner = tx.origin;\n }\n\n // external functions\n\n function setRecord(\n bytes32 node,\n address owner_,\n address resolver_,\n uint64 ttl_\n )\n external\n {\n setOwner(node, owner_);\n\n _setResolverAndTTL(node, resolver_, ttl_);\n }\n\n function setTTL(\n bytes32 node,\n uint64 ttl_\n )\n external\n authorised(node)\n {\n records[node].ttl = ttl_;\n\n emit NewTTL(node, ttl_);\n }\n\n function setSubnodeRecord(\n bytes32 node,\n bytes32 label,\n address owner_,\n address resolver_,\n uint64 ttl_\n )\n external\n {\n bytes32 subNode = setSubnodeOwner(node, label, owner_);\n\n _setResolverAndTTL(subNode, resolver_, ttl_);\n }\n\n function setApprovalForAll(\n address operator,\n bool approved\n )\n external\n {\n operators[msg.sender][operator] = approved;\n\n emit ApprovalForAll(\n msg.sender,\n operator,\n approved\n );\n }\n\n // external functions (views)\n\n function owner(\n bytes32 node\n )\n external\n view\n returns (address)\n {\n address addr = records[node].owner;\n\n if (addr == address(this)) {\n return address(0x0);\n }\n\n return addr;\n }\n\n function resolver(\n bytes32 node\n )\n external\n view\n returns (address)\n {\n return records[node].resolver;\n }\n\n function ttl(\n bytes32 node\n )\n external\n view\n returns (uint64)\n {\n return records[node].ttl;\n }\n\n function recordExists(\n bytes32 node\n )\n external\n view\n returns (bool)\n {\n return records[node].owner != address(0x0);\n }\n\n function isApprovedForAll(\n address owner_,\n address operator\n )\n external\n view\n returns (bool)\n {\n return operators[owner_][operator];\n }\n\n // public functions\n\n function setOwner(\n bytes32 node,\n address owner_\n )\n public\n authorised(node)\n {\n records[node].owner = owner_;\n\n emit Transfer(node, owner_);\n }\n\n function setResolver(\n bytes32 node,\n address resolver_\n )\n public\n authorised(node)\n {\n records[node].resolver = resolver_;\n\n emit NewResolver(node, resolver_);\n }\n\n function setSubnodeOwner(\n bytes32 node,\n bytes32 label,\n address owner_\n )\n public\n authorised(node)\n returns(bytes32)\n {\n bytes32 subNode = keccak256(abi.encodePacked(node, label));\n\n records[subNode].owner = owner_;\n\n emit NewOwner(node, label, owner_);\n\n return subNode;\n }\n\n // private functions\n\n function _setResolverAndTTL(\n bytes32 node,\n address resolver_,\n uint64 ttl_\n )\n private\n {\n if (resolver_ != records[node].resolver) {\n records[node].resolver = resolver_;\n\n emit NewResolver(node, resolver_);\n }\n\n if (ttl_ != records[node].ttl) {\n records[node].ttl = ttl_;\n\n emit NewTTL(node, ttl_);\n }\n }\n}\n" + }, + "src/ens/resolvers/ENSAbstractResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title ENS abstract resolver\n *\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/ResolverBase.sol\n */\nabstract contract ENSAbstractResolver {\n // modifiers\n\n modifier onlyNodeOwner(bytes32 node)\n {\n require(\n _isNodeOwner(node),\n \"ENSAbstractResolver: reverted by onlyNodeOwner modifier\"\n );\n\n _;\n }\n\n // internal functions (views)\n\n function _isNodeOwner(\n bytes32 node\n )\n internal\n virtual\n view\n returns (bool);\n}\n" + }, + "src/ens/ENSReverseRegistrar.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../common/libs/AddressLib.sol\";\nimport \"../common/lifecycle/Initializable.sol\";\nimport \"./resolvers/ENSNameResolver.sol\";\nimport \"./ENSRegistry.sol\";\n\n/**\n * @title ENS reverse registrar\n *\n * @dev Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ReverseRegistrar.sol\n */\ncontract ENSReverseRegistrar is Initializable {\n using AddressLib for address;\n\n // namehash('addr.reverse')\n bytes32 public constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\n\n ENSRegistry public registry;\n ENSNameResolver public resolver;\n\n /**\n * @dev Public constructor\n */\n constructor() public Initializable() {}\n\n // external functions\n\n /**\n * @notice Initializes `ENSReverseRegistrar` contract\n * @param registry_ ENS registry address\n * @param resolver_ ENS name resolver address\n */\n function initialize(\n ENSRegistry registry_,\n ENSNameResolver resolver_\n )\n external\n onlyInitializer\n {\n registry = registry_;\n resolver = resolver_;\n }\n\n // external functions\n\n function claim(\n address owner\n )\n public\n returns (bytes32)\n {\n return _claimWithResolver(owner, address(0));\n }\n\n function claimWithResolver(\n address owner,\n address resolver_\n )\n public\n returns (bytes32)\n {\n return _claimWithResolver(owner, resolver_);\n }\n\n function setName(\n string memory name\n )\n public\n returns (bytes32)\n {\n bytes32 node = _claimWithResolver(address(this), address(resolver));\n\n resolver.setName(node, name);\n\n return node;\n }\n\n // external functions (pure)\n\n function node(\n address addr_\n )\n external\n pure\n returns (bytes32)\n {\n return keccak256(abi.encodePacked(ADDR_REVERSE_NODE, addr_.toSha3Hash()));\n }\n\n // private functions\n\n function _claimWithResolver(\n address owner,\n address resolver_\n )\n private\n returns (bytes32)\n {\n bytes32 label = address(msg.sender).toSha3Hash();\n bytes32 node_ = keccak256(abi.encodePacked(ADDR_REVERSE_NODE, label));\n address currentOwner = registry.owner(node_);\n\n if (resolver_ != address(0x0) && resolver_ != registry.resolver(node_)) {\n if (currentOwner != address(this)) {\n registry.setSubnodeOwner(ADDR_REVERSE_NODE, label, address(this));\n currentOwner = address(this);\n }\n\n registry.setResolver(node_, resolver_);\n }\n\n // Update the owner if required\n if (currentOwner != owner) {\n registry.setSubnodeOwner(ADDR_REVERSE_NODE, label, owner);\n }\n\n return node_;\n }\n}\n" + }, + "src/common/libs/AddressLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Address library\n */\nlibrary AddressLib {\n /**\n * @notice Converts address into sha3 hash\n * @param self address\n * @return sha3 hash\n */\n function toSha3Hash(\n address self\n )\n internal\n pure\n returns (bytes32)\n {\n bytes32 result;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let lookup := 0x3031323334353637383961626364656600000000000000000000000000000000\n\n for { let i := 40 } gt(i, 0) { } {\n i := sub(i, 1)\n mstore8(i, byte(and(self, 0xf), lookup))\n self := div(self, 0x10)\n i := sub(i, 1)\n mstore8(i, byte(and(self, 0xf), lookup))\n self := div(self, 0x10)\n }\n\n result := keccak256(0, 40)\n }\n\n return result;\n }\n}\n" + }, + "src/ens/ENSHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\npragma experimental ABIEncoderV2;\n\nimport \"../common/lifecycle/Initializable.sol\";\nimport \"./resolvers/ENSAddressResolver.sol\";\nimport \"./resolvers/ENSNameResolver.sol\";\nimport \"./ENSRegistry.sol\";\n\n/**\n * @title ENS helper\n *\n * @author Stanisław Głogowski \n */\ncontract ENSHelper is Initializable {\n ENSRegistry public registry;\n\n /**\n * @dev Public constructor\n */\n constructor() public Initializable() {}\n\n // external functions\n\n /**\n * @notice Initializes `ENSLookupHelper` contract\n * @param registry_ ENS registry address\n */\n function initialize(\n ENSRegistry registry_\n )\n external\n onlyInitializer\n {\n registry = registry_;\n }\n\n // external functions (views)\n\n /**\n * @notice Gets nodes addresses\n * @param nodes array of nodes\n * @return nodes addresses\n */\n function getAddresses(\n bytes32[] memory nodes\n )\n external\n view\n returns (address[] memory)\n {\n uint nodesLen = nodes.length;\n address[] memory result = new address[](nodesLen);\n\n for (uint i = 0; i < nodesLen; i++) {\n result[i] = _getAddress(nodes[i]);\n }\n\n return result;\n }\n\n /**\n * @notice Gets nodes names\n * @param nodes array of nodes\n * @return nodes names\n */\n function getNames(\n bytes32[] memory nodes\n )\n external\n view\n returns (string[] memory)\n {\n uint nodesLen = nodes.length;\n string[] memory result = new string[](nodesLen);\n\n for (uint i = 0; i < nodesLen; i++) {\n result[i] = _getName(nodes[i]);\n }\n\n return result;\n }\n\n // private functions (views)\n\n function _getAddress(\n bytes32 node\n )\n private\n view\n returns (address)\n {\n address result;\n address resolver = registry.resolver(node);\n\n if (resolver != address(0)) {\n try ENSAddressResolver(resolver).addr(node) returns (address addr) {\n result = addr;\n } catch {\n //\n }\n }\n\n return result;\n }\n\n function _getName(\n bytes32 node\n )\n private\n view\n returns (string memory)\n {\n string memory result;\n address resolver = registry.resolver(node);\n\n if (resolver != address(0)) {\n try ENSNameResolver(resolver).name(node) returns (string memory name) {\n result = name;\n } catch {\n //\n }\n }\n\n return result;\n }\n}\n" + }, + "src/common/access/mocks/GuardedMock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../Guarded.sol\";\n\n\n/**\n * @title Guarded mock\n *\n * @dev Used in `Guarded` contract tests\n *\n * @author Stanisław Głogowski \n */\ncontract GuardedMock is Guarded {\n /**\n * @dev Public constructor\n * @param guardians_ array of guardians addresses\n */\n constructor(\n address[] memory guardians_\n )\n public\n {\n _initializeGuarded(guardians_);\n }\n}\n" + }, + "src/common/account/mocks/AccountRegistryMock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../../libs/ECDSALib.sol\";\nimport \"../../libs/ECDSAExtendedLib.sol\";\nimport \"../AccountRegistry.sol\";\n\n\n/**\n * @title Account registry mock\n *\n * @author Stanisław Głogowski \n */\ncontract AccountRegistryMock is AccountRegistry {\n using ECDSALib for bytes32;\n using ECDSAExtendedLib for bytes;\n\n mapping(address => mapping(address => bool)) private mockedAccountsOwners;\n\n // external functions\n\n function mockAccountOwners(\n address account,\n address[] memory owners\n )\n external\n {\n uint ownersLen = owners.length;\n for (uint i = 0; i < ownersLen; i++) {\n mockedAccountsOwners[account][owners[i]] = true;\n }\n }\n\n // external functions (views)\n\n function isValidAccountSignature(\n address account,\n bytes32 messageHash,\n bytes calldata signature\n )\n override\n external\n view\n returns (bool)\n {\n address recovered = messageHash.recoverAddress(signature);\n\n return mockedAccountsOwners[account][recovered];\n }\n\n function isValidAccountSignature(\n address account,\n bytes calldata message,\n bytes calldata signature\n )\n override\n external\n view\n returns (bool)\n {\n address recovered = message.toEthereumSignedMessageHash().recoverAddress(signature);\n\n return mockedAccountsOwners[account][recovered];\n }\n}\n" + }, + "src/common/account/mocks/AccountControllerMock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../AccountController.sol\";\n\n\n/**\n * @title Account controller mock\n *\n * @author Stanisław Głogowski \n */\ncontract AccountControllerMock is AccountController {\n /**\n * @dev Public constructor\n * @param accountRegistry_ account registry address\n * @param accountImplementation_ account implementation address\n */\n constructor(\n address accountRegistry_,\n address accountImplementation_\n )\n public\n AccountController()\n {\n _initializeAccountController(accountRegistry_, accountImplementation_);\n }\n\n // external functions\n\n /**\n * @notice Sets account registry\n * @param accountRegistry_ account registry address\n */\n function setAccountRegistry(\n address accountRegistry_\n )\n external\n {\n _setAccountRegistry(accountRegistry_, true);\n }\n\n /**\n * @notice Sets account implementation\n * @param accountImplementation_ account implementation address\n */\n function setAccountImplementation(\n address accountImplementation_\n )\n external\n {\n _setAccountImplementation(accountImplementation_, true);\n }\n\n /**\n * @notice Deploys account\n * @param salt CREATE2 salt\n */\n function deployAccount(\n bytes32 salt\n )\n external\n {\n _deployAccount(salt, true);\n }\n\n /**\n * @notice Upgrades account\n * @param account account address\n */\n function upgradeAccount(\n address account\n )\n external\n {\n _upgradeAccount(account, true);\n }\n\n /**\n * @notice Executes transaction from the account\n * @param account account address\n * @param to to address\n * @param value value\n * @param data data\n */\n function executeAccountTransaction(\n address account,\n address to,\n uint256 value,\n bytes memory data\n )\n external\n {\n _executeAccountTransaction(account, to, value, data, true);\n }\n\n // external functions (views)\n\n /**\n * @notice Computes account CREATE2 address\n * @param salt CREATE2 salt\n * @return account address\n */\n function computeAccountAddress(\n bytes32 salt\n )\n external\n view\n returns (address)\n {\n return _computeAccountAddress(salt);\n }\n}\n" + }, + "src/common/account/AccountImplementationV1.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../lifecycle/Initializable.sol\";\nimport \"./AccountBase.sol\";\nimport \"./AccountRegistry.sol\";\n\n\n/**\n * @title Account implementation (version 1)\n *\n * @author Stanisław Głogowski \n */\ncontract AccountImplementationV1 is Initializable, AccountBase {\n bytes32 constant private ERC777_TOKENS_RECIPIENT_INTERFACE_HASH = keccak256(abi.encodePacked(\"ERC777TokensRecipient\"));\n bytes32 constant private ERC1820_ACCEPT_MAGIC = keccak256(abi.encodePacked(\"ERC1820_ACCEPT_MAGIC\"));\n\n bytes4 constant private ERC1271_VALID_MESSAGE_HASH_SIGNATURE = bytes4(keccak256(abi.encodePacked(\"isValidSignature(bytes32,bytes)\")));\n bytes4 constant private ERC1271_VALID_MESSAGE_SIGNATURE = bytes4(keccak256(abi.encodePacked(\"isValidSignature(bytes,bytes)\")));\n bytes4 constant private ERC1271_INVALID_SIGNATURE = 0xffffffff;\n\n /**\n * @dev Internal constructor\n */\n constructor() internal Initializable() {}\n\n // external functions\n\n /**\n * @notice Initializes `AccountImplementation` contract\n * @param registry_ registry address\n */\n function initialize(\n address registry_\n )\n external\n onlyInitializer\n {\n registry = registry_;\n }\n\n // external functions (views)\n\n // ERC1820\n\n function canImplementInterfaceForAddress(\n bytes32 interfaceHash,\n address addr\n )\n external\n view\n returns(bytes32)\n {\n bytes32 result;\n\n if (interfaceHash == ERC777_TOKENS_RECIPIENT_INTERFACE_HASH && addr == address(this)) {\n result = ERC1820_ACCEPT_MAGIC;\n }\n\n return result;\n }\n\n // ERC1271\n\n function isValidSignature(\n bytes32 messageHash,\n bytes calldata signature\n )\n external\n view\n returns (bytes4)\n {\n return AccountRegistry(registry).isValidAccountSignature(address(this), messageHash, signature)\n ? ERC1271_VALID_MESSAGE_HASH_SIGNATURE\n : ERC1271_INVALID_SIGNATURE;\n }\n\n function isValidSignature(\n bytes calldata message,\n bytes calldata signature\n )\n external\n view\n returns (bytes4)\n {\n return AccountRegistry(registry).isValidAccountSignature(address(this), message, signature)\n ? ERC1271_VALID_MESSAGE_SIGNATURE\n : ERC1271_INVALID_SIGNATURE;\n }\n\n // external functions (pure)\n\n // ERC721\n\n function onERC721Received(\n address,\n address,\n uint256,\n bytes calldata\n )\n external\n pure\n returns (bytes4)\n {\n return this.onERC721Received.selector;\n }\n\n // ERC1155\n\n function onERC1155Received(\n address,\n address,\n uint256,\n uint256,\n bytes calldata\n )\n external\n pure\n returns (bytes4)\n {\n return this.onERC1155Received.selector;\n }\n\n // ERC777\n\n function tokensReceived(\n address,\n address,\n address,\n uint256,\n bytes calldata,\n bytes calldata\n )\n external\n pure\n {}\n}\n" + }, + "src/personal/PersonalAccountImplementationV1.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../common/account/AccountImplementationV1.sol\";\n\n\n/**\n * @title Personal account implementation (version 1)\n *\n * @author Stanisław Głogowski \n */\ncontract PersonalAccountImplementationV1 is AccountImplementationV1 {\n\n /**\n * @dev Public constructor\n */\n constructor() public AccountImplementationV1() {}\n}\n" + }, + "src/common/account/mocks/AccountImplementationV1Mock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../AccountImplementationV1.sol\";\n\n\n/**\n * @title Account implementation mock (version 1)\n *\n * @author Stanisław Głogowski \n */\ncontract AccountImplementationV1Mock is AccountImplementationV1 {\n /**\n * @dev Public constructor\n * @param registry_ account registry address\n */\n constructor(\n address registry_\n )\n public\n AccountImplementationV1()\n {\n registry = registry_;\n }\n}\n" + }, + "src/common/helpers/BalancesHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../token/ERC20Token.sol\";\nimport \"../libs/SafeMathLib.sol\";\n\n\n/**\n * @title Balances helper\n *\n * @author Jegor Sidorenko \n * @author Stanisław Głogowski \n */\ncontract BalancesHelper {\n using SafeMathLib for uint256;\n\n // external functions\n\n /**\n * @notice Checks the token balances of accounts for multiple tokens.\n * @dev Pass 0x0 as a \"token\" address to get ETH balance.\n *\n * Possible error throws:\n * - extremely large arrays for account and or tokens (gas cost too high)\n *\n * @param accounts array of accounts addresses\n * @param tokens array of tokens addresses\n * @return a one-dimensional that's user.length * tokens.length long. The\n * array is ordered by all of the 0th accounts token balances, then the 1th\n * user, and so on.\n */\n function getBalances(\n address[] calldata accounts,\n address[] calldata tokens\n )\n external\n view\n returns (uint[] memory)\n {\n uint[] memory result = new uint[](accounts.length.mul(tokens.length));\n\n for (uint i = 0; i < accounts.length; i++) {\n for (uint j = 0; j < tokens.length; j++) {\n uint index = j.add(tokens.length.mul(i));\n\n if (tokens[j] != address(0x0)) {\n result[index] = _getBalance(accounts[i], tokens[j]);\n } else {\n result[index] = accounts[i].balance;\n }\n }\n }\n\n return result;\n }\n\n // private functions\n\n function _getBalance(\n address account,\n address token\n )\n private\n view\n returns (uint256)\n {\n uint256 result = 0;\n uint256 tokenCode;\n\n /// @dev check if token is actually a contract\n // solhint-disable-next-line no-inline-assembly\n assembly { tokenCode := extcodesize(token) } // contract code size\n\n if (tokenCode > 0) {\n /// @dev is it a contract and does it implement balanceOf\n // solhint-disable-next-line avoid-low-level-calls\n (bool methodExists,) = token.staticcall(abi.encodeWithSelector(\n ERC20Token(token).balanceOf.selector,\n account\n ));\n\n if (methodExists) {\n result = ERC20Token(token).balanceOf(account);\n }\n }\n\n return result;\n }\n}\n" + }, + "src/gateway/mocks/GatewayRecipientMock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../GatewayRecipient.sol\";\n\n\n/**\n * @title Gateway recipient mock\n *\n * @dev Used in `GatewayRecipient` contract tests\n *\n * @author Stanisław Głogowski \n */\ncontract GatewayRecipientMock is GatewayRecipient {\n // events\n\n event Context(\n address account,\n address sender,\n bytes data\n );\n\n /**\n * @dev Public constructor\n * @param gateway_ `Gateway` contract address\n */\n constructor(\n address gateway_\n )\n public\n {\n _initializeGatewayRecipient(gateway_);\n }\n\n function emitContext()\n external\n {\n emit Context(\n _getContextAccount(),\n _getContextSender(),\n _getContextData()\n );\n }\n}\n" + } + }, + "settings": { + "evmVersion": "istanbul", + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/deployments/fuse/solcInputs/7a183f869f73d4ccd46c6d23b208518b.json b/deployments/fuse/solcInputs/7a183f869f73d4ccd46c6d23b208518b.json new file mode 100644 index 00000000..2d777865 --- /dev/null +++ b/deployments/fuse/solcInputs/7a183f869f73d4ccd46c6d23b208518b.json @@ -0,0 +1,79 @@ +{ + "language": "Solidity", + "sources": { + "src/bridges/Diamond.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\nimport {LibDiamond} from \"./libs/LibDiamond.sol\";\nimport {IDiamondCut} from \"./interfaces/IDiamondCut.sol\";\n\ncontract Diamond {\n constructor(address _contractOwner, address _diamondCutFacet) payable {\n LibDiamond.setContractOwner(_contractOwner);\n\n // Add the diamondCut external function from the diamondCutFacet\n IDiamondCut.FacetCut[] memory cut = new IDiamondCut.FacetCut[](1);\n bytes4[] memory functionSelectors = new bytes4[](1);\n functionSelectors[0] = IDiamondCut.diamondCut.selector;\n cut[0] = IDiamondCut.FacetCut({\n facetAddress: _diamondCutFacet,\n action: IDiamondCut.FacetCutAction.Add,\n functionSelectors: functionSelectors\n });\n LibDiamond.diamondCut(cut, address(0), \"\");\n }\n\n // Find facet for function that is called and execute the\n // function if a facet is found and return any value.\n // solhint-disable-next-line no-complex-fallback\n fallback() external payable {\n LibDiamond.DiamondStorage storage ds;\n bytes32 position = LibDiamond.DIAMOND_STORAGE_POSITION;\n\n // get diamond storage\n // solhint-disable-next-line no-inline-assembly\n assembly {\n ds.slot := position\n }\n\n // get facet from function selector\n address facet = ds.selectorToFacetAndPosition[msg.sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n\n // Execute external function from facet using delegatecall and return any value.\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // copy function selector and any arguments\n calldatacopy(0, 0, calldatasize())\n // execute function call using the facet\n let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)\n // get any return value\n returndatacopy(0, 0, returndatasize())\n // return any return value or error back to the caller\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n // Able to receive ether\n // solhint-disable-next-line no-empty-blocks\n receive() external payable {}\n}\n" + }, + "src/bridges/libs/LibDiamond.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\nimport { IDiamondCut } from \"../interfaces/IDiamondCut.sol\";\n\nlibrary LibDiamond {\n bytes32 internal constant DIAMOND_STORAGE_POSITION = keccak256(\"diamond.standard.diamond.storage\");\n\n struct FacetAddressAndPosition {\n address facetAddress;\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\n }\n\n struct FacetFunctionSelectors {\n bytes4[] functionSelectors;\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\n }\n\n struct DiamondStorage {\n // maps function selector to the facet address and\n // the position of the selector in the facetFunctionSelectors.selectors array\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\n // maps facet addresses to function selectors\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\n // facet addresses\n address[] facetAddresses;\n // Used to query if a contract implements an interface.\n // Used to implement ERC-165.\n mapping(bytes4 => bool) supportedInterfaces;\n // owner of the contract\n address contractOwner;\n }\n\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\n bytes32 position = DIAMOND_STORAGE_POSITION;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n ds.slot := position\n }\n }\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n function setContractOwner(address _newOwner) internal {\n DiamondStorage storage ds = diamondStorage();\n address previousOwner = ds.contractOwner;\n ds.contractOwner = _newOwner;\n emit OwnershipTransferred(previousOwner, _newOwner);\n }\n\n function contractOwner() internal view returns (address contractOwner_) {\n contractOwner_ = diamondStorage().contractOwner;\n }\n\n function enforceIsContractOwner() internal view {\n require(msg.sender == diamondStorage().contractOwner, \"LibDiamond: Must be contract owner\");\n }\n\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\n\n // Internal function version of diamondCut\n function diamondCut(\n IDiamondCut.FacetCut[] memory _diamondCut,\n address _init,\n bytes memory _calldata\n ) internal {\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\n if (action == IDiamondCut.FacetCutAction.Add) {\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\n } else {\n revert(\"LibDiamondCut: Incorrect FacetCutAction\");\n }\n }\n emit DiamondCut(_diamondCut, _init, _calldata);\n initializeDiamondCut(_init, _calldata);\n }\n\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\n require(_functionSelectors.length > 0, \"LibDiamondCut: No selectors in facet to cut\");\n DiamondStorage storage ds = diamondStorage();\n require(_facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(ds, _facetAddress);\n }\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\n bytes4 selector = _functionSelectors[selectorIndex];\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress == address(0), \"LibDiamondCut: Can't add function that already exists\");\n addFunction(ds, selector, selectorPosition, _facetAddress);\n selectorPosition++;\n }\n }\n\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\n require(_functionSelectors.length > 0, \"LibDiamondCut: No selectors in facet to cut\");\n DiamondStorage storage ds = diamondStorage();\n require(_facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(ds, _facetAddress);\n }\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\n bytes4 selector = _functionSelectors[selectorIndex];\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress != _facetAddress, \"LibDiamondCut: Can't replace function with same function\");\n removeFunction(ds, oldFacetAddress, selector);\n addFunction(ds, selector, selectorPosition, _facetAddress);\n selectorPosition++;\n }\n }\n\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\n require(_functionSelectors.length > 0, \"LibDiamondCut: No selectors in facet to cut\");\n DiamondStorage storage ds = diamondStorage();\n // if function does not exist then do nothing and return\n require(_facetAddress == address(0), \"LibDiamondCut: Remove facet address must be address(0)\");\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\n bytes4 selector = _functionSelectors[selectorIndex];\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\n removeFunction(ds, oldFacetAddress, selector);\n }\n }\n\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\n enforceHasContractCode(_facetAddress, \"LibDiamondCut: New facet has no code\");\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\n ds.facetAddresses.push(_facetAddress);\n }\n\n function addFunction(\n DiamondStorage storage ds,\n bytes4 _selector,\n uint96 _selectorPosition,\n address _facetAddress\n ) internal {\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\n }\n\n function removeFunction(\n DiamondStorage storage ds,\n address _facetAddress,\n bytes4 _selector\n ) internal {\n require(_facetAddress != address(0), \"LibDiamondCut: Can't remove function that doesn't exist\");\n // an immutable function is a function defined directly in a diamond\n require(_facetAddress != address(this), \"LibDiamondCut: Can't remove immutable function\");\n // replace selector with last selector, then delete last selector\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\n // if not the same then replace _selector with lastSelector\n if (selectorPosition != lastSelectorPosition) {\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\n }\n // delete the last selector\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\n delete ds.selectorToFacetAndPosition[_selector];\n\n // if no more selectors for facet address then delete the facet address\n if (lastSelectorPosition == 0) {\n // replace facet address with last facet address and delete last facet address\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\n if (facetAddressPosition != lastFacetAddressPosition) {\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\n }\n ds.facetAddresses.pop();\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\n }\n }\n\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\n if (_init == address(0)) {\n require(_calldata.length == 0, \"LibDiamondCut: _init is address(0) but_calldata is not empty\");\n } else {\n require(_calldata.length > 0, \"LibDiamondCut: _calldata is empty but _init is not address(0)\");\n if (_init != address(this)) {\n enforceHasContractCode(_init, \"LibDiamondCut: _init address has no code\");\n }\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\n if (!success) {\n if (error.length > 0) {\n // bubble up the error\n revert(string(error));\n } else {\n revert(\"LibDiamondCut: _init function reverted\");\n }\n }\n }\n }\n\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\n uint256 contractSize;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n contractSize := extcodesize(_contract)\n }\n require(contractSize > 0, _errorMessage);\n }\n}\n" + }, + "src/bridges/interfaces/IDiamondCut.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\ninterface IDiamondCut {\n enum FacetCutAction {\n Add,\n Replace,\n Remove\n }\n // Add=0, Replace=1, Remove=2\n\n struct FacetCut {\n address facetAddress;\n FacetCutAction action;\n bytes4[] functionSelectors;\n }\n\n /// @notice Add/replace/remove any number of functions and optionally execute\n /// a function with delegatecall\n /// @param _diamondCut Contains the facet addresses and function selectors\n /// @param _init The address of the contract or facet to execute _calldata\n /// @param _calldata A function call, including function selector and arguments\n /// _calldata is executed with delegatecall on _init\n function diamondCut(\n FacetCut[] calldata _diamondCut,\n address _init,\n bytes calldata _calldata\n ) external;\n\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\n}\n" + }, + "src/bridges/facets/DiamondCutFacet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\nimport { IDiamondCut } from \"../interfaces/IDiamondCut.sol\";\nimport { LibDiamond } from \"../libs/LibDiamond.sol\";\n\ncontract DiamondCutFacet is IDiamondCut {\n /// @notice Add/replace/remove any number of functions and optionally execute\n /// a function with delegatecall\n /// @param _diamondCut Contains the facet addresses and function selectors\n /// @param _init The address of the contract or facet to execute _calldata\n /// @param _calldata A function call, including function selector and arguments\n /// _calldata is executed with delegatecall on _init\n function diamondCut(\n FacetCut[] calldata _diamondCut,\n address _init,\n bytes calldata _calldata\n ) external override {\n LibDiamond.enforceIsContractOwner();\n LibDiamond.diamondCut(_diamondCut, _init, _calldata);\n }\n}\n" + }, + "src/bridges/facets/OwnershipFacet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\nimport { LibDiamond } from \"../libs/LibDiamond.sol\";\nimport { IERC173 } from \"../interfaces/IERC173.sol\";\n\ncontract OwnershipFacet is IERC173 {\n function transferOwnership(address _newOwner) external override {\n LibDiamond.enforceIsContractOwner();\n LibDiamond.setContractOwner(_newOwner);\n }\n\n function owner() external view override returns (address owner_) {\n owner_ = LibDiamond.contractOwner();\n }\n}" + }, + "src/bridges/interfaces/IERC173.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\n/// @title ERC-173 Contract Ownership Standard\n/// Note: the ERC-165 identifier for this interface is 0x7f5828d0\n/* is ERC165 */\ninterface IERC173 {\n /// @notice Get the address of the owner\n /// @return owner_ The address of the owner.\n function owner() external view returns (address owner_);\n\n /// @notice Set the address of the new owner of the contract\n /// @dev Set _newOwner to address(0) to renounce any ownership.\n /// @param _newOwner The address of the new owner of the contract\n function transferOwnership(address _newOwner) external;\n}\n" + }, + "src/bridges/facets/DiamondLoupeFacet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\nimport { LibDiamond } from \"../libs/LibDiamond.sol\";\nimport { IDiamondLoupe } from \"../interfaces/IDiamondLoupe.sol\";\nimport { IERC165 } from \"../interfaces/IERC165.sol\";\n\ncontract DiamondLoupeFacet is IDiamondLoupe, IERC165 {\n // Diamond Loupe Functions\n ////////////////////////////////////////////////////////////////////\n /// These functions are expected to be called frequently by tools.\n //\n // struct Facet {\n // address facetAddress;\n // bytes4[] functionSelectors;\n // }\n\n /// @notice Gets all facets and their selectors.\n /// @return facets_ Facet\n function facets() external view override returns (Facet[] memory facets_) {\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n uint256 numFacets = ds.facetAddresses.length;\n facets_ = new Facet[](numFacets);\n for (uint256 i = 0; i < numFacets; i++) {\n address facetAddress_ = ds.facetAddresses[i];\n facets_[i].facetAddress = facetAddress_;\n facets_[i].functionSelectors = ds.facetFunctionSelectors[facetAddress_].functionSelectors;\n }\n }\n\n /// @notice Gets all the function selectors provided by a facet.\n /// @param _facet The facet address.\n /// @return facetFunctionSelectors_\n function facetFunctionSelectors(address _facet)\n external\n view\n override\n returns (bytes4[] memory facetFunctionSelectors_)\n {\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n facetFunctionSelectors_ = ds.facetFunctionSelectors[_facet].functionSelectors;\n }\n\n /// @notice Get all the facet addresses used by a diamond.\n /// @return facetAddresses_\n function facetAddresses() external view override returns (address[] memory facetAddresses_) {\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n facetAddresses_ = ds.facetAddresses;\n }\n\n /// @notice Gets the facet that supports the given selector.\n /// @dev If facet is not found return address(0).\n /// @param _functionSelector The function selector.\n /// @return facetAddress_ The facet address.\n function facetAddress(bytes4 _functionSelector) external view override returns (address facetAddress_) {\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n facetAddress_ = ds.selectorToFacetAndPosition[_functionSelector].facetAddress;\n }\n\n // This implements ERC-165.\n function supportsInterface(bytes4 _interfaceId) external view override returns (bool) {\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n return ds.supportedInterfaces[_interfaceId];\n }\n}\n" + }, + "src/bridges/interfaces/IDiamondLoupe.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\n// A loupe is a small magnifying glass used to look at diamonds.\n// These functions look at diamonds\ninterface IDiamondLoupe {\n /// These functions are expected to be called frequently\n /// by tools.\n\n struct Facet {\n address facetAddress;\n bytes4[] functionSelectors;\n }\n\n /// @notice Gets all facet addresses and their four byte function selectors.\n /// @return facets_ Facet\n function facets() external view returns (Facet[] memory facets_);\n\n /// @notice Gets all the function selectors supported by a specific facet.\n /// @param _facet The facet address.\n /// @return facetFunctionSelectors_\n function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);\n\n /// @notice Get all the facet addresses used by a diamond.\n /// @return facetAddresses_\n function facetAddresses() external view returns (address[] memory facetAddresses_);\n\n /// @notice Gets the facet that supports the given selector.\n /// @dev If facet is not found return address(0).\n /// @param _functionSelector The function selector.\n /// @return facetAddress_ The facet address.\n function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);\n}\n" + }, + "src/bridges/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceId The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}" + }, + "src/common/helpers/BalancesHelperV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n// solhint-disable-next-line\npragma solidity 0.8.4;\n\n/// @title BalancesHelperV2\n/// @author Luke Wickens \n/// @notice Used to get account balances of ERC20 tokens and Wrapped Super Tokens\n\nimport {ISuperfluidToken} from \"@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluidToken.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/interfaces/IERC20.sol\";\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\n\ncontract BalancesHelperV2 {\n using Address for address;\n\n /// @notice Custom errors to handle address(0)\n error AccountZeroAddress(address account, address token);\n error TokenZeroAddress(address account, address token);\n\n constructor() {}\n\n /// @notice Returns balances of accounts for multiple ERC20 tokens.\n /// @dev Error thrown if: account or token address is address(0),\n /// large arrays of accounts/tokens are passed in could cause gas block limit issue\n /// @param accounts = Array of accounts addresses\n /// @param tokens = Array of tokens addresses\n /// @return One-dimensional that's accounts.length * tokens.length long. The\n /// array is ordered by all of accounts[0] token balances, then accounts[1] etc.\n\n function getBalances(address[] calldata accounts, address[] calldata tokens)\n external\n view\n returns (uint256[] memory)\n {\n uint256[] memory result = new uint256[](\n accounts.length * tokens.length\n );\n\n for (uint256 i; i < accounts.length; i++) {\n for (uint256 j; j < tokens.length; j++) {\n uint256 index = j + (tokens.length * i);\n result[index] = _getBalance(accounts[i], tokens[j]);\n }\n }\n return result;\n }\n\n /// @notice Returns balances of accounts for multiple Wrapped Super Tokens.\n /// @dev Error thrown if: account or token address is address(0),\n /// large arrays of accounts/tokens are passed in could cause gas block limit issue\n /// @param accounts = Array of accounts addresses\n /// @param tokens = Array of tokens addresses\n /// @return One-dimensional that's accounts.length * tokens.length long. The\n /// array is ordered by all of accounts[0] token balances, then accounts[1] etc.\n\n function getSuperfluidWrappedTokenBalances(\n address[] calldata accounts,\n address[] calldata tokens\n ) external view returns (int256[] memory) {\n int256[] memory result = new int256[](accounts.length * tokens.length);\n\n for (uint256 i; i < accounts.length; i++) {\n for (uint256 j; j < tokens.length; j++) {\n uint256 index = j + (tokens.length * i);\n result[index] = _getSuperfluidWrappedTokenBalance(\n accounts[i],\n tokens[j]\n );\n }\n }\n return result;\n }\n\n /// Private fuctions\n\n /// @notice Returns balance of account for an ERC20 token.\n /// @dev Error thrown if: account or token address is address(0)\n /// @param account = account address\n /// @param token = tokens address\n /// @return balance of account as uint256.\n\n function _getBalance(address account, address token)\n private\n view\n returns (uint256)\n {\n if (account == address(0)) revert AccountZeroAddress(account, token);\n if (token == address(0)) revert TokenZeroAddress(account, token);\n\n bytes memory returnedData = token.functionStaticCall(\n abi.encodeWithSelector(IERC20(token).balanceOf.selector, account)\n );\n\n return abi.decode(returnedData, (uint256));\n }\n\n /// @notice Returns real balance of a user, taking into consideration all agreements of account\n /// @dev Error thrown if: account or token address is address(0)\n /// @param account = account address\n /// @param token = tokens address\n /// @return available balance of account as int256.\n\n function _getSuperfluidWrappedTokenBalance(address account, address token)\n private\n view\n returns (int256)\n {\n if (account == address(0)) revert AccountZeroAddress(account, token);\n if (token == address(0)) revert TokenZeroAddress(account, token);\n\n bytes memory returnedData = token.functionStaticCall(\n abi.encodeWithSelector(\n ISuperfluidToken(token).realtimeBalanceOfNow.selector,\n account\n )\n );\n\n (int256 availableBalance, , , ) = abi.decode(\n returnedData,\n (int256, uint256, uint256, uint256)\n );\n return availableBalance;\n }\n}\n" + }, + "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluidToken.sol": { + "content": "// SPDX-License-Identifier: AGPLv3\npragma solidity >= 0.8.0;\n\nimport { ISuperAgreement } from \"./ISuperAgreement.sol\";\n\n\n/**\n * @title Superfluid token interface\n * @author Superfluid\n */\ninterface ISuperfluidToken {\n\n /**************************************************************************\n * Basic information\n *************************************************************************/\n\n /**\n * @dev Get superfluid host contract address\n */\n function getHost() external view returns(address host);\n\n /**\n * @dev Encoded liquidation type data mainly used for handling stack to deep errors\n *\n * Note:\n * - version: 1\n * - liquidationType key:\n * - 0 = reward account receives reward (PIC period)\n * - 1 = liquidator account receives reward (Pleb period)\n * - 2 = liquidator account receives reward (Pirate period/bailout)\n */\n struct LiquidationTypeData {\n uint256 version;\n uint8 liquidationType;\n }\n\n /**************************************************************************\n * Real-time balance functions\n *************************************************************************/\n\n /**\n * @dev Calculate the real balance of a user, taking in consideration all agreements of the account\n * @param account for the query\n * @param timestamp Time of balance\n * @return availableBalance Real-time balance\n * @return deposit Account deposit\n * @return owedDeposit Account owed Deposit\n */\n function realtimeBalanceOf(\n address account,\n uint256 timestamp\n )\n external view\n returns (\n int256 availableBalance,\n uint256 deposit,\n uint256 owedDeposit);\n\n /**\n * @notice Calculate the realtime balance given the current host.getNow() value\n * @dev realtimeBalanceOf with timestamp equals to block timestamp\n * @param account for the query\n * @return availableBalance Real-time balance\n * @return deposit Account deposit\n * @return owedDeposit Account owed Deposit\n */\n function realtimeBalanceOfNow(\n address account\n )\n external view\n returns (\n int256 availableBalance,\n uint256 deposit,\n uint256 owedDeposit,\n uint256 timestamp);\n\n /**\n * @notice Check if account is critical\n * @dev A critical account is when availableBalance < 0\n * @param account The account to check\n * @param timestamp The time we'd like to check if the account is critical (should use future)\n * @return isCritical Whether the account is critical\n */\n function isAccountCritical(\n address account,\n uint256 timestamp\n )\n external view\n returns(bool isCritical);\n\n /**\n * @notice Check if account is critical now (current host.getNow())\n * @dev A critical account is when availableBalance < 0\n * @param account The account to check\n * @return isCritical Whether the account is critical\n */\n function isAccountCriticalNow(\n address account\n )\n external view\n returns(bool isCritical);\n\n /**\n * @notice Check if account is solvent\n * @dev An account is insolvent when the sum of deposits for a token can't cover the negative availableBalance\n * @param account The account to check\n * @param timestamp The time we'd like to check if the account is solvent (should use future)\n * @return isSolvent\n */\n function isAccountSolvent(\n address account,\n uint256 timestamp\n )\n external view\n returns(bool isSolvent);\n\n /**\n * @notice Check if account is solvent now\n * @dev An account is insolvent when the sum of deposits for a token can't cover the negative availableBalance\n * @param account The account to check\n * @return isSolvent\n */\n function isAccountSolventNow(\n address account\n )\n external view\n returns(bool isSolvent);\n\n /**\n * @notice Get a list of agreements that is active for the account\n * @dev An active agreement is one that has state for the account\n * @param account Account to query\n * @return activeAgreements List of accounts that have non-zero states for the account\n */\n function getAccountActiveAgreements(address account)\n external view\n returns(ISuperAgreement[] memory activeAgreements);\n\n\n /**************************************************************************\n * Super Agreement hosting functions\n *************************************************************************/\n\n /**\n * @dev Create a new agreement\n * @param id Agreement ID\n * @param data Agreement data\n */\n function createAgreement(\n bytes32 id,\n bytes32[] calldata data\n )\n external;\n /**\n * @dev Agreement created event\n * @param agreementClass Contract address of the agreement\n * @param id Agreement ID\n * @param data Agreement data\n */\n event AgreementCreated(\n address indexed agreementClass,\n bytes32 id,\n bytes32[] data\n );\n\n /**\n * @dev Get data of the agreement\n * @param agreementClass Contract address of the agreement\n * @param id Agreement ID\n * @return data Data of the agreement\n */\n function getAgreementData(\n address agreementClass,\n bytes32 id,\n uint dataLength\n )\n external view\n returns(bytes32[] memory data);\n\n /**\n * @dev Create a new agreement\n * @param id Agreement ID\n * @param data Agreement data\n */\n function updateAgreementData(\n bytes32 id,\n bytes32[] calldata data\n )\n external;\n /**\n * @dev Agreement updated event\n * @param agreementClass Contract address of the agreement\n * @param id Agreement ID\n * @param data Agreement data\n */\n event AgreementUpdated(\n address indexed agreementClass,\n bytes32 id,\n bytes32[] data\n );\n\n /**\n * @dev Close the agreement\n * @param id Agreement ID\n */\n function terminateAgreement(\n bytes32 id,\n uint dataLength\n )\n external;\n /**\n * @dev Agreement terminated event\n * @param agreementClass Contract address of the agreement\n * @param id Agreement ID\n */\n event AgreementTerminated(\n address indexed agreementClass,\n bytes32 id\n );\n\n /**\n * @dev Update agreement state slot\n * @param account Account to be updated\n *\n * NOTE\n * - To clear the storage out, provide zero-ed array of intended length\n */\n function updateAgreementStateSlot(\n address account,\n uint256 slotId,\n bytes32[] calldata slotData\n )\n external;\n /**\n * @dev Agreement account state updated event\n * @param agreementClass Contract address of the agreement\n * @param account Account updated\n * @param slotId slot id of the agreement state\n */\n event AgreementStateUpdated(\n address indexed agreementClass,\n address indexed account,\n uint256 slotId\n );\n\n /**\n * @dev Get data of the slot of the state of an agreement\n * @param agreementClass Contract address of the agreement\n * @param account Account to query\n * @param slotId slot id of the state\n * @param dataLength length of the state data\n */\n function getAgreementStateSlot(\n address agreementClass,\n address account,\n uint256 slotId,\n uint dataLength\n )\n external view\n returns (bytes32[] memory slotData);\n\n /**\n * @notice Settle balance from an account by the agreement\n * @dev The agreement needs to make sure that the balance delta is balanced afterwards\n * @param account Account to query.\n * @param delta Amount of balance delta to be settled\n *\n * Modifiers:\n * - onlyAgreement\n */\n function settleBalance(\n address account,\n int256 delta\n )\n external;\n\n /**\n * @dev Make liquidation payouts (v2)\n * @param id Agreement ID\n * @param liquidationTypeData Data regarding the version of the liquidation schema and the type\n * @param liquidatorAccount Address of the executor of the liquidation\n * @param useDefaultRewardAccount Whether or not the default reward account receives the rewardAmount\n * @param targetAccount Account of the stream sender\n * @param rewardAmount The amount the reward recepient account will receive\n * @param targetAccountBalanceDelta The amount the sender account balance should change by\n *\n * - If a bailout is required (bailoutAmount > 0)\n * - the actual reward (single deposit) goes to the executor,\n * - while the reward account becomes the bailout account\n * - total bailout include: bailout amount + reward amount\n * - the targetAccount will be bailed out\n * - If a bailout is not required\n * - the targetAccount will pay the rewardAmount\n * - the liquidator (reward account in PIC period) will receive the rewardAmount\n *\n * Modifiers:\n * - onlyAgreement\n */\n function makeLiquidationPayoutsV2\n (\n bytes32 id,\n bytes memory liquidationTypeData,\n address liquidatorAccount,\n bool useDefaultRewardAccount,\n address targetAccount,\n uint256 rewardAmount,\n int256 targetAccountBalanceDelta\n ) external;\n /**\n * @dev Agreement liquidation event v2 (including agent account)\n * @param agreementClass Contract address of the agreement\n * @param id Agreement ID\n * @param liquidatorAccount Address of the executor of the liquidation\n * @param targetAccount Account of the stream sender\n * @param rewardAccount Account that collects the reward or bails out insolvent accounts\n * @param rewardAmount The amount the reward recipient account balance should change by\n * @param targetAccountBalanceDelta The amount the sender account balance should change by\n * @param liquidationTypeData The encoded liquidation type data including the version (how to decode)\n *\n * NOTE:\n * Reward account rule:\n * - if the agreement is liquidated during the PIC period\n * - the rewardAccount will get the rewardAmount (remaining deposit), regardless of the liquidatorAccount\n * - the targetAccount will pay for the rewardAmount\n * - if the agreement is liquidated after the PIC period AND the targetAccount is solvent\n * - the liquidatorAccount will get the rewardAmount (remaining deposit)\n * - the targetAccount will pay for the rewardAmount\n * - if the targetAccount is insolvent\n * - the liquidatorAccount will get the rewardAmount (single deposit)\n * - the rewardAccount will pay for both the rewardAmount and bailoutAmount\n * - the targetAccount will receive the bailoutAmount\n */\n event AgreementLiquidatedV2(\n address indexed agreementClass,\n bytes32 id,\n address indexed liquidatorAccount,\n address indexed targetAccount,\n address rewardAccount,\n uint256 rewardAmount,\n int256 targetAccountBalanceDelta,\n bytes liquidationTypeData\n );\n\n /**************************************************************************\n * Function modifiers for access control and parameter validations\n *\n * While they cannot be explicitly stated in function definitions, they are\n * listed in function definition comments instead for clarity.\n *\n * NOTE: solidity-coverage not supporting it\n *************************************************************************/\n\n /// @dev The msg.sender must be host contract\n //modifier onlyHost() virtual;\n\n /// @dev The msg.sender must be a listed agreement.\n //modifier onlyAgreement() virtual;\n\n /**************************************************************************\n * DEPRECATED\n *************************************************************************/\n\n /**\n * @dev Agreement liquidation event (DEPRECATED BY AgreementLiquidatedBy)\n * @param agreementClass Contract address of the agreement\n * @param id Agreement ID\n * @param penaltyAccount Account of the agreement to be penalized\n * @param rewardAccount Account that collect the reward\n * @param rewardAmount Amount of liquidation reward\n *\n * NOTE:\n *\n * [DEPRECATED] Use AgreementLiquidatedV2 instead\n */\n event AgreementLiquidated(\n address indexed agreementClass,\n bytes32 id,\n address indexed penaltyAccount,\n address indexed rewardAccount,\n uint256 rewardAmount\n );\n\n /**\n * @dev System bailout occurred (DEPRECATED BY AgreementLiquidatedBy)\n * @param bailoutAccount Account that bailout the penalty account\n * @param bailoutAmount Amount of account bailout\n *\n * NOTE:\n *\n * [DEPRECATED] Use AgreementLiquidatedV2 instead\n */\n event Bailout(\n address indexed bailoutAccount,\n uint256 bailoutAmount\n );\n\n /**\n * @dev Agreement liquidation event (DEPRECATED BY AgreementLiquidatedV2)\n * @param liquidatorAccount Account of the agent that performed the liquidation.\n * @param agreementClass Contract address of the agreement\n * @param id Agreement ID\n * @param penaltyAccount Account of the agreement to be penalized\n * @param bondAccount Account that collect the reward or bailout accounts\n * @param rewardAmount Amount of liquidation reward\n * @param bailoutAmount Amount of liquidation bailouot\n *\n * NOTE:\n * Reward account rule:\n * - if bailout is equal to 0, then\n * - the bondAccount will get the rewardAmount,\n * - the penaltyAccount will pay for the rewardAmount.\n * - if bailout is larger than 0, then\n * - the liquidatorAccount will get the rewardAmouont,\n * - the bondAccount will pay for both the rewardAmount and bailoutAmount,\n * - the penaltyAccount will pay for the rewardAmount while get the bailoutAmount.\n */\n event AgreementLiquidatedBy(\n address liquidatorAccount,\n address indexed agreementClass,\n bytes32 id,\n address indexed penaltyAccount,\n address indexed bondAccount,\n uint256 rewardAmount,\n uint256 bailoutAmount\n );\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/IERC20.sol\";\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" + }, + "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperAgreement.sol": { + "content": "// SPDX-License-Identifier: AGPLv3\npragma solidity >= 0.8.0;\n\nimport { ISuperfluidToken } from \"./ISuperfluidToken.sol\";\n\n/**\n * @title Super agreement interface\n * @author Superfluid\n */\ninterface ISuperAgreement {\n\n /**\n * @dev Get the type of the agreement class\n */\n function agreementType() external view returns (bytes32);\n\n /**\n * @dev Calculate the real-time balance for the account of this agreement class\n * @param account Account the state belongs to\n * @param time Time used for the calculation\n * @return dynamicBalance Dynamic balance portion of real-time balance of this agreement\n * @return deposit Account deposit amount of this agreement\n * @return owedDeposit Account owed deposit amount of this agreement\n */\n function realtimeBalanceOf(\n ISuperfluidToken token,\n address account,\n uint256 time\n )\n external\n view\n returns (\n int256 dynamicBalance,\n uint256 deposit,\n uint256 owedDeposit\n );\n\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + } + }, + "settings": { + "evmVersion": "istanbul", + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/.chainId b/deployments/fuseSparknet/.chainId new file mode 100644 index 00000000..d800886d --- /dev/null +++ b/deployments/fuseSparknet/.chainId @@ -0,0 +1 @@ +123 \ No newline at end of file diff --git a/deployments/fuseSparknet/BalancesHelper.json b/deployments/fuseSparknet/BalancesHelper.json new file mode 100644 index 00000000..846b15ac --- /dev/null +++ b/deployments/fuseSparknet/BalancesHelper.json @@ -0,0 +1,81 @@ +{ + "address": "0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b", + "abi": [ + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "getBalances", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x17eca87186670f812655a315ee26a3f8a118accde1369e1a14e85e7f748ca63f", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "420418", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x9f4b047f5ddacb0ca16d9c72d452769419fd0c88ec17ecc9332fe4ca0a97d3bf", + "transactionHash": "0x17eca87186670f812655a315ee26a3f8a118accde1369e1a14e85e7f748ca63f", + "logs": [], + "blockNumber": 5497445, + "cumulativeGasUsed": "420418", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getBalances\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Jegor Sidorenko Stanis\\u0142aw G\\u0142ogowski \",\"kind\":\"dev\",\"methods\":{\"getBalances(address[],address[])\":{\"details\":\"Pass 0x0 as a \\\"token\\\" address to get ETH balance. Possible error throws: - extremely large arrays for account and or tokens (gas cost too high)\",\"params\":{\"accounts\":\"array of accounts addresses\",\"tokens\":\"array of tokens addresses\"},\"returns\":{\"_0\":\"a one-dimensional that's user.length * tokens.length long. The array is ordered by all of the 0th accounts token balances, then the 1th user, and so on.\"}}},\"title\":\"Balances helper\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getBalances(address[],address[])\":{\"notice\":\"Checks the token balances of accounts for multiple tokens.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/common/helpers/BalancesHelper.sol\":\"BalancesHelper\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/helpers/BalancesHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../token/ERC20Token.sol\\\";\\nimport \\\"../libs/SafeMathLib.sol\\\";\\n\\n\\n/**\\n * @title Balances helper\\n *\\n * @author Jegor Sidorenko \\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract BalancesHelper {\\n using SafeMathLib for uint256;\\n\\n // external functions\\n\\n /**\\n * @notice Checks the token balances of accounts for multiple tokens.\\n * @dev Pass 0x0 as a \\\"token\\\" address to get ETH balance.\\n *\\n * Possible error throws:\\n * - extremely large arrays for account and or tokens (gas cost too high)\\n *\\n * @param accounts array of accounts addresses\\n * @param tokens array of tokens addresses\\n * @return a one-dimensional that's user.length * tokens.length long. The\\n * array is ordered by all of the 0th accounts token balances, then the 1th\\n * user, and so on.\\n */\\n function getBalances(\\n address[] calldata accounts,\\n address[] calldata tokens\\n )\\n external\\n view\\n returns (uint[] memory)\\n {\\n uint[] memory result = new uint[](accounts.length.mul(tokens.length));\\n\\n for (uint i = 0; i < accounts.length; i++) {\\n for (uint j = 0; j < tokens.length; j++) {\\n uint index = j.add(tokens.length.mul(i));\\n\\n if (tokens[j] != address(0x0)) {\\n result[index] = _getBalance(accounts[i], tokens[j]);\\n } else {\\n result[index] = accounts[i].balance;\\n }\\n }\\n }\\n\\n return result;\\n }\\n\\n // private functions\\n\\n function _getBalance(\\n address account,\\n address token\\n )\\n private\\n view\\n returns (uint256)\\n {\\n uint256 result = 0;\\n uint256 tokenCode;\\n\\n /// @dev check if token is actually a contract\\n // solhint-disable-next-line no-inline-assembly\\n assembly { tokenCode := extcodesize(token) } // contract code size\\n\\n if (tokenCode > 0) {\\n /// @dev is it a contract and does it implement balanceOf\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool methodExists,) = token.staticcall(abi.encodeWithSelector(\\n ERC20Token(token).balanceOf.selector,\\n account\\n ));\\n\\n if (methodExists) {\\n result = ERC20Token(token).balanceOf(account);\\n }\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x76a5729807b8581731967ea74fc5e16a2c5c9067457c9059da97f089ffff68b9\",\"license\":\"MIT\"},\"src/common/libs/SafeMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Safe math library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/math/SafeMath.sol\\n */\\nlibrary SafeMathLib {\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n\\n require(c >= a, \\\"SafeMathLib: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMathLib: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n\\n return a - b;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n\\n require(c / a == b, \\\"SafeMathLib: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMathLib: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n\\n return a / b;\\n }\\n\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMathLib: modulo by zero\\\");\\n }\\n\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x6089f354ca754d9c5dd9e800ee5ed86717dbf8f9af470604e0be691ac57c0107\",\"license\":\"MIT\"},\"src/common/token/ERC20Token.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/SafeMathLib.sol\\\";\\n\\n\\n/**\\n * @title ERC20 token\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/token/ERC20/ERC20.sol\\n */\\ncontract ERC20Token {\\n using SafeMathLib for uint256;\\n\\n string public name;\\n string public symbol;\\n uint8 public decimals;\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) internal balances;\\n mapping(address => mapping(address => uint256)) internal allowances;\\n\\n // events\\n\\n event Transfer(\\n address indexed from,\\n address indexed to,\\n uint256 value\\n );\\n\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n function transfer(\\n address to,\\n uint256 value\\n )\\n external\\n returns (bool)\\n {\\n _transfer(_getSender(), to, value);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n address sender = _getSender();\\n\\n _transfer(from, to, value);\\n _approve(from, sender, allowances[from][sender].sub(value));\\n\\n return true;\\n }\\n\\n function approve(\\n address spender,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n _approve(_getSender(), spender, value);\\n\\n return true;\\n }\\n\\n // external functions (views)\\n\\n function balanceOf(\\n address owner\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return balances[owner];\\n }\\n\\n function allowance(\\n address owner,\\n address spender\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[owner][spender];\\n }\\n\\n // internal functions\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n from != address(0),\\n \\\"ERC20Token: cannot transfer from 0x0 address\\\"\\n );\\n require(\\n to != address(0),\\n \\\"ERC20Token: cannot transfer to 0x0 address\\\"\\n );\\n\\n balances[from] = balances[from].sub(value);\\n balances[to] = balances[to].add(value);\\n\\n emit Transfer(from, to, value);\\n }\\n\\n function _approve(\\n address owner,\\n address spender,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot approve from 0x0 address\\\"\\n );\\n require(\\n spender != address(0),\\n \\\"ERC20Token: cannot approve to 0x0 address\\\"\\n );\\n\\n allowances[owner][spender] = value;\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function _mint(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot mint to 0x0 address\\\"\\n );\\n require(\\n value > 0,\\n \\\"ERC20Token: cannot mint 0 value\\\"\\n );\\n\\n balances[owner] = balances[owner].add(value);\\n totalSupply = totalSupply.add(value);\\n\\n emit Transfer(address(0), owner, value);\\n }\\n\\n function _burn(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot burn from 0x0 address\\\"\\n );\\n\\n balances[owner] = balances[owner].sub(\\n value,\\n \\\"ERC20Token: burn value exceeds balance\\\"\\n );\\n\\n totalSupply = totalSupply.sub(value);\\n\\n emit Transfer(owner, address(0), value);\\n }\\n\\n // internal functions (views)\\n\\n function _getSender()\\n virtual\\n internal\\n view\\n returns (address)\\n {\\n return msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x6f2b0bd08da549c6c1f5ceee85766832d587dde62c56bebc3a14bd9ea407e03d\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506106a2806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063ef5bfc3714610030575b600080fd5b6100fc6004803603604081101561004657600080fd5b810190808035906020019064010000000081111561006357600080fd5b82018360208201111561007557600080fd5b8035906020019184602083028401116401000000008311171561009757600080fd5b9091929391929390803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460208302840111640100000000831117156100ec57600080fd5b9091929391929390505050610153565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561013f578082015181840152602081019050610124565b505050509050019250505060405180910390f35b60608061016f848490508787905061035490919063ffffffff16565b67ffffffffffffffff8111801561018557600080fd5b506040519080825280602002602001820160405280156101b45781602001602082028036833780820191505090505b50905060005b868690508110156103475760005b858590508110156103395760006101fd6101ee848989905061035490919063ffffffff16565b836103da90919063ffffffff16565b9050600073ffffffffffffffffffffffffffffffffffffffff1687878481811061022357fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146102d2576102b589898581811061026a57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1688888581811061029357fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16610462565b8482815181106102c157fe5b60200260200101818152505061032b565b8888848181106102de57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163184828151811061031e57fe5b6020026020010181815250505b5080806001019150506101c8565b5080806001019150506101ba565b5080915050949350505050565b60008083141561036757600090506103d4565b600082840290508284828161037857fe5b04146103cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806106726024913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015610458576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174684c69623a206164646974696f6e206f766572666c6f77000081525060200191505060405180910390fd5b8091505092915050565b600080600090506000833b905060008111156106665760008473ffffffffffffffffffffffffffffffffffffffff166370a0823160e01b87604051602401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310610550578051825260208201915060208101905060208303925061052d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146105b0576040519150601f19603f3d011682016040523d82523d6000602084013e6105b5565b606091505b505090508015610664578473ffffffffffffffffffffffffffffffffffffffff166370a08231876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561062657600080fd5b505afa15801561063a573d6000803e3d6000fd5b505050506040513d602081101561065057600080fd5b810190808051906020019092919050505092505b505b81925050509291505056fe536166654d6174684c69623a206d756c7469706c69636174696f6e206f766572666c6f77a164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063ef5bfc3714610030575b600080fd5b6100fc6004803603604081101561004657600080fd5b810190808035906020019064010000000081111561006357600080fd5b82018360208201111561007557600080fd5b8035906020019184602083028401116401000000008311171561009757600080fd5b9091929391929390803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460208302840111640100000000831117156100ec57600080fd5b9091929391929390505050610153565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561013f578082015181840152602081019050610124565b505050509050019250505060405180910390f35b60608061016f848490508787905061035490919063ffffffff16565b67ffffffffffffffff8111801561018557600080fd5b506040519080825280602002602001820160405280156101b45781602001602082028036833780820191505090505b50905060005b868690508110156103475760005b858590508110156103395760006101fd6101ee848989905061035490919063ffffffff16565b836103da90919063ffffffff16565b9050600073ffffffffffffffffffffffffffffffffffffffff1687878481811061022357fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146102d2576102b589898581811061026a57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1688888581811061029357fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16610462565b8482815181106102c157fe5b60200260200101818152505061032b565b8888848181106102de57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163184828151811061031e57fe5b6020026020010181815250505b5080806001019150506101c8565b5080806001019150506101ba565b5080915050949350505050565b60008083141561036757600090506103d4565b600082840290508284828161037857fe5b04146103cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806106726024913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015610458576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174684c69623a206164646974696f6e206f766572666c6f77000081525060200191505060405180910390fd5b8091505092915050565b600080600090506000833b905060008111156106665760008473ffffffffffffffffffffffffffffffffffffffff166370a0823160e01b87604051602401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310610550578051825260208201915060208101905060208303925061052d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146105b0576040519150601f19603f3d011682016040523d82523d6000602084013e6105b5565b606091505b505090508015610664578473ffffffffffffffffffffffffffffffffffffffff166370a08231876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561062657600080fd5b505afa15801561063a573d6000803e3d6000fd5b505050506040513d602081101561065057600080fd5b810190808051906020019092919050505092505b505b81925050509291505056fe536166654d6174684c69623a206d756c7469706c69636174696f6e206f766572666c6f77a164736f6c634300060c000a", + "devdoc": { + "author": "Jegor Sidorenko Stanisław Głogowski ", + "kind": "dev", + "methods": { + "getBalances(address[],address[])": { + "details": "Pass 0x0 as a \"token\" address to get ETH balance. Possible error throws: - extremely large arrays for account and or tokens (gas cost too high)", + "params": { + "accounts": "array of accounts addresses", + "tokens": "array of tokens addresses" + }, + "returns": { + "_0": "a one-dimensional that's user.length * tokens.length long. The array is ordered by all of the 0th accounts token balances, then the 1th user, and so on." + } + } + }, + "title": "Balances helper", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "getBalances(address[],address[])": { + "notice": "Checks the token balances of accounts for multiple tokens." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/BalancesHelperV2.json b/deployments/fuseSparknet/BalancesHelperV2.json new file mode 100644 index 00000000..7cc07dfd --- /dev/null +++ b/deployments/fuseSparknet/BalancesHelperV2.json @@ -0,0 +1,160 @@ +{ + "address": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "AccountZeroAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "TokenZeroAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "getBalances", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "getSuperfluidWrappedTokenBalances", + "outputs": [ + { + "internalType": "int256[]", + "name": "", + "type": "int256[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x794c538975130b41812df708b2174c971ab7af6fa1e19bb5d2b4301c7071c893", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "964203", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x1bd69117503aaef0f7fcf5420f896a0838dacbcbe129c46b0123876090254c2b", + "transactionHash": "0x794c538975130b41812df708b2174c971ab7af6fa1e19bb5d2b4301c7071c893", + "logs": [], + "blockNumber": 5497449, + "cumulativeGasUsed": "964203", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "7a183f869f73d4ccd46c6d23b208518b", + "metadata": "{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"AccountZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"TokenZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getBalances\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"getSuperfluidWrappedTokenBalances\",\"outputs\":[{\"internalType\":\"int256[]\",\"name\":\"\",\"type\":\"int256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"getBalances(address[],address[])\":{\"details\":\"Error thrown if: account or token address is address(0), large arrays of accounts/tokens are passed in could cause gas block limit issue\",\"params\":{\"accounts\":\"= Array of accounts addresses\",\"tokens\":\"= Array of tokens addresses\"},\"returns\":{\"_0\":\"One-dimensional that's accounts.length * tokens.length long. The array is ordered by all of accounts[0] token balances, then accounts[1] etc.\"}},\"getSuperfluidWrappedTokenBalances(address[],address[])\":{\"details\":\"Error thrown if: account or token address is address(0), large arrays of accounts/tokens are passed in could cause gas block limit issue\",\"params\":{\"accounts\":\"= Array of accounts addresses\",\"tokens\":\"= Array of tokens addresses\"},\"returns\":{\"_0\":\"One-dimensional that's accounts.length * tokens.length long. The array is ordered by all of accounts[0] token balances, then accounts[1] etc.\"}}},\"version\":1},\"userdoc\":{\"errors\":{\"AccountZeroAddress(address,address)\":[{\"notice\":\"Custom errors to handle address(0)\"}]},\"kind\":\"user\",\"methods\":{\"getBalances(address[],address[])\":{\"notice\":\"Returns balances of accounts for multiple ERC20 tokens.\"},\"getSuperfluidWrappedTokenBalances(address[],address[])\":{\"notice\":\"Returns balances of accounts for multiple Wrapped Super Tokens.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/common/helpers/BalancesHelperV2.sol\":\"BalancesHelperV2\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../token/ERC20/IERC20.sol\\\";\\n\",\"keccak256\":\"0x6ebf1944ab804b8660eb6fc52f9fe84588cee01c2566a69023e59497e7d27f45\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\",\"keccak256\":\"0x9750c6b834f7b43000631af5cc30001c5f547b3ceb3635488f140f60e897ea6b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2ccf9d2313a313d41a791505f2b5abfdc62191b5d4334f7f7a82691c088a1c87\",\"license\":\"MIT\"},\"@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperAgreement.sol\":{\"content\":\"// SPDX-License-Identifier: AGPLv3\\npragma solidity >= 0.8.0;\\n\\nimport { ISuperfluidToken } from \\\"./ISuperfluidToken.sol\\\";\\n\\n/**\\n * @title Super agreement interface\\n * @author Superfluid\\n */\\ninterface ISuperAgreement {\\n\\n /**\\n * @dev Get the type of the agreement class\\n */\\n function agreementType() external view returns (bytes32);\\n\\n /**\\n * @dev Calculate the real-time balance for the account of this agreement class\\n * @param account Account the state belongs to\\n * @param time Time used for the calculation\\n * @return dynamicBalance Dynamic balance portion of real-time balance of this agreement\\n * @return deposit Account deposit amount of this agreement\\n * @return owedDeposit Account owed deposit amount of this agreement\\n */\\n function realtimeBalanceOf(\\n ISuperfluidToken token,\\n address account,\\n uint256 time\\n )\\n external\\n view\\n returns (\\n int256 dynamicBalance,\\n uint256 deposit,\\n uint256 owedDeposit\\n );\\n\\n}\\n\",\"keccak256\":\"0xc3a6a907245116bcecc70fe4b207454012e8ce4fa190228fb8bbe39e0b1bc5cf\",\"license\":\"AGPLv3\"},\"@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluidToken.sol\":{\"content\":\"// SPDX-License-Identifier: AGPLv3\\npragma solidity >= 0.8.0;\\n\\nimport { ISuperAgreement } from \\\"./ISuperAgreement.sol\\\";\\n\\n\\n/**\\n * @title Superfluid token interface\\n * @author Superfluid\\n */\\ninterface ISuperfluidToken {\\n\\n /**************************************************************************\\n * Basic information\\n *************************************************************************/\\n\\n /**\\n * @dev Get superfluid host contract address\\n */\\n function getHost() external view returns(address host);\\n\\n /**\\n * @dev Encoded liquidation type data mainly used for handling stack to deep errors\\n *\\n * Note:\\n * - version: 1\\n * - liquidationType key:\\n * - 0 = reward account receives reward (PIC period)\\n * - 1 = liquidator account receives reward (Pleb period)\\n * - 2 = liquidator account receives reward (Pirate period/bailout)\\n */\\n struct LiquidationTypeData {\\n uint256 version;\\n uint8 liquidationType;\\n }\\n\\n /**************************************************************************\\n * Real-time balance functions\\n *************************************************************************/\\n\\n /**\\n * @dev Calculate the real balance of a user, taking in consideration all agreements of the account\\n * @param account for the query\\n * @param timestamp Time of balance\\n * @return availableBalance Real-time balance\\n * @return deposit Account deposit\\n * @return owedDeposit Account owed Deposit\\n */\\n function realtimeBalanceOf(\\n address account,\\n uint256 timestamp\\n )\\n external view\\n returns (\\n int256 availableBalance,\\n uint256 deposit,\\n uint256 owedDeposit);\\n\\n /**\\n * @notice Calculate the realtime balance given the current host.getNow() value\\n * @dev realtimeBalanceOf with timestamp equals to block timestamp\\n * @param account for the query\\n * @return availableBalance Real-time balance\\n * @return deposit Account deposit\\n * @return owedDeposit Account owed Deposit\\n */\\n function realtimeBalanceOfNow(\\n address account\\n )\\n external view\\n returns (\\n int256 availableBalance,\\n uint256 deposit,\\n uint256 owedDeposit,\\n uint256 timestamp);\\n\\n /**\\n * @notice Check if account is critical\\n * @dev A critical account is when availableBalance < 0\\n * @param account The account to check\\n * @param timestamp The time we'd like to check if the account is critical (should use future)\\n * @return isCritical Whether the account is critical\\n */\\n function isAccountCritical(\\n address account,\\n uint256 timestamp\\n )\\n external view\\n returns(bool isCritical);\\n\\n /**\\n * @notice Check if account is critical now (current host.getNow())\\n * @dev A critical account is when availableBalance < 0\\n * @param account The account to check\\n * @return isCritical Whether the account is critical\\n */\\n function isAccountCriticalNow(\\n address account\\n )\\n external view\\n returns(bool isCritical);\\n\\n /**\\n * @notice Check if account is solvent\\n * @dev An account is insolvent when the sum of deposits for a token can't cover the negative availableBalance\\n * @param account The account to check\\n * @param timestamp The time we'd like to check if the account is solvent (should use future)\\n * @return isSolvent\\n */\\n function isAccountSolvent(\\n address account,\\n uint256 timestamp\\n )\\n external view\\n returns(bool isSolvent);\\n\\n /**\\n * @notice Check if account is solvent now\\n * @dev An account is insolvent when the sum of deposits for a token can't cover the negative availableBalance\\n * @param account The account to check\\n * @return isSolvent\\n */\\n function isAccountSolventNow(\\n address account\\n )\\n external view\\n returns(bool isSolvent);\\n\\n /**\\n * @notice Get a list of agreements that is active for the account\\n * @dev An active agreement is one that has state for the account\\n * @param account Account to query\\n * @return activeAgreements List of accounts that have non-zero states for the account\\n */\\n function getAccountActiveAgreements(address account)\\n external view\\n returns(ISuperAgreement[] memory activeAgreements);\\n\\n\\n /**************************************************************************\\n * Super Agreement hosting functions\\n *************************************************************************/\\n\\n /**\\n * @dev Create a new agreement\\n * @param id Agreement ID\\n * @param data Agreement data\\n */\\n function createAgreement(\\n bytes32 id,\\n bytes32[] calldata data\\n )\\n external;\\n /**\\n * @dev Agreement created event\\n * @param agreementClass Contract address of the agreement\\n * @param id Agreement ID\\n * @param data Agreement data\\n */\\n event AgreementCreated(\\n address indexed agreementClass,\\n bytes32 id,\\n bytes32[] data\\n );\\n\\n /**\\n * @dev Get data of the agreement\\n * @param agreementClass Contract address of the agreement\\n * @param id Agreement ID\\n * @return data Data of the agreement\\n */\\n function getAgreementData(\\n address agreementClass,\\n bytes32 id,\\n uint dataLength\\n )\\n external view\\n returns(bytes32[] memory data);\\n\\n /**\\n * @dev Create a new agreement\\n * @param id Agreement ID\\n * @param data Agreement data\\n */\\n function updateAgreementData(\\n bytes32 id,\\n bytes32[] calldata data\\n )\\n external;\\n /**\\n * @dev Agreement updated event\\n * @param agreementClass Contract address of the agreement\\n * @param id Agreement ID\\n * @param data Agreement data\\n */\\n event AgreementUpdated(\\n address indexed agreementClass,\\n bytes32 id,\\n bytes32[] data\\n );\\n\\n /**\\n * @dev Close the agreement\\n * @param id Agreement ID\\n */\\n function terminateAgreement(\\n bytes32 id,\\n uint dataLength\\n )\\n external;\\n /**\\n * @dev Agreement terminated event\\n * @param agreementClass Contract address of the agreement\\n * @param id Agreement ID\\n */\\n event AgreementTerminated(\\n address indexed agreementClass,\\n bytes32 id\\n );\\n\\n /**\\n * @dev Update agreement state slot\\n * @param account Account to be updated\\n *\\n * NOTE\\n * - To clear the storage out, provide zero-ed array of intended length\\n */\\n function updateAgreementStateSlot(\\n address account,\\n uint256 slotId,\\n bytes32[] calldata slotData\\n )\\n external;\\n /**\\n * @dev Agreement account state updated event\\n * @param agreementClass Contract address of the agreement\\n * @param account Account updated\\n * @param slotId slot id of the agreement state\\n */\\n event AgreementStateUpdated(\\n address indexed agreementClass,\\n address indexed account,\\n uint256 slotId\\n );\\n\\n /**\\n * @dev Get data of the slot of the state of an agreement\\n * @param agreementClass Contract address of the agreement\\n * @param account Account to query\\n * @param slotId slot id of the state\\n * @param dataLength length of the state data\\n */\\n function getAgreementStateSlot(\\n address agreementClass,\\n address account,\\n uint256 slotId,\\n uint dataLength\\n )\\n external view\\n returns (bytes32[] memory slotData);\\n\\n /**\\n * @notice Settle balance from an account by the agreement\\n * @dev The agreement needs to make sure that the balance delta is balanced afterwards\\n * @param account Account to query.\\n * @param delta Amount of balance delta to be settled\\n *\\n * Modifiers:\\n * - onlyAgreement\\n */\\n function settleBalance(\\n address account,\\n int256 delta\\n )\\n external;\\n\\n /**\\n * @dev Make liquidation payouts (v2)\\n * @param id Agreement ID\\n * @param liquidationTypeData Data regarding the version of the liquidation schema and the type\\n * @param liquidatorAccount Address of the executor of the liquidation\\n * @param useDefaultRewardAccount Whether or not the default reward account receives the rewardAmount\\n * @param targetAccount Account of the stream sender\\n * @param rewardAmount The amount the reward recepient account will receive\\n * @param targetAccountBalanceDelta The amount the sender account balance should change by\\n *\\n * - If a bailout is required (bailoutAmount > 0)\\n * - the actual reward (single deposit) goes to the executor,\\n * - while the reward account becomes the bailout account\\n * - total bailout include: bailout amount + reward amount\\n * - the targetAccount will be bailed out\\n * - If a bailout is not required\\n * - the targetAccount will pay the rewardAmount\\n * - the liquidator (reward account in PIC period) will receive the rewardAmount\\n *\\n * Modifiers:\\n * - onlyAgreement\\n */\\n function makeLiquidationPayoutsV2\\n (\\n bytes32 id,\\n bytes memory liquidationTypeData,\\n address liquidatorAccount,\\n bool useDefaultRewardAccount,\\n address targetAccount,\\n uint256 rewardAmount,\\n int256 targetAccountBalanceDelta\\n ) external;\\n /**\\n * @dev Agreement liquidation event v2 (including agent account)\\n * @param agreementClass Contract address of the agreement\\n * @param id Agreement ID\\n * @param liquidatorAccount Address of the executor of the liquidation\\n * @param targetAccount Account of the stream sender\\n * @param rewardAccount Account that collects the reward or bails out insolvent accounts\\n * @param rewardAmount The amount the reward recipient account balance should change by\\n * @param targetAccountBalanceDelta The amount the sender account balance should change by\\n * @param liquidationTypeData The encoded liquidation type data including the version (how to decode)\\n *\\n * NOTE:\\n * Reward account rule:\\n * - if the agreement is liquidated during the PIC period\\n * - the rewardAccount will get the rewardAmount (remaining deposit), regardless of the liquidatorAccount\\n * - the targetAccount will pay for the rewardAmount\\n * - if the agreement is liquidated after the PIC period AND the targetAccount is solvent\\n * - the liquidatorAccount will get the rewardAmount (remaining deposit)\\n * - the targetAccount will pay for the rewardAmount\\n * - if the targetAccount is insolvent\\n * - the liquidatorAccount will get the rewardAmount (single deposit)\\n * - the rewardAccount will pay for both the rewardAmount and bailoutAmount\\n * - the targetAccount will receive the bailoutAmount\\n */\\n event AgreementLiquidatedV2(\\n address indexed agreementClass,\\n bytes32 id,\\n address indexed liquidatorAccount,\\n address indexed targetAccount,\\n address rewardAccount,\\n uint256 rewardAmount,\\n int256 targetAccountBalanceDelta,\\n bytes liquidationTypeData\\n );\\n\\n /**************************************************************************\\n * Function modifiers for access control and parameter validations\\n *\\n * While they cannot be explicitly stated in function definitions, they are\\n * listed in function definition comments instead for clarity.\\n *\\n * NOTE: solidity-coverage not supporting it\\n *************************************************************************/\\n\\n /// @dev The msg.sender must be host contract\\n //modifier onlyHost() virtual;\\n\\n /// @dev The msg.sender must be a listed agreement.\\n //modifier onlyAgreement() virtual;\\n\\n /**************************************************************************\\n * DEPRECATED\\n *************************************************************************/\\n\\n /**\\n * @dev Agreement liquidation event (DEPRECATED BY AgreementLiquidatedBy)\\n * @param agreementClass Contract address of the agreement\\n * @param id Agreement ID\\n * @param penaltyAccount Account of the agreement to be penalized\\n * @param rewardAccount Account that collect the reward\\n * @param rewardAmount Amount of liquidation reward\\n *\\n * NOTE:\\n *\\n * [DEPRECATED] Use AgreementLiquidatedV2 instead\\n */\\n event AgreementLiquidated(\\n address indexed agreementClass,\\n bytes32 id,\\n address indexed penaltyAccount,\\n address indexed rewardAccount,\\n uint256 rewardAmount\\n );\\n\\n /**\\n * @dev System bailout occurred (DEPRECATED BY AgreementLiquidatedBy)\\n * @param bailoutAccount Account that bailout the penalty account\\n * @param bailoutAmount Amount of account bailout\\n *\\n * NOTE:\\n *\\n * [DEPRECATED] Use AgreementLiquidatedV2 instead\\n */\\n event Bailout(\\n address indexed bailoutAccount,\\n uint256 bailoutAmount\\n );\\n\\n /**\\n * @dev Agreement liquidation event (DEPRECATED BY AgreementLiquidatedV2)\\n * @param liquidatorAccount Account of the agent that performed the liquidation.\\n * @param agreementClass Contract address of the agreement\\n * @param id Agreement ID\\n * @param penaltyAccount Account of the agreement to be penalized\\n * @param bondAccount Account that collect the reward or bailout accounts\\n * @param rewardAmount Amount of liquidation reward\\n * @param bailoutAmount Amount of liquidation bailouot\\n *\\n * NOTE:\\n * Reward account rule:\\n * - if bailout is equal to 0, then\\n * - the bondAccount will get the rewardAmount,\\n * - the penaltyAccount will pay for the rewardAmount.\\n * - if bailout is larger than 0, then\\n * - the liquidatorAccount will get the rewardAmouont,\\n * - the bondAccount will pay for both the rewardAmount and bailoutAmount,\\n * - the penaltyAccount will pay for the rewardAmount while get the bailoutAmount.\\n */\\n event AgreementLiquidatedBy(\\n address liquidatorAccount,\\n address indexed agreementClass,\\n bytes32 id,\\n address indexed penaltyAccount,\\n address indexed bondAccount,\\n uint256 rewardAmount,\\n uint256 bailoutAmount\\n );\\n}\\n\",\"keccak256\":\"0x9189eaba9e856cc4932ea29eeaf4e89a09448dde13860591691ec122856fdc75\",\"license\":\"AGPLv3\"},\"src/common/helpers/BalancesHelperV2.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// solhint-disable-next-line\\npragma solidity 0.8.4;\\n\\n/// @title BalancesHelperV2\\n/// @author Luke Wickens \\n/// @notice Used to get account balances of ERC20 tokens and Wrapped Super Tokens\\n\\nimport {ISuperfluidToken} from \\\"@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluidToken.sol\\\";\\nimport {IERC20} from \\\"@openzeppelin/contracts/interfaces/IERC20.sol\\\";\\nimport {Address} from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\ncontract BalancesHelperV2 {\\n using Address for address;\\n\\n /// @notice Custom errors to handle address(0)\\n error AccountZeroAddress(address account, address token);\\n error TokenZeroAddress(address account, address token);\\n\\n constructor() {}\\n\\n /// @notice Returns balances of accounts for multiple ERC20 tokens.\\n /// @dev Error thrown if: account or token address is address(0),\\n /// large arrays of accounts/tokens are passed in could cause gas block limit issue\\n /// @param accounts = Array of accounts addresses\\n /// @param tokens = Array of tokens addresses\\n /// @return One-dimensional that's accounts.length * tokens.length long. The\\n /// array is ordered by all of accounts[0] token balances, then accounts[1] etc.\\n\\n function getBalances(address[] calldata accounts, address[] calldata tokens)\\n external\\n view\\n returns (uint256[] memory)\\n {\\n uint256[] memory result = new uint256[](\\n accounts.length * tokens.length\\n );\\n\\n for (uint256 i; i < accounts.length; i++) {\\n for (uint256 j; j < tokens.length; j++) {\\n uint256 index = j + (tokens.length * i);\\n result[index] = _getBalance(accounts[i], tokens[j]);\\n }\\n }\\n return result;\\n }\\n\\n /// @notice Returns balances of accounts for multiple Wrapped Super Tokens.\\n /// @dev Error thrown if: account or token address is address(0),\\n /// large arrays of accounts/tokens are passed in could cause gas block limit issue\\n /// @param accounts = Array of accounts addresses\\n /// @param tokens = Array of tokens addresses\\n /// @return One-dimensional that's accounts.length * tokens.length long. The\\n /// array is ordered by all of accounts[0] token balances, then accounts[1] etc.\\n\\n function getSuperfluidWrappedTokenBalances(\\n address[] calldata accounts,\\n address[] calldata tokens\\n ) external view returns (int256[] memory) {\\n int256[] memory result = new int256[](accounts.length * tokens.length);\\n\\n for (uint256 i; i < accounts.length; i++) {\\n for (uint256 j; j < tokens.length; j++) {\\n uint256 index = j + (tokens.length * i);\\n result[index] = _getSuperfluidWrappedTokenBalance(\\n accounts[i],\\n tokens[j]\\n );\\n }\\n }\\n return result;\\n }\\n\\n /// Private fuctions\\n\\n /// @notice Returns balance of account for an ERC20 token.\\n /// @dev Error thrown if: account or token address is address(0)\\n /// @param account = account address\\n /// @param token = tokens address\\n /// @return balance of account as uint256.\\n\\n function _getBalance(address account, address token)\\n private\\n view\\n returns (uint256)\\n {\\n if (account == address(0)) revert AccountZeroAddress(account, token);\\n if (token == address(0)) revert TokenZeroAddress(account, token);\\n\\n bytes memory returnedData = token.functionStaticCall(\\n abi.encodeWithSelector(IERC20(token).balanceOf.selector, account)\\n );\\n\\n return abi.decode(returnedData, (uint256));\\n }\\n\\n /// @notice Returns real balance of a user, taking into consideration all agreements of account\\n /// @dev Error thrown if: account or token address is address(0)\\n /// @param account = account address\\n /// @param token = tokens address\\n /// @return available balance of account as int256.\\n\\n function _getSuperfluidWrappedTokenBalance(address account, address token)\\n private\\n view\\n returns (int256)\\n {\\n if (account == address(0)) revert AccountZeroAddress(account, token);\\n if (token == address(0)) revert TokenZeroAddress(account, token);\\n\\n bytes memory returnedData = token.functionStaticCall(\\n abi.encodeWithSelector(\\n ISuperfluidToken(token).realtimeBalanceOfNow.selector,\\n account\\n )\\n );\\n\\n (int256 availableBalance, , , ) = abi.decode(\\n returnedData,\\n (int256, uint256, uint256, uint256)\\n );\\n return availableBalance;\\n }\\n}\\n\",\"keccak256\":\"0x02dfe13a8521bebc6f623a9df9877d7c66f8cfb67c10ee1a041dcba42ef7b973\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061108a806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806350c5a7101461003b578063ef5bfc371461006b575b600080fd5b610055600480360381019061005091906109e6565b61009b565b6040516100629190610ce8565b60405180910390f35b610085600480360381019061008091906109e6565b610279565b6040516100929190610d0a565b60405180910390f35b6060600083839050868690506100b19190610e68565b67ffffffffffffffff8111156100f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405190808252806020026020018201604052801561011e5781602001602082028036833780820191505090505b50905060005b8686905081101561026c5760005b85859050811015610258576000828787905061014e9190610e68565b826101599190610e12565b90506101ff898985818110610197577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906101ac91906109bd565b8888858181106101e5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906101fa91906109bd565b610457565b848281518110610238577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101818152505050808061025090610f3b565b915050610132565b50808061026490610f3b565b915050610124565b5080915050949350505050565b60606000838390508686905061028f9190610e68565b67ffffffffffffffff8111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102fc5781602001602082028036833780820191505090505b50905060005b8686905081101561044a5760005b85859050811015610436576000828787905061032c9190610e68565b826103379190610e12565b90506103dd898985818110610375577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201602081019061038a91906109bd565b8888858181106103c3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906103d891906109bd565b610608565b848281518110610416577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101818152505050808061042e90610f3b565b915050610310565b50808061044290610f3b565b915050610302565b5080915050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156104cc5782826040517f484305ff0000000000000000000000000000000000000000000000000000000081526004016104c3929190610cbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156105405782826040517f41f93bdf000000000000000000000000000000000000000000000000000000008152600401610537929190610cbf565b60405180910390fd5b60006105e0632ec8eec760e01b8560405160240161055e9190610ca4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050508473ffffffffffffffffffffffffffffffffffffffff166107b090919063ffffffff16565b90506000818060200190518101906105f89190610a5b565b5050509050809250505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561067d5782826040517f484305ff000000000000000000000000000000000000000000000000000000008152600401610674929190610cbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156106f15782826040517f41f93bdf0000000000000000000000000000000000000000000000000000000081526004016106e8929190610cbf565b60405180910390fd5b60006107916370a0823160e01b8560405160240161070f9190610ca4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050508473ffffffffffffffffffffffffffffffffffffffff166107b090919063ffffffff16565b9050808060200190518101906107a79190610abe565b91505092915050565b60606107d58383604051806060016040528060258152602001611059602591396107dd565b905092915050565b60606107e8846108aa565b610827576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081e90610d4e565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161084f9190610c8d565b600060405180830381855afa9150503d806000811461088a576040519150601f19603f3d011682016040523d82523d6000602084013e61088f565b606091505b509150915061089f8282866108cd565b925050509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156108dd5782905061092d565b6000835111156108f05782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109249190610d2c565b60405180910390fd5b9392505050565b60008135905061094381611013565b92915050565b60008083601f84011261095b57600080fd5b8235905067ffffffffffffffff81111561097457600080fd5b60208301915083602082028301111561098c57600080fd5b9250929050565b6000815190506109a28161102a565b92915050565b6000815190506109b781611041565b92915050565b6000602082840312156109cf57600080fd5b60006109dd84828501610934565b91505092915050565b600080600080604085870312156109fc57600080fd5b600085013567ffffffffffffffff811115610a1657600080fd5b610a2287828801610949565b9450945050602085013567ffffffffffffffff811115610a4157600080fd5b610a4d87828801610949565b925092505092959194509250565b60008060008060808587031215610a7157600080fd5b6000610a7f87828801610993565b9450506020610a90878288016109a8565b9350506040610aa1878288016109a8565b9250506060610ab2878288016109a8565b91505092959194509250565b600060208284031215610ad057600080fd5b6000610ade848285016109a8565b91505092915050565b6000610af38383610c13565b60208301905092915050565b6000610b0b8383610c7e565b60208301905092915050565b610b2081610ec2565b82525050565b6000610b3182610d8e565b610b3b8185610dd4565b9350610b4683610d6e565b8060005b83811015610b77578151610b5e8882610ae7565b9750610b6983610dba565b925050600181019050610b4a565b5085935050505092915050565b6000610b8f82610d99565b610b998185610de5565b9350610ba483610d7e565b8060005b83811015610bd5578151610bbc8882610aff565b9750610bc783610dc7565b925050600181019050610ba8565b5085935050505092915050565b6000610bed82610da4565b610bf78185610df6565b9350610c07818560208601610f08565b80840191505092915050565b610c1c81610ed4565b82525050565b6000610c2d82610daf565b610c378185610e01565b9350610c47818560208601610f08565b610c5081610fb3565b840191505092915050565b6000610c68602483610e01565b9150610c7382610fc4565b604082019050919050565b610c8781610efe565b82525050565b6000610c998284610be2565b915081905092915050565b6000602082019050610cb96000830184610b17565b92915050565b6000604082019050610cd46000830185610b17565b610ce16020830184610b17565b9392505050565b60006020820190508181036000830152610d028184610b26565b905092915050565b60006020820190508181036000830152610d248184610b84565b905092915050565b60006020820190508181036000830152610d468184610c22565b905092915050565b60006020820190508181036000830152610d6781610c5b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610e1d82610efe565b9150610e2883610efe565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610e5d57610e5c610f84565b5b828201905092915050565b6000610e7382610efe565b9150610e7e83610efe565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610eb757610eb6610f84565b5b828202905092915050565b6000610ecd82610ede565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610f26578082015181840152602081019050610f0b565b83811115610f35576000848401525b50505050565b6000610f4682610efe565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610f7957610f78610f84565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000601f19601f8301169050919050565b7f416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7460008201527f7261637400000000000000000000000000000000000000000000000000000000602082015250565b61101c81610ec2565b811461102757600080fd5b50565b61103381610ed4565b811461103e57600080fd5b50565b61104a81610efe565b811461105557600080fd5b5056fe416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564a164736f6c6343000804000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806350c5a7101461003b578063ef5bfc371461006b575b600080fd5b610055600480360381019061005091906109e6565b61009b565b6040516100629190610ce8565b60405180910390f35b610085600480360381019061008091906109e6565b610279565b6040516100929190610d0a565b60405180910390f35b6060600083839050868690506100b19190610e68565b67ffffffffffffffff8111156100f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405190808252806020026020018201604052801561011e5781602001602082028036833780820191505090505b50905060005b8686905081101561026c5760005b85859050811015610258576000828787905061014e9190610e68565b826101599190610e12565b90506101ff898985818110610197577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906101ac91906109bd565b8888858181106101e5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906101fa91906109bd565b610457565b848281518110610238577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101818152505050808061025090610f3b565b915050610132565b50808061026490610f3b565b915050610124565b5080915050949350505050565b60606000838390508686905061028f9190610e68565b67ffffffffffffffff8111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102fc5781602001602082028036833780820191505090505b50905060005b8686905081101561044a5760005b85859050811015610436576000828787905061032c9190610e68565b826103379190610e12565b90506103dd898985818110610375577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201602081019061038a91906109bd565b8888858181106103c3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906103d891906109bd565b610608565b848281518110610416577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101818152505050808061042e90610f3b565b915050610310565b50808061044290610f3b565b915050610302565b5080915050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156104cc5782826040517f484305ff0000000000000000000000000000000000000000000000000000000081526004016104c3929190610cbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156105405782826040517f41f93bdf000000000000000000000000000000000000000000000000000000008152600401610537929190610cbf565b60405180910390fd5b60006105e0632ec8eec760e01b8560405160240161055e9190610ca4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050508473ffffffffffffffffffffffffffffffffffffffff166107b090919063ffffffff16565b90506000818060200190518101906105f89190610a5b565b5050509050809250505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561067d5782826040517f484305ff000000000000000000000000000000000000000000000000000000008152600401610674929190610cbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156106f15782826040517f41f93bdf0000000000000000000000000000000000000000000000000000000081526004016106e8929190610cbf565b60405180910390fd5b60006107916370a0823160e01b8560405160240161070f9190610ca4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050508473ffffffffffffffffffffffffffffffffffffffff166107b090919063ffffffff16565b9050808060200190518101906107a79190610abe565b91505092915050565b60606107d58383604051806060016040528060258152602001611059602591396107dd565b905092915050565b60606107e8846108aa565b610827576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081e90610d4e565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161084f9190610c8d565b600060405180830381855afa9150503d806000811461088a576040519150601f19603f3d011682016040523d82523d6000602084013e61088f565b606091505b509150915061089f8282866108cd565b925050509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156108dd5782905061092d565b6000835111156108f05782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109249190610d2c565b60405180910390fd5b9392505050565b60008135905061094381611013565b92915050565b60008083601f84011261095b57600080fd5b8235905067ffffffffffffffff81111561097457600080fd5b60208301915083602082028301111561098c57600080fd5b9250929050565b6000815190506109a28161102a565b92915050565b6000815190506109b781611041565b92915050565b6000602082840312156109cf57600080fd5b60006109dd84828501610934565b91505092915050565b600080600080604085870312156109fc57600080fd5b600085013567ffffffffffffffff811115610a1657600080fd5b610a2287828801610949565b9450945050602085013567ffffffffffffffff811115610a4157600080fd5b610a4d87828801610949565b925092505092959194509250565b60008060008060808587031215610a7157600080fd5b6000610a7f87828801610993565b9450506020610a90878288016109a8565b9350506040610aa1878288016109a8565b9250506060610ab2878288016109a8565b91505092959194509250565b600060208284031215610ad057600080fd5b6000610ade848285016109a8565b91505092915050565b6000610af38383610c13565b60208301905092915050565b6000610b0b8383610c7e565b60208301905092915050565b610b2081610ec2565b82525050565b6000610b3182610d8e565b610b3b8185610dd4565b9350610b4683610d6e565b8060005b83811015610b77578151610b5e8882610ae7565b9750610b6983610dba565b925050600181019050610b4a565b5085935050505092915050565b6000610b8f82610d99565b610b998185610de5565b9350610ba483610d7e565b8060005b83811015610bd5578151610bbc8882610aff565b9750610bc783610dc7565b925050600181019050610ba8565b5085935050505092915050565b6000610bed82610da4565b610bf78185610df6565b9350610c07818560208601610f08565b80840191505092915050565b610c1c81610ed4565b82525050565b6000610c2d82610daf565b610c378185610e01565b9350610c47818560208601610f08565b610c5081610fb3565b840191505092915050565b6000610c68602483610e01565b9150610c7382610fc4565b604082019050919050565b610c8781610efe565b82525050565b6000610c998284610be2565b915081905092915050565b6000602082019050610cb96000830184610b17565b92915050565b6000604082019050610cd46000830185610b17565b610ce16020830184610b17565b9392505050565b60006020820190508181036000830152610d028184610b26565b905092915050565b60006020820190508181036000830152610d248184610b84565b905092915050565b60006020820190508181036000830152610d468184610c22565b905092915050565b60006020820190508181036000830152610d6781610c5b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610e1d82610efe565b9150610e2883610efe565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610e5d57610e5c610f84565b5b828201905092915050565b6000610e7382610efe565b9150610e7e83610efe565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610eb757610eb6610f84565b5b828202905092915050565b6000610ecd82610ede565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610f26578082015181840152602081019050610f0b565b83811115610f35576000848401525b50505050565b6000610f4682610efe565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610f7957610f78610f84565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000601f19601f8301169050919050565b7f416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7460008201527f7261637400000000000000000000000000000000000000000000000000000000602082015250565b61101c81610ec2565b811461102757600080fd5b50565b61103381610ed4565b811461103e57600080fd5b50565b61104a81610efe565b811461105557600080fd5b5056fe416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564a164736f6c6343000804000a", + "devdoc": { + "kind": "dev", + "methods": { + "getBalances(address[],address[])": { + "details": "Error thrown if: account or token address is address(0), large arrays of accounts/tokens are passed in could cause gas block limit issue", + "params": { + "accounts": "= Array of accounts addresses", + "tokens": "= Array of tokens addresses" + }, + "returns": { + "_0": "One-dimensional that's accounts.length * tokens.length long. The array is ordered by all of accounts[0] token balances, then accounts[1] etc." + } + }, + "getSuperfluidWrappedTokenBalances(address[],address[])": { + "details": "Error thrown if: account or token address is address(0), large arrays of accounts/tokens are passed in could cause gas block limit issue", + "params": { + "accounts": "= Array of accounts addresses", + "tokens": "= Array of tokens addresses" + }, + "returns": { + "_0": "One-dimensional that's accounts.length * tokens.length long. The array is ordered by all of accounts[0] token balances, then accounts[1] etc." + } + } + }, + "version": 1 + }, + "userdoc": { + "errors": { + "AccountZeroAddress(address,address)": [ + { + "notice": "Custom errors to handle address(0)" + } + ] + }, + "kind": "user", + "methods": { + "getBalances(address[],address[])": { + "notice": "Returns balances of accounts for multiple ERC20 tokens." + }, + "getSuperfluidWrappedTokenBalances(address[],address[])": { + "notice": "Returns balances of accounts for multiple Wrapped Super Tokens." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/Diamond.json b/deployments/fuseSparknet/Diamond.json new file mode 100644 index 00000000..c86b7041 --- /dev/null +++ b/deployments/fuseSparknet/Diamond.json @@ -0,0 +1,94 @@ +{ + "address": "0xF1447514368fCC942279862a8B5D6Ed7beDFf431", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_contractOwner", + "type": "address" + }, + { + "internalType": "address", + "name": "_diamondCutFacet", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0xb04462e8680ede04a12a3dfa9c2b9df35c6ae2f28ec7ea1a15a400e92a722995", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "2451493", + "logsBloom": "0x00000000000200000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000001000000000800000000000000000000020000000000000000000800000000000000000000000000000000400020000000000000000000000000000004000000000004000000001000000000000000000000000000000000000000000000000000010000000200000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2c7de5b7ca95e5c059183b21f7fa341d3e4c28225ee736df467c1e90b5cc914b", + "transactionHash": "0xb04462e8680ede04a12a3dfa9c2b9df35c6ae2f28ec7ea1a15a400e92a722995", + "logs": [ + { + "transactionIndex": 0, + "blockNumber": 5497602, + "transactionHash": "0xb04462e8680ede04a12a3dfa9c2b9df35c6ae2f28ec7ea1a15a400e92a722995", + "address": "0xF1447514368fCC942279862a8B5D6Ed7beDFf431", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000009fd4f6088f2025427ab1e89257a44747081ed59" + ], + "data": "0x", + "logIndex": 0, + "blockHash": "0x2c7de5b7ca95e5c059183b21f7fa341d3e4c28225ee736df467c1e90b5cc914b" + }, + { + "transactionIndex": 0, + "blockNumber": 5497602, + "transactionHash": "0xb04462e8680ede04a12a3dfa9c2b9df35c6ae2f28ec7ea1a15a400e92a722995", + "address": "0xF1447514368fCC942279862a8B5D6Ed7beDFf431", + "topics": [ + "0x8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673" + ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000f859f683a47b3d0e2a964efddf7392972700a1010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011f931c1c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logIndex": 1, + "blockHash": "0x2c7de5b7ca95e5c059183b21f7fa341d3e4c28225ee736df467c1e90b5cc914b" + } + ], + "blockNumber": 5497602, + "cumulativeGasUsed": "2451493", + "status": 1, + "byzantium": true + }, + "args": [ + "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "0xf859F683a47b3D0E2A964eFDdf7392972700a101" + ], + "solcInputHash": "7a183f869f73d4ccd46c6d23b208518b", + "metadata": "{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_contractOwner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_diamondCutFacet\",\"type\":\"address\"}],\"stateMutability\":\"payable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/bridges/Diamond.sol\":\"Diamond\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/bridges/Diamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport {LibDiamond} from \\\"./libs/LibDiamond.sol\\\";\\nimport {IDiamondCut} from \\\"./interfaces/IDiamondCut.sol\\\";\\n\\ncontract Diamond {\\n constructor(address _contractOwner, address _diamondCutFacet) payable {\\n LibDiamond.setContractOwner(_contractOwner);\\n\\n // Add the diamondCut external function from the diamondCutFacet\\n IDiamondCut.FacetCut[] memory cut = new IDiamondCut.FacetCut[](1);\\n bytes4[] memory functionSelectors = new bytes4[](1);\\n functionSelectors[0] = IDiamondCut.diamondCut.selector;\\n cut[0] = IDiamondCut.FacetCut({\\n facetAddress: _diamondCutFacet,\\n action: IDiamondCut.FacetCutAction.Add,\\n functionSelectors: functionSelectors\\n });\\n LibDiamond.diamondCut(cut, address(0), \\\"\\\");\\n }\\n\\n // Find facet for function that is called and execute the\\n // function if a facet is found and return any value.\\n // solhint-disable-next-line no-complex-fallback\\n fallback() external payable {\\n LibDiamond.DiamondStorage storage ds;\\n bytes32 position = LibDiamond.DIAMOND_STORAGE_POSITION;\\n\\n // get diamond storage\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n ds.slot := position\\n }\\n\\n // get facet from function selector\\n address facet = ds.selectorToFacetAndPosition[msg.sig].facetAddress;\\n require(facet != address(0), \\\"Diamond: Function does not exist\\\");\\n\\n // Execute external function from facet using delegatecall and return any value.\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // copy function selector and any arguments\\n calldatacopy(0, 0, calldatasize())\\n // execute function call using the facet\\n let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)\\n // get any return value\\n returndatacopy(0, 0, returndatasize())\\n // return any return value or error back to the caller\\n switch result\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // Able to receive ether\\n // solhint-disable-next-line no-empty-blocks\\n receive() external payable {}\\n}\\n\",\"keccak256\":\"0x8e68493efdca79bc2f5b68ed4f3f7a8f77784d85593a19902610d0b782de1525\",\"license\":\"MIT\"},\"src/bridges/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(\\n FacetCut[] calldata _diamondCut,\\n address _init,\\n bytes calldata _calldata\\n ) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0x608723d9599dc5de624ca7af0751f834bdff25c5b02bc9e817b6f490d3324069\",\"license\":\"MIT\"},\"src/bridges/libs/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { IDiamondCut } from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 internal constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(\\n IDiamondCut.FacetCut[] memory _diamondCut,\\n address _init,\\n bytes memory _calldata\\n ) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(\\n DiamondStorage storage ds,\\n address _facetAddress,\\n bytes4 _selector\\n ) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x7a82c7c0bd4b049b5471c09127fad37873be021813abbe7ec07edb5a908c35e5\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405260405162004fc238038062004fc2833981810160405281019062000029919062001c79565b6200003f82620002ab60201b620001681760201c565b6000600167ffffffffffffffff81111562000083577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015620000c057816020015b620000ac62001bf2565b815260200190600190039081620000a25790505b5090506000600167ffffffffffffffff81111562000107577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015620001365781602001602082028036833780820191505090505b509050631f931c1c60e01b816000815181106200017c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152505060405180606001604052808473ffffffffffffffffffffffffffffffffffffffff168152602001600060028111156200022a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815260200182815250826000815181106200026e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010181905250620002a1826000604051806020016040528060008152506200038a60201b6200023f1760201c565b5050505062002931565b6000620002bd620007e560201b60201c565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60005b835181101562000790576000848281518110620003d3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156200041c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000456577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415620004ff57620004f98583815181106200049b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160000151868481518110620004e1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151604001516200081260201b60201c565b62000779565b600160028111156200053a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000574577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156200061d5762000617858381518110620005b9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160000151868481518110620005ff577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015162000ada60201b60201c565b62000778565b60028081111562000657577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000691577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156200073a5762000734858381518110620006d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106200071c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015162000db560201b60201c565b62000777565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200076e90620021e5565b60405180910390fd5b5b5b5080806200078790620024a4565b9150506200038d565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673838383604051620007c693929190620020ee565b60405180910390a1620007e0828262000f8160201b60201c565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b600081511162000859576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200085090620021a1565b60405180910390fd5b60006200086b620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415620008e0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620008d79062002207565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156200095757620009568285620011b060201b60201c565b5b60005b835181101562000ad3576000848281518110620009a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000a97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000a8e906200226d565b60405180910390fd5b62000aab8583868a6200129460201b60201c565b838062000ab890620024f2565b9450505050808062000aca90620024a4565b9150506200095a565b5050505050565b600081511162000b21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000b1890620021a1565b60405180910390fd5b600062000b33620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141562000ba8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000b9f9062002207565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff16141562000c1f5762000c1e8285620011b060201b60201c565b5b60005b835181101562000dae57600084828151811062000c68577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000d5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000d56906200228f565b60405180910390fd5b62000d728582846200144160201b60201c565b62000d868583868a6200129460201b60201c565b838062000d9390620024f2565b9450505050808062000da590620024a4565b91505062000c22565b5050505050565b600081511162000dfc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000df390620021a1565b60405180910390fd5b600062000e0e620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161462000e82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000e7990620022b1565b60405180910390fd5b60005b825181101562000f7b57600083828151811062000ecb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905062000f638482846200144160201b60201c565b5050808062000f7290620024a4565b91505062000e85565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156200100457600081511462000ffe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ff5906200215d565b60405180910390fd5b620011ac565b60008151116200104b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620010429062002229565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614620010ab57620010aa8260405180606001604052806028815260200162004f766028913962001b9d60201b60201c565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051620010d59190620020d5565b600060405180830381855af49150503d806000811462001112576040519150601f19603f3d011682016040523d82523d6000602084013e62001117565b606091505b509150915081620011a9576000815111156200116c57806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162001163919062002139565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620011a0906200217f565b60405180910390fd5b50505b5050565b620011db8160405180606001604052806024815260200162004f9e6024913962001b9d60201b60201c565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620014b4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620014ab90620021c3565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562001526576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200151d906200224b565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180549050620015ff919062002388565b9050808214620017e25760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001828154811062001688577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000184815481106200172b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806200185d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff02191690555050600081141562001b96576000600186600201805490506200194b919062002388565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154905081811462001adb576000876002018381548110620019dd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508088600201838154811062001a48577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b8660020180548062001b16577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b905060008111829062001bec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162001be3919062002139565b60405180910390fd5b50505050565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000600281111562001c55577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001606081525090565b60008151905062001c738162002917565b92915050565b6000806040838503121562001c8d57600080fd5b600062001c9d8582860162001c62565b925050602062001cb08582860162001c62565b9150509250929050565b600062001cc8838362001df7565b60208301905092915050565b600062001ce283836200207f565b905092915050565b62001cf581620023c3565b82525050565b62001d0681620023c3565b82525050565b600062001d1982620022f3565b62001d25818562002339565b935062001d3283620022d3565b8060005b8381101562001d6957815162001d4d888262001cba565b975062001d5a836200231f565b92505060018101905062001d36565b5085935050505092915050565b600062001d8382620022fe565b62001d8f81856200234a565b93508360208202850162001da385620022e3565b8060005b8581101562001de5578484038952815162001dc3858262001cd4565b945062001dd0836200232c565b925060208a0199505060018101905062001da7565b50829750879550505050505092915050565b62001e0281620023d7565b82525050565b600062001e158262002309565b62001e2181856200235b565b935062001e338185602086016200246e565b62001e3e816200258a565b840191505092915050565b600062001e568262002309565b62001e6281856200236c565b935062001e748185602086016200246e565b80840191505092915050565b62001e8b816200245a565b82525050565b600062001e9e8262002314565b62001eaa818562002377565b935062001ebc8185602086016200246e565b62001ec7816200258a565b840191505092915050565b600062001ee1603c8362002377565b915062001eee826200259b565b604082019050919050565b600062001f0860268362002377565b915062001f1582620025ea565b604082019050919050565b600062001f2f602b8362002377565b915062001f3c8262002639565b604082019050919050565b600062001f5660378362002377565b915062001f638262002688565b604082019050919050565b600062001f7d60278362002377565b915062001f8a82620026d7565b604082019050919050565b600062001fa4602c8362002377565b915062001fb18262002726565b604082019050919050565b600062001fcb603d8362002377565b915062001fd88262002775565b604082019050919050565b600062001ff2602e8362002377565b915062001fff82620027c4565b604082019050919050565b60006200201960358362002377565b9150620020268262002813565b604082019050919050565b60006200204060388362002377565b91506200204d8262002862565b604082019050919050565b60006200206760368362002377565b91506200207482620028b1565b604082019050919050565b600060608301600083015162002099600086018262001cea565b506020830151620020ae602086018262001e80565b5060408301518482036040860152620020c8828262001d0c565b9150508091505092915050565b6000620020e3828462001e49565b915081905092915050565b600060608201905081810360008301526200210a818662001d76565b90506200211b602083018562001cfb565b81810360408301526200212f818462001e08565b9050949350505050565b6000602082019050818103600083015262002155818462001e91565b905092915050565b60006020820190508181036000830152620021788162001ed2565b9050919050565b600060208201905081810360008301526200219a8162001ef9565b9050919050565b60006020820190508181036000830152620021bc8162001f20565b9050919050565b60006020820190508181036000830152620021de8162001f47565b9050919050565b60006020820190508181036000830152620022008162001f6e565b9050919050565b60006020820190508181036000830152620022228162001f95565b9050919050565b60006020820190508181036000830152620022448162001fbc565b9050919050565b60006020820190508181036000830152620022668162001fe3565b9050919050565b6000602082019050818103600083015262002288816200200a565b9050919050565b60006020820190508181036000830152620022aa8162002031565b9050919050565b60006020820190508181036000830152620022cc8162002058565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000620023958262002438565b9150620023a28362002438565b925082821015620023b857620023b76200252c565b5b828203905092915050565b6000620023d08262002418565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050620024138262002900565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b6000620024678262002403565b9050919050565b60005b838110156200248e57808201518184015260208101905062002471565b838111156200249e576000848401525b50505050565b6000620024b18262002438565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415620024e757620024e66200252c565b5b600182019050919050565b6000620024ff8262002442565b91506bffffffffffffffffffffffff8214156200252157620025206200252c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106200291457620029136200255b565b5b50565b6200292281620023c3565b81146200292e57600080fd5b50565b61263580620029416000396000f3fe60806040523661000b57005b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9050809150600082600001600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013990611ecc565b60405180910390fd5b3660008037600080366000845af43d6000803e8060008114610163573d6000f35b3d6000fd5b600061017261065f565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60005b8351811015610614576000848281518110610286577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610307577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103a45761039f858381518110610349577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061038e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161068c565b610600565b600160028111156103de577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610417577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104b4576104af858381518110610459577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061049e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161092b565b6105ff565b6002808111156104ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610526577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156105c3576105be858381518110610568577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106105ad577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610bd5565b6105fe565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f590611e8c565b60405180910390fd5b5b5b50808061060c9061214d565b915050610242565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161064893929190611da5565b60405180910390a161065a8282610d86565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116106d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c790611e4c565b60405180910390fd5b60006106da61065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561074c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074390611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156107ba576107b98285610f99565b5b60005b8351811015610924576000848281518110610801577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ec90611f2c565b60405180910390fd5b6109018583868a611074565b838061090c90612196565b9450505050808061091c9061214d565b9150506107bd565b5050505050565b600081511161096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690611e4c565b60405180910390fd5b600061097961065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e290611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff161415610a5957610a588285610f99565b5b60005b8351811015610bce576000848281518110610aa0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8b90611f4c565b60405180910390fd5b610b9f858284611221565b610bab8583868a611074565b8380610bb690612196565b94505050508080610bc69061214d565b915050610a5c565b5050505050565b6000815111610c19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1090611e4c565b60405180910390fd5b6000610c2361065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8b90611f6c565b60405180910390fd5b60005b8251811015610d80576000838281518110610cdb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610d6b848284611221565b50508080610d789061214d565b915050610c97565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e04576000815114610dff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df690611e0c565b60405180910390fd5b610f95565b6000815111610e48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3f90611eec565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610e9e57610e9d826040518060600160405280602881526020016125dd6028913961196a565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610ec69190611d8e565b600060405180830381855af49150503d8060008114610f01576040519150601f19603f3d011682016040523d82523d6000602084013e610f06565b606091505b509150915081610f9257600081511115610f5757806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4e9190611dea565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8990611e2c565b60405180910390fd5b50505b5050565b610fbb816040518060600160405280602481526020016126056024913961196a565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611291576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128890611e6c565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611300576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f790611f0c565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506113d79190612041565b90508082146115b75760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001828154811061145e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611631577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156119635760006001866002018054905061171c9190612041565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146118a95760008760020183815481106117ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611816577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806118e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906119b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ad9190611dea565b60405180910390fd5b50505050565b60006119c88383611ad9565b60208301905092915050565b60006119e08383611d3e565b905092915050565b6119f181612075565b82525050565b611a0081612075565b82525050565b6000611a1182611fac565b611a1b8185611ff2565b9350611a2683611f8c565b8060005b83811015611a57578151611a3e88826119bc565b9750611a4983611fd8565b925050600181019050611a2a565b5085935050505092915050565b6000611a6f82611fb7565b611a798185612003565b935083602082028501611a8b85611f9c565b8060005b85811015611ac75784840389528151611aa885826119d4565b9450611ab383611fe5565b925060208a01995050600181019050611a8f565b50829750879550505050505092915050565b611ae281612087565b82525050565b6000611af382611fc2565b611afd8185612014565b9350611b0d81856020860161211a565b611b1681612229565b840191505092915050565b6000611b2c82611fc2565b611b368185612025565b9350611b4681856020860161211a565b80840191505092915050565b611b5b81612108565b82525050565b6000611b6c82611fcd565b611b768185612030565b9350611b8681856020860161211a565b611b8f81612229565b840191505092915050565b6000611ba7603c83612030565b9150611bb28261223a565b604082019050919050565b6000611bca602683612030565b9150611bd582612289565b604082019050919050565b6000611bed602b83612030565b9150611bf8826122d8565b604082019050919050565b6000611c10603783612030565b9150611c1b82612327565b604082019050919050565b6000611c33602783612030565b9150611c3e82612376565b604082019050919050565b6000611c56602c83612030565b9150611c61826123c5565b604082019050919050565b6000611c79602083612030565b9150611c8482612414565b602082019050919050565b6000611c9c603d83612030565b9150611ca78261243d565b604082019050919050565b6000611cbf602e83612030565b9150611cca8261248c565b604082019050919050565b6000611ce2603583612030565b9150611ced826124db565b604082019050919050565b6000611d05603883612030565b9150611d108261252a565b604082019050919050565b6000611d28603683612030565b9150611d3382612579565b604082019050919050565b6000606083016000830151611d5660008601826119e8565b506020830151611d696020860182611b52565b5060408301518482036040860152611d818282611a06565b9150508091505092915050565b6000611d9a8284611b21565b915081905092915050565b60006060820190508181036000830152611dbf8186611a64565b9050611dce60208301856119f7565b8181036040830152611de08184611ae8565b9050949350505050565b60006020820190508181036000830152611e048184611b61565b905092915050565b60006020820190508181036000830152611e2581611b9a565b9050919050565b60006020820190508181036000830152611e4581611bbd565b9050919050565b60006020820190508181036000830152611e6581611be0565b9050919050565b60006020820190508181036000830152611e8581611c03565b9050919050565b60006020820190508181036000830152611ea581611c26565b9050919050565b60006020820190508181036000830152611ec581611c49565b9050919050565b60006020820190508181036000830152611ee581611c6c565b9050919050565b60006020820190508181036000830152611f0581611c8f565b9050919050565b60006020820190508181036000830152611f2581611cb2565b9050919050565b60006020820190508181036000830152611f4581611cd5565b9050919050565b60006020820190508181036000830152611f6581611cf8565b9050919050565b60006020820190508181036000830152611f8581611d1b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061204c826120e6565b9150612057836120e6565b92508282101561206a576120696121cb565b5b828203905092915050565b6000612080826120c6565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60008190506120c1826125c8565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b6000612113826120b3565b9050919050565b60005b8381101561213857808201518184015260208101905061211d565b83811115612147576000848401525b50505050565b6000612158826120e6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561218b5761218a6121cb565b5b600182019050919050565b60006121a1826120f0565b91506bffffffffffffffffffffffff8214156121c0576121bf6121cb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374600082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106125d9576125d86121fa565b5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465", + "deployedBytecode": "0x60806040523661000b57005b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9050809150600082600001600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013990611ecc565b60405180910390fd5b3660008037600080366000845af43d6000803e8060008114610163573d6000f35b3d6000fd5b600061017261065f565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60005b8351811015610614576000848281518110610286577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610307577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103a45761039f858381518110610349577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061038e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161068c565b610600565b600160028111156103de577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610417577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104b4576104af858381518110610459577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061049e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161092b565b6105ff565b6002808111156104ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610526577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156105c3576105be858381518110610568577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106105ad577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610bd5565b6105fe565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f590611e8c565b60405180910390fd5b5b5b50808061060c9061214d565b915050610242565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161064893929190611da5565b60405180910390a161065a8282610d86565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116106d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c790611e4c565b60405180910390fd5b60006106da61065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561074c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074390611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156107ba576107b98285610f99565b5b60005b8351811015610924576000848281518110610801577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ec90611f2c565b60405180910390fd5b6109018583868a611074565b838061090c90612196565b9450505050808061091c9061214d565b9150506107bd565b5050505050565b600081511161096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690611e4c565b60405180910390fd5b600061097961065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e290611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff161415610a5957610a588285610f99565b5b60005b8351811015610bce576000848281518110610aa0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8b90611f4c565b60405180910390fd5b610b9f858284611221565b610bab8583868a611074565b8380610bb690612196565b94505050508080610bc69061214d565b915050610a5c565b5050505050565b6000815111610c19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1090611e4c565b60405180910390fd5b6000610c2361065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8b90611f6c565b60405180910390fd5b60005b8251811015610d80576000838281518110610cdb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610d6b848284611221565b50508080610d789061214d565b915050610c97565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e04576000815114610dff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df690611e0c565b60405180910390fd5b610f95565b6000815111610e48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3f90611eec565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610e9e57610e9d826040518060600160405280602881526020016125dd6028913961196a565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610ec69190611d8e565b600060405180830381855af49150503d8060008114610f01576040519150601f19603f3d011682016040523d82523d6000602084013e610f06565b606091505b509150915081610f9257600081511115610f5757806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4e9190611dea565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8990611e2c565b60405180910390fd5b50505b5050565b610fbb816040518060600160405280602481526020016126056024913961196a565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611291576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128890611e6c565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611300576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f790611f0c565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506113d79190612041565b90508082146115b75760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001828154811061145e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611631577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156119635760006001866002018054905061171c9190612041565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146118a95760008760020183815481106117ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611816577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806118e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906119b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ad9190611dea565b60405180910390fd5b50505050565b60006119c88383611ad9565b60208301905092915050565b60006119e08383611d3e565b905092915050565b6119f181612075565b82525050565b611a0081612075565b82525050565b6000611a1182611fac565b611a1b8185611ff2565b9350611a2683611f8c565b8060005b83811015611a57578151611a3e88826119bc565b9750611a4983611fd8565b925050600181019050611a2a565b5085935050505092915050565b6000611a6f82611fb7565b611a798185612003565b935083602082028501611a8b85611f9c565b8060005b85811015611ac75784840389528151611aa885826119d4565b9450611ab383611fe5565b925060208a01995050600181019050611a8f565b50829750879550505050505092915050565b611ae281612087565b82525050565b6000611af382611fc2565b611afd8185612014565b9350611b0d81856020860161211a565b611b1681612229565b840191505092915050565b6000611b2c82611fc2565b611b368185612025565b9350611b4681856020860161211a565b80840191505092915050565b611b5b81612108565b82525050565b6000611b6c82611fcd565b611b768185612030565b9350611b8681856020860161211a565b611b8f81612229565b840191505092915050565b6000611ba7603c83612030565b9150611bb28261223a565b604082019050919050565b6000611bca602683612030565b9150611bd582612289565b604082019050919050565b6000611bed602b83612030565b9150611bf8826122d8565b604082019050919050565b6000611c10603783612030565b9150611c1b82612327565b604082019050919050565b6000611c33602783612030565b9150611c3e82612376565b604082019050919050565b6000611c56602c83612030565b9150611c61826123c5565b604082019050919050565b6000611c79602083612030565b9150611c8482612414565b602082019050919050565b6000611c9c603d83612030565b9150611ca78261243d565b604082019050919050565b6000611cbf602e83612030565b9150611cca8261248c565b604082019050919050565b6000611ce2603583612030565b9150611ced826124db565b604082019050919050565b6000611d05603883612030565b9150611d108261252a565b604082019050919050565b6000611d28603683612030565b9150611d3382612579565b604082019050919050565b6000606083016000830151611d5660008601826119e8565b506020830151611d696020860182611b52565b5060408301518482036040860152611d818282611a06565b9150508091505092915050565b6000611d9a8284611b21565b915081905092915050565b60006060820190508181036000830152611dbf8186611a64565b9050611dce60208301856119f7565b8181036040830152611de08184611ae8565b9050949350505050565b60006020820190508181036000830152611e048184611b61565b905092915050565b60006020820190508181036000830152611e2581611b9a565b9050919050565b60006020820190508181036000830152611e4581611bbd565b9050919050565b60006020820190508181036000830152611e6581611be0565b9050919050565b60006020820190508181036000830152611e8581611c03565b9050919050565b60006020820190508181036000830152611ea581611c26565b9050919050565b60006020820190508181036000830152611ec581611c49565b9050919050565b60006020820190508181036000830152611ee581611c6c565b9050919050565b60006020820190508181036000830152611f0581611c8f565b9050919050565b60006020820190508181036000830152611f2581611cb2565b9050919050565b60006020820190508181036000830152611f4581611cd5565b9050919050565b60006020820190508181036000830152611f6581611cf8565b9050919050565b60006020820190508181036000830152611f8581611d1b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061204c826120e6565b9150612057836120e6565b92508282101561206a576120696121cb565b5b828203905092915050565b6000612080826120c6565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60008190506120c1826125c8565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b6000612113826120b3565b9050919050565b60005b8381101561213857808201518184015260208101905061211d565b83811115612147576000848401525b50505050565b6000612158826120e6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561218b5761218a6121cb565b5b600182019050919050565b60006121a1826120f0565b91506bffffffffffffffffffffffff8214156121c0576121bf6121cb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374600082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106125d9576125d86121fa565b5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/DiamondCutFacet.json b/deployments/fuseSparknet/DiamondCutFacet.json new file mode 100644 index 00000000..0e7164af --- /dev/null +++ b/deployments/fuseSparknet/DiamondCutFacet.json @@ -0,0 +1,134 @@ +{ + "address": "0xf859F683a47b3D0E2A964eFDdf7392972700a101", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "indexed": false, + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" + }, + { + "indexed": false, + "internalType": "address", + "name": "_init", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "DiamondCut", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "_init", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "diamondCut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x5e65bab5b380676f95b76498d68642e6e86894c08089c072b952f6aa1bf8451b", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "2337199", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x22ab5ff7e01cf19547fb2c17274d6e42cf35ae05fa2df7e2fa2c02b67daf0122", + "transactionHash": "0x5e65bab5b380676f95b76498d68642e6e86894c08089c072b952f6aa1bf8451b", + "logs": [], + "blockNumber": 5497589, + "cumulativeGasUsed": "2337199", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "7a183f869f73d4ccd46c6d23b208518b", + "metadata": "{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"facetAddress\",\"type\":\"address\"},{\"internalType\":\"enum IDiamondCut.FacetCutAction\",\"name\":\"action\",\"type\":\"uint8\"},{\"internalType\":\"bytes4[]\",\"name\":\"functionSelectors\",\"type\":\"bytes4[]\"}],\"indexed\":false,\"internalType\":\"struct IDiamondCut.FacetCut[]\",\"name\":\"_diamondCut\",\"type\":\"tuple[]\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_init\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"_calldata\",\"type\":\"bytes\"}],\"name\":\"DiamondCut\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"facetAddress\",\"type\":\"address\"},{\"internalType\":\"enum IDiamondCut.FacetCutAction\",\"name\":\"action\",\"type\":\"uint8\"},{\"internalType\":\"bytes4[]\",\"name\":\"functionSelectors\",\"type\":\"bytes4[]\"}],\"internalType\":\"struct IDiamondCut.FacetCut[]\",\"name\":\"_diamondCut\",\"type\":\"tuple[]\"},{\"internalType\":\"address\",\"name\":\"_init\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_calldata\",\"type\":\"bytes\"}],\"name\":\"diamondCut\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"diamondCut((address,uint8,bytes4[])[],address,bytes)\":{\"params\":{\"_calldata\":\"A function call, including function selector and arguments _calldata is executed with delegatecall on _init\",\"_diamondCut\":\"Contains the facet addresses and function selectors\",\"_init\":\"The address of the contract or facet to execute _calldata\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"diamondCut((address,uint8,bytes4[])[],address,bytes)\":{\"notice\":\"Add/replace/remove any number of functions and optionally execute a function with delegatecall\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/bridges/facets/DiamondCutFacet.sol\":\"DiamondCutFacet\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/bridges/facets/DiamondCutFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { IDiamondCut } from \\\"../interfaces/IDiamondCut.sol\\\";\\nimport { LibDiamond } from \\\"../libs/LibDiamond.sol\\\";\\n\\ncontract DiamondCutFacet is IDiamondCut {\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(\\n FacetCut[] calldata _diamondCut,\\n address _init,\\n bytes calldata _calldata\\n ) external override {\\n LibDiamond.enforceIsContractOwner();\\n LibDiamond.diamondCut(_diamondCut, _init, _calldata);\\n }\\n}\\n\",\"keccak256\":\"0x0387472f18c1949e2a6c12fccb216a6e17a28abbedf81c1d5c7a565c2c618c36\",\"license\":\"MIT\"},\"src/bridges/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(\\n FacetCut[] calldata _diamondCut,\\n address _init,\\n bytes calldata _calldata\\n ) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0x608723d9599dc5de624ca7af0751f834bdff25c5b02bc9e817b6f490d3324069\",\"license\":\"MIT\"},\"src/bridges/libs/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { IDiamondCut } from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 internal constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(\\n IDiamondCut.FacetCut[] memory _diamondCut,\\n address _init,\\n bytes memory _calldata\\n ) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(\\n DiamondStorage storage ds,\\n address _facetAddress,\\n bytes4 _selector\\n ) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x7a82c7c0bd4b049b5471c09127fad37873be021813abbe7ec07edb5a908c35e5\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5061298d806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80631f931c1c14610030575b600080fd5b61004a60048036038101906100459190611b35565b61004c565b005b6100546100b6565b6100af8585906100649190612387565b8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610151565b5050505050565b6100be610571565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461014f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101469061204e565b60405180910390fd5b565b60005b8351811015610526576000848281518110610198577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156101e0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610219577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156102b6576102b185838151811061025b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106102a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161059e565b610512565b600160028111156102f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610329577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103c6576103c185838151811061036b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106103b0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161083d565b610511565b6002808111156103ff577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610438577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104d5576104d085838151811061047a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106104bf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610ae7565b610510565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610507906120ae565b60405180910390fd5b5b5b50808061051e90612412565b915050610154565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161055a93929190611fa7565b60405180910390a161056c8282610c98565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116105e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d99061206e565b60405180910390fd5b60006105ec610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561065e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610655906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156106cc576106cb8285610eab565b5b60005b8351811015610836576000848281518110610713577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610807576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107fe9061212e565b60405180910390fd5b6108138583868a610f86565b838061081e9061245b565b9450505050808061082e90612412565b9150506106cf565b5050505050565b6000815111610881576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108789061206e565b60405180910390fd5b600061088b610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f4906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff16141561096b5761096a8285610eab565b5b60005b8351811015610ae05760008482815181106109b2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9d9061214e565b60405180910390fd5b610ab1858284611133565b610abd8583868a610f86565b8380610ac89061245b565b94505050508080610ad890612412565b91505061096e565b5050505050565b6000815111610b2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b229061206e565b60405180910390fd5b6000610b35610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610ba6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9d9061216e565b60405180910390fd5b60005b8251811015610c92576000838281518110610bed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610c7d848284611133565b50508080610c8a90612412565b915050610ba9565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d16576000815114610d11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d089061200e565b60405180910390fd5b610ea7565b6000815111610d5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d51906120ee565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610db057610daf826040518060600160405280602881526020016129356028913961187c565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610dd89190611f90565b600060405180830381855af49150503d8060008114610e13576040519150601f19603f3d011682016040523d82523d6000602084013e610e18565b606091505b509150915081610ea457600081511115610e6957806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e609190611fec565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9b9061202e565b60405180910390fd5b50505b5050565b610ecd8160405180606001604052806024815260200161295d6024913961187c565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119a9061208e565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611212576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112099061210e565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506112e991906122c0565b90508082146114c95760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018281548110611370577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611412577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611543577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156118755760006001866002018054905061162e91906122c0565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146117bb5760008760020183815481106116be577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611728577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806117f5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906118c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bf9190611fec565b60405180910390fd5b50505050565b60006118e16118dc846121b3565b61218e565b9050808382526020820190508285602086028201111561190057600080fd5b60005b8581101561193057816119168882611a49565b845260208401935060208301925050600181019050611903565b5050509392505050565b600061194d611948846121df565b61218e565b9050808382526020820190508285602086028201111561196c57600080fd5b60005b858110156119b657813567ffffffffffffffff81111561198e57600080fd5b80860161199b8982611abd565b8552602085019450602084019350505060018101905061196f565b5050509392505050565b6000813590506119cf816128f6565b92915050565b600082601f8301126119e657600080fd5b81356119f68482602086016118ce565b91505092915050565b60008083601f840112611a1157600080fd5b8235905067ffffffffffffffff811115611a2a57600080fd5b602083019150836020820283011115611a4257600080fd5b9250929050565b600081359050611a588161290d565b92915050565b60008083601f840112611a7057600080fd5b8235905067ffffffffffffffff811115611a8957600080fd5b602083019150836001820283011115611aa157600080fd5b9250929050565b600081359050611ab781612924565b92915050565b600060608284031215611acf57600080fd5b611ad9606061218e565b90506000611ae9848285016119c0565b6000830152506020611afd84828501611aa8565b602083015250604082013567ffffffffffffffff811115611b1d57600080fd5b611b29848285016119d5565b60408301525092915050565b600080600080600060608688031215611b4d57600080fd5b600086013567ffffffffffffffff811115611b6757600080fd5b611b73888289016119ff565b95509550506020611b86888289016119c0565b935050604086013567ffffffffffffffff811115611ba357600080fd5b611baf88828901611a5e565b92509250509295509295909350565b6000611bca8383611cdb565b60208301905092915050565b6000611be28383611f40565b905092915050565b611bf3816122f4565b82525050565b611c02816122f4565b82525050565b6000611c138261222b565b611c1d8185612271565b9350611c288361220b565b8060005b83811015611c59578151611c408882611bbe565b9750611c4b83612257565b925050600181019050611c2c565b5085935050505092915050565b6000611c7182612236565b611c7b8185612282565b935083602082028501611c8d8561221b565b8060005b85811015611cc95784840389528151611caa8582611bd6565b9450611cb583612264565b925060208a01995050600181019050611c91565b50829750879550505050505092915050565b611ce481612306565b82525050565b6000611cf582612241565b611cff8185612293565b9350611d0f8185602086016123ae565b611d188161251d565b840191505092915050565b6000611d2e82612241565b611d3881856122a4565b9350611d488185602086016123ae565b80840191505092915050565b611d5d8161239c565b82525050565b6000611d6e8261224c565b611d7881856122af565b9350611d888185602086016123ae565b611d918161251d565b840191505092915050565b6000611da9603c836122af565b9150611db48261252e565b604082019050919050565b6000611dcc6026836122af565b9150611dd78261257d565b604082019050919050565b6000611def6022836122af565b9150611dfa826125cc565b604082019050919050565b6000611e12602b836122af565b9150611e1d8261261b565b604082019050919050565b6000611e356037836122af565b9150611e408261266a565b604082019050919050565b6000611e586027836122af565b9150611e63826126b9565b604082019050919050565b6000611e7b602c836122af565b9150611e8682612708565b604082019050919050565b6000611e9e603d836122af565b9150611ea982612757565b604082019050919050565b6000611ec1602e836122af565b9150611ecc826127a6565b604082019050919050565b6000611ee46035836122af565b9150611eef826127f5565b604082019050919050565b6000611f076038836122af565b9150611f1282612844565b604082019050919050565b6000611f2a6036836122af565b9150611f3582612893565b604082019050919050565b6000606083016000830151611f586000860182611bea565b506020830151611f6b6020860182611d54565b5060408301518482036040860152611f838282611c08565b9150508091505092915050565b6000611f9c8284611d23565b915081905092915050565b60006060820190508181036000830152611fc18186611c66565b9050611fd06020830185611bf9565b8181036040830152611fe28184611cea565b9050949350505050565b600060208201905081810360008301526120068184611d63565b905092915050565b6000602082019050818103600083015261202781611d9c565b9050919050565b6000602082019050818103600083015261204781611dbf565b9050919050565b6000602082019050818103600083015261206781611de2565b9050919050565b6000602082019050818103600083015261208781611e05565b9050919050565b600060208201905081810360008301526120a781611e28565b9050919050565b600060208201905081810360008301526120c781611e4b565b9050919050565b600060208201905081810360008301526120e781611e6e565b9050919050565b6000602082019050818103600083015261210781611e91565b9050919050565b6000602082019050818103600083015261212781611eb4565b9050919050565b6000602082019050818103600083015261214781611ed7565b9050919050565b6000602082019050818103600083015261216781611efa565b9050919050565b6000602082019050818103600083015261218781611f1d565b9050919050565b60006121986121a9565b90506121a482826123e1565b919050565b6000604051905090565b600067ffffffffffffffff8211156121ce576121cd6124ee565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156121fa576121f96124ee565b5b602082029050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006122cb82612365565b91506122d683612365565b9250828210156122e9576122e8612490565b5b828203905092915050565b60006122ff82612345565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050612340826128e2565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b600061239436848461193a565b905092915050565b60006123a782612332565b9050919050565b60005b838110156123cc5780820151818401526020810190506123b1565b838111156123db576000848401525b50505050565b6123ea8261251d565b810181811067ffffffffffffffff82111715612409576124086124ee565b5b80604052505050565b600061241d82612365565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156124505761244f612490565b5b600182019050919050565b60006124668261236f565b91506bffffffffffffffffffffffff82141561248557612484612490565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106128f3576128f26124bf565b5b50565b6128ff816122f4565b811461290a57600080fd5b50565b61291681612306565b811461292157600080fd5b50565b6003811061293157600080fd5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80631f931c1c14610030575b600080fd5b61004a60048036038101906100459190611b35565b61004c565b005b6100546100b6565b6100af8585906100649190612387565b8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610151565b5050505050565b6100be610571565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461014f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101469061204e565b60405180910390fd5b565b60005b8351811015610526576000848281518110610198577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156101e0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610219577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156102b6576102b185838151811061025b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106102a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161059e565b610512565b600160028111156102f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610329577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103c6576103c185838151811061036b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106103b0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161083d565b610511565b6002808111156103ff577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610438577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104d5576104d085838151811061047a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106104bf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610ae7565b610510565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610507906120ae565b60405180910390fd5b5b5b50808061051e90612412565b915050610154565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161055a93929190611fa7565b60405180910390a161056c8282610c98565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116105e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d99061206e565b60405180910390fd5b60006105ec610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561065e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610655906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156106cc576106cb8285610eab565b5b60005b8351811015610836576000848281518110610713577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610807576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107fe9061212e565b60405180910390fd5b6108138583868a610f86565b838061081e9061245b565b9450505050808061082e90612412565b9150506106cf565b5050505050565b6000815111610881576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108789061206e565b60405180910390fd5b600061088b610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f4906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff16141561096b5761096a8285610eab565b5b60005b8351811015610ae05760008482815181106109b2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9d9061214e565b60405180910390fd5b610ab1858284611133565b610abd8583868a610f86565b8380610ac89061245b565b94505050508080610ad890612412565b91505061096e565b5050505050565b6000815111610b2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b229061206e565b60405180910390fd5b6000610b35610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610ba6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9d9061216e565b60405180910390fd5b60005b8251811015610c92576000838281518110610bed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610c7d848284611133565b50508080610c8a90612412565b915050610ba9565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d16576000815114610d11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d089061200e565b60405180910390fd5b610ea7565b6000815111610d5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d51906120ee565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610db057610daf826040518060600160405280602881526020016129356028913961187c565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610dd89190611f90565b600060405180830381855af49150503d8060008114610e13576040519150601f19603f3d011682016040523d82523d6000602084013e610e18565b606091505b509150915081610ea457600081511115610e6957806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e609190611fec565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9b9061202e565b60405180910390fd5b50505b5050565b610ecd8160405180606001604052806024815260200161295d6024913961187c565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119a9061208e565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611212576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112099061210e565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506112e991906122c0565b90508082146114c95760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018281548110611370577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611412577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611543577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156118755760006001866002018054905061162e91906122c0565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146117bb5760008760020183815481106116be577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611728577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806117f5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906118c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bf9190611fec565b60405180910390fd5b50505050565b60006118e16118dc846121b3565b61218e565b9050808382526020820190508285602086028201111561190057600080fd5b60005b8581101561193057816119168882611a49565b845260208401935060208301925050600181019050611903565b5050509392505050565b600061194d611948846121df565b61218e565b9050808382526020820190508285602086028201111561196c57600080fd5b60005b858110156119b657813567ffffffffffffffff81111561198e57600080fd5b80860161199b8982611abd565b8552602085019450602084019350505060018101905061196f565b5050509392505050565b6000813590506119cf816128f6565b92915050565b600082601f8301126119e657600080fd5b81356119f68482602086016118ce565b91505092915050565b60008083601f840112611a1157600080fd5b8235905067ffffffffffffffff811115611a2a57600080fd5b602083019150836020820283011115611a4257600080fd5b9250929050565b600081359050611a588161290d565b92915050565b60008083601f840112611a7057600080fd5b8235905067ffffffffffffffff811115611a8957600080fd5b602083019150836001820283011115611aa157600080fd5b9250929050565b600081359050611ab781612924565b92915050565b600060608284031215611acf57600080fd5b611ad9606061218e565b90506000611ae9848285016119c0565b6000830152506020611afd84828501611aa8565b602083015250604082013567ffffffffffffffff811115611b1d57600080fd5b611b29848285016119d5565b60408301525092915050565b600080600080600060608688031215611b4d57600080fd5b600086013567ffffffffffffffff811115611b6757600080fd5b611b73888289016119ff565b95509550506020611b86888289016119c0565b935050604086013567ffffffffffffffff811115611ba357600080fd5b611baf88828901611a5e565b92509250509295509295909350565b6000611bca8383611cdb565b60208301905092915050565b6000611be28383611f40565b905092915050565b611bf3816122f4565b82525050565b611c02816122f4565b82525050565b6000611c138261222b565b611c1d8185612271565b9350611c288361220b565b8060005b83811015611c59578151611c408882611bbe565b9750611c4b83612257565b925050600181019050611c2c565b5085935050505092915050565b6000611c7182612236565b611c7b8185612282565b935083602082028501611c8d8561221b565b8060005b85811015611cc95784840389528151611caa8582611bd6565b9450611cb583612264565b925060208a01995050600181019050611c91565b50829750879550505050505092915050565b611ce481612306565b82525050565b6000611cf582612241565b611cff8185612293565b9350611d0f8185602086016123ae565b611d188161251d565b840191505092915050565b6000611d2e82612241565b611d3881856122a4565b9350611d488185602086016123ae565b80840191505092915050565b611d5d8161239c565b82525050565b6000611d6e8261224c565b611d7881856122af565b9350611d888185602086016123ae565b611d918161251d565b840191505092915050565b6000611da9603c836122af565b9150611db48261252e565b604082019050919050565b6000611dcc6026836122af565b9150611dd78261257d565b604082019050919050565b6000611def6022836122af565b9150611dfa826125cc565b604082019050919050565b6000611e12602b836122af565b9150611e1d8261261b565b604082019050919050565b6000611e356037836122af565b9150611e408261266a565b604082019050919050565b6000611e586027836122af565b9150611e63826126b9565b604082019050919050565b6000611e7b602c836122af565b9150611e8682612708565b604082019050919050565b6000611e9e603d836122af565b9150611ea982612757565b604082019050919050565b6000611ec1602e836122af565b9150611ecc826127a6565b604082019050919050565b6000611ee46035836122af565b9150611eef826127f5565b604082019050919050565b6000611f076038836122af565b9150611f1282612844565b604082019050919050565b6000611f2a6036836122af565b9150611f3582612893565b604082019050919050565b6000606083016000830151611f586000860182611bea565b506020830151611f6b6020860182611d54565b5060408301518482036040860152611f838282611c08565b9150508091505092915050565b6000611f9c8284611d23565b915081905092915050565b60006060820190508181036000830152611fc18186611c66565b9050611fd06020830185611bf9565b8181036040830152611fe28184611cea565b9050949350505050565b600060208201905081810360008301526120068184611d63565b905092915050565b6000602082019050818103600083015261202781611d9c565b9050919050565b6000602082019050818103600083015261204781611dbf565b9050919050565b6000602082019050818103600083015261206781611de2565b9050919050565b6000602082019050818103600083015261208781611e05565b9050919050565b600060208201905081810360008301526120a781611e28565b9050919050565b600060208201905081810360008301526120c781611e4b565b9050919050565b600060208201905081810360008301526120e781611e6e565b9050919050565b6000602082019050818103600083015261210781611e91565b9050919050565b6000602082019050818103600083015261212781611eb4565b9050919050565b6000602082019050818103600083015261214781611ed7565b9050919050565b6000602082019050818103600083015261216781611efa565b9050919050565b6000602082019050818103600083015261218781611f1d565b9050919050565b60006121986121a9565b90506121a482826123e1565b919050565b6000604051905090565b600067ffffffffffffffff8211156121ce576121cd6124ee565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156121fa576121f96124ee565b5b602082029050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006122cb82612365565b91506122d683612365565b9250828210156122e9576122e8612490565b5b828203905092915050565b60006122ff82612345565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050612340826128e2565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b600061239436848461193a565b905092915050565b60006123a782612332565b9050919050565b60005b838110156123cc5780820151818401526020810190506123b1565b838111156123db576000848401525b50505050565b6123ea8261251d565b810181811067ffffffffffffffff82111715612409576124086124ee565b5b80604052505050565b600061241d82612365565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156124505761244f612490565b5b600182019050919050565b60006124668261236f565b91506bffffffffffffffffffffffff82141561248557612484612490565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106128f3576128f26124bf565b5b50565b6128ff816122f4565b811461290a57600080fd5b50565b61291681612306565b811461292157600080fd5b50565b6003811061293157600080fd5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a", + "devdoc": { + "kind": "dev", + "methods": { + "diamondCut((address,uint8,bytes4[])[],address,bytes)": { + "params": { + "_calldata": "A function call, including function selector and arguments _calldata is executed with delegatecall on _init", + "_diamondCut": "Contains the facet addresses and function selectors", + "_init": "The address of the contract or facet to execute _calldata" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "diamondCut((address,uint8,bytes4[])[],address,bytes)": { + "notice": "Add/replace/remove any number of functions and optionally execute a function with delegatecall" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/DiamondLoupeFacet.json b/deployments/fuseSparknet/DiamondLoupeFacet.json new file mode 100644 index 00000000..69c8807e --- /dev/null +++ b/deployments/fuseSparknet/DiamondLoupeFacet.json @@ -0,0 +1,176 @@ +{ + "address": "0x8BFbB21683e21DC4B11af352117d6D4F2bc62f8e", + "abi": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "_functionSelector", + "type": "bytes4" + } + ], + "name": "facetAddress", + "outputs": [ + { + "internalType": "address", + "name": "facetAddress_", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "facetAddresses", + "outputs": [ + { + "internalType": "address[]", + "name": "facetAddresses_", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_facet", + "type": "address" + } + ], + "name": "facetFunctionSelectors", + "outputs": [ + { + "internalType": "bytes4[]", + "name": "facetFunctionSelectors_", + "type": "bytes4[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "facets", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IDiamondLoupe.Facet[]", + "name": "facets_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "_interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xc4224d5b19ec685dcb17b0ab862ec9968dc1ab25dd63b6145b1a01b3ac3a1e70", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "719562", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xa22d214e243a3755086018905ff6c958bff170824d551cf82fb1ced8cda70903", + "transactionHash": "0xc4224d5b19ec685dcb17b0ab862ec9968dc1ab25dd63b6145b1a01b3ac3a1e70", + "logs": [], + "blockNumber": 5497593, + "cumulativeGasUsed": "719562", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "7a183f869f73d4ccd46c6d23b208518b", + "metadata": "{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"_functionSelector\",\"type\":\"bytes4\"}],\"name\":\"facetAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"facetAddress_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"facetAddresses\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"facetAddresses_\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_facet\",\"type\":\"address\"}],\"name\":\"facetFunctionSelectors\",\"outputs\":[{\"internalType\":\"bytes4[]\",\"name\":\"facetFunctionSelectors_\",\"type\":\"bytes4[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"facets\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"facetAddress\",\"type\":\"address\"},{\"internalType\":\"bytes4[]\",\"name\":\"functionSelectors\",\"type\":\"bytes4[]\"}],\"internalType\":\"struct IDiamondLoupe.Facet[]\",\"name\":\"facets_\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"_interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"facetAddress(bytes4)\":{\"details\":\"If facet is not found return address(0).\",\"params\":{\"_functionSelector\":\"The function selector.\"},\"returns\":{\"facetAddress_\":\"The facet address.\"}},\"facetAddresses()\":{\"returns\":{\"facetAddresses_\":\"facetAddresses_\"}},\"facetFunctionSelectors(address)\":{\"params\":{\"_facet\":\"The facet address.\"},\"returns\":{\"facetFunctionSelectors_\":\"facetFunctionSelectors_\"}},\"facets()\":{\"returns\":{\"facets_\":\"Facet\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"facetAddress(bytes4)\":{\"notice\":\"Gets the facet that supports the given selector.\"},\"facetAddresses()\":{\"notice\":\"Get all the facet addresses used by a diamond.\"},\"facetFunctionSelectors(address)\":{\"notice\":\"Gets all the function selectors provided by a facet.\"},\"facets()\":{\"notice\":\"Gets all facets and their selectors.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/bridges/facets/DiamondLoupeFacet.sol\":\"DiamondLoupeFacet\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/bridges/facets/DiamondLoupeFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { LibDiamond } from \\\"../libs/LibDiamond.sol\\\";\\nimport { IDiamondLoupe } from \\\"../interfaces/IDiamondLoupe.sol\\\";\\nimport { IERC165 } from \\\"../interfaces/IERC165.sol\\\";\\n\\ncontract DiamondLoupeFacet is IDiamondLoupe, IERC165 {\\n // Diamond Loupe Functions\\n ////////////////////////////////////////////////////////////////////\\n /// These functions are expected to be called frequently by tools.\\n //\\n // struct Facet {\\n // address facetAddress;\\n // bytes4[] functionSelectors;\\n // }\\n\\n /// @notice Gets all facets and their selectors.\\n /// @return facets_ Facet\\n function facets() external view override returns (Facet[] memory facets_) {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n uint256 numFacets = ds.facetAddresses.length;\\n facets_ = new Facet[](numFacets);\\n for (uint256 i = 0; i < numFacets; i++) {\\n address facetAddress_ = ds.facetAddresses[i];\\n facets_[i].facetAddress = facetAddress_;\\n facets_[i].functionSelectors = ds.facetFunctionSelectors[facetAddress_].functionSelectors;\\n }\\n }\\n\\n /// @notice Gets all the function selectors provided by a facet.\\n /// @param _facet The facet address.\\n /// @return facetFunctionSelectors_\\n function facetFunctionSelectors(address _facet)\\n external\\n view\\n override\\n returns (bytes4[] memory facetFunctionSelectors_)\\n {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n facetFunctionSelectors_ = ds.facetFunctionSelectors[_facet].functionSelectors;\\n }\\n\\n /// @notice Get all the facet addresses used by a diamond.\\n /// @return facetAddresses_\\n function facetAddresses() external view override returns (address[] memory facetAddresses_) {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n facetAddresses_ = ds.facetAddresses;\\n }\\n\\n /// @notice Gets the facet that supports the given selector.\\n /// @dev If facet is not found return address(0).\\n /// @param _functionSelector The function selector.\\n /// @return facetAddress_ The facet address.\\n function facetAddress(bytes4 _functionSelector) external view override returns (address facetAddress_) {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n facetAddress_ = ds.selectorToFacetAndPosition[_functionSelector].facetAddress;\\n }\\n\\n // This implements ERC-165.\\n function supportsInterface(bytes4 _interfaceId) external view override returns (bool) {\\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\\n return ds.supportedInterfaces[_interfaceId];\\n }\\n}\\n\",\"keccak256\":\"0xf544f602fa01f82f15ff8f2257255c6ff82dcef3c2d57b4e3b6598a8cf61dc1a\",\"license\":\"MIT\"},\"src/bridges/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(\\n FacetCut[] calldata _diamondCut,\\n address _init,\\n bytes calldata _calldata\\n ) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0x608723d9599dc5de624ca7af0751f834bdff25c5b02bc9e817b6f490d3324069\",\"license\":\"MIT\"},\"src/bridges/interfaces/IDiamondLoupe.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\n// A loupe is a small magnifying glass used to look at diamonds.\\n// These functions look at diamonds\\ninterface IDiamondLoupe {\\n /// These functions are expected to be called frequently\\n /// by tools.\\n\\n struct Facet {\\n address facetAddress;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Gets all facet addresses and their four byte function selectors.\\n /// @return facets_ Facet\\n function facets() external view returns (Facet[] memory facets_);\\n\\n /// @notice Gets all the function selectors supported by a specific facet.\\n /// @param _facet The facet address.\\n /// @return facetFunctionSelectors_\\n function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);\\n\\n /// @notice Get all the facet addresses used by a diamond.\\n /// @return facetAddresses_\\n function facetAddresses() external view returns (address[] memory facetAddresses_);\\n\\n /// @notice Gets the facet that supports the given selector.\\n /// @dev If facet is not found return address(0).\\n /// @param _functionSelector The function selector.\\n /// @return facetAddress_ The facet address.\\n function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);\\n}\\n\",\"keccak256\":\"0xc710a1bd0523868e5f6972f3f3cc1cf37a5020ef13d3805e76b13fe952a9614a\",\"license\":\"MIT\"},\"src/bridges/interfaces/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\ninterface IERC165 {\\n /// @notice Query if a contract implements an interface\\n /// @param interfaceId The interface identifier, as specified in ERC-165\\n /// @dev Interface identification is specified in ERC-165. This function\\n /// uses less than 30,000 gas.\\n /// @return `true` if the contract implements `interfaceID` and\\n /// `interfaceID` is not 0xffffffff, `false` otherwise\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\",\"keccak256\":\"0x1734ad5b8c2f4c805ed7e20d62627db8747ff8b9929007f982e76f798cf67e50\",\"license\":\"MIT\"},\"src/bridges/libs/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { IDiamondCut } from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 internal constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(\\n IDiamondCut.FacetCut[] memory _diamondCut,\\n address _init,\\n bytes memory _calldata\\n ) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(\\n DiamondStorage storage ds,\\n address _facetAddress,\\n bytes4 _selector\\n ) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x7a82c7c0bd4b049b5471c09127fad37873be021813abbe7ec07edb5a908c35e5\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610c11806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c57806352ef6b2c1461008c5780637a0ed627146100aa578063adfca15e146100c8578063cdffacc6146100f8575b600080fd5b6100766004803603810190610071919061071d565b610128565b6040516100839190610a13565b60405180910390f35b61009461019e565b6040516100a191906109ad565b60405180910390f35b6100b261023b565b6040516100bf91906109f1565b60405180910390f35b6100e260048036038101906100dd91906106f4565b6104f6565b6040516100ef91906109cf565b60405180910390f35b610112600480360381019061010d919061071d565b6105e1565b60405161011f9190610992565b60405180910390f35b60008061013361066d565b9050806003016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff16915050919050565b606060006101aa61066d565b90508060020180548060200260200160405190810160405280929190818152602001828054801561023057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116101e6575b505050505091505090565b6060600061024761066d565b90506000816002018054905090508067ffffffffffffffff811115610295577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102ce57816020015b6102bb61069a565b8152602001906001900390816102b35790505b50925060005b818110156104f057600083600201828154811061031a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080858381518110610381577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561048f57602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001906004019060208260030104928301926001038202915080841161043c5790505b50505050508583815181106104cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001819052505080806104e890610b5e565b9150506102d4565b50505090565b6060600061050261066d565b90508060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806020026020016040519081016040528092919081815260200182805480156105d457602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600401906020826003010492830192600103820291508084116105815790505b5050505050915050919050565b6000806105ec61066d565b9050806000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b6000813590506106d981610bd6565b92915050565b6000813590506106ee81610bed565b92915050565b60006020828403121561070657600080fd5b6000610714848285016106ca565b91505092915050565b60006020828403121561072f57600080fd5b600061073d848285016106df565b91505092915050565b6000610752838361078a565b60208301905092915050565b600061076a8383610946565b60208301905092915050565b60006107828383610955565b905092915050565b61079381610aea565b82525050565b6107a281610aea565b82525050565b60006107b382610a5e565b6107bd8185610aa6565b93506107c883610a2e565b8060005b838110156107f95781516107e08882610746565b97506107eb83610a7f565b9250506001810190506107cc565b5085935050505092915050565b600061081182610a69565b61081b8185610ab7565b935061082683610a3e565b8060005b8381101561085757815161083e888261075e565b975061084983610a8c565b92505060018101905061082a565b5085935050505092915050565b600061086f82610a69565b6108798185610ac8565b935061088483610a3e565b8060005b838110156108b557815161089c888261075e565b97506108a783610a8c565b925050600181019050610888565b5085935050505092915050565b60006108cd82610a74565b6108d78185610ad9565b9350836020820285016108e985610a4e565b8060005b8581101561092557848403895281516109068582610776565b945061091183610a99565b925060208a019950506001810190506108ed565b50829750879550505050505092915050565b61094081610afc565b82525050565b61094f81610b08565b82525050565b600060408301600083015161096d600086018261078a565b50602083015184820360208601526109858282610806565b9150508091505092915050565b60006020820190506109a76000830184610799565b92915050565b600060208201905081810360008301526109c781846107a8565b905092915050565b600060208201905081810360008301526109e98184610864565b905092915050565b60006020820190508181036000830152610a0b81846108c2565b905092915050565b6000602082019050610a286000830184610937565b92915050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610af582610b34565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610b6982610b54565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610b9c57610b9b610ba7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610bdf81610aea565b8114610bea57600080fd5b50565b610bf681610b08565b8114610c0157600080fd5b5056fea164736f6c6343000804000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c57806352ef6b2c1461008c5780637a0ed627146100aa578063adfca15e146100c8578063cdffacc6146100f8575b600080fd5b6100766004803603810190610071919061071d565b610128565b6040516100839190610a13565b60405180910390f35b61009461019e565b6040516100a191906109ad565b60405180910390f35b6100b261023b565b6040516100bf91906109f1565b60405180910390f35b6100e260048036038101906100dd91906106f4565b6104f6565b6040516100ef91906109cf565b60405180910390f35b610112600480360381019061010d919061071d565b6105e1565b60405161011f9190610992565b60405180910390f35b60008061013361066d565b9050806003016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff16915050919050565b606060006101aa61066d565b90508060020180548060200260200160405190810160405280929190818152602001828054801561023057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116101e6575b505050505091505090565b6060600061024761066d565b90506000816002018054905090508067ffffffffffffffff811115610295577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102ce57816020015b6102bb61069a565b8152602001906001900390816102b35790505b50925060005b818110156104f057600083600201828154811061031a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080858381518110610381577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561048f57602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001906004019060208260030104928301926001038202915080841161043c5790505b50505050508583815181106104cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001819052505080806104e890610b5e565b9150506102d4565b50505090565b6060600061050261066d565b90508060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806020026020016040519081016040528092919081815260200182805480156105d457602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600401906020826003010492830192600103820291508084116105815790505b5050505050915050919050565b6000806105ec61066d565b9050806000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b6000813590506106d981610bd6565b92915050565b6000813590506106ee81610bed565b92915050565b60006020828403121561070657600080fd5b6000610714848285016106ca565b91505092915050565b60006020828403121561072f57600080fd5b600061073d848285016106df565b91505092915050565b6000610752838361078a565b60208301905092915050565b600061076a8383610946565b60208301905092915050565b60006107828383610955565b905092915050565b61079381610aea565b82525050565b6107a281610aea565b82525050565b60006107b382610a5e565b6107bd8185610aa6565b93506107c883610a2e565b8060005b838110156107f95781516107e08882610746565b97506107eb83610a7f565b9250506001810190506107cc565b5085935050505092915050565b600061081182610a69565b61081b8185610ab7565b935061082683610a3e565b8060005b8381101561085757815161083e888261075e565b975061084983610a8c565b92505060018101905061082a565b5085935050505092915050565b600061086f82610a69565b6108798185610ac8565b935061088483610a3e565b8060005b838110156108b557815161089c888261075e565b97506108a783610a8c565b925050600181019050610888565b5085935050505092915050565b60006108cd82610a74565b6108d78185610ad9565b9350836020820285016108e985610a4e565b8060005b8581101561092557848403895281516109068582610776565b945061091183610a99565b925060208a019950506001810190506108ed565b50829750879550505050505092915050565b61094081610afc565b82525050565b61094f81610b08565b82525050565b600060408301600083015161096d600086018261078a565b50602083015184820360208601526109858282610806565b9150508091505092915050565b60006020820190506109a76000830184610799565b92915050565b600060208201905081810360008301526109c781846107a8565b905092915050565b600060208201905081810360008301526109e98184610864565b905092915050565b60006020820190508181036000830152610a0b81846108c2565b905092915050565b6000602082019050610a286000830184610937565b92915050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610af582610b34565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610b6982610b54565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610b9c57610b9b610ba7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610bdf81610aea565b8114610bea57600080fd5b50565b610bf681610b08565b8114610c0157600080fd5b5056fea164736f6c6343000804000a", + "devdoc": { + "kind": "dev", + "methods": { + "facetAddress(bytes4)": { + "details": "If facet is not found return address(0).", + "params": { + "_functionSelector": "The function selector." + }, + "returns": { + "facetAddress_": "The facet address." + } + }, + "facetAddresses()": { + "returns": { + "facetAddresses_": "facetAddresses_" + } + }, + "facetFunctionSelectors(address)": { + "params": { + "_facet": "The facet address." + }, + "returns": { + "facetFunctionSelectors_": "facetFunctionSelectors_" + } + }, + "facets()": { + "returns": { + "facets_": "Facet" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "facetAddress(bytes4)": { + "notice": "Gets the facet that supports the given selector." + }, + "facetAddresses()": { + "notice": "Get all the facet addresses used by a diamond." + }, + "facetFunctionSelectors(address)": { + "notice": "Gets all the function selectors provided by a facet." + }, + "facets()": { + "notice": "Gets all facets and their selectors." + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/ENSController.json b/deployments/fuseSparknet/ENSController.json new file mode 100644 index 00000000..acb66448 --- /dev/null +++ b/deployments/fuseSparknet/ENSController.json @@ -0,0 +1,1152 @@ +{ + "address": "0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "AddrChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "coinType", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "newAddress", + "type": "bytes" + } + ], + "name": "AddressChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "NameChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "NodeReleased", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "NodeSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "NodeVerified", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "x", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "y", + "type": "bytes32" + } + ], + "name": "PubkeyChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "registry", + "type": "address" + } + ], + "name": "RegistryChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "string", + "name": "indexedKey", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + } + ], + "name": "TextChanged", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "addGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "addr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "coinType", + "type": "uint256" + } + ], + "name": "addr", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "chainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gateway", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + } + ], + "internalType": "struct ENSController.SubNodeRegistration", + "name": "subNodeRegistration", + "type": "tuple" + } + ], + "name": "hashSubNodeRegistration", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ENSRegistry", + "name": "registry_", + "type": "address" + }, + { + "internalType": "address[]", + "name": "guardians_", + "type": "address[]" + }, + { + "internalType": "address", + "name": "gateway_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "isGuardian", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "nodeOwners", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "pubkey", + "outputs": [ + { + "internalType": "bytes32", + "name": "x", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "y", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "guardianSignature", + "type": "bytes" + } + ], + "name": "registerSubNode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract ENSRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "releaseNode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "removeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "coinType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "addr_", + "type": "bytes" + } + ], + "name": "setAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "addr_", + "type": "address" + } + ], + "name": "setAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "setName", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "x", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "y", + "type": "bytes32" + } + ], + "name": "setPubkey", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ENSRegistry", + "name": "registry_", + "type": "address" + } + ], + "name": "setRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "internalType": "string", + "name": "value", + "type": "string" + } + ], + "name": "setText", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "submitNode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "syncAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "key", + "type": "string" + } + ], + "name": "text", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "verifyGuardianSignature", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "verifyNode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xf73f44af58c7d1d4c28d2d86e8151d9df4afaa2577eb0699557abc16968dbd53", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "4150167", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x6a1b0febe798bbc8adf31b34fd036e1ac3aabe885d03a97c2d9ce21c1000ea84", + "transactionHash": "0xf73f44af58c7d1d4c28d2d86e8151d9df4afaa2577eb0699557abc16968dbd53", + "logs": [], + "blockNumber": 5497455, + "cumulativeGasUsed": "4150167", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"AddrChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"coinType\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"newAddress\",\"type\":\"bytes\"}],\"name\":\"AddressChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"GuardianAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"GuardianRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"NameChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"NodeReleased\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"NodeSubmitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"NodeVerified\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"x\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"y\",\"type\":\"bytes32\"}],\"name\":\"PubkeyChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"registry\",\"type\":\"address\"}],\"name\":\"RegistryChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"indexedKey\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"}],\"name\":\"TextChanged\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"addGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"addr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"coinType\",\"type\":\"uint256\"}],\"name\":\"addr\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"}],\"internalType\":\"struct ENSController.SubNodeRegistration\",\"name\":\"subNodeRegistration\",\"type\":\"tuple\"}],\"name\":\"hashSubNodeRegistration\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ENSRegistry\",\"name\":\"registry_\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"guardians_\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"gateway_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"isGuardian\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"nodeOwners\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"pubkey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"x\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"y\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"guardianSignature\",\"type\":\"bytes\"}],\"name\":\"registerSubNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract ENSRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"releaseNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"removeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"coinType\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"addr_\",\"type\":\"bytes\"}],\"name\":\"setAddr\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"addr_\",\"type\":\"address\"}],\"name\":\"setAddr\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"x\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"y\",\"type\":\"bytes32\"}],\"name\":\"setPubkey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ENSRegistry\",\"name\":\"registry_\",\"type\":\"address\"}],\"name\":\"setRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"name\":\"setText\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"submitNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceID\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"syncAddr\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"}],\"name\":\"text\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"verifyGuardianSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"verifyNode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"details\":\"The process of adding root node consists of 3 steps: 1. `submitNode` - should be called from ENS node owner, 2. Change ENS node owner in ENS registry to ENS controller, 3. `verifyNode` - should be called from previous ENS node owner, To register sub node, `msg.sender` need to send valid signature from one of guardian key. Once registration is complete `msg.sender` becoming both node owner and `addr` record value. After registration sub node cannot be replaced.\",\"events\":{\"NodeReleased(bytes32,address)\":{\"details\":\"Emitted when new node is released\",\"params\":{\"node\":\"node name hash\",\"owner\":\"owner address\"}},\"NodeSubmitted(bytes32,address)\":{\"details\":\"Emitted when new node is submitted\",\"params\":{\"node\":\"node name hash\",\"owner\":\"owner address\"}},\"NodeVerified(bytes32)\":{\"details\":\"Emitted when the existing owner is verified\",\"params\":{\"node\":\"node name hash\"}},\"RegistryChanged(address)\":{\"details\":\"Emitted when ENS registry address is changed\",\"params\":{\"registry\":\"registry address\"}}},\"kind\":\"dev\",\"methods\":{\"addGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"}},\"constructor\":{\"details\":\"Public constructor\"},\"hashSubNodeRegistration((address,bytes32,bytes32))\":{\"params\":{\"subNodeRegistration\":\"struct\"},\"returns\":{\"_0\":\"hash\"}},\"initialize(address,address[],address)\":{\"params\":{\"gateway_\":\"gateway address\",\"registry_\":\"ENS registry address\"}},\"isGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"},\"returns\":{\"_0\":\"true when guardian exists\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}},\"registerSubNode(bytes32,bytes32,bytes)\":{\"params\":{\"guardianSignature\":\"guardian signature\",\"label\":\"label hash\",\"node\":\"node name hash\"}},\"releaseNode(bytes32)\":{\"details\":\"Should be called from the previous ENS node owner\",\"params\":{\"node\":\"node name hash\"}},\"removeGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"}},\"setRegistry(address)\":{\"params\":{\"registry_\":\"registry address\"}},\"submitNode(bytes32)\":{\"details\":\"Should be called from the current ENS node owner\",\"params\":{\"node\":\"node name hash\"}},\"syncAddr(bytes32)\":{\"params\":{\"node\":\"node name hash\"}},\"verifyGuardianSignature(bytes32,bytes)\":{\"params\":{\"messageHash\":\"message hash\",\"signature\":\"signature\"},\"returns\":{\"_0\":\"true on correct guardian signature\"}},\"verifyNode(bytes32)\":{\"details\":\"Should be called from the previous ENS node owner\",\"params\":{\"node\":\"node name hash\"}}},\"title\":\"ENS controller\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addGuardian(address)\":{\"notice\":\"Adds a new guardian\"},\"hashSubNodeRegistration((address,bytes32,bytes32))\":{\"notice\":\"Hashes `SubNodeRegistration` message payload\"},\"initialize(address,address[],address)\":{\"notice\":\"Initializes `ENSController` contract\"},\"isGuardian(address)\":{\"notice\":\"Check if guardian exists\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"},\"registerSubNode(bytes32,bytes32,bytes)\":{\"notice\":\"Registers sub node\"},\"releaseNode(bytes32)\":{\"notice\":\"Releases node\"},\"removeGuardian(address)\":{\"notice\":\"Removes the existing guardian\"},\"setRegistry(address)\":{\"notice\":\"Sets registry\"},\"submitNode(bytes32)\":{\"notice\":\"Submits node\"},\"syncAddr(bytes32)\":{\"notice\":\"Sync address\"},\"verifyGuardianSignature(bytes32,bytes)\":{\"notice\":\"Verifies guardian signature\"},\"verifyNode(bytes32)\":{\"notice\":\"Verifies node\"}},\"notice\":\"ENS subnode registrar\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ens/ENSController.sol\":\"ENSController\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/access/Guarded.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n\\n/**\\n * @title Guarded\\n *\\n * @dev Contract module which provides a guardian-type control mechanism.\\n * It allows key accounts to have guardians and restricts specific methods to be accessible by guardians only.\\n *\\n * Each guardian account can remove other guardians\\n *\\n * Use `_initializeGuarded` to initialize the contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Guarded {\\n using ECDSALib for bytes32;\\n\\n mapping(address => bool) private guardians;\\n\\n // events\\n\\n /**\\n * @dev Emitted when a new guardian is added\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianAdded(\\n address sender,\\n address guardian\\n );\\n\\n /**\\n * @dev Emitted when the existing guardian is removed\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianRemoved(\\n address sender,\\n address guardian\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not a guardian account\\n */\\n modifier onlyGuardian() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n guardians[tx.origin],\\n \\\"Guarded: tx.origin is not the guardian\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new guardian\\n * @param guardian guardian address\\n */\\n function addGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n _addGuardian(guardian);\\n }\\n\\n /**\\n * @notice Removes the existing guardian\\n * @param guardian guardian address\\n */\\n function removeGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin != guardian,\\n \\\"Guarded: cannot remove self\\\"\\n );\\n\\n require(\\n guardians[guardian],\\n \\\"Guarded: guardian doesn't exist\\\"\\n );\\n\\n guardians[guardian] = false;\\n\\n emit GuardianRemoved(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if guardian exists\\n * @param guardian guardian address\\n * @return true when guardian exists\\n */\\n function isGuardian(\\n address guardian\\n )\\n external\\n view\\n returns (bool)\\n {\\n return guardians[guardian];\\n }\\n\\n /**\\n * @notice Verifies guardian signature\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true on correct guardian signature\\n */\\n function verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyGuardianSignature(\\n messageHash,\\n signature\\n );\\n }\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `Guarded` contract\\n * @dev If `guardians_` array is empty `tx.origin` is added as guardian account\\n * @param guardians_ array of guardians addresses\\n */\\n function _initializeGuarded(\\n address[] memory guardians_\\n )\\n internal\\n {\\n if (guardians_.length == 0) {\\n // solhint-disable-next-line avoid-tx-origin\\n _addGuardian(tx.origin);\\n } else {\\n uint guardiansLen = guardians_.length;\\n for (uint i = 0; i < guardiansLen; i++) {\\n _addGuardian(guardians_[i]);\\n }\\n }\\n }\\n\\n\\n // internal functions (views)\\n\\n function _verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n view\\n returns (bool)\\n {\\n address guardian = messageHash.recoverAddress(signature);\\n\\n return guardians[guardian];\\n }\\n\\n // private functions\\n\\n function _addGuardian(\\n address guardian\\n )\\n private\\n {\\n require(\\n guardian != address(0),\\n \\\"Guarded: cannot add 0x0 guardian\\\"\\n );\\n\\n require(\\n !guardians[guardian],\\n \\\"Guarded: guardian already exists\\\"\\n );\\n\\n guardians[guardian] = true;\\n\\n emit GuardianAdded(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n}\\n\",\"keccak256\":\"0x4a5f5670041362e87ea267d81c55fc3edc1a78e81f6f17524b13267f91f31458\",\"license\":\"MIT\"},\"src/common/libs/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Bytes library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BytesLib {\\n /**\\n * @notice Converts bytes to address\\n * @param data data\\n * @return address\\n */\\n function toAddress(\\n bytes memory data\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result;\\n\\n require(\\n data.length == 20,\\n \\\"BytesLib: invalid data length\\\"\\n );\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := div(mload(add(data, 0x20)), 0x1000000000000000000000000)\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x64c84964ea91bfb1f2d859eea6c57fe5b4a6f269951a4adf5f58d306c54c7f76\",\"license\":\"MIT\"},\"src/common/libs/ECDSALib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ECDSA library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/cryptography/ECDSA.sol#L26\\n */\\nlibrary ECDSALib {\\n function recoverAddress(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n\\n if (v < 27) {\\n v += 27;\\n }\\n\\n if (v == 27 || v == 28) {\\n result = ecrecover(messageHash, v, r, s);\\n }\\n }\\n\\n return result;\\n }\\n\\n function toEthereumSignedMessageHash(\\n bytes32 messageHash\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n messageHash\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x3b1460d688302eb595268c2af147ab532f29dbced66520e013f48d498eed3cec\",\"license\":\"MIT\"},\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/common/signature/SignatureValidator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n/**\\n * @title Signature validator\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract SignatureValidator {\\n using ECDSALib for bytes32;\\n\\n uint256 public chainId;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {\\n uint256 chainId_;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n chainId_ := chainid()\\n }\\n\\n chainId = chainId_;\\n }\\n\\n // internal functions\\n\\n function _hashMessagePayload(\\n bytes32 messagePrefix,\\n bytes memory messagePayload\\n )\\n internal\\n view\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n chainId,\\n address(this),\\n messagePrefix,\\n messagePayload\\n )).toEthereumSignedMessageHash();\\n }\\n}\\n\",\"keccak256\":\"0xc1168f7ccb74aea67089941dc5e4c1d1c4aa766afca47a90c0b017b8445b8acf\",\"license\":\"MIT\"},\"src/ens/ENSController.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../common/access/Guarded.sol\\\";\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"../common/signature/SignatureValidator.sol\\\";\\nimport \\\"../gateway/GatewayRecipient.sol\\\";\\nimport \\\"./resolvers/ENSAddressResolver.sol\\\";\\nimport \\\"./resolvers/ENSNameResolver.sol\\\";\\nimport \\\"./resolvers/ENSPubKeyResolver.sol\\\";\\nimport \\\"./resolvers/ENSTextResolver.sol\\\";\\nimport \\\"./ENSRegistry.sol\\\";\\n\\n\\n/**\\n * @title ENS controller\\n *\\n * @notice ENS subnode registrar\\n *\\n * @dev The process of adding root node consists of 3 steps:\\n * 1. `submitNode` - should be called from ENS node owner,\\n * 2. Change ENS node owner in ENS registry to ENS controller,\\n * 3. `verifyNode` - should be called from previous ENS node owner,\\n *\\n * To register sub node, `msg.sender` need to send valid signature from one of guardian key.\\n * Once registration is complete `msg.sender` becoming both node owner and `addr` record value.\\n *\\n * After registration sub node cannot be replaced.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract ENSController is Guarded, Initializable, SignatureValidator, GatewayRecipient, ENSAddressResolver, ENSNameResolver, ENSPubKeyResolver, ENSTextResolver {\\n struct SubNodeRegistration {\\n address account;\\n bytes32 node;\\n bytes32 label;\\n }\\n\\n bytes4 private constant INTERFACE_META_ID = bytes4(keccak256(abi.encodePacked(\\\"supportsInterface(bytes4)\\\")));\\n\\n bytes32 private constant HASH_PREFIX_SUB_NODE_REGISTRATION = keccak256(\\n \\\"SubNodeRegistration(address account,bytes32 node,bytes32 label)\\\"\\n );\\n\\n ENSRegistry public registry;\\n\\n mapping(bytes32 => address) public nodeOwners;\\n\\n // events\\n\\n /**\\n * @dev Emitted when new node is submitted\\n * @param node node name hash\\n * @param owner owner address\\n */\\n event NodeSubmitted(\\n bytes32 node,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the existing owner is verified\\n * @param node node name hash\\n */\\n event NodeVerified(\\n bytes32 node\\n );\\n\\n /**\\n * @dev Emitted when new node is released\\n * @param node node name hash\\n * @param owner owner address\\n */\\n event NodeReleased(\\n bytes32 node,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when ENS registry address is changed\\n * @param registry registry address\\n */\\n event RegistryChanged(\\n address registry\\n );\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Guarded() Initializable() SignatureValidator() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `ENSController` contract\\n * @param registry_ ENS registry address\\n * @param gateway_ gateway address\\n */\\n function initialize(\\n ENSRegistry registry_,\\n address[] calldata guardians_,\\n address gateway_\\n )\\n external\\n onlyInitializer\\n {\\n require(\\n address(registry_) != address(0),\\n \\\"ENSController: cannot set 0x0 registry\\\"\\n );\\n\\n registry = registry_;\\n\\n // Guarded\\n _initializeGuarded(guardians_);\\n\\n // GatewayRecipient\\n _initializeGatewayRecipient(gateway_);\\n }\\n\\n /**\\n * @notice Sets registry\\n * @param registry_ registry address\\n */\\n function setRegistry(\\n ENSRegistry registry_\\n )\\n external\\n onlyGuardian\\n {\\n require(\\n address(registry_) != address(0),\\n \\\"ENSController: cannot set 0x0 registry\\\"\\n );\\n\\n require(\\n registry_ != registry,\\n \\\"ENSController: registry already set\\\"\\n );\\n\\n registry = registry_;\\n\\n emit RegistryChanged(\\n address(registry)\\n );\\n }\\n\\n /**\\n * @notice Submits node\\n * @dev Should be called from the current ENS node owner\\n * @param node node name hash\\n */\\n function submitNode(\\n bytes32 node\\n )\\n external\\n {\\n address owner = _getContextAccount();\\n\\n require(\\n _addr(node) == address(0),\\n \\\"ENSController: node already exists\\\"\\n );\\n\\n require(\\n nodeOwners[node] == address(0),\\n \\\"ENSController: node already submitted\\\"\\n );\\n\\n require(\\n registry.owner(node) == owner,\\n \\\"ENSController: invalid ens node owner\\\"\\n );\\n\\n nodeOwners[node] = owner;\\n\\n emit NodeSubmitted(node, owner);\\n }\\n\\n /**\\n * @notice Verifies node\\n * @dev Should be called from the previous ENS node owner\\n * @param node node name hash\\n */\\n function verifyNode(\\n bytes32 node\\n )\\n external\\n {\\n address owner = _getContextAccount();\\n\\n require(\\n _addr(node) == address(0),\\n \\\"ENSController: node already exists\\\"\\n );\\n\\n require(\\n nodeOwners[node] == owner,\\n \\\"ENSController: invalid node owner\\\"\\n );\\n\\n require(\\n registry.owner(node) == address(this),\\n \\\"ENSController: invalid ens node owner\\\"\\n );\\n\\n _setAddr(node, address(this));\\n\\n registry.setResolver(node, address(this));\\n\\n emit NodeVerified(node);\\n }\\n\\n /**\\n * @notice Releases node\\n * @dev Should be called from the previous ENS node owner\\n * @param node node name hash\\n */\\n function releaseNode(\\n bytes32 node\\n )\\n external\\n {\\n address owner = _getContextAccount();\\n\\n require(\\n _addr(node) == address(this),\\n \\\"ENSController: node doesn't exist\\\"\\n );\\n\\n require(\\n nodeOwners[node] == owner,\\n \\\"ENSController: invalid node owner\\\"\\n );\\n\\n registry.setOwner(node, owner);\\n\\n delete nodeOwners[node];\\n\\n emit NodeReleased(node, owner);\\n }\\n\\n /**\\n * @notice Sync address\\n * @param node node name hash\\n */\\n function syncAddr(\\n bytes32 node\\n )\\n external\\n {\\n address account = _getContextAccount();\\n\\n require(\\n account == registry.owner(node),\\n \\\"ENSController: caller is not the node owner\\\"\\n );\\n\\n require(\\n registry.resolver(node) == address(this),\\n \\\"ENSController: invalid node resolver\\\"\\n );\\n\\n require(\\n _addr(node) == address(0),\\n \\\"ENSController: node already in sync\\\"\\n );\\n\\n _setAddr(node, account);\\n }\\n\\n /**\\n * @notice Registers sub node\\n * @param node node name hash\\n * @param label label hash\\n * @param guardianSignature guardian signature\\n */\\n function registerSubNode(\\n bytes32 node,\\n bytes32 label,\\n bytes calldata guardianSignature\\n )\\n external\\n {\\n address account = _getContextAccount();\\n\\n bytes32 messageHash = _hashSubNodeRegistration(\\n account,\\n node,\\n label\\n );\\n\\n require(\\n _verifyGuardianSignature(messageHash, guardianSignature),\\n \\\"ENSController: invalid guardian signature\\\"\\n );\\n\\n bytes32 subNode = keccak256(\\n abi.encodePacked(\\n node,\\n label\\n )\\n );\\n\\n require(\\n _addr(node) == address(this),\\n \\\"ENSController: invalid node\\\"\\n );\\n\\n require(\\n _addr(subNode) == address(0),\\n \\\"ENSController: label already taken\\\"\\n );\\n\\n registry.setSubnodeRecord(node, label, address(this), address(this), 0);\\n registry.setOwner(subNode, account);\\n\\n _setAddr(subNode, account);\\n }\\n\\n // external functions (pure)\\n function supportsInterface(\\n bytes4 interfaceID\\n )\\n external\\n pure\\n returns(bool)\\n {\\n return interfaceID == INTERFACE_META_ID ||\\n interfaceID == INTERFACE_ADDR_ID ||\\n interfaceID == INTERFACE_ADDRESS_ID ||\\n interfaceID == INTERFACE_NAME_ID ||\\n interfaceID == INTERFACE_PUB_KEY_ID ||\\n interfaceID == INTERFACE_TEXT_ID;\\n }\\n\\n // public functions (views)\\n\\n /**\\n * @notice Hashes `SubNodeRegistration` message payload\\n * @param subNodeRegistration struct\\n * @return hash\\n */\\n function hashSubNodeRegistration(\\n SubNodeRegistration memory subNodeRegistration\\n )\\n public\\n view\\n returns (bytes32)\\n {\\n return _hashSubNodeRegistration(\\n subNodeRegistration.account,\\n subNodeRegistration.node,\\n subNodeRegistration.label\\n );\\n }\\n\\n // internal functions (views)\\n\\n function _isNodeOwner(\\n bytes32 node\\n )\\n internal\\n override\\n view\\n returns (bool)\\n {\\n return registry.owner(node) == _getContextAccount();\\n }\\n\\n // private functions (views)\\n\\n function _hashSubNodeRegistration(\\n address account,\\n bytes32 node,\\n bytes32 label\\n )\\n private\\n view\\n returns (bytes32)\\n {\\n return _hashMessagePayload(HASH_PREFIX_SUB_NODE_REGISTRATION, abi.encodePacked(\\n account,\\n node,\\n label\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x8006c066bef9625f3d103d77e8b66ff5f006187586cd4518676e73c5d3f79957\",\"license\":\"MIT\"},\"src/ens/ENSRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ENS registry\\n *\\n * @dev Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ENSRegistry.sol\\n */\\ncontract ENSRegistry {\\n struct Record {\\n address owner;\\n address resolver;\\n uint64 ttl;\\n }\\n\\n mapping (bytes32 => Record) private records;\\n mapping (address => mapping(address => bool)) private operators;\\n\\n // events\\n\\n event NewOwner(\\n bytes32 indexed node,\\n bytes32 indexed label,\\n address owner\\n );\\n\\n event Transfer(\\n bytes32 indexed node,\\n address owner\\n );\\n\\n event NewResolver(\\n bytes32 indexed node,\\n address resolver\\n );\\n\\n event NewTTL(\\n bytes32 indexed node,\\n uint64 ttl\\n );\\n\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n // modifiers\\n\\n modifier authorised(\\n bytes32 node\\n )\\n {\\n address owner = records[node].owner;\\n\\n require(\\n owner == msg.sender || operators[owner][msg.sender],\\n \\\"ENSRegistry: reverted by authorised modifier\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor()\\n public\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n records[0x0].owner = tx.origin;\\n }\\n\\n // external functions\\n\\n function setRecord(\\n bytes32 node,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n setOwner(node, owner_);\\n\\n _setResolverAndTTL(node, resolver_, ttl_);\\n }\\n\\n function setTTL(\\n bytes32 node,\\n uint64 ttl_\\n )\\n external\\n authorised(node)\\n {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n bytes32 subNode = setSubnodeOwner(node, label, owner_);\\n\\n _setResolverAndTTL(subNode, resolver_, ttl_);\\n }\\n\\n function setApprovalForAll(\\n address operator,\\n bool approved\\n )\\n external\\n {\\n operators[msg.sender][operator] = approved;\\n\\n emit ApprovalForAll(\\n msg.sender,\\n operator,\\n approved\\n );\\n }\\n\\n // external functions (views)\\n\\n function owner(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n address addr = records[node].owner;\\n\\n if (addr == address(this)) {\\n return address(0x0);\\n }\\n\\n return addr;\\n }\\n\\n function resolver(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n return records[node].resolver;\\n }\\n\\n function ttl(\\n bytes32 node\\n )\\n external\\n view\\n returns (uint64)\\n {\\n return records[node].ttl;\\n }\\n\\n function recordExists(\\n bytes32 node\\n )\\n external\\n view\\n returns (bool)\\n {\\n return records[node].owner != address(0x0);\\n }\\n\\n function isApprovedForAll(\\n address owner_,\\n address operator\\n )\\n external\\n view\\n returns (bool)\\n {\\n return operators[owner_][operator];\\n }\\n\\n // public functions\\n\\n function setOwner(\\n bytes32 node,\\n address owner_\\n )\\n public\\n authorised(node)\\n {\\n records[node].owner = owner_;\\n\\n emit Transfer(node, owner_);\\n }\\n\\n function setResolver(\\n bytes32 node,\\n address resolver_\\n )\\n public\\n authorised(node)\\n {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner_\\n )\\n public\\n authorised(node)\\n returns(bytes32)\\n {\\n bytes32 subNode = keccak256(abi.encodePacked(node, label));\\n\\n records[subNode].owner = owner_;\\n\\n emit NewOwner(node, label, owner_);\\n\\n return subNode;\\n }\\n\\n // private functions\\n\\n function _setResolverAndTTL(\\n bytes32 node,\\n address resolver_,\\n uint64 ttl_\\n )\\n private\\n {\\n if (resolver_ != records[node].resolver) {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n if (ttl_ != records[node].ttl) {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe00dbdea09d17d41c2c14266e6e1b6b95938c0d374b266bb44a91cfcf0495612\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSAbstractResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ENS abstract resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/ResolverBase.sol\\n */\\nabstract contract ENSAbstractResolver {\\n // modifiers\\n\\n modifier onlyNodeOwner(bytes32 node)\\n {\\n require(\\n _isNodeOwner(node),\\n \\\"ENSAbstractResolver: reverted by onlyNodeOwner modifier\\\"\\n );\\n\\n _;\\n }\\n\\n // internal functions (views)\\n\\n function _isNodeOwner(\\n bytes32 node\\n )\\n internal\\n virtual\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xc67d8bdd4904684e5d3388f7ca7d18c7d407058d6b548d8c591404c758a1ac60\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSAddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./ENSAbstractResolver.sol\\\";\\n\\n\\n/**\\n * @title ENS abstract address resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/AddrResolver.sol\\n */\\nabstract contract ENSAddressResolver is ENSAbstractResolver {\\n bytes4 internal constant INTERFACE_ADDR_ID = bytes4(keccak256(abi.encodePacked(\\\"addr(bytes32)\\\")));\\n bytes4 internal constant INTERFACE_ADDRESS_ID = bytes4(keccak256(abi.encodePacked(\\\"addr(bytes32,uint)\\\")));\\n\\n uint internal constant COIN_TYPE_ETH = 60;\\n\\n mapping(bytes32 => mapping(uint => bytes)) internal resolverAddresses;\\n\\n // events\\n\\n event AddrChanged(\\n bytes32 indexed node,\\n address addr\\n );\\n\\n event AddressChanged(\\n bytes32 indexed node,\\n uint coinType,\\n bytes newAddress\\n );\\n\\n // external functions\\n\\n function setAddr(\\n bytes32 node,\\n address addr_\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n _setAddr(node, addr_);\\n }\\n\\n function setAddr(\\n bytes32 node,\\n uint coinType,\\n bytes memory addr_\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n _setAddr(node, coinType, addr_);\\n }\\n\\n // external functions (views)\\n\\n function addr(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n return _addr(node);\\n }\\n\\n function addr(\\n bytes32 node,\\n uint coinType\\n )\\n external\\n view\\n returns (bytes memory)\\n {\\n return resolverAddresses[node][coinType];\\n }\\n\\n // internal functions\\n\\n function _setAddr(\\n bytes32 node,\\n address addr_\\n )\\n internal\\n {\\n _setAddr(node, COIN_TYPE_ETH, _addressToBytes(addr_));\\n }\\n\\n function _setAddr(\\n bytes32 node,\\n uint coinType,\\n bytes memory addr_\\n )\\n internal\\n {\\n emit AddressChanged(node, coinType, addr_);\\n\\n if(coinType == COIN_TYPE_ETH) {\\n emit AddrChanged(node, _bytesToAddress(addr_));\\n }\\n\\n resolverAddresses[node][coinType] = addr_;\\n }\\n\\n // internal functions (views)\\n\\n function _addr(\\n bytes32 node\\n )\\n internal\\n view\\n returns (address)\\n {\\n address result;\\n\\n bytes memory addr_ = resolverAddresses[node][COIN_TYPE_ETH];\\n\\n if (addr_.length > 0) {\\n result = _bytesToAddress(addr_);\\n }\\n\\n return result;\\n }\\n\\n // private function (pure)\\n\\n function _bytesToAddress(\\n bytes memory data\\n )\\n private\\n pure\\n returns(address payable)\\n {\\n address payable result;\\n\\n require(data.length == 20);\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := div(mload(add(data, 32)), exp(256, 12))\\n }\\n\\n return result;\\n }\\n\\n function _addressToBytes(\\n address addr_\\n )\\n private\\n pure\\n returns(bytes memory)\\n {\\n bytes memory result = new bytes(20);\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n mstore(add(result, 32), mul(addr_, exp(256, 12)))\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xd2f0c5ed5f5058755512c0916496da6bcf4cf18a0026ee8d20b4306656ce5142\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSNameResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./ENSAbstractResolver.sol\\\";\\n\\n\\n/**\\n * @title ENS abstract name resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/NameResolver.sol\\n */\\nabstract contract ENSNameResolver is ENSAbstractResolver {\\n bytes4 internal constant INTERFACE_NAME_ID = bytes4(keccak256(abi.encodePacked(\\\"name(bytes32)\\\")));\\n\\n mapping(bytes32 => string) internal resolverNames;\\n\\n // events\\n\\n event NameChanged(\\n bytes32 indexed node,\\n string name\\n );\\n\\n // external functions\\n\\n function setName(\\n bytes32 node,\\n string calldata name\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n resolverNames[node] = name;\\n\\n emit NameChanged(node, name);\\n }\\n\\n // external functions (views)\\n\\n function name(\\n bytes32 node\\n )\\n external\\n view\\n returns (string memory)\\n {\\n return resolverNames[node];\\n }\\n}\\n\",\"keccak256\":\"0x1d2d4b21f59225fbefe0e5aaff87aff8f11afe5281745934d595e15770557ead\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSPubKeyResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./ENSAbstractResolver.sol\\\";\\n\\n\\n/**\\n * @title ENS abstract pub key resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/PubkeyResolver.sol\\n */\\nabstract contract ENSPubKeyResolver is ENSAbstractResolver {\\n bytes4 internal constant INTERFACE_PUB_KEY_ID = bytes4(keccak256(abi.encodePacked(\\\"pubkey(bytes32)\\\")));\\n\\n struct PubKey {\\n bytes32 x;\\n bytes32 y;\\n }\\n\\n mapping(bytes32 => PubKey) internal resolverPubKeys;\\n\\n // events\\n\\n event PubkeyChanged(\\n bytes32 indexed node,\\n bytes32 x,\\n bytes32 y\\n );\\n\\n // external functions (views)\\n\\n function setPubkey(\\n bytes32 node,\\n bytes32 x,\\n bytes32 y\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n resolverPubKeys[node] = PubKey(x, y);\\n\\n emit PubkeyChanged(node, x, y);\\n }\\n\\n // external functions (views)\\n\\n function pubkey(\\n bytes32 node\\n )\\n external\\n view\\n returns (bytes32 x, bytes32 y)\\n {\\n return (resolverPubKeys[node].x, resolverPubKeys[node].y);\\n }\\n}\\n\",\"keccak256\":\"0x763a3403ded734b7fa9141c270a0aaaf4a3f1322ff4b197e51ed70adfbaf1fa1\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSTextResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./ENSAbstractResolver.sol\\\";\\n\\n\\n/**\\n * @title ENS abstract text resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/TextResolver.sol\\n */\\nabstract contract ENSTextResolver is ENSAbstractResolver {\\n bytes4 internal constant INTERFACE_TEXT_ID = bytes4(keccak256(abi.encodePacked(\\\"text(bytes32,string)\\\")));\\n\\n mapping(bytes32 => mapping(string => string)) internal resolverTexts;\\n\\n // events\\n\\n event TextChanged(\\n bytes32 indexed node,\\n string indexed indexedKey,\\n string key\\n );\\n\\n // external functions (views)\\n\\n function setText(\\n bytes32 node,\\n string calldata key,\\n string calldata value\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n resolverTexts[node][key] = value;\\n\\n emit TextChanged(node, key, key);\\n }\\n\\n // external functions (views)\\n\\n function text(\\n bytes32 node,\\n string calldata key\\n )\\n external\\n view\\n returns (string memory)\\n {\\n return resolverTexts[node][key];\\n }\\n}\\n\",\"keccak256\":\"0x6d13447ff9aa753320b3a93ba0b8a2cbb43385711d51e00809cfb9201136cff7\",\"license\":\"MIT\"},\"src/gateway/GatewayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BytesLib.sol\\\";\\n\\n\\n/**\\n * @title Gateway recipient\\n *\\n * @notice Gateway target contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract GatewayRecipient {\\n using BytesLib for bytes;\\n\\n address public gateway;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `GatewayRecipient` contract\\n * @param gateway_ `Gateway` contract address\\n */\\n function _initializeGatewayRecipient(\\n address gateway_\\n )\\n internal\\n {\\n gateway = gateway_;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Gets gateway context account\\n * @return context account address\\n */\\n function _getContextAccount()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(40);\\n }\\n\\n /**\\n * @notice Gets gateway context sender\\n * @return context sender address\\n */\\n function _getContextSender()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(20);\\n }\\n\\n /**\\n * @notice Gets gateway context data\\n * @return context data\\n */\\n function _getContextData()\\n internal\\n view\\n returns (bytes calldata)\\n {\\n bytes calldata result;\\n\\n if (_isGatewaySender()) {\\n result = msg.data[:msg.data.length - 40];\\n } else {\\n result = msg.data;\\n }\\n\\n return result;\\n }\\n\\n // private functions (views)\\n\\n function _getContextAddress(\\n uint256 offset\\n )\\n private\\n view\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (_isGatewaySender()) {\\n uint from = msg.data.length - offset;\\n result = bytes(msg.data[from:from + 20]).toAddress();\\n } else {\\n result = msg.sender;\\n }\\n\\n return result;\\n }\\n\\n function _isGatewaySender()\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (msg.sender == gateway) {\\n require(\\n msg.data.length >= 44,\\n \\\"GatewayRecipient: invalid msg.data\\\"\\n );\\n\\n result = true;\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe3fd29479d748d67360c61a9cbaafc66eaca25f476e59a45e842472bcf5233fc\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5032600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600046905080600281905550506149798061006e6000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c806371404156116100f9578063a91ee0dc11610097578063d0f710d611610071578063d0f710d614610512578063d5fa2b0014610542578063dc5b68a61461055e578063f1cb7e061461057a576101c4565b8063a91ee0dc146104a9578063c8690233146104c5578063c8cc2aee146104f6576101c4565b80637d0e0e7e116100d35780637d0e0e7e146104375780638b95dd71146104535780639a8a05921461046f578063a526d83b1461048d576101c4565b806371404156146103e157806377372213146103fd5780637b10399914610419576101c4565b8063392e53cd1161016657806355800f871161014057806355800f871461033557806359d1d43c14610351578063691f3431146103815780636df0cf42146103b1576101c4565b8063392e53cd146102cb5780633b3b57de146102e957806346386f7314610319576101c4565b8063116191b6116101a2578063116191b6146102455780631b3cd1421461026357806329ae6a7e1461029357806329cd62ea146102af576101c4565b806301ffc9a7146101c95780630c68ba21146101f957806310f13a8c14610229575b600080fd5b6101e360048036038101906101de91906133b4565b6105aa565b6040516101f091906141bc565b60405180910390f35b610213600480360381019061020e9190613066565b610834565b60405161022091906141bc565b60405180910390f35b610243600480360381019061023e9190613288565b610889565b005b61024d61096d565b60405161025a919061415d565b60405180910390f35b61027d600480360381019061027891906130b8565b610993565b60405161028a919061415d565b60405180910390f35b6102ad60048036038101906102a891906130b8565b6109c6565b005b6102c960048036038101906102c4919061311d565b610beb565b005b6102d3610cb3565b6040516102e091906141bc565b60405180910390f35b61030360048036038101906102fe91906130b8565b610d0b565b604051610310919061415d565b60405180910390f35b610333600480360381019061032e919061316c565b610d1d565b005b61034f600480360381019061034a91906130b8565b611017565b005b61036b60048036038101906103669190613230565b6112d8565b604051610378919061433d565b60405180910390f35b61039b600480360381019061039691906130b8565b6113ad565b6040516103a8919061433d565b60405180910390f35b6103cb60048036038101906103c69190613472565b611462565b6040516103d891906141d7565b60405180910390f35b6103fb60048036038101906103f69190613066565b611482565b005b61041760048036038101906104129190613230565b61169a565b005b610421611746565b60405161042e91906142fe565b60405180910390f35b610451600480360381019061044c91906130b8565b61176c565b005b61046d6004803603810190610468919061334d565b611a38565b005b610477611a92565b604051610484919061461f565b60405180910390f35b6104a760048036038101906104a29190613066565b611a98565b005b6104c360048036038101906104be91906133dd565b611b2f565b005b6104df60048036038101906104da91906130b8565b611d58565b6040516104ed92919061421b565b60405180910390f35b610510600480360381019061050b91906130b8565b611d92565b005b61052c600480360381019061052791906131d8565b6120a2565b60405161053991906141bc565b60405180910390f35b61055c600480360381019061055791906130e1565b6120fb565b005b61057860048036038101906105739190613406565b612153565b005b610594600480360381019061058f9190613311565b612366565b6040516105a191906142dc565b60405180910390f35b60006040516020016105bb9061406f565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061067d5750604051602001610626906140aa565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806106e95750604051602001610692906140fe565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061075557506040516020016106fe906140d4565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806107c1575060405160200161076a906140e9565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061082d57506040516020016107d6906140bf565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b846108938161242d565b6108d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c9906145df565b60405180910390fd5b82826007600089815260200190815260200160002087876040516108f7929190614056565b90815260200160405180910390209190610912929190612d39565b508484604051610923929190614056565b6040518091039020867fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a7550878760405161095d929190614319565b60405180910390a3505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60096020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006109d0612516565b90503073ffffffffffffffffffffffffffffffffffffffff166109f283612527565b73ffffffffffffffffffffffffffffffffffffffff1614610a48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3f9061443f565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ae9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae09061437f565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b0fc9c383836040518363ffffffff1660e01b8152600401610b469291906141f2565b600060405180830381600087803b158015610b6057600080fd5b505af1158015610b74573d6000803e3d6000fd5b505050506009600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f7803a16d95f9ca635bdec561006625e7444d8a9f8463866643cc03af011779d38282604051610bdf9291906141f2565b60405180910390a15050565b82610bf58161242d565b610c34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2b906145df565b60405180910390fd5b604051806040016040528084815260200183815250600660008681526020019081526020016000206000820151816000015560208201518160010155905050837f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e468484604051610ca592919061421b565b60405180910390a250505050565b60008073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b6000610d1682612527565b9050919050565b6000610d27612516565b90506000610d3682878761260c565b9050610d868185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612664565b610dc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dbc9061439f565b60405180910390fd5b60008686604051602001610dda92919061402a565b6040516020818303038152906040528051906020012090503073ffffffffffffffffffffffffffffffffffffffff16610e1288612527565b73ffffffffffffffffffffffffffffffffffffffff1614610e68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5f9061441f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16610e8982612527565b73ffffffffffffffffffffffffffffffffffffffff1614610edf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed6906143bf565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635ef2c7f08888303060006040518663ffffffff1660e01b8152600401610f43959493929190614244565b600060405180830381600087803b158015610f5d57600080fd5b505af1158015610f71573d6000803e3d6000fd5b50505050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b0fc9c382856040518363ffffffff1660e01b8152600401610fd29291906141f2565b600060405180830381600087803b158015610fec57600080fd5b505af1158015611000573d6000803e3d6000fd5b5050505061100e81846126d1565b50505050505050565b6000611021612516565b9050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff1660e01b815260040161107e91906141d7565b60206040518083038186803b15801561109657600080fd5b505afa1580156110aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ce919061308f565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461113b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111329061447f565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf846040518263ffffffff1660e01b81526004016111ad91906141d7565b60206040518083038186803b1580156111c557600080fd5b505afa1580156111d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fd919061308f565b73ffffffffffffffffffffffffffffffffffffffff1614611253576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124a9061435f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1661127483612527565b73ffffffffffffffffffffffffffffffffffffffff16146112ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c19061451f565b60405180910390fd5b6112d482826126d1565b5050565b60606007600085815260200190815260200160002083836040516112fd929190614056565b90815260200160405180910390208054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561139f5780601f106113745761010080835404028352916020019161139f565b820191906000526020600020905b81548152906001019060200180831161138257829003601f168201915b505050505090509392505050565b6060600560008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156114565780601f1061142b57610100808354040283529160200191611456565b820191906000526020600020905b81548152906001019060200180831161143957829003601f168201915b50505050509050919050565b600061147b82600001518360200151846040015161260c565b9050919050565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661150d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115049061449f565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16141561157c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115739061459f565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611607576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fe9061453f565b60405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b328260405161168f929190614193565b60405180910390a150565b826116a48161242d565b6116e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116da906145df565b60405180910390fd5b8282600560008781526020019081526020016000209190611705929190612d39565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f78484604051611738929190614319565b60405180910390a250505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611776612516565b9050600073ffffffffffffffffffffffffffffffffffffffff1661179983612527565b73ffffffffffffffffffffffffffffffffffffffff16146117ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e6906144ff565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611891576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611888906144df565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b815260040161190391906141d7565b60206040518083038186803b15801561191b57600080fd5b505afa15801561192f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611953919061308f565b73ffffffffffffffffffffffffffffffffffffffff16146119a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a09061455f565b60405180910390fd5b806009600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fc1e082a8c26f27c26e1bf5d0ce7ddd579ec7f6d7eb3ea90d8abd6c40991bae368282604051611a2c9291906141f2565b60405180910390a15050565b82611a428161242d565b611a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a78906145df565b60405180910390fd5b611a8c8484846126e9565b50505050565b60025481565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611b23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b1a9061449f565b60405180910390fd5b611b2c816127ab565b50565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611bba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb19061449f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611c2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c21906144bf565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611cbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cb2906145ff565b60405180910390fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdb0239c63d4033dcdd21bd44f8dd479a03efbae12f6bbe27c0a5f923d26514cc600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051611d4d919061415d565b60405180910390a150565b6000806006600084815260200190815260200160002060000154600660008581526020019081526020016000206001015491509150915091565b6000611d9c612516565b9050600073ffffffffffffffffffffffffffffffffffffffff16611dbf83612527565b73ffffffffffffffffffffffffffffffffffffffff1614611e15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e0c906144ff565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611eb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ead9061437f565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b8152600401611f2891906141d7565b60206040518083038186803b158015611f4057600080fd5b505afa158015611f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f78919061308f565b73ffffffffffffffffffffffffffffffffffffffff1614611fce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fc59061455f565b60405180910390fd5b611fd882306126d1565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a83306040518363ffffffff1660e01b81526004016120359291906141f2565b600060405180830381600087803b15801561204f57600080fd5b505af1158015612063573d6000803e3d6000fd5b505050507fcefbe9dbadcf675eef14e23810996ff38541fc26b4dd77cd6724b0eedc96f2008260405161209691906141d7565b60405180910390a15050565b60006120f28484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612664565b90509392505050565b816121058161242d565b612144576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161213b906145df565b60405180910390fd5b61214e83836126d1565b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146121e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121da906143ff565b60405180910390fd5b6000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612295576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228c906144bf565b60405180910390fd5b83600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612320838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061293a565b61232981612992565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516123589190614178565b60405180910390a150505050565b60606004600084815260200190815260200160002060008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124205780601f106123f557610100808354040283529160200191612420565b820191906000526020600020905b81548152906001019060200180831161240357829003601f168201915b5050505050905092915050565b6000612437612516565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004016124a891906141d7565b60206040518083038186803b1580156124c057600080fd5b505afa1580156124d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f8919061308f565b73ffffffffffffffffffffffffffffffffffffffff16149050919050565b600061252260286129d6565b905090565b6000806060600460008581526020019081526020016000206000603c81526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125e55780601f106125ba576101008083540402835291602001916125e5565b820191906000526020600020905b8154815290600101906020018083116125c857829003601f168201915b50505050509050600081511115612602576125ff81612a6b565b91505b8192505050919050565b600061265b7f621363c539a3aa1024c8837ca1dc095db03b7f9512b3a95ecb429aae7fd953ed85858560405160200161264793929190613fed565b604051602081830303815290604052612a93565b90509392505050565b60008061267a8385612ad490919063ffffffff16565b90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b6126e582603c6126e084612b8f565b6126e9565b5050565b827f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af752838360405161271b92919061463a565b60405180910390a2603c82141561276d57827f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd261275783612a6b565b6040516127649190614178565b60405180910390a25b8060046000858152602001908152602001600020600084815260200190815260200160002090805190602001906127a5929190612db9565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561281b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612812906143df565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156128a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161289e9061457f565b60405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a328260405161292f929190614193565b60405180910390a150565b6000815114156129525761294d326127ab565b61298f565b60008151905060005b8181101561298c5761297f83828151811061297257fe5b60200260200101516127ab565b808060010191505061295b565b50505b50565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600090506129e5612bf6565b15612a5e576000836000369050039050612a5660003683906014850192612a0e93929190614711565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612ca3565b915050612a62565b3390505b80915050919050565b6000806014835114612a7c57600080fd5b600c6101000a602084015104905080915050919050565b6000612acc600254308585604051602001612ab19493929190614113565b60405160208183030381529060405280519060200120612d09565b905092915050565b60008060009050604183511415612b855760008060006020860151925060408601519150606086015160001a9050601b8160ff161015612b1557601b810190505b601b8160ff161480612b2a5750601c8160ff16145b15612b815760018782858560405160008152602001604052604051612b529493929190614297565b6020604051602081039080840390855afa158015612b74573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b606080601467ffffffffffffffff81118015612baa57600080fd5b506040519080825280601f01601f191660200182016040528015612bdd5781602001600182028036833780820191505090505b509050600c6101000a8302602082015280915050919050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415612c9c57602c60003690501015612c97576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c8e9061445f565b60405180910390fd5b600190505b8091505090565b6000806014835114612cea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ce1906145bf565b60405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b600081604051602001612d1c9190614084565b604051602081830303815290604052805190602001209050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612d7a57803560ff1916838001178555612da8565b82800160010185558215612da8579182015b82811115612da7578235825591602001919060010190612d8c565b5b509050612db59190612e39565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612dfa57805160ff1916838001178555612e28565b82800160010185558215612e28579182015b82811115612e27578251825591602001919060010190612e0c565b5b509050612e359190612e39565b5090565b5b80821115612e52576000816000905550600101612e3a565b5090565b600081359050612e65816148f9565b92915050565b600081519050612e7a816148f9565b92915050565b60008083601f840112612e9257600080fd5b8235905067ffffffffffffffff811115612eab57600080fd5b602083019150836020820283011115612ec357600080fd5b9250929050565b600081359050612ed981614910565b92915050565b600081359050612eee81614927565b92915050565b60008083601f840112612f0657600080fd5b8235905067ffffffffffffffff811115612f1f57600080fd5b602083019150836001820283011115612f3757600080fd5b9250929050565b600082601f830112612f4f57600080fd5b8135612f62612f5d82614697565b61466a565b91508082526020830160208301858383011115612f7e57600080fd5b612f89838284614861565b50505092915050565b600081359050612fa18161493e565b92915050565b60008083601f840112612fb957600080fd5b8235905067ffffffffffffffff811115612fd257600080fd5b602083019150836001820283011115612fea57600080fd5b9250929050565b60006060828403121561300357600080fd5b61300d606061466a565b9050600061301d84828501612e56565b600083015250602061303184828501612eca565b602083015250604061304584828501612eca565b60408301525092915050565b60008135905061306081614955565b92915050565b60006020828403121561307857600080fd5b600061308684828501612e56565b91505092915050565b6000602082840312156130a157600080fd5b60006130af84828501612e6b565b91505092915050565b6000602082840312156130ca57600080fd5b60006130d884828501612eca565b91505092915050565b600080604083850312156130f457600080fd5b600061310285828601612eca565b925050602061311385828601612e56565b9150509250929050565b60008060006060848603121561313257600080fd5b600061314086828701612eca565b935050602061315186828701612eca565b925050604061316286828701612eca565b9150509250925092565b6000806000806060858703121561318257600080fd5b600061319087828801612eca565b94505060206131a187828801612eca565b935050604085013567ffffffffffffffff8111156131be57600080fd5b6131ca87828801612ef4565b925092505092959194509250565b6000806000604084860312156131ed57600080fd5b60006131fb86828701612eca565b935050602084013567ffffffffffffffff81111561321857600080fd5b61322486828701612ef4565b92509250509250925092565b60008060006040848603121561324557600080fd5b600061325386828701612eca565b935050602084013567ffffffffffffffff81111561327057600080fd5b61327c86828701612fa7565b92509250509250925092565b6000806000806000606086880312156132a057600080fd5b60006132ae88828901612eca565b955050602086013567ffffffffffffffff8111156132cb57600080fd5b6132d788828901612fa7565b9450945050604086013567ffffffffffffffff8111156132f657600080fd5b61330288828901612fa7565b92509250509295509295909350565b6000806040838503121561332457600080fd5b600061333285828601612eca565b925050602061334385828601613051565b9150509250929050565b60008060006060848603121561336257600080fd5b600061337086828701612eca565b935050602061338186828701613051565b925050604084013567ffffffffffffffff81111561339e57600080fd5b6133aa86828701612f3e565b9150509250925092565b6000602082840312156133c657600080fd5b60006133d484828501612edf565b91505092915050565b6000602082840312156133ef57600080fd5b60006133fd84828501612f92565b91505092915050565b6000806000806060858703121561341c57600080fd5b600061342a87828801612f92565b945050602085013567ffffffffffffffff81111561344757600080fd5b61345387828801612e80565b9350935050604061346687828801612e56565b91505092959194509250565b60006060828403121561348457600080fd5b600061349284828501612ff1565b91505092915050565b6134a4816147f5565b82525050565b6134b381614744565b82525050565b6134ca6134c582614744565b6148a3565b82525050565b6134d981614756565b82525050565b6134e881614762565b82525050565b6134ff6134fa82614762565b6148b5565b82525050565b6000613510826146c3565b61351a81856146d9565b935061352a818560208601614870565b613533816148db565b840191505092915050565b6000613549826146c3565b61355381856146ea565b9350613563818560208601614870565b80840191505092915050565b61357881614807565b82525050565b6135878161482b565b82525050565b600061359983856146f5565b93506135a6838584614861565b6135af836148db565b840190509392505050565b60006135c68385614706565b93506135d3838584614861565b82840190509392505050565b60006135ea826146ce565b6135f481856146f5565b9350613604818560208601614870565b61360d816148db565b840191505092915050565b6000613625601983614706565b91507f737570706f727473496e746572666163652862797465733429000000000000006000830152601982019050919050565b60006136656024836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f6465207265736f60008301527f6c766572000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006136cb6021836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f6465206f776e6560008301527f72000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006137316029836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c696420677561726469616e2060008301527f7369676e617475726500000000000000000000000000000000000000000000006020830152604082019050919050565b60006137976022836146f5565b91507f454e53436f6e74726f6c6c65723a206c6162656c20616c72656164792074616b60008301527f656e0000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006137fd601c83614706565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b600061383d6020836146f5565b91507f477561726465643a2063616e6e6f74206164642030783020677561726469616e6000830152602082019050919050565b600061387d602f836146f5565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b60006138e3600d83614706565b91507f61646472286279746573333229000000000000000000000000000000000000006000830152600d82019050919050565b6000613923601b836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f646500000000006000830152602082019050919050565b60006139636021836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520646f65736e2774206578697360008301527f74000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006139c96022836146f5565b91507f47617465776179526563697069656e743a20696e76616c6964206d73672e646160008301527f74610000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613a2f601483614706565b91507f7465787428627974657333322c737472696e67290000000000000000000000006000830152601482019050919050565b6000613a6f600d83614706565b91507f6e616d65286279746573333229000000000000000000000000000000000000006000830152600d82019050919050565b6000613aaf602b836146f5565b91507f454e53436f6e74726f6c6c65723a2063616c6c6572206973206e6f742074686560008301527f206e6f6465206f776e65720000000000000000000000000000000000000000006020830152604082019050919050565b6000613b156026836146f5565b91507f477561726465643a2074782e6f726967696e206973206e6f742074686520677560008301527f61726469616e00000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613b7b6026836146f5565b91507f454e53436f6e74726f6c6c65723a2063616e6e6f74207365742030783020726560008301527f67697374727900000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613be16025836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c7265616479207375626d60008301527f69747465640000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613c47600f83614706565b91507f7075626b657928627974657333322900000000000000000000000000000000006000830152600f82019050919050565b6000613c876022836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c7265616479206578697360008301527f74730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613ced6023836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c726561647920696e207360008301527f796e6300000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613d53601f836146f5565b91507f477561726465643a20677561726469616e20646f65736e2774206578697374006000830152602082019050919050565b6000613d936025836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c696420656e73206e6f64652060008301527f6f776e65720000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613df96020836146f5565b91507f477561726465643a20677561726469616e20616c7265616479206578697374736000830152602082019050919050565b6000613e39601b836146f5565b91507f477561726465643a2063616e6e6f742072656d6f76652073656c6600000000006000830152602082019050919050565b6000613e79601d836146f5565b91507f42797465734c69623a20696e76616c69642064617461206c656e6774680000006000830152602082019050919050565b6000613eb96037836146f5565b91507f454e5341627374726163745265736f6c7665723a20726576657274656420627960008301527f206f6e6c794e6f64654f776e6572206d6f6469666965720000000000000000006020830152604082019050919050565b6000613f1f601283614706565b91507f6164647228627974657333322c75696e742900000000000000000000000000006000830152601282019050919050565b6000613f5f6023836146f5565b91507f454e53436f6e74726f6c6c65723a20726567697374727920616c72656164792060008301527f73657400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b613fc1816147ca565b82525050565b613fd8613fd3826147ca565b6148d1565b82525050565b613fe7816147e8565b82525050565b6000613ff982866134b9565b60148201915061400982856134ee565b60208201915061401982846134ee565b602082019150819050949350505050565b600061403682856134ee565b60208201915061404682846134ee565b6020820191508190509392505050565b60006140638284866135ba565b91508190509392505050565b600061407a82613618565b9150819050919050565b600061408f826137f0565b915061409b82846134ee565b60208201915081905092915050565b60006140b5826138d6565b9150819050919050565b60006140ca82613a22565b9150819050919050565b60006140df82613a62565b9150819050919050565b60006140f482613c3a565b9150819050919050565b600061410982613f12565b9150819050919050565b600061411f8287613fc7565b60208201915061412f82866134b9565b60148201915061413f82856134ee565b60208201915061414f828461353e565b915081905095945050505050565b600060208201905061417260008301846134aa565b92915050565b600060208201905061418d600083018461349b565b92915050565b60006040820190506141a8600083018561349b565b6141b560208301846134aa565b9392505050565b60006020820190506141d160008301846134d0565b92915050565b60006020820190506141ec60008301846134df565b92915050565b600060408201905061420760008301856134df565b61421460208301846134aa565b9392505050565b600060408201905061423060008301856134df565b61423d60208301846134df565b9392505050565b600060a08201905061425960008301886134df565b61426660208301876134df565b61427360408301866134aa565b61428060608301856134aa565b61428d608083018461357e565b9695505050505050565b60006080820190506142ac60008301876134df565b6142b96020830186613fde565b6142c660408301856134df565b6142d360608301846134df565b95945050505050565b600060208201905081810360008301526142f68184613505565b905092915050565b6000602082019050614313600083018461356f565b92915050565b6000602082019050818103600083015261433481848661358d565b90509392505050565b6000602082019050818103600083015261435781846135df565b905092915050565b6000602082019050818103600083015261437881613658565b9050919050565b60006020820190508181036000830152614398816136be565b9050919050565b600060208201905081810360008301526143b881613724565b9050919050565b600060208201905081810360008301526143d88161378a565b9050919050565b600060208201905081810360008301526143f881613830565b9050919050565b6000602082019050818103600083015261441881613870565b9050919050565b6000602082019050818103600083015261443881613916565b9050919050565b6000602082019050818103600083015261445881613956565b9050919050565b60006020820190508181036000830152614478816139bc565b9050919050565b6000602082019050818103600083015261449881613aa2565b9050919050565b600060208201905081810360008301526144b881613b08565b9050919050565b600060208201905081810360008301526144d881613b6e565b9050919050565b600060208201905081810360008301526144f881613bd4565b9050919050565b6000602082019050818103600083015261451881613c7a565b9050919050565b6000602082019050818103600083015261453881613ce0565b9050919050565b6000602082019050818103600083015261455881613d46565b9050919050565b6000602082019050818103600083015261457881613d86565b9050919050565b6000602082019050818103600083015261459881613dec565b9050919050565b600060208201905081810360008301526145b881613e2c565b9050919050565b600060208201905081810360008301526145d881613e6c565b9050919050565b600060208201905081810360008301526145f881613eac565b9050919050565b6000602082019050818103600083015261461881613f52565b9050919050565b60006020820190506146346000830184613fb8565b92915050565b600060408201905061464f6000830185613fb8565b81810360208301526146618184613505565b90509392505050565b6000604051905081810181811067ffffffffffffffff8211171561468d57600080fd5b8060405250919050565b600067ffffffffffffffff8211156146ae57600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000808585111561472157600080fd5b8386111561472e57600080fd5b6001850283019150848603905094509492505050565b600061474f826147aa565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006147a382614744565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b60006148008261483d565b9050919050565b600061481282614819565b9050919050565b6000614824826147aa565b9050919050565b6000614836826147d4565b9050919050565b60006148488261484f565b9050919050565b600061485a826147aa565b9050919050565b82818337600083830152505050565b60005b8381101561488e578082015181840152602081019050614873565b8381111561489d576000848401525b50505050565b60006148ae826148bf565b9050919050565b6000819050919050565b60006148ca826148ec565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61490281614744565b811461490d57600080fd5b50565b61491981614762565b811461492457600080fd5b50565b6149308161476c565b811461493b57600080fd5b50565b61494781614798565b811461495257600080fd5b50565b61495e816147ca565b811461496957600080fd5b5056fea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101c45760003560e01c806371404156116100f9578063a91ee0dc11610097578063d0f710d611610071578063d0f710d614610512578063d5fa2b0014610542578063dc5b68a61461055e578063f1cb7e061461057a576101c4565b8063a91ee0dc146104a9578063c8690233146104c5578063c8cc2aee146104f6576101c4565b80637d0e0e7e116100d35780637d0e0e7e146104375780638b95dd71146104535780639a8a05921461046f578063a526d83b1461048d576101c4565b806371404156146103e157806377372213146103fd5780637b10399914610419576101c4565b8063392e53cd1161016657806355800f871161014057806355800f871461033557806359d1d43c14610351578063691f3431146103815780636df0cf42146103b1576101c4565b8063392e53cd146102cb5780633b3b57de146102e957806346386f7314610319576101c4565b8063116191b6116101a2578063116191b6146102455780631b3cd1421461026357806329ae6a7e1461029357806329cd62ea146102af576101c4565b806301ffc9a7146101c95780630c68ba21146101f957806310f13a8c14610229575b600080fd5b6101e360048036038101906101de91906133b4565b6105aa565b6040516101f091906141bc565b60405180910390f35b610213600480360381019061020e9190613066565b610834565b60405161022091906141bc565b60405180910390f35b610243600480360381019061023e9190613288565b610889565b005b61024d61096d565b60405161025a919061415d565b60405180910390f35b61027d600480360381019061027891906130b8565b610993565b60405161028a919061415d565b60405180910390f35b6102ad60048036038101906102a891906130b8565b6109c6565b005b6102c960048036038101906102c4919061311d565b610beb565b005b6102d3610cb3565b6040516102e091906141bc565b60405180910390f35b61030360048036038101906102fe91906130b8565b610d0b565b604051610310919061415d565b60405180910390f35b610333600480360381019061032e919061316c565b610d1d565b005b61034f600480360381019061034a91906130b8565b611017565b005b61036b60048036038101906103669190613230565b6112d8565b604051610378919061433d565b60405180910390f35b61039b600480360381019061039691906130b8565b6113ad565b6040516103a8919061433d565b60405180910390f35b6103cb60048036038101906103c69190613472565b611462565b6040516103d891906141d7565b60405180910390f35b6103fb60048036038101906103f69190613066565b611482565b005b61041760048036038101906104129190613230565b61169a565b005b610421611746565b60405161042e91906142fe565b60405180910390f35b610451600480360381019061044c91906130b8565b61176c565b005b61046d6004803603810190610468919061334d565b611a38565b005b610477611a92565b604051610484919061461f565b60405180910390f35b6104a760048036038101906104a29190613066565b611a98565b005b6104c360048036038101906104be91906133dd565b611b2f565b005b6104df60048036038101906104da91906130b8565b611d58565b6040516104ed92919061421b565b60405180910390f35b610510600480360381019061050b91906130b8565b611d92565b005b61052c600480360381019061052791906131d8565b6120a2565b60405161053991906141bc565b60405180910390f35b61055c600480360381019061055791906130e1565b6120fb565b005b61057860048036038101906105739190613406565b612153565b005b610594600480360381019061058f9190613311565b612366565b6040516105a191906142dc565b60405180910390f35b60006040516020016105bb9061406f565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061067d5750604051602001610626906140aa565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806106e95750604051602001610692906140fe565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061075557506040516020016106fe906140d4565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806107c1575060405160200161076a906140e9565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061082d57506040516020016107d6906140bf565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b846108938161242d565b6108d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c9906145df565b60405180910390fd5b82826007600089815260200190815260200160002087876040516108f7929190614056565b90815260200160405180910390209190610912929190612d39565b508484604051610923929190614056565b6040518091039020867fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a7550878760405161095d929190614319565b60405180910390a3505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60096020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006109d0612516565b90503073ffffffffffffffffffffffffffffffffffffffff166109f283612527565b73ffffffffffffffffffffffffffffffffffffffff1614610a48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3f9061443f565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ae9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae09061437f565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b0fc9c383836040518363ffffffff1660e01b8152600401610b469291906141f2565b600060405180830381600087803b158015610b6057600080fd5b505af1158015610b74573d6000803e3d6000fd5b505050506009600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690557f7803a16d95f9ca635bdec561006625e7444d8a9f8463866643cc03af011779d38282604051610bdf9291906141f2565b60405180910390a15050565b82610bf58161242d565b610c34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2b906145df565b60405180910390fd5b604051806040016040528084815260200183815250600660008681526020019081526020016000206000820151816000015560208201518160010155905050837f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e468484604051610ca592919061421b565b60405180910390a250505050565b60008073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b6000610d1682612527565b9050919050565b6000610d27612516565b90506000610d3682878761260c565b9050610d868185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612664565b610dc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dbc9061439f565b60405180910390fd5b60008686604051602001610dda92919061402a565b6040516020818303038152906040528051906020012090503073ffffffffffffffffffffffffffffffffffffffff16610e1288612527565b73ffffffffffffffffffffffffffffffffffffffff1614610e68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5f9061441f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16610e8982612527565b73ffffffffffffffffffffffffffffffffffffffff1614610edf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed6906143bf565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635ef2c7f08888303060006040518663ffffffff1660e01b8152600401610f43959493929190614244565b600060405180830381600087803b158015610f5d57600080fd5b505af1158015610f71573d6000803e3d6000fd5b50505050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b0fc9c382856040518363ffffffff1660e01b8152600401610fd29291906141f2565b600060405180830381600087803b158015610fec57600080fd5b505af1158015611000573d6000803e3d6000fd5b5050505061100e81846126d1565b50505050505050565b6000611021612516565b9050600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff1660e01b815260040161107e91906141d7565b60206040518083038186803b15801561109657600080fd5b505afa1580156110aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ce919061308f565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461113b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111329061447f565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf846040518263ffffffff1660e01b81526004016111ad91906141d7565b60206040518083038186803b1580156111c557600080fd5b505afa1580156111d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fd919061308f565b73ffffffffffffffffffffffffffffffffffffffff1614611253576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124a9061435f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1661127483612527565b73ffffffffffffffffffffffffffffffffffffffff16146112ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c19061451f565b60405180910390fd5b6112d482826126d1565b5050565b60606007600085815260200190815260200160002083836040516112fd929190614056565b90815260200160405180910390208054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561139f5780601f106113745761010080835404028352916020019161139f565b820191906000526020600020905b81548152906001019060200180831161138257829003601f168201915b505050505090509392505050565b6060600560008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156114565780601f1061142b57610100808354040283529160200191611456565b820191906000526020600020905b81548152906001019060200180831161143957829003601f168201915b50505050509050919050565b600061147b82600001518360200151846040015161260c565b9050919050565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661150d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115049061449f565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16141561157c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115739061459f565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611607576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fe9061453f565b60405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b328260405161168f929190614193565b60405180910390a150565b826116a48161242d565b6116e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116da906145df565b60405180910390fd5b8282600560008781526020019081526020016000209190611705929190612d39565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f78484604051611738929190614319565b60405180910390a250505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611776612516565b9050600073ffffffffffffffffffffffffffffffffffffffff1661179983612527565b73ffffffffffffffffffffffffffffffffffffffff16146117ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e6906144ff565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611891576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611888906144df565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b815260040161190391906141d7565b60206040518083038186803b15801561191b57600080fd5b505afa15801561192f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611953919061308f565b73ffffffffffffffffffffffffffffffffffffffff16146119a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a09061455f565b60405180910390fd5b806009600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fc1e082a8c26f27c26e1bf5d0ce7ddd579ec7f6d7eb3ea90d8abd6c40991bae368282604051611a2c9291906141f2565b60405180910390a15050565b82611a428161242d565b611a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a78906145df565b60405180910390fd5b611a8c8484846126e9565b50505050565b60025481565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611b23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b1a9061449f565b60405180910390fd5b611b2c816127ab565b50565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611bba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb19061449f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611c2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c21906144bf565b60405180910390fd5b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611cbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cb2906145ff565b60405180910390fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fdb0239c63d4033dcdd21bd44f8dd479a03efbae12f6bbe27c0a5f923d26514cc600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051611d4d919061415d565b60405180910390a150565b6000806006600084815260200190815260200160002060000154600660008581526020019081526020016000206001015491509150915091565b6000611d9c612516565b9050600073ffffffffffffffffffffffffffffffffffffffff16611dbf83612527565b73ffffffffffffffffffffffffffffffffffffffff1614611e15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e0c906144ff565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611eb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ead9061437f565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b8152600401611f2891906141d7565b60206040518083038186803b158015611f4057600080fd5b505afa158015611f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f78919061308f565b73ffffffffffffffffffffffffffffffffffffffff1614611fce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fc59061455f565b60405180910390fd5b611fd882306126d1565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a83306040518363ffffffff1660e01b81526004016120359291906141f2565b600060405180830381600087803b15801561204f57600080fd5b505af1158015612063573d6000803e3d6000fd5b505050507fcefbe9dbadcf675eef14e23810996ff38541fc26b4dd77cd6724b0eedc96f2008260405161209691906141d7565b60405180910390a15050565b60006120f28484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612664565b90509392505050565b816121058161242d565b612144576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161213b906145df565b60405180910390fd5b61214e83836126d1565b505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146121e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121da906143ff565b60405180910390fd5b6000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612295576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161228c906144bf565b60405180910390fd5b83600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612320838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061293a565b61232981612992565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516123589190614178565b60405180910390a150505050565b60606004600084815260200190815260200160002060008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124205780601f106123f557610100808354040283529160200191612420565b820191906000526020600020905b81548152906001019060200180831161240357829003601f168201915b5050505050905092915050565b6000612437612516565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004016124a891906141d7565b60206040518083038186803b1580156124c057600080fd5b505afa1580156124d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124f8919061308f565b73ffffffffffffffffffffffffffffffffffffffff16149050919050565b600061252260286129d6565b905090565b6000806060600460008581526020019081526020016000206000603c81526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125e55780601f106125ba576101008083540402835291602001916125e5565b820191906000526020600020905b8154815290600101906020018083116125c857829003601f168201915b50505050509050600081511115612602576125ff81612a6b565b91505b8192505050919050565b600061265b7f621363c539a3aa1024c8837ca1dc095db03b7f9512b3a95ecb429aae7fd953ed85858560405160200161264793929190613fed565b604051602081830303815290604052612a93565b90509392505050565b60008061267a8385612ad490919063ffffffff16565b90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b6126e582603c6126e084612b8f565b6126e9565b5050565b827f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af752838360405161271b92919061463a565b60405180910390a2603c82141561276d57827f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd261275783612a6b565b6040516127649190614178565b60405180910390a25b8060046000858152602001908152602001600020600084815260200190815260200160002090805190602001906127a5929190612db9565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561281b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612812906143df565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156128a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161289e9061457f565b60405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a328260405161292f929190614193565b60405180910390a150565b6000815114156129525761294d326127ab565b61298f565b60008151905060005b8181101561298c5761297f83828151811061297257fe5b60200260200101516127ab565b808060010191505061295b565b50505b50565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600090506129e5612bf6565b15612a5e576000836000369050039050612a5660003683906014850192612a0e93929190614711565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612ca3565b915050612a62565b3390505b80915050919050565b6000806014835114612a7c57600080fd5b600c6101000a602084015104905080915050919050565b6000612acc600254308585604051602001612ab19493929190614113565b60405160208183030381529060405280519060200120612d09565b905092915050565b60008060009050604183511415612b855760008060006020860151925060408601519150606086015160001a9050601b8160ff161015612b1557601b810190505b601b8160ff161480612b2a5750601c8160ff16145b15612b815760018782858560405160008152602001604052604051612b529493929190614297565b6020604051602081039080840390855afa158015612b74573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b606080601467ffffffffffffffff81118015612baa57600080fd5b506040519080825280601f01601f191660200182016040528015612bdd5781602001600182028036833780820191505090505b509050600c6101000a8302602082015280915050919050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415612c9c57602c60003690501015612c97576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c8e9061445f565b60405180910390fd5b600190505b8091505090565b6000806014835114612cea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ce1906145bf565b60405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b600081604051602001612d1c9190614084565b604051602081830303815290604052805190602001209050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612d7a57803560ff1916838001178555612da8565b82800160010185558215612da8579182015b82811115612da7578235825591602001919060010190612d8c565b5b509050612db59190612e39565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10612dfa57805160ff1916838001178555612e28565b82800160010185558215612e28579182015b82811115612e27578251825591602001919060010190612e0c565b5b509050612e359190612e39565b5090565b5b80821115612e52576000816000905550600101612e3a565b5090565b600081359050612e65816148f9565b92915050565b600081519050612e7a816148f9565b92915050565b60008083601f840112612e9257600080fd5b8235905067ffffffffffffffff811115612eab57600080fd5b602083019150836020820283011115612ec357600080fd5b9250929050565b600081359050612ed981614910565b92915050565b600081359050612eee81614927565b92915050565b60008083601f840112612f0657600080fd5b8235905067ffffffffffffffff811115612f1f57600080fd5b602083019150836001820283011115612f3757600080fd5b9250929050565b600082601f830112612f4f57600080fd5b8135612f62612f5d82614697565b61466a565b91508082526020830160208301858383011115612f7e57600080fd5b612f89838284614861565b50505092915050565b600081359050612fa18161493e565b92915050565b60008083601f840112612fb957600080fd5b8235905067ffffffffffffffff811115612fd257600080fd5b602083019150836001820283011115612fea57600080fd5b9250929050565b60006060828403121561300357600080fd5b61300d606061466a565b9050600061301d84828501612e56565b600083015250602061303184828501612eca565b602083015250604061304584828501612eca565b60408301525092915050565b60008135905061306081614955565b92915050565b60006020828403121561307857600080fd5b600061308684828501612e56565b91505092915050565b6000602082840312156130a157600080fd5b60006130af84828501612e6b565b91505092915050565b6000602082840312156130ca57600080fd5b60006130d884828501612eca565b91505092915050565b600080604083850312156130f457600080fd5b600061310285828601612eca565b925050602061311385828601612e56565b9150509250929050565b60008060006060848603121561313257600080fd5b600061314086828701612eca565b935050602061315186828701612eca565b925050604061316286828701612eca565b9150509250925092565b6000806000806060858703121561318257600080fd5b600061319087828801612eca565b94505060206131a187828801612eca565b935050604085013567ffffffffffffffff8111156131be57600080fd5b6131ca87828801612ef4565b925092505092959194509250565b6000806000604084860312156131ed57600080fd5b60006131fb86828701612eca565b935050602084013567ffffffffffffffff81111561321857600080fd5b61322486828701612ef4565b92509250509250925092565b60008060006040848603121561324557600080fd5b600061325386828701612eca565b935050602084013567ffffffffffffffff81111561327057600080fd5b61327c86828701612fa7565b92509250509250925092565b6000806000806000606086880312156132a057600080fd5b60006132ae88828901612eca565b955050602086013567ffffffffffffffff8111156132cb57600080fd5b6132d788828901612fa7565b9450945050604086013567ffffffffffffffff8111156132f657600080fd5b61330288828901612fa7565b92509250509295509295909350565b6000806040838503121561332457600080fd5b600061333285828601612eca565b925050602061334385828601613051565b9150509250929050565b60008060006060848603121561336257600080fd5b600061337086828701612eca565b935050602061338186828701613051565b925050604084013567ffffffffffffffff81111561339e57600080fd5b6133aa86828701612f3e565b9150509250925092565b6000602082840312156133c657600080fd5b60006133d484828501612edf565b91505092915050565b6000602082840312156133ef57600080fd5b60006133fd84828501612f92565b91505092915050565b6000806000806060858703121561341c57600080fd5b600061342a87828801612f92565b945050602085013567ffffffffffffffff81111561344757600080fd5b61345387828801612e80565b9350935050604061346687828801612e56565b91505092959194509250565b60006060828403121561348457600080fd5b600061349284828501612ff1565b91505092915050565b6134a4816147f5565b82525050565b6134b381614744565b82525050565b6134ca6134c582614744565b6148a3565b82525050565b6134d981614756565b82525050565b6134e881614762565b82525050565b6134ff6134fa82614762565b6148b5565b82525050565b6000613510826146c3565b61351a81856146d9565b935061352a818560208601614870565b613533816148db565b840191505092915050565b6000613549826146c3565b61355381856146ea565b9350613563818560208601614870565b80840191505092915050565b61357881614807565b82525050565b6135878161482b565b82525050565b600061359983856146f5565b93506135a6838584614861565b6135af836148db565b840190509392505050565b60006135c68385614706565b93506135d3838584614861565b82840190509392505050565b60006135ea826146ce565b6135f481856146f5565b9350613604818560208601614870565b61360d816148db565b840191505092915050565b6000613625601983614706565b91507f737570706f727473496e746572666163652862797465733429000000000000006000830152601982019050919050565b60006136656024836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f6465207265736f60008301527f6c766572000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006136cb6021836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f6465206f776e6560008301527f72000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006137316029836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c696420677561726469616e2060008301527f7369676e617475726500000000000000000000000000000000000000000000006020830152604082019050919050565b60006137976022836146f5565b91507f454e53436f6e74726f6c6c65723a206c6162656c20616c72656164792074616b60008301527f656e0000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006137fd601c83614706565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b600061383d6020836146f5565b91507f477561726465643a2063616e6e6f74206164642030783020677561726469616e6000830152602082019050919050565b600061387d602f836146f5565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b60006138e3600d83614706565b91507f61646472286279746573333229000000000000000000000000000000000000006000830152600d82019050919050565b6000613923601b836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f646500000000006000830152602082019050919050565b60006139636021836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520646f65736e2774206578697360008301527f74000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006139c96022836146f5565b91507f47617465776179526563697069656e743a20696e76616c6964206d73672e646160008301527f74610000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613a2f601483614706565b91507f7465787428627974657333322c737472696e67290000000000000000000000006000830152601482019050919050565b6000613a6f600d83614706565b91507f6e616d65286279746573333229000000000000000000000000000000000000006000830152600d82019050919050565b6000613aaf602b836146f5565b91507f454e53436f6e74726f6c6c65723a2063616c6c6572206973206e6f742074686560008301527f206e6f6465206f776e65720000000000000000000000000000000000000000006020830152604082019050919050565b6000613b156026836146f5565b91507f477561726465643a2074782e6f726967696e206973206e6f742074686520677560008301527f61726469616e00000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613b7b6026836146f5565b91507f454e53436f6e74726f6c6c65723a2063616e6e6f74207365742030783020726560008301527f67697374727900000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613be16025836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c7265616479207375626d60008301527f69747465640000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613c47600f83614706565b91507f7075626b657928627974657333322900000000000000000000000000000000006000830152600f82019050919050565b6000613c876022836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c7265616479206578697360008301527f74730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613ced6023836146f5565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c726561647920696e207360008301527f796e6300000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613d53601f836146f5565b91507f477561726465643a20677561726469616e20646f65736e2774206578697374006000830152602082019050919050565b6000613d936025836146f5565b91507f454e53436f6e74726f6c6c65723a20696e76616c696420656e73206e6f64652060008301527f6f776e65720000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613df96020836146f5565b91507f477561726465643a20677561726469616e20616c7265616479206578697374736000830152602082019050919050565b6000613e39601b836146f5565b91507f477561726465643a2063616e6e6f742072656d6f76652073656c6600000000006000830152602082019050919050565b6000613e79601d836146f5565b91507f42797465734c69623a20696e76616c69642064617461206c656e6774680000006000830152602082019050919050565b6000613eb96037836146f5565b91507f454e5341627374726163745265736f6c7665723a20726576657274656420627960008301527f206f6e6c794e6f64654f776e6572206d6f6469666965720000000000000000006020830152604082019050919050565b6000613f1f601283614706565b91507f6164647228627974657333322c75696e742900000000000000000000000000006000830152601282019050919050565b6000613f5f6023836146f5565b91507f454e53436f6e74726f6c6c65723a20726567697374727920616c72656164792060008301527f73657400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b613fc1816147ca565b82525050565b613fd8613fd3826147ca565b6148d1565b82525050565b613fe7816147e8565b82525050565b6000613ff982866134b9565b60148201915061400982856134ee565b60208201915061401982846134ee565b602082019150819050949350505050565b600061403682856134ee565b60208201915061404682846134ee565b6020820191508190509392505050565b60006140638284866135ba565b91508190509392505050565b600061407a82613618565b9150819050919050565b600061408f826137f0565b915061409b82846134ee565b60208201915081905092915050565b60006140b5826138d6565b9150819050919050565b60006140ca82613a22565b9150819050919050565b60006140df82613a62565b9150819050919050565b60006140f482613c3a565b9150819050919050565b600061410982613f12565b9150819050919050565b600061411f8287613fc7565b60208201915061412f82866134b9565b60148201915061413f82856134ee565b60208201915061414f828461353e565b915081905095945050505050565b600060208201905061417260008301846134aa565b92915050565b600060208201905061418d600083018461349b565b92915050565b60006040820190506141a8600083018561349b565b6141b560208301846134aa565b9392505050565b60006020820190506141d160008301846134d0565b92915050565b60006020820190506141ec60008301846134df565b92915050565b600060408201905061420760008301856134df565b61421460208301846134aa565b9392505050565b600060408201905061423060008301856134df565b61423d60208301846134df565b9392505050565b600060a08201905061425960008301886134df565b61426660208301876134df565b61427360408301866134aa565b61428060608301856134aa565b61428d608083018461357e565b9695505050505050565b60006080820190506142ac60008301876134df565b6142b96020830186613fde565b6142c660408301856134df565b6142d360608301846134df565b95945050505050565b600060208201905081810360008301526142f68184613505565b905092915050565b6000602082019050614313600083018461356f565b92915050565b6000602082019050818103600083015261433481848661358d565b90509392505050565b6000602082019050818103600083015261435781846135df565b905092915050565b6000602082019050818103600083015261437881613658565b9050919050565b60006020820190508181036000830152614398816136be565b9050919050565b600060208201905081810360008301526143b881613724565b9050919050565b600060208201905081810360008301526143d88161378a565b9050919050565b600060208201905081810360008301526143f881613830565b9050919050565b6000602082019050818103600083015261441881613870565b9050919050565b6000602082019050818103600083015261443881613916565b9050919050565b6000602082019050818103600083015261445881613956565b9050919050565b60006020820190508181036000830152614478816139bc565b9050919050565b6000602082019050818103600083015261449881613aa2565b9050919050565b600060208201905081810360008301526144b881613b08565b9050919050565b600060208201905081810360008301526144d881613b6e565b9050919050565b600060208201905081810360008301526144f881613bd4565b9050919050565b6000602082019050818103600083015261451881613c7a565b9050919050565b6000602082019050818103600083015261453881613ce0565b9050919050565b6000602082019050818103600083015261455881613d46565b9050919050565b6000602082019050818103600083015261457881613d86565b9050919050565b6000602082019050818103600083015261459881613dec565b9050919050565b600060208201905081810360008301526145b881613e2c565b9050919050565b600060208201905081810360008301526145d881613e6c565b9050919050565b600060208201905081810360008301526145f881613eac565b9050919050565b6000602082019050818103600083015261461881613f52565b9050919050565b60006020820190506146346000830184613fb8565b92915050565b600060408201905061464f6000830185613fb8565b81810360208301526146618184613505565b90509392505050565b6000604051905081810181811067ffffffffffffffff8211171561468d57600080fd5b8060405250919050565b600067ffffffffffffffff8211156146ae57600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000808585111561472157600080fd5b8386111561472e57600080fd5b6001850283019150848603905094509492505050565b600061474f826147aa565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60006147a382614744565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b60006148008261483d565b9050919050565b600061481282614819565b9050919050565b6000614824826147aa565b9050919050565b6000614836826147d4565b9050919050565b60006148488261484f565b9050919050565b600061485a826147aa565b9050919050565b82818337600083830152505050565b60005b8381101561488e578082015181840152602081019050614873565b8381111561489d576000848401525b50505050565b60006148ae826148bf565b9050919050565b6000819050919050565b60006148ca826148ec565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61490281614744565b811461490d57600080fd5b50565b61491981614762565b811461492457600080fd5b50565b6149308161476c565b811461493b57600080fd5b50565b61494781614798565b811461495257600080fd5b50565b61495e816147ca565b811461496957600080fd5b5056fea164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "details": "The process of adding root node consists of 3 steps: 1. `submitNode` - should be called from ENS node owner, 2. Change ENS node owner in ENS registry to ENS controller, 3. `verifyNode` - should be called from previous ENS node owner, To register sub node, `msg.sender` need to send valid signature from one of guardian key. Once registration is complete `msg.sender` becoming both node owner and `addr` record value. After registration sub node cannot be replaced.", + "events": { + "NodeReleased(bytes32,address)": { + "details": "Emitted when new node is released", + "params": { + "node": "node name hash", + "owner": "owner address" + } + }, + "NodeSubmitted(bytes32,address)": { + "details": "Emitted when new node is submitted", + "params": { + "node": "node name hash", + "owner": "owner address" + } + }, + "NodeVerified(bytes32)": { + "details": "Emitted when the existing owner is verified", + "params": { + "node": "node name hash" + } + }, + "RegistryChanged(address)": { + "details": "Emitted when ENS registry address is changed", + "params": { + "registry": "registry address" + } + } + }, + "kind": "dev", + "methods": { + "addGuardian(address)": { + "params": { + "guardian": "guardian address" + } + }, + "constructor": { + "details": "Public constructor" + }, + "hashSubNodeRegistration((address,bytes32,bytes32))": { + "params": { + "subNodeRegistration": "struct" + }, + "returns": { + "_0": "hash" + } + }, + "initialize(address,address[],address)": { + "params": { + "gateway_": "gateway address", + "registry_": "ENS registry address" + } + }, + "isGuardian(address)": { + "params": { + "guardian": "guardian address" + }, + "returns": { + "_0": "true when guardian exists" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + }, + "registerSubNode(bytes32,bytes32,bytes)": { + "params": { + "guardianSignature": "guardian signature", + "label": "label hash", + "node": "node name hash" + } + }, + "releaseNode(bytes32)": { + "details": "Should be called from the previous ENS node owner", + "params": { + "node": "node name hash" + } + }, + "removeGuardian(address)": { + "params": { + "guardian": "guardian address" + } + }, + "setRegistry(address)": { + "params": { + "registry_": "registry address" + } + }, + "submitNode(bytes32)": { + "details": "Should be called from the current ENS node owner", + "params": { + "node": "node name hash" + } + }, + "syncAddr(bytes32)": { + "params": { + "node": "node name hash" + } + }, + "verifyGuardianSignature(bytes32,bytes)": { + "params": { + "messageHash": "message hash", + "signature": "signature" + }, + "returns": { + "_0": "true on correct guardian signature" + } + }, + "verifyNode(bytes32)": { + "details": "Should be called from the previous ENS node owner", + "params": { + "node": "node name hash" + } + } + }, + "title": "ENS controller", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addGuardian(address)": { + "notice": "Adds a new guardian" + }, + "hashSubNodeRegistration((address,bytes32,bytes32))": { + "notice": "Hashes `SubNodeRegistration` message payload" + }, + "initialize(address,address[],address)": { + "notice": "Initializes `ENSController` contract" + }, + "isGuardian(address)": { + "notice": "Check if guardian exists" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + }, + "registerSubNode(bytes32,bytes32,bytes)": { + "notice": "Registers sub node" + }, + "releaseNode(bytes32)": { + "notice": "Releases node" + }, + "removeGuardian(address)": { + "notice": "Removes the existing guardian" + }, + "setRegistry(address)": { + "notice": "Sets registry" + }, + "submitNode(bytes32)": { + "notice": "Submits node" + }, + "syncAddr(bytes32)": { + "notice": "Sync address" + }, + "verifyGuardianSignature(bytes32,bytes)": { + "notice": "Verifies guardian signature" + }, + "verifyNode(bytes32)": { + "notice": "Verifies node" + } + }, + "notice": "ENS subnode registrar", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 40, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "guardians", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 1871, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "initializer", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1935, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "chainId", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 5197, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "gateway", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 3850, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "resolverAddresses", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_bytes32,t_mapping(t_uint256,t_bytes_storage))" + }, + { + "astId": 4073, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "resolverNames", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_bytes32,t_string_storage)" + }, + { + "astId": 4140, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "resolverPubKeys", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_bytes32,t_struct(PubKey)4136_storage)" + }, + { + "astId": 4220, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "resolverTexts", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_string_storage))" + }, + { + "astId": 2388, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "registry", + "offset": 0, + "slot": "8", + "type": "t_contract(ENSRegistry)3564" + }, + { + "astId": 2392, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "nodeOwners", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_bytes32,t_address)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(ENSRegistry)3564": { + "encoding": "inplace", + "label": "contract ENSRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_bytes32,t_address)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_string_storage))": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => mapping(string => string))", + "numberOfBytes": "32", + "value": "t_mapping(t_string_memory_ptr,t_string_storage)" + }, + "t_mapping(t_bytes32,t_mapping(t_uint256,t_bytes_storage))": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => mapping(uint256 => bytes))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_bytes_storage)" + }, + "t_mapping(t_bytes32,t_string_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_bytes32,t_struct(PubKey)4136_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct ENSPubKeyResolver.PubKey)", + "numberOfBytes": "32", + "value": "t_struct(PubKey)4136_storage" + }, + "t_mapping(t_string_memory_ptr,t_string_storage)": { + "encoding": "mapping", + "key": "t_string_memory_ptr", + "label": "mapping(string => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_uint256,t_bytes_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes)", + "numberOfBytes": "32", + "value": "t_bytes_storage" + }, + "t_string_memory_ptr": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(PubKey)4136_storage": { + "encoding": "inplace", + "label": "struct ENSPubKeyResolver.PubKey", + "members": [ + { + "astId": 4133, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "x", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 4135, + "contract": "src/ens/ENSController.sol:ENSController", + "label": "y", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/ENSHelper.json b/deployments/fuseSparknet/ENSHelper.json new file mode 100644 index 00000000..fa6191f7 --- /dev/null +++ b/deployments/fuseSparknet/ENSHelper.json @@ -0,0 +1,208 @@ +{ + "address": "0xF330b17e19474762E6F408D7dCf0327264d4A2C0", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "nodes", + "type": "bytes32[]" + } + ], + "name": "getAddresses", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "nodes", + "type": "bytes32[]" + } + ], + "name": "getNames", + "outputs": [ + { + "internalType": "string[]", + "name": "", + "type": "string[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ENSRegistry", + "name": "registry_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract ENSRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x6db86ba1be399c574ea44d3ce3b36f9759d97db6875c1e2519667ab946b6e240", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "876395", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x37bade1e63cbf3624a6f5dc5d1d6980b8d5a31dea646d3921d3a1f184cb8ee7f", + "transactionHash": "0x6db86ba1be399c574ea44d3ce3b36f9759d97db6875c1e2519667ab946b6e240", + "logs": [], + "blockNumber": 5497460, + "cumulativeGasUsed": "876395", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"}],\"name\":\"getAddresses\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"nodes\",\"type\":\"bytes32[]\"}],\"name\":\"getNames\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ENSRegistry\",\"name\":\"registry_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract ENSRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Public constructor\"},\"getAddresses(bytes32[])\":{\"params\":{\"nodes\":\"array of nodes\"},\"returns\":{\"_0\":\"nodes addresses\"}},\"getNames(bytes32[])\":{\"params\":{\"nodes\":\"array of nodes\"},\"returns\":{\"_0\":\"nodes names\"}},\"initialize(address)\":{\"params\":{\"registry_\":\"ENS registry address\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}}},\"title\":\"ENS helper\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getAddresses(bytes32[])\":{\"notice\":\"Gets nodes addresses\"},\"getNames(bytes32[])\":{\"notice\":\"Gets nodes names\"},\"initialize(address)\":{\"notice\":\"Initializes `ENSLookupHelper` contract\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ens/ENSHelper.sol\":\"ENSHelper\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/ens/ENSHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"./resolvers/ENSAddressResolver.sol\\\";\\nimport \\\"./resolvers/ENSNameResolver.sol\\\";\\nimport \\\"./ENSRegistry.sol\\\";\\n\\n/**\\n * @title ENS helper\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract ENSHelper is Initializable {\\n ENSRegistry public registry;\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Initializable() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `ENSLookupHelper` contract\\n * @param registry_ ENS registry address\\n */\\n function initialize(\\n ENSRegistry registry_\\n )\\n external\\n onlyInitializer\\n {\\n registry = registry_;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Gets nodes addresses\\n * @param nodes array of nodes\\n * @return nodes addresses\\n */\\n function getAddresses(\\n bytes32[] memory nodes\\n )\\n external\\n view\\n returns (address[] memory)\\n {\\n uint nodesLen = nodes.length;\\n address[] memory result = new address[](nodesLen);\\n\\n for (uint i = 0; i < nodesLen; i++) {\\n result[i] = _getAddress(nodes[i]);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @notice Gets nodes names\\n * @param nodes array of nodes\\n * @return nodes names\\n */\\n function getNames(\\n bytes32[] memory nodes\\n )\\n external\\n view\\n returns (string[] memory)\\n {\\n uint nodesLen = nodes.length;\\n string[] memory result = new string[](nodesLen);\\n\\n for (uint i = 0; i < nodesLen; i++) {\\n result[i] = _getName(nodes[i]);\\n }\\n\\n return result;\\n }\\n\\n // private functions (views)\\n\\n function _getAddress(\\n bytes32 node\\n )\\n private\\n view\\n returns (address)\\n {\\n address result;\\n address resolver = registry.resolver(node);\\n\\n if (resolver != address(0)) {\\n try ENSAddressResolver(resolver).addr(node) returns (address addr) {\\n result = addr;\\n } catch {\\n //\\n }\\n }\\n\\n return result;\\n }\\n\\n function _getName(\\n bytes32 node\\n )\\n private\\n view\\n returns (string memory)\\n {\\n string memory result;\\n address resolver = registry.resolver(node);\\n\\n if (resolver != address(0)) {\\n try ENSNameResolver(resolver).name(node) returns (string memory name) {\\n result = name;\\n } catch {\\n //\\n }\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x38b9f6686c97eef1da7a015817b47f335fec507c30d4f22101d850908805e43f\",\"license\":\"MIT\"},\"src/ens/ENSRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ENS registry\\n *\\n * @dev Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ENSRegistry.sol\\n */\\ncontract ENSRegistry {\\n struct Record {\\n address owner;\\n address resolver;\\n uint64 ttl;\\n }\\n\\n mapping (bytes32 => Record) private records;\\n mapping (address => mapping(address => bool)) private operators;\\n\\n // events\\n\\n event NewOwner(\\n bytes32 indexed node,\\n bytes32 indexed label,\\n address owner\\n );\\n\\n event Transfer(\\n bytes32 indexed node,\\n address owner\\n );\\n\\n event NewResolver(\\n bytes32 indexed node,\\n address resolver\\n );\\n\\n event NewTTL(\\n bytes32 indexed node,\\n uint64 ttl\\n );\\n\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n // modifiers\\n\\n modifier authorised(\\n bytes32 node\\n )\\n {\\n address owner = records[node].owner;\\n\\n require(\\n owner == msg.sender || operators[owner][msg.sender],\\n \\\"ENSRegistry: reverted by authorised modifier\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor()\\n public\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n records[0x0].owner = tx.origin;\\n }\\n\\n // external functions\\n\\n function setRecord(\\n bytes32 node,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n setOwner(node, owner_);\\n\\n _setResolverAndTTL(node, resolver_, ttl_);\\n }\\n\\n function setTTL(\\n bytes32 node,\\n uint64 ttl_\\n )\\n external\\n authorised(node)\\n {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n bytes32 subNode = setSubnodeOwner(node, label, owner_);\\n\\n _setResolverAndTTL(subNode, resolver_, ttl_);\\n }\\n\\n function setApprovalForAll(\\n address operator,\\n bool approved\\n )\\n external\\n {\\n operators[msg.sender][operator] = approved;\\n\\n emit ApprovalForAll(\\n msg.sender,\\n operator,\\n approved\\n );\\n }\\n\\n // external functions (views)\\n\\n function owner(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n address addr = records[node].owner;\\n\\n if (addr == address(this)) {\\n return address(0x0);\\n }\\n\\n return addr;\\n }\\n\\n function resolver(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n return records[node].resolver;\\n }\\n\\n function ttl(\\n bytes32 node\\n )\\n external\\n view\\n returns (uint64)\\n {\\n return records[node].ttl;\\n }\\n\\n function recordExists(\\n bytes32 node\\n )\\n external\\n view\\n returns (bool)\\n {\\n return records[node].owner != address(0x0);\\n }\\n\\n function isApprovedForAll(\\n address owner_,\\n address operator\\n )\\n external\\n view\\n returns (bool)\\n {\\n return operators[owner_][operator];\\n }\\n\\n // public functions\\n\\n function setOwner(\\n bytes32 node,\\n address owner_\\n )\\n public\\n authorised(node)\\n {\\n records[node].owner = owner_;\\n\\n emit Transfer(node, owner_);\\n }\\n\\n function setResolver(\\n bytes32 node,\\n address resolver_\\n )\\n public\\n authorised(node)\\n {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner_\\n )\\n public\\n authorised(node)\\n returns(bytes32)\\n {\\n bytes32 subNode = keccak256(abi.encodePacked(node, label));\\n\\n records[subNode].owner = owner_;\\n\\n emit NewOwner(node, label, owner_);\\n\\n return subNode;\\n }\\n\\n // private functions\\n\\n function _setResolverAndTTL(\\n bytes32 node,\\n address resolver_,\\n uint64 ttl_\\n )\\n private\\n {\\n if (resolver_ != records[node].resolver) {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n if (ttl_ != records[node].ttl) {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe00dbdea09d17d41c2c14266e6e1b6b95938c0d374b266bb44a91cfcf0495612\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSAbstractResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ENS abstract resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/ResolverBase.sol\\n */\\nabstract contract ENSAbstractResolver {\\n // modifiers\\n\\n modifier onlyNodeOwner(bytes32 node)\\n {\\n require(\\n _isNodeOwner(node),\\n \\\"ENSAbstractResolver: reverted by onlyNodeOwner modifier\\\"\\n );\\n\\n _;\\n }\\n\\n // internal functions (views)\\n\\n function _isNodeOwner(\\n bytes32 node\\n )\\n internal\\n virtual\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xc67d8bdd4904684e5d3388f7ca7d18c7d407058d6b548d8c591404c758a1ac60\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSAddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./ENSAbstractResolver.sol\\\";\\n\\n\\n/**\\n * @title ENS abstract address resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/AddrResolver.sol\\n */\\nabstract contract ENSAddressResolver is ENSAbstractResolver {\\n bytes4 internal constant INTERFACE_ADDR_ID = bytes4(keccak256(abi.encodePacked(\\\"addr(bytes32)\\\")));\\n bytes4 internal constant INTERFACE_ADDRESS_ID = bytes4(keccak256(abi.encodePacked(\\\"addr(bytes32,uint)\\\")));\\n\\n uint internal constant COIN_TYPE_ETH = 60;\\n\\n mapping(bytes32 => mapping(uint => bytes)) internal resolverAddresses;\\n\\n // events\\n\\n event AddrChanged(\\n bytes32 indexed node,\\n address addr\\n );\\n\\n event AddressChanged(\\n bytes32 indexed node,\\n uint coinType,\\n bytes newAddress\\n );\\n\\n // external functions\\n\\n function setAddr(\\n bytes32 node,\\n address addr_\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n _setAddr(node, addr_);\\n }\\n\\n function setAddr(\\n bytes32 node,\\n uint coinType,\\n bytes memory addr_\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n _setAddr(node, coinType, addr_);\\n }\\n\\n // external functions (views)\\n\\n function addr(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n return _addr(node);\\n }\\n\\n function addr(\\n bytes32 node,\\n uint coinType\\n )\\n external\\n view\\n returns (bytes memory)\\n {\\n return resolverAddresses[node][coinType];\\n }\\n\\n // internal functions\\n\\n function _setAddr(\\n bytes32 node,\\n address addr_\\n )\\n internal\\n {\\n _setAddr(node, COIN_TYPE_ETH, _addressToBytes(addr_));\\n }\\n\\n function _setAddr(\\n bytes32 node,\\n uint coinType,\\n bytes memory addr_\\n )\\n internal\\n {\\n emit AddressChanged(node, coinType, addr_);\\n\\n if(coinType == COIN_TYPE_ETH) {\\n emit AddrChanged(node, _bytesToAddress(addr_));\\n }\\n\\n resolverAddresses[node][coinType] = addr_;\\n }\\n\\n // internal functions (views)\\n\\n function _addr(\\n bytes32 node\\n )\\n internal\\n view\\n returns (address)\\n {\\n address result;\\n\\n bytes memory addr_ = resolverAddresses[node][COIN_TYPE_ETH];\\n\\n if (addr_.length > 0) {\\n result = _bytesToAddress(addr_);\\n }\\n\\n return result;\\n }\\n\\n // private function (pure)\\n\\n function _bytesToAddress(\\n bytes memory data\\n )\\n private\\n pure\\n returns(address payable)\\n {\\n address payable result;\\n\\n require(data.length == 20);\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := div(mload(add(data, 32)), exp(256, 12))\\n }\\n\\n return result;\\n }\\n\\n function _addressToBytes(\\n address addr_\\n )\\n private\\n pure\\n returns(bytes memory)\\n {\\n bytes memory result = new bytes(20);\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n mstore(add(result, 32), mul(addr_, exp(256, 12)))\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xd2f0c5ed5f5058755512c0916496da6bcf4cf18a0026ee8d20b4306656ce5142\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSNameResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./ENSAbstractResolver.sol\\\";\\n\\n\\n/**\\n * @title ENS abstract name resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/NameResolver.sol\\n */\\nabstract contract ENSNameResolver is ENSAbstractResolver {\\n bytes4 internal constant INTERFACE_NAME_ID = bytes4(keccak256(abi.encodePacked(\\\"name(bytes32)\\\")));\\n\\n mapping(bytes32 => string) internal resolverNames;\\n\\n // events\\n\\n event NameChanged(\\n bytes32 indexed node,\\n string name\\n );\\n\\n // external functions\\n\\n function setName(\\n bytes32 node,\\n string calldata name\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n resolverNames[node] = name;\\n\\n emit NameChanged(node, name);\\n }\\n\\n // external functions (views)\\n\\n function name(\\n bytes32 node\\n )\\n external\\n view\\n returns (string memory)\\n {\\n return resolverNames[node];\\n }\\n}\\n\",\"keccak256\":\"0x1d2d4b21f59225fbefe0e5aaff87aff8f11afe5281745934d595e15770557ead\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610e74806100606000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806338bc01b51461005c578063392e53cd1461008c5780637b103999146100aa578063c4d66de8146100c8578063dc6008e2146100e4575b600080fd5b610076600480360381019061007191906108a6565b610114565b6040516100839190610b55565b60405180910390f35b6100946101ec565b6040516100a19190610b99565b60405180910390f35b6100b2610242565b6040516100bf9190610bcf565b60405180910390f35b6100e260048036038101906100dd91906108e7565b610268565b005b6100fe60048036038101906100f991906108a6565b6103b2565b60405161010b9190610b77565b60405180910390f35b606060008251905060608167ffffffffffffffff8111801561013557600080fd5b506040519080825280602002602001820160405280156101645781602001602082028036833780820191505090505b50905060005b828110156101e15761018e85828151811061018157fe5b6020026020010151610460565b82828151811061019a57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808060010191505061016a565b508092505050919050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146102f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ed90610bea565b60405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516103a79190610b3a565b60405180910390a150565b606060008251905060608167ffffffffffffffff811180156103d357600080fd5b5060405190808252806020026020018201604052801561040757816020015b60608152602001906001900390816103f25790505b50905060005b828110156104555761043185828151811061042457fe5b60200260200101516105e1565b82828151811061043d57fe5b6020026020010181905250808060010191505061040d565b508092505050919050565b6000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf856040518263ffffffff1660e01b81526004016104c09190610bb4565b60206040518083038186803b1580156104d857600080fd5b505afa1580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610510919061087d565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105d7578073ffffffffffffffffffffffffffffffffffffffff16633b3b57de856040518263ffffffff1660e01b815260040161057f9190610bb4565b60206040518083038186803b15801561059757600080fd5b505afa9250505080156105c857506040513d601f19601f820116820180604052508101906105c5919061087d565b60015b6105d1576105d6565b809250505b5b8192505050919050565b6060806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf856040518263ffffffff1660e01b81526004016106419190610bb4565b60206040518083038186803b15801561065957600080fd5b505afa15801561066d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610691919061087d565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461075d578073ffffffffffffffffffffffffffffffffffffffff1663691f3431856040518263ffffffff1660e01b81526004016107009190610bb4565b60006040518083038186803b15801561071857600080fd5b505afa92505050801561074e57506040513d6000823e3d601f19601f8201168201806040525081019061074b9190610910565b60015b6107575761075c565b809250505b5b8192505050919050565b60008151905061077681610e22565b92915050565b600082601f83011261078d57600080fd5b81356107a061079b82610c37565b610c0a565b915081818352602084019350602081019050838560208402820111156107c557600080fd5b60005b838110156107f557816107db88826107ff565b8452602084019350602083019250506001810190506107c8565b5050505092915050565b60008135905061080e81610e39565b92915050565b60008135905061082381610e50565b92915050565b600082601f83011261083a57600080fd5b815161084d61084882610c5f565b610c0a565b9150808252602083016020830185838301111561086957600080fd5b610874838284610dde565b50505092915050565b60006020828403121561088f57600080fd5b600061089d84828501610767565b91505092915050565b6000602082840312156108b857600080fd5b600082013567ffffffffffffffff8111156108d257600080fd5b6108de8482850161077c565b91505092915050565b6000602082840312156108f957600080fd5b600061090784828501610814565b91505092915050565b60006020828403121561092257600080fd5b600082015167ffffffffffffffff81111561093c57600080fd5b61094884828501610829565b91505092915050565b600061095d838361098c565b60208301905092915050565b60006109758383610a9b565b905092915050565b61098681610d84565b82525050565b61099581610d2a565b82525050565b60006109a682610cab565b6109b08185610ce6565b93506109bb83610c8b565b8060005b838110156109ec5781516109d38882610951565b97506109de83610ccc565b9250506001810190506109bf565b5085935050505092915050565b6000610a0482610cb6565b610a0e8185610cf7565b935083602082028501610a2085610c9b565b8060005b85811015610a5c5784840389528151610a3d8582610969565b9450610a4883610cd9565b925060208a01995050600181019050610a24565b50829750879550505050505092915050565b610a7781610d3c565b82525050565b610a8681610d48565b82525050565b610a9581610d96565b82525050565b6000610aa682610cc1565b610ab08185610d08565b9350610ac0818560208601610dde565b610ac981610e11565b840191505092915050565b6000610ae1602f83610d19565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b6000602082019050610b4f600083018461097d565b92915050565b60006020820190508181036000830152610b6f818461099b565b905092915050565b60006020820190508181036000830152610b9181846109f9565b905092915050565b6000602082019050610bae6000830184610a6e565b92915050565b6000602082019050610bc96000830184610a7d565b92915050565b6000602082019050610be46000830184610a8c565b92915050565b60006020820190508181036000830152610c0381610ad4565b9050919050565b6000604051905081810181811067ffffffffffffffff82111715610c2d57600080fd5b8060405250919050565b600067ffffffffffffffff821115610c4e57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115610c7657600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610d3582610d64565b9050919050565b60008115159050919050565b6000819050919050565b6000610d5d82610d2a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610d8f82610dba565b9050919050565b6000610da182610da8565b9050919050565b6000610db382610d64565b9050919050565b6000610dc582610dcc565b9050919050565b6000610dd782610d64565b9050919050565b60005b83811015610dfc578082015181840152602081019050610de1565b83811115610e0b576000848401525b50505050565b6000601f19601f8301169050919050565b610e2b81610d2a565b8114610e3657600080fd5b50565b610e4281610d48565b8114610e4d57600080fd5b50565b610e5981610d52565b8114610e6457600080fd5b5056fea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100575760003560e01c806338bc01b51461005c578063392e53cd1461008c5780637b103999146100aa578063c4d66de8146100c8578063dc6008e2146100e4575b600080fd5b610076600480360381019061007191906108a6565b610114565b6040516100839190610b55565b60405180910390f35b6100946101ec565b6040516100a19190610b99565b60405180910390f35b6100b2610242565b6040516100bf9190610bcf565b60405180910390f35b6100e260048036038101906100dd91906108e7565b610268565b005b6100fe60048036038101906100f991906108a6565b6103b2565b60405161010b9190610b77565b60405180910390f35b606060008251905060608167ffffffffffffffff8111801561013557600080fd5b506040519080825280602002602001820160405280156101645781602001602082028036833780820191505090505b50905060005b828110156101e15761018e85828151811061018157fe5b6020026020010151610460565b82828151811061019a57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808060010191505061016a565b508092505050919050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146102f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102ed90610bea565b60405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516103a79190610b3a565b60405180910390a150565b606060008251905060608167ffffffffffffffff811180156103d357600080fd5b5060405190808252806020026020018201604052801561040757816020015b60608152602001906001900390816103f25790505b50905060005b828110156104555761043185828151811061042457fe5b60200260200101516105e1565b82828151811061043d57fe5b6020026020010181905250808060010191505061040d565b508092505050919050565b6000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf856040518263ffffffff1660e01b81526004016104c09190610bb4565b60206040518083038186803b1580156104d857600080fd5b505afa1580156104ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610510919061087d565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146105d7578073ffffffffffffffffffffffffffffffffffffffff16633b3b57de856040518263ffffffff1660e01b815260040161057f9190610bb4565b60206040518083038186803b15801561059757600080fd5b505afa9250505080156105c857506040513d601f19601f820116820180604052508101906105c5919061087d565b60015b6105d1576105d6565b809250505b5b8192505050919050565b6060806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf856040518263ffffffff1660e01b81526004016106419190610bb4565b60206040518083038186803b15801561065957600080fd5b505afa15801561066d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610691919061087d565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461075d578073ffffffffffffffffffffffffffffffffffffffff1663691f3431856040518263ffffffff1660e01b81526004016107009190610bb4565b60006040518083038186803b15801561071857600080fd5b505afa92505050801561074e57506040513d6000823e3d601f19601f8201168201806040525081019061074b9190610910565b60015b6107575761075c565b809250505b5b8192505050919050565b60008151905061077681610e22565b92915050565b600082601f83011261078d57600080fd5b81356107a061079b82610c37565b610c0a565b915081818352602084019350602081019050838560208402820111156107c557600080fd5b60005b838110156107f557816107db88826107ff565b8452602084019350602083019250506001810190506107c8565b5050505092915050565b60008135905061080e81610e39565b92915050565b60008135905061082381610e50565b92915050565b600082601f83011261083a57600080fd5b815161084d61084882610c5f565b610c0a565b9150808252602083016020830185838301111561086957600080fd5b610874838284610dde565b50505092915050565b60006020828403121561088f57600080fd5b600061089d84828501610767565b91505092915050565b6000602082840312156108b857600080fd5b600082013567ffffffffffffffff8111156108d257600080fd5b6108de8482850161077c565b91505092915050565b6000602082840312156108f957600080fd5b600061090784828501610814565b91505092915050565b60006020828403121561092257600080fd5b600082015167ffffffffffffffff81111561093c57600080fd5b61094884828501610829565b91505092915050565b600061095d838361098c565b60208301905092915050565b60006109758383610a9b565b905092915050565b61098681610d84565b82525050565b61099581610d2a565b82525050565b60006109a682610cab565b6109b08185610ce6565b93506109bb83610c8b565b8060005b838110156109ec5781516109d38882610951565b97506109de83610ccc565b9250506001810190506109bf565b5085935050505092915050565b6000610a0482610cb6565b610a0e8185610cf7565b935083602082028501610a2085610c9b565b8060005b85811015610a5c5784840389528151610a3d8582610969565b9450610a4883610cd9565b925060208a01995050600181019050610a24565b50829750879550505050505092915050565b610a7781610d3c565b82525050565b610a8681610d48565b82525050565b610a9581610d96565b82525050565b6000610aa682610cc1565b610ab08185610d08565b9350610ac0818560208601610dde565b610ac981610e11565b840191505092915050565b6000610ae1602f83610d19565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b6000602082019050610b4f600083018461097d565b92915050565b60006020820190508181036000830152610b6f818461099b565b905092915050565b60006020820190508181036000830152610b9181846109f9565b905092915050565b6000602082019050610bae6000830184610a6e565b92915050565b6000602082019050610bc96000830184610a7d565b92915050565b6000602082019050610be46000830184610a8c565b92915050565b60006020820190508181036000830152610c0381610ad4565b9050919050565b6000604051905081810181811067ffffffffffffffff82111715610c2d57600080fd5b8060405250919050565b600067ffffffffffffffff821115610c4e57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115610c7657600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610d3582610d64565b9050919050565b60008115159050919050565b6000819050919050565b6000610d5d82610d2a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610d8f82610dba565b9050919050565b6000610da182610da8565b9050919050565b6000610db382610d64565b9050919050565b6000610dc582610dcc565b9050919050565b6000610dd782610d64565b9050919050565b60005b83811015610dfc578082015181840152602081019050610de1565b83811115610e0b576000848401525b50505050565b6000601f19601f8301169050919050565b610e2b81610d2a565b8114610e3657600080fd5b50565b610e4281610d48565b8114610e4d57600080fd5b50565b610e5981610d52565b8114610e6457600080fd5b5056fea164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "kind": "dev", + "methods": { + "constructor": { + "details": "Public constructor" + }, + "getAddresses(bytes32[])": { + "params": { + "nodes": "array of nodes" + }, + "returns": { + "_0": "nodes addresses" + } + }, + "getNames(bytes32[])": { + "params": { + "nodes": "array of nodes" + }, + "returns": { + "_0": "nodes names" + } + }, + "initialize(address)": { + "params": { + "registry_": "ENS registry address" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + } + }, + "title": "ENS helper", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "getAddresses(bytes32[])": { + "notice": "Gets nodes addresses" + }, + "getNames(bytes32[])": { + "notice": "Gets nodes names" + }, + "initialize(address)": { + "notice": "Initializes `ENSLookupHelper` contract" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1871, + "contract": "src/ens/ENSHelper.sol:ENSHelper", + "label": "initializer", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 2929, + "contract": "src/ens/ENSHelper.sol:ENSHelper", + "label": "registry", + "offset": 0, + "slot": "1", + "type": "t_contract(ENSRegistry)3564" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_contract(ENSRegistry)3564": { + "encoding": "inplace", + "label": "contract ENSRegistry", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/ENSRegistry.json b/deployments/fuseSparknet/ENSRegistry.json new file mode 100644 index 00000000..8fbd9692 --- /dev/null +++ b/deployments/fuseSparknet/ENSRegistry.json @@ -0,0 +1,510 @@ +{ + "address": "0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "NewOwner", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "resolver", + "type": "address" + } + ], + "name": "NewResolver", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "ttl", + "type": "uint64" + } + ], + "name": "NewTTL", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner_", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "recordExists", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "resolver", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "owner_", + "type": "address" + } + ], + "name": "setOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "owner_", + "type": "address" + }, + { + "internalType": "address", + "name": "resolver_", + "type": "address" + }, + { + "internalType": "uint64", + "name": "ttl_", + "type": "uint64" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "resolver_", + "type": "address" + } + ], + "name": "setResolver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "owner_", + "type": "address" + } + ], + "name": "setSubnodeOwner", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "owner_", + "type": "address" + }, + { + "internalType": "address", + "name": "resolver_", + "type": "address" + }, + { + "internalType": "uint64", + "name": "ttl_", + "type": "uint64" + } + ], + "name": "setSubnodeRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "ttl_", + "type": "uint64" + } + ], + "name": "setTTL", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "ttl", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x9c446bb44fa6e652f05391ccf363679d32237782495f7384d1a04214c40c7536", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "1090588", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xfe73d45e45ee898adb2115b76a6e4f20de0cc4e1302dbfb794f3a621fdbe5aa4", + "transactionHash": "0x9c446bb44fa6e652f05391ccf363679d32237782495f7384d1a04214c40c7536", + "logs": [], + "blockNumber": 5497465, + "cumulativeGasUsed": "1090588", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"NewOwner\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"resolver\",\"type\":\"address\"}],\"name\":\"NewResolver\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"ttl\",\"type\":\"uint64\"}],\"name\":\"NewTTL\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"recordExists\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"resolver\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"name\":\"setOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resolver_\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"ttl_\",\"type\":\"uint64\"}],\"name\":\"setRecord\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"resolver_\",\"type\":\"address\"}],\"name\":\"setResolver\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"name\":\"setSubnodeOwner\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"label\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resolver_\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"ttl_\",\"type\":\"uint64\"}],\"name\":\"setSubnodeRecord\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"ttl_\",\"type\":\"uint64\"}],\"name\":\"setTTL\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"ttl\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ENSRegistry.sol\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Public constructor\"}},\"title\":\"ENS registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ens/ENSRegistry.sol\":\"ENSRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/ens/ENSRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ENS registry\\n *\\n * @dev Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ENSRegistry.sol\\n */\\ncontract ENSRegistry {\\n struct Record {\\n address owner;\\n address resolver;\\n uint64 ttl;\\n }\\n\\n mapping (bytes32 => Record) private records;\\n mapping (address => mapping(address => bool)) private operators;\\n\\n // events\\n\\n event NewOwner(\\n bytes32 indexed node,\\n bytes32 indexed label,\\n address owner\\n );\\n\\n event Transfer(\\n bytes32 indexed node,\\n address owner\\n );\\n\\n event NewResolver(\\n bytes32 indexed node,\\n address resolver\\n );\\n\\n event NewTTL(\\n bytes32 indexed node,\\n uint64 ttl\\n );\\n\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n // modifiers\\n\\n modifier authorised(\\n bytes32 node\\n )\\n {\\n address owner = records[node].owner;\\n\\n require(\\n owner == msg.sender || operators[owner][msg.sender],\\n \\\"ENSRegistry: reverted by authorised modifier\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor()\\n public\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n records[0x0].owner = tx.origin;\\n }\\n\\n // external functions\\n\\n function setRecord(\\n bytes32 node,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n setOwner(node, owner_);\\n\\n _setResolverAndTTL(node, resolver_, ttl_);\\n }\\n\\n function setTTL(\\n bytes32 node,\\n uint64 ttl_\\n )\\n external\\n authorised(node)\\n {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n bytes32 subNode = setSubnodeOwner(node, label, owner_);\\n\\n _setResolverAndTTL(subNode, resolver_, ttl_);\\n }\\n\\n function setApprovalForAll(\\n address operator,\\n bool approved\\n )\\n external\\n {\\n operators[msg.sender][operator] = approved;\\n\\n emit ApprovalForAll(\\n msg.sender,\\n operator,\\n approved\\n );\\n }\\n\\n // external functions (views)\\n\\n function owner(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n address addr = records[node].owner;\\n\\n if (addr == address(this)) {\\n return address(0x0);\\n }\\n\\n return addr;\\n }\\n\\n function resolver(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n return records[node].resolver;\\n }\\n\\n function ttl(\\n bytes32 node\\n )\\n external\\n view\\n returns (uint64)\\n {\\n return records[node].ttl;\\n }\\n\\n function recordExists(\\n bytes32 node\\n )\\n external\\n view\\n returns (bool)\\n {\\n return records[node].owner != address(0x0);\\n }\\n\\n function isApprovedForAll(\\n address owner_,\\n address operator\\n )\\n external\\n view\\n returns (bool)\\n {\\n return operators[owner_][operator];\\n }\\n\\n // public functions\\n\\n function setOwner(\\n bytes32 node,\\n address owner_\\n )\\n public\\n authorised(node)\\n {\\n records[node].owner = owner_;\\n\\n emit Transfer(node, owner_);\\n }\\n\\n function setResolver(\\n bytes32 node,\\n address resolver_\\n )\\n public\\n authorised(node)\\n {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner_\\n )\\n public\\n authorised(node)\\n returns(bytes32)\\n {\\n bytes32 subNode = keccak256(abi.encodePacked(node, label));\\n\\n records[subNode].owner = owner_;\\n\\n emit NewOwner(node, label, owner_);\\n\\n return subNode;\\n }\\n\\n // private functions\\n\\n function _setResolverAndTTL(\\n bytes32 node,\\n address resolver_,\\n uint64 ttl_\\n )\\n private\\n {\\n if (resolver_ != records[node].resolver) {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n if (ttl_ != records[node].ttl) {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe00dbdea09d17d41c2c14266e6e1b6b95938c0d374b266bb44a91cfcf0495612\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50326000808060001b815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611253806100776000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80635b0fc9c3116100715780635b0fc9c3146102b15780635ef2c7f0146102ff578063a22cb4651461038b578063cf408823146103db578063e985e9c51461045d578063f79fe538146104d7576100b4565b80630178b8bf146100b957806302571be31461011157806306ab59231461016957806314ab9038146101d557806316a25cbd146102175780631896f70a14610263575b600080fd5b6100e5600480360360208110156100cf57600080fd5b810190808035906020019092919050505061051b565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61013d6004803603602081101561012757600080fd5b810190808035906020019092919050505061055a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101bf6004803603606081101561017f57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105dd565b6040518082815260200191505060405180910390f35b610215600480360360408110156101eb57600080fd5b8101908080359060200190929190803567ffffffffffffffff169060200190929190505050610812565b005b6102436004803603602081101561022d57600080fd5b81019080803590602001909291905050506109e6565b604051808267ffffffffffffffff16815260200191505060405180910390f35b6102af6004803603604081101561027957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a19565b005b6102fd600480360360408110156102c757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c11565b005b610389600480360360a081101561031557600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803567ffffffffffffffff169060200190929190505050610e09565b005b6103d9600480360360408110156103a157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050610e2b565b005b61045b600480360360808110156103f157600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803567ffffffffffffffff169060200190929190505050610f2a565b005b6104bf6004803603604081101561047357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f45565b60405180821515815260200191505060405180910390f35b610503600480360360208110156104ed57600080fd5b8101908080359060200190929190505050610fd9565b60405180821515815260200191505060405180910390f35b600080600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060008084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156105d35760009150506105d8565b809150505b919050565b600083600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806106da5750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61072f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b6000868660405160200180838152602001828152602001925050506040516020818303038152906040528051906020012090508460008083815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085877fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e8287604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a38093505050509392505050565b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16148061090d5750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610962576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b8260008086815260200190815260200160002060010160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550837f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa6884604051808267ffffffffffffffff16815260200191505060405180910390a250505050565b600080600083815260200190815260200160002060010160149054906101000a900467ffffffffffffffff169050919050565b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610b145750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610b69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b8260008086815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550837f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a084604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a250505050565b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610d0c5750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610d61576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b8260008086815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550837fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d26684604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a250505050565b6000610e168686866105dd565b9050610e23818484611047565b505050505050565b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b610f348484610c11565b610f3f848383611047565b50505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b60008084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611152578160008085815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550827f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a083604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25b60008084815260200190815260200160002060010160149054906101000a900467ffffffffffffffff1667ffffffffffffffff168167ffffffffffffffff1614611215578060008085815260200190815260200160002060010160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550827f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa6882604051808267ffffffffffffffff16815260200191505060405180910390a25b50505056fe454e5352656769737472793a20726576657274656420627920617574686f7269736564206d6f646966696572a164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80635b0fc9c3116100715780635b0fc9c3146102b15780635ef2c7f0146102ff578063a22cb4651461038b578063cf408823146103db578063e985e9c51461045d578063f79fe538146104d7576100b4565b80630178b8bf146100b957806302571be31461011157806306ab59231461016957806314ab9038146101d557806316a25cbd146102175780631896f70a14610263575b600080fd5b6100e5600480360360208110156100cf57600080fd5b810190808035906020019092919050505061051b565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61013d6004803603602081101561012757600080fd5b810190808035906020019092919050505061055a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101bf6004803603606081101561017f57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105dd565b6040518082815260200191505060405180910390f35b610215600480360360408110156101eb57600080fd5b8101908080359060200190929190803567ffffffffffffffff169060200190929190505050610812565b005b6102436004803603602081101561022d57600080fd5b81019080803590602001909291905050506109e6565b604051808267ffffffffffffffff16815260200191505060405180910390f35b6102af6004803603604081101561027957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a19565b005b6102fd600480360360408110156102c757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c11565b005b610389600480360360a081101561031557600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803567ffffffffffffffff169060200190929190505050610e09565b005b6103d9600480360360408110156103a157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050610e2b565b005b61045b600480360360808110156103f157600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803567ffffffffffffffff169060200190929190505050610f2a565b005b6104bf6004803603604081101561047357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f45565b60405180821515815260200191505060405180910390f35b610503600480360360208110156104ed57600080fd5b8101908080359060200190929190505050610fd9565b60405180821515815260200191505060405180910390f35b600080600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060008084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156105d35760009150506105d8565b809150505b919050565b600083600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806106da5750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b61072f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b6000868660405160200180838152602001828152602001925050506040516020818303038152906040528051906020012090508460008083815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085877fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e8287604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a38093505050509392505050565b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16148061090d5750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610962576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b8260008086815260200190815260200160002060010160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550837f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa6884604051808267ffffffffffffffff16815260200191505060405180910390a250505050565b600080600083815260200190815260200160002060010160149054906101000a900467ffffffffffffffff169050919050565b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610b145750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610b69576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b8260008086815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550837f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a084604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a250505050565b81600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480610d0c5750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b610d61576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061121b602c913960400191505060405180910390fd5b8260008086815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550837fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d26684604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a250505050565b6000610e168686866105dd565b9050610e23818484611047565b505050505050565b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b610f348484610c11565b610f3f848383611047565b50505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b60008084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611152578160008085815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550827f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a083604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25b60008084815260200190815260200160002060010160149054906101000a900467ffffffffffffffff1667ffffffffffffffff168167ffffffffffffffff1614611215578060008085815260200190815260200160002060010160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550827f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa6882604051808267ffffffffffffffff16815260200191505060405180910390a25b50505056fe454e5352656769737472793a20726576657274656420627920617574686f7269736564206d6f646966696572a164736f6c634300060c000a", + "devdoc": { + "details": "Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ENSRegistry.sol", + "kind": "dev", + "methods": { + "constructor": { + "details": "Public constructor" + } + }, + "title": "ENS registry", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 3158, + "contract": "src/ens/ENSRegistry.sol:ENSRegistry", + "label": "records", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_struct(Record)3154_storage)" + }, + { + "astId": 3164, + "contract": "src/ens/ENSRegistry.sol:ENSRegistry", + "label": "operators", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "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_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_bytes32,t_struct(Record)3154_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct ENSRegistry.Record)", + "numberOfBytes": "32", + "value": "t_struct(Record)3154_storage" + }, + "t_struct(Record)3154_storage": { + "encoding": "inplace", + "label": "struct ENSRegistry.Record", + "members": [ + { + "astId": 3149, + "contract": "src/ens/ENSRegistry.sol:ENSRegistry", + "label": "owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 3151, + "contract": "src/ens/ENSRegistry.sol:ENSRegistry", + "label": "resolver", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 3153, + "contract": "src/ens/ENSRegistry.sol:ENSRegistry", + "label": "ttl", + "offset": 20, + "slot": "1", + "type": "t_uint64" + } + ], + "numberOfBytes": "64" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/ENSReverseRegistrar.json b/deployments/fuseSparknet/ENSReverseRegistrar.json new file mode 100644 index 00000000..b45b2005 --- /dev/null +++ b/deployments/fuseSparknet/ENSReverseRegistrar.json @@ -0,0 +1,274 @@ +{ + "address": "0x523C92966e9d2067ba547f59D51E907c20FD8761", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "ADDR_REVERSE_NODE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "claim", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "resolver_", + "type": "address" + } + ], + "name": "claimWithResolver", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ENSRegistry", + "name": "registry_", + "type": "address" + }, + { + "internalType": "contract ENSNameResolver", + "name": "resolver_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr_", + "type": "address" + } + ], + "name": "node", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract ENSRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "resolver", + "outputs": [ + { + "internalType": "contract ENSNameResolver", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "setName", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x9d18868bf5babb156cc0551acc2874b85543f5168b89e0326473cd3e6630eca3", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "849943", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x9accbf642f232de2b69842326a401fcbfb7ee0144ed915404f6974fbf509bf91", + "transactionHash": "0x9d18868bf5babb156cc0551acc2874b85543f5168b89e0326473cd3e6630eca3", + "logs": [], + "blockNumber": 5497470, + "cumulativeGasUsed": "849943", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADDR_REVERSE_NODE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"claim\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resolver_\",\"type\":\"address\"}],\"name\":\"claimWithResolver\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ENSRegistry\",\"name\":\"registry_\",\"type\":\"address\"},{\"internalType\":\"contract ENSNameResolver\",\"name\":\"resolver_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr_\",\"type\":\"address\"}],\"name\":\"node\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"contract ENSRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resolver\",\"outputs\":[{\"internalType\":\"contract ENSNameResolver\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"}],\"name\":\"setName\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ReverseRegistrar.sol\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Public constructor\"},\"initialize(address,address)\":{\"params\":{\"registry_\":\"ENS registry address\",\"resolver_\":\"ENS name resolver address\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}}},\"title\":\"ENS reverse registrar\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initialize(address,address)\":{\"notice\":\"Initializes `ENSReverseRegistrar` contract\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/ens/ENSReverseRegistrar.sol\":\"ENSReverseRegistrar\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/libs/AddressLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Address library\\n */\\nlibrary AddressLib {\\n /**\\n * @notice Converts address into sha3 hash\\n * @param self address\\n * @return sha3 hash\\n */\\n function toSha3Hash(\\n address self\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n bytes32 result;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let lookup := 0x3031323334353637383961626364656600000000000000000000000000000000\\n\\n for { let i := 40 } gt(i, 0) { } {\\n i := sub(i, 1)\\n mstore8(i, byte(and(self, 0xf), lookup))\\n self := div(self, 0x10)\\n i := sub(i, 1)\\n mstore8(i, byte(and(self, 0xf), lookup))\\n self := div(self, 0x10)\\n }\\n\\n result := keccak256(0, 40)\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe54172c033f0a3e59a8ec5ae72aeac02a35b4341331e2698baeb31fa5e543f5f\",\"license\":\"MIT\"},\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/ens/ENSRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ENS registry\\n *\\n * @dev Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ENSRegistry.sol\\n */\\ncontract ENSRegistry {\\n struct Record {\\n address owner;\\n address resolver;\\n uint64 ttl;\\n }\\n\\n mapping (bytes32 => Record) private records;\\n mapping (address => mapping(address => bool)) private operators;\\n\\n // events\\n\\n event NewOwner(\\n bytes32 indexed node,\\n bytes32 indexed label,\\n address owner\\n );\\n\\n event Transfer(\\n bytes32 indexed node,\\n address owner\\n );\\n\\n event NewResolver(\\n bytes32 indexed node,\\n address resolver\\n );\\n\\n event NewTTL(\\n bytes32 indexed node,\\n uint64 ttl\\n );\\n\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n // modifiers\\n\\n modifier authorised(\\n bytes32 node\\n )\\n {\\n address owner = records[node].owner;\\n\\n require(\\n owner == msg.sender || operators[owner][msg.sender],\\n \\\"ENSRegistry: reverted by authorised modifier\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor()\\n public\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n records[0x0].owner = tx.origin;\\n }\\n\\n // external functions\\n\\n function setRecord(\\n bytes32 node,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n setOwner(node, owner_);\\n\\n _setResolverAndTTL(node, resolver_, ttl_);\\n }\\n\\n function setTTL(\\n bytes32 node,\\n uint64 ttl_\\n )\\n external\\n authorised(node)\\n {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner_,\\n address resolver_,\\n uint64 ttl_\\n )\\n external\\n {\\n bytes32 subNode = setSubnodeOwner(node, label, owner_);\\n\\n _setResolverAndTTL(subNode, resolver_, ttl_);\\n }\\n\\n function setApprovalForAll(\\n address operator,\\n bool approved\\n )\\n external\\n {\\n operators[msg.sender][operator] = approved;\\n\\n emit ApprovalForAll(\\n msg.sender,\\n operator,\\n approved\\n );\\n }\\n\\n // external functions (views)\\n\\n function owner(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n address addr = records[node].owner;\\n\\n if (addr == address(this)) {\\n return address(0x0);\\n }\\n\\n return addr;\\n }\\n\\n function resolver(\\n bytes32 node\\n )\\n external\\n view\\n returns (address)\\n {\\n return records[node].resolver;\\n }\\n\\n function ttl(\\n bytes32 node\\n )\\n external\\n view\\n returns (uint64)\\n {\\n return records[node].ttl;\\n }\\n\\n function recordExists(\\n bytes32 node\\n )\\n external\\n view\\n returns (bool)\\n {\\n return records[node].owner != address(0x0);\\n }\\n\\n function isApprovedForAll(\\n address owner_,\\n address operator\\n )\\n external\\n view\\n returns (bool)\\n {\\n return operators[owner_][operator];\\n }\\n\\n // public functions\\n\\n function setOwner(\\n bytes32 node,\\n address owner_\\n )\\n public\\n authorised(node)\\n {\\n records[node].owner = owner_;\\n\\n emit Transfer(node, owner_);\\n }\\n\\n function setResolver(\\n bytes32 node,\\n address resolver_\\n )\\n public\\n authorised(node)\\n {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner_\\n )\\n public\\n authorised(node)\\n returns(bytes32)\\n {\\n bytes32 subNode = keccak256(abi.encodePacked(node, label));\\n\\n records[subNode].owner = owner_;\\n\\n emit NewOwner(node, label, owner_);\\n\\n return subNode;\\n }\\n\\n // private functions\\n\\n function _setResolverAndTTL(\\n bytes32 node,\\n address resolver_,\\n uint64 ttl_\\n )\\n private\\n {\\n if (resolver_ != records[node].resolver) {\\n records[node].resolver = resolver_;\\n\\n emit NewResolver(node, resolver_);\\n }\\n\\n if (ttl_ != records[node].ttl) {\\n records[node].ttl = ttl_;\\n\\n emit NewTTL(node, ttl_);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xe00dbdea09d17d41c2c14266e6e1b6b95938c0d374b266bb44a91cfcf0495612\",\"license\":\"MIT\"},\"src/ens/ENSReverseRegistrar.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/AddressLib.sol\\\";\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"./resolvers/ENSNameResolver.sol\\\";\\nimport \\\"./ENSRegistry.sol\\\";\\n\\n/**\\n * @title ENS reverse registrar\\n *\\n * @dev Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ReverseRegistrar.sol\\n */\\ncontract ENSReverseRegistrar is Initializable {\\n using AddressLib for address;\\n\\n // namehash('addr.reverse')\\n bytes32 public constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\\n\\n ENSRegistry public registry;\\n ENSNameResolver public resolver;\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Initializable() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `ENSReverseRegistrar` contract\\n * @param registry_ ENS registry address\\n * @param resolver_ ENS name resolver address\\n */\\n function initialize(\\n ENSRegistry registry_,\\n ENSNameResolver resolver_\\n )\\n external\\n onlyInitializer\\n {\\n registry = registry_;\\n resolver = resolver_;\\n }\\n\\n // external functions\\n\\n function claim(\\n address owner\\n )\\n public\\n returns (bytes32)\\n {\\n return _claimWithResolver(owner, address(0));\\n }\\n\\n function claimWithResolver(\\n address owner,\\n address resolver_\\n )\\n public\\n returns (bytes32)\\n {\\n return _claimWithResolver(owner, resolver_);\\n }\\n\\n function setName(\\n string memory name\\n )\\n public\\n returns (bytes32)\\n {\\n bytes32 node = _claimWithResolver(address(this), address(resolver));\\n\\n resolver.setName(node, name);\\n\\n return node;\\n }\\n\\n // external functions (pure)\\n\\n function node(\\n address addr_\\n )\\n external\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(ADDR_REVERSE_NODE, addr_.toSha3Hash()));\\n }\\n\\n // private functions\\n\\n function _claimWithResolver(\\n address owner,\\n address resolver_\\n )\\n private\\n returns (bytes32)\\n {\\n bytes32 label = address(msg.sender).toSha3Hash();\\n bytes32 node_ = keccak256(abi.encodePacked(ADDR_REVERSE_NODE, label));\\n address currentOwner = registry.owner(node_);\\n\\n if (resolver_ != address(0x0) && resolver_ != registry.resolver(node_)) {\\n if (currentOwner != address(this)) {\\n registry.setSubnodeOwner(ADDR_REVERSE_NODE, label, address(this));\\n currentOwner = address(this);\\n }\\n\\n registry.setResolver(node_, resolver_);\\n }\\n\\n // Update the owner if required\\n if (currentOwner != owner) {\\n registry.setSubnodeOwner(ADDR_REVERSE_NODE, label, owner);\\n }\\n\\n return node_;\\n }\\n}\\n\",\"keccak256\":\"0xcedc0ece74976c6a3d22fc615baa0cb171e510ac53688a803211606c438dfdf2\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSAbstractResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ENS abstract resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/ResolverBase.sol\\n */\\nabstract contract ENSAbstractResolver {\\n // modifiers\\n\\n modifier onlyNodeOwner(bytes32 node)\\n {\\n require(\\n _isNodeOwner(node),\\n \\\"ENSAbstractResolver: reverted by onlyNodeOwner modifier\\\"\\n );\\n\\n _;\\n }\\n\\n // internal functions (views)\\n\\n function _isNodeOwner(\\n bytes32 node\\n )\\n internal\\n virtual\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0xc67d8bdd4904684e5d3388f7ca7d18c7d407058d6b548d8c591404c758a1ac60\",\"license\":\"MIT\"},\"src/ens/resolvers/ENSNameResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./ENSAbstractResolver.sol\\\";\\n\\n\\n/**\\n * @title ENS abstract name resolver\\n *\\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/NameResolver.sol\\n */\\nabstract contract ENSNameResolver is ENSAbstractResolver {\\n bytes4 internal constant INTERFACE_NAME_ID = bytes4(keccak256(abi.encodePacked(\\\"name(bytes32)\\\")));\\n\\n mapping(bytes32 => string) internal resolverNames;\\n\\n // events\\n\\n event NameChanged(\\n bytes32 indexed node,\\n string name\\n );\\n\\n // external functions\\n\\n function setName(\\n bytes32 node,\\n string calldata name\\n )\\n external\\n onlyNodeOwner(node)\\n {\\n resolverNames[node] = name;\\n\\n emit NameChanged(node, name);\\n }\\n\\n // external functions (views)\\n\\n function name(\\n bytes32 node\\n )\\n external\\n view\\n returns (string memory)\\n {\\n return resolverNames[node];\\n }\\n}\\n\",\"keccak256\":\"0x1d2d4b21f59225fbefe0e5aaff87aff8f11afe5281745934d595e15770557ead\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610df8806100606000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063485cc95511610066578063485cc955146101bc5780637b103999146102205780637cf8a2eb14610254578063bffbe61c14610272578063c47f0027146102ca57610093565b806304f3bcec146100985780630f5a5466146100cc5780631e83409a14610144578063392e53cd1461019c575b600080fd5b6100a0610399565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61012e600480360360408110156100e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103bf565b6040518082815260200191505060405180910390f35b6101866004803603602081101561015a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103d3565b6040518082815260200191505060405180910390f35b6101a46103e7565b60405180821515815260200191505060405180910390f35b61021e600480360360408110156101d257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061043d565b005b6102286105f5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61025c61061b565b6040518082815260200191505060405180910390f35b6102b46004803603602081101561028857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610642565b6040518082815260200191505060405180910390f35b610383600480360360208110156102e057600080fd5b81019080803590602001906401000000008111156102fd57600080fd5b82018360208201111561030f57600080fd5b8035906020019184600183028401116401000000008311171561033157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506106bb565b6040518082815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006103cb83836107ef565b905092915050565b60006103e08260006107ef565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146104e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180610dbd602f913960400191505060405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b81565b60007f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b6106878373ffffffffffffffffffffffffffffffffffffffff16610d4d565b6040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b6000806106ea30600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166107ef565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637737221382856040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610781578082015181840152602081019050610766565b50505050905090810190601f1680156107ae5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b1580156107ce57600080fd5b505af11580156107e2573d6000803e3d6000fd5b5050505080915050919050565b6000806108113373ffffffffffffffffffffffffffffffffffffffff16610d4d565b905060007f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b8260405160200180838152602001828152602001925050506040516020818303038152906040528051906020012090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156108de57600080fd5b505afa1580156108f2573d6000803e3d6000fd5b505050506040513d602081101561090857600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614158015610a315750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156109c657600080fd5b505afa1580156109da573d6000803e3d6000fd5b505050506040513d60208110156109f057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15610c13573073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b6757600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59237f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b85306040518463ffffffff1660e01b8152600401808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b158015610b2757600080fd5b505af1158015610b3b573d6000803e3d6000fd5b505050506040513d6020811015610b5157600080fd5b8101908080519060200190929190505050503090505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a83876040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b158015610bfa57600080fd5b505af1158015610c0e573d6000803e3d6000fd5b505050505b8573ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d4157600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59237f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b85896040518463ffffffff1660e01b8152600401808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b158015610d0457600080fd5b505af1158015610d18573d6000803e3d6000fd5b505050506040513d6020811015610d2e57600080fd5b8101908080519060200190929190505050505b81935050505092915050565b6000807f303132333435363738396162636465660000000000000000000000000000000060285b6000811115610daa5760018103905081600f86161a815360108504945060018103905081600f86161a8153601085049450610d74565b5060286000209150508091505091905056fe496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a6572a164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063485cc95511610066578063485cc955146101bc5780637b103999146102205780637cf8a2eb14610254578063bffbe61c14610272578063c47f0027146102ca57610093565b806304f3bcec146100985780630f5a5466146100cc5780631e83409a14610144578063392e53cd1461019c575b600080fd5b6100a0610399565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61012e600480360360408110156100e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103bf565b6040518082815260200191505060405180910390f35b6101866004803603602081101561015a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103d3565b6040518082815260200191505060405180910390f35b6101a46103e7565b60405180821515815260200191505060405180910390f35b61021e600480360360408110156101d257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061043d565b005b6102286105f5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61025c61061b565b6040518082815260200191505060405180910390f35b6102b46004803603602081101561028857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610642565b6040518082815260200191505060405180910390f35b610383600480360360208110156102e057600080fd5b81019080803590602001906401000000008111156102fd57600080fd5b82018360208201111561030f57600080fd5b8035906020019184600183028401116401000000008311171561033157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506106bb565b6040518082815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006103cb83836107ef565b905092915050565b60006103e08260006107ef565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146104e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180610dbd602f913960400191505060405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b81565b60007f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b6106878373ffffffffffffffffffffffffffffffffffffffff16610d4d565b6040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b6000806106ea30600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166107ef565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637737221382856040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610781578082015181840152602081019050610766565b50505050905090810190601f1680156107ae5780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b1580156107ce57600080fd5b505af11580156107e2573d6000803e3d6000fd5b5050505080915050919050565b6000806108113373ffffffffffffffffffffffffffffffffffffffff16610d4d565b905060007f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b8260405160200180838152602001828152602001925050506040516020818303038152906040528051906020012090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156108de57600080fd5b505afa1580156108f2573d6000803e3d6000fd5b505050506040513d602081101561090857600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614158015610a315750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156109c657600080fd5b505afa1580156109da573d6000803e3d6000fd5b505050506040513d60208110156109f057600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15610c13573073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b6757600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59237f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b85306040518463ffffffff1660e01b8152600401808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b158015610b2757600080fd5b505af1158015610b3b573d6000803e3d6000fd5b505050506040513d6020811015610b5157600080fd5b8101908080519060200190929190505050503090505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a83876040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b158015610bfa57600080fd5b505af1158015610c0e573d6000803e3d6000fd5b505050505b8573ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d4157600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59237f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b85896040518463ffffffff1660e01b8152600401808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b158015610d0457600080fd5b505af1158015610d18573d6000803e3d6000fd5b505050506040513d6020811015610d2e57600080fd5b8101908080519060200190929190505050505b81935050505092915050565b6000807f303132333435363738396162636465660000000000000000000000000000000060285b6000811115610daa5760018103905081600f86161a815360108504945060018103905081600f86161a8153601085049450610d74565b5060286000209150508091505091905056fe496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a6572a164736f6c634300060c000a", + "devdoc": { + "details": "Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ReverseRegistrar.sol", + "kind": "dev", + "methods": { + "constructor": { + "details": "Public constructor" + }, + "initialize(address,address)": { + "params": { + "registry_": "ENS registry address", + "resolver_": "ENS name resolver address" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + } + }, + "title": "ENS reverse registrar", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "initialize(address,address)": { + "notice": "Initializes `ENSReverseRegistrar` contract" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1871, + "contract": "src/ens/ENSReverseRegistrar.sol:ENSReverseRegistrar", + "label": "initializer", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 3581, + "contract": "src/ens/ENSReverseRegistrar.sol:ENSReverseRegistrar", + "label": "registry", + "offset": 0, + "slot": "1", + "type": "t_contract(ENSRegistry)3564" + }, + { + "astId": 3583, + "contract": "src/ens/ENSReverseRegistrar.sol:ENSReverseRegistrar", + "label": "resolver", + "offset": 0, + "slot": "2", + "type": "t_contract(ENSNameResolver)4114" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_contract(ENSNameResolver)4114": { + "encoding": "inplace", + "label": "contract ENSNameResolver", + "numberOfBytes": "20" + }, + "t_contract(ENSRegistry)3564": { + "encoding": "inplace", + "label": "contract ENSRegistry", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/ExternalAccountRegistry.json b/deployments/fuseSparknet/ExternalAccountRegistry.json new file mode 100644 index 00000000..13b76013 --- /dev/null +++ b/deployments/fuseSparknet/ExternalAccountRegistry.json @@ -0,0 +1,489 @@ +{ + "address": "0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "AccountOwnerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "AccountOwnerRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "AccountProofAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "AccountProofRemoved", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "addAccountOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "addAccountProof", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "removeAccountOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "removeAccountProof", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "verifyAccountOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "verifyAccountOwnerAtBlock", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "verifyAccountProof", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "verifyAccountProofAtBlock", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xaf97cd55f19b04f6aad22bfb1757d7c92346e5b9ebdb88d68bde2998ed2cafc2", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "937660", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x149873ce0777c0ad9ece51c2f340e4b9f019fc405a274fc68fa91ef039375037", + "transactionHash": "0xaf97cd55f19b04f6aad22bfb1757d7c92346e5b9ebdb88d68bde2998ed2cafc2", + "logs": [], + "blockNumber": 5497475, + "cumulativeGasUsed": "937660", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AccountOwnerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AccountOwnerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"AccountProofAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"AccountProofRemoved\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"addAccountOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"addAccountProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"removeAccountOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"removeAccountProof\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"verifyAccountOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"verifyAccountOwnerAtBlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"verifyAccountProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"verifyAccountProofAtBlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"details\":\"An account can call the registry to add (`addAccountOwner`) or remove (`removeAccountOwner`) its own owners. When the owner has been added, information about that fact will live in the registry forever. Removing an owner only affects the future blocks (until the owner is re-added). Given the fact, there is no way to sign the data using a contract based wallet, we created a registry to store signed by the key wallet proofs. ERC-1271 allows removing a signer after the signature was created. Thus store the signature for the later use doesn't guarantee the signer is still has access to that smart account. Because of that, the ERC1271's `isValidSignature()` cannot be used in e.g. `PaymentRegistry`.* An account can call the registry to add (`addAccountProof`) or remove (`removeAccountProof`) proof hash. When the proof has been added, information about that fact will live in the registry forever. Removing a proof only affects the future blocks (until the proof is re-added).\",\"events\":{\"AccountOwnerAdded(address,address)\":{\"details\":\"Emitted when the new owner is added\",\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"}},\"AccountOwnerRemoved(address,address)\":{\"details\":\"Emitted when the existing owner is removed\",\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"}},\"AccountProofAdded(address,bytes32)\":{\"details\":\"Emitted when the new proof is added\",\"params\":{\"account\":\"account address\",\"hash\":\"proof hash\"}},\"AccountProofRemoved(address,bytes32)\":{\"details\":\"Emitted when the existing proof is removed\",\"params\":{\"account\":\"account address\",\"hash\":\"proof hash\"}}},\"kind\":\"dev\",\"methods\":{\"addAccountOwner(address)\":{\"params\":{\"owner\":\"owner address\"}},\"addAccountProof(bytes32)\":{\"params\":{\"hash\":\"proof hash\"}},\"removeAccountOwner(address)\":{\"params\":{\"owner\":\"owner address\"}},\"removeAccountProof(bytes32)\":{\"params\":{\"hash\":\"proof hash\"}},\"verifyAccountOwner(address,address)\":{\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"},\"returns\":{\"_0\":\"true on correct account owner\"}},\"verifyAccountOwnerAtBlock(address,address,uint256)\":{\"params\":{\"account\":\"account address\",\"blockNumber\":\"block number to verify\",\"owner\":\"owner address\"},\"returns\":{\"_0\":\"true on correct account owner\"}},\"verifyAccountProof(address,bytes32)\":{\"params\":{\"account\":\"account address\",\"hash\":\"proof hash\"},\"returns\":{\"_0\":\"true on correct account proof\"}},\"verifyAccountProofAtBlock(address,bytes32,uint256)\":{\"params\":{\"account\":\"account address\",\"blockNumber\":\"block number to verify\",\"hash\":\"proof hash\"},\"returns\":{\"_0\":\"true on correct account proof\"}}},\"title\":\"External account registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addAccountOwner(address)\":{\"notice\":\"Adds a new account owner\"},\"addAccountProof(bytes32)\":{\"notice\":\"Adds a new account proof\"},\"removeAccountOwner(address)\":{\"notice\":\"Removes existing account owner\"},\"removeAccountProof(bytes32)\":{\"notice\":\"Removes existing account proof\"},\"verifyAccountOwner(address,address)\":{\"notice\":\"Verifies the owner of the account at current block\"},\"verifyAccountOwnerAtBlock(address,address,uint256)\":{\"notice\":\"Verifies the owner of the account at specific block\"},\"verifyAccountProof(address,bytes32)\":{\"notice\":\"Verifies the proof of the account at current block\"},\"verifyAccountProofAtBlock(address,bytes32,uint256)\":{\"notice\":\"Verifies the proof of the account at specific block\"}},\"notice\":\"Global registry for keys and external (outside of the platform) contract based wallets\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/external/ExternalAccountRegistry.sol\":\"ExternalAccountRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/libs/BlockLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Block library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BlockLib {\\n struct BlockRelated {\\n bool added;\\n uint256 removedAtBlockNumber;\\n }\\n\\n /**\\n * @notice Verifies self struct at current block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtCurrentBlock(\\n BlockRelated memory self\\n )\\n internal\\n view\\n returns (bool)\\n {\\n return verifyAtBlock(self, block.number);\\n }\\n\\n /**\\n * @notice Verifies self struct at any block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtAnyBlock(\\n BlockRelated memory self\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n return verifyAtBlock(self, 0);\\n }\\n\\n /**\\n * @notice Verifies self struct at specific block\\n * @param self self struct\\n * @param blockNumber block number to verify\\n * @return true on correct self struct\\n */\\n function verifyAtBlock(\\n BlockRelated memory self,\\n uint256 blockNumber\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n bool result = false;\\n\\n if (self.added) {\\n if (self.removedAtBlockNumber == 0) {\\n result = true;\\n } else if (blockNumber == 0) {\\n result = true;\\n } else {\\n result = self.removedAtBlockNumber > blockNumber;\\n }\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9205536bc211f86d1113118a44dddfa7a9b9772a918cf4b1575c982a05472587\",\"license\":\"MIT\"},\"src/external/ExternalAccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BlockLib.sol\\\";\\n\\n\\n/**\\n * @title External account registry\\n *\\n * @notice Global registry for keys and external (outside of the platform) contract based wallets\\n *\\n * @dev An account can call the registry to add (`addAccountOwner`) or remove (`removeAccountOwner`) its own owners.\\n * When the owner has been added, information about that fact will live in the registry forever.\\n * Removing an owner only affects the future blocks (until the owner is re-added).\\n *\\n * Given the fact, there is no way to sign the data using a contract based wallet,\\n * we created a registry to store signed by the key wallet proofs.\\n * ERC-1271 allows removing a signer after the signature was created. Thus store the signature for the later use\\n * doesn't guarantee the signer is still has access to that smart account.\\n * Because of that, the ERC1271's `isValidSignature()` cannot be used in e.g. `PaymentRegistry`.*\\n *\\n * An account can call the registry to add (`addAccountProof`) or remove (`removeAccountProof`) proof hash.\\n * When the proof has been added, information about that fact will live in the registry forever.\\n * Removing a proof only affects the future blocks (until the proof is re-added).\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract ExternalAccountRegistry {\\n using BlockLib for BlockLib.BlockRelated;\\n\\n struct Account {\\n mapping(address => BlockLib.BlockRelated) owners;\\n mapping(bytes32 => BlockLib.BlockRelated) proofs;\\n }\\n\\n mapping(address => Account) private accounts;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the new owner is added\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerAdded(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the existing owner is removed\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerRemoved(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the new proof is added\\n * @param account account address\\n * @param hash proof hash\\n */\\n event AccountProofAdded(\\n address account,\\n bytes32 hash\\n );\\n\\n /**\\n * @dev Emitted when the existing proof is removed\\n * @param account account address\\n * @param hash proof hash\\n */\\n event AccountProofRemoved(\\n address account,\\n bytes32 hash\\n );\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new account owner\\n * @param owner owner address\\n */\\n function addAccountOwner(\\n address owner\\n )\\n external\\n {\\n require(\\n owner != address(0),\\n \\\"ExternalAccountRegistry: cannot add 0x0 owner\\\"\\n );\\n\\n require(\\n !accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: owner already exists\\\"\\n );\\n\\n accounts[msg.sender].owners[owner].added = true;\\n accounts[msg.sender].owners[owner].removedAtBlockNumber = 0;\\n\\n emit AccountOwnerAdded(\\n msg.sender,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Removes existing account owner\\n * @param owner owner address\\n */\\n function removeAccountOwner(\\n address owner\\n )\\n external\\n {\\n require(\\n accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: owner doesn't exist\\\"\\n );\\n\\n accounts[msg.sender].owners[owner].removedAtBlockNumber = block.number;\\n\\n emit AccountOwnerRemoved(\\n msg.sender,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Adds a new account proof\\n * @param hash proof hash\\n */\\n function addAccountProof(\\n bytes32 hash\\n )\\n external\\n {\\n require(\\n !accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: proof already exists\\\"\\n );\\n\\n accounts[msg.sender].proofs[hash].added = true;\\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = 0;\\n\\n emit AccountProofAdded(\\n msg.sender,\\n hash\\n );\\n }\\n\\n /**\\n * @notice Removes existing account proof\\n * @param hash proof hash\\n */\\n function removeAccountProof(\\n bytes32 hash\\n )\\n external\\n {\\n require(\\n accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: proof doesn't exist\\\"\\n );\\n\\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = block.number;\\n\\n emit AccountProofRemoved(\\n msg.sender,\\n hash\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Verifies the owner of the account at current block\\n * @param account account address\\n * @param owner owner address\\n * @return true on correct account owner\\n */\\n function verifyAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].owners[owner].verifyAtCurrentBlock();\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at specific block\\n * @param account account address\\n * @param owner owner address\\n * @param blockNumber block number to verify\\n * @return true on correct account owner\\n */\\n function verifyAccountOwnerAtBlock(\\n address account,\\n address owner,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].owners[owner].verifyAtBlock(blockNumber);\\n }\\n\\n /**\\n * @notice Verifies the proof of the account at current block\\n * @param account account address\\n * @param hash proof hash\\n * @return true on correct account proof\\n */\\n function verifyAccountProof(\\n address account,\\n bytes32 hash\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].proofs[hash].verifyAtCurrentBlock();\\n }\\n\\n /**\\n * @notice Verifies the proof of the account at specific block\\n * @param account account address\\n * @param hash proof hash\\n * @param blockNumber block number to verify\\n * @return true on correct account proof\\n */\\n function verifyAccountProofAtBlock(\\n address account,\\n bytes32 hash,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].proofs[hash].verifyAtBlock(blockNumber);\\n }\\n}\\n\",\"keccak256\":\"0x8067b1fae41b73949f8d871a835533cbdd94b9ca3faa93b91f595c37e632ccdb\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610fff806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806394000b021161005b57806394000b0214610227578063bb890d3f14610255578063d543c34a146102cf578063e278cfc6146102fd57610088565b806334d323a41461008d57806359b52ef8146101115780638a3133781461017f5780638ecc1365146101e3575b600080fd5b6100f9600480360360608110156100a357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610341565b60405180821515815260200191505060405180910390f35b6101676004803603606081101561012757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919050505061040c565b60405180821515815260200191505060405180910390f35b6101cb6004803603604081101561019557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ab565b60405180821515815260200191505060405180910390f35b610225600480360360208110156101f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061053f565b005b6102536004803603602081101561023d57600080fd5b8101908080359060200190929190505050610860565b005b6102b76004803603604081101561026b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109f1565b60405180821515815260200191505060405180910390f35b6102fb600480360360208110156102e557600080fd5b8101908080359060200190929190505050610ab1565b005b61033f6004803603602081101561031357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cb2565b005b6000610403826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610eb190919063ffffffff16565b90509392505050565b60006104a2826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610eb190919063ffffffff16565b90509392505050565b60006105376000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008481526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156105c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610f14602d913960400191505060405180910390fd5b61067b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b156106d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610f6e602d913960400191505060405180910390fd5b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff02191690831515021790555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644683382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b6108ea6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008381526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b61093f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610fc7602c913960400191505060405180910390fd5b436000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000838152602001908152602001600020600101819055507f87dde712783ad4895642c7a875998317a71cf424a2444eb79545ce3795431ff93382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000610aa96000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b905092915050565b610b3b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008381526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b15610b91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610f41602d913960400191505060405180910390fd5b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600083815260200190815260200160002060000160006101000a81548160ff02191690831515021790555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000838152602001908152602001600020600101819055507f4075b367eed0513a54aa39c287c66d6ae98e5df6f73ac087b26b8f89d05d1aa83382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b610d686000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b610dbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610f9b602c913960400191505060405180910390fd5b436000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f1ce3cbbc43ee231e5b950332f2b0b9dd7d349291a3ee411ce5c5c7ed745661bb3382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b60008060009050836000015115610ef657600084602001511415610ed85760019050610ef5565b6000831415610eea5760019050610ef4565b8284602001511190505b5b5b8091505092915050565b6000610f0c8243610eb1565b905091905056fe45787465726e616c4163636f756e7452656769737472793a2063616e6e6f742061646420307830206f776e657245787465726e616c4163636f756e7452656769737472793a2070726f6f6620616c72656164792065786973747345787465726e616c4163636f756e7452656769737472793a206f776e657220616c72656164792065786973747345787465726e616c4163636f756e7452656769737472793a206f776e657220646f65736e277420657869737445787465726e616c4163636f756e7452656769737472793a2070726f6f6620646f65736e2774206578697374a164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100885760003560e01c806394000b021161005b57806394000b0214610227578063bb890d3f14610255578063d543c34a146102cf578063e278cfc6146102fd57610088565b806334d323a41461008d57806359b52ef8146101115780638a3133781461017f5780638ecc1365146101e3575b600080fd5b6100f9600480360360608110156100a357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610341565b60405180821515815260200191505060405180910390f35b6101676004803603606081101561012757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919050505061040c565b60405180821515815260200191505060405180910390f35b6101cb6004803603604081101561019557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ab565b60405180821515815260200191505060405180910390f35b610225600480360360208110156101f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061053f565b005b6102536004803603602081101561023d57600080fd5b8101908080359060200190929190505050610860565b005b6102b76004803603604081101561026b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109f1565b60405180821515815260200191505060405180910390f35b6102fb600480360360208110156102e557600080fd5b8101908080359060200190929190505050610ab1565b005b61033f6004803603602081101561031357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cb2565b005b6000610403826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610eb190919063ffffffff16565b90509392505050565b60006104a2826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610eb190919063ffffffff16565b90509392505050565b60006105376000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008481526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156105c5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610f14602d913960400191505060405180910390fd5b61067b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b156106d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610f6e602d913960400191505060405180910390fd5b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff02191690831515021790555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644683382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b6108ea6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008381526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b61093f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610fc7602c913960400191505060405180910390fd5b436000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000838152602001908152602001600020600101819055507f87dde712783ad4895642c7a875998317a71cf424a2444eb79545ce3795431ff93382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000610aa96000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b905092915050565b610b3b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008381526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b15610b91576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610f41602d913960400191505060405180910390fd5b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600083815260200190815260200160002060000160006101000a81548160ff02191690831515021790555060008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000838152602001908152602001600020600101819055507f4075b367eed0513a54aa39c287c66d6ae98e5df6f73ac087b26b8f89d05d1aa83382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b610d686000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050610f00565b610dbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610f9b602c913960400191505060405180910390fd5b436000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f1ce3cbbc43ee231e5b950332f2b0b9dd7d349291a3ee411ce5c5c7ed745661bb3382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b60008060009050836000015115610ef657600084602001511415610ed85760019050610ef5565b6000831415610eea5760019050610ef4565b8284602001511190505b5b5b8091505092915050565b6000610f0c8243610eb1565b905091905056fe45787465726e616c4163636f756e7452656769737472793a2063616e6e6f742061646420307830206f776e657245787465726e616c4163636f756e7452656769737472793a2070726f6f6620616c72656164792065786973747345787465726e616c4163636f756e7452656769737472793a206f776e657220616c72656164792065786973747345787465726e616c4163636f756e7452656769737472793a206f776e657220646f65736e277420657869737445787465726e616c4163636f756e7452656769737472793a2070726f6f6620646f65736e2774206578697374a164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "details": "An account can call the registry to add (`addAccountOwner`) or remove (`removeAccountOwner`) its own owners. When the owner has been added, information about that fact will live in the registry forever. Removing an owner only affects the future blocks (until the owner is re-added). Given the fact, there is no way to sign the data using a contract based wallet, we created a registry to store signed by the key wallet proofs. ERC-1271 allows removing a signer after the signature was created. Thus store the signature for the later use doesn't guarantee the signer is still has access to that smart account. Because of that, the ERC1271's `isValidSignature()` cannot be used in e.g. `PaymentRegistry`.* An account can call the registry to add (`addAccountProof`) or remove (`removeAccountProof`) proof hash. When the proof has been added, information about that fact will live in the registry forever. Removing a proof only affects the future blocks (until the proof is re-added).", + "events": { + "AccountOwnerAdded(address,address)": { + "details": "Emitted when the new owner is added", + "params": { + "account": "account address", + "owner": "owner address" + } + }, + "AccountOwnerRemoved(address,address)": { + "details": "Emitted when the existing owner is removed", + "params": { + "account": "account address", + "owner": "owner address" + } + }, + "AccountProofAdded(address,bytes32)": { + "details": "Emitted when the new proof is added", + "params": { + "account": "account address", + "hash": "proof hash" + } + }, + "AccountProofRemoved(address,bytes32)": { + "details": "Emitted when the existing proof is removed", + "params": { + "account": "account address", + "hash": "proof hash" + } + } + }, + "kind": "dev", + "methods": { + "addAccountOwner(address)": { + "params": { + "owner": "owner address" + } + }, + "addAccountProof(bytes32)": { + "params": { + "hash": "proof hash" + } + }, + "removeAccountOwner(address)": { + "params": { + "owner": "owner address" + } + }, + "removeAccountProof(bytes32)": { + "params": { + "hash": "proof hash" + } + }, + "verifyAccountOwner(address,address)": { + "params": { + "account": "account address", + "owner": "owner address" + }, + "returns": { + "_0": "true on correct account owner" + } + }, + "verifyAccountOwnerAtBlock(address,address,uint256)": { + "params": { + "account": "account address", + "blockNumber": "block number to verify", + "owner": "owner address" + }, + "returns": { + "_0": "true on correct account owner" + } + }, + "verifyAccountProof(address,bytes32)": { + "params": { + "account": "account address", + "hash": "proof hash" + }, + "returns": { + "_0": "true on correct account proof" + } + }, + "verifyAccountProofAtBlock(address,bytes32,uint256)": { + "params": { + "account": "account address", + "blockNumber": "block number to verify", + "hash": "proof hash" + }, + "returns": { + "_0": "true on correct account proof" + } + } + }, + "title": "External account registry", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addAccountOwner(address)": { + "notice": "Adds a new account owner" + }, + "addAccountProof(bytes32)": { + "notice": "Adds a new account proof" + }, + "removeAccountOwner(address)": { + "notice": "Removes existing account owner" + }, + "removeAccountProof(bytes32)": { + "notice": "Removes existing account proof" + }, + "verifyAccountOwner(address,address)": { + "notice": "Verifies the owner of the account at current block" + }, + "verifyAccountOwnerAtBlock(address,address,uint256)": { + "notice": "Verifies the owner of the account at specific block" + }, + "verifyAccountProof(address,bytes32)": { + "notice": "Verifies the proof of the account at current block" + }, + "verifyAccountProofAtBlock(address,bytes32,uint256)": { + "notice": "Verifies the proof of the account at specific block" + } + }, + "notice": "Global registry for keys and external (outside of the platform) contract based wallets", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 4292, + "contract": "src/external/ExternalAccountRegistry.sol:ExternalAccountRegistry", + "label": "accounts", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_struct(Account)4288_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Account)4288_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct ExternalAccountRegistry.Account)", + "numberOfBytes": "32", + "value": "t_struct(Account)4288_storage" + }, + "t_mapping(t_address,t_struct(BlockRelated)1382_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct BlockLib.BlockRelated)", + "numberOfBytes": "32", + "value": "t_struct(BlockRelated)1382_storage" + }, + "t_mapping(t_bytes32,t_struct(BlockRelated)1382_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct BlockLib.BlockRelated)", + "numberOfBytes": "32", + "value": "t_struct(BlockRelated)1382_storage" + }, + "t_struct(Account)4288_storage": { + "encoding": "inplace", + "label": "struct ExternalAccountRegistry.Account", + "members": [ + { + "astId": 4283, + "contract": "src/external/ExternalAccountRegistry.sol:ExternalAccountRegistry", + "label": "owners", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_struct(BlockRelated)1382_storage)" + }, + { + "astId": 4287, + "contract": "src/external/ExternalAccountRegistry.sol:ExternalAccountRegistry", + "label": "proofs", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_struct(BlockRelated)1382_storage)" + } + ], + "numberOfBytes": "64" + }, + "t_struct(BlockRelated)1382_storage": { + "encoding": "inplace", + "label": "struct BlockLib.BlockRelated", + "members": [ + { + "astId": 1379, + "contract": "src/external/ExternalAccountRegistry.sol:ExternalAccountRegistry", + "label": "added", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1381, + "contract": "src/external/ExternalAccountRegistry.sol:ExternalAccountRegistry", + "label": "removedAtBlockNumber", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/Gateway.json b/deployments/fuseSparknet/Gateway.json new file mode 100644 index 00000000..68cfc51e --- /dev/null +++ b/deployments/fuseSparknet/Gateway.json @@ -0,0 +1,578 @@ +{ + "address": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "batch", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bool", + "name": "succeeded", + "type": "bool" + } + ], + "name": "BatchDelegated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "chainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "senderSignature", + "type": "bytes" + } + ], + "name": "delegateBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "senderSignature", + "type": "bytes" + } + ], + "name": "delegateBatchWithGasPrice", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "batches", + "type": "bytes[]" + }, + { + "internalType": "bool", + "name": "revertOnFailure", + "type": "bool" + } + ], + "name": "delegateBatches", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "externalAccountRegistry", + "outputs": [ + { + "internalType": "contract ExternalAccountRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccountNextNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct Gateway.DelegatedBatch", + "name": "delegatedBatch", + "type": "tuple" + } + ], + "name": "hashDelegatedBatch", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "gasPrice", + "type": "uint256" + } + ], + "internalType": "struct Gateway.DelegatedBatchWithGasPrice", + "name": "delegatedBatch", + "type": "tuple" + } + ], + "name": "hashDelegatedBatchWithGasPrice", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ExternalAccountRegistry", + "name": "externalAccountRegistry_", + "type": "address" + }, + { + "internalType": "contract PersonalAccountRegistry", + "name": "personalAccountRegistry_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "personalAccountRegistry", + "outputs": [ + { + "internalType": "contract PersonalAccountRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "sendBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "sendBatchFromAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x814795f50ab1bd03fa7eae4d28f70e85e24138ed8af01cab3ea0f98c98e81235", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "2083512", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xea67becea39945397efcbd7bdfa64efcea0835d35dec8d9f613a49fe730a706e", + "transactionHash": "0x814795f50ab1bd03fa7eae4d28f70e85e24138ed8af01cab3ea0f98c98e81235", + "logs": [], + "blockNumber": 5497480, + "cumulativeGasUsed": "2083512", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"batch\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"succeeded\",\"type\":\"bool\"}],\"name\":\"BatchDelegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"senderSignature\",\"type\":\"bytes\"}],\"name\":\"delegateBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"senderSignature\",\"type\":\"bytes\"}],\"name\":\"delegateBatchWithGasPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"batches\",\"type\":\"bytes[]\"},{\"internalType\":\"bool\",\"name\":\"revertOnFailure\",\"type\":\"bool\"}],\"name\":\"delegateBatches\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"externalAccountRegistry\",\"outputs\":[{\"internalType\":\"contract ExternalAccountRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getAccountNextNonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"internalType\":\"struct Gateway.DelegatedBatch\",\"name\":\"delegatedBatch\",\"type\":\"tuple\"}],\"name\":\"hashDelegatedBatch\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256\",\"name\":\"gasPrice\",\"type\":\"uint256\"}],\"internalType\":\"struct Gateway.DelegatedBatchWithGasPrice\",\"name\":\"delegatedBatch\",\"type\":\"tuple\"}],\"name\":\"hashDelegatedBatchWithGasPrice\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ExternalAccountRegistry\",\"name\":\"externalAccountRegistry_\",\"type\":\"address\"},{\"internalType\":\"contract PersonalAccountRegistry\",\"name\":\"personalAccountRegistry_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"personalAccountRegistry\",\"outputs\":[{\"internalType\":\"contract PersonalAccountRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"sendBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"to\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"sendBatchFromAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"events\":{\"BatchDelegated(address,bytes,bool)\":{\"details\":\"Emitted when the single batch is delegated\",\"params\":{\"batch\":\"batch\",\"sender\":\"sender address\",\"succeeded\":\"if succeeded\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Public constructor\"},\"delegateBatch(address,uint256,address[],bytes[],bytes)\":{\"details\":\"Use `hashDelegatedBatch` to create sender message payload. `GatewayRecipient` context api: `_getContextAccount` will return `account` arg `_getContextSender` will return recovered address from `senderSignature` arg\",\"params\":{\"account\":\"account address\",\"data\":\"array of batch data\",\"nonce\":\"next account nonce\",\"senderSignature\":\"sender signature\",\"to\":\"array of batch recipients contracts\"}},\"delegateBatchWithGasPrice(address,uint256,address[],bytes[],bytes)\":{\"details\":\"Use `hashDelegatedBatchWithGasPrice` to create sender message payload (tx.gasprice as gasPrice) `GatewayRecipient` context api: `_getContextAccount` will return `account` arg `_getContextSender` will return recovered address from `senderSignature` arg\",\"params\":{\"account\":\"account address\",\"data\":\"array of batch data\",\"nonce\":\"next account nonce\",\"senderSignature\":\"sender signature\",\"to\":\"array of batch recipients contracts\"}},\"delegateBatches(bytes[],bool)\":{\"details\":\"It will revert when all batches fail\",\"params\":{\"batches\":\"array of batches\",\"revertOnFailure\":\"reverts on any error\"}},\"getAccountNextNonce(address)\":{\"params\":{\"account\":\"account address\"},\"returns\":{\"_0\":\"next nonce\"}},\"hashDelegatedBatch((address,uint256,address[],bytes[]))\":{\"params\":{\"delegatedBatch\":\"struct\"},\"returns\":{\"_0\":\"hash\"}},\"hashDelegatedBatchWithGasPrice((address,uint256,address[],bytes[],uint256))\":{\"params\":{\"delegatedBatch\":\"struct\"},\"returns\":{\"_0\":\"hash\"}},\"initialize(address,address)\":{\"params\":{\"externalAccountRegistry_\":\"`ExternalAccountRegistry` contract address\",\"personalAccountRegistry_\":\"`PersonalAccountRegistry` contract address\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}},\"sendBatch(address[],bytes[])\":{\"details\":\"`GatewayRecipient` context api: `_getContextAccount` will return `msg.sender` `_getContextSender` will return `msg.sender`\",\"params\":{\"data\":\"array of batch data\",\"to\":\"array of batch recipients contracts\"}},\"sendBatchFromAccount(address,address[],bytes[])\":{\"details\":\"`GatewayRecipient` context api: `_getContextAccount` will return `account` arg `_getContextSender` will return `msg.sender`\",\"params\":{\"account\":\"account address\",\"data\":\"array of batch data\",\"to\":\"array of batch recipients contracts\"}}},\"title\":\"Gateway\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"delegateBatch(address,uint256,address[],bytes[],bytes)\":{\"notice\":\"Delegates batch from the account\"},\"delegateBatchWithGasPrice(address,uint256,address[],bytes[],bytes)\":{\"notice\":\"Delegates batch from the account (with gas price)\"},\"delegateBatches(bytes[],bool)\":{\"notice\":\"Delegates multiple batches\"},\"getAccountNextNonce(address)\":{\"notice\":\"Gets next account nonce\"},\"hashDelegatedBatch((address,uint256,address[],bytes[]))\":{\"notice\":\"Hashes `DelegatedBatch` message payload\"},\"hashDelegatedBatchWithGasPrice((address,uint256,address[],bytes[],uint256))\":{\"notice\":\"Hashes `DelegatedBatchWithGasPrice` message payload\"},\"initialize(address,address)\":{\"notice\":\"Initializes `Gateway` contract\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"},\"sendBatch(address[],bytes[])\":{\"notice\":\"Sends batch\"},\"sendBatchFromAccount(address,address[],bytes[])\":{\"notice\":\"Sends batch from the account\"}},\"notice\":\"GSN replacement\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/gateway/Gateway.sol\":\"Gateway\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/access/Controlled.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Controlled\\n *\\n * @dev Contract module which provides an access control mechanism.\\n * It ensures there is only one controlling account of the smart contract\\n * and grants that account exclusive access to specific functions.\\n *\\n * The controller account will be the one that deploys the contract.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Controlled {\\n /**\\n * @return controller account address\\n */\\n address public controller;\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if msg.sender is not the controller\\n */\\n modifier onlyController() {\\n require(\\n msg.sender == controller,\\n \\\"Controlled: msg.sender is not the controller\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n controller = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xdf03a0b7ec644da9925c5c1b6c8a86bb1cc1b9c5018bb265a1a4c5044b877af3\",\"license\":\"MIT\"},\"src/common/access/Guarded.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n\\n/**\\n * @title Guarded\\n *\\n * @dev Contract module which provides a guardian-type control mechanism.\\n * It allows key accounts to have guardians and restricts specific methods to be accessible by guardians only.\\n *\\n * Each guardian account can remove other guardians\\n *\\n * Use `_initializeGuarded` to initialize the contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Guarded {\\n using ECDSALib for bytes32;\\n\\n mapping(address => bool) private guardians;\\n\\n // events\\n\\n /**\\n * @dev Emitted when a new guardian is added\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianAdded(\\n address sender,\\n address guardian\\n );\\n\\n /**\\n * @dev Emitted when the existing guardian is removed\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianRemoved(\\n address sender,\\n address guardian\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not a guardian account\\n */\\n modifier onlyGuardian() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n guardians[tx.origin],\\n \\\"Guarded: tx.origin is not the guardian\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new guardian\\n * @param guardian guardian address\\n */\\n function addGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n _addGuardian(guardian);\\n }\\n\\n /**\\n * @notice Removes the existing guardian\\n * @param guardian guardian address\\n */\\n function removeGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin != guardian,\\n \\\"Guarded: cannot remove self\\\"\\n );\\n\\n require(\\n guardians[guardian],\\n \\\"Guarded: guardian doesn't exist\\\"\\n );\\n\\n guardians[guardian] = false;\\n\\n emit GuardianRemoved(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if guardian exists\\n * @param guardian guardian address\\n * @return true when guardian exists\\n */\\n function isGuardian(\\n address guardian\\n )\\n external\\n view\\n returns (bool)\\n {\\n return guardians[guardian];\\n }\\n\\n /**\\n * @notice Verifies guardian signature\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true on correct guardian signature\\n */\\n function verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyGuardianSignature(\\n messageHash,\\n signature\\n );\\n }\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `Guarded` contract\\n * @dev If `guardians_` array is empty `tx.origin` is added as guardian account\\n * @param guardians_ array of guardians addresses\\n */\\n function _initializeGuarded(\\n address[] memory guardians_\\n )\\n internal\\n {\\n if (guardians_.length == 0) {\\n // solhint-disable-next-line avoid-tx-origin\\n _addGuardian(tx.origin);\\n } else {\\n uint guardiansLen = guardians_.length;\\n for (uint i = 0; i < guardiansLen; i++) {\\n _addGuardian(guardians_[i]);\\n }\\n }\\n }\\n\\n\\n // internal functions (views)\\n\\n function _verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n view\\n returns (bool)\\n {\\n address guardian = messageHash.recoverAddress(signature);\\n\\n return guardians[guardian];\\n }\\n\\n // private functions\\n\\n function _addGuardian(\\n address guardian\\n )\\n private\\n {\\n require(\\n guardian != address(0),\\n \\\"Guarded: cannot add 0x0 guardian\\\"\\n );\\n\\n require(\\n !guardians[guardian],\\n \\\"Guarded: guardian already exists\\\"\\n );\\n\\n guardians[guardian] = true;\\n\\n emit GuardianAdded(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n}\\n\",\"keccak256\":\"0x4a5f5670041362e87ea267d81c55fc3edc1a78e81f6f17524b13267f91f31458\",\"license\":\"MIT\"},\"src/common/account/Account.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../access/Controlled.sol\\\";\\nimport \\\"./AccountBase.sol\\\";\\n\\n\\n/**\\n * @title Account\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Account is Controlled, AccountBase {\\n address public implementation;\\n\\n /**\\n * @dev Public constructor\\n * @param registry_ account registry address\\n * @param implementation_ account implementation address\\n */\\n constructor(\\n address registry_,\\n address implementation_\\n )\\n public\\n Controlled()\\n {\\n registry = registry_;\\n implementation = implementation_;\\n }\\n\\n // external functions\\n\\n /**\\n * @notice Payable receive\\n */\\n receive()\\n external\\n payable\\n {\\n //\\n }\\n\\n /**\\n * @notice Fallback\\n */\\n // solhint-disable-next-line payable-fallback\\n fallback()\\n external\\n {\\n if (msg.data.length != 0) {\\n address implementation_ = implementation;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let calldedatasize := calldatasize()\\n\\n calldatacopy(0, 0, calldedatasize)\\n\\n let result := delegatecall(gas(), implementation_, 0, calldedatasize, 0, 0)\\n let returneddatasize := returndatasize()\\n\\n returndatacopy(0, 0, returneddatasize)\\n\\n switch result\\n case 0 { revert(0, returneddatasize) }\\n default { return(0, returneddatasize) }\\n }\\n }\\n }\\n\\n /**\\n * @notice Sets implementation\\n * @param implementation_ implementation address\\n */\\n function setImplementation(\\n address implementation_\\n )\\n external\\n onlyController\\n {\\n implementation = implementation_;\\n }\\n\\n /**\\n * @notice Executes transaction\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @return transaction result\\n */\\n function executeTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n onlyController\\n returns (bytes memory)\\n {\\n bytes memory result;\\n bool succeeded;\\n\\n // solhint-disable-next-line avoid-call-value, avoid-low-level-calls\\n (succeeded, result) = payable(to).call{value: value}(data);\\n\\n require(\\n succeeded,\\n \\\"Account: transaction reverted\\\"\\n );\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe516c999a02a65ee99487d398d0c12589500680a9ca08c852540fb9473d70a26\",\"license\":\"MIT\"},\"src/common/account/AccountBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Account base\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountBase {\\n address public registry;\\n}\\n\",\"keccak256\":\"0xcadf29e389f8db823e14f3f92808fd135f07b0135eb4dcf29b89c85941b39862\",\"license\":\"MIT\"},\"src/common/account/AccountController.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./Account.sol\\\";\\n\\n\\n/**\\n * @title Account controller\\n *\\n * @dev Contract module which provides Account deployment mechanism\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountController {\\n address public accountRegistry;\\n address public accountImplementation;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the account registry is updated\\n * @param accountRegistry account registry address\\n */\\n event AccountRegistryUpdated(\\n address accountRegistry\\n );\\n\\n /**\\n * @dev Emitted when the account implementation is updated\\n * @param accountImplementation account implementation address\\n */\\n event AccountImplementationUpdated(\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the account is deployed\\n * @param account account address\\n * @param accountImplementation account implementation address\\n */\\n event AccountDeployed(\\n address account,\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the account is upgraded\\n * @param account account address\\n * @param accountImplementation account implementation address\\n */\\n event AccountUpgraded(\\n address account,\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the transaction is executed\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @param response response\\n */\\n event AccountTransactionExecuted(\\n address account,\\n address to,\\n uint256 value,\\n bytes data,\\n bytes response\\n );\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `AccountController` contract\\n * @param accountRegistry_ account registry address\\n * @param accountImplementation_ account implementation address\\n */\\n function _initializeAccountController(\\n address accountRegistry_,\\n address accountImplementation_\\n )\\n internal\\n {\\n _setAccountRegistry(accountRegistry_, false);\\n _setAccountImplementation(accountImplementation_, false);\\n }\\n\\n /**\\n * @notice Sets account registry\\n * @param accountRegistry_ account registry address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _setAccountRegistry(\\n address accountRegistry_,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n accountRegistry_ != address(0),\\n \\\"AccountController: cannot set account registry to 0x0\\\"\\n );\\n\\n accountRegistry = accountRegistry_;\\n\\n if (emitEvent) {\\n emit AccountRegistryUpdated(accountRegistry);\\n }\\n }\\n\\n /**\\n * @notice Sets account implementation\\n * @param accountImplementation_ account implementation address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _setAccountImplementation(\\n address accountImplementation_,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n accountImplementation_ != address(0),\\n \\\"AccountController: cannot set account Implementation to 0x0\\\"\\n );\\n\\n accountImplementation = accountImplementation_;\\n\\n if (emitEvent) {\\n emit AccountImplementationUpdated(accountImplementation);\\n }\\n }\\n\\n /**\\n * @notice Deploys account\\n * @param salt CREATE2 salt\\n * @param emitEvent it will emit event when flag is set to true\\n * @return account address\\n */\\n function _deployAccount(\\n bytes32 salt,\\n bool emitEvent\\n )\\n internal\\n returns (address)\\n {\\n address account = address(new Account{salt: salt}(\\n accountRegistry,\\n accountImplementation\\n ));\\n\\n if (emitEvent) {\\n emit AccountDeployed(\\n account,\\n accountImplementation\\n );\\n }\\n\\n return account;\\n }\\n\\n /**\\n * @notice Upgrades account\\n * @param account account address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _upgradeAccount(\\n address account,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n Account(payable(account)).implementation() != accountImplementation,\\n \\\"AccountController: account already upgraded\\\"\\n );\\n\\n Account(payable(account)).setImplementation(accountImplementation);\\n\\n if (emitEvent) {\\n emit AccountUpgraded(\\n account,\\n accountImplementation\\n );\\n }\\n }\\n\\n /**\\n * @notice Executes transaction from the account\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @param emitEvent it will emit event when flag is set to true\\n * @return transaction result\\n */\\n function _executeAccountTransaction(\\n address account,\\n address to,\\n uint256 value,\\n bytes memory data,\\n bool emitEvent\\n )\\n internal\\n returns (bytes memory)\\n {\\n require(\\n to != address(0),\\n \\\"AccountController: cannot send to 0x0\\\"\\n );\\n\\n require(\\n to != address(this),\\n \\\"AccountController: cannot send to controller\\\"\\n );\\n\\n require(\\n to != account,\\n \\\"AccountController: cannot send to self\\\"\\n );\\n\\n bytes memory response = Account(payable(account)).executeTransaction(\\n to,\\n value,\\n data\\n );\\n\\n if (emitEvent) {\\n emit AccountTransactionExecuted(\\n account,\\n to,\\n value,\\n data,\\n response\\n );\\n }\\n\\n return response;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Computes account CREATE2 address\\n * @param salt CREATE2 salt\\n * @return account address\\n */\\n function _computeAccountAddress(\\n bytes32 salt\\n )\\n internal\\n view\\n returns (address)\\n {\\n bytes memory creationCode = abi.encodePacked(\\n type(Account).creationCode,\\n bytes12(0),\\n accountRegistry,\\n bytes12(0),\\n accountImplementation\\n );\\n\\n bytes32 data = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n salt,\\n keccak256(creationCode)\\n )\\n );\\n\\n return address(uint160(uint256(data)));\\n }\\n}\\n\",\"keccak256\":\"0xe161f1f4f6ea5d3a9810f7c93764d55e473abe1054e6aa68fde791be7d70a26c\",\"license\":\"MIT\"},\"src/common/account/AccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./Account.sol\\\";\\n\\n\\n/**\\n * @title Account registry\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nabstract contract AccountRegistry {\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param message message\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes calldata message,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0x2d40245721f5f74219e5cf88713246dbe8b6d5404e941125d3e850b1f127ec34\",\"license\":\"MIT\"},\"src/common/libs/BlockLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Block library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BlockLib {\\n struct BlockRelated {\\n bool added;\\n uint256 removedAtBlockNumber;\\n }\\n\\n /**\\n * @notice Verifies self struct at current block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtCurrentBlock(\\n BlockRelated memory self\\n )\\n internal\\n view\\n returns (bool)\\n {\\n return verifyAtBlock(self, block.number);\\n }\\n\\n /**\\n * @notice Verifies self struct at any block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtAnyBlock(\\n BlockRelated memory self\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n return verifyAtBlock(self, 0);\\n }\\n\\n /**\\n * @notice Verifies self struct at specific block\\n * @param self self struct\\n * @param blockNumber block number to verify\\n * @return true on correct self struct\\n */\\n function verifyAtBlock(\\n BlockRelated memory self,\\n uint256 blockNumber\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n bool result = false;\\n\\n if (self.added) {\\n if (self.removedAtBlockNumber == 0) {\\n result = true;\\n } else if (blockNumber == 0) {\\n result = true;\\n } else {\\n result = self.removedAtBlockNumber > blockNumber;\\n }\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9205536bc211f86d1113118a44dddfa7a9b9772a918cf4b1575c982a05472587\",\"license\":\"MIT\"},\"src/common/libs/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Bytes library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BytesLib {\\n /**\\n * @notice Converts bytes to address\\n * @param data data\\n * @return address\\n */\\n function toAddress(\\n bytes memory data\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result;\\n\\n require(\\n data.length == 20,\\n \\\"BytesLib: invalid data length\\\"\\n );\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := div(mload(add(data, 0x20)), 0x1000000000000000000000000)\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x64c84964ea91bfb1f2d859eea6c57fe5b4a6f269951a4adf5f58d306c54c7f76\",\"license\":\"MIT\"},\"src/common/libs/ECDSAExtendedLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./StringsLib.sol\\\";\\n\\n\\n/**\\n * @title ECDSA extended library\\n */\\nlibrary ECDSAExtendedLib {\\n using StringsLib for uint;\\n\\n function toEthereumSignedMessageHash(\\n bytes memory message\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n\\\",\\n message.length.toString(),\\n abi.encodePacked(message)\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x83e6056caaba892d91de45324f4d2702ac01695fab2d34c86895d7d288547ba3\",\"license\":\"MIT\"},\"src/common/libs/ECDSALib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ECDSA library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/cryptography/ECDSA.sol#L26\\n */\\nlibrary ECDSALib {\\n function recoverAddress(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n\\n if (v < 27) {\\n v += 27;\\n }\\n\\n if (v == 27 || v == 28) {\\n result = ecrecover(messageHash, v, r, s);\\n }\\n }\\n\\n return result;\\n }\\n\\n function toEthereumSignedMessageHash(\\n bytes32 messageHash\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n messageHash\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x3b1460d688302eb595268c2af147ab532f29dbced66520e013f48d498eed3cec\",\"license\":\"MIT\"},\"src/common/libs/SafeMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Safe math library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/math/SafeMath.sol\\n */\\nlibrary SafeMathLib {\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n\\n require(c >= a, \\\"SafeMathLib: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMathLib: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n\\n return a - b;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n\\n require(c / a == b, \\\"SafeMathLib: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMathLib: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n\\n return a / b;\\n }\\n\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMathLib: modulo by zero\\\");\\n }\\n\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x6089f354ca754d9c5dd9e800ee5ed86717dbf8f9af470604e0be691ac57c0107\",\"license\":\"MIT\"},\"src/common/libs/StringsLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Strings library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/utils/Strings.sol#L12\\n */\\nlibrary StringsLib {\\n function toString(\\n uint256 value\\n )\\n internal\\n pure\\n returns (string memory)\\n {\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n\\n uint256 temp = value;\\n uint256 digits;\\n\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n\\n while (temp != 0) {\\n buffer[index--] = byte(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0x4110150d0c921fd31db34ca33672de8e81c3ae467076149a3a546f804d1f58dd\",\"license\":\"MIT\"},\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/common/signature/SignatureValidator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n/**\\n * @title Signature validator\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract SignatureValidator {\\n using ECDSALib for bytes32;\\n\\n uint256 public chainId;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {\\n uint256 chainId_;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n chainId_ := chainid()\\n }\\n\\n chainId = chainId_;\\n }\\n\\n // internal functions\\n\\n function _hashMessagePayload(\\n bytes32 messagePrefix,\\n bytes memory messagePayload\\n )\\n internal\\n view\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n chainId,\\n address(this),\\n messagePrefix,\\n messagePayload\\n )).toEthereumSignedMessageHash();\\n }\\n}\\n\",\"keccak256\":\"0xc1168f7ccb74aea67089941dc5e4c1d1c4aa766afca47a90c0b017b8445b8acf\",\"license\":\"MIT\"},\"src/common/token/ERC20Token.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/SafeMathLib.sol\\\";\\n\\n\\n/**\\n * @title ERC20 token\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/token/ERC20/ERC20.sol\\n */\\ncontract ERC20Token {\\n using SafeMathLib for uint256;\\n\\n string public name;\\n string public symbol;\\n uint8 public decimals;\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) internal balances;\\n mapping(address => mapping(address => uint256)) internal allowances;\\n\\n // events\\n\\n event Transfer(\\n address indexed from,\\n address indexed to,\\n uint256 value\\n );\\n\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n function transfer(\\n address to,\\n uint256 value\\n )\\n external\\n returns (bool)\\n {\\n _transfer(_getSender(), to, value);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n address sender = _getSender();\\n\\n _transfer(from, to, value);\\n _approve(from, sender, allowances[from][sender].sub(value));\\n\\n return true;\\n }\\n\\n function approve(\\n address spender,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n _approve(_getSender(), spender, value);\\n\\n return true;\\n }\\n\\n // external functions (views)\\n\\n function balanceOf(\\n address owner\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return balances[owner];\\n }\\n\\n function allowance(\\n address owner,\\n address spender\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[owner][spender];\\n }\\n\\n // internal functions\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n from != address(0),\\n \\\"ERC20Token: cannot transfer from 0x0 address\\\"\\n );\\n require(\\n to != address(0),\\n \\\"ERC20Token: cannot transfer to 0x0 address\\\"\\n );\\n\\n balances[from] = balances[from].sub(value);\\n balances[to] = balances[to].add(value);\\n\\n emit Transfer(from, to, value);\\n }\\n\\n function _approve(\\n address owner,\\n address spender,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot approve from 0x0 address\\\"\\n );\\n require(\\n spender != address(0),\\n \\\"ERC20Token: cannot approve to 0x0 address\\\"\\n );\\n\\n allowances[owner][spender] = value;\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function _mint(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot mint to 0x0 address\\\"\\n );\\n require(\\n value > 0,\\n \\\"ERC20Token: cannot mint 0 value\\\"\\n );\\n\\n balances[owner] = balances[owner].add(value);\\n totalSupply = totalSupply.add(value);\\n\\n emit Transfer(address(0), owner, value);\\n }\\n\\n function _burn(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot burn from 0x0 address\\\"\\n );\\n\\n balances[owner] = balances[owner].sub(\\n value,\\n \\\"ERC20Token: burn value exceeds balance\\\"\\n );\\n\\n totalSupply = totalSupply.sub(value);\\n\\n emit Transfer(owner, address(0), value);\\n }\\n\\n // internal functions (views)\\n\\n function _getSender()\\n virtual\\n internal\\n view\\n returns (address)\\n {\\n return msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x6f2b0bd08da549c6c1f5ceee85766832d587dde62c56bebc3a14bd9ea407e03d\",\"license\":\"MIT\"},\"src/external/ExternalAccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BlockLib.sol\\\";\\n\\n\\n/**\\n * @title External account registry\\n *\\n * @notice Global registry for keys and external (outside of the platform) contract based wallets\\n *\\n * @dev An account can call the registry to add (`addAccountOwner`) or remove (`removeAccountOwner`) its own owners.\\n * When the owner has been added, information about that fact will live in the registry forever.\\n * Removing an owner only affects the future blocks (until the owner is re-added).\\n *\\n * Given the fact, there is no way to sign the data using a contract based wallet,\\n * we created a registry to store signed by the key wallet proofs.\\n * ERC-1271 allows removing a signer after the signature was created. Thus store the signature for the later use\\n * doesn't guarantee the signer is still has access to that smart account.\\n * Because of that, the ERC1271's `isValidSignature()` cannot be used in e.g. `PaymentRegistry`.*\\n *\\n * An account can call the registry to add (`addAccountProof`) or remove (`removeAccountProof`) proof hash.\\n * When the proof has been added, information about that fact will live in the registry forever.\\n * Removing a proof only affects the future blocks (until the proof is re-added).\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract ExternalAccountRegistry {\\n using BlockLib for BlockLib.BlockRelated;\\n\\n struct Account {\\n mapping(address => BlockLib.BlockRelated) owners;\\n mapping(bytes32 => BlockLib.BlockRelated) proofs;\\n }\\n\\n mapping(address => Account) private accounts;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the new owner is added\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerAdded(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the existing owner is removed\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerRemoved(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the new proof is added\\n * @param account account address\\n * @param hash proof hash\\n */\\n event AccountProofAdded(\\n address account,\\n bytes32 hash\\n );\\n\\n /**\\n * @dev Emitted when the existing proof is removed\\n * @param account account address\\n * @param hash proof hash\\n */\\n event AccountProofRemoved(\\n address account,\\n bytes32 hash\\n );\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new account owner\\n * @param owner owner address\\n */\\n function addAccountOwner(\\n address owner\\n )\\n external\\n {\\n require(\\n owner != address(0),\\n \\\"ExternalAccountRegistry: cannot add 0x0 owner\\\"\\n );\\n\\n require(\\n !accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: owner already exists\\\"\\n );\\n\\n accounts[msg.sender].owners[owner].added = true;\\n accounts[msg.sender].owners[owner].removedAtBlockNumber = 0;\\n\\n emit AccountOwnerAdded(\\n msg.sender,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Removes existing account owner\\n * @param owner owner address\\n */\\n function removeAccountOwner(\\n address owner\\n )\\n external\\n {\\n require(\\n accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: owner doesn't exist\\\"\\n );\\n\\n accounts[msg.sender].owners[owner].removedAtBlockNumber = block.number;\\n\\n emit AccountOwnerRemoved(\\n msg.sender,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Adds a new account proof\\n * @param hash proof hash\\n */\\n function addAccountProof(\\n bytes32 hash\\n )\\n external\\n {\\n require(\\n !accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: proof already exists\\\"\\n );\\n\\n accounts[msg.sender].proofs[hash].added = true;\\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = 0;\\n\\n emit AccountProofAdded(\\n msg.sender,\\n hash\\n );\\n }\\n\\n /**\\n * @notice Removes existing account proof\\n * @param hash proof hash\\n */\\n function removeAccountProof(\\n bytes32 hash\\n )\\n external\\n {\\n require(\\n accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: proof doesn't exist\\\"\\n );\\n\\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = block.number;\\n\\n emit AccountProofRemoved(\\n msg.sender,\\n hash\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Verifies the owner of the account at current block\\n * @param account account address\\n * @param owner owner address\\n * @return true on correct account owner\\n */\\n function verifyAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].owners[owner].verifyAtCurrentBlock();\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at specific block\\n * @param account account address\\n * @param owner owner address\\n * @param blockNumber block number to verify\\n * @return true on correct account owner\\n */\\n function verifyAccountOwnerAtBlock(\\n address account,\\n address owner,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].owners[owner].verifyAtBlock(blockNumber);\\n }\\n\\n /**\\n * @notice Verifies the proof of the account at current block\\n * @param account account address\\n * @param hash proof hash\\n * @return true on correct account proof\\n */\\n function verifyAccountProof(\\n address account,\\n bytes32 hash\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].proofs[hash].verifyAtCurrentBlock();\\n }\\n\\n /**\\n * @notice Verifies the proof of the account at specific block\\n * @param account account address\\n * @param hash proof hash\\n * @param blockNumber block number to verify\\n * @return true on correct account proof\\n */\\n function verifyAccountProofAtBlock(\\n address account,\\n bytes32 hash,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].proofs[hash].verifyAtBlock(blockNumber);\\n }\\n}\\n\",\"keccak256\":\"0x8067b1fae41b73949f8d871a835533cbdd94b9ca3faa93b91f595c37e632ccdb\",\"license\":\"MIT\"},\"src/gateway/Gateway.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../common/libs/ECDSALib.sol\\\";\\nimport \\\"../common/libs/SafeMathLib.sol\\\";\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"../common/signature/SignatureValidator.sol\\\";\\nimport \\\"../external/ExternalAccountRegistry.sol\\\";\\nimport \\\"../personal/PersonalAccountRegistry.sol\\\";\\n\\n\\n/**\\n * @title Gateway\\n *\\n * @notice GSN replacement\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Gateway is Initializable, SignatureValidator {\\n using ECDSALib for bytes32;\\n using SafeMathLib for uint256;\\n\\n struct DelegatedBatch {\\n address account;\\n uint256 nonce;\\n address[] to;\\n bytes[] data;\\n }\\n\\n struct DelegatedBatchWithGasPrice {\\n address account;\\n uint256 nonce;\\n address[] to;\\n bytes[] data;\\n uint256 gasPrice;\\n }\\n\\n bytes32 private constant HASH_PREFIX_DELEGATED_BATCH = keccak256(\\n \\\"DelegatedBatch(address account,uint256 nonce,address[] to,bytes[] data)\\\"\\n );\\n\\n bytes32 private constant HASH_PREFIX_DELEGATED_BATCH_WITH_GAS_PRICE = keccak256(\\n \\\"DelegatedBatchWithGasPrice(address account,uint256 nonce,address[] to,bytes[] data,uint256 gasPrice)\\\"\\n );\\n\\n ExternalAccountRegistry public externalAccountRegistry;\\n PersonalAccountRegistry public personalAccountRegistry;\\n\\n mapping(address => uint256) private accountNonce;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the single batch is delegated\\n * @param sender sender address\\n * @param batch batch\\n * @param succeeded if succeeded\\n */\\n event BatchDelegated(\\n address sender,\\n bytes batch,\\n bool succeeded\\n );\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Initializable() SignatureValidator() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `Gateway` contract\\n * @param externalAccountRegistry_ `ExternalAccountRegistry` contract address\\n * @param personalAccountRegistry_ `PersonalAccountRegistry` contract address\\n */\\n function initialize(\\n ExternalAccountRegistry externalAccountRegistry_,\\n PersonalAccountRegistry personalAccountRegistry_\\n )\\n external\\n onlyInitializer\\n {\\n externalAccountRegistry = externalAccountRegistry_;\\n personalAccountRegistry = personalAccountRegistry_;\\n }\\n\\n // public functions\\n\\n /**\\n * @notice Sends batch\\n * @dev `GatewayRecipient` context api:\\n * `_getContextAccount` will return `msg.sender`\\n * `_getContextSender` will return `msg.sender`\\n *\\n * @param to array of batch recipients contracts\\n * @param data array of batch data\\n */\\n function sendBatch(\\n address[] memory to,\\n bytes[] memory data\\n )\\n public\\n {\\n _sendBatch(\\n msg.sender,\\n msg.sender,\\n to,\\n data\\n );\\n }\\n\\n /**\\n * @notice Sends batch from the account\\n * @dev `GatewayRecipient` context api:\\n * `_getContextAccount` will return `account` arg\\n * `_getContextSender` will return `msg.sender`\\n *\\n * @param account account address\\n * @param to array of batch recipients contracts\\n * @param data array of batch data\\n */\\n function sendBatchFromAccount(\\n address account,\\n address[] memory to,\\n bytes[] memory data\\n )\\n public\\n {\\n _sendBatch(\\n account,\\n msg.sender,\\n to,\\n data\\n );\\n }\\n\\n /**\\n * @notice Delegates batch from the account\\n * @dev Use `hashDelegatedBatch` to create sender message payload.\\n *\\n * `GatewayRecipient` context api:\\n * `_getContextAccount` will return `account` arg\\n * `_getContextSender` will return recovered address from `senderSignature` arg\\n *\\n * @param account account address\\n * @param nonce next account nonce\\n * @param to array of batch recipients contracts\\n * @param data array of batch data\\n * @param senderSignature sender signature\\n */\\n function delegateBatch(\\n address account,\\n uint256 nonce,\\n address[] memory to,\\n bytes[] memory data,\\n bytes memory senderSignature\\n )\\n public\\n {\\n require(\\n nonce > accountNonce[account],\\n \\\"Gateway: nonce is lower than current account nonce\\\"\\n );\\n\\n address sender = _hashDelegatedBatch(\\n account,\\n nonce,\\n to,\\n data\\n ).recoverAddress(senderSignature);\\n\\n accountNonce[account] = nonce;\\n\\n _sendBatch(\\n account,\\n sender,\\n to,\\n data\\n );\\n }\\n\\n /**\\n * @notice Delegates batch from the account (with gas price)\\n *\\n * @dev Use `hashDelegatedBatchWithGasPrice` to create sender message payload (tx.gasprice as gasPrice)\\n *\\n * `GatewayRecipient` context api:\\n * `_getContextAccount` will return `account` arg\\n * `_getContextSender` will return recovered address from `senderSignature` arg\\n *\\n * @param account account address\\n * @param nonce next account nonce\\n * @param to array of batch recipients contracts\\n * @param data array of batch data\\n * @param senderSignature sender signature\\n */\\n function delegateBatchWithGasPrice(\\n address account,\\n uint256 nonce,\\n address[] memory to,\\n bytes[] memory data,\\n bytes memory senderSignature\\n )\\n public\\n {\\n require(\\n nonce > accountNonce[account],\\n \\\"Gateway: nonce is lower than current account nonce\\\"\\n );\\n\\n address sender = _hashDelegatedBatchWithGasPrice(\\n account,\\n nonce,\\n to,\\n data,\\n tx.gasprice\\n ).recoverAddress(senderSignature);\\n\\n accountNonce[account] = nonce;\\n\\n _sendBatch(\\n account,\\n sender,\\n to,\\n data\\n );\\n }\\n\\n /**\\n * @notice Delegates multiple batches\\n * @dev It will revert when all batches fail\\n * @param batches array of batches\\n * @param revertOnFailure reverts on any error\\n */\\n function delegateBatches(\\n bytes[] memory batches,\\n bool revertOnFailure\\n )\\n public\\n {\\n require(\\n batches.length > 0,\\n \\\"Gateway: cannot delegate empty batches\\\"\\n );\\n\\n bool anySucceeded;\\n\\n for (uint256 i = 0; i < batches.length; i++) {\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool succeeded,) = address(this).call(batches[i]);\\n\\n if (revertOnFailure) {\\n require(\\n succeeded,\\n \\\"Gateway: batch reverted\\\"\\n );\\n } else if (succeeded && !anySucceeded) {\\n anySucceeded = true;\\n }\\n\\n emit BatchDelegated(\\n msg.sender,\\n batches[i],\\n succeeded\\n );\\n }\\n\\n if (!anySucceeded) {\\n revert(\\\"Gateway: all batches reverted\\\");\\n }\\n }\\n\\n // public functions (views)\\n\\n /**\\n * @notice Hashes `DelegatedBatch` message payload\\n * @param delegatedBatch struct\\n * @return hash\\n */\\n function hashDelegatedBatch(\\n DelegatedBatch memory delegatedBatch\\n )\\n public\\n view\\n returns (bytes32)\\n {\\n return _hashDelegatedBatch(\\n delegatedBatch.account,\\n delegatedBatch.nonce,\\n delegatedBatch.to,\\n delegatedBatch.data\\n );\\n }\\n\\n /**\\n * @notice Hashes `DelegatedBatchWithGasPrice` message payload\\n * @param delegatedBatch struct\\n * @return hash\\n */\\n function hashDelegatedBatchWithGasPrice(\\n DelegatedBatchWithGasPrice memory delegatedBatch\\n )\\n public\\n view\\n returns (bytes32)\\n {\\n return _hashDelegatedBatchWithGasPrice(\\n delegatedBatch.account,\\n delegatedBatch.nonce,\\n delegatedBatch.to,\\n delegatedBatch.data,\\n delegatedBatch.gasPrice\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Gets next account nonce\\n * @param account account address\\n * @return next nonce\\n */\\n function getAccountNextNonce(\\n address account\\n )\\n external\\n view\\n returns (uint256)\\n {\\n return accountNonce[account].add(1);\\n }\\n\\n // private functions\\n\\n function _sendBatch(\\n address account,\\n address sender,\\n address[] memory to,\\n bytes[] memory data\\n )\\n private\\n {\\n require(\\n account != address(0),\\n \\\"Gateway: cannot send from 0x0 account\\\"\\n );\\n require(\\n to.length > 0,\\n \\\"Gateway: cannot send empty batch\\\"\\n );\\n require(\\n data.length == to.length,\\n \\\"Gateway: invalid batch\\\"\\n );\\n\\n if (account != sender) {\\n require(\\n personalAccountRegistry.verifyAccountOwner(account, sender) ||\\n externalAccountRegistry.verifyAccountOwner(account, sender),\\n \\\"Gateway: sender is not the account owner\\\"\\n );\\n }\\n\\n bool succeeded;\\n\\n for (uint256 i = 0; i < data.length; i++) {\\n require(\\n to[i] != address(0),\\n \\\"Gateway: cannot send to 0x0\\\"\\n );\\n\\n // solhint-disable-next-line avoid-low-level-calls\\n (succeeded,) = to[i].call(abi.encodePacked(data[i], account, sender));\\n\\n require(\\n succeeded,\\n \\\"Gateway: batch transaction reverted\\\"\\n );\\n }\\n }\\n\\n // private functions (views)\\n\\n function _hashDelegatedBatch(\\n address account,\\n uint256 nonce,\\n address[] memory to,\\n bytes[] memory data\\n )\\n private\\n view\\n returns (bytes32)\\n {\\n return _hashMessagePayload(HASH_PREFIX_DELEGATED_BATCH, abi.encodePacked(\\n account,\\n nonce,\\n to,\\n _concatBytes(data)\\n ));\\n }\\n\\n function _hashDelegatedBatchWithGasPrice(\\n address account,\\n uint256 nonce,\\n address[] memory to,\\n bytes[] memory data,\\n uint256 gasPrice\\n )\\n private\\n view\\n returns (bytes32)\\n {\\n return _hashMessagePayload(HASH_PREFIX_DELEGATED_BATCH_WITH_GAS_PRICE, abi.encodePacked(\\n account,\\n nonce,\\n to,\\n _concatBytes(data),\\n gasPrice\\n ));\\n }\\n\\n// private functions (pure)\\n\\n function _concatBytes(bytes[] memory data)\\n private\\n pure\\n returns (bytes memory)\\n {\\n bytes memory result;\\n uint dataLen = data.length;\\n\\n for (uint i = 0 ; i < dataLen ; i++) {\\n result = abi.encodePacked(result, data[i]);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x666f10ebf96aef0a37607852871a6e1d816a271558b1dce43dda74fc73274ae4\",\"license\":\"MIT\"},\"src/gateway/GatewayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BytesLib.sol\\\";\\n\\n\\n/**\\n * @title Gateway recipient\\n *\\n * @notice Gateway target contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract GatewayRecipient {\\n using BytesLib for bytes;\\n\\n address public gateway;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `GatewayRecipient` contract\\n * @param gateway_ `Gateway` contract address\\n */\\n function _initializeGatewayRecipient(\\n address gateway_\\n )\\n internal\\n {\\n gateway = gateway_;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Gets gateway context account\\n * @return context account address\\n */\\n function _getContextAccount()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(40);\\n }\\n\\n /**\\n * @notice Gets gateway context sender\\n * @return context sender address\\n */\\n function _getContextSender()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(20);\\n }\\n\\n /**\\n * @notice Gets gateway context data\\n * @return context data\\n */\\n function _getContextData()\\n internal\\n view\\n returns (bytes calldata)\\n {\\n bytes calldata result;\\n\\n if (_isGatewaySender()) {\\n result = msg.data[:msg.data.length - 40];\\n } else {\\n result = msg.data;\\n }\\n\\n return result;\\n }\\n\\n // private functions (views)\\n\\n function _getContextAddress(\\n uint256 offset\\n )\\n private\\n view\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (_isGatewaySender()) {\\n uint from = msg.data.length - offset;\\n result = bytes(msg.data[from:from + 20]).toAddress();\\n } else {\\n result = msg.sender;\\n }\\n\\n return result;\\n }\\n\\n function _isGatewaySender()\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (msg.sender == gateway) {\\n require(\\n msg.data.length >= 44,\\n \\\"GatewayRecipient: invalid msg.data\\\"\\n );\\n\\n result = true;\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe3fd29479d748d67360c61a9cbaafc66eaca25f476e59a45e842472bcf5233fc\",\"license\":\"MIT\"},\"src/personal/PersonalAccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/access/Guarded.sol\\\";\\nimport \\\"../common/account/AccountController.sol\\\";\\nimport \\\"../common/account/AccountRegistry.sol\\\";\\nimport \\\"../common/libs/BlockLib.sol\\\";\\nimport \\\"../common/libs/ECDSALib.sol\\\";\\nimport \\\"../common/libs/ECDSAExtendedLib.sol\\\";\\nimport \\\"../common/libs/SafeMathLib.sol\\\";\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"../common/token/ERC20Token.sol\\\";\\nimport \\\"../gateway/GatewayRecipient.sol\\\";\\n\\n\\n/**\\n * @title Personal account registry\\n *\\n * @notice A registry for personal (controlled by owners) accounts\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract PersonalAccountRegistry is Guarded, AccountController, AccountRegistry, Initializable, GatewayRecipient {\\n using BlockLib for BlockLib.BlockRelated;\\n using SafeMathLib for uint256;\\n using ECDSALib for bytes32;\\n using ECDSAExtendedLib for bytes;\\n\\n struct Account {\\n bool deployed;\\n bytes32 salt;\\n mapping(address => BlockLib.BlockRelated) owners;\\n }\\n\\n mapping(address => Account) private accounts;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the new owner is added\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerAdded(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the existing owner is removed\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerRemoved(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the call is refunded\\n * @param account account address\\n * @param beneficiary beneficiary address\\n * @param token token address\\n * @param value value\\n */\\n event AccountCallRefunded(\\n address account,\\n address beneficiary,\\n address token,\\n uint256 value\\n );\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Initializable() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `PersonalAccountRegistry` contract\\n * @param guardians_ array of guardians addresses\\n * @param accountImplementation_ account implementation address\\n * @param gateway_ `Gateway` contract address\\n */\\n function initialize(\\n address[] calldata guardians_,\\n address accountImplementation_,\\n address gateway_\\n )\\n external\\n onlyInitializer\\n {\\n // Guarded\\n _initializeGuarded(guardians_);\\n\\n // AccountController\\n _initializeAccountController(address(this), accountImplementation_);\\n\\n // GatewayRecipient\\n _initializeGatewayRecipient(gateway_);\\n }\\n\\n /**\\n * @notice Upgrades `PersonalAccountRegistry` contract\\n * @param accountImplementation_ account implementation address\\n */\\n function upgrade(\\n address accountImplementation_\\n )\\n external\\n onlyGuardian\\n {\\n _setAccountImplementation(accountImplementation_, true);\\n }\\n\\n /**\\n * @notice Deploys account\\n * @param account account address\\n */\\n function deployAccount(\\n address account\\n )\\n external\\n {\\n _verifySender(account);\\n _deployAccount(account);\\n }\\n\\n /**\\n * @notice Upgrades account\\n * @param account account address\\n */\\n function upgradeAccount(\\n address account\\n )\\n external\\n {\\n _verifySender(account);\\n _upgradeAccount(account, true);\\n }\\n\\n /**\\n * @notice Adds a new account owner\\n * @param account account address\\n * @param owner owner address\\n */\\n function addAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n {\\n _verifySender(account);\\n\\n require(\\n owner != address(0),\\n \\\"PersonalAccountRegistry: cannot add 0x0 owner\\\"\\n );\\n\\n require(\\n !accounts[account].owners[owner].verifyAtCurrentBlock(),\\n \\\"PersonalAccountRegistry: owner already exists\\\"\\n );\\n\\n accounts[account].owners[owner].added = true;\\n accounts[account].owners[owner].removedAtBlockNumber = 0;\\n\\n emit AccountOwnerAdded(\\n account,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Removes the existing account owner\\n * @param account account address\\n * @param owner owner address\\n */\\n function removeAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n {\\n address sender = _verifySender(account);\\n\\n require(\\n owner != sender,\\n \\\"PersonalAccountRegistry: cannot remove self\\\"\\n );\\n\\n require(\\n accounts[account].owners[owner].verifyAtCurrentBlock(),\\n \\\"PersonalAccountRegistry: owner doesn't exist\\\"\\n );\\n\\n accounts[account].owners[owner].removedAtBlockNumber = block.number;\\n\\n emit AccountOwnerRemoved(\\n account,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Executes account transaction\\n * @dev Deploys an account if not deployed yet\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n */\\n function executeAccountTransaction(\\n address account,\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n {\\n _verifySender(account);\\n\\n _deployAccount(account);\\n\\n _executeAccountTransaction(\\n account,\\n to,\\n value,\\n data,\\n true\\n );\\n }\\n\\n /**\\n * @notice Refunds account call\\n * @dev Deploys an account if not deployed yet\\n * @param account account address\\n * @param token token address\\n * @param value value\\n */\\n function refundAccountCall(\\n address account,\\n address token,\\n uint256 value\\n )\\n external\\n {\\n _verifySender(account);\\n\\n _deployAccount(account);\\n\\n /* solhint-disable avoid-tx-origin */\\n\\n if (token == address(0)) {\\n _executeAccountTransaction(\\n account,\\n tx.origin,\\n value,\\n new bytes(0),\\n false\\n );\\n } else {\\n bytes memory response = _executeAccountTransaction(\\n account,\\n token,\\n 0,\\n abi.encodeWithSelector(\\n ERC20Token(token).transfer.selector,\\n tx.origin,\\n value\\n ),\\n false\\n );\\n\\n if (response.length > 0) {\\n require(\\n abi.decode(response, (bool)),\\n \\\"PersonalAccountRegistry: ERC20Token transfer reverted\\\"\\n );\\n }\\n }\\n\\n emit AccountCallRefunded(\\n account,\\n tx.origin,\\n token,\\n value\\n );\\n\\n /* solhint-enable avoid-tx-origin */\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Computes account address\\n * @param saltOwner salt owner address\\n * @return account address\\n */\\n function computeAccountAddress(\\n address saltOwner\\n )\\n external\\n view\\n returns (address)\\n {\\n return _computeAccountAddress(saltOwner);\\n }\\n\\n /**\\n * @notice Checks if account is deployed\\n * @param account account address\\n * @return true when account is deployed\\n */\\n function isAccountDeployed(\\n address account\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].deployed;\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at the current block\\n * @param account account address\\n * @param owner owner address\\n * @return true on correct account owner\\n */\\n function verifyAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(account, owner);\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at a specific block\\n * @param account account address\\n * @param owner owner address\\n * @param blockNumber block number to verify\\n * @return true on correct account owner\\n */\\n function verifyAccountOwnerAtBlock(\\n address account,\\n address owner,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n bool result = false;\\n\\n if (_verifyAccountOwner(account, owner)) {\\n result = true;\\n } else {\\n result = accounts[account].owners[owner].verifyAtBlock(blockNumber);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param messageHash message hash\\n * @param signature signature\\n * @return magic hash if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n override\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(\\n account,\\n messageHash.recoverAddress(signature)\\n );\\n }\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param message message\\n * @param signature signature\\n * @return magic hash if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes calldata message,\\n bytes calldata signature\\n )\\n override\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(\\n account,\\n message.toEthereumSignedMessageHash().recoverAddress(signature)\\n );\\n }\\n\\n // private functions\\n\\n function _verifySender(\\n address account\\n )\\n private\\n returns (address)\\n {\\n address sender = _getContextSender();\\n\\n if (accounts[account].owners[sender].added) {\\n require(\\n accounts[account].owners[sender].removedAtBlockNumber == 0,\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n } else {\\n require(\\n accounts[account].salt == 0,\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n\\n bytes32 salt = keccak256(\\n abi.encodePacked(sender)\\n );\\n\\n require(\\n account == _computeAccountAddress(salt),\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n\\n accounts[account].salt = salt;\\n accounts[account].owners[sender].added = true;\\n\\n emit AccountOwnerAdded(\\n account,\\n sender\\n );\\n }\\n\\n return sender;\\n }\\n\\n function _deployAccount(\\n address account\\n )\\n internal\\n {\\n if (!accounts[account].deployed) {\\n _deployAccount(\\n accounts[account].salt,\\n true\\n );\\n\\n accounts[account].deployed = true;\\n }\\n }\\n\\n // private functions (views)\\n\\n function _computeAccountAddress(\\n address saltOwner\\n )\\n private\\n view\\n returns (address)\\n {\\n bytes32 salt = keccak256(\\n abi.encodePacked(saltOwner)\\n );\\n\\n return _computeAccountAddress(salt);\\n }\\n\\n function _verifyAccountOwner(\\n address account,\\n address owner\\n )\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (accounts[account].owners[owner].added) {\\n result = accounts[account].owners[owner].removedAtBlockNumber == 0;\\n } else if (accounts[account].salt == 0) {\\n result = account == _computeAccountAddress(owner);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xdae162610e707ab8c394b3edf924b75ef1f315520935cb88f4280b29eeaf4b61\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600046905080600181905550506123f58061006d6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063867519c61161008c5780639f255626116100665780639f255626146101fe578063b5021b161461021a578063d2c83b9a14610236578063f92c5f7c14610254576100cf565b8063867519c6146101a657806387d31313146101c25780639a8a0592146101e0576100cf565b8063231badaf146100d4578063392e53cd146100f0578063485cc9551461010e5780635afaa7bb1461012a57806373e5a13f1461014657806376db2b4c14610176575b600080fd5b6100ee60048036038101906100e99190611438565b610284565b005b6100f861037f565b6040516101059190611e71565b60405180910390f35b610128600480360381019061012391906115e0565b6103d5565b005b610144600480360381019061013f9190611563565b610561565b005b610160600480360381019061015b919061165d565b610739565b60405161016d9190611e8c565b60405180910390f35b610190600480360381019061018b919061161c565b61075e565b60405161019d9190611e8c565b60405180910390f35b6101c060048036038101906101bb91906113b9565b610788565b005b6101ca610799565b6040516101d79190611f07565b60405180910390f35b6101e86107bf565b6040516101f591906120a2565b60405180910390f35b610218600480360381019061021391906114f7565b6107c5565b005b610234600480360381019061022f9190611438565b6107d5565b005b61023e6108d1565b60405161024b9190611eec565b60405180910390f35b61026e60048036038101906102699190611390565b6108f7565b60405161027b91906120a2565b60405180910390f35b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411610305576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102fc90611f82565b60405180910390fd5b60006103258261031788888888610953565b6109b690919063ffffffff16565b905084600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061037786828686610a71565b505050505050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610463576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161045a90611f42565b60405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516105559190611def565b60405180910390a15050565b60008251116105a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059c90611fc2565b60405180910390fd5b600080600090505b83518110156106f35760003073ffffffffffffffffffffffffffffffffffffffff168583815181106105db57fe5b60200260200101516040516105f09190611d0b565b6000604051808303816000865af19150503d806000811461062d576040519150601f19603f3d011682016040523d82523d6000602084013e610632565b606091505b505090508315610681578061067c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067390611f62565b60405180910390fd5b610697565b80801561068c575082155b1561069657600192505b5b7f361c14722cc344132c73396113f7164232448b09c544a149f09048648b43d872338684815181106106c557fe5b6020026020010151836040516106dd93929190611e0a565b60405180910390a15080806001019150506105ad565b5080610734576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072b90612082565b60405180910390fd5b505050565b60006107578260000151836020015184604001518560600151610953565b9050919050565b600061078182600001518360200151846040015185606001518660800151610edc565b9050919050565b61079483338484610a71565b505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b6107d133338484610a71565b5050565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084d90611f82565b60405180910390fd5b600061087782610869888888883a610edc565b6109b690919063ffffffff16565b905084600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108c986828686610a71565b505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061094c6001600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f4290919063ffffffff16565b9050919050565b60006109ac7f6848d0622081db2451400280dead7a739a080cb93852607c381af11e289769b286868661098587610f97565b6040516020016109989493929190611c6e565b604051602081830303815290604052610ffa565b9050949350505050565b60008060009050604183511415610a675760008060006020860151925060408601519150606086015160001a9050601b8160ff1610156109f757601b810190505b601b8160ff161480610a0c5750601c8160ff16145b15610a635760018782858560405160008152602001604052604051610a349493929190611ea7565b6020604051602081039080840390855afa158015610a56573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad890611fa2565b60405180910390fd5b6000825111610b25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1c90612062565b60405180910390fd5b8151815114610b69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6090612002565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610d3d57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b8152600401610bf9929190611e48565b60206040518083038186803b158015610c1157600080fd5b505afa158015610c25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4991906115b7565b80610cfd5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b8152600401610cac929190611e48565b60206040518083038186803b158015610cc457600080fd5b505afa158015610cd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfc91906115b7565b5b610d3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3390611fe2565b60405180910390fd5b5b600080600090505b8251811015610ed457600073ffffffffffffffffffffffffffffffffffffffff16848281518110610d7257fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415610dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc890611f22565b60405180910390fd5b838181518110610ddd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16838281518110610e0757fe5b60200260200101518787604051602001610e2393929190611d22565b604051602081830303815290604052604051610e3f9190611d0b565b6000604051808303816000865af19150503d8060008114610e7c576040519150601f19603f3d011682016040523d82523d6000602084013e610e81565b606091505b50508092505081610ec7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ebe90612022565b60405180910390fd5b8080600101915050610d45565b505050505050565b6000610f377f6f4e1b2b1e5e49f4269e19e16e67a00cb0a796d96d30be3e4b540d3732e8bcad878787610f0e88610f97565b87604051602001610f23959493929190611cb4565b604051602081830303815290604052610ffa565b905095945050505050565b600080828401905083811015610f8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8490612042565b60405180910390fd5b8091505092915050565b60608060008351905060005b81811015610fef5782858281518110610fb857fe5b6020026020010151604051602001610fd1929190611d5b565b60405160208183030381529060405292508080600101915050610fa3565b508192505050919050565b60006110336001543085856040516020016110189493929190611da5565b6040516020818303038152906040528051906020012061103b565b905092915050565b60008160405160200161104e9190611d7f565b604051602081830303815290604052805190602001209050919050565b60008135905061107a81612375565b92915050565b600082601f83011261109157600080fd5b81356110a461109f826120ea565b6120bd565b915081818352602084019350602081019050838560208402820111156110c957600080fd5b60005b838110156110f957816110df888261106b565b8452602084019350602083019250506001810190506110cc565b5050505092915050565b600082601f83011261111457600080fd5b813561112761112282612112565b6120bd565b9150818183526020840193506020810190508360005b8381101561116d578135860161115388826111a1565b84526020840193506020830192505060018101905061113d565b5050505092915050565b6000813590506111868161238c565b92915050565b60008151905061119b8161238c565b92915050565b600082601f8301126111b257600080fd5b81356111c56111c08261213a565b6120bd565b915080825260208301602083018583830111156111e157600080fd5b6111ec8382846122dd565b50505092915050565b600081359050611204816123a3565b92915050565b600081359050611219816123ba565b92915050565b600060a0828403121561123157600080fd5b61123b60a06120bd565b9050600061124b8482850161106b565b600083015250602061125f8482850161137b565b602083015250604082013567ffffffffffffffff81111561127f57600080fd5b61128b84828501611080565b604083015250606082013567ffffffffffffffff8111156112ab57600080fd5b6112b784828501611103565b60608301525060806112cb8482850161137b565b60808301525092915050565b6000608082840312156112e957600080fd5b6112f360806120bd565b905060006113038482850161106b565b60008301525060206113178482850161137b565b602083015250604082013567ffffffffffffffff81111561133757600080fd5b61134384828501611080565b604083015250606082013567ffffffffffffffff81111561136357600080fd5b61136f84828501611103565b60608301525092915050565b60008135905061138a816123d1565b92915050565b6000602082840312156113a257600080fd5b60006113b08482850161106b565b91505092915050565b6000806000606084860312156113ce57600080fd5b60006113dc8682870161106b565b935050602084013567ffffffffffffffff8111156113f957600080fd5b61140586828701611080565b925050604084013567ffffffffffffffff81111561142257600080fd5b61142e86828701611103565b9150509250925092565b600080600080600060a0868803121561145057600080fd5b600061145e8882890161106b565b955050602061146f8882890161137b565b945050604086013567ffffffffffffffff81111561148c57600080fd5b61149888828901611080565b935050606086013567ffffffffffffffff8111156114b557600080fd5b6114c188828901611103565b925050608086013567ffffffffffffffff8111156114de57600080fd5b6114ea888289016111a1565b9150509295509295909350565b6000806040838503121561150a57600080fd5b600083013567ffffffffffffffff81111561152457600080fd5b61153085828601611080565b925050602083013567ffffffffffffffff81111561154d57600080fd5b61155985828601611103565b9150509250929050565b6000806040838503121561157657600080fd5b600083013567ffffffffffffffff81111561159057600080fd5b61159c85828601611103565b92505060206115ad85828601611177565b9150509250929050565b6000602082840312156115c957600080fd5b60006115d78482850161118c565b91505092915050565b600080604083850312156115f357600080fd5b6000611601858286016111f5565b92505060206116128582860161120a565b9150509250929050565b60006020828403121561162e57600080fd5b600082013567ffffffffffffffff81111561164857600080fd5b6116548482850161121f565b91505092915050565b60006020828403121561166f57600080fd5b600082013567ffffffffffffffff81111561168957600080fd5b611695848285016112d7565b91505092915050565b60006116aa83836116d4565b60208301905092915050565b6116bf8161225f565b82525050565b6116ce816121dc565b82525050565b6116dd816121dc565b82525050565b6116f46116ef826121dc565b61231f565b82525050565b600061170582612176565b61170f8185612199565b935061171a83612166565b8060005b8381101561174b578151611732888261169e565b975061173d8361218c565b92505060018101905061171e565b5085935050505092915050565b611761816121ee565b82525050565b611770816121fa565b82525050565b611787611782826121fa565b612331565b82525050565b600061179882612181565b6117a281856121a4565b93506117b28185602086016122ec565b6117bb81612357565b840191505092915050565b60006117d182612181565b6117db81856121b5565b93506117eb8185602086016122ec565b80840191505092915050565b61180081612271565b82525050565b61180f81612295565b82525050565b6000611822601b836121c0565b91507f476174657761793a2063616e6e6f742073656e6420746f2030783000000000006000830152602082019050919050565b6000611862601c836121d1565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b60006118a2602f836121c0565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b60006119086017836121c0565b91507f476174657761793a2062617463682072657665727465640000000000000000006000830152602082019050919050565b60006119486032836121c0565b91507f476174657761793a206e6f6e6365206973206c6f776572207468616e2063757260008301527f72656e74206163636f756e74206e6f6e636500000000000000000000000000006020830152604082019050919050565b60006119ae6025836121c0565b91507f476174657761793a2063616e6e6f742073656e642066726f6d2030783020616360008301527f636f756e740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a146026836121c0565b91507f476174657761793a2063616e6e6f742064656c656761746520656d707479206260008301527f61746368657300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a7a6028836121c0565b91507f476174657761793a2073656e646572206973206e6f7420746865206163636f7560008301527f6e74206f776e65720000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611ae06016836121c0565b91507f476174657761793a20696e76616c6964206261746368000000000000000000006000830152602082019050919050565b6000611b206023836121c0565b91507f476174657761793a206261746368207472616e73616374696f6e20726576657260008301527f74656400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611b86601e836121c0565b91507f536166654d6174684c69623a206164646974696f6e206f766572666c6f7700006000830152602082019050919050565b6000611bc66020836121c0565b91507f476174657761793a2063616e6e6f742073656e6420656d7074792062617463686000830152602082019050919050565b6000611c06601d836121c0565b91507f476174657761793a20616c6c20626174636865732072657665727465640000006000830152602082019050919050565b611c4281612248565b82525050565b611c59611c5482612248565b61234d565b82525050565b611c6881612252565b82525050565b6000611c7a82876116e3565b601482019150611c8a8286611c48565b602082019150611c9a82856116fa565b9150611ca682846117c6565b915081905095945050505050565b6000611cc082886116e3565b601482019150611cd08287611c48565b602082019150611ce082866116fa565b9150611cec82856117c6565b9150611cf88284611c48565b6020820191508190509695505050505050565b6000611d1782846117c6565b915081905092915050565b6000611d2e82866117c6565b9150611d3a82856116e3565b601482019150611d4a82846116e3565b601482019150819050949350505050565b6000611d6782856117c6565b9150611d7382846117c6565b91508190509392505050565b6000611d8a82611855565b9150611d968284611776565b60208201915081905092915050565b6000611db18287611c48565b602082019150611dc182866116e3565b601482019150611dd18285611776565b602082019150611de182846117c6565b915081905095945050505050565b6000602082019050611e0460008301846116b6565b92915050565b6000606082019050611e1f60008301866116b6565b8181036020830152611e31818561178d565b9050611e406040830184611758565b949350505050565b6000604082019050611e5d60008301856116c5565b611e6a60208301846116c5565b9392505050565b6000602082019050611e866000830184611758565b92915050565b6000602082019050611ea16000830184611767565b92915050565b6000608082019050611ebc6000830187611767565b611ec96020830186611c5f565b611ed66040830185611767565b611ee36060830184611767565b95945050505050565b6000602082019050611f0160008301846117f7565b92915050565b6000602082019050611f1c6000830184611806565b92915050565b60006020820190508181036000830152611f3b81611815565b9050919050565b60006020820190508181036000830152611f5b81611895565b9050919050565b60006020820190508181036000830152611f7b816118fb565b9050919050565b60006020820190508181036000830152611f9b8161193b565b9050919050565b60006020820190508181036000830152611fbb816119a1565b9050919050565b60006020820190508181036000830152611fdb81611a07565b9050919050565b60006020820190508181036000830152611ffb81611a6d565b9050919050565b6000602082019050818103600083015261201b81611ad3565b9050919050565b6000602082019050818103600083015261203b81611b13565b9050919050565b6000602082019050818103600083015261205b81611b79565b9050919050565b6000602082019050818103600083015261207b81611bb9565b9050919050565b6000602082019050818103600083015261209b81611bf9565b9050919050565b60006020820190506120b76000830184611c39565b92915050565b6000604051905081810181811067ffffffffffffffff821117156120e057600080fd5b8060405250919050565b600067ffffffffffffffff82111561210157600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561212957600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561215157600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006121e782612228565b9050919050565b60008115159050919050565b6000819050919050565b600061220f826121dc565b9050919050565b6000612221826121dc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061226a826122b9565b9050919050565b600061227c82612283565b9050919050565b600061228e82612228565b9050919050565b60006122a0826122a7565b9050919050565b60006122b282612228565b9050919050565b60006122c4826122cb565b9050919050565b60006122d682612228565b9050919050565b82818337600083830152505050565b60005b8381101561230a5780820151818401526020810190506122ef565b83811115612319576000848401525b50505050565b600061232a8261233b565b9050919050565b6000819050919050565b600061234682612368565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61237e816121dc565b811461238957600080fd5b50565b612395816121ee565b81146123a057600080fd5b50565b6123ac81612204565b81146123b757600080fd5b50565b6123c381612216565b81146123ce57600080fd5b50565b6123da81612248565b81146123e557600080fd5b5056fea164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063867519c61161008c5780639f255626116100665780639f255626146101fe578063b5021b161461021a578063d2c83b9a14610236578063f92c5f7c14610254576100cf565b8063867519c6146101a657806387d31313146101c25780639a8a0592146101e0576100cf565b8063231badaf146100d4578063392e53cd146100f0578063485cc9551461010e5780635afaa7bb1461012a57806373e5a13f1461014657806376db2b4c14610176575b600080fd5b6100ee60048036038101906100e99190611438565b610284565b005b6100f861037f565b6040516101059190611e71565b60405180910390f35b610128600480360381019061012391906115e0565b6103d5565b005b610144600480360381019061013f9190611563565b610561565b005b610160600480360381019061015b919061165d565b610739565b60405161016d9190611e8c565b60405180910390f35b610190600480360381019061018b919061161c565b61075e565b60405161019d9190611e8c565b60405180910390f35b6101c060048036038101906101bb91906113b9565b610788565b005b6101ca610799565b6040516101d79190611f07565b60405180910390f35b6101e86107bf565b6040516101f591906120a2565b60405180910390f35b610218600480360381019061021391906114f7565b6107c5565b005b610234600480360381019061022f9190611438565b6107d5565b005b61023e6108d1565b60405161024b9190611eec565b60405180910390f35b61026e60048036038101906102699190611390565b6108f7565b60405161027b91906120a2565b60405180910390f35b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411610305576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102fc90611f82565b60405180910390fd5b60006103258261031788888888610953565b6109b690919063ffffffff16565b905084600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061037786828686610a71565b505050505050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610463576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161045a90611f42565b60405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516105559190611def565b60405180910390a15050565b60008251116105a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059c90611fc2565b60405180910390fd5b600080600090505b83518110156106f35760003073ffffffffffffffffffffffffffffffffffffffff168583815181106105db57fe5b60200260200101516040516105f09190611d0b565b6000604051808303816000865af19150503d806000811461062d576040519150601f19603f3d011682016040523d82523d6000602084013e610632565b606091505b505090508315610681578061067c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067390611f62565b60405180910390fd5b610697565b80801561068c575082155b1561069657600192505b5b7f361c14722cc344132c73396113f7164232448b09c544a149f09048648b43d872338684815181106106c557fe5b6020026020010151836040516106dd93929190611e0a565b60405180910390a15080806001019150506105ad565b5080610734576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072b90612082565b60405180910390fd5b505050565b60006107578260000151836020015184604001518560600151610953565b9050919050565b600061078182600001518360200151846040015185606001518660800151610edc565b9050919050565b61079483338484610a71565b505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b6107d133338484610a71565b5050565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084d90611f82565b60405180910390fd5b600061087782610869888888883a610edc565b6109b690919063ffffffff16565b905084600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108c986828686610a71565b505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061094c6001600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f4290919063ffffffff16565b9050919050565b60006109ac7f6848d0622081db2451400280dead7a739a080cb93852607c381af11e289769b286868661098587610f97565b6040516020016109989493929190611c6e565b604051602081830303815290604052610ffa565b9050949350505050565b60008060009050604183511415610a675760008060006020860151925060408601519150606086015160001a9050601b8160ff1610156109f757601b810190505b601b8160ff161480610a0c5750601c8160ff16145b15610a635760018782858560405160008152602001604052604051610a349493929190611ea7565b6020604051602081039080840390855afa158015610a56573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad890611fa2565b60405180910390fd5b6000825111610b25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1c90612062565b60405180910390fd5b8151815114610b69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6090612002565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610d3d57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b8152600401610bf9929190611e48565b60206040518083038186803b158015610c1157600080fd5b505afa158015610c25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4991906115b7565b80610cfd5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b8152600401610cac929190611e48565b60206040518083038186803b158015610cc457600080fd5b505afa158015610cd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfc91906115b7565b5b610d3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3390611fe2565b60405180910390fd5b5b600080600090505b8251811015610ed457600073ffffffffffffffffffffffffffffffffffffffff16848281518110610d7257fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415610dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc890611f22565b60405180910390fd5b838181518110610ddd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16838281518110610e0757fe5b60200260200101518787604051602001610e2393929190611d22565b604051602081830303815290604052604051610e3f9190611d0b565b6000604051808303816000865af19150503d8060008114610e7c576040519150601f19603f3d011682016040523d82523d6000602084013e610e81565b606091505b50508092505081610ec7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ebe90612022565b60405180910390fd5b8080600101915050610d45565b505050505050565b6000610f377f6f4e1b2b1e5e49f4269e19e16e67a00cb0a796d96d30be3e4b540d3732e8bcad878787610f0e88610f97565b87604051602001610f23959493929190611cb4565b604051602081830303815290604052610ffa565b905095945050505050565b600080828401905083811015610f8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8490612042565b60405180910390fd5b8091505092915050565b60608060008351905060005b81811015610fef5782858281518110610fb857fe5b6020026020010151604051602001610fd1929190611d5b565b60405160208183030381529060405292508080600101915050610fa3565b508192505050919050565b60006110336001543085856040516020016110189493929190611da5565b6040516020818303038152906040528051906020012061103b565b905092915050565b60008160405160200161104e9190611d7f565b604051602081830303815290604052805190602001209050919050565b60008135905061107a81612375565b92915050565b600082601f83011261109157600080fd5b81356110a461109f826120ea565b6120bd565b915081818352602084019350602081019050838560208402820111156110c957600080fd5b60005b838110156110f957816110df888261106b565b8452602084019350602083019250506001810190506110cc565b5050505092915050565b600082601f83011261111457600080fd5b813561112761112282612112565b6120bd565b9150818183526020840193506020810190508360005b8381101561116d578135860161115388826111a1565b84526020840193506020830192505060018101905061113d565b5050505092915050565b6000813590506111868161238c565b92915050565b60008151905061119b8161238c565b92915050565b600082601f8301126111b257600080fd5b81356111c56111c08261213a565b6120bd565b915080825260208301602083018583830111156111e157600080fd5b6111ec8382846122dd565b50505092915050565b600081359050611204816123a3565b92915050565b600081359050611219816123ba565b92915050565b600060a0828403121561123157600080fd5b61123b60a06120bd565b9050600061124b8482850161106b565b600083015250602061125f8482850161137b565b602083015250604082013567ffffffffffffffff81111561127f57600080fd5b61128b84828501611080565b604083015250606082013567ffffffffffffffff8111156112ab57600080fd5b6112b784828501611103565b60608301525060806112cb8482850161137b565b60808301525092915050565b6000608082840312156112e957600080fd5b6112f360806120bd565b905060006113038482850161106b565b60008301525060206113178482850161137b565b602083015250604082013567ffffffffffffffff81111561133757600080fd5b61134384828501611080565b604083015250606082013567ffffffffffffffff81111561136357600080fd5b61136f84828501611103565b60608301525092915050565b60008135905061138a816123d1565b92915050565b6000602082840312156113a257600080fd5b60006113b08482850161106b565b91505092915050565b6000806000606084860312156113ce57600080fd5b60006113dc8682870161106b565b935050602084013567ffffffffffffffff8111156113f957600080fd5b61140586828701611080565b925050604084013567ffffffffffffffff81111561142257600080fd5b61142e86828701611103565b9150509250925092565b600080600080600060a0868803121561145057600080fd5b600061145e8882890161106b565b955050602061146f8882890161137b565b945050604086013567ffffffffffffffff81111561148c57600080fd5b61149888828901611080565b935050606086013567ffffffffffffffff8111156114b557600080fd5b6114c188828901611103565b925050608086013567ffffffffffffffff8111156114de57600080fd5b6114ea888289016111a1565b9150509295509295909350565b6000806040838503121561150a57600080fd5b600083013567ffffffffffffffff81111561152457600080fd5b61153085828601611080565b925050602083013567ffffffffffffffff81111561154d57600080fd5b61155985828601611103565b9150509250929050565b6000806040838503121561157657600080fd5b600083013567ffffffffffffffff81111561159057600080fd5b61159c85828601611103565b92505060206115ad85828601611177565b9150509250929050565b6000602082840312156115c957600080fd5b60006115d78482850161118c565b91505092915050565b600080604083850312156115f357600080fd5b6000611601858286016111f5565b92505060206116128582860161120a565b9150509250929050565b60006020828403121561162e57600080fd5b600082013567ffffffffffffffff81111561164857600080fd5b6116548482850161121f565b91505092915050565b60006020828403121561166f57600080fd5b600082013567ffffffffffffffff81111561168957600080fd5b611695848285016112d7565b91505092915050565b60006116aa83836116d4565b60208301905092915050565b6116bf8161225f565b82525050565b6116ce816121dc565b82525050565b6116dd816121dc565b82525050565b6116f46116ef826121dc565b61231f565b82525050565b600061170582612176565b61170f8185612199565b935061171a83612166565b8060005b8381101561174b578151611732888261169e565b975061173d8361218c565b92505060018101905061171e565b5085935050505092915050565b611761816121ee565b82525050565b611770816121fa565b82525050565b611787611782826121fa565b612331565b82525050565b600061179882612181565b6117a281856121a4565b93506117b28185602086016122ec565b6117bb81612357565b840191505092915050565b60006117d182612181565b6117db81856121b5565b93506117eb8185602086016122ec565b80840191505092915050565b61180081612271565b82525050565b61180f81612295565b82525050565b6000611822601b836121c0565b91507f476174657761793a2063616e6e6f742073656e6420746f2030783000000000006000830152602082019050919050565b6000611862601c836121d1565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b60006118a2602f836121c0565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b60006119086017836121c0565b91507f476174657761793a2062617463682072657665727465640000000000000000006000830152602082019050919050565b60006119486032836121c0565b91507f476174657761793a206e6f6e6365206973206c6f776572207468616e2063757260008301527f72656e74206163636f756e74206e6f6e636500000000000000000000000000006020830152604082019050919050565b60006119ae6025836121c0565b91507f476174657761793a2063616e6e6f742073656e642066726f6d2030783020616360008301527f636f756e740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a146026836121c0565b91507f476174657761793a2063616e6e6f742064656c656761746520656d707479206260008301527f61746368657300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a7a6028836121c0565b91507f476174657761793a2073656e646572206973206e6f7420746865206163636f7560008301527f6e74206f776e65720000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611ae06016836121c0565b91507f476174657761793a20696e76616c6964206261746368000000000000000000006000830152602082019050919050565b6000611b206023836121c0565b91507f476174657761793a206261746368207472616e73616374696f6e20726576657260008301527f74656400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611b86601e836121c0565b91507f536166654d6174684c69623a206164646974696f6e206f766572666c6f7700006000830152602082019050919050565b6000611bc66020836121c0565b91507f476174657761793a2063616e6e6f742073656e6420656d7074792062617463686000830152602082019050919050565b6000611c06601d836121c0565b91507f476174657761793a20616c6c20626174636865732072657665727465640000006000830152602082019050919050565b611c4281612248565b82525050565b611c59611c5482612248565b61234d565b82525050565b611c6881612252565b82525050565b6000611c7a82876116e3565b601482019150611c8a8286611c48565b602082019150611c9a82856116fa565b9150611ca682846117c6565b915081905095945050505050565b6000611cc082886116e3565b601482019150611cd08287611c48565b602082019150611ce082866116fa565b9150611cec82856117c6565b9150611cf88284611c48565b6020820191508190509695505050505050565b6000611d1782846117c6565b915081905092915050565b6000611d2e82866117c6565b9150611d3a82856116e3565b601482019150611d4a82846116e3565b601482019150819050949350505050565b6000611d6782856117c6565b9150611d7382846117c6565b91508190509392505050565b6000611d8a82611855565b9150611d968284611776565b60208201915081905092915050565b6000611db18287611c48565b602082019150611dc182866116e3565b601482019150611dd18285611776565b602082019150611de182846117c6565b915081905095945050505050565b6000602082019050611e0460008301846116b6565b92915050565b6000606082019050611e1f60008301866116b6565b8181036020830152611e31818561178d565b9050611e406040830184611758565b949350505050565b6000604082019050611e5d60008301856116c5565b611e6a60208301846116c5565b9392505050565b6000602082019050611e866000830184611758565b92915050565b6000602082019050611ea16000830184611767565b92915050565b6000608082019050611ebc6000830187611767565b611ec96020830186611c5f565b611ed66040830185611767565b611ee36060830184611767565b95945050505050565b6000602082019050611f0160008301846117f7565b92915050565b6000602082019050611f1c6000830184611806565b92915050565b60006020820190508181036000830152611f3b81611815565b9050919050565b60006020820190508181036000830152611f5b81611895565b9050919050565b60006020820190508181036000830152611f7b816118fb565b9050919050565b60006020820190508181036000830152611f9b8161193b565b9050919050565b60006020820190508181036000830152611fbb816119a1565b9050919050565b60006020820190508181036000830152611fdb81611a07565b9050919050565b60006020820190508181036000830152611ffb81611a6d565b9050919050565b6000602082019050818103600083015261201b81611ad3565b9050919050565b6000602082019050818103600083015261203b81611b13565b9050919050565b6000602082019050818103600083015261205b81611b79565b9050919050565b6000602082019050818103600083015261207b81611bb9565b9050919050565b6000602082019050818103600083015261209b81611bf9565b9050919050565b60006020820190506120b76000830184611c39565b92915050565b6000604051905081810181811067ffffffffffffffff821117156120e057600080fd5b8060405250919050565b600067ffffffffffffffff82111561210157600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561212957600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561215157600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006121e782612228565b9050919050565b60008115159050919050565b6000819050919050565b600061220f826121dc565b9050919050565b6000612221826121dc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061226a826122b9565b9050919050565b600061227c82612283565b9050919050565b600061228e82612228565b9050919050565b60006122a0826122a7565b9050919050565b60006122b282612228565b9050919050565b60006122c4826122cb565b9050919050565b60006122d682612228565b9050919050565b82818337600083830152505050565b60005b8381101561230a5780820151818401526020810190506122ef565b83811115612319576000848401525b50505050565b600061232a8261233b565b9050919050565b6000819050919050565b600061234682612368565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61237e816121dc565b811461238957600080fd5b50565b612395816121ee565b81146123a057600080fd5b50565b6123ac81612204565b81146123b757600080fd5b50565b6123c381612216565b81146123ce57600080fd5b50565b6123da81612248565b81146123e557600080fd5b5056fea164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "events": { + "BatchDelegated(address,bytes,bool)": { + "details": "Emitted when the single batch is delegated", + "params": { + "batch": "batch", + "sender": "sender address", + "succeeded": "if succeeded" + } + } + }, + "kind": "dev", + "methods": { + "constructor": { + "details": "Public constructor" + }, + "delegateBatch(address,uint256,address[],bytes[],bytes)": { + "details": "Use `hashDelegatedBatch` to create sender message payload. `GatewayRecipient` context api: `_getContextAccount` will return `account` arg `_getContextSender` will return recovered address from `senderSignature` arg", + "params": { + "account": "account address", + "data": "array of batch data", + "nonce": "next account nonce", + "senderSignature": "sender signature", + "to": "array of batch recipients contracts" + } + }, + "delegateBatchWithGasPrice(address,uint256,address[],bytes[],bytes)": { + "details": "Use `hashDelegatedBatchWithGasPrice` to create sender message payload (tx.gasprice as gasPrice) `GatewayRecipient` context api: `_getContextAccount` will return `account` arg `_getContextSender` will return recovered address from `senderSignature` arg", + "params": { + "account": "account address", + "data": "array of batch data", + "nonce": "next account nonce", + "senderSignature": "sender signature", + "to": "array of batch recipients contracts" + } + }, + "delegateBatches(bytes[],bool)": { + "details": "It will revert when all batches fail", + "params": { + "batches": "array of batches", + "revertOnFailure": "reverts on any error" + } + }, + "getAccountNextNonce(address)": { + "params": { + "account": "account address" + }, + "returns": { + "_0": "next nonce" + } + }, + "hashDelegatedBatch((address,uint256,address[],bytes[]))": { + "params": { + "delegatedBatch": "struct" + }, + "returns": { + "_0": "hash" + } + }, + "hashDelegatedBatchWithGasPrice((address,uint256,address[],bytes[],uint256))": { + "params": { + "delegatedBatch": "struct" + }, + "returns": { + "_0": "hash" + } + }, + "initialize(address,address)": { + "params": { + "externalAccountRegistry_": "`ExternalAccountRegistry` contract address", + "personalAccountRegistry_": "`PersonalAccountRegistry` contract address" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + }, + "sendBatch(address[],bytes[])": { + "details": "`GatewayRecipient` context api: `_getContextAccount` will return `msg.sender` `_getContextSender` will return `msg.sender`", + "params": { + "data": "array of batch data", + "to": "array of batch recipients contracts" + } + }, + "sendBatchFromAccount(address,address[],bytes[])": { + "details": "`GatewayRecipient` context api: `_getContextAccount` will return `account` arg `_getContextSender` will return `msg.sender`", + "params": { + "account": "account address", + "data": "array of batch data", + "to": "array of batch recipients contracts" + } + } + }, + "title": "Gateway", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "delegateBatch(address,uint256,address[],bytes[],bytes)": { + "notice": "Delegates batch from the account" + }, + "delegateBatchWithGasPrice(address,uint256,address[],bytes[],bytes)": { + "notice": "Delegates batch from the account (with gas price)" + }, + "delegateBatches(bytes[],bool)": { + "notice": "Delegates multiple batches" + }, + "getAccountNextNonce(address)": { + "notice": "Gets next account nonce" + }, + "hashDelegatedBatch((address,uint256,address[],bytes[]))": { + "notice": "Hashes `DelegatedBatch` message payload" + }, + "hashDelegatedBatchWithGasPrice((address,uint256,address[],bytes[],uint256))": { + "notice": "Hashes `DelegatedBatchWithGasPrice` message payload" + }, + "initialize(address,address)": { + "notice": "Initializes `Gateway` contract" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + }, + "sendBatch(address[],bytes[])": { + "notice": "Sends batch" + }, + "sendBatchFromAccount(address,address[],bytes[])": { + "notice": "Sends batch from the account" + } + }, + "notice": "GSN replacement", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1871, + "contract": "src/gateway/Gateway.sol:Gateway", + "label": "initializer", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1935, + "contract": "src/gateway/Gateway.sol:Gateway", + "label": "chainId", + "offset": 0, + "slot": "1", + "type": "t_uint256" + }, + { + "astId": 4647, + "contract": "src/gateway/Gateway.sol:Gateway", + "label": "externalAccountRegistry", + "offset": 0, + "slot": "2", + "type": "t_contract(ExternalAccountRegistry)4591" + }, + { + "astId": 4649, + "contract": "src/gateway/Gateway.sol:Gateway", + "label": "personalAccountRegistry", + "offset": 0, + "slot": "3", + "type": "t_contract(PersonalAccountRegistry)7452" + }, + { + "astId": 4653, + "contract": "src/gateway/Gateway.sol:Gateway", + "label": "accountNonce", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_contract(ExternalAccountRegistry)4591": { + "encoding": "inplace", + "label": "contract ExternalAccountRegistry", + "numberOfBytes": "20" + }, + "t_contract(PersonalAccountRegistry)7452": { + "encoding": "inplace", + "label": "contract PersonalAccountRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/OwnershipFacet.json b/deployments/fuseSparknet/OwnershipFacet.json new file mode 100644 index 00000000..f82ea18e --- /dev/null +++ b/deployments/fuseSparknet/OwnershipFacet.json @@ -0,0 +1,85 @@ +{ + "address": "0xdd43fA3fCB57F9F075F48F0FA564162a0eE7fa70", + "abi": [ + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "owner_", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xb65d9d8fa6bb8390d70c2dfd7341b91077ae8eec4fe4513d53ce61e636d12185", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "263109", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x2eeb624129c4e7e8aa54b7444ecddb744d99883c8f5ddd08ab4f36e4fce9a1ef", + "transactionHash": "0xb65d9d8fa6bb8390d70c2dfd7341b91077ae8eec4fe4513d53ce61e636d12185", + "logs": [], + "blockNumber": 5497598, + "cumulativeGasUsed": "263109", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "7a183f869f73d4ccd46c6d23b208518b", + "metadata": "{\"compiler\":{\"version\":\"0.8.4+commit.c7e474f2\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"returns\":{\"owner_\":\"The address of the owner.\"}},\"transferOwnership(address)\":{\"details\":\"Set _newOwner to address(0) to renounce any ownership.\",\"params\":{\"_newOwner\":\"The address of the new owner of the contract\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"owner()\":{\"notice\":\"Get the address of the owner\"},\"transferOwnership(address)\":{\"notice\":\"Set the address of the new owner of the contract\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/bridges/facets/OwnershipFacet.sol\":\"OwnershipFacet\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/bridges/facets/OwnershipFacet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { LibDiamond } from \\\"../libs/LibDiamond.sol\\\";\\nimport { IERC173 } from \\\"../interfaces/IERC173.sol\\\";\\n\\ncontract OwnershipFacet is IERC173 {\\n function transferOwnership(address _newOwner) external override {\\n LibDiamond.enforceIsContractOwner();\\n LibDiamond.setContractOwner(_newOwner);\\n }\\n\\n function owner() external view override returns (address owner_) {\\n owner_ = LibDiamond.contractOwner();\\n }\\n}\",\"keccak256\":\"0x5feebeb9ca9cff50e6a745b62ff9d3ae7de1bc5d61f2f9c99997560c9db195a9\",\"license\":\"MIT\"},\"src/bridges/interfaces/IDiamondCut.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\ninterface IDiamondCut {\\n enum FacetCutAction {\\n Add,\\n Replace,\\n Remove\\n }\\n // Add=0, Replace=1, Remove=2\\n\\n struct FacetCut {\\n address facetAddress;\\n FacetCutAction action;\\n bytes4[] functionSelectors;\\n }\\n\\n /// @notice Add/replace/remove any number of functions and optionally execute\\n /// a function with delegatecall\\n /// @param _diamondCut Contains the facet addresses and function selectors\\n /// @param _init The address of the contract or facet to execute _calldata\\n /// @param _calldata A function call, including function selector and arguments\\n /// _calldata is executed with delegatecall on _init\\n function diamondCut(\\n FacetCut[] calldata _diamondCut,\\n address _init,\\n bytes calldata _calldata\\n ) external;\\n\\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\\n}\\n\",\"keccak256\":\"0x608723d9599dc5de624ca7af0751f834bdff25c5b02bc9e817b6f490d3324069\",\"license\":\"MIT\"},\"src/bridges/interfaces/IERC173.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\n/// @title ERC-173 Contract Ownership Standard\\n/// Note: the ERC-165 identifier for this interface is 0x7f5828d0\\n/* is ERC165 */\\ninterface IERC173 {\\n /// @notice Get the address of the owner\\n /// @return owner_ The address of the owner.\\n function owner() external view returns (address owner_);\\n\\n /// @notice Set the address of the new owner of the contract\\n /// @dev Set _newOwner to address(0) to renounce any ownership.\\n /// @param _newOwner The address of the new owner of the contract\\n function transferOwnership(address _newOwner) external;\\n}\\n\",\"keccak256\":\"0xa05bf1c8a4181a509c5374e533e54debeca6a18bbe10972c49e4175ae9fda896\",\"license\":\"MIT\"},\"src/bridges/libs/LibDiamond.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.4;\\n\\nimport { IDiamondCut } from \\\"../interfaces/IDiamondCut.sol\\\";\\n\\nlibrary LibDiamond {\\n bytes32 internal constant DIAMOND_STORAGE_POSITION = keccak256(\\\"diamond.standard.diamond.storage\\\");\\n\\n struct FacetAddressAndPosition {\\n address facetAddress;\\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\\n }\\n\\n struct FacetFunctionSelectors {\\n bytes4[] functionSelectors;\\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\\n }\\n\\n struct DiamondStorage {\\n // maps function selector to the facet address and\\n // the position of the selector in the facetFunctionSelectors.selectors array\\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\\n // maps facet addresses to function selectors\\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\\n // facet addresses\\n address[] facetAddresses;\\n // Used to query if a contract implements an interface.\\n // Used to implement ERC-165.\\n mapping(bytes4 => bool) supportedInterfaces;\\n // owner of the contract\\n address contractOwner;\\n }\\n\\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\\n bytes32 position = DIAMOND_STORAGE_POSITION;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n ds.slot := position\\n }\\n }\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n function setContractOwner(address _newOwner) internal {\\n DiamondStorage storage ds = diamondStorage();\\n address previousOwner = ds.contractOwner;\\n ds.contractOwner = _newOwner;\\n emit OwnershipTransferred(previousOwner, _newOwner);\\n }\\n\\n function contractOwner() internal view returns (address contractOwner_) {\\n contractOwner_ = diamondStorage().contractOwner;\\n }\\n\\n function enforceIsContractOwner() internal view {\\n require(msg.sender == diamondStorage().contractOwner, \\\"LibDiamond: Must be contract owner\\\");\\n }\\n\\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\\n\\n // Internal function version of diamondCut\\n function diamondCut(\\n IDiamondCut.FacetCut[] memory _diamondCut,\\n address _init,\\n bytes memory _calldata\\n ) internal {\\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\\n if (action == IDiamondCut.FacetCutAction.Add) {\\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\\n } else {\\n revert(\\\"LibDiamondCut: Incorrect FacetCutAction\\\");\\n }\\n }\\n emit DiamondCut(_diamondCut, _init, _calldata);\\n initializeDiamondCut(_init, _calldata);\\n }\\n\\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress == address(0), \\\"LibDiamondCut: Can't add function that already exists\\\");\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Add facet can't be address(0)\\\");\\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\\n // add new facet address if it does not exist\\n if (selectorPosition == 0) {\\n addFacet(ds, _facetAddress);\\n }\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n require(oldFacetAddress != _facetAddress, \\\"LibDiamondCut: Can't replace function with same function\\\");\\n removeFunction(ds, oldFacetAddress, selector);\\n addFunction(ds, selector, selectorPosition, _facetAddress);\\n selectorPosition++;\\n }\\n }\\n\\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\\n require(_functionSelectors.length > 0, \\\"LibDiamondCut: No selectors in facet to cut\\\");\\n DiamondStorage storage ds = diamondStorage();\\n // if function does not exist then do nothing and return\\n require(_facetAddress == address(0), \\\"LibDiamondCut: Remove facet address must be address(0)\\\");\\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\\n bytes4 selector = _functionSelectors[selectorIndex];\\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\\n removeFunction(ds, oldFacetAddress, selector);\\n }\\n }\\n\\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\\n enforceHasContractCode(_facetAddress, \\\"LibDiamondCut: New facet has no code\\\");\\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\\n ds.facetAddresses.push(_facetAddress);\\n }\\n\\n function addFunction(\\n DiamondStorage storage ds,\\n bytes4 _selector,\\n uint96 _selectorPosition,\\n address _facetAddress\\n ) internal {\\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\\n }\\n\\n function removeFunction(\\n DiamondStorage storage ds,\\n address _facetAddress,\\n bytes4 _selector\\n ) internal {\\n require(_facetAddress != address(0), \\\"LibDiamondCut: Can't remove function that doesn't exist\\\");\\n // an immutable function is a function defined directly in a diamond\\n require(_facetAddress != address(this), \\\"LibDiamondCut: Can't remove immutable function\\\");\\n // replace selector with last selector, then delete last selector\\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\\n // if not the same then replace _selector with lastSelector\\n if (selectorPosition != lastSelectorPosition) {\\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\\n }\\n // delete the last selector\\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\\n delete ds.selectorToFacetAndPosition[_selector];\\n\\n // if no more selectors for facet address then delete the facet address\\n if (lastSelectorPosition == 0) {\\n // replace facet address with last facet address and delete last facet address\\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n if (facetAddressPosition != lastFacetAddressPosition) {\\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\\n }\\n ds.facetAddresses.pop();\\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\\n }\\n }\\n\\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\\n if (_init == address(0)) {\\n require(_calldata.length == 0, \\\"LibDiamondCut: _init is address(0) but_calldata is not empty\\\");\\n } else {\\n require(_calldata.length > 0, \\\"LibDiamondCut: _calldata is empty but _init is not address(0)\\\");\\n if (_init != address(this)) {\\n enforceHasContractCode(_init, \\\"LibDiamondCut: _init address has no code\\\");\\n }\\n // solhint-disable-next-line avoid-low-level-calls\\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\\n if (!success) {\\n if (error.length > 0) {\\n // bubble up the error\\n revert(string(error));\\n } else {\\n revert(\\\"LibDiamondCut: _init function reverted\\\");\\n }\\n }\\n }\\n }\\n\\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\\n uint256 contractSize;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n contractSize := extcodesize(_contract)\\n }\\n require(contractSize > 0, _errorMessage);\\n }\\n}\\n\",\"keccak256\":\"0x7a82c7c0bd4b049b5471c09127fad37873be021813abbe7ec07edb5a908c35e5\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b506103cb806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80638da5cb5b1461003b578063f2fde38b14610059575b600080fd5b610043610075565b60405161005091906102da565b60405180910390f35b610073600480360381019061006e919061027f565b610084565b005b600061007f610098565b905090565b61008c6100cb565b61009581610166565b50565b60006100a261023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6100d361023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015b906102f5565b60405180910390fd5b565b600061017061023d565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b600081359050610279816103a7565b92915050565b60006020828403121561029157600080fd5b600061029f8482850161026a565b91505092915050565b6102b181610326565b82525050565b60006102c4602283610315565b91506102cf82610358565b604082019050919050565b60006020820190506102ef60008301846102a8565b92915050565b6000602082019050818103600083015261030e816102b7565b9050919050565b600082825260208201905092915050565b600061033182610338565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b6103b081610326565b81146103bb57600080fd5b5056fea164736f6c6343000804000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80638da5cb5b1461003b578063f2fde38b14610059575b600080fd5b610043610075565b60405161005091906102da565b60405180910390f35b610073600480360381019061006e919061027f565b610084565b005b600061007f610098565b905090565b61008c6100cb565b61009581610166565b50565b60006100a261023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6100d361023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015b906102f5565b60405180910390fd5b565b600061017061023d565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b600081359050610279816103a7565b92915050565b60006020828403121561029157600080fd5b600061029f8482850161026a565b91505092915050565b6102b181610326565b82525050565b60006102c4602283610315565b91506102cf82610358565b604082019050919050565b60006020820190506102ef60008301846102a8565b92915050565b6000602082019050818103600083015261030e816102b7565b9050919050565b600082825260208201905092915050565b600061033182610338565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b6103b081610326565b81146103bb57600080fd5b5056fea164736f6c6343000804000a", + "devdoc": { + "kind": "dev", + "methods": { + "owner()": { + "returns": { + "owner_": "The address of the owner." + } + }, + "transferOwnership(address)": { + "details": "Set _newOwner to address(0) to renounce any ownership.", + "params": { + "_newOwner": "The address of the new owner of the contract" + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "owner()": { + "notice": "Get the address of the owner" + }, + "transferOwnership(address)": { + "notice": "Set the address of the new owner of the contract" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/PaymentRegistry.json b/deployments/fuseSparknet/PaymentRegistry.json new file mode 100644 index 00000000..43ad32c8 --- /dev/null +++ b/deployments/fuseSparknet/PaymentRegistry.json @@ -0,0 +1,1434 @@ +{ + "address": "0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "DepositAccountDeployed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "DepositExitCompleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "DepositExitRejected", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "lockedUntil", + "type": "uint256" + } + ], + "name": "DepositExitRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "depositAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "DepositWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "uid", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "PaymentChannelCommitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "channelHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "PaymentDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "channelHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalValue", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositValue", + "type": "uint256" + } + ], + "name": "PaymentSplit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "channelHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "PaymentWithdrawn", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "addGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "chainId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "uid", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "senderSignature", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "guardianSignature", + "type": "bytes" + } + ], + "name": "commitPaymentChannelAndDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "uid", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "depositPaymentValue", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "senderSignature", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "guardianSignature", + "type": "bytes" + } + ], + "name": "commitPaymentChannelAndSplit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "uid", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "senderSignature", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "guardianSignature", + "type": "bytes" + } + ], + "name": "commitPaymentChannelAndWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "computeDepositAccountAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "uid", + "type": "bytes32" + } + ], + "name": "computePaymentChannelHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "deployDepositAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "depositExitLockPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "externalAccountRegistry", + "outputs": [ + { + "internalType": "contract ExternalAccountRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "gateway", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "getDepositExitLockedUntil", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "getDepositWithdrawnAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "name": "getPaymentChannelCommittedAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct PaymentRegistry.DepositWithdrawal", + "name": "depositWithdrawal", + "type": "tuple" + } + ], + "name": "hashDepositWithdrawal", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "uid", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct PaymentRegistry.PaymentChannelCommit", + "name": "paymentChannelCommit", + "type": "tuple" + } + ], + "name": "hashPaymentChannelCommit", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ExternalAccountRegistry", + "name": "externalAccountRegistry_", + "type": "address" + }, + { + "internalType": "contract PersonalAccountRegistry", + "name": "personalAccountRegistry_", + "type": "address" + }, + { + "internalType": "uint256", + "name": "depositExitLockPeriod_", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "guardians_", + "type": "address[]" + }, + { + "internalType": "address", + "name": "gateway_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "isDepositAccountDeployed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "isGuardian", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "personalAccountRegistry", + "outputs": [ + { + "internalType": "contract PersonalAccountRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "processDepositExit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "removeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "requestDepositExit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "verifyGuardianSignature", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "guardianSignature", + "type": "bytes" + } + ], + "name": "withdrawDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x6c5375420adb40244862d193177f1bcb3bf6cf18bb53fd0693bca73d3693ca48", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "4298759", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xc872a9b697cc9bfacc72aec105bb61f1092ef70c58abb48b40e222cc971ebd76", + "transactionHash": "0x6c5375420adb40244862d193177f1bcb3bf6cf18bb53fd0693bca73d3693ca48", + "logs": [], + "blockNumber": 5497485, + "cumulativeGasUsed": "4298759", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"DepositAccountDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DepositExitCompleted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"DepositExitRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lockedUntil\",\"type\":\"uint256\"}],\"name\":\"DepositExitRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"depositAccount\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DepositWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"GuardianAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"GuardianRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"PaymentChannelCommitted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"channelHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"PaymentDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"channelHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalValue\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositValue\",\"type\":\"uint256\"}],\"name\":\"PaymentSplit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"channelHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"PaymentWithdrawn\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"addGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"senderSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"guardianSignature\",\"type\":\"bytes\"}],\"name\":\"commitPaymentChannelAndDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"depositPaymentValue\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"senderSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"guardianSignature\",\"type\":\"bytes\"}],\"name\":\"commitPaymentChannelAndSplit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"senderSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"guardianSignature\",\"type\":\"bytes\"}],\"name\":\"commitPaymentChannelAndWithdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"computeDepositAccountAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"}],\"name\":\"computePaymentChannelHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"deployDepositAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"depositExitLockPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"externalAccountRegistry\",\"outputs\":[{\"internalType\":\"contract ExternalAccountRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getDepositExitLockedUntil\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getDepositWithdrawnAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"getPaymentChannelCommittedAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct PaymentRegistry.DepositWithdrawal\",\"name\":\"depositWithdrawal\",\"type\":\"tuple\"}],\"name\":\"hashDepositWithdrawal\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"uid\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct PaymentRegistry.PaymentChannelCommit\",\"name\":\"paymentChannelCommit\",\"type\":\"tuple\"}],\"name\":\"hashPaymentChannelCommit\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ExternalAccountRegistry\",\"name\":\"externalAccountRegistry_\",\"type\":\"address\"},{\"internalType\":\"contract PersonalAccountRegistry\",\"name\":\"personalAccountRegistry_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"depositExitLockPeriod_\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"guardians_\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"gateway_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"isDepositAccountDeployed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"isGuardian\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"personalAccountRegistry\",\"outputs\":[{\"internalType\":\"contract PersonalAccountRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"processDepositExit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"removeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"requestDepositExit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"verifyGuardianSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"guardianSignature\",\"type\":\"bytes\"}],\"name\":\"withdrawDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"details\":\"the `DepositExit` process can be used in a case operator (guardian) couldn't sign commit / withdrawal message. Process will be rejected when any of senders channels will be committed.\",\"events\":{\"DepositAccountDeployed(address,address)\":{\"details\":\"Emitted when the deposit account is deployed\",\"params\":{\"depositAccount\":\"deposit account address\",\"owner\":\"owner address\"}},\"DepositExitCompleted(address,address,address,uint256)\":{\"details\":\"Emitted when the deposit exist is completed\",\"params\":{\"amount\":\"deposit exist amount\",\"depositAccount\":\"deposit account address\",\"owner\":\"owner address\",\"token\":\"token address\"}},\"DepositExitRejected(address,address,address)\":{\"details\":\"Emitted when the deposit exist is rejected\",\"params\":{\"depositAccount\":\"deposit account address\",\"owner\":\"owner address\",\"token\":\"token address\"}},\"DepositExitRequested(address,address,address,uint256)\":{\"details\":\"Emitted when the deposit exist is requested\",\"params\":{\"depositAccount\":\"deposit account address\",\"lockedUntil\":\"deposit exist locked util time\",\"owner\":\"owner address\",\"token\":\"token address\"}},\"DepositWithdrawn(address,address,address,uint256)\":{\"details\":\"Emitted when the deposit has been withdrawn\",\"params\":{\"amount\":\"withdrawn amount\",\"depositAccount\":\"deposit account address\",\"owner\":\"owner address\",\"token\":\"token address\"}},\"PaymentChannelCommitted(bytes32,address,address,address,bytes32,uint256)\":{\"details\":\"Emitted when the payment channel has been committed\",\"params\":{\"amount\":\"committed amount\",\"hash\":\"channel hash\",\"recipient\":\"recipient address\",\"sender\":\"sender address\",\"token\":\"token address\",\"uid\":\"unique channel id\"}},\"PaymentDeposited(bytes32,uint256)\":{\"details\":\"Emitted when the payment has been deposited\",\"params\":{\"channelHash\":\"channel hash\",\"value\":\"payment value\"}},\"PaymentSplit(bytes32,uint256,uint256)\":{\"details\":\"Emitted when the payment has been withdrawn and deposited (split)\",\"params\":{\"channelHash\":\"channel hash\",\"depositValue\":\"payment deposited value\",\"totalValue\":\"payment total value\"}},\"PaymentWithdrawn(bytes32,uint256)\":{\"details\":\"Emitted when the payment has been withdrawn\",\"params\":{\"channelHash\":\"channel hash\",\"value\":\"payment value\"}}},\"kind\":\"dev\",\"methods\":{\"addGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"}},\"commitPaymentChannelAndDeposit(address,address,bytes32,uint256,uint256,bytes,bytes)\":{\"params\":{\"amount\":\"amount to commit\",\"blockNumber\":\"block number\",\"guardianSignature\":\"guardian signature\",\"sender\":\"sender address\",\"senderSignature\":\"sender signature\",\"token\":\"token address\",\"uid\":\"unique channel id\"}},\"commitPaymentChannelAndSplit(address,address,bytes32,uint256,uint256,uint256,bytes,bytes)\":{\"params\":{\"amount\":\"amount to commit\",\"blockNumber\":\"block number\",\"depositPaymentValue\":\"amount to deposit\",\"guardianSignature\":\"guardian signature\",\"sender\":\"sender address\",\"senderSignature\":\"sender signature\",\"token\":\"token address\",\"uid\":\"unique channel id\"}},\"commitPaymentChannelAndWithdraw(address,address,bytes32,uint256,uint256,bytes,bytes)\":{\"params\":{\"amount\":\"amount to commit\",\"blockNumber\":\"block number\",\"guardianSignature\":\"guardian signature\",\"sender\":\"sender address\",\"senderSignature\":\"sender signature\",\"token\":\"token address\",\"uid\":\"unique channel id\"}},\"computeDepositAccountAddress(address)\":{\"params\":{\"owner\":\"owner address\"},\"returns\":{\"_0\":\"deposit account address\"}},\"computePaymentChannelHash(address,address,address,bytes32)\":{\"params\":{\"recipient\":\"recipient address\",\"sender\":\"sender address\",\"token\":\"token address\",\"uid\":\"unique channel id\"},\"returns\":{\"_0\":\"hash\"}},\"constructor\":{\"details\":\"Public constructor\"},\"deployDepositAccount(address)\":{\"params\":{\"owner\":\"owner address\"}},\"getDepositExitLockedUntil(address,address)\":{\"params\":{\"owner\":\"owner address\",\"token\":\"token address\"},\"returns\":{\"_0\":\"locked until time\"}},\"getDepositWithdrawnAmount(address,address)\":{\"params\":{\"owner\":\"owner address\",\"token\":\"token address\"},\"returns\":{\"_0\":\"withdrawn amount\"}},\"getPaymentChannelCommittedAmount(bytes32)\":{\"params\":{\"hash\":\"payment channel hash\"},\"returns\":{\"_0\":\"committed amount\"}},\"hashDepositWithdrawal((address,address,uint256))\":{\"params\":{\"depositWithdrawal\":\"struct\"},\"returns\":{\"_0\":\"hash\"}},\"hashPaymentChannelCommit((address,address,address,bytes32,uint256,uint256))\":{\"params\":{\"paymentChannelCommit\":\"struct\"},\"returns\":{\"_0\":\"hash\"}},\"initialize(address,address,uint256,address[],address)\":{\"params\":{\"depositExitLockPeriod_\":\"deposit exit lock period\",\"externalAccountRegistry_\":\"`ExternalAccountRegistry` contract address\",\"gateway_\":\"`Gateway` contract address\",\"guardians_\":\"array of guardians addresses\",\"personalAccountRegistry_\":\"`PersonalAccountRegistry` contract address\"}},\"isDepositAccountDeployed(address)\":{\"params\":{\"owner\":\"owner address\"},\"returns\":{\"_0\":\"true when deposit account is deployed\"}},\"isGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"},\"returns\":{\"_0\":\"true when guardian exists\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}},\"processDepositExit(address)\":{\"params\":{\"token\":\"token address\"}},\"removeGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"}},\"requestDepositExit(address)\":{\"params\":{\"token\":\"token address\"}},\"verifyGuardianSignature(bytes32,bytes)\":{\"params\":{\"messageHash\":\"message hash\",\"signature\":\"signature\"},\"returns\":{\"_0\":\"true on correct guardian signature\"}},\"withdrawDeposit(address,uint256,bytes)\":{\"params\":{\"amount\":\"amount to withdraw\",\"guardianSignature\":\"guardian signature\",\"token\":\"token address\"}}},\"title\":\"Payment registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addGuardian(address)\":{\"notice\":\"Adds a new guardian\"},\"commitPaymentChannelAndDeposit(address,address,bytes32,uint256,uint256,bytes,bytes)\":{\"notice\":\"Commits payment channel and deposit payment\"},\"commitPaymentChannelAndSplit(address,address,bytes32,uint256,uint256,uint256,bytes,bytes)\":{\"notice\":\"Commits payment channel, withdraws and deposits (split) payment\"},\"commitPaymentChannelAndWithdraw(address,address,bytes32,uint256,uint256,bytes,bytes)\":{\"notice\":\"Commits payment channel and withdraw payment\"},\"computeDepositAccountAddress(address)\":{\"notice\":\"Computes deposit account address\"},\"computePaymentChannelHash(address,address,address,bytes32)\":{\"notice\":\"Computes payment channel hash\"},\"deployDepositAccount(address)\":{\"notice\":\"Deploys deposit account\"},\"getDepositExitLockedUntil(address,address)\":{\"notice\":\"Gets deposit exit locked until time\"},\"getDepositWithdrawnAmount(address,address)\":{\"notice\":\"Gets deposit withdrawn amount\"},\"getPaymentChannelCommittedAmount(bytes32)\":{\"notice\":\"Gets payment channel committed amount\"},\"hashDepositWithdrawal((address,address,uint256))\":{\"notice\":\"Hashes `DepositWithdrawal` message payload\"},\"hashPaymentChannelCommit((address,address,address,bytes32,uint256,uint256))\":{\"notice\":\"Hashes `PaymentChannelCommit` message payload\"},\"initialize(address,address,uint256,address[],address)\":{\"notice\":\"Initialize `PaymentRegistry` contract\"},\"isDepositAccountDeployed(address)\":{\"notice\":\"Checks if deposit account is deployed\"},\"isGuardian(address)\":{\"notice\":\"Check if guardian exists\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"},\"processDepositExit(address)\":{\"notice\":\"Processes deposit exit\"},\"removeGuardian(address)\":{\"notice\":\"Removes the existing guardian\"},\"requestDepositExit(address)\":{\"notice\":\"Requests deposit exit\"},\"verifyGuardianSignature(bytes32,bytes)\":{\"notice\":\"Verifies guardian signature\"},\"withdrawDeposit(address,uint256,bytes)\":{\"notice\":\"Withdraws deposit\"}},\"notice\":\"A registry for payment and payment channels\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/payments/PaymentRegistry.sol\":\"PaymentRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/access/Controlled.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Controlled\\n *\\n * @dev Contract module which provides an access control mechanism.\\n * It ensures there is only one controlling account of the smart contract\\n * and grants that account exclusive access to specific functions.\\n *\\n * The controller account will be the one that deploys the contract.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Controlled {\\n /**\\n * @return controller account address\\n */\\n address public controller;\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if msg.sender is not the controller\\n */\\n modifier onlyController() {\\n require(\\n msg.sender == controller,\\n \\\"Controlled: msg.sender is not the controller\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n controller = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xdf03a0b7ec644da9925c5c1b6c8a86bb1cc1b9c5018bb265a1a4c5044b877af3\",\"license\":\"MIT\"},\"src/common/access/Guarded.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n\\n/**\\n * @title Guarded\\n *\\n * @dev Contract module which provides a guardian-type control mechanism.\\n * It allows key accounts to have guardians and restricts specific methods to be accessible by guardians only.\\n *\\n * Each guardian account can remove other guardians\\n *\\n * Use `_initializeGuarded` to initialize the contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Guarded {\\n using ECDSALib for bytes32;\\n\\n mapping(address => bool) private guardians;\\n\\n // events\\n\\n /**\\n * @dev Emitted when a new guardian is added\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianAdded(\\n address sender,\\n address guardian\\n );\\n\\n /**\\n * @dev Emitted when the existing guardian is removed\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianRemoved(\\n address sender,\\n address guardian\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not a guardian account\\n */\\n modifier onlyGuardian() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n guardians[tx.origin],\\n \\\"Guarded: tx.origin is not the guardian\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new guardian\\n * @param guardian guardian address\\n */\\n function addGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n _addGuardian(guardian);\\n }\\n\\n /**\\n * @notice Removes the existing guardian\\n * @param guardian guardian address\\n */\\n function removeGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin != guardian,\\n \\\"Guarded: cannot remove self\\\"\\n );\\n\\n require(\\n guardians[guardian],\\n \\\"Guarded: guardian doesn't exist\\\"\\n );\\n\\n guardians[guardian] = false;\\n\\n emit GuardianRemoved(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if guardian exists\\n * @param guardian guardian address\\n * @return true when guardian exists\\n */\\n function isGuardian(\\n address guardian\\n )\\n external\\n view\\n returns (bool)\\n {\\n return guardians[guardian];\\n }\\n\\n /**\\n * @notice Verifies guardian signature\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true on correct guardian signature\\n */\\n function verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyGuardianSignature(\\n messageHash,\\n signature\\n );\\n }\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `Guarded` contract\\n * @dev If `guardians_` array is empty `tx.origin` is added as guardian account\\n * @param guardians_ array of guardians addresses\\n */\\n function _initializeGuarded(\\n address[] memory guardians_\\n )\\n internal\\n {\\n if (guardians_.length == 0) {\\n // solhint-disable-next-line avoid-tx-origin\\n _addGuardian(tx.origin);\\n } else {\\n uint guardiansLen = guardians_.length;\\n for (uint i = 0; i < guardiansLen; i++) {\\n _addGuardian(guardians_[i]);\\n }\\n }\\n }\\n\\n\\n // internal functions (views)\\n\\n function _verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n view\\n returns (bool)\\n {\\n address guardian = messageHash.recoverAddress(signature);\\n\\n return guardians[guardian];\\n }\\n\\n // private functions\\n\\n function _addGuardian(\\n address guardian\\n )\\n private\\n {\\n require(\\n guardian != address(0),\\n \\\"Guarded: cannot add 0x0 guardian\\\"\\n );\\n\\n require(\\n !guardians[guardian],\\n \\\"Guarded: guardian already exists\\\"\\n );\\n\\n guardians[guardian] = true;\\n\\n emit GuardianAdded(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n}\\n\",\"keccak256\":\"0x4a5f5670041362e87ea267d81c55fc3edc1a78e81f6f17524b13267f91f31458\",\"license\":\"MIT\"},\"src/common/account/Account.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../access/Controlled.sol\\\";\\nimport \\\"./AccountBase.sol\\\";\\n\\n\\n/**\\n * @title Account\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Account is Controlled, AccountBase {\\n address public implementation;\\n\\n /**\\n * @dev Public constructor\\n * @param registry_ account registry address\\n * @param implementation_ account implementation address\\n */\\n constructor(\\n address registry_,\\n address implementation_\\n )\\n public\\n Controlled()\\n {\\n registry = registry_;\\n implementation = implementation_;\\n }\\n\\n // external functions\\n\\n /**\\n * @notice Payable receive\\n */\\n receive()\\n external\\n payable\\n {\\n //\\n }\\n\\n /**\\n * @notice Fallback\\n */\\n // solhint-disable-next-line payable-fallback\\n fallback()\\n external\\n {\\n if (msg.data.length != 0) {\\n address implementation_ = implementation;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let calldedatasize := calldatasize()\\n\\n calldatacopy(0, 0, calldedatasize)\\n\\n let result := delegatecall(gas(), implementation_, 0, calldedatasize, 0, 0)\\n let returneddatasize := returndatasize()\\n\\n returndatacopy(0, 0, returneddatasize)\\n\\n switch result\\n case 0 { revert(0, returneddatasize) }\\n default { return(0, returneddatasize) }\\n }\\n }\\n }\\n\\n /**\\n * @notice Sets implementation\\n * @param implementation_ implementation address\\n */\\n function setImplementation(\\n address implementation_\\n )\\n external\\n onlyController\\n {\\n implementation = implementation_;\\n }\\n\\n /**\\n * @notice Executes transaction\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @return transaction result\\n */\\n function executeTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n onlyController\\n returns (bytes memory)\\n {\\n bytes memory result;\\n bool succeeded;\\n\\n // solhint-disable-next-line avoid-call-value, avoid-low-level-calls\\n (succeeded, result) = payable(to).call{value: value}(data);\\n\\n require(\\n succeeded,\\n \\\"Account: transaction reverted\\\"\\n );\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe516c999a02a65ee99487d398d0c12589500680a9ca08c852540fb9473d70a26\",\"license\":\"MIT\"},\"src/common/account/AccountBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Account base\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountBase {\\n address public registry;\\n}\\n\",\"keccak256\":\"0xcadf29e389f8db823e14f3f92808fd135f07b0135eb4dcf29b89c85941b39862\",\"license\":\"MIT\"},\"src/common/account/AccountController.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./Account.sol\\\";\\n\\n\\n/**\\n * @title Account controller\\n *\\n * @dev Contract module which provides Account deployment mechanism\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountController {\\n address public accountRegistry;\\n address public accountImplementation;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the account registry is updated\\n * @param accountRegistry account registry address\\n */\\n event AccountRegistryUpdated(\\n address accountRegistry\\n );\\n\\n /**\\n * @dev Emitted when the account implementation is updated\\n * @param accountImplementation account implementation address\\n */\\n event AccountImplementationUpdated(\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the account is deployed\\n * @param account account address\\n * @param accountImplementation account implementation address\\n */\\n event AccountDeployed(\\n address account,\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the account is upgraded\\n * @param account account address\\n * @param accountImplementation account implementation address\\n */\\n event AccountUpgraded(\\n address account,\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the transaction is executed\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @param response response\\n */\\n event AccountTransactionExecuted(\\n address account,\\n address to,\\n uint256 value,\\n bytes data,\\n bytes response\\n );\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `AccountController` contract\\n * @param accountRegistry_ account registry address\\n * @param accountImplementation_ account implementation address\\n */\\n function _initializeAccountController(\\n address accountRegistry_,\\n address accountImplementation_\\n )\\n internal\\n {\\n _setAccountRegistry(accountRegistry_, false);\\n _setAccountImplementation(accountImplementation_, false);\\n }\\n\\n /**\\n * @notice Sets account registry\\n * @param accountRegistry_ account registry address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _setAccountRegistry(\\n address accountRegistry_,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n accountRegistry_ != address(0),\\n \\\"AccountController: cannot set account registry to 0x0\\\"\\n );\\n\\n accountRegistry = accountRegistry_;\\n\\n if (emitEvent) {\\n emit AccountRegistryUpdated(accountRegistry);\\n }\\n }\\n\\n /**\\n * @notice Sets account implementation\\n * @param accountImplementation_ account implementation address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _setAccountImplementation(\\n address accountImplementation_,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n accountImplementation_ != address(0),\\n \\\"AccountController: cannot set account Implementation to 0x0\\\"\\n );\\n\\n accountImplementation = accountImplementation_;\\n\\n if (emitEvent) {\\n emit AccountImplementationUpdated(accountImplementation);\\n }\\n }\\n\\n /**\\n * @notice Deploys account\\n * @param salt CREATE2 salt\\n * @param emitEvent it will emit event when flag is set to true\\n * @return account address\\n */\\n function _deployAccount(\\n bytes32 salt,\\n bool emitEvent\\n )\\n internal\\n returns (address)\\n {\\n address account = address(new Account{salt: salt}(\\n accountRegistry,\\n accountImplementation\\n ));\\n\\n if (emitEvent) {\\n emit AccountDeployed(\\n account,\\n accountImplementation\\n );\\n }\\n\\n return account;\\n }\\n\\n /**\\n * @notice Upgrades account\\n * @param account account address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _upgradeAccount(\\n address account,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n Account(payable(account)).implementation() != accountImplementation,\\n \\\"AccountController: account already upgraded\\\"\\n );\\n\\n Account(payable(account)).setImplementation(accountImplementation);\\n\\n if (emitEvent) {\\n emit AccountUpgraded(\\n account,\\n accountImplementation\\n );\\n }\\n }\\n\\n /**\\n * @notice Executes transaction from the account\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @param emitEvent it will emit event when flag is set to true\\n * @return transaction result\\n */\\n function _executeAccountTransaction(\\n address account,\\n address to,\\n uint256 value,\\n bytes memory data,\\n bool emitEvent\\n )\\n internal\\n returns (bytes memory)\\n {\\n require(\\n to != address(0),\\n \\\"AccountController: cannot send to 0x0\\\"\\n );\\n\\n require(\\n to != address(this),\\n \\\"AccountController: cannot send to controller\\\"\\n );\\n\\n require(\\n to != account,\\n \\\"AccountController: cannot send to self\\\"\\n );\\n\\n bytes memory response = Account(payable(account)).executeTransaction(\\n to,\\n value,\\n data\\n );\\n\\n if (emitEvent) {\\n emit AccountTransactionExecuted(\\n account,\\n to,\\n value,\\n data,\\n response\\n );\\n }\\n\\n return response;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Computes account CREATE2 address\\n * @param salt CREATE2 salt\\n * @return account address\\n */\\n function _computeAccountAddress(\\n bytes32 salt\\n )\\n internal\\n view\\n returns (address)\\n {\\n bytes memory creationCode = abi.encodePacked(\\n type(Account).creationCode,\\n bytes12(0),\\n accountRegistry,\\n bytes12(0),\\n accountImplementation\\n );\\n\\n bytes32 data = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n salt,\\n keccak256(creationCode)\\n )\\n );\\n\\n return address(uint160(uint256(data)));\\n }\\n}\\n\",\"keccak256\":\"0xe161f1f4f6ea5d3a9810f7c93764d55e473abe1054e6aa68fde791be7d70a26c\",\"license\":\"MIT\"},\"src/common/account/AccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./Account.sol\\\";\\n\\n\\n/**\\n * @title Account registry\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nabstract contract AccountRegistry {\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param message message\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes calldata message,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0x2d40245721f5f74219e5cf88713246dbe8b6d5404e941125d3e850b1f127ec34\",\"license\":\"MIT\"},\"src/common/libs/BlockLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Block library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BlockLib {\\n struct BlockRelated {\\n bool added;\\n uint256 removedAtBlockNumber;\\n }\\n\\n /**\\n * @notice Verifies self struct at current block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtCurrentBlock(\\n BlockRelated memory self\\n )\\n internal\\n view\\n returns (bool)\\n {\\n return verifyAtBlock(self, block.number);\\n }\\n\\n /**\\n * @notice Verifies self struct at any block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtAnyBlock(\\n BlockRelated memory self\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n return verifyAtBlock(self, 0);\\n }\\n\\n /**\\n * @notice Verifies self struct at specific block\\n * @param self self struct\\n * @param blockNumber block number to verify\\n * @return true on correct self struct\\n */\\n function verifyAtBlock(\\n BlockRelated memory self,\\n uint256 blockNumber\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n bool result = false;\\n\\n if (self.added) {\\n if (self.removedAtBlockNumber == 0) {\\n result = true;\\n } else if (blockNumber == 0) {\\n result = true;\\n } else {\\n result = self.removedAtBlockNumber > blockNumber;\\n }\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9205536bc211f86d1113118a44dddfa7a9b9772a918cf4b1575c982a05472587\",\"license\":\"MIT\"},\"src/common/libs/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Bytes library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BytesLib {\\n /**\\n * @notice Converts bytes to address\\n * @param data data\\n * @return address\\n */\\n function toAddress(\\n bytes memory data\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result;\\n\\n require(\\n data.length == 20,\\n \\\"BytesLib: invalid data length\\\"\\n );\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := div(mload(add(data, 0x20)), 0x1000000000000000000000000)\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x64c84964ea91bfb1f2d859eea6c57fe5b4a6f269951a4adf5f58d306c54c7f76\",\"license\":\"MIT\"},\"src/common/libs/ECDSAExtendedLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./StringsLib.sol\\\";\\n\\n\\n/**\\n * @title ECDSA extended library\\n */\\nlibrary ECDSAExtendedLib {\\n using StringsLib for uint;\\n\\n function toEthereumSignedMessageHash(\\n bytes memory message\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n\\\",\\n message.length.toString(),\\n abi.encodePacked(message)\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x83e6056caaba892d91de45324f4d2702ac01695fab2d34c86895d7d288547ba3\",\"license\":\"MIT\"},\"src/common/libs/ECDSALib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ECDSA library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/cryptography/ECDSA.sol#L26\\n */\\nlibrary ECDSALib {\\n function recoverAddress(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n\\n if (v < 27) {\\n v += 27;\\n }\\n\\n if (v == 27 || v == 28) {\\n result = ecrecover(messageHash, v, r, s);\\n }\\n }\\n\\n return result;\\n }\\n\\n function toEthereumSignedMessageHash(\\n bytes32 messageHash\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n messageHash\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x3b1460d688302eb595268c2af147ab532f29dbced66520e013f48d498eed3cec\",\"license\":\"MIT\"},\"src/common/libs/SafeMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Safe math library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/math/SafeMath.sol\\n */\\nlibrary SafeMathLib {\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n\\n require(c >= a, \\\"SafeMathLib: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMathLib: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n\\n return a - b;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n\\n require(c / a == b, \\\"SafeMathLib: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMathLib: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n\\n return a / b;\\n }\\n\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMathLib: modulo by zero\\\");\\n }\\n\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x6089f354ca754d9c5dd9e800ee5ed86717dbf8f9af470604e0be691ac57c0107\",\"license\":\"MIT\"},\"src/common/libs/StringsLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Strings library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/utils/Strings.sol#L12\\n */\\nlibrary StringsLib {\\n function toString(\\n uint256 value\\n )\\n internal\\n pure\\n returns (string memory)\\n {\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n\\n uint256 temp = value;\\n uint256 digits;\\n\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n\\n while (temp != 0) {\\n buffer[index--] = byte(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0x4110150d0c921fd31db34ca33672de8e81c3ae467076149a3a546f804d1f58dd\",\"license\":\"MIT\"},\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/common/signature/SignatureValidator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n/**\\n * @title Signature validator\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract SignatureValidator {\\n using ECDSALib for bytes32;\\n\\n uint256 public chainId;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {\\n uint256 chainId_;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n chainId_ := chainid()\\n }\\n\\n chainId = chainId_;\\n }\\n\\n // internal functions\\n\\n function _hashMessagePayload(\\n bytes32 messagePrefix,\\n bytes memory messagePayload\\n )\\n internal\\n view\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n chainId,\\n address(this),\\n messagePrefix,\\n messagePayload\\n )).toEthereumSignedMessageHash();\\n }\\n}\\n\",\"keccak256\":\"0xc1168f7ccb74aea67089941dc5e4c1d1c4aa766afca47a90c0b017b8445b8acf\",\"license\":\"MIT\"},\"src/common/token/ERC20Token.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/SafeMathLib.sol\\\";\\n\\n\\n/**\\n * @title ERC20 token\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/token/ERC20/ERC20.sol\\n */\\ncontract ERC20Token {\\n using SafeMathLib for uint256;\\n\\n string public name;\\n string public symbol;\\n uint8 public decimals;\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) internal balances;\\n mapping(address => mapping(address => uint256)) internal allowances;\\n\\n // events\\n\\n event Transfer(\\n address indexed from,\\n address indexed to,\\n uint256 value\\n );\\n\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n function transfer(\\n address to,\\n uint256 value\\n )\\n external\\n returns (bool)\\n {\\n _transfer(_getSender(), to, value);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n address sender = _getSender();\\n\\n _transfer(from, to, value);\\n _approve(from, sender, allowances[from][sender].sub(value));\\n\\n return true;\\n }\\n\\n function approve(\\n address spender,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n _approve(_getSender(), spender, value);\\n\\n return true;\\n }\\n\\n // external functions (views)\\n\\n function balanceOf(\\n address owner\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return balances[owner];\\n }\\n\\n function allowance(\\n address owner,\\n address spender\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[owner][spender];\\n }\\n\\n // internal functions\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n from != address(0),\\n \\\"ERC20Token: cannot transfer from 0x0 address\\\"\\n );\\n require(\\n to != address(0),\\n \\\"ERC20Token: cannot transfer to 0x0 address\\\"\\n );\\n\\n balances[from] = balances[from].sub(value);\\n balances[to] = balances[to].add(value);\\n\\n emit Transfer(from, to, value);\\n }\\n\\n function _approve(\\n address owner,\\n address spender,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot approve from 0x0 address\\\"\\n );\\n require(\\n spender != address(0),\\n \\\"ERC20Token: cannot approve to 0x0 address\\\"\\n );\\n\\n allowances[owner][spender] = value;\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function _mint(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot mint to 0x0 address\\\"\\n );\\n require(\\n value > 0,\\n \\\"ERC20Token: cannot mint 0 value\\\"\\n );\\n\\n balances[owner] = balances[owner].add(value);\\n totalSupply = totalSupply.add(value);\\n\\n emit Transfer(address(0), owner, value);\\n }\\n\\n function _burn(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot burn from 0x0 address\\\"\\n );\\n\\n balances[owner] = balances[owner].sub(\\n value,\\n \\\"ERC20Token: burn value exceeds balance\\\"\\n );\\n\\n totalSupply = totalSupply.sub(value);\\n\\n emit Transfer(owner, address(0), value);\\n }\\n\\n // internal functions (views)\\n\\n function _getSender()\\n virtual\\n internal\\n view\\n returns (address)\\n {\\n return msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x6f2b0bd08da549c6c1f5ceee85766832d587dde62c56bebc3a14bd9ea407e03d\",\"license\":\"MIT\"},\"src/external/ExternalAccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BlockLib.sol\\\";\\n\\n\\n/**\\n * @title External account registry\\n *\\n * @notice Global registry for keys and external (outside of the platform) contract based wallets\\n *\\n * @dev An account can call the registry to add (`addAccountOwner`) or remove (`removeAccountOwner`) its own owners.\\n * When the owner has been added, information about that fact will live in the registry forever.\\n * Removing an owner only affects the future blocks (until the owner is re-added).\\n *\\n * Given the fact, there is no way to sign the data using a contract based wallet,\\n * we created a registry to store signed by the key wallet proofs.\\n * ERC-1271 allows removing a signer after the signature was created. Thus store the signature for the later use\\n * doesn't guarantee the signer is still has access to that smart account.\\n * Because of that, the ERC1271's `isValidSignature()` cannot be used in e.g. `PaymentRegistry`.*\\n *\\n * An account can call the registry to add (`addAccountProof`) or remove (`removeAccountProof`) proof hash.\\n * When the proof has been added, information about that fact will live in the registry forever.\\n * Removing a proof only affects the future blocks (until the proof is re-added).\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract ExternalAccountRegistry {\\n using BlockLib for BlockLib.BlockRelated;\\n\\n struct Account {\\n mapping(address => BlockLib.BlockRelated) owners;\\n mapping(bytes32 => BlockLib.BlockRelated) proofs;\\n }\\n\\n mapping(address => Account) private accounts;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the new owner is added\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerAdded(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the existing owner is removed\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerRemoved(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the new proof is added\\n * @param account account address\\n * @param hash proof hash\\n */\\n event AccountProofAdded(\\n address account,\\n bytes32 hash\\n );\\n\\n /**\\n * @dev Emitted when the existing proof is removed\\n * @param account account address\\n * @param hash proof hash\\n */\\n event AccountProofRemoved(\\n address account,\\n bytes32 hash\\n );\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new account owner\\n * @param owner owner address\\n */\\n function addAccountOwner(\\n address owner\\n )\\n external\\n {\\n require(\\n owner != address(0),\\n \\\"ExternalAccountRegistry: cannot add 0x0 owner\\\"\\n );\\n\\n require(\\n !accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: owner already exists\\\"\\n );\\n\\n accounts[msg.sender].owners[owner].added = true;\\n accounts[msg.sender].owners[owner].removedAtBlockNumber = 0;\\n\\n emit AccountOwnerAdded(\\n msg.sender,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Removes existing account owner\\n * @param owner owner address\\n */\\n function removeAccountOwner(\\n address owner\\n )\\n external\\n {\\n require(\\n accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: owner doesn't exist\\\"\\n );\\n\\n accounts[msg.sender].owners[owner].removedAtBlockNumber = block.number;\\n\\n emit AccountOwnerRemoved(\\n msg.sender,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Adds a new account proof\\n * @param hash proof hash\\n */\\n function addAccountProof(\\n bytes32 hash\\n )\\n external\\n {\\n require(\\n !accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: proof already exists\\\"\\n );\\n\\n accounts[msg.sender].proofs[hash].added = true;\\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = 0;\\n\\n emit AccountProofAdded(\\n msg.sender,\\n hash\\n );\\n }\\n\\n /**\\n * @notice Removes existing account proof\\n * @param hash proof hash\\n */\\n function removeAccountProof(\\n bytes32 hash\\n )\\n external\\n {\\n require(\\n accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\\n \\\"ExternalAccountRegistry: proof doesn't exist\\\"\\n );\\n\\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = block.number;\\n\\n emit AccountProofRemoved(\\n msg.sender,\\n hash\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Verifies the owner of the account at current block\\n * @param account account address\\n * @param owner owner address\\n * @return true on correct account owner\\n */\\n function verifyAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].owners[owner].verifyAtCurrentBlock();\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at specific block\\n * @param account account address\\n * @param owner owner address\\n * @param blockNumber block number to verify\\n * @return true on correct account owner\\n */\\n function verifyAccountOwnerAtBlock(\\n address account,\\n address owner,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].owners[owner].verifyAtBlock(blockNumber);\\n }\\n\\n /**\\n * @notice Verifies the proof of the account at current block\\n * @param account account address\\n * @param hash proof hash\\n * @return true on correct account proof\\n */\\n function verifyAccountProof(\\n address account,\\n bytes32 hash\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].proofs[hash].verifyAtCurrentBlock();\\n }\\n\\n /**\\n * @notice Verifies the proof of the account at specific block\\n * @param account account address\\n * @param hash proof hash\\n * @param blockNumber block number to verify\\n * @return true on correct account proof\\n */\\n function verifyAccountProofAtBlock(\\n address account,\\n bytes32 hash,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].proofs[hash].verifyAtBlock(blockNumber);\\n }\\n}\\n\",\"keccak256\":\"0x8067b1fae41b73949f8d871a835533cbdd94b9ca3faa93b91f595c37e632ccdb\",\"license\":\"MIT\"},\"src/gateway/GatewayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BytesLib.sol\\\";\\n\\n\\n/**\\n * @title Gateway recipient\\n *\\n * @notice Gateway target contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract GatewayRecipient {\\n using BytesLib for bytes;\\n\\n address public gateway;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `GatewayRecipient` contract\\n * @param gateway_ `Gateway` contract address\\n */\\n function _initializeGatewayRecipient(\\n address gateway_\\n )\\n internal\\n {\\n gateway = gateway_;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Gets gateway context account\\n * @return context account address\\n */\\n function _getContextAccount()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(40);\\n }\\n\\n /**\\n * @notice Gets gateway context sender\\n * @return context sender address\\n */\\n function _getContextSender()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(20);\\n }\\n\\n /**\\n * @notice Gets gateway context data\\n * @return context data\\n */\\n function _getContextData()\\n internal\\n view\\n returns (bytes calldata)\\n {\\n bytes calldata result;\\n\\n if (_isGatewaySender()) {\\n result = msg.data[:msg.data.length - 40];\\n } else {\\n result = msg.data;\\n }\\n\\n return result;\\n }\\n\\n // private functions (views)\\n\\n function _getContextAddress(\\n uint256 offset\\n )\\n private\\n view\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (_isGatewaySender()) {\\n uint from = msg.data.length - offset;\\n result = bytes(msg.data[from:from + 20]).toAddress();\\n } else {\\n result = msg.sender;\\n }\\n\\n return result;\\n }\\n\\n function _isGatewaySender()\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (msg.sender == gateway) {\\n require(\\n msg.data.length >= 44,\\n \\\"GatewayRecipient: invalid msg.data\\\"\\n );\\n\\n result = true;\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe3fd29479d748d67360c61a9cbaafc66eaca25f476e59a45e842472bcf5233fc\",\"license\":\"MIT\"},\"src/payments/PaymentDepositAccount.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/access/Controlled.sol\\\";\\n\\n\\n/**\\n * @title Payment deposit account\\n *\\n * @dev Simple account contract with only one method - `executeTransaction`\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract PaymentDepositAccount is Controlled {\\n /**\\n * @dev Public constructor\\n */\\n constructor() public payable Controlled() {}\\n\\n /**\\n * @notice Allow receives\\n */\\n receive()\\n external\\n payable\\n {\\n //\\n }\\n\\n // external functions\\n\\n /**\\n * @notice Executes transaction\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @return transaction result\\n */\\n function executeTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n onlyController\\n returns (bytes memory)\\n {\\n bytes memory result;\\n bool succeeded;\\n\\n // solhint-disable-next-line avoid-call-value, avoid-low-level-calls\\n (succeeded, result) = payable(to).call{value: value}(data);\\n\\n require(\\n succeeded,\\n \\\"Account: transaction reverted\\\"\\n );\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xeac8f6b6b1cb749d72d8d5160a622fe4100a1e18a73635e51ce30e6f11029ad1\",\"license\":\"MIT\"},\"src/payments/PaymentRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\npragma experimental ABIEncoderV2;\\n\\nimport \\\"../common/access/Guarded.sol\\\";\\nimport \\\"../common/libs/ECDSALib.sol\\\";\\nimport \\\"../common/libs/SafeMathLib.sol\\\";\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"../common/signature/SignatureValidator.sol\\\";\\nimport \\\"../common/token/ERC20Token.sol\\\";\\nimport \\\"../external/ExternalAccountRegistry.sol\\\";\\nimport \\\"../personal/PersonalAccountRegistry.sol\\\";\\nimport \\\"../gateway/GatewayRecipient.sol\\\";\\nimport \\\"./PaymentDepositAccount.sol\\\";\\n\\n\\n/**\\n * @title Payment registry\\n *\\n * @notice A registry for payment and payment channels\\n *\\n * @dev the `DepositExit` process can be used in a case operator (guardian) couldn't sign commit / withdrawal message.\\n * Process will be rejected when any of senders channels will be committed.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract PaymentRegistry is Guarded, Initializable, SignatureValidator, GatewayRecipient {\\n using ECDSALib for bytes32;\\n using SafeMathLib for uint256;\\n\\n struct Deposit {\\n address account;\\n mapping(address => uint256) withdrawnAmount;\\n mapping(address => uint256) exitLockedUntil;\\n }\\n\\n struct PaymentChannel {\\n uint256 committedAmount;\\n }\\n\\n struct DepositWithdrawal {\\n address owner;\\n address token;\\n uint256 amount;\\n }\\n\\n struct PaymentChannelCommit {\\n address sender;\\n address recipient;\\n address token;\\n bytes32 uid;\\n uint256 blockNumber;\\n uint256 amount;\\n }\\n\\n uint256 private constant DEFAULT_DEPOSIT_EXIT_LOCK_PERIOD = 28 days;\\n\\n bytes32 private constant HASH_PREFIX_DEPOSIT_WITHDRAWAL = keccak256(\\n \\\"DepositWithdrawal(address owner,address token,uint256 amount)\\\"\\n );\\n bytes32 private constant HASH_PREFIX_PAYMENT_CHANNEL_COMMIT = keccak256(\\n \\\"PaymentChannelCommit(address sender,address recipient,address token,bytes32 uid,uint256 blockNumber,uint256 amount)\\\"\\n );\\n\\n ExternalAccountRegistry public externalAccountRegistry;\\n PersonalAccountRegistry public personalAccountRegistry;\\n\\n uint256 public depositExitLockPeriod;\\n\\n mapping(address => Deposit) private deposits;\\n mapping(bytes32 => PaymentChannel) private paymentChannels;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the deposit account is deployed\\n * @param depositAccount deposit account address\\n * @param owner owner address\\n */\\n event DepositAccountDeployed(\\n address depositAccount,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the deposit exist is requested\\n * @param depositAccount deposit account address\\n * @param owner owner address\\n * @param token token address\\n * @param lockedUntil deposit exist locked util time\\n */\\n event DepositExitRequested(\\n address depositAccount,\\n address owner,\\n address token,\\n uint256 lockedUntil\\n );\\n\\n /**\\n * @dev Emitted when the deposit exist is completed\\n * @param depositAccount deposit account address\\n * @param owner owner address\\n * @param token token address\\n * @param amount deposit exist amount\\n */\\n event DepositExitCompleted(\\n address depositAccount,\\n address owner,\\n address token,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Emitted when the deposit exist is rejected\\n * @param depositAccount deposit account address\\n * @param owner owner address\\n * @param token token address\\n */\\n event DepositExitRejected(\\n address depositAccount,\\n address owner,\\n address token\\n );\\n\\n /**\\n * @dev Emitted when the deposit has been withdrawn\\n * @param depositAccount deposit account address\\n * @param owner owner address\\n * @param token token address\\n * @param amount withdrawn amount\\n */\\n event DepositWithdrawn(\\n address depositAccount,\\n address owner,\\n address token,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Emitted when the payment channel has been committed\\n * @param hash channel hash\\n * @param sender sender address\\n * @param recipient recipient address\\n * @param token token address\\n * @param uid unique channel id\\n * @param amount committed amount\\n */\\n event PaymentChannelCommitted(\\n bytes32 hash,\\n address sender,\\n address recipient,\\n address token,\\n bytes32 uid,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Emitted when the payment has been withdrawn\\n * @param channelHash channel hash\\n * @param value payment value\\n */\\n event PaymentWithdrawn(\\n bytes32 channelHash,\\n uint256 value\\n );\\n\\n /**\\n * @dev Emitted when the payment has been deposited\\n * @param channelHash channel hash\\n * @param value payment value\\n */\\n event PaymentDeposited(\\n bytes32 channelHash,\\n uint256 value\\n );\\n\\n /**\\n * @dev Emitted when the payment has been withdrawn and deposited (split)\\n * @param channelHash channel hash\\n * @param totalValue payment total value\\n * @param depositValue payment deposited value\\n */\\n event PaymentSplit(\\n bytes32 channelHash,\\n uint256 totalValue,\\n uint256 depositValue\\n );\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Initializable() SignatureValidator() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initialize `PaymentRegistry` contract\\n * @param externalAccountRegistry_ `ExternalAccountRegistry` contract address\\n * @param personalAccountRegistry_ `PersonalAccountRegistry` contract address\\n * @param depositExitLockPeriod_ deposit exit lock period\\n * @param guardians_ array of guardians addresses\\n * @param gateway_ `Gateway` contract address\\n */\\n function initialize(\\n ExternalAccountRegistry externalAccountRegistry_,\\n PersonalAccountRegistry personalAccountRegistry_,\\n uint256 depositExitLockPeriod_,\\n address[] calldata guardians_,\\n address gateway_\\n )\\n external\\n onlyInitializer\\n {\\n externalAccountRegistry = externalAccountRegistry_;\\n personalAccountRegistry = personalAccountRegistry_;\\n\\n if (depositExitLockPeriod_ == 0) {\\n depositExitLockPeriod = DEFAULT_DEPOSIT_EXIT_LOCK_PERIOD;\\n } else {\\n depositExitLockPeriod = depositExitLockPeriod_;\\n }\\n\\n // Guarded\\n _initializeGuarded(guardians_);\\n\\n // GatewayRecipient\\n _initializeGatewayRecipient(gateway_);\\n }\\n\\n /**\\n * @notice Deploys deposit account\\n * @param owner owner address\\n */\\n function deployDepositAccount(\\n address owner\\n )\\n external\\n {\\n _deployDepositAccount(owner);\\n }\\n\\n /**\\n * @notice Requests deposit exit\\n * @param token token address\\n */\\n function requestDepositExit(\\n address token\\n )\\n external\\n {\\n address owner = _getContextAccount();\\n uint256 lockedUntil = deposits[owner].exitLockedUntil[token];\\n\\n require(\\n lockedUntil == 0,\\n \\\"PaymentRegistry: deposit exit already requested\\\"\\n );\\n\\n _deployDepositAccount(owner);\\n\\n // solhint-disable-next-line not-rely-on-time\\n lockedUntil = now.add(depositExitLockPeriod);\\n\\n deposits[owner].exitLockedUntil[token] = lockedUntil;\\n\\n emit DepositExitRequested(\\n deposits[owner].account,\\n owner,\\n token,\\n lockedUntil\\n );\\n }\\n\\n /**\\n * @notice Processes deposit exit\\n * @param token token address\\n */\\n function processDepositExit(\\n address token\\n )\\n external\\n {\\n address owner = _getContextAccount();\\n uint256 lockedUntil = deposits[owner].exitLockedUntil[token];\\n\\n require(\\n lockedUntil != 0,\\n \\\"PaymentRegistry: deposit exit not requested\\\"\\n );\\n\\n require(\\n // solhint-disable-next-line not-rely-on-time\\n lockedUntil <= now,\\n \\\"PaymentRegistry: deposit exit locked\\\"\\n );\\n\\n deposits[owner].exitLockedUntil[token] = 0;\\n\\n address depositAccount = deposits[owner].account;\\n uint256 depositValue;\\n\\n if (token == address(0)) {\\n depositValue = depositAccount.balance;\\n } else {\\n depositValue = ERC20Token(token).balanceOf(depositAccount);\\n }\\n\\n _transferFromDeposit(\\n depositAccount,\\n owner,\\n token,\\n depositValue\\n );\\n\\n emit DepositExitCompleted(\\n depositAccount,\\n owner,\\n token,\\n depositValue\\n );\\n }\\n\\n /**\\n * @notice Withdraws deposit\\n * @param token token address\\n * @param amount amount to withdraw\\n * @param guardianSignature guardian signature\\n */\\n function withdrawDeposit(\\n address token,\\n uint256 amount,\\n bytes calldata guardianSignature\\n )\\n external\\n {\\n address owner = _getContextAccount();\\n uint256 value = amount.sub(deposits[owner].withdrawnAmount[token]);\\n\\n require(\\n value > 0,\\n \\\"PaymentRegistry: invalid amount\\\"\\n );\\n\\n bytes32 messageHash = _hashDepositWithdrawal(\\n owner,\\n token,\\n amount\\n );\\n\\n require(\\n _verifyGuardianSignature(messageHash, guardianSignature),\\n \\\"PaymentRegistry: invalid guardian signature\\\"\\n );\\n\\n deposits[owner].withdrawnAmount[token] = amount;\\n\\n _verifyDepositExitOrDeployAccount(owner, token);\\n\\n _transferFromDeposit(\\n deposits[owner].account,\\n owner,\\n token,\\n value\\n );\\n\\n emit DepositWithdrawn(\\n deposits[owner].account,\\n owner,\\n token,\\n amount\\n );\\n }\\n\\n /**\\n * @notice Commits payment channel and withdraw payment\\n * @param sender sender address\\n * @param token token address\\n * @param uid unique channel id\\n * @param blockNumber block number\\n * @param amount amount to commit\\n * @param senderSignature sender signature\\n * @param guardianSignature guardian signature\\n */\\n function commitPaymentChannelAndWithdraw(\\n address sender,\\n address token,\\n bytes32 uid,\\n uint256 blockNumber,\\n uint256 amount,\\n bytes calldata senderSignature,\\n bytes calldata guardianSignature\\n )\\n external\\n {\\n address recipient = _getContextAccount();\\n\\n (bytes32 hash, address depositAccount, uint256 paymentValue) = _commitPaymentChannel(\\n sender,\\n recipient,\\n token,\\n uid,\\n blockNumber,\\n amount,\\n senderSignature,\\n guardianSignature\\n );\\n\\n _transferFromDeposit(\\n depositAccount,\\n recipient,\\n token,\\n paymentValue\\n );\\n\\n emit PaymentWithdrawn(hash, paymentValue);\\n }\\n\\n /**\\n * @notice Commits payment channel and deposit payment\\n * @param sender sender address\\n * @param token token address\\n * @param uid unique channel id\\n * @param blockNumber block number\\n * @param amount amount to commit\\n * @param senderSignature sender signature\\n * @param guardianSignature guardian signature\\n */\\n function commitPaymentChannelAndDeposit(\\n address sender,\\n address token,\\n bytes32 uid,\\n uint256 blockNumber,\\n uint256 amount,\\n bytes calldata senderSignature,\\n bytes calldata guardianSignature\\n )\\n external\\n {\\n address recipient = _getContextAccount();\\n\\n (bytes32 hash, address depositAccount, uint256 paymentValue) = _commitPaymentChannel(\\n sender,\\n recipient,\\n token,\\n uid,\\n blockNumber,\\n amount,\\n senderSignature,\\n guardianSignature\\n );\\n\\n _transferFromDeposit(\\n depositAccount,\\n _computeDepositAccountAddress(recipient),\\n token,\\n paymentValue\\n );\\n\\n emit PaymentDeposited(hash, paymentValue);\\n }\\n\\n /**\\n * @notice Commits payment channel, withdraws and deposits (split) payment\\n * @param sender sender address\\n * @param token token address\\n * @param uid unique channel id\\n * @param blockNumber block number\\n * @param amount amount to commit\\n * @param depositPaymentValue amount to deposit\\n * @param senderSignature sender signature\\n * @param guardianSignature guardian signature\\n */\\n function commitPaymentChannelAndSplit(\\n address sender,\\n address token,\\n bytes32 uid,\\n uint256 blockNumber,\\n uint256 amount,\\n uint256 depositPaymentValue,\\n bytes calldata senderSignature,\\n bytes calldata guardianSignature\\n )\\n external\\n {\\n address recipient = _getContextAccount();\\n\\n (bytes32 hash, address depositAccount, uint256 paymentValue) = _commitPaymentChannel(\\n sender,\\n recipient,\\n token,\\n uid,\\n blockNumber,\\n amount,\\n senderSignature,\\n guardianSignature\\n );\\n\\n _transferSplitFromDeposit(\\n depositAccount,\\n recipient,\\n token,\\n paymentValue,\\n depositPaymentValue\\n );\\n\\n emit PaymentSplit(hash, paymentValue, depositPaymentValue);\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Computes deposit account address\\n * @param owner owner address\\n * @return deposit account address\\n */\\n function computeDepositAccountAddress(\\n address owner\\n )\\n external\\n view\\n returns (address)\\n {\\n return _computeDepositAccountAddress(owner);\\n }\\n\\n /**\\n * @notice Checks if deposit account is deployed\\n * @param owner owner address\\n * @return true when deposit account is deployed\\n */\\n function isDepositAccountDeployed(\\n address owner\\n )\\n external\\n view\\n returns (bool)\\n {\\n return deposits[owner].account != address(0);\\n }\\n\\n /**\\n * @notice Gets deposit exit locked until time\\n * @param owner owner address\\n * @param token token address\\n * @return locked until time\\n */\\n function getDepositExitLockedUntil(\\n address owner,\\n address token\\n )\\n external\\n view\\n returns (uint256)\\n {\\n return deposits[owner].exitLockedUntil[token];\\n }\\n\\n /**\\n * @notice Gets deposit withdrawn amount\\n * @param owner owner address\\n * @param token token address\\n * @return withdrawn amount\\n */\\n function getDepositWithdrawnAmount(\\n address owner,\\n address token\\n )\\n external\\n view\\n returns (uint256)\\n {\\n return deposits[owner].withdrawnAmount[token];\\n }\\n\\n /**\\n * @notice Gets payment channel committed amount\\n * @param hash payment channel hash\\n * @return committed amount\\n */\\n function getPaymentChannelCommittedAmount(\\n bytes32 hash\\n )\\n external\\n view\\n returns (uint256)\\n {\\n return paymentChannels[hash].committedAmount;\\n }\\n\\n // external functions (pure)\\n\\n /**\\n * @notice Computes payment channel hash\\n * @param sender sender address\\n * @param recipient recipient address\\n * @param token token address\\n * @param uid unique channel id\\n * @return hash\\n */\\n function computePaymentChannelHash(\\n address sender,\\n address recipient,\\n address token,\\n bytes32 uid\\n )\\n external\\n pure\\n returns (bytes32)\\n {\\n return _computePaymentChannelHash(\\n sender,\\n recipient,\\n token,\\n uid\\n );\\n }\\n\\n // public functions (views)\\n\\n /**\\n * @notice Hashes `DepositWithdrawal` message payload\\n * @param depositWithdrawal struct\\n * @return hash\\n */\\n function hashDepositWithdrawal(\\n DepositWithdrawal memory depositWithdrawal\\n )\\n public\\n view\\n returns (bytes32)\\n {\\n return _hashDepositWithdrawal(\\n depositWithdrawal.owner,\\n depositWithdrawal.token,\\n depositWithdrawal.amount\\n );\\n }\\n\\n /**\\n * @notice Hashes `PaymentChannelCommit` message payload\\n * @param paymentChannelCommit struct\\n * @return hash\\n */\\n function hashPaymentChannelCommit(\\n PaymentChannelCommit memory paymentChannelCommit\\n )\\n public\\n view\\n returns (bytes32)\\n {\\n return _hashPaymentChannelCommit(\\n paymentChannelCommit.sender,\\n paymentChannelCommit.recipient,\\n paymentChannelCommit.token,\\n paymentChannelCommit.uid,\\n paymentChannelCommit.blockNumber,\\n paymentChannelCommit.amount\\n );\\n }\\n\\n // private functions\\n\\n function _deployDepositAccount(\\n address owner\\n )\\n private\\n {\\n if (deposits[owner].account == address(0)) {\\n bytes32 salt = keccak256(\\n abi.encodePacked(\\n owner\\n )\\n );\\n\\n deposits[owner].account = address(new PaymentDepositAccount{salt: salt}());\\n\\n emit DepositAccountDeployed(\\n deposits[owner].account,\\n owner\\n );\\n }\\n }\\n\\n function _verifyDepositExitOrDeployAccount(\\n address owner,\\n address token\\n )\\n private\\n {\\n if (deposits[owner].exitLockedUntil[token] > 0) {\\n deposits[owner].exitLockedUntil[token] = 0;\\n\\n emit DepositExitRejected(\\n deposits[owner].account,\\n owner,\\n token\\n );\\n } else {\\n _deployDepositAccount(owner);\\n }\\n }\\n\\n function _commitPaymentChannel(\\n address sender,\\n address recipient,\\n address token,\\n bytes32 uid,\\n uint256 blockNumber,\\n uint256 amount,\\n bytes memory senderSignature,\\n bytes memory guardianSignature\\n )\\n private\\n returns (bytes32 hash, address depositAccount, uint256 paymentValue)\\n {\\n bytes32 messageHash = _hashPaymentChannelCommit(\\n sender,\\n recipient,\\n token,\\n uid,\\n blockNumber,\\n amount\\n );\\n\\n if (senderSignature.length == 0) {\\n require(\\n externalAccountRegistry.verifyAccountProofAtBlock(sender, messageHash, blockNumber),\\n \\\"PaymentRegistry: invalid guardian signature\\\"\\n );\\n } else {\\n address signer = messageHash.recoverAddress(senderSignature);\\n\\n if (sender != signer) {\\n require(\\n personalAccountRegistry.verifyAccountOwnerAtBlock(sender, signer, blockNumber) ||\\n externalAccountRegistry.verifyAccountOwnerAtBlock(sender, signer, blockNumber),\\n \\\"PaymentRegistry: invalid sender signature\\\"\\n );\\n }\\n }\\n\\n require(\\n _verifyGuardianSignature(messageHash, guardianSignature),\\n \\\"PaymentRegistry: invalid guardian signature\\\"\\n );\\n\\n hash = _computePaymentChannelHash(\\n sender,\\n recipient,\\n token,\\n uid\\n );\\n\\n /// @dev calc payment value\\n paymentValue = amount.sub(paymentChannels[hash].committedAmount);\\n\\n require(\\n paymentValue != 0,\\n \\\"PaymentRegistry: invalid payment value\\\"\\n );\\n\\n paymentChannels[hash].committedAmount = amount;\\n\\n _verifyDepositExitOrDeployAccount(sender, token);\\n\\n depositAccount = deposits[sender].account;\\n\\n emit PaymentChannelCommitted(\\n hash,\\n sender,\\n recipient,\\n token,\\n uid,\\n amount\\n );\\n\\n return (hash, depositAccount, paymentValue);\\n }\\n\\n function _transferFromDeposit(\\n address depositAccount,\\n address to,\\n address token,\\n uint256 value\\n )\\n private\\n {\\n if (token == address(0)) {\\n PaymentDepositAccount(payable(depositAccount)).executeTransaction(\\n to,\\n value,\\n new bytes(0)\\n );\\n } else {\\n bytes memory response = PaymentDepositAccount(payable(depositAccount)).executeTransaction(\\n token,\\n 0,\\n abi.encodeWithSelector(\\n ERC20Token(token).transfer.selector,\\n to,\\n value\\n )\\n );\\n\\n if (response.length > 0) {\\n require(\\n abi.decode(response, (bool)),\\n \\\"PaymentRegistry: ERC20Token transfer reverted\\\"\\n );\\n }\\n }\\n }\\n\\n function _transferSplitFromDeposit(\\n address depositAccount,\\n address to,\\n address token,\\n uint256 paymentValue,\\n uint256 depositValue\\n )\\n private\\n {\\n require(\\n depositValue > 0,\\n \\\"PaymentRegistry: invalid deposit value\\\"\\n );\\n\\n uint256 withdrawValue = paymentValue.sub(depositValue);\\n\\n require(\\n withdrawValue > 0,\\n \\\"PaymentRegistry: invalid withdraw value\\\"\\n );\\n\\n _transferFromDeposit(\\n depositAccount,\\n to,\\n token,\\n withdrawValue\\n );\\n\\n _transferFromDeposit(\\n depositAccount,\\n _computeDepositAccountAddress(to),\\n token,\\n depositValue\\n );\\n }\\n\\n // private functions (views)\\n\\n function _computeDepositAccountAddress(\\n address owner\\n )\\n private\\n view\\n returns (address)\\n {\\n bytes32 salt = keccak256(\\n abi.encodePacked(\\n owner\\n )\\n );\\n\\n bytes memory creationCode = type(PaymentDepositAccount).creationCode;\\n\\n bytes32 data = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n salt,\\n keccak256(creationCode)\\n )\\n );\\n\\n return address(uint160(uint256(data)));\\n }\\n\\n function _hashDepositWithdrawal(\\n address owner,\\n address token,\\n uint256 amount\\n )\\n private\\n view\\n returns (bytes32)\\n {\\n return _hashMessagePayload(HASH_PREFIX_DEPOSIT_WITHDRAWAL, abi.encodePacked(\\n owner,\\n token,\\n amount\\n ));\\n }\\n\\n function _hashPaymentChannelCommit(\\n address sender,\\n address recipient,\\n address token,\\n bytes32 uid,\\n uint256 blockNumber,\\n uint256 amount\\n )\\n private\\n view\\n returns (bytes32)\\n {\\n return _hashMessagePayload(HASH_PREFIX_PAYMENT_CHANNEL_COMMIT, abi.encodePacked(\\n sender,\\n recipient,\\n token,\\n uid,\\n blockNumber,\\n amount\\n ));\\n }\\n\\n // private functions (pure)\\n\\n function _computePaymentChannelHash(\\n address sender,\\n address recipient,\\n address token,\\n bytes32 uid\\n )\\n private\\n pure\\n returns (bytes32)\\n {\\n return keccak256(\\n abi.encodePacked(\\n sender,\\n recipient,\\n token,\\n uid\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0x84d3f908a35ba0f9dcc3e37808b42cdad0b81285ec006c96d25302d8dffa2704\",\"license\":\"MIT\"},\"src/personal/PersonalAccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/access/Guarded.sol\\\";\\nimport \\\"../common/account/AccountController.sol\\\";\\nimport \\\"../common/account/AccountRegistry.sol\\\";\\nimport \\\"../common/libs/BlockLib.sol\\\";\\nimport \\\"../common/libs/ECDSALib.sol\\\";\\nimport \\\"../common/libs/ECDSAExtendedLib.sol\\\";\\nimport \\\"../common/libs/SafeMathLib.sol\\\";\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"../common/token/ERC20Token.sol\\\";\\nimport \\\"../gateway/GatewayRecipient.sol\\\";\\n\\n\\n/**\\n * @title Personal account registry\\n *\\n * @notice A registry for personal (controlled by owners) accounts\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract PersonalAccountRegistry is Guarded, AccountController, AccountRegistry, Initializable, GatewayRecipient {\\n using BlockLib for BlockLib.BlockRelated;\\n using SafeMathLib for uint256;\\n using ECDSALib for bytes32;\\n using ECDSAExtendedLib for bytes;\\n\\n struct Account {\\n bool deployed;\\n bytes32 salt;\\n mapping(address => BlockLib.BlockRelated) owners;\\n }\\n\\n mapping(address => Account) private accounts;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the new owner is added\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerAdded(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the existing owner is removed\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerRemoved(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the call is refunded\\n * @param account account address\\n * @param beneficiary beneficiary address\\n * @param token token address\\n * @param value value\\n */\\n event AccountCallRefunded(\\n address account,\\n address beneficiary,\\n address token,\\n uint256 value\\n );\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Initializable() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `PersonalAccountRegistry` contract\\n * @param guardians_ array of guardians addresses\\n * @param accountImplementation_ account implementation address\\n * @param gateway_ `Gateway` contract address\\n */\\n function initialize(\\n address[] calldata guardians_,\\n address accountImplementation_,\\n address gateway_\\n )\\n external\\n onlyInitializer\\n {\\n // Guarded\\n _initializeGuarded(guardians_);\\n\\n // AccountController\\n _initializeAccountController(address(this), accountImplementation_);\\n\\n // GatewayRecipient\\n _initializeGatewayRecipient(gateway_);\\n }\\n\\n /**\\n * @notice Upgrades `PersonalAccountRegistry` contract\\n * @param accountImplementation_ account implementation address\\n */\\n function upgrade(\\n address accountImplementation_\\n )\\n external\\n onlyGuardian\\n {\\n _setAccountImplementation(accountImplementation_, true);\\n }\\n\\n /**\\n * @notice Deploys account\\n * @param account account address\\n */\\n function deployAccount(\\n address account\\n )\\n external\\n {\\n _verifySender(account);\\n _deployAccount(account);\\n }\\n\\n /**\\n * @notice Upgrades account\\n * @param account account address\\n */\\n function upgradeAccount(\\n address account\\n )\\n external\\n {\\n _verifySender(account);\\n _upgradeAccount(account, true);\\n }\\n\\n /**\\n * @notice Adds a new account owner\\n * @param account account address\\n * @param owner owner address\\n */\\n function addAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n {\\n _verifySender(account);\\n\\n require(\\n owner != address(0),\\n \\\"PersonalAccountRegistry: cannot add 0x0 owner\\\"\\n );\\n\\n require(\\n !accounts[account].owners[owner].verifyAtCurrentBlock(),\\n \\\"PersonalAccountRegistry: owner already exists\\\"\\n );\\n\\n accounts[account].owners[owner].added = true;\\n accounts[account].owners[owner].removedAtBlockNumber = 0;\\n\\n emit AccountOwnerAdded(\\n account,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Removes the existing account owner\\n * @param account account address\\n * @param owner owner address\\n */\\n function removeAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n {\\n address sender = _verifySender(account);\\n\\n require(\\n owner != sender,\\n \\\"PersonalAccountRegistry: cannot remove self\\\"\\n );\\n\\n require(\\n accounts[account].owners[owner].verifyAtCurrentBlock(),\\n \\\"PersonalAccountRegistry: owner doesn't exist\\\"\\n );\\n\\n accounts[account].owners[owner].removedAtBlockNumber = block.number;\\n\\n emit AccountOwnerRemoved(\\n account,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Executes account transaction\\n * @dev Deploys an account if not deployed yet\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n */\\n function executeAccountTransaction(\\n address account,\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n {\\n _verifySender(account);\\n\\n _deployAccount(account);\\n\\n _executeAccountTransaction(\\n account,\\n to,\\n value,\\n data,\\n true\\n );\\n }\\n\\n /**\\n * @notice Refunds account call\\n * @dev Deploys an account if not deployed yet\\n * @param account account address\\n * @param token token address\\n * @param value value\\n */\\n function refundAccountCall(\\n address account,\\n address token,\\n uint256 value\\n )\\n external\\n {\\n _verifySender(account);\\n\\n _deployAccount(account);\\n\\n /* solhint-disable avoid-tx-origin */\\n\\n if (token == address(0)) {\\n _executeAccountTransaction(\\n account,\\n tx.origin,\\n value,\\n new bytes(0),\\n false\\n );\\n } else {\\n bytes memory response = _executeAccountTransaction(\\n account,\\n token,\\n 0,\\n abi.encodeWithSelector(\\n ERC20Token(token).transfer.selector,\\n tx.origin,\\n value\\n ),\\n false\\n );\\n\\n if (response.length > 0) {\\n require(\\n abi.decode(response, (bool)),\\n \\\"PersonalAccountRegistry: ERC20Token transfer reverted\\\"\\n );\\n }\\n }\\n\\n emit AccountCallRefunded(\\n account,\\n tx.origin,\\n token,\\n value\\n );\\n\\n /* solhint-enable avoid-tx-origin */\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Computes account address\\n * @param saltOwner salt owner address\\n * @return account address\\n */\\n function computeAccountAddress(\\n address saltOwner\\n )\\n external\\n view\\n returns (address)\\n {\\n return _computeAccountAddress(saltOwner);\\n }\\n\\n /**\\n * @notice Checks if account is deployed\\n * @param account account address\\n * @return true when account is deployed\\n */\\n function isAccountDeployed(\\n address account\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].deployed;\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at the current block\\n * @param account account address\\n * @param owner owner address\\n * @return true on correct account owner\\n */\\n function verifyAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(account, owner);\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at a specific block\\n * @param account account address\\n * @param owner owner address\\n * @param blockNumber block number to verify\\n * @return true on correct account owner\\n */\\n function verifyAccountOwnerAtBlock(\\n address account,\\n address owner,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n bool result = false;\\n\\n if (_verifyAccountOwner(account, owner)) {\\n result = true;\\n } else {\\n result = accounts[account].owners[owner].verifyAtBlock(blockNumber);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param messageHash message hash\\n * @param signature signature\\n * @return magic hash if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n override\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(\\n account,\\n messageHash.recoverAddress(signature)\\n );\\n }\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param message message\\n * @param signature signature\\n * @return magic hash if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes calldata message,\\n bytes calldata signature\\n )\\n override\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(\\n account,\\n message.toEthereumSignedMessageHash().recoverAddress(signature)\\n );\\n }\\n\\n // private functions\\n\\n function _verifySender(\\n address account\\n )\\n private\\n returns (address)\\n {\\n address sender = _getContextSender();\\n\\n if (accounts[account].owners[sender].added) {\\n require(\\n accounts[account].owners[sender].removedAtBlockNumber == 0,\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n } else {\\n require(\\n accounts[account].salt == 0,\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n\\n bytes32 salt = keccak256(\\n abi.encodePacked(sender)\\n );\\n\\n require(\\n account == _computeAccountAddress(salt),\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n\\n accounts[account].salt = salt;\\n accounts[account].owners[sender].added = true;\\n\\n emit AccountOwnerAdded(\\n account,\\n sender\\n );\\n }\\n\\n return sender;\\n }\\n\\n function _deployAccount(\\n address account\\n )\\n internal\\n {\\n if (!accounts[account].deployed) {\\n _deployAccount(\\n accounts[account].salt,\\n true\\n );\\n\\n accounts[account].deployed = true;\\n }\\n }\\n\\n // private functions (views)\\n\\n function _computeAccountAddress(\\n address saltOwner\\n )\\n private\\n view\\n returns (address)\\n {\\n bytes32 salt = keccak256(\\n abi.encodePacked(saltOwner)\\n );\\n\\n return _computeAccountAddress(salt);\\n }\\n\\n function _verifyAccountOwner(\\n address account,\\n address owner\\n )\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (accounts[account].owners[owner].added) {\\n result = accounts[account].owners[owner].removedAtBlockNumber == 0;\\n } else if (accounts[account].salt == 0) {\\n result = account == _computeAccountAddress(owner);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xdae162610e707ab8c394b3edf924b75ef1f315520935cb88f4280b29eeaf4b61\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5032600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060004690508060028190555050614c138061006e6000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c80639130c06e116100de578063c36326e711610097578063da1b213d11610071578063da1b213d146104bb578063dc7d6c31146104d7578063df04338014610507578063e0fe396e146105235761018e565b8063c36326e71461043d578063d0f710d61461046d578063d2c83b9a1461049d5761018e565b80639130c06e146103915780639a85fae2146103ad5780639a8a0592146103c9578063a526d83b146103e7578063b0274a7314610403578063bdff4b3b1461041f5761018e565b80636121fcfc1161014b578063714041561161012557806371404156146102f757806384389a2b1461031357806387d31313146103435780638a1773ab146103615761018e565b80636121fcfc1461028f5780636524a947146102bf5780636866da52146102db5761018e565b80630c68ba2114610193578063116191b6146101c35780632e4f161e146101e15780632e7037a014610211578063392e53cd1461024157806360bf4df21461025f575b600080fd5b6101ad60048036038101906101a89190612f83565b61053f565b6040516101ba91906140a9565b60405180910390f35b6101cb610594565b6040516101d89190613e92565b60405180910390f35b6101fb60048036038101906101f69190612fe8565b6105ba565b60405161020891906140c4565b60405180910390f35b61022b600480360381019061022691906133f5565b6105d2565b60405161023891906140c4565b60405180910390f35b6102496105f2565b60405161025691906140a9565b60405180910390f35b61027960048036038101906102749190612f83565b61064a565b6040516102869190613e92565b60405180910390f35b6102a960048036038101906102a49190612f83565b61065c565b6040516102b691906140a9565b60405180910390f35b6102d960048036038101906102d49190612f83565b6106f7565b005b6102f560048036038101906102f0919061320c565b610703565b005b610311600480360381019061030c9190612f83565b610a28565b005b61032d6004803603810190610328919061341e565b610c40565b60405161033a91906140c4565b60405180910390f35b61034b610c6f565b6040516103589190614200565b60405180910390f35b61037b600480360381019061037691906132a1565b610c95565b604051610388919061449d565b60405180910390f35b6103ab60048036038101906103a69190612f83565b610cb5565b005b6103c760048036038101906103c2919061304b565b610fe9565b005b6103d16110f4565b6040516103de919061449d565b60405180910390f35b61040160048036038101906103fc9190612f83565b6110fa565b005b61041d60048036038101906104189190612f83565b611191565b005b6104276113ac565b604051610434919061449d565b60405180910390f35b61045760048036038101906104529190612fac565b6113b2565b604051610464919061449d565b60405180910390f35b610487600480360381019061048291906132ca565b61143c565b60405161049491906140a9565b60405180910390f35b6104a5611495565b6040516104b291906141e5565b60405180910390f35b6104d560048036038101906104d09190613121565b6114bb565b005b6104f160048036038101906104ec9190612fac565b6115c2565b6040516104fe919061449d565b60405180910390f35b610521600480360381019061051c919061304b565b61164c565b005b61053d60048036038101906105389190613363565b61174f565b005b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006105c885858585611955565b9050949350505050565b60006105eb82600001518360200151846040015161198e565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b6000610655826119e6565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff16600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b61070081611a84565b50565b600061070d611c94565b905060006107a3600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205486611ca590919063ffffffff16565b9050600081116107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df9061435d565b60405180910390fd5b60006107f583888861198e565b90506108458186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611cd2565b610884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087b9061447d565b60405180910390fd5b85600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506109128388611d3f565b610980600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848985611efc565b7f95f66b073d65f18e43f6b76c7ab8557787f5f766d86cab7c9c76f41be9f8abc6600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848989604051610a179493929190613f51565b60405180910390a150505050505050565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610ab3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aaa9061433d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161415610b22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b199061443d565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610bad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba4906143dd565b60405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b3282604051610c35929190613ec8565b60405180910390a150565b6000610c68826000015183602001518460400151856060015186608001518760a0015161218c565b9050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060086000838152602001908152602001600020600001549050919050565b6000610cbf611c94565b90506000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811415610d89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d80906142fd565b60405180910390fd5b42811115610dcc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc39061437d565b60405180910390fd5b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610f0d578173ffffffffffffffffffffffffffffffffffffffff16319050610f99565b8473ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401610f469190613e92565b60206040518083038186803b158015610f5e57600080fd5b505afa158015610f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f969190613447565b90505b610fa582858784611efc565b7f5300d9a2838baade7cdc628c82cb80c1298853ba5f389d51e2b47330336aeffc82858784604051610fda9493929190613f51565b60405180910390a15050505050565b6000610ff3611c94565b905060008060006110928d858e8e8e8e8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506121ed565b9250925092506110ac826110a5866119e6565b8e84611efc565b7f771bc0494e1a2fcbef19a8762845000d8c4500454c756a7370c955e39ed60fd483826040516110dd929190614140565b60405180910390a150505050505050505050505050565b60025481565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117c9061433d565b60405180910390fd5b61118e81612691565b50565b600061119b611c94565b90506000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114611264576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125b9061429d565b60405180910390fd5b61126d82611a84565b6112826006544261282090919063ffffffff16565b905080600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fed3c8c6cdfc6d7b91dc9db3e1f54866587c26c3c3e0f9e32cd1944974be43a50600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683858460405161139f9493929190613f51565b60405180910390a1505050565b60065481565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600061148c8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611cd2565b90509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006114c5611c94565b905060008060006115648e858f8f8f8f8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506121ed565b92509250925061157782858f848d612875565b7f8b67efde501ee9cd0e771f7436554c44a5c076239ff3a6fbb397646a4689c0f283828b6040516115aa93929190614169565b60405180910390a15050505050505050505050505050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000611656611c94565b905060008060006116f58d858e8e8e8e8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506121ed565b92509250925061170782858e84611efc565b7f6675346cd43846f7d47c310d39fb5c15bc7db66b3770338cdf1f133613a5ae988382604051611738929190614140565b60405180910390a150505050505050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146117df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d69061427d565b60405180910390fd5b6000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008414156118bb576224ea006006819055506118c3565b836006819055505b61190d838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061293a565b61191681612992565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516119459190613ead565b60405180910390a1505050505050565b60008484848460405160200161196e9493929190613cd9565b604051602081830303815290604052805190602001209050949350505050565b60006119dd7f3b3087c8f883f1f44cabe66444f5f9d96f69de6a88f364ea10959eef0331414a8585856040516020016119c993929190613d97565b6040516020818303038152906040526129d6565b90509392505050565b600080826040516020016119fa9190613cbe565b604051602081830303815290604052805190602001209050606060405180602001611a2490612cff565b6020820181038252601f19601f820116604052509050600060ff60f81b30848480519060200120604051602001611a5e9493929190613dd4565b6040516020818303038152906040528051906020012090508060001c9350505050919050565b600073ffffffffffffffffffffffffffffffffffffffff16600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611c9157600081604051602001611b2e9190613cbe565b60405160208183030381529060405280519060200120905080604051611b5390612cff565b8190604051809103906000f5905080158015611b73573d6000803e3d6000fd5b50600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd80572c0f2f24f2d9d726d831bd860ed82b12bafaf01cfb6e4d38fb23c4347e9600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683604051611c87929190613ef1565b60405180910390a1505b50565b6000611ca06028612a17565b905090565b6000611cca8383604051806060016040528060218152602001614be660219139612aac565b905092915050565b600080611ce88385612b0190919063ffffffff16565b90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115611eee576000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fa19281a6f3163da06f6b82f3ecf0130493c52aba23cdc2a312f652742f0d1801600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383604051611ee193929190613f1a565b60405180910390a1611ef8565b611ef782611a84565b5b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612016578373ffffffffffffffffffffffffffffffffffffffff16633f579f428483600067ffffffffffffffff81118015611f6757600080fd5b506040519080825280601f01601f191660200182016040528015611f9a5781602001600182028036833780820191505090505b506040518463ffffffff1660e01b8152600401611fb99392919061406b565b600060405180830381600087803b158015611fd357600080fd5b505af1158015611fe7573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906120109190613322565b50612186565b60608473ffffffffffffffffffffffffffffffffffffffff16633f579f4284600063a9059cbb60e01b8887604051602401612052929190614042565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518463ffffffff1660e01b81526004016120cd93929190614004565b600060405180830381600087803b1580156120e757600080fd5b505af11580156120fb573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906121249190613322565b905060008151111561218457808060200190518101906121449190613278565b612183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217a9061431d565b60405180910390fd5b5b505b50505050565b60006121e17f745089e29f2abf28f618236a5dc04d214ac05ead3440ba532b69e9d160ba2e728888888888886040516020016121cd96959493929190613d27565b6040516020818303038152906040526129d6565b90509695505050505050565b6000806000806122018c8c8c8c8c8c61218c565b905060008651141561230057600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166359b52ef88d838b6040518463ffffffff1660e01b815260040161226c93929190613fcd565b60206040518083038186803b15801561228457600080fd5b505afa158015612298573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122bc9190613278565b6122fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122f29061447d565b60405180910390fd5b6124f1565b60006123158783612b0190919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff16146124ef57600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334d323a48e838c6040518463ffffffff1660e01b81526004016123a993929190613f96565b60206040518083038186803b1580156123c157600080fd5b505afa1580156123d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f99190613278565b806124af5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334d323a48e838c6040518463ffffffff1660e01b815260040161245e93929190613f96565b60206040518083038186803b15801561247657600080fd5b505afa15801561248a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ae9190613278565b5b6124ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124e5906143bd565b60405180910390fd5b5b505b6124fb8186611cd2565b61253a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125319061447d565b60405180910390fd5b6125468c8c8c8c611955565b9350612571600860008681526020019081526020016000206000015488611ca590919063ffffffff16565b915060008214156125b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125ae906142bd565b60405180910390fd5b8660086000868152602001908152602001600020600001819055506125dc8c8b611d3f565b600760008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1692507f0d1cb77d1fe491f98926195d0b885509da18bc305dd1489f45610237d971ed46848d8d8d8d8c60405161267a969594939291906140df565b60405180910390a150985098509895505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612701576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126f89061425d565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561278d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127849061441d565b60405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051612815929190613ec8565b60405180910390a150565b60008082840190508381101561286b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612862906143fd565b60405180910390fd5b8091505092915050565b600081116128b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128af9061423d565b60405180910390fd5b60006128cd8284611ca590919063ffffffff16565b905060008111612912576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129099061439d565b60405180910390fd5b61291e86868684611efc565b6129328661292b876119e6565b8685611efc565b505050505050565b6000815114156129525761294d32612691565b61298f565b60008151905060005b8181101561298c5761297f83828151811061297257fe5b6020026020010151612691565b808060010191505061295b565b50505b50565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000612a0f6002543085856040516020016129f49493929190613e48565b60405160208183030381529060405280519060200120612bbc565b905092915050565b60008060009050612a26612bec565b15612a9f576000836000369050039050612a9760003683906014850192612a4f9392919061455f565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612c99565b915050612aa3565b3390505b80915050919050565b6000838311158290612af4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aeb919061421b565b60405180910390fd5b5082840390509392505050565b60008060009050604183511415612bb25760008060006020860151925060408601519150606086015160001a9050601b8160ff161015612b4257601b810190505b601b8160ff161480612b575750601c8160ff16145b15612bae5760018782858560405160008152602001604052604051612b7f94939291906141a0565b6020604051602081039080840390855afa158015612ba1573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b600081604051602001612bcf9190613e22565b604051602081830303815290604052805190602001209050919050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415612c9257602c60003690501015612c8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c84906142dd565b60405180910390fd5b600190505b8091505090565b6000806014835114612ce0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cd79061445d565b60405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b6103f7806147ef83390190565b600081359050612d1b81614764565b92915050565b60008083601f840112612d3357600080fd5b8235905067ffffffffffffffff811115612d4c57600080fd5b602083019150836020820283011115612d6457600080fd5b9250929050565b600081519050612d7a8161477b565b92915050565b600081359050612d8f81614792565b92915050565b60008083601f840112612da757600080fd5b8235905067ffffffffffffffff811115612dc057600080fd5b602083019150836001820283011115612dd857600080fd5b9250929050565b600082601f830112612df057600080fd5b8151612e03612dfe826144e5565b6144b8565b91508082526020830160208301858383011115612e1f57600080fd5b612e2a8382846146d1565b50505092915050565b600081359050612e42816147a9565b92915050565b600081359050612e57816147c0565b92915050565b600060608284031215612e6f57600080fd5b612e7960606144b8565b90506000612e8984828501612d0c565b6000830152506020612e9d84828501612d0c565b6020830152506040612eb184828501612f59565b60408301525092915050565b600060c08284031215612ecf57600080fd5b612ed960c06144b8565b90506000612ee984828501612d0c565b6000830152506020612efd84828501612d0c565b6020830152506040612f1184828501612d0c565b6040830152506060612f2584828501612d80565b6060830152506080612f3984828501612f59565b60808301525060a0612f4d84828501612f59565b60a08301525092915050565b600081359050612f68816147d7565b92915050565b600081519050612f7d816147d7565b92915050565b600060208284031215612f9557600080fd5b6000612fa384828501612d0c565b91505092915050565b60008060408385031215612fbf57600080fd5b6000612fcd85828601612d0c565b9250506020612fde85828601612d0c565b9150509250929050565b60008060008060808587031215612ffe57600080fd5b600061300c87828801612d0c565b945050602061301d87828801612d0c565b935050604061302e87828801612d0c565b925050606061303f87828801612d80565b91505092959194509250565b600080600080600080600080600060e08a8c03121561306957600080fd5b60006130778c828d01612d0c565b99505060206130888c828d01612d0c565b98505060406130998c828d01612d80565b97505060606130aa8c828d01612f59565b96505060806130bb8c828d01612f59565b95505060a08a013567ffffffffffffffff8111156130d857600080fd5b6130e48c828d01612d95565b945094505060c08a013567ffffffffffffffff81111561310357600080fd5b61310f8c828d01612d95565b92509250509295985092959850929598565b6000806000806000806000806000806101008b8d03121561314157600080fd5b600061314f8d828e01612d0c565b9a505060206131608d828e01612d0c565b99505060406131718d828e01612d80565b98505060606131828d828e01612f59565b97505060806131938d828e01612f59565b96505060a06131a48d828e01612f59565b95505060c08b013567ffffffffffffffff8111156131c157600080fd5b6131cd8d828e01612d95565b945094505060e08b013567ffffffffffffffff8111156131ec57600080fd5b6131f88d828e01612d95565b92509250509295989b9194979a5092959850565b6000806000806060858703121561322257600080fd5b600061323087828801612d0c565b945050602061324187828801612f59565b935050604085013567ffffffffffffffff81111561325e57600080fd5b61326a87828801612d95565b925092505092959194509250565b60006020828403121561328a57600080fd5b600061329884828501612d6b565b91505092915050565b6000602082840312156132b357600080fd5b60006132c184828501612d80565b91505092915050565b6000806000604084860312156132df57600080fd5b60006132ed86828701612d80565b935050602084013567ffffffffffffffff81111561330a57600080fd5b61331686828701612d95565b92509250509250925092565b60006020828403121561333457600080fd5b600082015167ffffffffffffffff81111561334e57600080fd5b61335a84828501612ddf565b91505092915050565b60008060008060008060a0878903121561337c57600080fd5b600061338a89828a01612e33565b965050602061339b89828a01612e48565b95505060406133ac89828a01612f59565b945050606087013567ffffffffffffffff8111156133c957600080fd5b6133d589828a01612d21565b935093505060806133e889828a01612d0c565b9150509295509295509295565b60006060828403121561340757600080fd5b600061341584828501612e5d565b91505092915050565b600060c0828403121561343057600080fd5b600061343e84828501612ebd565b91505092915050565b60006020828403121561345957600080fd5b600061346784828501612f6e565b91505092915050565b61347981614641565b82525050565b61348881614592565b82525050565b61349f61349a82614592565b614704565b82525050565b6134ae816145a4565b82525050565b6134c56134c0826145b0565b614716565b82525050565b6134d4816145dc565b82525050565b6134eb6134e6826145dc565b614720565b82525050565b60006134fc82614511565b6135068185614527565b93506135168185602086016146d1565b61351f81614746565b840191505092915050565b600061353582614511565b61353f8185614538565b935061354f8185602086016146d1565b80840191505092915050565b61356481614653565b82525050565b61357381614677565b82525050565b6135828161469b565b82525050565b60006135938261451c565b61359d8185614543565b93506135ad8185602086016146d1565b6135b681614746565b840191505092915050565b60006135ce602683614543565b91507f5061796d656e7452656769737472793a20696e76616c6964206465706f73697460008301527f2076616c756500000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613634601c83614554565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b6000613674602083614543565b91507f477561726465643a2063616e6e6f74206164642030783020677561726469616e6000830152602082019050919050565b60006136b4602f83614543565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b600061371a602f83614543565b91507f5061796d656e7452656769737472793a206465706f736974206578697420616c60008301527f72656164792072657175657374656400000000000000000000000000000000006020830152604082019050919050565b6000613780602683614543565b91507f5061796d656e7452656769737472793a20696e76616c6964207061796d656e7460008301527f2076616c756500000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006137e6602283614543565b91507f47617465776179526563697069656e743a20696e76616c6964206d73672e646160008301527f74610000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061384c602b83614543565b91507f5061796d656e7452656769737472793a206465706f7369742065786974206e6f60008301527f74207265717565737465640000000000000000000000000000000000000000006020830152604082019050919050565b60006138b2602d83614543565b91507f5061796d656e7452656769737472793a204552433230546f6b656e207472616e60008301527f73666572207265766572746564000000000000000000000000000000000000006020830152604082019050919050565b6000613918602683614543565b91507f477561726465643a2074782e6f726967696e206973206e6f742074686520677560008301527f61726469616e00000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061397e601f83614543565b91507f5061796d656e7452656769737472793a20696e76616c696420616d6f756e74006000830152602082019050919050565b60006139be602483614543565b91507f5061796d656e7452656769737472793a206465706f7369742065786974206c6f60008301527f636b6564000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613a24602783614543565b91507f5061796d656e7452656769737472793a20696e76616c6964207769746864726160008301527f772076616c7565000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613a8a602983614543565b91507f5061796d656e7452656769737472793a20696e76616c69642073656e6465722060008301527f7369676e617475726500000000000000000000000000000000000000000000006020830152604082019050919050565b6000613af0601f83614543565b91507f477561726465643a20677561726469616e20646f65736e2774206578697374006000830152602082019050919050565b6000613b30601e83614543565b91507f536166654d6174684c69623a206164646974696f6e206f766572666c6f7700006000830152602082019050919050565b6000613b70602083614543565b91507f477561726465643a20677561726469616e20616c7265616479206578697374736000830152602082019050919050565b6000613bb0601b83614543565b91507f477561726465643a2063616e6e6f742072656d6f76652073656c6600000000006000830152602082019050919050565b6000613bf0601d83614543565b91507f42797465734c69623a20696e76616c69642064617461206c656e6774680000006000830152602082019050919050565b6000613c30602b83614543565b91507f5061796d656e7452656769737472793a20696e76616c6964206775617264696160008301527f6e207369676e61747572650000000000000000000000000000000000000000006020830152604082019050919050565b613c928161462a565b82525050565b613ca9613ca48261462a565b61473c565b82525050565b613cb881614634565b82525050565b6000613cca828461348e565b60148201915081905092915050565b6000613ce5828761348e565b601482019150613cf5828661348e565b601482019150613d05828561348e565b601482019150613d1582846134da565b60208201915081905095945050505050565b6000613d33828961348e565b601482019150613d43828861348e565b601482019150613d53828761348e565b601482019150613d6382866134da565b602082019150613d738285613c98565b602082019150613d838284613c98565b602082019150819050979650505050505050565b6000613da3828661348e565b601482019150613db3828561348e565b601482019150613dc38284613c98565b602082019150819050949350505050565b6000613de082876134b4565b600182019150613df0828661348e565b601482019150613e0082856134da565b602082019150613e1082846134da565b60208201915081905095945050505050565b6000613e2d82613627565b9150613e3982846134da565b60208201915081905092915050565b6000613e548287613c98565b602082019150613e64828661348e565b601482019150613e7482856134da565b602082019150613e84828461352a565b915081905095945050505050565b6000602082019050613ea7600083018461347f565b92915050565b6000602082019050613ec26000830184613470565b92915050565b6000604082019050613edd6000830185613470565b613eea602083018461347f565b9392505050565b6000604082019050613f06600083018561347f565b613f13602083018461347f565b9392505050565b6000606082019050613f2f600083018661347f565b613f3c602083018561347f565b613f49604083018461347f565b949350505050565b6000608082019050613f66600083018761347f565b613f73602083018661347f565b613f80604083018561347f565b613f8d6060830184613c89565b95945050505050565b6000606082019050613fab600083018661347f565b613fb8602083018561347f565b613fc56040830184613c89565b949350505050565b6000606082019050613fe2600083018661347f565b613fef60208301856134cb565b613ffc6040830184613c89565b949350505050565b6000606082019050614019600083018661347f565b6140266020830185613579565b818103604083015261403881846134f1565b9050949350505050565b6000604082019050614057600083018561347f565b6140646020830184613c89565b9392505050565b6000606082019050614080600083018661347f565b61408d6020830185613c89565b818103604083015261409f81846134f1565b9050949350505050565b60006020820190506140be60008301846134a5565b92915050565b60006020820190506140d960008301846134cb565b92915050565b600060c0820190506140f460008301896134cb565b614101602083018861347f565b61410e604083018761347f565b61411b606083018661347f565b61412860808301856134cb565b61413560a0830184613c89565b979650505050505050565b600060408201905061415560008301856134cb565b6141626020830184613c89565b9392505050565b600060608201905061417e60008301866134cb565b61418b6020830185613c89565b6141986040830184613c89565b949350505050565b60006080820190506141b560008301876134cb565b6141c26020830186613caf565b6141cf60408301856134cb565b6141dc60608301846134cb565b95945050505050565b60006020820190506141fa600083018461355b565b92915050565b6000602082019050614215600083018461356a565b92915050565b600060208201905081810360008301526142358184613588565b905092915050565b60006020820190508181036000830152614256816135c1565b9050919050565b6000602082019050818103600083015261427681613667565b9050919050565b60006020820190508181036000830152614296816136a7565b9050919050565b600060208201905081810360008301526142b68161370d565b9050919050565b600060208201905081810360008301526142d681613773565b9050919050565b600060208201905081810360008301526142f6816137d9565b9050919050565b600060208201905081810360008301526143168161383f565b9050919050565b60006020820190508181036000830152614336816138a5565b9050919050565b600060208201905081810360008301526143568161390b565b9050919050565b6000602082019050818103600083015261437681613971565b9050919050565b60006020820190508181036000830152614396816139b1565b9050919050565b600060208201905081810360008301526143b681613a17565b9050919050565b600060208201905081810360008301526143d681613a7d565b9050919050565b600060208201905081810360008301526143f681613ae3565b9050919050565b6000602082019050818103600083015261441681613b23565b9050919050565b6000602082019050818103600083015261443681613b63565b9050919050565b6000602082019050818103600083015261445681613ba3565b9050919050565b6000602082019050818103600083015261447681613be3565b9050919050565b6000602082019050818103600083015261449681613c23565b9050919050565b60006020820190506144b26000830184613c89565b92915050565b6000604051905081810181811067ffffffffffffffff821117156144db57600080fd5b8060405250919050565b600067ffffffffffffffff8211156144fc57600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000808585111561456f57600080fd5b8386111561457c57600080fd5b6001850283019150848603905094509492505050565b600061459d8261460a565b9050919050565b60008115159050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b60006145f182614592565b9050919050565b600061460382614592565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061464c826146ad565b9050919050565b600061465e82614665565b9050919050565b60006146708261460a565b9050919050565b600061468282614689565b9050919050565b60006146948261460a565b9050919050565b60006146a68261462a565b9050919050565b60006146b8826146bf565b9050919050565b60006146ca8261460a565b9050919050565b60005b838110156146ef5780820151818401526020810190506146d4565b838111156146fe576000848401525b50505050565b600061470f8261472a565b9050919050565b6000819050919050565b6000819050919050565b600061473582614757565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61476d81614592565b811461477857600080fd5b50565b614784816145a4565b811461478f57600080fd5b50565b61479b816145dc565b81146147a657600080fd5b50565b6147b2816145e6565b81146147bd57600080fd5b50565b6147c9816145f8565b81146147d457600080fd5b50565b6147e08161462a565b81146147eb57600080fd5b5056fe6080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506103a4806100536000396000f3fe60806040526004361061002d5760003560e01c80633f579f4214610039578063f77c47911461016257610034565b3661003457005b600080fd5b34801561004557600080fd5b506100e76004803603606081101561005c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156100a357600080fd5b8201836020820111156100b557600080fd5b803590602001918460018302840111640100000000831117156100d757600080fd5b90919293919293905050506101a3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561012757808201518184015260208101905061010c565b50505050905090810190601f1680156101545780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016e57600080fd5b50610177610347565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610249576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061036c602c913960400191505060405180910390fd5b606060008673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d80600081146102b9576040519150601f19603f3d011682016040523d82523d6000602084013e6102be565b606091505b5080935081925050508061033a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b8192505050949350505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a536166654d6174684c69623a207375627472616374696f6e206f766572666c6f77a164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061018e5760003560e01c80639130c06e116100de578063c36326e711610097578063da1b213d11610071578063da1b213d146104bb578063dc7d6c31146104d7578063df04338014610507578063e0fe396e146105235761018e565b8063c36326e71461043d578063d0f710d61461046d578063d2c83b9a1461049d5761018e565b80639130c06e146103915780639a85fae2146103ad5780639a8a0592146103c9578063a526d83b146103e7578063b0274a7314610403578063bdff4b3b1461041f5761018e565b80636121fcfc1161014b578063714041561161012557806371404156146102f757806384389a2b1461031357806387d31313146103435780638a1773ab146103615761018e565b80636121fcfc1461028f5780636524a947146102bf5780636866da52146102db5761018e565b80630c68ba2114610193578063116191b6146101c35780632e4f161e146101e15780632e7037a014610211578063392e53cd1461024157806360bf4df21461025f575b600080fd5b6101ad60048036038101906101a89190612f83565b61053f565b6040516101ba91906140a9565b60405180910390f35b6101cb610594565b6040516101d89190613e92565b60405180910390f35b6101fb60048036038101906101f69190612fe8565b6105ba565b60405161020891906140c4565b60405180910390f35b61022b600480360381019061022691906133f5565b6105d2565b60405161023891906140c4565b60405180910390f35b6102496105f2565b60405161025691906140a9565b60405180910390f35b61027960048036038101906102749190612f83565b61064a565b6040516102869190613e92565b60405180910390f35b6102a960048036038101906102a49190612f83565b61065c565b6040516102b691906140a9565b60405180910390f35b6102d960048036038101906102d49190612f83565b6106f7565b005b6102f560048036038101906102f0919061320c565b610703565b005b610311600480360381019061030c9190612f83565b610a28565b005b61032d6004803603810190610328919061341e565b610c40565b60405161033a91906140c4565b60405180910390f35b61034b610c6f565b6040516103589190614200565b60405180910390f35b61037b600480360381019061037691906132a1565b610c95565b604051610388919061449d565b60405180910390f35b6103ab60048036038101906103a69190612f83565b610cb5565b005b6103c760048036038101906103c2919061304b565b610fe9565b005b6103d16110f4565b6040516103de919061449d565b60405180910390f35b61040160048036038101906103fc9190612f83565b6110fa565b005b61041d60048036038101906104189190612f83565b611191565b005b6104276113ac565b604051610434919061449d565b60405180910390f35b61045760048036038101906104529190612fac565b6113b2565b604051610464919061449d565b60405180910390f35b610487600480360381019061048291906132ca565b61143c565b60405161049491906140a9565b60405180910390f35b6104a5611495565b6040516104b291906141e5565b60405180910390f35b6104d560048036038101906104d09190613121565b6114bb565b005b6104f160048036038101906104ec9190612fac565b6115c2565b6040516104fe919061449d565b60405180910390f35b610521600480360381019061051c919061304b565b61164c565b005b61053d60048036038101906105389190613363565b61174f565b005b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006105c885858585611955565b9050949350505050565b60006105eb82600001518360200151846040015161198e565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b6000610655826119e6565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff16600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b61070081611a84565b50565b600061070d611c94565b905060006107a3600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205486611ca590919063ffffffff16565b9050600081116107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df9061435d565b60405180910390fd5b60006107f583888861198e565b90506108458186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611cd2565b610884576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087b9061447d565b60405180910390fd5b85600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506109128388611d3f565b610980600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848985611efc565b7f95f66b073d65f18e43f6b76c7ab8557787f5f766d86cab7c9c76f41be9f8abc6600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848989604051610a179493929190613f51565b60405180910390a150505050505050565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610ab3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aaa9061433d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161415610b22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b199061443d565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610bad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ba4906143dd565b60405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b3282604051610c35929190613ec8565b60405180910390a150565b6000610c68826000015183602001518460400151856060015186608001518760a0015161218c565b9050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060086000838152602001908152602001600020600001549050919050565b6000610cbf611c94565b90506000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000811415610d89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d80906142fd565b60405180910390fd5b42811115610dcc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc39061437d565b60405180910390fd5b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610f0d578173ffffffffffffffffffffffffffffffffffffffff16319050610f99565b8473ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401610f469190613e92565b60206040518083038186803b158015610f5e57600080fd5b505afa158015610f72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f969190613447565b90505b610fa582858784611efc565b7f5300d9a2838baade7cdc628c82cb80c1298853ba5f389d51e2b47330336aeffc82858784604051610fda9493929190613f51565b60405180910390a15050505050565b6000610ff3611c94565b905060008060006110928d858e8e8e8e8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506121ed565b9250925092506110ac826110a5866119e6565b8e84611efc565b7f771bc0494e1a2fcbef19a8762845000d8c4500454c756a7370c955e39ed60fd483826040516110dd929190614140565b60405180910390a150505050505050505050505050565b60025481565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611185576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117c9061433d565b60405180910390fd5b61118e81612691565b50565b600061119b611c94565b90506000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114611264576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161125b9061429d565b60405180910390fd5b61126d82611a84565b6112826006544261282090919063ffffffff16565b905080600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fed3c8c6cdfc6d7b91dc9db3e1f54866587c26c3c3e0f9e32cd1944974be43a50600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683858460405161139f9493929190613f51565b60405180910390a1505050565b60065481565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600061148c8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611cd2565b90509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006114c5611c94565b905060008060006115648e858f8f8f8f8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506121ed565b92509250925061157782858f848d612875565b7f8b67efde501ee9cd0e771f7436554c44a5c076239ff3a6fbb397646a4689c0f283828b6040516115aa93929190614169565b60405180910390a15050505050505050505050505050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000611656611c94565b905060008060006116f58d858e8e8e8e8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506121ed565b92509250925061170782858e84611efc565b7f6675346cd43846f7d47c310d39fb5c15bc7db66b3770338cdf1f133613a5ae988382604051611738929190614140565b60405180910390a150505050505050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146117df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d69061427d565b60405180910390fd5b6000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008414156118bb576224ea006006819055506118c3565b836006819055505b61190d838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505061293a565b61191681612992565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516119459190613ead565b60405180910390a1505050505050565b60008484848460405160200161196e9493929190613cd9565b604051602081830303815290604052805190602001209050949350505050565b60006119dd7f3b3087c8f883f1f44cabe66444f5f9d96f69de6a88f364ea10959eef0331414a8585856040516020016119c993929190613d97565b6040516020818303038152906040526129d6565b90509392505050565b600080826040516020016119fa9190613cbe565b604051602081830303815290604052805190602001209050606060405180602001611a2490612cff565b6020820181038252601f19601f820116604052509050600060ff60f81b30848480519060200120604051602001611a5e9493929190613dd4565b6040516020818303038152906040528051906020012090508060001c9350505050919050565b600073ffffffffffffffffffffffffffffffffffffffff16600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611c9157600081604051602001611b2e9190613cbe565b60405160208183030381529060405280519060200120905080604051611b5390612cff565b8190604051809103906000f5905080158015611b73573d6000803e3d6000fd5b50600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fd80572c0f2f24f2d9d726d831bd860ed82b12bafaf01cfb6e4d38fb23c4347e9600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683604051611c87929190613ef1565b60405180910390a1505b50565b6000611ca06028612a17565b905090565b6000611cca8383604051806060016040528060218152602001614be660219139612aac565b905092915050565b600080611ce88385612b0190919063ffffffff16565b90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115611eee576000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507fa19281a6f3163da06f6b82f3ecf0130493c52aba23cdc2a312f652742f0d1801600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383604051611ee193929190613f1a565b60405180910390a1611ef8565b611ef782611a84565b5b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612016578373ffffffffffffffffffffffffffffffffffffffff16633f579f428483600067ffffffffffffffff81118015611f6757600080fd5b506040519080825280601f01601f191660200182016040528015611f9a5781602001600182028036833780820191505090505b506040518463ffffffff1660e01b8152600401611fb99392919061406b565b600060405180830381600087803b158015611fd357600080fd5b505af1158015611fe7573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906120109190613322565b50612186565b60608473ffffffffffffffffffffffffffffffffffffffff16633f579f4284600063a9059cbb60e01b8887604051602401612052929190614042565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518463ffffffff1660e01b81526004016120cd93929190614004565b600060405180830381600087803b1580156120e757600080fd5b505af11580156120fb573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906121249190613322565b905060008151111561218457808060200190518101906121449190613278565b612183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217a9061431d565b60405180910390fd5b5b505b50505050565b60006121e17f745089e29f2abf28f618236a5dc04d214ac05ead3440ba532b69e9d160ba2e728888888888886040516020016121cd96959493929190613d27565b6040516020818303038152906040526129d6565b90509695505050505050565b6000806000806122018c8c8c8c8c8c61218c565b905060008651141561230057600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166359b52ef88d838b6040518463ffffffff1660e01b815260040161226c93929190613fcd565b60206040518083038186803b15801561228457600080fd5b505afa158015612298573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122bc9190613278565b6122fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122f29061447d565b60405180910390fd5b6124f1565b60006123158783612b0190919063ffffffff16565b90508073ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff16146124ef57600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334d323a48e838c6040518463ffffffff1660e01b81526004016123a993929190613f96565b60206040518083038186803b1580156123c157600080fd5b505afa1580156123d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f99190613278565b806124af5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334d323a48e838c6040518463ffffffff1660e01b815260040161245e93929190613f96565b60206040518083038186803b15801561247657600080fd5b505afa15801561248a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ae9190613278565b5b6124ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124e5906143bd565b60405180910390fd5b5b505b6124fb8186611cd2565b61253a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125319061447d565b60405180910390fd5b6125468c8c8c8c611955565b9350612571600860008681526020019081526020016000206000015488611ca590919063ffffffff16565b915060008214156125b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125ae906142bd565b60405180910390fd5b8660086000868152602001908152602001600020600001819055506125dc8c8b611d3f565b600760008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1692507f0d1cb77d1fe491f98926195d0b885509da18bc305dd1489f45610237d971ed46848d8d8d8d8c60405161267a969594939291906140df565b60405180910390a150985098509895505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612701576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126f89061425d565b60405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561278d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127849061441d565b60405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051612815929190613ec8565b60405180910390a150565b60008082840190508381101561286b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612862906143fd565b60405180910390fd5b8091505092915050565b600081116128b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128af9061423d565b60405180910390fd5b60006128cd8284611ca590919063ffffffff16565b905060008111612912576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129099061439d565b60405180910390fd5b61291e86868684611efc565b6129328661292b876119e6565b8685611efc565b505050505050565b6000815114156129525761294d32612691565b61298f565b60008151905060005b8181101561298c5761297f83828151811061297257fe5b6020026020010151612691565b808060010191505061295b565b50505b50565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000612a0f6002543085856040516020016129f49493929190613e48565b60405160208183030381529060405280519060200120612bbc565b905092915050565b60008060009050612a26612bec565b15612a9f576000836000369050039050612a9760003683906014850192612a4f9392919061455f565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612c99565b915050612aa3565b3390505b80915050919050565b6000838311158290612af4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612aeb919061421b565b60405180910390fd5b5082840390509392505050565b60008060009050604183511415612bb25760008060006020860151925060408601519150606086015160001a9050601b8160ff161015612b4257601b810190505b601b8160ff161480612b575750601c8160ff16145b15612bae5760018782858560405160008152602001604052604051612b7f94939291906141a0565b6020604051602081039080840390855afa158015612ba1573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b600081604051602001612bcf9190613e22565b604051602081830303815290604052805190602001209050919050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415612c9257602c60003690501015612c8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c84906142dd565b60405180910390fd5b600190505b8091505090565b6000806014835114612ce0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cd79061445d565b60405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b6103f7806147ef83390190565b600081359050612d1b81614764565b92915050565b60008083601f840112612d3357600080fd5b8235905067ffffffffffffffff811115612d4c57600080fd5b602083019150836020820283011115612d6457600080fd5b9250929050565b600081519050612d7a8161477b565b92915050565b600081359050612d8f81614792565b92915050565b60008083601f840112612da757600080fd5b8235905067ffffffffffffffff811115612dc057600080fd5b602083019150836001820283011115612dd857600080fd5b9250929050565b600082601f830112612df057600080fd5b8151612e03612dfe826144e5565b6144b8565b91508082526020830160208301858383011115612e1f57600080fd5b612e2a8382846146d1565b50505092915050565b600081359050612e42816147a9565b92915050565b600081359050612e57816147c0565b92915050565b600060608284031215612e6f57600080fd5b612e7960606144b8565b90506000612e8984828501612d0c565b6000830152506020612e9d84828501612d0c565b6020830152506040612eb184828501612f59565b60408301525092915050565b600060c08284031215612ecf57600080fd5b612ed960c06144b8565b90506000612ee984828501612d0c565b6000830152506020612efd84828501612d0c565b6020830152506040612f1184828501612d0c565b6040830152506060612f2584828501612d80565b6060830152506080612f3984828501612f59565b60808301525060a0612f4d84828501612f59565b60a08301525092915050565b600081359050612f68816147d7565b92915050565b600081519050612f7d816147d7565b92915050565b600060208284031215612f9557600080fd5b6000612fa384828501612d0c565b91505092915050565b60008060408385031215612fbf57600080fd5b6000612fcd85828601612d0c565b9250506020612fde85828601612d0c565b9150509250929050565b60008060008060808587031215612ffe57600080fd5b600061300c87828801612d0c565b945050602061301d87828801612d0c565b935050604061302e87828801612d0c565b925050606061303f87828801612d80565b91505092959194509250565b600080600080600080600080600060e08a8c03121561306957600080fd5b60006130778c828d01612d0c565b99505060206130888c828d01612d0c565b98505060406130998c828d01612d80565b97505060606130aa8c828d01612f59565b96505060806130bb8c828d01612f59565b95505060a08a013567ffffffffffffffff8111156130d857600080fd5b6130e48c828d01612d95565b945094505060c08a013567ffffffffffffffff81111561310357600080fd5b61310f8c828d01612d95565b92509250509295985092959850929598565b6000806000806000806000806000806101008b8d03121561314157600080fd5b600061314f8d828e01612d0c565b9a505060206131608d828e01612d0c565b99505060406131718d828e01612d80565b98505060606131828d828e01612f59565b97505060806131938d828e01612f59565b96505060a06131a48d828e01612f59565b95505060c08b013567ffffffffffffffff8111156131c157600080fd5b6131cd8d828e01612d95565b945094505060e08b013567ffffffffffffffff8111156131ec57600080fd5b6131f88d828e01612d95565b92509250509295989b9194979a5092959850565b6000806000806060858703121561322257600080fd5b600061323087828801612d0c565b945050602061324187828801612f59565b935050604085013567ffffffffffffffff81111561325e57600080fd5b61326a87828801612d95565b925092505092959194509250565b60006020828403121561328a57600080fd5b600061329884828501612d6b565b91505092915050565b6000602082840312156132b357600080fd5b60006132c184828501612d80565b91505092915050565b6000806000604084860312156132df57600080fd5b60006132ed86828701612d80565b935050602084013567ffffffffffffffff81111561330a57600080fd5b61331686828701612d95565b92509250509250925092565b60006020828403121561333457600080fd5b600082015167ffffffffffffffff81111561334e57600080fd5b61335a84828501612ddf565b91505092915050565b60008060008060008060a0878903121561337c57600080fd5b600061338a89828a01612e33565b965050602061339b89828a01612e48565b95505060406133ac89828a01612f59565b945050606087013567ffffffffffffffff8111156133c957600080fd5b6133d589828a01612d21565b935093505060806133e889828a01612d0c565b9150509295509295509295565b60006060828403121561340757600080fd5b600061341584828501612e5d565b91505092915050565b600060c0828403121561343057600080fd5b600061343e84828501612ebd565b91505092915050565b60006020828403121561345957600080fd5b600061346784828501612f6e565b91505092915050565b61347981614641565b82525050565b61348881614592565b82525050565b61349f61349a82614592565b614704565b82525050565b6134ae816145a4565b82525050565b6134c56134c0826145b0565b614716565b82525050565b6134d4816145dc565b82525050565b6134eb6134e6826145dc565b614720565b82525050565b60006134fc82614511565b6135068185614527565b93506135168185602086016146d1565b61351f81614746565b840191505092915050565b600061353582614511565b61353f8185614538565b935061354f8185602086016146d1565b80840191505092915050565b61356481614653565b82525050565b61357381614677565b82525050565b6135828161469b565b82525050565b60006135938261451c565b61359d8185614543565b93506135ad8185602086016146d1565b6135b681614746565b840191505092915050565b60006135ce602683614543565b91507f5061796d656e7452656769737472793a20696e76616c6964206465706f73697460008301527f2076616c756500000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613634601c83614554565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b6000613674602083614543565b91507f477561726465643a2063616e6e6f74206164642030783020677561726469616e6000830152602082019050919050565b60006136b4602f83614543565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b600061371a602f83614543565b91507f5061796d656e7452656769737472793a206465706f736974206578697420616c60008301527f72656164792072657175657374656400000000000000000000000000000000006020830152604082019050919050565b6000613780602683614543565b91507f5061796d656e7452656769737472793a20696e76616c6964207061796d656e7460008301527f2076616c756500000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006137e6602283614543565b91507f47617465776179526563697069656e743a20696e76616c6964206d73672e646160008301527f74610000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061384c602b83614543565b91507f5061796d656e7452656769737472793a206465706f7369742065786974206e6f60008301527f74207265717565737465640000000000000000000000000000000000000000006020830152604082019050919050565b60006138b2602d83614543565b91507f5061796d656e7452656769737472793a204552433230546f6b656e207472616e60008301527f73666572207265766572746564000000000000000000000000000000000000006020830152604082019050919050565b6000613918602683614543565b91507f477561726465643a2074782e6f726967696e206973206e6f742074686520677560008301527f61726469616e00000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061397e601f83614543565b91507f5061796d656e7452656769737472793a20696e76616c696420616d6f756e74006000830152602082019050919050565b60006139be602483614543565b91507f5061796d656e7452656769737472793a206465706f7369742065786974206c6f60008301527f636b6564000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613a24602783614543565b91507f5061796d656e7452656769737472793a20696e76616c6964207769746864726160008301527f772076616c7565000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613a8a602983614543565b91507f5061796d656e7452656769737472793a20696e76616c69642073656e6465722060008301527f7369676e617475726500000000000000000000000000000000000000000000006020830152604082019050919050565b6000613af0601f83614543565b91507f477561726465643a20677561726469616e20646f65736e2774206578697374006000830152602082019050919050565b6000613b30601e83614543565b91507f536166654d6174684c69623a206164646974696f6e206f766572666c6f7700006000830152602082019050919050565b6000613b70602083614543565b91507f477561726465643a20677561726469616e20616c7265616479206578697374736000830152602082019050919050565b6000613bb0601b83614543565b91507f477561726465643a2063616e6e6f742072656d6f76652073656c6600000000006000830152602082019050919050565b6000613bf0601d83614543565b91507f42797465734c69623a20696e76616c69642064617461206c656e6774680000006000830152602082019050919050565b6000613c30602b83614543565b91507f5061796d656e7452656769737472793a20696e76616c6964206775617264696160008301527f6e207369676e61747572650000000000000000000000000000000000000000006020830152604082019050919050565b613c928161462a565b82525050565b613ca9613ca48261462a565b61473c565b82525050565b613cb881614634565b82525050565b6000613cca828461348e565b60148201915081905092915050565b6000613ce5828761348e565b601482019150613cf5828661348e565b601482019150613d05828561348e565b601482019150613d1582846134da565b60208201915081905095945050505050565b6000613d33828961348e565b601482019150613d43828861348e565b601482019150613d53828761348e565b601482019150613d6382866134da565b602082019150613d738285613c98565b602082019150613d838284613c98565b602082019150819050979650505050505050565b6000613da3828661348e565b601482019150613db3828561348e565b601482019150613dc38284613c98565b602082019150819050949350505050565b6000613de082876134b4565b600182019150613df0828661348e565b601482019150613e0082856134da565b602082019150613e1082846134da565b60208201915081905095945050505050565b6000613e2d82613627565b9150613e3982846134da565b60208201915081905092915050565b6000613e548287613c98565b602082019150613e64828661348e565b601482019150613e7482856134da565b602082019150613e84828461352a565b915081905095945050505050565b6000602082019050613ea7600083018461347f565b92915050565b6000602082019050613ec26000830184613470565b92915050565b6000604082019050613edd6000830185613470565b613eea602083018461347f565b9392505050565b6000604082019050613f06600083018561347f565b613f13602083018461347f565b9392505050565b6000606082019050613f2f600083018661347f565b613f3c602083018561347f565b613f49604083018461347f565b949350505050565b6000608082019050613f66600083018761347f565b613f73602083018661347f565b613f80604083018561347f565b613f8d6060830184613c89565b95945050505050565b6000606082019050613fab600083018661347f565b613fb8602083018561347f565b613fc56040830184613c89565b949350505050565b6000606082019050613fe2600083018661347f565b613fef60208301856134cb565b613ffc6040830184613c89565b949350505050565b6000606082019050614019600083018661347f565b6140266020830185613579565b818103604083015261403881846134f1565b9050949350505050565b6000604082019050614057600083018561347f565b6140646020830184613c89565b9392505050565b6000606082019050614080600083018661347f565b61408d6020830185613c89565b818103604083015261409f81846134f1565b9050949350505050565b60006020820190506140be60008301846134a5565b92915050565b60006020820190506140d960008301846134cb565b92915050565b600060c0820190506140f460008301896134cb565b614101602083018861347f565b61410e604083018761347f565b61411b606083018661347f565b61412860808301856134cb565b61413560a0830184613c89565b979650505050505050565b600060408201905061415560008301856134cb565b6141626020830184613c89565b9392505050565b600060608201905061417e60008301866134cb565b61418b6020830185613c89565b6141986040830184613c89565b949350505050565b60006080820190506141b560008301876134cb565b6141c26020830186613caf565b6141cf60408301856134cb565b6141dc60608301846134cb565b95945050505050565b60006020820190506141fa600083018461355b565b92915050565b6000602082019050614215600083018461356a565b92915050565b600060208201905081810360008301526142358184613588565b905092915050565b60006020820190508181036000830152614256816135c1565b9050919050565b6000602082019050818103600083015261427681613667565b9050919050565b60006020820190508181036000830152614296816136a7565b9050919050565b600060208201905081810360008301526142b68161370d565b9050919050565b600060208201905081810360008301526142d681613773565b9050919050565b600060208201905081810360008301526142f6816137d9565b9050919050565b600060208201905081810360008301526143168161383f565b9050919050565b60006020820190508181036000830152614336816138a5565b9050919050565b600060208201905081810360008301526143568161390b565b9050919050565b6000602082019050818103600083015261437681613971565b9050919050565b60006020820190508181036000830152614396816139b1565b9050919050565b600060208201905081810360008301526143b681613a17565b9050919050565b600060208201905081810360008301526143d681613a7d565b9050919050565b600060208201905081810360008301526143f681613ae3565b9050919050565b6000602082019050818103600083015261441681613b23565b9050919050565b6000602082019050818103600083015261443681613b63565b9050919050565b6000602082019050818103600083015261445681613ba3565b9050919050565b6000602082019050818103600083015261447681613be3565b9050919050565b6000602082019050818103600083015261449681613c23565b9050919050565b60006020820190506144b26000830184613c89565b92915050565b6000604051905081810181811067ffffffffffffffff821117156144db57600080fd5b8060405250919050565b600067ffffffffffffffff8211156144fc57600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000808585111561456f57600080fd5b8386111561457c57600080fd5b6001850283019150848603905094509492505050565b600061459d8261460a565b9050919050565b60008115159050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b60006145f182614592565b9050919050565b600061460382614592565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061464c826146ad565b9050919050565b600061465e82614665565b9050919050565b60006146708261460a565b9050919050565b600061468282614689565b9050919050565b60006146948261460a565b9050919050565b60006146a68261462a565b9050919050565b60006146b8826146bf565b9050919050565b60006146ca8261460a565b9050919050565b60005b838110156146ef5780820151818401526020810190506146d4565b838111156146fe576000848401525b50505050565b600061470f8261472a565b9050919050565b6000819050919050565b6000819050919050565b600061473582614757565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61476d81614592565b811461477857600080fd5b50565b614784816145a4565b811461478f57600080fd5b50565b61479b816145dc565b81146147a657600080fd5b50565b6147b2816145e6565b81146147bd57600080fd5b50565b6147c9816145f8565b81146147d457600080fd5b50565b6147e08161462a565b81146147eb57600080fd5b5056fe6080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506103a4806100536000396000f3fe60806040526004361061002d5760003560e01c80633f579f4214610039578063f77c47911461016257610034565b3661003457005b600080fd5b34801561004557600080fd5b506100e76004803603606081101561005c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156100a357600080fd5b8201836020820111156100b557600080fd5b803590602001918460018302840111640100000000831117156100d757600080fd5b90919293919293905050506101a3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561012757808201518184015260208101905061010c565b50505050905090810190601f1680156101545780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016e57600080fd5b50610177610347565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610249576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061036c602c913960400191505060405180910390fd5b606060008673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d80600081146102b9576040519150601f19603f3d011682016040523d82523d6000602084013e6102be565b606091505b5080935081925050508061033a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b8192505050949350505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a536166654d6174684c69623a207375627472616374696f6e206f766572666c6f77a164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "details": "the `DepositExit` process can be used in a case operator (guardian) couldn't sign commit / withdrawal message. Process will be rejected when any of senders channels will be committed.", + "events": { + "DepositAccountDeployed(address,address)": { + "details": "Emitted when the deposit account is deployed", + "params": { + "depositAccount": "deposit account address", + "owner": "owner address" + } + }, + "DepositExitCompleted(address,address,address,uint256)": { + "details": "Emitted when the deposit exist is completed", + "params": { + "amount": "deposit exist amount", + "depositAccount": "deposit account address", + "owner": "owner address", + "token": "token address" + } + }, + "DepositExitRejected(address,address,address)": { + "details": "Emitted when the deposit exist is rejected", + "params": { + "depositAccount": "deposit account address", + "owner": "owner address", + "token": "token address" + } + }, + "DepositExitRequested(address,address,address,uint256)": { + "details": "Emitted when the deposit exist is requested", + "params": { + "depositAccount": "deposit account address", + "lockedUntil": "deposit exist locked util time", + "owner": "owner address", + "token": "token address" + } + }, + "DepositWithdrawn(address,address,address,uint256)": { + "details": "Emitted when the deposit has been withdrawn", + "params": { + "amount": "withdrawn amount", + "depositAccount": "deposit account address", + "owner": "owner address", + "token": "token address" + } + }, + "PaymentChannelCommitted(bytes32,address,address,address,bytes32,uint256)": { + "details": "Emitted when the payment channel has been committed", + "params": { + "amount": "committed amount", + "hash": "channel hash", + "recipient": "recipient address", + "sender": "sender address", + "token": "token address", + "uid": "unique channel id" + } + }, + "PaymentDeposited(bytes32,uint256)": { + "details": "Emitted when the payment has been deposited", + "params": { + "channelHash": "channel hash", + "value": "payment value" + } + }, + "PaymentSplit(bytes32,uint256,uint256)": { + "details": "Emitted when the payment has been withdrawn and deposited (split)", + "params": { + "channelHash": "channel hash", + "depositValue": "payment deposited value", + "totalValue": "payment total value" + } + }, + "PaymentWithdrawn(bytes32,uint256)": { + "details": "Emitted when the payment has been withdrawn", + "params": { + "channelHash": "channel hash", + "value": "payment value" + } + } + }, + "kind": "dev", + "methods": { + "addGuardian(address)": { + "params": { + "guardian": "guardian address" + } + }, + "commitPaymentChannelAndDeposit(address,address,bytes32,uint256,uint256,bytes,bytes)": { + "params": { + "amount": "amount to commit", + "blockNumber": "block number", + "guardianSignature": "guardian signature", + "sender": "sender address", + "senderSignature": "sender signature", + "token": "token address", + "uid": "unique channel id" + } + }, + "commitPaymentChannelAndSplit(address,address,bytes32,uint256,uint256,uint256,bytes,bytes)": { + "params": { + "amount": "amount to commit", + "blockNumber": "block number", + "depositPaymentValue": "amount to deposit", + "guardianSignature": "guardian signature", + "sender": "sender address", + "senderSignature": "sender signature", + "token": "token address", + "uid": "unique channel id" + } + }, + "commitPaymentChannelAndWithdraw(address,address,bytes32,uint256,uint256,bytes,bytes)": { + "params": { + "amount": "amount to commit", + "blockNumber": "block number", + "guardianSignature": "guardian signature", + "sender": "sender address", + "senderSignature": "sender signature", + "token": "token address", + "uid": "unique channel id" + } + }, + "computeDepositAccountAddress(address)": { + "params": { + "owner": "owner address" + }, + "returns": { + "_0": "deposit account address" + } + }, + "computePaymentChannelHash(address,address,address,bytes32)": { + "params": { + "recipient": "recipient address", + "sender": "sender address", + "token": "token address", + "uid": "unique channel id" + }, + "returns": { + "_0": "hash" + } + }, + "constructor": { + "details": "Public constructor" + }, + "deployDepositAccount(address)": { + "params": { + "owner": "owner address" + } + }, + "getDepositExitLockedUntil(address,address)": { + "params": { + "owner": "owner address", + "token": "token address" + }, + "returns": { + "_0": "locked until time" + } + }, + "getDepositWithdrawnAmount(address,address)": { + "params": { + "owner": "owner address", + "token": "token address" + }, + "returns": { + "_0": "withdrawn amount" + } + }, + "getPaymentChannelCommittedAmount(bytes32)": { + "params": { + "hash": "payment channel hash" + }, + "returns": { + "_0": "committed amount" + } + }, + "hashDepositWithdrawal((address,address,uint256))": { + "params": { + "depositWithdrawal": "struct" + }, + "returns": { + "_0": "hash" + } + }, + "hashPaymentChannelCommit((address,address,address,bytes32,uint256,uint256))": { + "params": { + "paymentChannelCommit": "struct" + }, + "returns": { + "_0": "hash" + } + }, + "initialize(address,address,uint256,address[],address)": { + "params": { + "depositExitLockPeriod_": "deposit exit lock period", + "externalAccountRegistry_": "`ExternalAccountRegistry` contract address", + "gateway_": "`Gateway` contract address", + "guardians_": "array of guardians addresses", + "personalAccountRegistry_": "`PersonalAccountRegistry` contract address" + } + }, + "isDepositAccountDeployed(address)": { + "params": { + "owner": "owner address" + }, + "returns": { + "_0": "true when deposit account is deployed" + } + }, + "isGuardian(address)": { + "params": { + "guardian": "guardian address" + }, + "returns": { + "_0": "true when guardian exists" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + }, + "processDepositExit(address)": { + "params": { + "token": "token address" + } + }, + "removeGuardian(address)": { + "params": { + "guardian": "guardian address" + } + }, + "requestDepositExit(address)": { + "params": { + "token": "token address" + } + }, + "verifyGuardianSignature(bytes32,bytes)": { + "params": { + "messageHash": "message hash", + "signature": "signature" + }, + "returns": { + "_0": "true on correct guardian signature" + } + }, + "withdrawDeposit(address,uint256,bytes)": { + "params": { + "amount": "amount to withdraw", + "guardianSignature": "guardian signature", + "token": "token address" + } + } + }, + "title": "Payment registry", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addGuardian(address)": { + "notice": "Adds a new guardian" + }, + "commitPaymentChannelAndDeposit(address,address,bytes32,uint256,uint256,bytes,bytes)": { + "notice": "Commits payment channel and deposit payment" + }, + "commitPaymentChannelAndSplit(address,address,bytes32,uint256,uint256,uint256,bytes,bytes)": { + "notice": "Commits payment channel, withdraws and deposits (split) payment" + }, + "commitPaymentChannelAndWithdraw(address,address,bytes32,uint256,uint256,bytes,bytes)": { + "notice": "Commits payment channel and withdraw payment" + }, + "computeDepositAccountAddress(address)": { + "notice": "Computes deposit account address" + }, + "computePaymentChannelHash(address,address,address,bytes32)": { + "notice": "Computes payment channel hash" + }, + "deployDepositAccount(address)": { + "notice": "Deploys deposit account" + }, + "getDepositExitLockedUntil(address,address)": { + "notice": "Gets deposit exit locked until time" + }, + "getDepositWithdrawnAmount(address,address)": { + "notice": "Gets deposit withdrawn amount" + }, + "getPaymentChannelCommittedAmount(bytes32)": { + "notice": "Gets payment channel committed amount" + }, + "hashDepositWithdrawal((address,address,uint256))": { + "notice": "Hashes `DepositWithdrawal` message payload" + }, + "hashPaymentChannelCommit((address,address,address,bytes32,uint256,uint256))": { + "notice": "Hashes `PaymentChannelCommit` message payload" + }, + "initialize(address,address,uint256,address[],address)": { + "notice": "Initialize `PaymentRegistry` contract" + }, + "isDepositAccountDeployed(address)": { + "notice": "Checks if deposit account is deployed" + }, + "isGuardian(address)": { + "notice": "Check if guardian exists" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + }, + "processDepositExit(address)": { + "notice": "Processes deposit exit" + }, + "removeGuardian(address)": { + "notice": "Removes the existing guardian" + }, + "requestDepositExit(address)": { + "notice": "Requests deposit exit" + }, + "verifyGuardianSignature(bytes32,bytes)": { + "notice": "Verifies guardian signature" + }, + "withdrawDeposit(address,uint256,bytes)": { + "notice": "Withdraws deposit" + } + }, + "notice": "A registry for payment and payment channels", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 40, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "guardians", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 1871, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "initializer", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 1935, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "chainId", + "offset": 0, + "slot": "2", + "type": "t_uint256" + }, + { + "astId": 5197, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "gateway", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 5526, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "externalAccountRegistry", + "offset": 0, + "slot": "4", + "type": "t_contract(ExternalAccountRegistry)4591" + }, + { + "astId": 5528, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "personalAccountRegistry", + "offset": 0, + "slot": "5", + "type": "t_contract(PersonalAccountRegistry)7452" + }, + { + "astId": 5530, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "depositExitLockPeriod", + "offset": 0, + "slot": "6", + "type": "t_uint256" + }, + { + "astId": 5534, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "deposits", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_address,t_struct(Deposit)5488_storage)" + }, + { + "astId": 5538, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "paymentChannels", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_bytes32,t_struct(PaymentChannel)5491_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(ExternalAccountRegistry)4591": { + "encoding": "inplace", + "label": "contract ExternalAccountRegistry", + "numberOfBytes": "20" + }, + "t_contract(PersonalAccountRegistry)7452": { + "encoding": "inplace", + "label": "contract PersonalAccountRegistry", + "numberOfBytes": "20" + }, + "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_struct(Deposit)5488_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct PaymentRegistry.Deposit)", + "numberOfBytes": "32", + "value": "t_struct(Deposit)5488_storage" + }, + "t_mapping(t_address,t_uint256)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_mapping(t_bytes32,t_struct(PaymentChannel)5491_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct PaymentRegistry.PaymentChannel)", + "numberOfBytes": "32", + "value": "t_struct(PaymentChannel)5491_storage" + }, + "t_struct(Deposit)5488_storage": { + "encoding": "inplace", + "label": "struct PaymentRegistry.Deposit", + "members": [ + { + "astId": 5479, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "account", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 5483, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "withdrawnAmount", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 5487, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "exitLockedUntil", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_uint256)" + } + ], + "numberOfBytes": "96" + }, + "t_struct(PaymentChannel)5491_storage": { + "encoding": "inplace", + "label": "struct PaymentRegistry.PaymentChannel", + "members": [ + { + "astId": 5490, + "contract": "src/payments/PaymentRegistry.sol:PaymentRegistry", + "label": "committedAmount", + "offset": 0, + "slot": "0", + "type": "t_uint256" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/PersonalAccountImplementationV1.json b/deployments/fuseSparknet/PersonalAccountImplementationV1.json new file mode 100644 index 00000000..757fe51e --- /dev/null +++ b/deployments/fuseSparknet/PersonalAccountImplementationV1.json @@ -0,0 +1,326 @@ +{ + "address": "0x0672aF0018fdEbACcc93c7D047D62b72CB12883A", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "interfaceHash", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "canImplementInterfaceForAddress", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "registry_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC1155Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "tokensReceived", + "outputs": [], + "stateMutability": "pure", + "type": "function" + } + ], + "transactionHash": "0x3fded149d1fa752a031943332ec16600ba871bb13aa6c7e4fd4c90b0c78a501f", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "777227", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7b8f04807210ee452490b4d65f348014f2c41a3c07c500e6cfdf5b8a26b3dfc6", + "transactionHash": "0x3fded149d1fa752a031943332ec16600ba871bb13aa6c7e4fd4c90b0c78a501f", + "logs": [], + "blockNumber": 5497490, + "cumulativeGasUsed": "777227", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"interfaceHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"canImplementInterfaceForAddress\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"registry_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"isValidSignature\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"isValidSignature\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"registry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"tokensReceived\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Public constructor\"},\"initialize(address)\":{\"params\":{\"registry_\":\"registry address\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}}},\"title\":\"Personal account implementation (version 1)\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initialize(address)\":{\"notice\":\"Initializes `AccountImplementation` contract\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/personal/PersonalAccountImplementationV1.sol\":\"PersonalAccountImplementationV1\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/access/Controlled.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Controlled\\n *\\n * @dev Contract module which provides an access control mechanism.\\n * It ensures there is only one controlling account of the smart contract\\n * and grants that account exclusive access to specific functions.\\n *\\n * The controller account will be the one that deploys the contract.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Controlled {\\n /**\\n * @return controller account address\\n */\\n address public controller;\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if msg.sender is not the controller\\n */\\n modifier onlyController() {\\n require(\\n msg.sender == controller,\\n \\\"Controlled: msg.sender is not the controller\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n controller = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xdf03a0b7ec644da9925c5c1b6c8a86bb1cc1b9c5018bb265a1a4c5044b877af3\",\"license\":\"MIT\"},\"src/common/account/Account.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../access/Controlled.sol\\\";\\nimport \\\"./AccountBase.sol\\\";\\n\\n\\n/**\\n * @title Account\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Account is Controlled, AccountBase {\\n address public implementation;\\n\\n /**\\n * @dev Public constructor\\n * @param registry_ account registry address\\n * @param implementation_ account implementation address\\n */\\n constructor(\\n address registry_,\\n address implementation_\\n )\\n public\\n Controlled()\\n {\\n registry = registry_;\\n implementation = implementation_;\\n }\\n\\n // external functions\\n\\n /**\\n * @notice Payable receive\\n */\\n receive()\\n external\\n payable\\n {\\n //\\n }\\n\\n /**\\n * @notice Fallback\\n */\\n // solhint-disable-next-line payable-fallback\\n fallback()\\n external\\n {\\n if (msg.data.length != 0) {\\n address implementation_ = implementation;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let calldedatasize := calldatasize()\\n\\n calldatacopy(0, 0, calldedatasize)\\n\\n let result := delegatecall(gas(), implementation_, 0, calldedatasize, 0, 0)\\n let returneddatasize := returndatasize()\\n\\n returndatacopy(0, 0, returneddatasize)\\n\\n switch result\\n case 0 { revert(0, returneddatasize) }\\n default { return(0, returneddatasize) }\\n }\\n }\\n }\\n\\n /**\\n * @notice Sets implementation\\n * @param implementation_ implementation address\\n */\\n function setImplementation(\\n address implementation_\\n )\\n external\\n onlyController\\n {\\n implementation = implementation_;\\n }\\n\\n /**\\n * @notice Executes transaction\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @return transaction result\\n */\\n function executeTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n onlyController\\n returns (bytes memory)\\n {\\n bytes memory result;\\n bool succeeded;\\n\\n // solhint-disable-next-line avoid-call-value, avoid-low-level-calls\\n (succeeded, result) = payable(to).call{value: value}(data);\\n\\n require(\\n succeeded,\\n \\\"Account: transaction reverted\\\"\\n );\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe516c999a02a65ee99487d398d0c12589500680a9ca08c852540fb9473d70a26\",\"license\":\"MIT\"},\"src/common/account/AccountBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Account base\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountBase {\\n address public registry;\\n}\\n\",\"keccak256\":\"0xcadf29e389f8db823e14f3f92808fd135f07b0135eb4dcf29b89c85941b39862\",\"license\":\"MIT\"},\"src/common/account/AccountImplementationV1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../lifecycle/Initializable.sol\\\";\\nimport \\\"./AccountBase.sol\\\";\\nimport \\\"./AccountRegistry.sol\\\";\\n\\n\\n/**\\n * @title Account implementation (version 1)\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountImplementationV1 is Initializable, AccountBase {\\n bytes32 constant private ERC777_TOKENS_RECIPIENT_INTERFACE_HASH = keccak256(abi.encodePacked(\\\"ERC777TokensRecipient\\\"));\\n bytes32 constant private ERC1820_ACCEPT_MAGIC = keccak256(abi.encodePacked(\\\"ERC1820_ACCEPT_MAGIC\\\"));\\n\\n bytes4 constant private ERC1271_VALID_MESSAGE_HASH_SIGNATURE = bytes4(keccak256(abi.encodePacked(\\\"isValidSignature(bytes32,bytes)\\\")));\\n bytes4 constant private ERC1271_VALID_MESSAGE_SIGNATURE = bytes4(keccak256(abi.encodePacked(\\\"isValidSignature(bytes,bytes)\\\")));\\n bytes4 constant private ERC1271_INVALID_SIGNATURE = 0xffffffff;\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal Initializable() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `AccountImplementation` contract\\n * @param registry_ registry address\\n */\\n function initialize(\\n address registry_\\n )\\n external\\n onlyInitializer\\n {\\n registry = registry_;\\n }\\n\\n // external functions (views)\\n\\n // ERC1820\\n\\n function canImplementInterfaceForAddress(\\n bytes32 interfaceHash,\\n address addr\\n )\\n external\\n view\\n returns(bytes32)\\n {\\n bytes32 result;\\n\\n if (interfaceHash == ERC777_TOKENS_RECIPIENT_INTERFACE_HASH && addr == address(this)) {\\n result = ERC1820_ACCEPT_MAGIC;\\n }\\n\\n return result;\\n }\\n\\n // ERC1271\\n\\n function isValidSignature(\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n external\\n view\\n returns (bytes4)\\n {\\n return AccountRegistry(registry).isValidAccountSignature(address(this), messageHash, signature)\\n ? ERC1271_VALID_MESSAGE_HASH_SIGNATURE\\n : ERC1271_INVALID_SIGNATURE;\\n }\\n\\n function isValidSignature(\\n bytes calldata message,\\n bytes calldata signature\\n )\\n external\\n view\\n returns (bytes4)\\n {\\n return AccountRegistry(registry).isValidAccountSignature(address(this), message, signature)\\n ? ERC1271_VALID_MESSAGE_SIGNATURE\\n : ERC1271_INVALID_SIGNATURE;\\n }\\n\\n // external functions (pure)\\n\\n // ERC721\\n\\n function onERC721Received(\\n address,\\n address,\\n uint256,\\n bytes calldata\\n )\\n external\\n pure\\n returns (bytes4)\\n {\\n return this.onERC721Received.selector;\\n }\\n\\n // ERC1155\\n\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes calldata\\n )\\n external\\n pure\\n returns (bytes4)\\n {\\n return this.onERC1155Received.selector;\\n }\\n\\n // ERC777\\n\\n function tokensReceived(\\n address,\\n address,\\n address,\\n uint256,\\n bytes calldata,\\n bytes calldata\\n )\\n external\\n pure\\n {}\\n}\\n\",\"keccak256\":\"0x7ec22f77f8e2c3059a9c728d463b1519f8d975b0d42d6a986cd45e22d62d59e8\",\"license\":\"MIT\"},\"src/common/account/AccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./Account.sol\\\";\\n\\n\\n/**\\n * @title Account registry\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nabstract contract AccountRegistry {\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param message message\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes calldata message,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0x2d40245721f5f74219e5cf88713246dbe8b6d5404e941125d3e850b1f127ec34\",\"license\":\"MIT\"},\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/personal/PersonalAccountImplementationV1.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/account/AccountImplementationV1.sol\\\";\\n\\n\\n/**\\n * @title Personal account implementation (version 1)\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract PersonalAccountImplementationV1 is AccountImplementationV1 {\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public AccountImplementationV1() {}\\n}\\n\",\"keccak256\":\"0xd5a860c49ec0863366f4ecb583f87b48696e7edc3535e61f4b635a94b7255989\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610caa806100606000396000f3fe608060405234801561001057600080fd5b50600436106100925760003560e01c8063249cb3fa11610066578063249cb3fa1461047c578063392e53cd146104de5780637b103999146104fe578063c4d66de814610532578063f23a6e611461057657610092565b806223de2914610097578063150b7a02146101cf5780631626ba7e146102c557806320c13b0b1461037b575b600080fd5b6101cd600480360360c08110156100ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561013457600080fd5b82018360208201111561014657600080fd5b8035906020019184600183028401116401000000008311171561016857600080fd5b90919293919293908035906020019064010000000081111561018957600080fd5b82018360208201111561019b57600080fd5b803590602001918460018302840111640100000000831117156101bd57600080fd5b9091929391929390505050610676565b005b610290600480360360808110156101e557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561024c57600080fd5b82018360208201111561025e57600080fd5b8035906020019184600183028401116401000000008311171561028057600080fd5b9091929391929390505050610680565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b610346600480360360408110156102db57600080fd5b81019080803590602001909291908035906020019064010000000081111561030257600080fd5b82018360208201111561031457600080fd5b8035906020019184600183028401116401000000008311171561033657600080fd5b9091929391929390505050610695565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104476004803603604081101561039157600080fd5b81019080803590602001906401000000008111156103ae57600080fd5b8201836020820111156103c057600080fd5b803590602001918460018302840111640100000000831117156103e257600080fd5b90919293919293908035906020019064010000000081111561040357600080fd5b82018360208201111561041557600080fd5b8035906020019184600183028401116401000000008311171561043757600080fd5b90919293919293905050506107f9565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104c86004803603604081101561049257600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061098a565b6040518082815260200191505060405180910390f35b6104e6610a66565b60405180821515815260200191505060405180910390f35b610506610abc565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105746004803603602081101561054857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae2565b005b610641600480360360a081101561058c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156105fd57600080fd5b82018360208201111561060f57600080fd5b8035906020019184600183028401116401000000008311171561063157600080fd5b9091929391929390505050610c58565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b5050505050505050565b600063150b7a0260e01b905095945050505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e1e382ce308686866040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060206040518083038186803b15801561075c57600080fd5b505afa158015610770573d6000803e3d6000fd5b505050506040513d602081101561078657600080fd5b81019080805190602001909291905050506107a85763ffffffff60e01b6107f0565b60405160200180807f697356616c69645369676e617475726528627974657333322c62797465732900815250601f019050604051602081830303815290604052805190602001205b90509392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663124e9eb330878787876040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f82011690508083019250505097505050505050505060206040518083038186803b1580156108ec57600080fd5b505afa158015610900573d6000803e3d6000fd5b505050506040513d602081101561091657600080fd5b81019080805190602001909291905050506109385763ffffffff60e01b610980565b60405160200180807f697356616c69645369676e61747572652862797465732c627974657329000000815250601d019050604051602081830303815290604052805190602001205b9050949350505050565b60008060405160200180807f455243373737546f6b656e73526563697069656e74000000000000000000000081525060150190506040516020818303038152906040528051906020012084148015610a0d57503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610a5c5760405160200180807f455243313832305f4143434550545f4d4147494300000000000000000000000081525060140190506040516020818303038152906040528051906020012090505b8091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610b86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180610c6f602f913960400191505060405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600063f23a6e6160e01b9050969550505050505056fe496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a6572a164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100925760003560e01c8063249cb3fa11610066578063249cb3fa1461047c578063392e53cd146104de5780637b103999146104fe578063c4d66de814610532578063f23a6e611461057657610092565b806223de2914610097578063150b7a02146101cf5780631626ba7e146102c557806320c13b0b1461037b575b600080fd5b6101cd600480360360c08110156100ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561013457600080fd5b82018360208201111561014657600080fd5b8035906020019184600183028401116401000000008311171561016857600080fd5b90919293919293908035906020019064010000000081111561018957600080fd5b82018360208201111561019b57600080fd5b803590602001918460018302840111640100000000831117156101bd57600080fd5b9091929391929390505050610676565b005b610290600480360360808110156101e557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561024c57600080fd5b82018360208201111561025e57600080fd5b8035906020019184600183028401116401000000008311171561028057600080fd5b9091929391929390505050610680565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b610346600480360360408110156102db57600080fd5b81019080803590602001909291908035906020019064010000000081111561030257600080fd5b82018360208201111561031457600080fd5b8035906020019184600183028401116401000000008311171561033657600080fd5b9091929391929390505050610695565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104476004803603604081101561039157600080fd5b81019080803590602001906401000000008111156103ae57600080fd5b8201836020820111156103c057600080fd5b803590602001918460018302840111640100000000831117156103e257600080fd5b90919293919293908035906020019064010000000081111561040357600080fd5b82018360208201111561041557600080fd5b8035906020019184600183028401116401000000008311171561043757600080fd5b90919293919293905050506107f9565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104c86004803603604081101561049257600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061098a565b6040518082815260200191505060405180910390f35b6104e6610a66565b60405180821515815260200191505060405180910390f35b610506610abc565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105746004803603602081101561054857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae2565b005b610641600480360360a081101561058c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803590602001906401000000008111156105fd57600080fd5b82018360208201111561060f57600080fd5b8035906020019184600183028401116401000000008311171561063157600080fd5b9091929391929390505050610c58565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b5050505050505050565b600063150b7a0260e01b905095945050505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e1e382ce308686866040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060206040518083038186803b15801561075c57600080fd5b505afa158015610770573d6000803e3d6000fd5b505050506040513d602081101561078657600080fd5b81019080805190602001909291905050506107a85763ffffffff60e01b6107f0565b60405160200180807f697356616c69645369676e617475726528627974657333322c62797465732900815250601f019050604051602081830303815290604052805190602001205b90509392505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663124e9eb330878787876040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f82011690508083019250505097505050505050505060206040518083038186803b1580156108ec57600080fd5b505afa158015610900573d6000803e3d6000fd5b505050506040513d602081101561091657600080fd5b81019080805190602001909291905050506109385763ffffffff60e01b610980565b60405160200180807f697356616c69645369676e61747572652862797465732c627974657329000000815250601d019050604051602081830303815290604052805190602001205b9050949350505050565b60008060405160200180807f455243373737546f6b656e73526563697069656e74000000000000000000000081525060150190506040516020818303038152906040528051906020012084148015610a0d57503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15610a5c5760405160200180807f455243313832305f4143434550545f4d4147494300000000000000000000000081525060140190506040516020818303038152906040528051906020012090505b8091505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610b86576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180610c6f602f913960400191505060405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600063f23a6e6160e01b9050969550505050505056fe496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a6572a164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "kind": "dev", + "methods": { + "constructor": { + "details": "Public constructor" + }, + "initialize(address)": { + "params": { + "registry_": "registry address" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + } + }, + "title": "Personal account implementation (version 1)", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "initialize(address)": { + "notice": "Initializes `AccountImplementation` contract" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + } + }, + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1871, + "contract": "src/personal/PersonalAccountImplementationV1.sol:PersonalAccountImplementationV1", + "label": "initializer", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 383, + "contract": "src/personal/PersonalAccountImplementationV1.sol:PersonalAccountImplementationV1", + "label": "registry", + "offset": 0, + "slot": "1", + "type": "t_address" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/PersonalAccountRegistry.json b/deployments/fuseSparknet/PersonalAccountRegistry.json new file mode 100644 index 00000000..13a2139a --- /dev/null +++ b/deployments/fuseSparknet/PersonalAccountRegistry.json @@ -0,0 +1,1058 @@ +{ + "address": "0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "AccountCallRefunded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "accountImplementation", + "type": "address" + } + ], + "name": "AccountDeployed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "accountImplementation", + "type": "address" + } + ], + "name": "AccountImplementationUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "AccountOwnerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "AccountOwnerRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "accountRegistry", + "type": "address" + } + ], + "name": "AccountRegistryUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "response", + "type": "bytes" + } + ], + "name": "AccountTransactionExecuted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "accountImplementation", + "type": "address" + } + ], + "name": "AccountUpgraded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "accountImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accountRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "addAccountOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "addGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "saltOwner", + "type": "address" + } + ], + "name": "computeAccountAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "deployAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "executeAccountTransaction", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "gateway", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "guardians_", + "type": "address[]" + }, + { + "internalType": "address", + "name": "accountImplementation_", + "type": "address" + }, + { + "internalType": "address", + "name": "gateway_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "isAccountDeployed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "isGuardian", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidAccountSignature", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidAccountSignature", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "refundAccountCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "removeAccountOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "removeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "accountImplementation_", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "upgradeAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "verifyAccountOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "verifyAccountOwnerAtBlock", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "verifyGuardianSignature", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0xfbd74ec51c1c57acba61bc69f83923a3dc5f913524e8bbbfd00f97c9031d28dd", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "3878167", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x1587f6fbb46a9ba239da5ad9f1c6e23f95b731b25a8cc96d3d3392d5ce2d7347", + "transactionHash": "0xfbd74ec51c1c57acba61bc69f83923a3dc5f913524e8bbbfd00f97c9031d28dd", + "logs": [], + "blockNumber": 5497495, + "cumulativeGasUsed": "3878167", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"beneficiary\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"AccountCallRefunded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"accountImplementation\",\"type\":\"address\"}],\"name\":\"AccountDeployed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"accountImplementation\",\"type\":\"address\"}],\"name\":\"AccountImplementationUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AccountOwnerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"AccountOwnerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"accountRegistry\",\"type\":\"address\"}],\"name\":\"AccountRegistryUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"response\",\"type\":\"bytes\"}],\"name\":\"AccountTransactionExecuted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"accountImplementation\",\"type\":\"address\"}],\"name\":\"AccountUpgraded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"GuardianAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"GuardianRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"accountImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accountRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"addAccountOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"addGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"saltOwner\",\"type\":\"address\"}],\"name\":\"computeAccountAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"deployAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"executeAccountTransaction\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"guardians_\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"accountImplementation_\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"gateway_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isAccountDeployed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"isGuardian\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"message\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"isValidAccountSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"isValidAccountSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"refundAccountCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"removeAccountOwner\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"guardian\",\"type\":\"address\"}],\"name\":\"removeGuardian\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"accountImplementation_\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"upgradeAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"verifyAccountOwner\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"}],\"name\":\"verifyAccountOwnerAtBlock\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"verifyGuardianSignature\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"events\":{\"AccountCallRefunded(address,address,address,uint256)\":{\"details\":\"Emitted when the call is refunded\",\"params\":{\"account\":\"account address\",\"beneficiary\":\"beneficiary address\",\"token\":\"token address\",\"value\":\"value\"}},\"AccountOwnerAdded(address,address)\":{\"details\":\"Emitted when the new owner is added\",\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"}},\"AccountOwnerRemoved(address,address)\":{\"details\":\"Emitted when the existing owner is removed\",\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"}}},\"kind\":\"dev\",\"methods\":{\"addAccountOwner(address,address)\":{\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"}},\"addGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"}},\"computeAccountAddress(address)\":{\"params\":{\"saltOwner\":\"salt owner address\"},\"returns\":{\"_0\":\"account address\"}},\"constructor\":{\"details\":\"Public constructor\"},\"deployAccount(address)\":{\"params\":{\"account\":\"account address\"}},\"executeAccountTransaction(address,address,uint256,bytes)\":{\"details\":\"Deploys an account if not deployed yet\",\"params\":{\"account\":\"account address\",\"data\":\"data\",\"to\":\"to address\",\"value\":\"value\"}},\"initialize(address[],address,address)\":{\"params\":{\"accountImplementation_\":\"account implementation address\",\"gateway_\":\"`Gateway` contract address\",\"guardians_\":\"array of guardians addresses\"}},\"isAccountDeployed(address)\":{\"params\":{\"account\":\"account address\"},\"returns\":{\"_0\":\"true when account is deployed\"}},\"isGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"},\"returns\":{\"_0\":\"true when guardian exists\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}},\"isValidAccountSignature(address,bytes,bytes)\":{\"params\":{\"account\":\"account address\",\"message\":\"message\",\"signature\":\"signature\"},\"returns\":{\"_0\":\"magic hash if valid\"}},\"isValidAccountSignature(address,bytes32,bytes)\":{\"params\":{\"account\":\"account address\",\"messageHash\":\"message hash\",\"signature\":\"signature\"},\"returns\":{\"_0\":\"magic hash if valid\"}},\"refundAccountCall(address,address,uint256)\":{\"details\":\"Deploys an account if not deployed yet\",\"params\":{\"account\":\"account address\",\"token\":\"token address\",\"value\":\"value\"}},\"removeAccountOwner(address,address)\":{\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"}},\"removeGuardian(address)\":{\"params\":{\"guardian\":\"guardian address\"}},\"upgrade(address)\":{\"params\":{\"accountImplementation_\":\"account implementation address\"}},\"upgradeAccount(address)\":{\"params\":{\"account\":\"account address\"}},\"verifyAccountOwner(address,address)\":{\"params\":{\"account\":\"account address\",\"owner\":\"owner address\"},\"returns\":{\"_0\":\"true on correct account owner\"}},\"verifyAccountOwnerAtBlock(address,address,uint256)\":{\"params\":{\"account\":\"account address\",\"blockNumber\":\"block number to verify\",\"owner\":\"owner address\"},\"returns\":{\"_0\":\"true on correct account owner\"}},\"verifyGuardianSignature(bytes32,bytes)\":{\"params\":{\"messageHash\":\"message hash\",\"signature\":\"signature\"},\"returns\":{\"_0\":\"true on correct guardian signature\"}}},\"title\":\"Personal account registry\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addAccountOwner(address,address)\":{\"notice\":\"Adds a new account owner\"},\"addGuardian(address)\":{\"notice\":\"Adds a new guardian\"},\"computeAccountAddress(address)\":{\"notice\":\"Computes account address\"},\"deployAccount(address)\":{\"notice\":\"Deploys account\"},\"executeAccountTransaction(address,address,uint256,bytes)\":{\"notice\":\"Executes account transaction\"},\"initialize(address[],address,address)\":{\"notice\":\"Initializes `PersonalAccountRegistry` contract\"},\"isAccountDeployed(address)\":{\"notice\":\"Checks if account is deployed\"},\"isGuardian(address)\":{\"notice\":\"Check if guardian exists\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"},\"isValidAccountSignature(address,bytes,bytes)\":{\"notice\":\"Verifies account signature\"},\"isValidAccountSignature(address,bytes32,bytes)\":{\"notice\":\"Verifies account signature\"},\"refundAccountCall(address,address,uint256)\":{\"notice\":\"Refunds account call\"},\"removeAccountOwner(address,address)\":{\"notice\":\"Removes the existing account owner\"},\"removeGuardian(address)\":{\"notice\":\"Removes the existing guardian\"},\"upgrade(address)\":{\"notice\":\"Upgrades `PersonalAccountRegistry` contract\"},\"upgradeAccount(address)\":{\"notice\":\"Upgrades account\"},\"verifyAccountOwner(address,address)\":{\"notice\":\"Verifies the owner of the account at the current block\"},\"verifyAccountOwnerAtBlock(address,address,uint256)\":{\"notice\":\"Verifies the owner of the account at a specific block\"},\"verifyGuardianSignature(bytes32,bytes)\":{\"notice\":\"Verifies guardian signature\"}},\"notice\":\"A registry for personal (controlled by owners) accounts\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/personal/PersonalAccountRegistry.sol\":\"PersonalAccountRegistry\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/access/Controlled.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Controlled\\n *\\n * @dev Contract module which provides an access control mechanism.\\n * It ensures there is only one controlling account of the smart contract\\n * and grants that account exclusive access to specific functions.\\n *\\n * The controller account will be the one that deploys the contract.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Controlled {\\n /**\\n * @return controller account address\\n */\\n address public controller;\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if msg.sender is not the controller\\n */\\n modifier onlyController() {\\n require(\\n msg.sender == controller,\\n \\\"Controlled: msg.sender is not the controller\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n controller = msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0xdf03a0b7ec644da9925c5c1b6c8a86bb1cc1b9c5018bb265a1a4c5044b877af3\",\"license\":\"MIT\"},\"src/common/access/Guarded.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/ECDSALib.sol\\\";\\n\\n\\n/**\\n * @title Guarded\\n *\\n * @dev Contract module which provides a guardian-type control mechanism.\\n * It allows key accounts to have guardians and restricts specific methods to be accessible by guardians only.\\n *\\n * Each guardian account can remove other guardians\\n *\\n * Use `_initializeGuarded` to initialize the contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Guarded {\\n using ECDSALib for bytes32;\\n\\n mapping(address => bool) private guardians;\\n\\n // events\\n\\n /**\\n * @dev Emitted when a new guardian is added\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianAdded(\\n address sender,\\n address guardian\\n );\\n\\n /**\\n * @dev Emitted when the existing guardian is removed\\n * @param sender sender address\\n * @param guardian guardian address\\n */\\n event GuardianRemoved(\\n address sender,\\n address guardian\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not a guardian account\\n */\\n modifier onlyGuardian() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n guardians[tx.origin],\\n \\\"Guarded: tx.origin is not the guardian\\\"\\n );\\n\\n _;\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n /**\\n * @notice Adds a new guardian\\n * @param guardian guardian address\\n */\\n function addGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n _addGuardian(guardian);\\n }\\n\\n /**\\n * @notice Removes the existing guardian\\n * @param guardian guardian address\\n */\\n function removeGuardian(\\n address guardian\\n )\\n external\\n onlyGuardian\\n {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin != guardian,\\n \\\"Guarded: cannot remove self\\\"\\n );\\n\\n require(\\n guardians[guardian],\\n \\\"Guarded: guardian doesn't exist\\\"\\n );\\n\\n guardians[guardian] = false;\\n\\n emit GuardianRemoved(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if guardian exists\\n * @param guardian guardian address\\n * @return true when guardian exists\\n */\\n function isGuardian(\\n address guardian\\n )\\n external\\n view\\n returns (bool)\\n {\\n return guardians[guardian];\\n }\\n\\n /**\\n * @notice Verifies guardian signature\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true on correct guardian signature\\n */\\n function verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyGuardianSignature(\\n messageHash,\\n signature\\n );\\n }\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `Guarded` contract\\n * @dev If `guardians_` array is empty `tx.origin` is added as guardian account\\n * @param guardians_ array of guardians addresses\\n */\\n function _initializeGuarded(\\n address[] memory guardians_\\n )\\n internal\\n {\\n if (guardians_.length == 0) {\\n // solhint-disable-next-line avoid-tx-origin\\n _addGuardian(tx.origin);\\n } else {\\n uint guardiansLen = guardians_.length;\\n for (uint i = 0; i < guardiansLen; i++) {\\n _addGuardian(guardians_[i]);\\n }\\n }\\n }\\n\\n\\n // internal functions (views)\\n\\n function _verifyGuardianSignature(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n view\\n returns (bool)\\n {\\n address guardian = messageHash.recoverAddress(signature);\\n\\n return guardians[guardian];\\n }\\n\\n // private functions\\n\\n function _addGuardian(\\n address guardian\\n )\\n private\\n {\\n require(\\n guardian != address(0),\\n \\\"Guarded: cannot add 0x0 guardian\\\"\\n );\\n\\n require(\\n !guardians[guardian],\\n \\\"Guarded: guardian already exists\\\"\\n );\\n\\n guardians[guardian] = true;\\n\\n emit GuardianAdded(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin,\\n guardian\\n );\\n }\\n}\\n\",\"keccak256\":\"0x4a5f5670041362e87ea267d81c55fc3edc1a78e81f6f17524b13267f91f31458\",\"license\":\"MIT\"},\"src/common/account/Account.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../access/Controlled.sol\\\";\\nimport \\\"./AccountBase.sol\\\";\\n\\n\\n/**\\n * @title Account\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Account is Controlled, AccountBase {\\n address public implementation;\\n\\n /**\\n * @dev Public constructor\\n * @param registry_ account registry address\\n * @param implementation_ account implementation address\\n */\\n constructor(\\n address registry_,\\n address implementation_\\n )\\n public\\n Controlled()\\n {\\n registry = registry_;\\n implementation = implementation_;\\n }\\n\\n // external functions\\n\\n /**\\n * @notice Payable receive\\n */\\n receive()\\n external\\n payable\\n {\\n //\\n }\\n\\n /**\\n * @notice Fallback\\n */\\n // solhint-disable-next-line payable-fallback\\n fallback()\\n external\\n {\\n if (msg.data.length != 0) {\\n address implementation_ = implementation;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n let calldedatasize := calldatasize()\\n\\n calldatacopy(0, 0, calldedatasize)\\n\\n let result := delegatecall(gas(), implementation_, 0, calldedatasize, 0, 0)\\n let returneddatasize := returndatasize()\\n\\n returndatacopy(0, 0, returneddatasize)\\n\\n switch result\\n case 0 { revert(0, returneddatasize) }\\n default { return(0, returneddatasize) }\\n }\\n }\\n }\\n\\n /**\\n * @notice Sets implementation\\n * @param implementation_ implementation address\\n */\\n function setImplementation(\\n address implementation_\\n )\\n external\\n onlyController\\n {\\n implementation = implementation_;\\n }\\n\\n /**\\n * @notice Executes transaction\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @return transaction result\\n */\\n function executeTransaction(\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n onlyController\\n returns (bytes memory)\\n {\\n bytes memory result;\\n bool succeeded;\\n\\n // solhint-disable-next-line avoid-call-value, avoid-low-level-calls\\n (succeeded, result) = payable(to).call{value: value}(data);\\n\\n require(\\n succeeded,\\n \\\"Account: transaction reverted\\\"\\n );\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe516c999a02a65ee99487d398d0c12589500680a9ca08c852540fb9473d70a26\",\"license\":\"MIT\"},\"src/common/account/AccountBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Account base\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountBase {\\n address public registry;\\n}\\n\",\"keccak256\":\"0xcadf29e389f8db823e14f3f92808fd135f07b0135eb4dcf29b89c85941b39862\",\"license\":\"MIT\"},\"src/common/account/AccountController.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./Account.sol\\\";\\n\\n\\n/**\\n * @title Account controller\\n *\\n * @dev Contract module which provides Account deployment mechanism\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract AccountController {\\n address public accountRegistry;\\n address public accountImplementation;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the account registry is updated\\n * @param accountRegistry account registry address\\n */\\n event AccountRegistryUpdated(\\n address accountRegistry\\n );\\n\\n /**\\n * @dev Emitted when the account implementation is updated\\n * @param accountImplementation account implementation address\\n */\\n event AccountImplementationUpdated(\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the account is deployed\\n * @param account account address\\n * @param accountImplementation account implementation address\\n */\\n event AccountDeployed(\\n address account,\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the account is upgraded\\n * @param account account address\\n * @param accountImplementation account implementation address\\n */\\n event AccountUpgraded(\\n address account,\\n address accountImplementation\\n );\\n\\n /**\\n * @dev Emitted when the transaction is executed\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @param response response\\n */\\n event AccountTransactionExecuted(\\n address account,\\n address to,\\n uint256 value,\\n bytes data,\\n bytes response\\n );\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `AccountController` contract\\n * @param accountRegistry_ account registry address\\n * @param accountImplementation_ account implementation address\\n */\\n function _initializeAccountController(\\n address accountRegistry_,\\n address accountImplementation_\\n )\\n internal\\n {\\n _setAccountRegistry(accountRegistry_, false);\\n _setAccountImplementation(accountImplementation_, false);\\n }\\n\\n /**\\n * @notice Sets account registry\\n * @param accountRegistry_ account registry address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _setAccountRegistry(\\n address accountRegistry_,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n accountRegistry_ != address(0),\\n \\\"AccountController: cannot set account registry to 0x0\\\"\\n );\\n\\n accountRegistry = accountRegistry_;\\n\\n if (emitEvent) {\\n emit AccountRegistryUpdated(accountRegistry);\\n }\\n }\\n\\n /**\\n * @notice Sets account implementation\\n * @param accountImplementation_ account implementation address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _setAccountImplementation(\\n address accountImplementation_,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n accountImplementation_ != address(0),\\n \\\"AccountController: cannot set account Implementation to 0x0\\\"\\n );\\n\\n accountImplementation = accountImplementation_;\\n\\n if (emitEvent) {\\n emit AccountImplementationUpdated(accountImplementation);\\n }\\n }\\n\\n /**\\n * @notice Deploys account\\n * @param salt CREATE2 salt\\n * @param emitEvent it will emit event when flag is set to true\\n * @return account address\\n */\\n function _deployAccount(\\n bytes32 salt,\\n bool emitEvent\\n )\\n internal\\n returns (address)\\n {\\n address account = address(new Account{salt: salt}(\\n accountRegistry,\\n accountImplementation\\n ));\\n\\n if (emitEvent) {\\n emit AccountDeployed(\\n account,\\n accountImplementation\\n );\\n }\\n\\n return account;\\n }\\n\\n /**\\n * @notice Upgrades account\\n * @param account account address\\n * @param emitEvent it will emit event when flag is set to true\\n */\\n function _upgradeAccount(\\n address account,\\n bool emitEvent\\n )\\n internal\\n {\\n require(\\n Account(payable(account)).implementation() != accountImplementation,\\n \\\"AccountController: account already upgraded\\\"\\n );\\n\\n Account(payable(account)).setImplementation(accountImplementation);\\n\\n if (emitEvent) {\\n emit AccountUpgraded(\\n account,\\n accountImplementation\\n );\\n }\\n }\\n\\n /**\\n * @notice Executes transaction from the account\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n * @param emitEvent it will emit event when flag is set to true\\n * @return transaction result\\n */\\n function _executeAccountTransaction(\\n address account,\\n address to,\\n uint256 value,\\n bytes memory data,\\n bool emitEvent\\n )\\n internal\\n returns (bytes memory)\\n {\\n require(\\n to != address(0),\\n \\\"AccountController: cannot send to 0x0\\\"\\n );\\n\\n require(\\n to != address(this),\\n \\\"AccountController: cannot send to controller\\\"\\n );\\n\\n require(\\n to != account,\\n \\\"AccountController: cannot send to self\\\"\\n );\\n\\n bytes memory response = Account(payable(account)).executeTransaction(\\n to,\\n value,\\n data\\n );\\n\\n if (emitEvent) {\\n emit AccountTransactionExecuted(\\n account,\\n to,\\n value,\\n data,\\n response\\n );\\n }\\n\\n return response;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Computes account CREATE2 address\\n * @param salt CREATE2 salt\\n * @return account address\\n */\\n function _computeAccountAddress(\\n bytes32 salt\\n )\\n internal\\n view\\n returns (address)\\n {\\n bytes memory creationCode = abi.encodePacked(\\n type(Account).creationCode,\\n bytes12(0),\\n accountRegistry,\\n bytes12(0),\\n accountImplementation\\n );\\n\\n bytes32 data = keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(this),\\n salt,\\n keccak256(creationCode)\\n )\\n );\\n\\n return address(uint160(uint256(data)));\\n }\\n}\\n\",\"keccak256\":\"0xe161f1f4f6ea5d3a9810f7c93764d55e473abe1054e6aa68fde791be7d70a26c\",\"license\":\"MIT\"},\"src/common/account/AccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./Account.sol\\\";\\n\\n\\n/**\\n * @title Account registry\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nabstract contract AccountRegistry {\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param messageHash message hash\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param message message\\n * @param signature signature\\n * @return true if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes calldata message,\\n bytes calldata signature\\n )\\n virtual\\n external\\n view\\n returns (bool);\\n}\\n\",\"keccak256\":\"0x2d40245721f5f74219e5cf88713246dbe8b6d5404e941125d3e850b1f127ec34\",\"license\":\"MIT\"},\"src/common/libs/BlockLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Block library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BlockLib {\\n struct BlockRelated {\\n bool added;\\n uint256 removedAtBlockNumber;\\n }\\n\\n /**\\n * @notice Verifies self struct at current block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtCurrentBlock(\\n BlockRelated memory self\\n )\\n internal\\n view\\n returns (bool)\\n {\\n return verifyAtBlock(self, block.number);\\n }\\n\\n /**\\n * @notice Verifies self struct at any block\\n * @param self self struct\\n * @return true on correct self struct\\n */\\n function verifyAtAnyBlock(\\n BlockRelated memory self\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n return verifyAtBlock(self, 0);\\n }\\n\\n /**\\n * @notice Verifies self struct at specific block\\n * @param self self struct\\n * @param blockNumber block number to verify\\n * @return true on correct self struct\\n */\\n function verifyAtBlock(\\n BlockRelated memory self,\\n uint256 blockNumber\\n )\\n internal\\n pure\\n returns (bool)\\n {\\n bool result = false;\\n\\n if (self.added) {\\n if (self.removedAtBlockNumber == 0) {\\n result = true;\\n } else if (blockNumber == 0) {\\n result = true;\\n } else {\\n result = self.removedAtBlockNumber > blockNumber;\\n }\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9205536bc211f86d1113118a44dddfa7a9b9772a918cf4b1575c982a05472587\",\"license\":\"MIT\"},\"src/common/libs/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Bytes library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BytesLib {\\n /**\\n * @notice Converts bytes to address\\n * @param data data\\n * @return address\\n */\\n function toAddress(\\n bytes memory data\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result;\\n\\n require(\\n data.length == 20,\\n \\\"BytesLib: invalid data length\\\"\\n );\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := div(mload(add(data, 0x20)), 0x1000000000000000000000000)\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x64c84964ea91bfb1f2d859eea6c57fe5b4a6f269951a4adf5f58d306c54c7f76\",\"license\":\"MIT\"},\"src/common/libs/ECDSAExtendedLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"./StringsLib.sol\\\";\\n\\n\\n/**\\n * @title ECDSA extended library\\n */\\nlibrary ECDSAExtendedLib {\\n using StringsLib for uint;\\n\\n function toEthereumSignedMessageHash(\\n bytes memory message\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n\\\",\\n message.length.toString(),\\n abi.encodePacked(message)\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x83e6056caaba892d91de45324f4d2702ac01695fab2d34c86895d7d288547ba3\",\"license\":\"MIT\"},\"src/common/libs/ECDSALib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title ECDSA library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/cryptography/ECDSA.sol#L26\\n */\\nlibrary ECDSALib {\\n function recoverAddress(\\n bytes32 messageHash,\\n bytes memory signature\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (signature.length == 65) {\\n bytes32 r;\\n bytes32 s;\\n uint8 v;\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n r := mload(add(signature, 0x20))\\n s := mload(add(signature, 0x40))\\n v := byte(0, mload(add(signature, 0x60)))\\n }\\n\\n if (v < 27) {\\n v += 27;\\n }\\n\\n if (v == 27 || v == 28) {\\n result = ecrecover(messageHash, v, r, s);\\n }\\n }\\n\\n return result;\\n }\\n\\n function toEthereumSignedMessageHash(\\n bytes32 messageHash\\n )\\n internal\\n pure\\n returns (bytes32)\\n {\\n return keccak256(abi.encodePacked(\\n \\\"\\\\x19Ethereum Signed Message:\\\\n32\\\",\\n messageHash\\n ));\\n }\\n}\\n\",\"keccak256\":\"0x3b1460d688302eb595268c2af147ab532f29dbced66520e013f48d498eed3cec\",\"license\":\"MIT\"},\"src/common/libs/SafeMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Safe math library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/math/SafeMath.sol\\n */\\nlibrary SafeMathLib {\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n\\n require(c >= a, \\\"SafeMathLib: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMathLib: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n\\n return a - b;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n\\n require(c / a == b, \\\"SafeMathLib: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMathLib: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n\\n return a / b;\\n }\\n\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMathLib: modulo by zero\\\");\\n }\\n\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x6089f354ca754d9c5dd9e800ee5ed86717dbf8f9af470604e0be691ac57c0107\",\"license\":\"MIT\"},\"src/common/libs/StringsLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Strings library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/utils/Strings.sol#L12\\n */\\nlibrary StringsLib {\\n function toString(\\n uint256 value\\n )\\n internal\\n pure\\n returns (string memory)\\n {\\n if (value == 0) {\\n return \\\"0\\\";\\n }\\n\\n uint256 temp = value;\\n uint256 digits;\\n\\n while (temp != 0) {\\n digits++;\\n temp /= 10;\\n }\\n\\n bytes memory buffer = new bytes(digits);\\n uint256 index = digits - 1;\\n temp = value;\\n\\n while (temp != 0) {\\n buffer[index--] = byte(uint8(48 + temp % 10));\\n temp /= 10;\\n }\\n\\n return string(buffer);\\n }\\n}\\n\",\"keccak256\":\"0x4110150d0c921fd31db34ca33672de8e81c3ae467076149a3a546f804d1f58dd\",\"license\":\"MIT\"},\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/common/token/ERC20Token.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/SafeMathLib.sol\\\";\\n\\n\\n/**\\n * @title ERC20 token\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/token/ERC20/ERC20.sol\\n */\\ncontract ERC20Token {\\n using SafeMathLib for uint256;\\n\\n string public name;\\n string public symbol;\\n uint8 public decimals;\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) internal balances;\\n mapping(address => mapping(address => uint256)) internal allowances;\\n\\n // events\\n\\n event Transfer(\\n address indexed from,\\n address indexed to,\\n uint256 value\\n );\\n\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n function transfer(\\n address to,\\n uint256 value\\n )\\n external\\n returns (bool)\\n {\\n _transfer(_getSender(), to, value);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n address sender = _getSender();\\n\\n _transfer(from, to, value);\\n _approve(from, sender, allowances[from][sender].sub(value));\\n\\n return true;\\n }\\n\\n function approve(\\n address spender,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n _approve(_getSender(), spender, value);\\n\\n return true;\\n }\\n\\n // external functions (views)\\n\\n function balanceOf(\\n address owner\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return balances[owner];\\n }\\n\\n function allowance(\\n address owner,\\n address spender\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[owner][spender];\\n }\\n\\n // internal functions\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n from != address(0),\\n \\\"ERC20Token: cannot transfer from 0x0 address\\\"\\n );\\n require(\\n to != address(0),\\n \\\"ERC20Token: cannot transfer to 0x0 address\\\"\\n );\\n\\n balances[from] = balances[from].sub(value);\\n balances[to] = balances[to].add(value);\\n\\n emit Transfer(from, to, value);\\n }\\n\\n function _approve(\\n address owner,\\n address spender,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot approve from 0x0 address\\\"\\n );\\n require(\\n spender != address(0),\\n \\\"ERC20Token: cannot approve to 0x0 address\\\"\\n );\\n\\n allowances[owner][spender] = value;\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function _mint(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot mint to 0x0 address\\\"\\n );\\n require(\\n value > 0,\\n \\\"ERC20Token: cannot mint 0 value\\\"\\n );\\n\\n balances[owner] = balances[owner].add(value);\\n totalSupply = totalSupply.add(value);\\n\\n emit Transfer(address(0), owner, value);\\n }\\n\\n function _burn(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot burn from 0x0 address\\\"\\n );\\n\\n balances[owner] = balances[owner].sub(\\n value,\\n \\\"ERC20Token: burn value exceeds balance\\\"\\n );\\n\\n totalSupply = totalSupply.sub(value);\\n\\n emit Transfer(owner, address(0), value);\\n }\\n\\n // internal functions (views)\\n\\n function _getSender()\\n virtual\\n internal\\n view\\n returns (address)\\n {\\n return msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x6f2b0bd08da549c6c1f5ceee85766832d587dde62c56bebc3a14bd9ea407e03d\",\"license\":\"MIT\"},\"src/gateway/GatewayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BytesLib.sol\\\";\\n\\n\\n/**\\n * @title Gateway recipient\\n *\\n * @notice Gateway target contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract GatewayRecipient {\\n using BytesLib for bytes;\\n\\n address public gateway;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `GatewayRecipient` contract\\n * @param gateway_ `Gateway` contract address\\n */\\n function _initializeGatewayRecipient(\\n address gateway_\\n )\\n internal\\n {\\n gateway = gateway_;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Gets gateway context account\\n * @return context account address\\n */\\n function _getContextAccount()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(40);\\n }\\n\\n /**\\n * @notice Gets gateway context sender\\n * @return context sender address\\n */\\n function _getContextSender()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(20);\\n }\\n\\n /**\\n * @notice Gets gateway context data\\n * @return context data\\n */\\n function _getContextData()\\n internal\\n view\\n returns (bytes calldata)\\n {\\n bytes calldata result;\\n\\n if (_isGatewaySender()) {\\n result = msg.data[:msg.data.length - 40];\\n } else {\\n result = msg.data;\\n }\\n\\n return result;\\n }\\n\\n // private functions (views)\\n\\n function _getContextAddress(\\n uint256 offset\\n )\\n private\\n view\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (_isGatewaySender()) {\\n uint from = msg.data.length - offset;\\n result = bytes(msg.data[from:from + 20]).toAddress();\\n } else {\\n result = msg.sender;\\n }\\n\\n return result;\\n }\\n\\n function _isGatewaySender()\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (msg.sender == gateway) {\\n require(\\n msg.data.length >= 44,\\n \\\"GatewayRecipient: invalid msg.data\\\"\\n );\\n\\n result = true;\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe3fd29479d748d67360c61a9cbaafc66eaca25f476e59a45e842472bcf5233fc\",\"license\":\"MIT\"},\"src/personal/PersonalAccountRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/access/Guarded.sol\\\";\\nimport \\\"../common/account/AccountController.sol\\\";\\nimport \\\"../common/account/AccountRegistry.sol\\\";\\nimport \\\"../common/libs/BlockLib.sol\\\";\\nimport \\\"../common/libs/ECDSALib.sol\\\";\\nimport \\\"../common/libs/ECDSAExtendedLib.sol\\\";\\nimport \\\"../common/libs/SafeMathLib.sol\\\";\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"../common/token/ERC20Token.sol\\\";\\nimport \\\"../gateway/GatewayRecipient.sol\\\";\\n\\n\\n/**\\n * @title Personal account registry\\n *\\n * @notice A registry for personal (controlled by owners) accounts\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract PersonalAccountRegistry is Guarded, AccountController, AccountRegistry, Initializable, GatewayRecipient {\\n using BlockLib for BlockLib.BlockRelated;\\n using SafeMathLib for uint256;\\n using ECDSALib for bytes32;\\n using ECDSAExtendedLib for bytes;\\n\\n struct Account {\\n bool deployed;\\n bytes32 salt;\\n mapping(address => BlockLib.BlockRelated) owners;\\n }\\n\\n mapping(address => Account) private accounts;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the new owner is added\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerAdded(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the existing owner is removed\\n * @param account account address\\n * @param owner owner address\\n */\\n event AccountOwnerRemoved(\\n address account,\\n address owner\\n );\\n\\n /**\\n * @dev Emitted when the call is refunded\\n * @param account account address\\n * @param beneficiary beneficiary address\\n * @param token token address\\n * @param value value\\n */\\n event AccountCallRefunded(\\n address account,\\n address beneficiary,\\n address token,\\n uint256 value\\n );\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor() public Initializable() {}\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `PersonalAccountRegistry` contract\\n * @param guardians_ array of guardians addresses\\n * @param accountImplementation_ account implementation address\\n * @param gateway_ `Gateway` contract address\\n */\\n function initialize(\\n address[] calldata guardians_,\\n address accountImplementation_,\\n address gateway_\\n )\\n external\\n onlyInitializer\\n {\\n // Guarded\\n _initializeGuarded(guardians_);\\n\\n // AccountController\\n _initializeAccountController(address(this), accountImplementation_);\\n\\n // GatewayRecipient\\n _initializeGatewayRecipient(gateway_);\\n }\\n\\n /**\\n * @notice Upgrades `PersonalAccountRegistry` contract\\n * @param accountImplementation_ account implementation address\\n */\\n function upgrade(\\n address accountImplementation_\\n )\\n external\\n onlyGuardian\\n {\\n _setAccountImplementation(accountImplementation_, true);\\n }\\n\\n /**\\n * @notice Deploys account\\n * @param account account address\\n */\\n function deployAccount(\\n address account\\n )\\n external\\n {\\n _verifySender(account);\\n _deployAccount(account);\\n }\\n\\n /**\\n * @notice Upgrades account\\n * @param account account address\\n */\\n function upgradeAccount(\\n address account\\n )\\n external\\n {\\n _verifySender(account);\\n _upgradeAccount(account, true);\\n }\\n\\n /**\\n * @notice Adds a new account owner\\n * @param account account address\\n * @param owner owner address\\n */\\n function addAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n {\\n _verifySender(account);\\n\\n require(\\n owner != address(0),\\n \\\"PersonalAccountRegistry: cannot add 0x0 owner\\\"\\n );\\n\\n require(\\n !accounts[account].owners[owner].verifyAtCurrentBlock(),\\n \\\"PersonalAccountRegistry: owner already exists\\\"\\n );\\n\\n accounts[account].owners[owner].added = true;\\n accounts[account].owners[owner].removedAtBlockNumber = 0;\\n\\n emit AccountOwnerAdded(\\n account,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Removes the existing account owner\\n * @param account account address\\n * @param owner owner address\\n */\\n function removeAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n {\\n address sender = _verifySender(account);\\n\\n require(\\n owner != sender,\\n \\\"PersonalAccountRegistry: cannot remove self\\\"\\n );\\n\\n require(\\n accounts[account].owners[owner].verifyAtCurrentBlock(),\\n \\\"PersonalAccountRegistry: owner doesn't exist\\\"\\n );\\n\\n accounts[account].owners[owner].removedAtBlockNumber = block.number;\\n\\n emit AccountOwnerRemoved(\\n account,\\n owner\\n );\\n }\\n\\n /**\\n * @notice Executes account transaction\\n * @dev Deploys an account if not deployed yet\\n * @param account account address\\n * @param to to address\\n * @param value value\\n * @param data data\\n */\\n function executeAccountTransaction(\\n address account,\\n address to,\\n uint256 value,\\n bytes calldata data\\n )\\n external\\n {\\n _verifySender(account);\\n\\n _deployAccount(account);\\n\\n _executeAccountTransaction(\\n account,\\n to,\\n value,\\n data,\\n true\\n );\\n }\\n\\n /**\\n * @notice Refunds account call\\n * @dev Deploys an account if not deployed yet\\n * @param account account address\\n * @param token token address\\n * @param value value\\n */\\n function refundAccountCall(\\n address account,\\n address token,\\n uint256 value\\n )\\n external\\n {\\n _verifySender(account);\\n\\n _deployAccount(account);\\n\\n /* solhint-disable avoid-tx-origin */\\n\\n if (token == address(0)) {\\n _executeAccountTransaction(\\n account,\\n tx.origin,\\n value,\\n new bytes(0),\\n false\\n );\\n } else {\\n bytes memory response = _executeAccountTransaction(\\n account,\\n token,\\n 0,\\n abi.encodeWithSelector(\\n ERC20Token(token).transfer.selector,\\n tx.origin,\\n value\\n ),\\n false\\n );\\n\\n if (response.length > 0) {\\n require(\\n abi.decode(response, (bool)),\\n \\\"PersonalAccountRegistry: ERC20Token transfer reverted\\\"\\n );\\n }\\n }\\n\\n emit AccountCallRefunded(\\n account,\\n tx.origin,\\n token,\\n value\\n );\\n\\n /* solhint-enable avoid-tx-origin */\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Computes account address\\n * @param saltOwner salt owner address\\n * @return account address\\n */\\n function computeAccountAddress(\\n address saltOwner\\n )\\n external\\n view\\n returns (address)\\n {\\n return _computeAccountAddress(saltOwner);\\n }\\n\\n /**\\n * @notice Checks if account is deployed\\n * @param account account address\\n * @return true when account is deployed\\n */\\n function isAccountDeployed(\\n address account\\n )\\n external\\n view\\n returns (bool)\\n {\\n return accounts[account].deployed;\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at the current block\\n * @param account account address\\n * @param owner owner address\\n * @return true on correct account owner\\n */\\n function verifyAccountOwner(\\n address account,\\n address owner\\n )\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(account, owner);\\n }\\n\\n /**\\n * @notice Verifies the owner of the account at a specific block\\n * @param account account address\\n * @param owner owner address\\n * @param blockNumber block number to verify\\n * @return true on correct account owner\\n */\\n function verifyAccountOwnerAtBlock(\\n address account,\\n address owner,\\n uint256 blockNumber\\n )\\n external\\n view\\n returns (bool)\\n {\\n bool result = false;\\n\\n if (_verifyAccountOwner(account, owner)) {\\n result = true;\\n } else {\\n result = accounts[account].owners[owner].verifyAtBlock(blockNumber);\\n }\\n\\n return result;\\n }\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param messageHash message hash\\n * @param signature signature\\n * @return magic hash if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes32 messageHash,\\n bytes calldata signature\\n )\\n override\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(\\n account,\\n messageHash.recoverAddress(signature)\\n );\\n }\\n\\n /**\\n * @notice Verifies account signature\\n * @param account account address\\n * @param message message\\n * @param signature signature\\n * @return magic hash if valid\\n */\\n function isValidAccountSignature(\\n address account,\\n bytes calldata message,\\n bytes calldata signature\\n )\\n override\\n external\\n view\\n returns (bool)\\n {\\n return _verifyAccountOwner(\\n account,\\n message.toEthereumSignedMessageHash().recoverAddress(signature)\\n );\\n }\\n\\n // private functions\\n\\n function _verifySender(\\n address account\\n )\\n private\\n returns (address)\\n {\\n address sender = _getContextSender();\\n\\n if (accounts[account].owners[sender].added) {\\n require(\\n accounts[account].owners[sender].removedAtBlockNumber == 0,\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n } else {\\n require(\\n accounts[account].salt == 0,\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n\\n bytes32 salt = keccak256(\\n abi.encodePacked(sender)\\n );\\n\\n require(\\n account == _computeAccountAddress(salt),\\n \\\"PersonalAccountRegistry: sender is not the account owner\\\"\\n );\\n\\n accounts[account].salt = salt;\\n accounts[account].owners[sender].added = true;\\n\\n emit AccountOwnerAdded(\\n account,\\n sender\\n );\\n }\\n\\n return sender;\\n }\\n\\n function _deployAccount(\\n address account\\n )\\n internal\\n {\\n if (!accounts[account].deployed) {\\n _deployAccount(\\n accounts[account].salt,\\n true\\n );\\n\\n accounts[account].deployed = true;\\n }\\n }\\n\\n // private functions (views)\\n\\n function _computeAccountAddress(\\n address saltOwner\\n )\\n private\\n view\\n returns (address)\\n {\\n bytes32 salt = keccak256(\\n abi.encodePacked(saltOwner)\\n );\\n\\n return _computeAccountAddress(salt);\\n }\\n\\n function _verifyAccountOwner(\\n address account,\\n address owner\\n )\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (accounts[account].owners[owner].added) {\\n result = accounts[account].owners[owner].removedAtBlockNumber == 0;\\n } else if (accounts[account].salt == 0) {\\n result = account == _computeAccountAddress(owner);\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xdae162610e707ab8c394b3edf924b75ef1f315520935cb88f4280b29eeaf4b61\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b5032600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506144d1806100616000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806390482d72116100b8578063d0f710d61161007c578063d0f710d61461075e578063da9fc1ae146107f7578063db63f5821461083b578063e1e382ce1461089f578063e5c7278f14610958578063f4876c7414610a1b57610142565b806390482d7214610545578063a526d83b146105fe578063bb890d3f14610642578063cade6a5d146106bc578063d089e11a1461072a57610142565b80631a8414031161010a5780631a841403146103515780633164b5e1146103bf57806334d323a414610419578063392e53cd1461049d57806343013c24146104bd578063714041561461050157610142565b80630900f010146101475780630c68ba211461018b57806311464fbe146101e5578063116191b614610219578063124e9eb31461024d575b600080fd5b6101896004803603602081101561015d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a7f565b005b6101cd600480360360208110156101a157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b2e565b60405180821515815260200191505060405180910390f35b6101ed610b83565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610221610ba9565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103396004803603606081101561026357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156102a057600080fd5b8201836020820111156102b257600080fd5b803590602001918460018302840111640100000000831117156102d457600080fd5b9091929391929390803590602001906401000000008111156102f557600080fd5b82018360208201111561030757600080fd5b8035906020019184600183028401116401000000008311171561032957600080fd5b9091929391929390505050610bcf565b60405180821515815260200191505060405180910390f35b6103bd6004803603606081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c88565b005b610401600480360360208110156103d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ef3565b60405180821515815260200191505060405180910390f35b6104856004803603606081101561042f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f4c565b60405180821515815260200191505060405180910390f35b6104a561103a565b60405180821515815260200191505060405180910390f35b6104ff600480360360208110156104d357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611092565b005b6105436004803603602081101561051757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110aa565b005b6105fc6004803603606081101561055b57600080fd5b810190808035906020019064010000000081111561057857600080fd5b82018360208201111561058a57600080fd5b803590602001918460208302840111640100000000831117156105ac57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611370565b005b6106406004803603602081101561061457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611508565b005b6106a46004803603604081101561065857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115b5565b60405180821515815260200191505060405180910390f35b6106fe600480360360208110156106d257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115c9565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107326115db565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107df6004803603604081101561077457600080fd5b81019080803590602001909291908035906020019064010000000081111561079b57600080fd5b8201836020820111156107ad57600080fd5b803590602001918460018302840111640100000000831117156107cf57600080fd5b9091929391929390505050611601565b60405180821515815260200191505060405180910390f35b6108396004803603602081101561080d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061165a565b005b61089d6004803603604081101561085157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611670565b005b610940600480360360608110156108b557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156108fc57600080fd5b82018360208201111561090e57600080fd5b8035906020019184600183028401116401000000008311171561093057600080fd5b9091929391929390505050611905565b60405180821515815260200191505060405180910390f35b610a196004803603608081101561096e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156109d557600080fd5b8201836020820111156109e757600080fd5b80359060200191846001830284011164010000000083111715610a0957600080fd5b9091929391929390505050611971565b005b610a7d60048036036040811015610a3157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119de565b005b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610b20576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806143e46026913960400191505060405180910390fd5b610b2b816001611d0d565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000610c7d86610c7885858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c6a89898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611e4e565b611fb790919063ffffffff16565b612087565b905095945050505050565b610c918361223e565b50610c9b83612685565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d2f57610d29833283600067ffffffffffffffff81118015610cee57600080fd5b506040519080825280601f01601f191660200182016040528015610d215781602001600182028036833780820191505090505b506000612786565b50610e5d565b6060610dd38484600063a9059cbb60e01b3287604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506000612786565b9050600081511115610e5b57808060200190516020811015610df457600080fd5b8101908080519060200190929190505050610e5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018061440a6035913960400191505060405180910390fd5b5b505b7feb5511fbef89123439f12682f0e9d0fc9696913b26eee55434c77d62c30aa7ca83328484604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200194505050505060405180910390a1505050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff169050919050565b60008060009050610f5d8585612087565b15610f6b576001905061102f565b61102c83600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050612c5490919063ffffffff16565b90505b809150509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b61109b8161223e565b506110a7816001612ca3565b50565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661114b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806143e46026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614156111ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f477561726465643a2063616e6e6f742072656d6f76652073656c66000000000081525060200191505060405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166112ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f477561726465643a20677561726469616e20646f65736e27742065786973740081525060200191505060405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611416576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180614318602f913960400191505060405180910390fd5b6000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506114a2848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050612f05565b6114ac3083612f5d565b6114b581612f77565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150505050565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166115a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806143e46026913960400191505060405180910390fd5b6115b281612fbb565b50565b60006115c18383612087565b905092915050565b60006115d4826131e2565b9050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006116518484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050613238565b90509392505050565b6116638161223e565b5061166d81612685565b50565b600061167b8361223e565b90508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611702576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806143b9602b913960400191505060405180910390fd5b6117b9600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506132a5565b61180e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806142b7602c913960400191505060405180910390fd5b43600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f1ce3cbbc43ee231e5b950332f2b0b9dd7d349291a3ee411ce5c5c7ed745661bb8383604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1505050565b60006119678561196285858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505087611fb790919063ffffffff16565b612087565b9050949350505050565b61197a8561223e565b5061198485612685565b6119d685858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506001612786565b505050505050565b6119e78261223e565b50600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611a6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180614498602d913960400191505060405180910390fd5b611b25600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506132a5565b15611b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d81526020018061446b602d913960400191505060405180910390fd5b6001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055506000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644688282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611d93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018061421e603b913960400191505060405180910390fd5b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015611e4a577f70d9f5a076620216a6050e493f3ce69749de0b68fa4b839ba2518660ba8b9cf0600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b5050565b6000611e5a82516132b8565b826040516020018082805190602001908083835b60208310611e915780518252602082019150602081019050602083039250611e6e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405260405160200180807f19457468657265756d205369676e6564204d6573736167653a0a000000000000815250601a0183805190602001908083835b60208310611f235780518252602082019150602081019050602083039250611f00565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310611f745780518252602082019150602081019050602083039250611f51565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052805190602001209050919050565b6000806000905060418351141561207d5760008060006020860151925060408601519150606086015160001a9050601b8160ff161015611ff857601b810190505b601b8160ff16148061200d5750601c8160ff16145b156120795760018782858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561206c573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b600080600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16156121ac576000600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154149050612234565b6000801b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154141561223357612202836131e2565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161490505b5b8091505092915050565b6000806122496133ff565b9050600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16156123c0576000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154146123bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806142596038913960400191505060405180910390fd5b61267c565b6000801b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541461245d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806142596038913960400191505060405180910390fd5b600081604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040528051906020012090506124aa81613410565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461252d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806142596038913960400191505060405180910390fd5b80600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055506001600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055507f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644688483604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1505b80915050919050565b600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1661278357612726600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546001613606565b506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055505b50565b6060600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561280e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806143476025913960400191505060405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061443f602c913960400191505060405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612918576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806142916026913960400191505060405180910390fd5b60608673ffffffffffffffffffffffffffffffffffffffff16633f579f428787876040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156129aa57808201518184015260208101905061298f565b50505050905090810190601f1680156129d75780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156129f857600080fd5b505af1158015612a0c573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015612a3657600080fd5b8101908080516040519392919084640100000000821115612a5657600080fd5b83820191506020820185811115612a6c57600080fd5b8251866001820283011164010000000082111715612a8957600080fd5b8083526020830192505050908051906020019080838360005b83811015612abd578082015181840152602081019050612aa2565b50505050905090810190601f168015612aea5780820380516001836020036101000a031916815260200191505b5060405250505090508215612c47577f99eeae1fb8801e2e878e060ec5e5b3557b3c4f8106e35d88cb573f293dae4e248787878785604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015612ba1578082015181840152602081019050612b86565b50505050905090810190601f168015612bce5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015612c07578082015181840152602081019050612bec565b50505050905090810190601f168015612c345780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a15b8091505095945050505050565b60008060009050836000015115612c9957600084602001511415612c7b5760019050612c98565b6000831415612c8d5760019050612c97565b8284602001511190505b5b5b8091505092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d2257600080fd5b505afa158015612d36573d6000803e3d6000fd5b505050506040513d6020811015612d4c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161415612dca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018061438e602b913960400191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663d784d426600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015612e5557600080fd5b505af1158015612e69573d6000803e3d6000fd5b505050508015612f01577feec27cdb8bd6f55c2c537deb52ab094a2437e85ef5197e6f064f90bff3ff563f82600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b5050565b600081511415612f1d57612f1832612fbb565b612f5a565b60008151905060005b81811015612f5757612f4a838281518110612f3d57fe5b6020026020010151612fbb565b8080600101915050612f26565b50505b50565b612f6882600061375a565b612f73816000611d0d565b5050565b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561305e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a2063616e6e6f74206164642030783020677561726469616e81525060200191505060405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561311d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a20677561726469616e20616c72656164792065786973747381525060200191505060405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b60008082604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b815260140191505060405160208183030381529060405280519060200120905061323081613410565b915050919050565b60008061324e8385611fb790919063ffffffff16565b90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b60006132b18243612c54565b9050919050565b60606000821415613300576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506133fa565b600082905060005b6000821461332a578080600101915050600a828161332257fe5b049150613308565b60608167ffffffffffffffff8111801561334357600080fd5b506040519080825280601f01601f1916602001820160405280156133765781602001600182028036833780820191505090505b50905060006001830390508593505b600084146133f257600a848161339757fe5b0660300160f81b828280600190039350815181106133b157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84816133ea57fe5b049350613385565b819450505050505b919050565b600061340b601461389b565b905090565b600060606040518060200161342490613a8c565b6020820181038252601f19601f82011660405250600060a01b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060a01b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516020018086805190602001908083835b602083106134be578051825260208201915060208101905060208303925061349b565b6001836020036101000a0380198251168184511680821785525050505050509050018573ffffffffffffffffffffffffffffffffffffffff19168152600c018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018373ffffffffffffffffffffffffffffffffffffffff19168152600c018273ffffffffffffffffffffffffffffffffffffffff1660601b8152601401955050505050506040516020818303038152906040529050600060ff60f81b3085848051906020012060405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018381526020018281526020019450505050506040516020818303038152906040528051906020012090508060001c92505050919050565b60008083600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161365c90613a8c565b808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff168152602001925050508190604051809103906000f59050801580156136b9573d6000803e3d6000fd5b5090508215613750577f2682a218602b9036c9869f006c5405ee4a1a65267653eb7e286123e5e1afde4c81600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156137e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260358152602001806142e36035913960400191505060405180910390fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015613897577f02e3c47057b8dc27a0929d3c394c314c73aa002d46939c31c9f71d1e77e86c10600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b5050565b600080600090506138aa613930565b1561392357600083600036905003905061391b600036839060148501926138d393929190613a99565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506139f3565b915050613927565b3390505b80915050919050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156139ec57602c600036905010156139e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061436c6022913960400191505060405180910390fd5b600190505b8091505090565b6000806014835114613a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f42797465734c69623a20696e76616c69642064617461206c656e67746800000081525060200191505060405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b61075180613acd83390190565b60008085851115613aa957600080fd5b83861115613ab657600080fd5b600185028301915084860390509450949250505056fe608060405234801561001057600080fd5b506040516107513803806107518339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050610630806101216000396000f3fe60806040526004361061004e5760003560e01c80633f579f42146100be5780635c60da1b146101e75780637b10399914610228578063d784d42614610269578063f77c4791146102ba57610055565b3661005557005b34801561006157600080fd5b50600080369050146100bc576000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050368060008037600080826000855af43d806000803e81600081146100b757816000f35b816000fd5b005b3480156100ca57600080fd5b5061016c600480360360608110156100e157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561012857600080fd5b82018360208201111561013a57600080fd5b8035906020019184600183028401116401000000008311171561015c57600080fd5b90919293919293905050506102fb565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101ac578082015181840152602081019050610191565b50505050905090810190601f1680156101d95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101f357600080fd5b506101fc61049f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561023457600080fd5b5061023d6104c5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027557600080fd5b506102b86004803603602081101561028c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104eb565b005b3480156102c657600080fd5b506102cf6105d3565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806105f8602c913960400191505060405180910390fd5b606060008673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d8060008114610411576040519150601f19603f3d011682016040523d82523d6000602084013e610416565b606091505b50809350819250505080610492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b8192505050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461058f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806105f8602c913960400191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a4163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420496d706c656d656e746174696f6e20746f20307830506572736f6e616c4163636f756e7452656769737472793a2073656e646572206973206e6f7420746865206163636f756e74206f776e65724163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f2073656c66506572736f6e616c4163636f756e7452656769737472793a206f776e657220646f65736e27742065786973744163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420726567697374727920746f20307830496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a65724163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f2030783047617465776179526563697069656e743a20696e76616c6964206d73672e646174614163636f756e74436f6e74726f6c6c65723a206163636f756e7420616c7265616479207570677261646564506572736f6e616c4163636f756e7452656769737472793a2063616e6e6f742072656d6f76652073656c66477561726465643a2074782e6f726967696e206973206e6f742074686520677561726469616e506572736f6e616c4163636f756e7452656769737472793a204552433230546f6b656e207472616e736665722072657665727465644163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f20636f6e74726f6c6c6572506572736f6e616c4163636f756e7452656769737472793a206f776e657220616c726561647920657869737473506572736f6e616c4163636f756e7452656769737472793a2063616e6e6f742061646420307830206f776e6572a164736f6c634300060c000a", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101425760003560e01c806390482d72116100b8578063d0f710d61161007c578063d0f710d61461075e578063da9fc1ae146107f7578063db63f5821461083b578063e1e382ce1461089f578063e5c7278f14610958578063f4876c7414610a1b57610142565b806390482d7214610545578063a526d83b146105fe578063bb890d3f14610642578063cade6a5d146106bc578063d089e11a1461072a57610142565b80631a8414031161010a5780631a841403146103515780633164b5e1146103bf57806334d323a414610419578063392e53cd1461049d57806343013c24146104bd578063714041561461050157610142565b80630900f010146101475780630c68ba211461018b57806311464fbe146101e5578063116191b614610219578063124e9eb31461024d575b600080fd5b6101896004803603602081101561015d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a7f565b005b6101cd600480360360208110156101a157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b2e565b60405180821515815260200191505060405180910390f35b6101ed610b83565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610221610ba9565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103396004803603606081101561026357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156102a057600080fd5b8201836020820111156102b257600080fd5b803590602001918460018302840111640100000000831117156102d457600080fd5b9091929391929390803590602001906401000000008111156102f557600080fd5b82018360208201111561030757600080fd5b8035906020019184600183028401116401000000008311171561032957600080fd5b9091929391929390505050610bcf565b60405180821515815260200191505060405180910390f35b6103bd6004803603606081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c88565b005b610401600480360360208110156103d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ef3565b60405180821515815260200191505060405180910390f35b6104856004803603606081101561042f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f4c565b60405180821515815260200191505060405180910390f35b6104a561103a565b60405180821515815260200191505060405180910390f35b6104ff600480360360208110156104d357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611092565b005b6105436004803603602081101561051757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110aa565b005b6105fc6004803603606081101561055b57600080fd5b810190808035906020019064010000000081111561057857600080fd5b82018360208201111561058a57600080fd5b803590602001918460208302840111640100000000831117156105ac57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611370565b005b6106406004803603602081101561061457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611508565b005b6106a46004803603604081101561065857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115b5565b60405180821515815260200191505060405180910390f35b6106fe600480360360208110156106d257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115c9565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107326115db565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6107df6004803603604081101561077457600080fd5b81019080803590602001909291908035906020019064010000000081111561079b57600080fd5b8201836020820111156107ad57600080fd5b803590602001918460018302840111640100000000831117156107cf57600080fd5b9091929391929390505050611601565b60405180821515815260200191505060405180910390f35b6108396004803603602081101561080d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061165a565b005b61089d6004803603604081101561085157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611670565b005b610940600480360360608110156108b557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156108fc57600080fd5b82018360208201111561090e57600080fd5b8035906020019184600183028401116401000000008311171561093057600080fd5b9091929391929390505050611905565b60405180821515815260200191505060405180910390f35b610a196004803603608081101561096e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156109d557600080fd5b8201836020820111156109e757600080fd5b80359060200191846001830284011164010000000083111715610a0957600080fd5b9091929391929390505050611971565b005b610a7d60048036036040811015610a3157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119de565b005b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610b20576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806143e46026913960400191505060405180910390fd5b610b2b816001611d0d565b50565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000610c7d86610c7885858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610c6a89898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611e4e565b611fb790919063ffffffff16565b612087565b905095945050505050565b610c918361223e565b50610c9b83612685565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d2f57610d29833283600067ffffffffffffffff81118015610cee57600080fd5b506040519080825280601f01601f191660200182016040528015610d215781602001600182028036833780820191505090505b506000612786565b50610e5d565b6060610dd38484600063a9059cbb60e01b3287604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506000612786565b9050600081511115610e5b57808060200190516020811015610df457600080fd5b8101908080519060200190929190505050610e5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018061440a6035913960400191505060405180910390fd5b5b505b7feb5511fbef89123439f12682f0e9d0fc9696913b26eee55434c77d62c30aa7ca83328484604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200194505050505060405180910390a1505050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff169050919050565b60008060009050610f5d8585612087565b15610f6b576001905061102f565b61102c83600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff16151515158152602001600182015481525050612c5490919063ffffffff16565b90505b809150509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b61109b8161223e565b506110a7816001612ca3565b50565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661114b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806143e46026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614156111ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f477561726465643a2063616e6e6f742072656d6f76652073656c66000000000081525060200191505060405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166112ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f477561726465643a20677561726469616e20646f65736e27742065786973740081525060200191505060405180910390fd5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611416576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180614318602f913960400191505060405180910390fd5b6000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506114a2848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050612f05565b6114ac3083612f5d565b6114b581612f77565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150505050565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166115a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806143e46026913960400191505060405180910390fd5b6115b281612fbb565b50565b60006115c18383612087565b905092915050565b60006115d4826131e2565b9050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006116518484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050613238565b90509392505050565b6116638161223e565b5061166d81612685565b50565b600061167b8361223e565b90508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611702576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806143b9602b913960400191505060405180910390fd5b6117b9600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506132a5565b61180e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806142b7602c913960400191505060405180910390fd5b43600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f1ce3cbbc43ee231e5b950332f2b0b9dd7d349291a3ee411ce5c5c7ed745661bb8383604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1505050565b60006119678561196285858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505087611fb790919063ffffffff16565b612087565b9050949350505050565b61197a8561223e565b5061198485612685565b6119d685858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506001612786565b505050505050565b6119e78261223e565b50600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611a6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180614498602d913960400191505060405180910390fd5b611b25600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506132a5565b15611b7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d81526020018061446b602d913960400191505060405180910390fd5b6001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055506000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644688282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611d93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018061421e603b913960400191505060405180910390fd5b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015611e4a577f70d9f5a076620216a6050e493f3ce69749de0b68fa4b839ba2518660ba8b9cf0600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b5050565b6000611e5a82516132b8565b826040516020018082805190602001908083835b60208310611e915780518252602082019150602081019050602083039250611e6e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405260405160200180807f19457468657265756d205369676e6564204d6573736167653a0a000000000000815250601a0183805190602001908083835b60208310611f235780518252602082019150602081019050602083039250611f00565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310611f745780518252602082019150602081019050602083039250611f51565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052805190602001209050919050565b6000806000905060418351141561207d5760008060006020860151925060408601519150606086015160001a9050601b8160ff161015611ff857601b810190505b601b8160ff16148061200d5750601c8160ff16145b156120795760018782858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561206c573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b600080600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16156121ac576000600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154149050612234565b6000801b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154141561223357612202836131e2565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161490505b5b8091505092915050565b6000806122496133ff565b9050600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16156123c0576000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154146123bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806142596038913960400191505060405180910390fd5b61267c565b6000801b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541461245d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806142596038913960400191505060405180910390fd5b600081604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040528051906020012090506124aa81613410565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461252d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806142596038913960400191505060405180910390fd5b80600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055506001600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055507f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644688483604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1505b80915050919050565b600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1661278357612726600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101546001613606565b506001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055505b50565b6060600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141561280e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806143476025913960400191505060405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612893576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061443f602c913960400191505060405180910390fd5b8573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612918576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806142916026913960400191505060405180910390fd5b60608673ffffffffffffffffffffffffffffffffffffffff16633f579f428787876040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156129aa57808201518184015260208101905061298f565b50505050905090810190601f1680156129d75780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156129f857600080fd5b505af1158015612a0c573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506020811015612a3657600080fd5b8101908080516040519392919084640100000000821115612a5657600080fd5b83820191506020820185811115612a6c57600080fd5b8251866001820283011164010000000082111715612a8957600080fd5b8083526020830192505050908051906020019080838360005b83811015612abd578082015181840152602081019050612aa2565b50505050905090810190601f168015612aea5780820380516001836020036101000a031916815260200191505b5060405250505090508215612c47577f99eeae1fb8801e2e878e060ec5e5b3557b3c4f8106e35d88cb573f293dae4e248787878785604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015612ba1578082015181840152602081019050612b86565b50505050905090810190601f168015612bce5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015612c07578082015181840152602081019050612bec565b50505050905090810190601f168015612c345780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a15b8091505095945050505050565b60008060009050836000015115612c9957600084602001511415612c7b5760019050612c98565b6000831415612c8d5760019050612c97565b8284602001511190505b5b5b8091505092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b158015612d2257600080fd5b505afa158015612d36573d6000803e3d6000fd5b505050506040513d6020811015612d4c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161415612dca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018061438e602b913960400191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff1663d784d426600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015612e5557600080fd5b505af1158015612e69573d6000803e3d6000fd5b505050508015612f01577feec27cdb8bd6f55c2c537deb52ab094a2437e85ef5197e6f064f90bff3ff563f82600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b5050565b600081511415612f1d57612f1832612fbb565b612f5a565b60008151905060005b81811015612f5757612f4a838281518110612f3d57fe5b6020026020010151612fbb565b8080600101915050612f26565b50505b50565b612f6882600061375a565b612f73816000611d0d565b5050565b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561305e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a2063616e6e6f74206164642030783020677561726469616e81525060200191505060405180910390fd5b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561311d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a20677561726469616e20616c72656164792065786973747381525060200191505060405180910390fd5b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b60008082604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b815260140191505060405160208183030381529060405280519060200120905061323081613410565b915050919050565b60008061324e8385611fb790919063ffffffff16565b90506000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b60006132b18243612c54565b9050919050565b60606000821415613300576040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506133fa565b600082905060005b6000821461332a578080600101915050600a828161332257fe5b049150613308565b60608167ffffffffffffffff8111801561334357600080fd5b506040519080825280601f01601f1916602001820160405280156133765781602001600182028036833780820191505090505b50905060006001830390508593505b600084146133f257600a848161339757fe5b0660300160f81b828280600190039350815181106133b157fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84816133ea57fe5b049350613385565b819450505050505b919050565b600061340b601461389b565b905090565b600060606040518060200161342490613a8c565b6020820181038252601f19601f82011660405250600060a01b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060a01b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516020018086805190602001908083835b602083106134be578051825260208201915060208101905060208303925061349b565b6001836020036101000a0380198251168184511680821785525050505050509050018573ffffffffffffffffffffffffffffffffffffffff19168152600c018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018373ffffffffffffffffffffffffffffffffffffffff19168152600c018273ffffffffffffffffffffffffffffffffffffffff1660601b8152601401955050505050506040516020818303038152906040529050600060ff60f81b3085848051906020012060405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018381526020018281526020019450505050506040516020818303038152906040528051906020012090508060001c92505050919050565b60008083600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660405161365c90613a8c565b808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff168152602001925050508190604051809103906000f59050801580156136b9573d6000803e3d6000fd5b5090508215613750577f2682a218602b9036c9869f006c5405ee4a1a65267653eb7e286123e5e1afde4c81600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156137e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260358152602001806142e36035913960400191505060405180910390fd5b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508015613897577f02e3c47057b8dc27a0929d3c394c314c73aa002d46939c31c9f71d1e77e86c10600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b5050565b600080600090506138aa613930565b1561392357600083600036905003905061391b600036839060148501926138d393929190613a99565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506139f3565b915050613927565b3390505b80915050919050565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156139ec57602c600036905010156139e7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061436c6022913960400191505060405180910390fd5b600190505b8091505090565b6000806014835114613a6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f42797465734c69623a20696e76616c69642064617461206c656e67746800000081525060200191505060405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b61075180613acd83390190565b60008085851115613aa957600080fd5b83861115613ab657600080fd5b600185028301915084860390509450949250505056fe608060405234801561001057600080fd5b506040516107513803806107518339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050610630806101216000396000f3fe60806040526004361061004e5760003560e01c80633f579f42146100be5780635c60da1b146101e75780637b10399914610228578063d784d42614610269578063f77c4791146102ba57610055565b3661005557005b34801561006157600080fd5b50600080369050146100bc576000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050368060008037600080826000855af43d806000803e81600081146100b757816000f35b816000fd5b005b3480156100ca57600080fd5b5061016c600480360360608110156100e157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561012857600080fd5b82018360208201111561013a57600080fd5b8035906020019184600183028401116401000000008311171561015c57600080fd5b90919293919293905050506102fb565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101ac578082015181840152602081019050610191565b50505050905090810190601f1680156101d95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101f357600080fd5b506101fc61049f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561023457600080fd5b5061023d6104c5565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561027557600080fd5b506102b86004803603602081101561028c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104eb565b005b3480156102c657600080fd5b506102cf6105d3565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806105f8602c913960400191505060405180910390fd5b606060008673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d8060008114610411576040519150601f19603f3d011682016040523d82523d6000602084013e610416565b606091505b50809350819250505080610492576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b8192505050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461058f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806105f8602c913960400191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a4163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420496d706c656d656e746174696f6e20746f20307830506572736f6e616c4163636f756e7452656769737472793a2073656e646572206973206e6f7420746865206163636f756e74206f776e65724163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f2073656c66506572736f6e616c4163636f756e7452656769737472793a206f776e657220646f65736e27742065786973744163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420726567697374727920746f20307830496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a65724163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f2030783047617465776179526563697069656e743a20696e76616c6964206d73672e646174614163636f756e74436f6e74726f6c6c65723a206163636f756e7420616c7265616479207570677261646564506572736f6e616c4163636f756e7452656769737472793a2063616e6e6f742072656d6f76652073656c66477561726465643a2074782e6f726967696e206973206e6f742074686520677561726469616e506572736f6e616c4163636f756e7452656769737472793a204552433230546f6b656e207472616e736665722072657665727465644163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f20636f6e74726f6c6c6572506572736f6e616c4163636f756e7452656769737472793a206f776e657220616c726561647920657869737473506572736f6e616c4163636f756e7452656769737472793a2063616e6e6f742061646420307830206f776e6572a164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "events": { + "AccountCallRefunded(address,address,address,uint256)": { + "details": "Emitted when the call is refunded", + "params": { + "account": "account address", + "beneficiary": "beneficiary address", + "token": "token address", + "value": "value" + } + }, + "AccountOwnerAdded(address,address)": { + "details": "Emitted when the new owner is added", + "params": { + "account": "account address", + "owner": "owner address" + } + }, + "AccountOwnerRemoved(address,address)": { + "details": "Emitted when the existing owner is removed", + "params": { + "account": "account address", + "owner": "owner address" + } + } + }, + "kind": "dev", + "methods": { + "addAccountOwner(address,address)": { + "params": { + "account": "account address", + "owner": "owner address" + } + }, + "addGuardian(address)": { + "params": { + "guardian": "guardian address" + } + }, + "computeAccountAddress(address)": { + "params": { + "saltOwner": "salt owner address" + }, + "returns": { + "_0": "account address" + } + }, + "constructor": { + "details": "Public constructor" + }, + "deployAccount(address)": { + "params": { + "account": "account address" + } + }, + "executeAccountTransaction(address,address,uint256,bytes)": { + "details": "Deploys an account if not deployed yet", + "params": { + "account": "account address", + "data": "data", + "to": "to address", + "value": "value" + } + }, + "initialize(address[],address,address)": { + "params": { + "accountImplementation_": "account implementation address", + "gateway_": "`Gateway` contract address", + "guardians_": "array of guardians addresses" + } + }, + "isAccountDeployed(address)": { + "params": { + "account": "account address" + }, + "returns": { + "_0": "true when account is deployed" + } + }, + "isGuardian(address)": { + "params": { + "guardian": "guardian address" + }, + "returns": { + "_0": "true when guardian exists" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + }, + "isValidAccountSignature(address,bytes,bytes)": { + "params": { + "account": "account address", + "message": "message", + "signature": "signature" + }, + "returns": { + "_0": "magic hash if valid" + } + }, + "isValidAccountSignature(address,bytes32,bytes)": { + "params": { + "account": "account address", + "messageHash": "message hash", + "signature": "signature" + }, + "returns": { + "_0": "magic hash if valid" + } + }, + "refundAccountCall(address,address,uint256)": { + "details": "Deploys an account if not deployed yet", + "params": { + "account": "account address", + "token": "token address", + "value": "value" + } + }, + "removeAccountOwner(address,address)": { + "params": { + "account": "account address", + "owner": "owner address" + } + }, + "removeGuardian(address)": { + "params": { + "guardian": "guardian address" + } + }, + "upgrade(address)": { + "params": { + "accountImplementation_": "account implementation address" + } + }, + "upgradeAccount(address)": { + "params": { + "account": "account address" + } + }, + "verifyAccountOwner(address,address)": { + "params": { + "account": "account address", + "owner": "owner address" + }, + "returns": { + "_0": "true on correct account owner" + } + }, + "verifyAccountOwnerAtBlock(address,address,uint256)": { + "params": { + "account": "account address", + "blockNumber": "block number to verify", + "owner": "owner address" + }, + "returns": { + "_0": "true on correct account owner" + } + }, + "verifyGuardianSignature(bytes32,bytes)": { + "params": { + "messageHash": "message hash", + "signature": "signature" + }, + "returns": { + "_0": "true on correct guardian signature" + } + } + }, + "title": "Personal account registry", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addAccountOwner(address,address)": { + "notice": "Adds a new account owner" + }, + "addGuardian(address)": { + "notice": "Adds a new guardian" + }, + "computeAccountAddress(address)": { + "notice": "Computes account address" + }, + "deployAccount(address)": { + "notice": "Deploys account" + }, + "executeAccountTransaction(address,address,uint256,bytes)": { + "notice": "Executes account transaction" + }, + "initialize(address[],address,address)": { + "notice": "Initializes `PersonalAccountRegistry` contract" + }, + "isAccountDeployed(address)": { + "notice": "Checks if account is deployed" + }, + "isGuardian(address)": { + "notice": "Check if guardian exists" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + }, + "isValidAccountSignature(address,bytes,bytes)": { + "notice": "Verifies account signature" + }, + "isValidAccountSignature(address,bytes32,bytes)": { + "notice": "Verifies account signature" + }, + "refundAccountCall(address,address,uint256)": { + "notice": "Refunds account call" + }, + "removeAccountOwner(address,address)": { + "notice": "Removes the existing account owner" + }, + "removeGuardian(address)": { + "notice": "Removes the existing guardian" + }, + "upgrade(address)": { + "notice": "Upgrades `PersonalAccountRegistry` contract" + }, + "upgradeAccount(address)": { + "notice": "Upgrades account" + }, + "verifyAccountOwner(address,address)": { + "notice": "Verifies the owner of the account at the current block" + }, + "verifyAccountOwnerAtBlock(address,address,uint256)": { + "notice": "Verifies the owner of the account at a specific block" + }, + "verifyGuardianSignature(bytes32,bytes)": { + "notice": "Verifies guardian signature" + } + }, + "notice": "A registry for personal (controlled by owners) accounts", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 40, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "guardians", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_address,t_bool)" + }, + { + "astId": 390, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "accountRegistry", + "offset": 0, + "slot": "1", + "type": "t_address" + }, + { + "astId": 392, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "accountImplementation", + "offset": 0, + "slot": "2", + "type": "t_address" + }, + { + "astId": 1871, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "initializer", + "offset": 0, + "slot": "3", + "type": "t_address" + }, + { + "astId": 5197, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "gateway", + "offset": 0, + "slot": "4", + "type": "t_address" + }, + { + "astId": 6799, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "accounts", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_struct(Account)6795_storage)" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "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_struct(Account)6795_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct PersonalAccountRegistry.Account)", + "numberOfBytes": "32", + "value": "t_struct(Account)6795_storage" + }, + "t_mapping(t_address,t_struct(BlockRelated)1382_storage)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => struct BlockLib.BlockRelated)", + "numberOfBytes": "32", + "value": "t_struct(BlockRelated)1382_storage" + }, + "t_struct(Account)6795_storage": { + "encoding": "inplace", + "label": "struct PersonalAccountRegistry.Account", + "members": [ + { + "astId": 6788, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "deployed", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 6790, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "salt", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + }, + { + "astId": 6794, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "owners", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_address,t_struct(BlockRelated)1382_storage)" + } + ], + "numberOfBytes": "96" + }, + "t_struct(BlockRelated)1382_storage": { + "encoding": "inplace", + "label": "struct BlockLib.BlockRelated", + "members": [ + { + "astId": 1379, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "added", + "offset": 0, + "slot": "0", + "type": "t_bool" + }, + { + "astId": 1381, + "contract": "src/personal/PersonalAccountRegistry.sol:PersonalAccountRegistry", + "label": "removedAtBlockNumber", + "offset": 0, + "slot": "1", + "type": "t_uint256" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/WrappedWeiToken.json b/deployments/fuseSparknet/WrappedWeiToken.json new file mode 100644 index 00000000..e5b19a67 --- /dev/null +++ b/deployments/fuseSparknet/WrappedWeiToken.json @@ -0,0 +1,670 @@ +{ + "address": "0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "consumer", + "type": "address" + } + ], + "name": "ConsumerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "consumer", + "type": "address" + } + ], + "name": "ConsumerRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "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" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "depositTo", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "gateway", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "consumers_", + "type": "address[]" + }, + { + "internalType": "address", + "name": "gateway_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "consumer", + "type": "address" + } + ], + "name": "isConsumer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "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": "startConsuming", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stopConsuming", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + } + ], + "name": "withdrawAllTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "withdrawTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], + "transactionHash": "0x892803ea55222c0ba1f2143063ab79df1ee42ce2bf2e65385c80f8a8c842d067", + "receipt": { + "to": "0x4e59b44847b379578588920cA78FbF26c0B4956C", + "from": "0x09FD4F6088f2025427AB1e89257A44747081Ed59", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "1931765", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7a165fe76efee8982a5d4c7f7de9e9feed36dca79613e4698ab2284b7777a85a", + "transactionHash": "0x892803ea55222c0ba1f2143063ab79df1ee42ce2bf2e65385c80f8a8c842d067", + "logs": [], + "blockNumber": 5497500, + "cumulativeGasUsed": "1931765", + "status": 1, + "byzantium": true + }, + "args": [], + "solcInputHash": "1bdf84d4bd28700579af1cc4796e2cae", + "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"ConsumerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"ConsumerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"initializer\",\"type\":\"address\"}],\"name\":\"Initialized\",\"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\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"depositTo\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gateway\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"consumers_\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"gateway_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"consumer\",\"type\":\"address\"}],\"name\":\"isConsumer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isInitialized\",\"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\":\"startConsuming\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stopConsuming\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawAllTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"withdrawTo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"author\":\"Stanis\\u0142aw G\\u0142ogowski \",\"details\":\"After the transfer to consumer's account is done, the token will be automatically burned and withdrawn. Use `startConsuming` to become a consumer.\",\"events\":{\"ConsumerAdded(address)\":{\"details\":\"Emitted when the new consumer is added\",\"params\":{\"consumer\":\"consumer address\"}},\"ConsumerRemoved(address)\":{\"details\":\"Emitted when the existing consumer is removed\",\"params\":{\"consumer\":\"consumer address\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"details\":\"Public constructor\"},\"depositTo(address)\":{\"params\":{\"to\":\"to address\"}},\"initialize(address[],address)\":{\"params\":{\"consumers_\":\"array of consumers addresses\",\"gateway_\":\"`Gateway` contract address\"}},\"isConsumer(address)\":{\"params\":{\"consumer\":\"consumer address\"},\"returns\":{\"_0\":\"true if consumer exists\"}},\"isInitialized()\":{\"returns\":{\"_0\":\"true when contract is initialized\"}},\"startConsuming()\":{\"details\":\"Add caller as a consumer\"},\"stopConsuming()\":{\"details\":\"Remove caller from consumers\"},\"withdraw(uint256)\":{\"params\":{\"value\":\"value to withdraw\"}},\"withdrawAllTo(address)\":{\"params\":{\"to\":\"to address\"}},\"withdrawTo(address,uint256)\":{\"params\":{\"to\":\"to address\",\"value\":\"value to withdraw\"}}},\"title\":\"Wrapped wei token\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"depositTo(address)\":{\"notice\":\"Deposits `msg.value` to address\"},\"initialize(address[],address)\":{\"notice\":\"Initializes `WrappedWeiToken` contract\"},\"isConsumer(address)\":{\"notice\":\"Checks if consumer exists\"},\"isInitialized()\":{\"notice\":\"Check if contract is initialized\"},\"startConsuming()\":{\"notice\":\"Starts consuming\"},\"stopConsuming()\":{\"notice\":\"Stops consuming\"},\"withdraw(uint256)\":{\"notice\":\"Withdraws\"},\"withdrawAll()\":{\"notice\":\"Withdraws all\"},\"withdrawAllTo(address)\":{\"notice\":\"Withdraws all to address\"},\"withdrawTo(address,uint256)\":{\"notice\":\"Withdraws to address\"}},\"notice\":\"One to one wei consumable ERC20 token\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/tokens/WrappedWeiToken.sol\":\"WrappedWeiToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"src/common/libs/BytesLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Bytes library\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\nlibrary BytesLib {\\n /**\\n * @notice Converts bytes to address\\n * @param data data\\n * @return address\\n */\\n function toAddress(\\n bytes memory data\\n )\\n internal\\n pure\\n returns (address)\\n {\\n address result;\\n\\n require(\\n data.length == 20,\\n \\\"BytesLib: invalid data length\\\"\\n );\\n\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n result := div(mload(add(data, 0x20)), 0x1000000000000000000000000)\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x64c84964ea91bfb1f2d859eea6c57fe5b4a6f269951a4adf5f58d306c54c7f76\",\"license\":\"MIT\"},\"src/common/libs/SafeMathLib.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Safe math library\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/math/SafeMath.sol\\n */\\nlibrary SafeMathLib {\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n uint256 c = a + b;\\n\\n require(c >= a, \\\"SafeMathLib: addition overflow\\\");\\n\\n return c;\\n }\\n\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return sub(a, b, \\\"SafeMathLib: subtraction overflow\\\");\\n }\\n\\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b <= a, errorMessage);\\n\\n return a - b;\\n }\\n\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n uint256 c = a * b;\\n\\n require(c / a == b, \\\"SafeMathLib: multiplication overflow\\\");\\n\\n return c;\\n }\\n\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return div(a, b, \\\"SafeMathLib: division by zero\\\");\\n }\\n\\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b > 0, errorMessage);\\n\\n return a / b;\\n }\\n\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return mod(a, b, \\\"SafeMathLib: modulo by zero\\\");\\n }\\n\\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n require(b != 0, errorMessage);\\n\\n return a % b;\\n }\\n}\\n\",\"keccak256\":\"0x6089f354ca754d9c5dd9e800ee5ed86717dbf8f9af470604e0be691ac57c0107\",\"license\":\"MIT\"},\"src/common/lifecycle/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\n/**\\n * @title Initializable\\n *\\n * @dev Contract module which provides access control mechanism, where\\n * there is the initializer account that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\\n * Use `onlyInitializer` modifier on contract initialize process.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract Initializable {\\n address private initializer;\\n\\n // events\\n\\n /**\\n * @dev Emitted after `onlyInitializer`\\n * @param initializer initializer address\\n */\\n event Initialized(\\n address initializer\\n );\\n\\n // modifiers\\n\\n /**\\n * @dev Throws if tx.origin is not the initializer\\n */\\n modifier onlyInitializer() {\\n require(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin == initializer,\\n \\\"Initializable: tx.origin is not the initializer\\\"\\n );\\n\\n /// @dev removes initializer\\n initializer = address(0);\\n\\n _;\\n\\n emit Initialized(\\n // solhint-disable-next-line avoid-tx-origin\\n tx.origin\\n );\\n }\\n\\n /**\\n * @dev Internal constructor\\n */\\n constructor()\\n internal\\n {\\n // solhint-disable-next-line avoid-tx-origin\\n initializer = tx.origin;\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Check if contract is initialized\\n * @return true when contract is initialized\\n */\\n function isInitialized()\\n external\\n view\\n returns (bool)\\n {\\n return initializer == address(0);\\n }\\n}\\n\",\"keccak256\":\"0x3d47b2864dde5bde245917f7ac416a9e9715cdf1d226897e49838eb3186ee067\",\"license\":\"MIT\"},\"src/common/token/ERC20Token.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../libs/SafeMathLib.sol\\\";\\n\\n\\n/**\\n * @title ERC20 token\\n *\\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/token/ERC20/ERC20.sol\\n */\\ncontract ERC20Token {\\n using SafeMathLib for uint256;\\n\\n string public name;\\n string public symbol;\\n uint8 public decimals;\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) internal balances;\\n mapping(address => mapping(address => uint256)) internal allowances;\\n\\n // events\\n\\n event Transfer(\\n address indexed from,\\n address indexed to,\\n uint256 value\\n );\\n\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // external functions\\n\\n function transfer(\\n address to,\\n uint256 value\\n )\\n external\\n returns (bool)\\n {\\n _transfer(_getSender(), to, value);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n address sender = _getSender();\\n\\n _transfer(from, to, value);\\n _approve(from, sender, allowances[from][sender].sub(value));\\n\\n return true;\\n }\\n\\n function approve(\\n address spender,\\n uint256 value\\n )\\n virtual\\n external\\n returns (bool)\\n {\\n _approve(_getSender(), spender, value);\\n\\n return true;\\n }\\n\\n // external functions (views)\\n\\n function balanceOf(\\n address owner\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return balances[owner];\\n }\\n\\n function allowance(\\n address owner,\\n address spender\\n )\\n virtual\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[owner][spender];\\n }\\n\\n // internal functions\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n from != address(0),\\n \\\"ERC20Token: cannot transfer from 0x0 address\\\"\\n );\\n require(\\n to != address(0),\\n \\\"ERC20Token: cannot transfer to 0x0 address\\\"\\n );\\n\\n balances[from] = balances[from].sub(value);\\n balances[to] = balances[to].add(value);\\n\\n emit Transfer(from, to, value);\\n }\\n\\n function _approve(\\n address owner,\\n address spender,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot approve from 0x0 address\\\"\\n );\\n require(\\n spender != address(0),\\n \\\"ERC20Token: cannot approve to 0x0 address\\\"\\n );\\n\\n allowances[owner][spender] = value;\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function _mint(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot mint to 0x0 address\\\"\\n );\\n require(\\n value > 0,\\n \\\"ERC20Token: cannot mint 0 value\\\"\\n );\\n\\n balances[owner] = balances[owner].add(value);\\n totalSupply = totalSupply.add(value);\\n\\n emit Transfer(address(0), owner, value);\\n }\\n\\n function _burn(\\n address owner,\\n uint256 value\\n )\\n virtual\\n internal\\n {\\n require(\\n owner != address(0),\\n \\\"ERC20Token: cannot burn from 0x0 address\\\"\\n );\\n\\n balances[owner] = balances[owner].sub(\\n value,\\n \\\"ERC20Token: burn value exceeds balance\\\"\\n );\\n\\n totalSupply = totalSupply.sub(value);\\n\\n emit Transfer(owner, address(0), value);\\n }\\n\\n // internal functions (views)\\n\\n function _getSender()\\n virtual\\n internal\\n view\\n returns (address)\\n {\\n return msg.sender;\\n }\\n}\\n\",\"keccak256\":\"0x6f2b0bd08da549c6c1f5ceee85766832d587dde62c56bebc3a14bd9ea407e03d\",\"license\":\"MIT\"},\"src/gateway/GatewayRecipient.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/libs/BytesLib.sol\\\";\\n\\n\\n/**\\n * @title Gateway recipient\\n *\\n * @notice Gateway target contract\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract GatewayRecipient {\\n using BytesLib for bytes;\\n\\n address public gateway;\\n\\n /**\\n * @dev internal constructor\\n */\\n constructor() internal {}\\n\\n // internal functions\\n\\n /**\\n * @notice Initializes `GatewayRecipient` contract\\n * @param gateway_ `Gateway` contract address\\n */\\n function _initializeGatewayRecipient(\\n address gateway_\\n )\\n internal\\n {\\n gateway = gateway_;\\n }\\n\\n // internal functions (views)\\n\\n /**\\n * @notice Gets gateway context account\\n * @return context account address\\n */\\n function _getContextAccount()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(40);\\n }\\n\\n /**\\n * @notice Gets gateway context sender\\n * @return context sender address\\n */\\n function _getContextSender()\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAddress(20);\\n }\\n\\n /**\\n * @notice Gets gateway context data\\n * @return context data\\n */\\n function _getContextData()\\n internal\\n view\\n returns (bytes calldata)\\n {\\n bytes calldata result;\\n\\n if (_isGatewaySender()) {\\n result = msg.data[:msg.data.length - 40];\\n } else {\\n result = msg.data;\\n }\\n\\n return result;\\n }\\n\\n // private functions (views)\\n\\n function _getContextAddress(\\n uint256 offset\\n )\\n private\\n view\\n returns (address)\\n {\\n address result = address(0);\\n\\n if (_isGatewaySender()) {\\n uint from = msg.data.length - offset;\\n result = bytes(msg.data[from:from + 20]).toAddress();\\n } else {\\n result = msg.sender;\\n }\\n\\n return result;\\n }\\n\\n function _isGatewaySender()\\n private\\n view\\n returns (bool)\\n {\\n bool result;\\n\\n if (msg.sender == gateway) {\\n require(\\n msg.data.length >= 44,\\n \\\"GatewayRecipient: invalid msg.data\\\"\\n );\\n\\n result = true;\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0xe3fd29479d748d67360c61a9cbaafc66eaca25f476e59a45e842472bcf5233fc\",\"license\":\"MIT\"},\"src/tokens/WrappedWeiToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.6.12;\\n\\nimport \\\"../common/lifecycle/Initializable.sol\\\";\\nimport \\\"../common/token/ERC20Token.sol\\\";\\nimport \\\"../gateway/GatewayRecipient.sol\\\";\\n\\n\\n/**\\n * @title Wrapped wei token\\n *\\n * @notice One to one wei consumable ERC20 token\\n *\\n * @dev After the transfer to consumer's account is done, the token will be automatically burned and withdrawn.\\n *\\n * Use `startConsuming` to become a consumer.\\n *\\n * @author Stanis\\u0142aw G\\u0142ogowski \\n */\\ncontract WrappedWeiToken is Initializable, ERC20Token, GatewayRecipient {\\n mapping(address => bool) private consumers;\\n\\n // events\\n\\n /**\\n * @dev Emitted when the new consumer is added\\n * @param consumer consumer address\\n */\\n event ConsumerAdded(\\n address consumer\\n );\\n\\n /**\\n * @dev Emitted when the existing consumer is removed\\n * @param consumer consumer address\\n */\\n event ConsumerRemoved(\\n address consumer\\n );\\n\\n /**\\n * @dev Public constructor\\n */\\n constructor()\\n public\\n Initializable()\\n {\\n name = \\\"Wrapped Wei\\\";\\n symbol = \\\"WWEI\\\";\\n }\\n\\n /**\\n * @notice Receive fallback\\n */\\n receive()\\n external\\n payable\\n {\\n _mint(_getSender(), msg.value);\\n }\\n\\n // external functions\\n\\n /**\\n * @notice Initializes `WrappedWeiToken` contract\\n * @param consumers_ array of consumers addresses\\n * @param gateway_ `Gateway` contract address\\n */\\n function initialize(\\n address[] calldata consumers_,\\n address gateway_\\n )\\n external\\n onlyInitializer\\n {\\n if (consumers_.length != 0) {\\n uint consumersLen = consumers_.length;\\n for (uint i = 0; i < consumersLen; i++) {\\n _addConsumer(consumers_[i]);\\n }\\n }\\n\\n _initializeGatewayRecipient(gateway_);\\n }\\n\\n /**\\n * @notice Starts consuming\\n * @dev Add caller as a consumer\\n */\\n function startConsuming()\\n external\\n {\\n _addConsumer(_getSender());\\n }\\n\\n /**\\n * @notice Stops consuming\\n * @dev Remove caller from consumers\\n */\\n function stopConsuming()\\n external\\n {\\n address consumer = _getSender();\\n\\n require(\\n consumers[consumer],\\n \\\"WrappedWeiToken: consumer doesn't exist\\\"\\n );\\n\\n consumers[consumer] = false;\\n\\n emit ConsumerRemoved(consumer);\\n }\\n\\n /**\\n * @notice Deposits `msg.value` to address\\n * @param to to address\\n */\\n function depositTo(\\n address to\\n )\\n external\\n payable\\n {\\n _mint(to, msg.value);\\n }\\n\\n /**\\n * @notice Withdraws\\n * @param value value to withdraw\\n */\\n function withdraw(\\n uint256 value\\n )\\n external\\n {\\n _withdraw(_getSender(), _getSender(), value);\\n }\\n\\n /**\\n * @notice Withdraws to address\\n * @param to to address\\n * @param value value to withdraw\\n */\\n function withdrawTo(\\n address to,\\n uint256 value\\n )\\n external\\n {\\n _withdraw(_getSender(), to, value);\\n }\\n\\n /**\\n * @notice Withdraws all\\n */\\n function withdrawAll()\\n external\\n {\\n address sender = _getSender();\\n\\n _withdraw(sender, sender, balances[sender]);\\n }\\n\\n /**\\n * @notice Withdraws all to address\\n * @param to to address\\n */\\n function withdrawAllTo(\\n address to\\n )\\n external\\n {\\n address sender = _getSender();\\n\\n _withdraw(sender, to, balances[sender]);\\n }\\n\\n // external functions (views)\\n\\n /**\\n * @notice Checks if consumer exists\\n * @param consumer consumer address\\n * @return true if consumer exists\\n */\\n function isConsumer(\\n address consumer\\n )\\n external\\n view\\n returns (bool)\\n {\\n return consumers[consumer];\\n }\\n\\n // internal functions\\n\\n function _transfer(\\n address from,\\n address to,\\n uint256 value\\n )\\n override\\n internal\\n {\\n if (consumers[to]) {\\n _withdraw(from, to, value);\\n } else {\\n super._transfer(from, to, value);\\n }\\n }\\n\\n // internal functions (views)\\n\\n function _getSender()\\n override\\n internal\\n view\\n returns (address)\\n {\\n return _getContextAccount();\\n }\\n\\n // private functions\\n\\n function _addConsumer(\\n address consumer\\n )\\n private\\n {\\n require(\\n !consumers[consumer],\\n \\\"WrappedWeiToken: consumer already exists\\\"\\n );\\n\\n consumers[consumer] = true;\\n\\n emit ConsumerAdded(consumer);\\n }\\n\\n function _withdraw(\\n address from,\\n address to,\\n uint256 value\\n )\\n private\\n {\\n _burn(from, value);\\n\\n require(\\n // solhint-disable-next-line check-send-result\\n payable(to).send(value),\\n \\\"WrappedWeiToken: transaction reverted\\\"\\n );\\n }\\n}\\n\",\"keccak256\":\"0xa4e1ef99b7ce5b92cedb73387e5954824815e13ac23acef38d7fcf234d8fc017\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60806040523480156200001157600080fd5b50326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040518060400160405280600b81526020017f5772617070656420576569000000000000000000000000000000000000000000815250600190805190602001906200009f929190620000f4565b506040518060400160405280600481526020017f575745490000000000000000000000000000000000000000000000000000000081525060029080519060200190620000ed929190620000f4565b506200019a565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200013757805160ff191683800117855562000168565b8280016001018555821562000168579182015b82811115620001675782518255916020019190600101906200014a565b5b5090506200017791906200017b565b5090565b5b80821115620001965760008160009055506001016200017c565b5090565b6120b080620001aa6000396000f3fe6080604052600436106101235760003560e01c806356a3b64b116100a0578063a9059cbb11610064578063a9059cbb1461065f578063b760faf9146106d0578063ca9add8f14610714578063dd62ed3e14610765578063f55647e0146107ea5761013b565b806356a3b64b146104d557806370a08231146104ec578063834ff73914610551578063853828b6146105b857806395d89b41146105cf5761013b565b806323b872dd116100e757806323b872dd146103085780632e1a7d4d14610399578063313ce567146103d4578063392e53cd14610402578063462d0b2e1461042f5761013b565b806306fdde0314610140578063095ea7b3146101d0578063116191b61461024157806318160ddd14610282578063205c2878146102ad5761013b565b3661013b57610139610133610801565b34610810565b005b600080fd5b34801561014c57600080fd5b50610155610a26565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561019557808201518184015260208101905061017a565b50505050905090810190601f1680156101c25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101dc57600080fd5b50610229600480360360408110156101f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ac4565b60405180821515815260200191505060405180910390f35b34801561024d57600080fd5b50610256610ae2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028e57600080fd5b50610297610b08565b6040518082815260200191505060405180910390f35b3480156102b957600080fd5b50610306600480360360408110156102d057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b0e565b005b34801561031457600080fd5b506103816004803603606081101561032b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b24565b60405180821515815260200191505060405180910390f35b3480156103a557600080fd5b506103d2600480360360208110156103bc57600080fd5b8101908080359060200190929190505050610be1565b005b3480156103e057600080fd5b506103e9610bfd565b604051808260ff16815260200191505060405180910390f35b34801561040e57600080fd5b50610417610c10565b60405180821515815260200191505060405180910390f35b34801561043b57600080fd5b506104d36004803603604081101561045257600080fd5b810190808035906020019064010000000081111561046f57600080fd5b82018360208201111561048157600080fd5b803590602001918460208302840111640100000000831117156104a357600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c66565b005b3480156104e157600080fd5b506104ea610e05565b005b3480156104f857600080fd5b5061053b6004803603602081101561050f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e17565b6040518082815260200191505060405180910390f35b34801561055d57600080fd5b506105a06004803603602081101561057457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e60565b60405180821515815260200191505060405180910390f35b3480156105c457600080fd5b506105cd610eb6565b005b3480156105db57600080fd5b506105e4610f0f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610624578082015181840152602081019050610609565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561066b57600080fd5b506106b86004803603604081101561068257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fad565b60405180821515815260200191505060405180910390f35b610712600480360360208110156106e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fcb565b005b34801561072057600080fd5b506107636004803603602081101561073757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fd8565b005b34801561077157600080fd5b506107d46004803603604081101561078857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611032565b6040518082815260200191505060405180910390f35b3480156107f657600080fd5b506107ff6110b9565b005b600061080b61120f565b905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610896576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611fb66026913960400191505060405180910390fd5b6000811161090c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4552433230546f6b656e3a2063616e6e6f74206d696e7420302076616c75650081525060200191505060405180910390fd5b61095e81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461122090919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506109b68160045461122090919063ffffffff16565b6004819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610abc5780601f10610a9157610100808354040283529160200191610abc565b820191906000526020600020905b815481529060010190602001808311610a9f57829003601f168201915b505050505081565b6000610ad8610ad1610801565b84846112a8565b6001905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b610b20610b19610801565b838361149f565b5050565b600080610b2f610801565b9050610b3c858585611538565b610bd58582610bd086600660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115ab90919063ffffffff16565b6112a8565b60019150509392505050565b610bfa610bec610801565b610bf4610801565b8361149f565b50565b600360009054906101000a900460ff1681565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610d0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180611ec8602f913960400191505060405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008383905014610daa57600083839050905060005b81811015610da757610d9a858583818110610d7857fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff166115d8565b8080600101915050610d61565b50505b610db381611723565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1505050565b610e15610e10610801565b6115d8565b565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000610ec0610801565b9050610f0c8182600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461149f565b50565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610fa55780601f10610f7a57610100808354040283529160200191610fa5565b820191906000526020600020905b815481529060010190602001808311610f8857829003601f168201915b505050505081565b6000610fc1610fba610801565b8484611538565b6001905092915050565b610fd58134610810565b50565b6000610fe2610801565b905061102e8183600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461149f565b5050565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006110c3610801565b9050600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611167576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806120066027913960400191505060405180910390fd5b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fe3f5ed5f263f1f01764a96edfc7d025f511ec5f7d180e8816908b78bcf74f09881604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600061121b6028611767565b905090565b60008082840190508381101561129e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174684c69623a206164646974696f6e206f766572666c6f77000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561132e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180611f8b602b913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113b4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180611f416029913960400191505060405180910390fd5b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6114a983826117fc565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050611533576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061202d6025913960400191505060405180910390fd5b505050565b600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561159a5761159583838361149f565b6115a6565b6115a58383836119b6565b5b505050565b60006115d08383604051806060016040528060218152602001611f6a60219139611c56565b905092915050565b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561167b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611ef76028913960400191505060405180910390fd5b6001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f28b26e7a3d20aedbc5f8f2ebf7da671c0491723a2b78f47a097b0e46dee0714281604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009050611776611d10565b156117ef5760008360003690500390506117e76000368390601485019261179f93929190611e6c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611dd3565b9150506117f3565b3390505b80915050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611882576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611ea06028913960400191505060405180910390fd5b6118ee8160405180606001604052806026815260200161205260269139600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c569092919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611946816004546115ab90919063ffffffff16565b600481905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612078602c913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611ac2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611fdc602a913960400191505060405180910390fd5b611b1481600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115ab90919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ba981600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461122090919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611d03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611cc8578082015181840152602081019050611cad565b50505050905090810190601f168015611cf55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082840390509392505050565b600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415611dcc57602c60003690501015611dc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611f1f6022913960400191505060405180910390fd5b600190505b8091505090565b6000806014835114611e4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f42797465734c69623a20696e76616c69642064617461206c656e67746800000081525060200191505060405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b60008085851115611e7c57600080fd5b83861115611e8957600080fd5b600185028301915084860390509450949250505056fe4552433230546f6b656e3a2063616e6e6f74206275726e2066726f6d203078302061646472657373496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a657257726170706564576569546f6b656e3a20636f6e73756d657220616c72656164792065786973747347617465776179526563697069656e743a20696e76616c6964206d73672e646174614552433230546f6b656e3a2063616e6e6f7420617070726f766520746f203078302061646472657373536166654d6174684c69623a207375627472616374696f6e206f766572666c6f774552433230546f6b656e3a2063616e6e6f7420617070726f76652066726f6d2030783020616464726573734552433230546f6b656e3a2063616e6e6f74206d696e7420746f2030783020616464726573734552433230546f6b656e3a2063616e6e6f74207472616e7366657220746f20307830206164647265737357726170706564576569546f6b656e3a20636f6e73756d657220646f65736e277420657869737457726170706564576569546f6b656e3a207472616e73616374696f6e2072657665727465644552433230546f6b656e3a206275726e2076616c756520657863656564732062616c616e63654552433230546f6b656e3a2063616e6e6f74207472616e736665722066726f6d203078302061646472657373a164736f6c634300060c000a", + "deployedBytecode": "0x6080604052600436106101235760003560e01c806356a3b64b116100a0578063a9059cbb11610064578063a9059cbb1461065f578063b760faf9146106d0578063ca9add8f14610714578063dd62ed3e14610765578063f55647e0146107ea5761013b565b806356a3b64b146104d557806370a08231146104ec578063834ff73914610551578063853828b6146105b857806395d89b41146105cf5761013b565b806323b872dd116100e757806323b872dd146103085780632e1a7d4d14610399578063313ce567146103d4578063392e53cd14610402578063462d0b2e1461042f5761013b565b806306fdde0314610140578063095ea7b3146101d0578063116191b61461024157806318160ddd14610282578063205c2878146102ad5761013b565b3661013b57610139610133610801565b34610810565b005b600080fd5b34801561014c57600080fd5b50610155610a26565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561019557808201518184015260208101905061017a565b50505050905090810190601f1680156101c25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101dc57600080fd5b50610229600480360360408110156101f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ac4565b60405180821515815260200191505060405180910390f35b34801561024d57600080fd5b50610256610ae2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028e57600080fd5b50610297610b08565b6040518082815260200191505060405180910390f35b3480156102b957600080fd5b50610306600480360360408110156102d057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b0e565b005b34801561031457600080fd5b506103816004803603606081101561032b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b24565b60405180821515815260200191505060405180910390f35b3480156103a557600080fd5b506103d2600480360360208110156103bc57600080fd5b8101908080359060200190929190505050610be1565b005b3480156103e057600080fd5b506103e9610bfd565b604051808260ff16815260200191505060405180910390f35b34801561040e57600080fd5b50610417610c10565b60405180821515815260200191505060405180910390f35b34801561043b57600080fd5b506104d36004803603604081101561045257600080fd5b810190808035906020019064010000000081111561046f57600080fd5b82018360208201111561048157600080fd5b803590602001918460208302840111640100000000831117156104a357600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c66565b005b3480156104e157600080fd5b506104ea610e05565b005b3480156104f857600080fd5b5061053b6004803603602081101561050f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e17565b6040518082815260200191505060405180910390f35b34801561055d57600080fd5b506105a06004803603602081101561057457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e60565b60405180821515815260200191505060405180910390f35b3480156105c457600080fd5b506105cd610eb6565b005b3480156105db57600080fd5b506105e4610f0f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610624578082015181840152602081019050610609565b50505050905090810190601f1680156106515780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561066b57600080fd5b506106b86004803603604081101561068257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fad565b60405180821515815260200191505060405180910390f35b610712600480360360208110156106e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fcb565b005b34801561072057600080fd5b506107636004803603602081101561073757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fd8565b005b34801561077157600080fd5b506107d46004803603604081101561078857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611032565b6040518082815260200191505060405180910390f35b3480156107f657600080fd5b506107ff6110b9565b005b600061080b61120f565b905090565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610896576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611fb66026913960400191505060405180910390fd5b6000811161090c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4552433230546f6b656e3a2063616e6e6f74206d696e7420302076616c75650081525060200191505060405180910390fd5b61095e81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461122090919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506109b68160045461122090919063ffffffff16565b6004819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610abc5780601f10610a9157610100808354040283529160200191610abc565b820191906000526020600020905b815481529060010190602001808311610a9f57829003601f168201915b505050505081565b6000610ad8610ad1610801565b84846112a8565b6001905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b610b20610b19610801565b838361149f565b5050565b600080610b2f610801565b9050610b3c858585611538565b610bd58582610bd086600660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115ab90919063ffffffff16565b6112a8565b60019150509392505050565b610bfa610bec610801565b610bf4610801565b8361149f565b50565b600360009054906101000a900460ff1681565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610d0a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180611ec8602f913960400191505060405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008383905014610daa57600083839050905060005b81811015610da757610d9a858583818110610d7857fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff166115d8565b8080600101915050610d61565b50505b610db381611723565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1505050565b610e15610e10610801565b6115d8565b565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000610ec0610801565b9050610f0c8182600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461149f565b50565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610fa55780601f10610f7a57610100808354040283529160200191610fa5565b820191906000526020600020905b815481529060010190602001808311610f8857829003601f168201915b505050505081565b6000610fc1610fba610801565b8484611538565b6001905092915050565b610fd58134610810565b50565b6000610fe2610801565b905061102e8183600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461149f565b5050565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006110c3610801565b9050600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611167576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806120066027913960400191505060405180910390fd5b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fe3f5ed5f263f1f01764a96edfc7d025f511ec5f7d180e8816908b78bcf74f09881604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600061121b6028611767565b905090565b60008082840190508381101561129e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174684c69623a206164646974696f6e206f766572666c6f77000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561132e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180611f8b602b913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113b4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180611f416029913960400191505060405180910390fd5b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6114a983826117fc565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050611533576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061202d6025913960400191505060405180910390fd5b505050565b600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561159a5761159583838361149f565b6115a6565b6115a58383836119b6565b5b505050565b60006115d08383604051806060016040528060218152602001611f6a60219139611c56565b905092915050565b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561167b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611ef76028913960400191505060405180910390fd5b6001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f28b26e7a3d20aedbc5f8f2ebf7da671c0491723a2b78f47a097b0e46dee0714281604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009050611776611d10565b156117ef5760008360003690500390506117e76000368390601485019261179f93929190611e6c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611dd3565b9150506117f3565b3390505b80915050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611882576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611ea06028913960400191505060405180910390fd5b6118ee8160405180606001604052806026815260200161205260269139600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c569092919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611946816004546115ab90919063ffffffff16565b600481905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180612078602c913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611ac2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611fdc602a913960400191505060405180910390fd5b611b1481600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115ab90919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ba981600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461122090919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611d03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611cc8578082015181840152602081019050611cad565b50505050905090810190601f168015611cf55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082840390509392505050565b600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415611dcc57602c60003690501015611dc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611f1f6022913960400191505060405180910390fd5b600190505b8091505090565b6000806014835114611e4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f42797465734c69623a20696e76616c69642064617461206c656e67746800000081525060200191505060405180910390fd5b6c01000000000000000000000000602084015104905080915050919050565b60008085851115611e7c57600080fd5b83861115611e8957600080fd5b600185028301915084860390509450949250505056fe4552433230546f6b656e3a2063616e6e6f74206275726e2066726f6d203078302061646472657373496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a657257726170706564576569546f6b656e3a20636f6e73756d657220616c72656164792065786973747347617465776179526563697069656e743a20696e76616c6964206d73672e646174614552433230546f6b656e3a2063616e6e6f7420617070726f766520746f203078302061646472657373536166654d6174684c69623a207375627472616374696f6e206f766572666c6f774552433230546f6b656e3a2063616e6e6f7420617070726f76652066726f6d2030783020616464726573734552433230546f6b656e3a2063616e6e6f74206d696e7420746f2030783020616464726573734552433230546f6b656e3a2063616e6e6f74207472616e7366657220746f20307830206164647265737357726170706564576569546f6b656e3a20636f6e73756d657220646f65736e277420657869737457726170706564576569546f6b656e3a207472616e73616374696f6e2072657665727465644552433230546f6b656e3a206275726e2076616c756520657863656564732062616c616e63654552433230546f6b656e3a2063616e6e6f74207472616e736665722066726f6d203078302061646472657373a164736f6c634300060c000a", + "devdoc": { + "author": "Stanisław Głogowski ", + "details": "After the transfer to consumer's account is done, the token will be automatically burned and withdrawn. Use `startConsuming` to become a consumer.", + "events": { + "ConsumerAdded(address)": { + "details": "Emitted when the new consumer is added", + "params": { + "consumer": "consumer address" + } + }, + "ConsumerRemoved(address)": { + "details": "Emitted when the existing consumer is removed", + "params": { + "consumer": "consumer address" + } + } + }, + "kind": "dev", + "methods": { + "constructor": { + "details": "Public constructor" + }, + "depositTo(address)": { + "params": { + "to": "to address" + } + }, + "initialize(address[],address)": { + "params": { + "consumers_": "array of consumers addresses", + "gateway_": "`Gateway` contract address" + } + }, + "isConsumer(address)": { + "params": { + "consumer": "consumer address" + }, + "returns": { + "_0": "true if consumer exists" + } + }, + "isInitialized()": { + "returns": { + "_0": "true when contract is initialized" + } + }, + "startConsuming()": { + "details": "Add caller as a consumer" + }, + "stopConsuming()": { + "details": "Remove caller from consumers" + }, + "withdraw(uint256)": { + "params": { + "value": "value to withdraw" + } + }, + "withdrawAllTo(address)": { + "params": { + "to": "to address" + } + }, + "withdrawTo(address,uint256)": { + "params": { + "to": "to address", + "value": "value to withdraw" + } + } + }, + "title": "Wrapped wei token", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "depositTo(address)": { + "notice": "Deposits `msg.value` to address" + }, + "initialize(address[],address)": { + "notice": "Initializes `WrappedWeiToken` contract" + }, + "isConsumer(address)": { + "notice": "Checks if consumer exists" + }, + "isInitialized()": { + "notice": "Check if contract is initialized" + }, + "startConsuming()": { + "notice": "Starts consuming" + }, + "stopConsuming()": { + "notice": "Stops consuming" + }, + "withdraw(uint256)": { + "notice": "Withdraws" + }, + "withdrawAll()": { + "notice": "Withdraws all" + }, + "withdrawAllTo(address)": { + "notice": "Withdraws all to address" + }, + "withdrawTo(address,uint256)": { + "notice": "Withdraws to address" + } + }, + "notice": "One to one wei consumable ERC20 token", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 1871, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "initializer", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 1983, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "name", + "offset": 0, + "slot": "1", + "type": "t_string_storage" + }, + { + "astId": 1985, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "symbol", + "offset": 0, + "slot": "2", + "type": "t_string_storage" + }, + { + "astId": 1987, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "decimals", + "offset": 0, + "slot": "3", + "type": "t_uint8" + }, + { + "astId": 1989, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "totalSupply", + "offset": 0, + "slot": "4", + "type": "t_uint256" + }, + { + "astId": 1993, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "balances", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_address,t_uint256)" + }, + { + "astId": 1999, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "allowances", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" + }, + { + "astId": 5197, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "gateway", + "offset": 0, + "slot": "7", + "type": "t_address" + }, + { + "astId": 7468, + "contract": "src/tokens/WrappedWeiToken.sol:WrappedWeiToken", + "label": "consumers", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_address,t_bool)" + } + ], + "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" + }, + "t_uint8": { + "encoding": "inplace", + "label": "uint8", + "numberOfBytes": "1" + } + } + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/solcInputs/1bdf84d4bd28700579af1cc4796e2cae.json b/deployments/fuseSparknet/solcInputs/1bdf84d4bd28700579af1cc4796e2cae.json new file mode 100644 index 00000000..e1114a03 --- /dev/null +++ b/deployments/fuseSparknet/solcInputs/1bdf84d4bd28700579af1cc4796e2cae.json @@ -0,0 +1,154 @@ +{ + "language": "Solidity", + "sources": { + "src/common/access/Controlled.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Controlled\n *\n * @dev Contract module which provides an access control mechanism.\n * It ensures there is only one controlling account of the smart contract\n * and grants that account exclusive access to specific functions.\n *\n * The controller account will be the one that deploys the contract.\n *\n * @author Stanisław Głogowski \n */\ncontract Controlled {\n /**\n * @return controller account address\n */\n address public controller;\n\n // modifiers\n\n /**\n * @dev Throws if msg.sender is not the controller\n */\n modifier onlyController() {\n require(\n msg.sender == controller,\n \"Controlled: msg.sender is not the controller\"\n );\n\n _;\n }\n\n /**\n * @dev Internal constructor\n */\n constructor()\n internal\n {\n controller = msg.sender;\n }\n}\n" + }, + "src/payments/PaymentDepositAccount.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../common/access/Controlled.sol\";\n\n\n/**\n * @title Payment deposit account\n *\n * @dev Simple account contract with only one method - `executeTransaction`\n *\n * @author Stanisław Głogowski \n */\ncontract PaymentDepositAccount is Controlled {\n /**\n * @dev Public constructor\n */\n constructor() public payable Controlled() {}\n\n /**\n * @notice Allow receives\n */\n receive()\n external\n payable\n {\n //\n }\n\n // external functions\n\n /**\n * @notice Executes transaction\n * @param to to address\n * @param value value\n * @param data data\n * @return transaction result\n */\n function executeTransaction(\n address to,\n uint256 value,\n bytes calldata data\n )\n external\n onlyController\n returns (bytes memory)\n {\n bytes memory result;\n bool succeeded;\n\n // solhint-disable-next-line avoid-call-value, avoid-low-level-calls\n (succeeded, result) = payable(to).call{value: value}(data);\n\n require(\n succeeded,\n \"Account: transaction reverted\"\n );\n\n return result;\n }\n}\n" + }, + "src/payments/PaymentRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\npragma experimental ABIEncoderV2;\n\nimport \"../common/access/Guarded.sol\";\nimport \"../common/libs/ECDSALib.sol\";\nimport \"../common/libs/SafeMathLib.sol\";\nimport \"../common/lifecycle/Initializable.sol\";\nimport \"../common/signature/SignatureValidator.sol\";\nimport \"../common/token/ERC20Token.sol\";\nimport \"../external/ExternalAccountRegistry.sol\";\nimport \"../personal/PersonalAccountRegistry.sol\";\nimport \"../gateway/GatewayRecipient.sol\";\nimport \"./PaymentDepositAccount.sol\";\n\n\n/**\n * @title Payment registry\n *\n * @notice A registry for payment and payment channels\n *\n * @dev the `DepositExit` process can be used in a case operator (guardian) couldn't sign commit / withdrawal message.\n * Process will be rejected when any of senders channels will be committed.\n *\n * @author Stanisław Głogowski \n */\ncontract PaymentRegistry is Guarded, Initializable, SignatureValidator, GatewayRecipient {\n using ECDSALib for bytes32;\n using SafeMathLib for uint256;\n\n struct Deposit {\n address account;\n mapping(address => uint256) withdrawnAmount;\n mapping(address => uint256) exitLockedUntil;\n }\n\n struct PaymentChannel {\n uint256 committedAmount;\n }\n\n struct DepositWithdrawal {\n address owner;\n address token;\n uint256 amount;\n }\n\n struct PaymentChannelCommit {\n address sender;\n address recipient;\n address token;\n bytes32 uid;\n uint256 blockNumber;\n uint256 amount;\n }\n\n uint256 private constant DEFAULT_DEPOSIT_EXIT_LOCK_PERIOD = 28 days;\n\n bytes32 private constant HASH_PREFIX_DEPOSIT_WITHDRAWAL = keccak256(\n \"DepositWithdrawal(address owner,address token,uint256 amount)\"\n );\n bytes32 private constant HASH_PREFIX_PAYMENT_CHANNEL_COMMIT = keccak256(\n \"PaymentChannelCommit(address sender,address recipient,address token,bytes32 uid,uint256 blockNumber,uint256 amount)\"\n );\n\n ExternalAccountRegistry public externalAccountRegistry;\n PersonalAccountRegistry public personalAccountRegistry;\n\n uint256 public depositExitLockPeriod;\n\n mapping(address => Deposit) private deposits;\n mapping(bytes32 => PaymentChannel) private paymentChannels;\n\n // events\n\n /**\n * @dev Emitted when the deposit account is deployed\n * @param depositAccount deposit account address\n * @param owner owner address\n */\n event DepositAccountDeployed(\n address depositAccount,\n address owner\n );\n\n /**\n * @dev Emitted when the deposit exist is requested\n * @param depositAccount deposit account address\n * @param owner owner address\n * @param token token address\n * @param lockedUntil deposit exist locked util time\n */\n event DepositExitRequested(\n address depositAccount,\n address owner,\n address token,\n uint256 lockedUntil\n );\n\n /**\n * @dev Emitted when the deposit exist is completed\n * @param depositAccount deposit account address\n * @param owner owner address\n * @param token token address\n * @param amount deposit exist amount\n */\n event DepositExitCompleted(\n address depositAccount,\n address owner,\n address token,\n uint256 amount\n );\n\n /**\n * @dev Emitted when the deposit exist is rejected\n * @param depositAccount deposit account address\n * @param owner owner address\n * @param token token address\n */\n event DepositExitRejected(\n address depositAccount,\n address owner,\n address token\n );\n\n /**\n * @dev Emitted when the deposit has been withdrawn\n * @param depositAccount deposit account address\n * @param owner owner address\n * @param token token address\n * @param amount withdrawn amount\n */\n event DepositWithdrawn(\n address depositAccount,\n address owner,\n address token,\n uint256 amount\n );\n\n /**\n * @dev Emitted when the payment channel has been committed\n * @param hash channel hash\n * @param sender sender address\n * @param recipient recipient address\n * @param token token address\n * @param uid unique channel id\n * @param amount committed amount\n */\n event PaymentChannelCommitted(\n bytes32 hash,\n address sender,\n address recipient,\n address token,\n bytes32 uid,\n uint256 amount\n );\n\n /**\n * @dev Emitted when the payment has been withdrawn\n * @param channelHash channel hash\n * @param value payment value\n */\n event PaymentWithdrawn(\n bytes32 channelHash,\n uint256 value\n );\n\n /**\n * @dev Emitted when the payment has been deposited\n * @param channelHash channel hash\n * @param value payment value\n */\n event PaymentDeposited(\n bytes32 channelHash,\n uint256 value\n );\n\n /**\n * @dev Emitted when the payment has been withdrawn and deposited (split)\n * @param channelHash channel hash\n * @param totalValue payment total value\n * @param depositValue payment deposited value\n */\n event PaymentSplit(\n bytes32 channelHash,\n uint256 totalValue,\n uint256 depositValue\n );\n\n /**\n * @dev Public constructor\n */\n constructor() public Initializable() SignatureValidator() {}\n\n // external functions\n\n /**\n * @notice Initialize `PaymentRegistry` contract\n * @param externalAccountRegistry_ `ExternalAccountRegistry` contract address\n * @param personalAccountRegistry_ `PersonalAccountRegistry` contract address\n * @param depositExitLockPeriod_ deposit exit lock period\n * @param guardians_ array of guardians addresses\n * @param gateway_ `Gateway` contract address\n */\n function initialize(\n ExternalAccountRegistry externalAccountRegistry_,\n PersonalAccountRegistry personalAccountRegistry_,\n uint256 depositExitLockPeriod_,\n address[] calldata guardians_,\n address gateway_\n )\n external\n onlyInitializer\n {\n externalAccountRegistry = externalAccountRegistry_;\n personalAccountRegistry = personalAccountRegistry_;\n\n if (depositExitLockPeriod_ == 0) {\n depositExitLockPeriod = DEFAULT_DEPOSIT_EXIT_LOCK_PERIOD;\n } else {\n depositExitLockPeriod = depositExitLockPeriod_;\n }\n\n // Guarded\n _initializeGuarded(guardians_);\n\n // GatewayRecipient\n _initializeGatewayRecipient(gateway_);\n }\n\n /**\n * @notice Deploys deposit account\n * @param owner owner address\n */\n function deployDepositAccount(\n address owner\n )\n external\n {\n _deployDepositAccount(owner);\n }\n\n /**\n * @notice Requests deposit exit\n * @param token token address\n */\n function requestDepositExit(\n address token\n )\n external\n {\n address owner = _getContextAccount();\n uint256 lockedUntil = deposits[owner].exitLockedUntil[token];\n\n require(\n lockedUntil == 0,\n \"PaymentRegistry: deposit exit already requested\"\n );\n\n _deployDepositAccount(owner);\n\n // solhint-disable-next-line not-rely-on-time\n lockedUntil = now.add(depositExitLockPeriod);\n\n deposits[owner].exitLockedUntil[token] = lockedUntil;\n\n emit DepositExitRequested(\n deposits[owner].account,\n owner,\n token,\n lockedUntil\n );\n }\n\n /**\n * @notice Processes deposit exit\n * @param token token address\n */\n function processDepositExit(\n address token\n )\n external\n {\n address owner = _getContextAccount();\n uint256 lockedUntil = deposits[owner].exitLockedUntil[token];\n\n require(\n lockedUntil != 0,\n \"PaymentRegistry: deposit exit not requested\"\n );\n\n require(\n // solhint-disable-next-line not-rely-on-time\n lockedUntil <= now,\n \"PaymentRegistry: deposit exit locked\"\n );\n\n deposits[owner].exitLockedUntil[token] = 0;\n\n address depositAccount = deposits[owner].account;\n uint256 depositValue;\n\n if (token == address(0)) {\n depositValue = depositAccount.balance;\n } else {\n depositValue = ERC20Token(token).balanceOf(depositAccount);\n }\n\n _transferFromDeposit(\n depositAccount,\n owner,\n token,\n depositValue\n );\n\n emit DepositExitCompleted(\n depositAccount,\n owner,\n token,\n depositValue\n );\n }\n\n /**\n * @notice Withdraws deposit\n * @param token token address\n * @param amount amount to withdraw\n * @param guardianSignature guardian signature\n */\n function withdrawDeposit(\n address token,\n uint256 amount,\n bytes calldata guardianSignature\n )\n external\n {\n address owner = _getContextAccount();\n uint256 value = amount.sub(deposits[owner].withdrawnAmount[token]);\n\n require(\n value > 0,\n \"PaymentRegistry: invalid amount\"\n );\n\n bytes32 messageHash = _hashDepositWithdrawal(\n owner,\n token,\n amount\n );\n\n require(\n _verifyGuardianSignature(messageHash, guardianSignature),\n \"PaymentRegistry: invalid guardian signature\"\n );\n\n deposits[owner].withdrawnAmount[token] = amount;\n\n _verifyDepositExitOrDeployAccount(owner, token);\n\n _transferFromDeposit(\n deposits[owner].account,\n owner,\n token,\n value\n );\n\n emit DepositWithdrawn(\n deposits[owner].account,\n owner,\n token,\n amount\n );\n }\n\n /**\n * @notice Commits payment channel and withdraw payment\n * @param sender sender address\n * @param token token address\n * @param uid unique channel id\n * @param blockNumber block number\n * @param amount amount to commit\n * @param senderSignature sender signature\n * @param guardianSignature guardian signature\n */\n function commitPaymentChannelAndWithdraw(\n address sender,\n address token,\n bytes32 uid,\n uint256 blockNumber,\n uint256 amount,\n bytes calldata senderSignature,\n bytes calldata guardianSignature\n )\n external\n {\n address recipient = _getContextAccount();\n\n (bytes32 hash, address depositAccount, uint256 paymentValue) = _commitPaymentChannel(\n sender,\n recipient,\n token,\n uid,\n blockNumber,\n amount,\n senderSignature,\n guardianSignature\n );\n\n _transferFromDeposit(\n depositAccount,\n recipient,\n token,\n paymentValue\n );\n\n emit PaymentWithdrawn(hash, paymentValue);\n }\n\n /**\n * @notice Commits payment channel and deposit payment\n * @param sender sender address\n * @param token token address\n * @param uid unique channel id\n * @param blockNumber block number\n * @param amount amount to commit\n * @param senderSignature sender signature\n * @param guardianSignature guardian signature\n */\n function commitPaymentChannelAndDeposit(\n address sender,\n address token,\n bytes32 uid,\n uint256 blockNumber,\n uint256 amount,\n bytes calldata senderSignature,\n bytes calldata guardianSignature\n )\n external\n {\n address recipient = _getContextAccount();\n\n (bytes32 hash, address depositAccount, uint256 paymentValue) = _commitPaymentChannel(\n sender,\n recipient,\n token,\n uid,\n blockNumber,\n amount,\n senderSignature,\n guardianSignature\n );\n\n _transferFromDeposit(\n depositAccount,\n _computeDepositAccountAddress(recipient),\n token,\n paymentValue\n );\n\n emit PaymentDeposited(hash, paymentValue);\n }\n\n /**\n * @notice Commits payment channel, withdraws and deposits (split) payment\n * @param sender sender address\n * @param token token address\n * @param uid unique channel id\n * @param blockNumber block number\n * @param amount amount to commit\n * @param depositPaymentValue amount to deposit\n * @param senderSignature sender signature\n * @param guardianSignature guardian signature\n */\n function commitPaymentChannelAndSplit(\n address sender,\n address token,\n bytes32 uid,\n uint256 blockNumber,\n uint256 amount,\n uint256 depositPaymentValue,\n bytes calldata senderSignature,\n bytes calldata guardianSignature\n )\n external\n {\n address recipient = _getContextAccount();\n\n (bytes32 hash, address depositAccount, uint256 paymentValue) = _commitPaymentChannel(\n sender,\n recipient,\n token,\n uid,\n blockNumber,\n amount,\n senderSignature,\n guardianSignature\n );\n\n _transferSplitFromDeposit(\n depositAccount,\n recipient,\n token,\n paymentValue,\n depositPaymentValue\n );\n\n emit PaymentSplit(hash, paymentValue, depositPaymentValue);\n }\n\n // external functions (views)\n\n /**\n * @notice Computes deposit account address\n * @param owner owner address\n * @return deposit account address\n */\n function computeDepositAccountAddress(\n address owner\n )\n external\n view\n returns (address)\n {\n return _computeDepositAccountAddress(owner);\n }\n\n /**\n * @notice Checks if deposit account is deployed\n * @param owner owner address\n * @return true when deposit account is deployed\n */\n function isDepositAccountDeployed(\n address owner\n )\n external\n view\n returns (bool)\n {\n return deposits[owner].account != address(0);\n }\n\n /**\n * @notice Gets deposit exit locked until time\n * @param owner owner address\n * @param token token address\n * @return locked until time\n */\n function getDepositExitLockedUntil(\n address owner,\n address token\n )\n external\n view\n returns (uint256)\n {\n return deposits[owner].exitLockedUntil[token];\n }\n\n /**\n * @notice Gets deposit withdrawn amount\n * @param owner owner address\n * @param token token address\n * @return withdrawn amount\n */\n function getDepositWithdrawnAmount(\n address owner,\n address token\n )\n external\n view\n returns (uint256)\n {\n return deposits[owner].withdrawnAmount[token];\n }\n\n /**\n * @notice Gets payment channel committed amount\n * @param hash payment channel hash\n * @return committed amount\n */\n function getPaymentChannelCommittedAmount(\n bytes32 hash\n )\n external\n view\n returns (uint256)\n {\n return paymentChannels[hash].committedAmount;\n }\n\n // external functions (pure)\n\n /**\n * @notice Computes payment channel hash\n * @param sender sender address\n * @param recipient recipient address\n * @param token token address\n * @param uid unique channel id\n * @return hash\n */\n function computePaymentChannelHash(\n address sender,\n address recipient,\n address token,\n bytes32 uid\n )\n external\n pure\n returns (bytes32)\n {\n return _computePaymentChannelHash(\n sender,\n recipient,\n token,\n uid\n );\n }\n\n // public functions (views)\n\n /**\n * @notice Hashes `DepositWithdrawal` message payload\n * @param depositWithdrawal struct\n * @return hash\n */\n function hashDepositWithdrawal(\n DepositWithdrawal memory depositWithdrawal\n )\n public\n view\n returns (bytes32)\n {\n return _hashDepositWithdrawal(\n depositWithdrawal.owner,\n depositWithdrawal.token,\n depositWithdrawal.amount\n );\n }\n\n /**\n * @notice Hashes `PaymentChannelCommit` message payload\n * @param paymentChannelCommit struct\n * @return hash\n */\n function hashPaymentChannelCommit(\n PaymentChannelCommit memory paymentChannelCommit\n )\n public\n view\n returns (bytes32)\n {\n return _hashPaymentChannelCommit(\n paymentChannelCommit.sender,\n paymentChannelCommit.recipient,\n paymentChannelCommit.token,\n paymentChannelCommit.uid,\n paymentChannelCommit.blockNumber,\n paymentChannelCommit.amount\n );\n }\n\n // private functions\n\n function _deployDepositAccount(\n address owner\n )\n private\n {\n if (deposits[owner].account == address(0)) {\n bytes32 salt = keccak256(\n abi.encodePacked(\n owner\n )\n );\n\n deposits[owner].account = address(new PaymentDepositAccount{salt: salt}());\n\n emit DepositAccountDeployed(\n deposits[owner].account,\n owner\n );\n }\n }\n\n function _verifyDepositExitOrDeployAccount(\n address owner,\n address token\n )\n private\n {\n if (deposits[owner].exitLockedUntil[token] > 0) {\n deposits[owner].exitLockedUntil[token] = 0;\n\n emit DepositExitRejected(\n deposits[owner].account,\n owner,\n token\n );\n } else {\n _deployDepositAccount(owner);\n }\n }\n\n function _commitPaymentChannel(\n address sender,\n address recipient,\n address token,\n bytes32 uid,\n uint256 blockNumber,\n uint256 amount,\n bytes memory senderSignature,\n bytes memory guardianSignature\n )\n private\n returns (bytes32 hash, address depositAccount, uint256 paymentValue)\n {\n bytes32 messageHash = _hashPaymentChannelCommit(\n sender,\n recipient,\n token,\n uid,\n blockNumber,\n amount\n );\n\n if (senderSignature.length == 0) {\n require(\n externalAccountRegistry.verifyAccountProofAtBlock(sender, messageHash, blockNumber),\n \"PaymentRegistry: invalid guardian signature\"\n );\n } else {\n address signer = messageHash.recoverAddress(senderSignature);\n\n if (sender != signer) {\n require(\n personalAccountRegistry.verifyAccountOwnerAtBlock(sender, signer, blockNumber) ||\n externalAccountRegistry.verifyAccountOwnerAtBlock(sender, signer, blockNumber),\n \"PaymentRegistry: invalid sender signature\"\n );\n }\n }\n\n require(\n _verifyGuardianSignature(messageHash, guardianSignature),\n \"PaymentRegistry: invalid guardian signature\"\n );\n\n hash = _computePaymentChannelHash(\n sender,\n recipient,\n token,\n uid\n );\n\n /// @dev calc payment value\n paymentValue = amount.sub(paymentChannels[hash].committedAmount);\n\n require(\n paymentValue != 0,\n \"PaymentRegistry: invalid payment value\"\n );\n\n paymentChannels[hash].committedAmount = amount;\n\n _verifyDepositExitOrDeployAccount(sender, token);\n\n depositAccount = deposits[sender].account;\n\n emit PaymentChannelCommitted(\n hash,\n sender,\n recipient,\n token,\n uid,\n amount\n );\n\n return (hash, depositAccount, paymentValue);\n }\n\n function _transferFromDeposit(\n address depositAccount,\n address to,\n address token,\n uint256 value\n )\n private\n {\n if (token == address(0)) {\n PaymentDepositAccount(payable(depositAccount)).executeTransaction(\n to,\n value,\n new bytes(0)\n );\n } else {\n bytes memory response = PaymentDepositAccount(payable(depositAccount)).executeTransaction(\n token,\n 0,\n abi.encodeWithSelector(\n ERC20Token(token).transfer.selector,\n to,\n value\n )\n );\n\n if (response.length > 0) {\n require(\n abi.decode(response, (bool)),\n \"PaymentRegistry: ERC20Token transfer reverted\"\n );\n }\n }\n }\n\n function _transferSplitFromDeposit(\n address depositAccount,\n address to,\n address token,\n uint256 paymentValue,\n uint256 depositValue\n )\n private\n {\n require(\n depositValue > 0,\n \"PaymentRegistry: invalid deposit value\"\n );\n\n uint256 withdrawValue = paymentValue.sub(depositValue);\n\n require(\n withdrawValue > 0,\n \"PaymentRegistry: invalid withdraw value\"\n );\n\n _transferFromDeposit(\n depositAccount,\n to,\n token,\n withdrawValue\n );\n\n _transferFromDeposit(\n depositAccount,\n _computeDepositAccountAddress(to),\n token,\n depositValue\n );\n }\n\n // private functions (views)\n\n function _computeDepositAccountAddress(\n address owner\n )\n private\n view\n returns (address)\n {\n bytes32 salt = keccak256(\n abi.encodePacked(\n owner\n )\n );\n\n bytes memory creationCode = type(PaymentDepositAccount).creationCode;\n\n bytes32 data = keccak256(\n abi.encodePacked(\n bytes1(0xff),\n address(this),\n salt,\n keccak256(creationCode)\n )\n );\n\n return address(uint160(uint256(data)));\n }\n\n function _hashDepositWithdrawal(\n address owner,\n address token,\n uint256 amount\n )\n private\n view\n returns (bytes32)\n {\n return _hashMessagePayload(HASH_PREFIX_DEPOSIT_WITHDRAWAL, abi.encodePacked(\n owner,\n token,\n amount\n ));\n }\n\n function _hashPaymentChannelCommit(\n address sender,\n address recipient,\n address token,\n bytes32 uid,\n uint256 blockNumber,\n uint256 amount\n )\n private\n view\n returns (bytes32)\n {\n return _hashMessagePayload(HASH_PREFIX_PAYMENT_CHANNEL_COMMIT, abi.encodePacked(\n sender,\n recipient,\n token,\n uid,\n blockNumber,\n amount\n ));\n }\n\n // private functions (pure)\n\n function _computePaymentChannelHash(\n address sender,\n address recipient,\n address token,\n bytes32 uid\n )\n private\n pure\n returns (bytes32)\n {\n return keccak256(\n abi.encodePacked(\n sender,\n recipient,\n token,\n uid\n )\n );\n }\n}\n" + }, + "src/common/access/Guarded.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../libs/ECDSALib.sol\";\n\n\n/**\n * @title Guarded\n *\n * @dev Contract module which provides a guardian-type control mechanism.\n * It allows key accounts to have guardians and restricts specific methods to be accessible by guardians only.\n *\n * Each guardian account can remove other guardians\n *\n * Use `_initializeGuarded` to initialize the contract\n *\n * @author Stanisław Głogowski \n */\ncontract Guarded {\n using ECDSALib for bytes32;\n\n mapping(address => bool) private guardians;\n\n // events\n\n /**\n * @dev Emitted when a new guardian is added\n * @param sender sender address\n * @param guardian guardian address\n */\n event GuardianAdded(\n address sender,\n address guardian\n );\n\n /**\n * @dev Emitted when the existing guardian is removed\n * @param sender sender address\n * @param guardian guardian address\n */\n event GuardianRemoved(\n address sender,\n address guardian\n );\n\n // modifiers\n\n /**\n * @dev Throws if tx.origin is not a guardian account\n */\n modifier onlyGuardian() {\n require(\n // solhint-disable-next-line avoid-tx-origin\n guardians[tx.origin],\n \"Guarded: tx.origin is not the guardian\"\n );\n\n _;\n }\n\n /**\n * @dev Internal constructor\n */\n constructor() internal {}\n\n // external functions\n\n /**\n * @notice Adds a new guardian\n * @param guardian guardian address\n */\n function addGuardian(\n address guardian\n )\n external\n onlyGuardian\n {\n _addGuardian(guardian);\n }\n\n /**\n * @notice Removes the existing guardian\n * @param guardian guardian address\n */\n function removeGuardian(\n address guardian\n )\n external\n onlyGuardian\n {\n require(\n // solhint-disable-next-line avoid-tx-origin\n tx.origin != guardian,\n \"Guarded: cannot remove self\"\n );\n\n require(\n guardians[guardian],\n \"Guarded: guardian doesn't exist\"\n );\n\n guardians[guardian] = false;\n\n emit GuardianRemoved(\n // solhint-disable-next-line avoid-tx-origin\n tx.origin,\n guardian\n );\n }\n\n // external functions (views)\n\n /**\n * @notice Check if guardian exists\n * @param guardian guardian address\n * @return true when guardian exists\n */\n function isGuardian(\n address guardian\n )\n external\n view\n returns (bool)\n {\n return guardians[guardian];\n }\n\n /**\n * @notice Verifies guardian signature\n * @param messageHash message hash\n * @param signature signature\n * @return true on correct guardian signature\n */\n function verifyGuardianSignature(\n bytes32 messageHash,\n bytes calldata signature\n )\n external\n view\n returns (bool)\n {\n return _verifyGuardianSignature(\n messageHash,\n signature\n );\n }\n\n // internal functions\n\n /**\n * @notice Initializes `Guarded` contract\n * @dev If `guardians_` array is empty `tx.origin` is added as guardian account\n * @param guardians_ array of guardians addresses\n */\n function _initializeGuarded(\n address[] memory guardians_\n )\n internal\n {\n if (guardians_.length == 0) {\n // solhint-disable-next-line avoid-tx-origin\n _addGuardian(tx.origin);\n } else {\n uint guardiansLen = guardians_.length;\n for (uint i = 0; i < guardiansLen; i++) {\n _addGuardian(guardians_[i]);\n }\n }\n }\n\n\n // internal functions (views)\n\n function _verifyGuardianSignature(\n bytes32 messageHash,\n bytes memory signature\n )\n internal\n view\n returns (bool)\n {\n address guardian = messageHash.recoverAddress(signature);\n\n return guardians[guardian];\n }\n\n // private functions\n\n function _addGuardian(\n address guardian\n )\n private\n {\n require(\n guardian != address(0),\n \"Guarded: cannot add 0x0 guardian\"\n );\n\n require(\n !guardians[guardian],\n \"Guarded: guardian already exists\"\n );\n\n guardians[guardian] = true;\n\n emit GuardianAdded(\n // solhint-disable-next-line avoid-tx-origin\n tx.origin,\n guardian\n );\n }\n}\n" + }, + "src/common/libs/ECDSALib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title ECDSA library\n *\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/cryptography/ECDSA.sol#L26\n */\nlibrary ECDSALib {\n function recoverAddress(\n bytes32 messageHash,\n bytes memory signature\n )\n internal\n pure\n returns (address)\n {\n address result = address(0);\n\n if (signature.length == 65) {\n bytes32 r;\n bytes32 s;\n uint8 v;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n r := mload(add(signature, 0x20))\n s := mload(add(signature, 0x40))\n v := byte(0, mload(add(signature, 0x60)))\n }\n\n if (v < 27) {\n v += 27;\n }\n\n if (v == 27 || v == 28) {\n result = ecrecover(messageHash, v, r, s);\n }\n }\n\n return result;\n }\n\n function toEthereumSignedMessageHash(\n bytes32 messageHash\n )\n internal\n pure\n returns (bytes32)\n {\n return keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n32\",\n messageHash\n ));\n }\n}\n" + }, + "src/common/libs/SafeMathLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Safe math library\n *\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/math/SafeMath.sol\n */\nlibrary SafeMathLib {\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n\n require(c >= a, \"SafeMathLib: addition overflow\");\n\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMathLib: subtraction overflow\");\n }\n\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n\n return a - b;\n }\n\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n\n require(c / a == b, \"SafeMathLib: multiplication overflow\");\n\n return c;\n }\n\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMathLib: division by zero\");\n }\n\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b > 0, errorMessage);\n\n return a / b;\n }\n\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMathLib: modulo by zero\");\n }\n\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n\n return a % b;\n }\n}\n" + }, + "src/common/lifecycle/Initializable.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Initializable\n *\n * @dev Contract module which provides access control mechanism, where\n * there is the initializer account that can be granted exclusive access to\n * specific functions.\n *\n * The initializer account will be tx.origin during contract deployment and will be removed on first use.\n * Use `onlyInitializer` modifier on contract initialize process.\n *\n * @author Stanisław Głogowski \n */\ncontract Initializable {\n address private initializer;\n\n // events\n\n /**\n * @dev Emitted after `onlyInitializer`\n * @param initializer initializer address\n */\n event Initialized(\n address initializer\n );\n\n // modifiers\n\n /**\n * @dev Throws if tx.origin is not the initializer\n */\n modifier onlyInitializer() {\n require(\n // solhint-disable-next-line avoid-tx-origin\n tx.origin == initializer,\n \"Initializable: tx.origin is not the initializer\"\n );\n\n /// @dev removes initializer\n initializer = address(0);\n\n _;\n\n emit Initialized(\n // solhint-disable-next-line avoid-tx-origin\n tx.origin\n );\n }\n\n /**\n * @dev Internal constructor\n */\n constructor()\n internal\n {\n // solhint-disable-next-line avoid-tx-origin\n initializer = tx.origin;\n }\n\n // external functions (views)\n\n /**\n * @notice Check if contract is initialized\n * @return true when contract is initialized\n */\n function isInitialized()\n external\n view\n returns (bool)\n {\n return initializer == address(0);\n }\n}\n" + }, + "src/common/signature/SignatureValidator.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../libs/ECDSALib.sol\";\n\n/**\n * @title Signature validator\n *\n * @author Stanisław Głogowski \n */\ncontract SignatureValidator {\n using ECDSALib for bytes32;\n\n uint256 public chainId;\n\n /**\n * @dev internal constructor\n */\n constructor() internal {\n uint256 chainId_;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n chainId_ := chainid()\n }\n\n chainId = chainId_;\n }\n\n // internal functions\n\n function _hashMessagePayload(\n bytes32 messagePrefix,\n bytes memory messagePayload\n )\n internal\n view\n returns (bytes32)\n {\n return keccak256(abi.encodePacked(\n chainId,\n address(this),\n messagePrefix,\n messagePayload\n )).toEthereumSignedMessageHash();\n }\n}\n" + }, + "src/common/token/ERC20Token.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../libs/SafeMathLib.sol\";\n\n\n/**\n * @title ERC20 token\n *\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/token/ERC20/ERC20.sol\n */\ncontract ERC20Token {\n using SafeMathLib for uint256;\n\n string public name;\n string public symbol;\n uint8 public decimals;\n uint256 public totalSupply;\n\n mapping(address => uint256) internal balances;\n mapping(address => mapping(address => uint256)) internal allowances;\n\n // events\n\n event Transfer(\n address indexed from,\n address indexed to,\n uint256 value\n );\n\n event Approval(\n address indexed owner,\n address indexed spender,\n uint256 value\n );\n\n /**\n * @dev internal constructor\n */\n constructor() internal {}\n\n // external functions\n\n function transfer(\n address to,\n uint256 value\n )\n external\n returns (bool)\n {\n _transfer(_getSender(), to, value);\n\n return true;\n }\n\n function transferFrom(\n address from,\n address to,\n uint256 value\n )\n virtual\n external\n returns (bool)\n {\n address sender = _getSender();\n\n _transfer(from, to, value);\n _approve(from, sender, allowances[from][sender].sub(value));\n\n return true;\n }\n\n function approve(\n address spender,\n uint256 value\n )\n virtual\n external\n returns (bool)\n {\n _approve(_getSender(), spender, value);\n\n return true;\n }\n\n // external functions (views)\n\n function balanceOf(\n address owner\n )\n virtual\n external\n view\n returns (uint256)\n {\n return balances[owner];\n }\n\n function allowance(\n address owner,\n address spender\n )\n virtual\n external\n view\n returns (uint256)\n {\n return allowances[owner][spender];\n }\n\n // internal functions\n\n function _transfer(\n address from,\n address to,\n uint256 value\n )\n virtual\n internal\n {\n require(\n from != address(0),\n \"ERC20Token: cannot transfer from 0x0 address\"\n );\n require(\n to != address(0),\n \"ERC20Token: cannot transfer to 0x0 address\"\n );\n\n balances[from] = balances[from].sub(value);\n balances[to] = balances[to].add(value);\n\n emit Transfer(from, to, value);\n }\n\n function _approve(\n address owner,\n address spender,\n uint256 value\n )\n virtual\n internal\n {\n require(\n owner != address(0),\n \"ERC20Token: cannot approve from 0x0 address\"\n );\n require(\n spender != address(0),\n \"ERC20Token: cannot approve to 0x0 address\"\n );\n\n allowances[owner][spender] = value;\n\n emit Approval(owner, spender, value);\n }\n\n function _mint(\n address owner,\n uint256 value\n )\n virtual\n internal\n {\n require(\n owner != address(0),\n \"ERC20Token: cannot mint to 0x0 address\"\n );\n require(\n value > 0,\n \"ERC20Token: cannot mint 0 value\"\n );\n\n balances[owner] = balances[owner].add(value);\n totalSupply = totalSupply.add(value);\n\n emit Transfer(address(0), owner, value);\n }\n\n function _burn(\n address owner,\n uint256 value\n )\n virtual\n internal\n {\n require(\n owner != address(0),\n \"ERC20Token: cannot burn from 0x0 address\"\n );\n\n balances[owner] = balances[owner].sub(\n value,\n \"ERC20Token: burn value exceeds balance\"\n );\n\n totalSupply = totalSupply.sub(value);\n\n emit Transfer(owner, address(0), value);\n }\n\n // internal functions (views)\n\n function _getSender()\n virtual\n internal\n view\n returns (address)\n {\n return msg.sender;\n }\n}\n" + }, + "src/external/ExternalAccountRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../common/libs/BlockLib.sol\";\n\n\n/**\n * @title External account registry\n *\n * @notice Global registry for keys and external (outside of the platform) contract based wallets\n *\n * @dev An account can call the registry to add (`addAccountOwner`) or remove (`removeAccountOwner`) its own owners.\n * When the owner has been added, information about that fact will live in the registry forever.\n * Removing an owner only affects the future blocks (until the owner is re-added).\n *\n * Given the fact, there is no way to sign the data using a contract based wallet,\n * we created a registry to store signed by the key wallet proofs.\n * ERC-1271 allows removing a signer after the signature was created. Thus store the signature for the later use\n * doesn't guarantee the signer is still has access to that smart account.\n * Because of that, the ERC1271's `isValidSignature()` cannot be used in e.g. `PaymentRegistry`.*\n *\n * An account can call the registry to add (`addAccountProof`) or remove (`removeAccountProof`) proof hash.\n * When the proof has been added, information about that fact will live in the registry forever.\n * Removing a proof only affects the future blocks (until the proof is re-added).\n *\n * @author Stanisław Głogowski \n */\ncontract ExternalAccountRegistry {\n using BlockLib for BlockLib.BlockRelated;\n\n struct Account {\n mapping(address => BlockLib.BlockRelated) owners;\n mapping(bytes32 => BlockLib.BlockRelated) proofs;\n }\n\n mapping(address => Account) private accounts;\n\n // events\n\n /**\n * @dev Emitted when the new owner is added\n * @param account account address\n * @param owner owner address\n */\n event AccountOwnerAdded(\n address account,\n address owner\n );\n\n /**\n * @dev Emitted when the existing owner is removed\n * @param account account address\n * @param owner owner address\n */\n event AccountOwnerRemoved(\n address account,\n address owner\n );\n\n /**\n * @dev Emitted when the new proof is added\n * @param account account address\n * @param hash proof hash\n */\n event AccountProofAdded(\n address account,\n bytes32 hash\n );\n\n /**\n * @dev Emitted when the existing proof is removed\n * @param account account address\n * @param hash proof hash\n */\n event AccountProofRemoved(\n address account,\n bytes32 hash\n );\n\n // external functions\n\n /**\n * @notice Adds a new account owner\n * @param owner owner address\n */\n function addAccountOwner(\n address owner\n )\n external\n {\n require(\n owner != address(0),\n \"ExternalAccountRegistry: cannot add 0x0 owner\"\n );\n\n require(\n !accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\n \"ExternalAccountRegistry: owner already exists\"\n );\n\n accounts[msg.sender].owners[owner].added = true;\n accounts[msg.sender].owners[owner].removedAtBlockNumber = 0;\n\n emit AccountOwnerAdded(\n msg.sender,\n owner\n );\n }\n\n /**\n * @notice Removes existing account owner\n * @param owner owner address\n */\n function removeAccountOwner(\n address owner\n )\n external\n {\n require(\n accounts[msg.sender].owners[owner].verifyAtCurrentBlock(),\n \"ExternalAccountRegistry: owner doesn't exist\"\n );\n\n accounts[msg.sender].owners[owner].removedAtBlockNumber = block.number;\n\n emit AccountOwnerRemoved(\n msg.sender,\n owner\n );\n }\n\n /**\n * @notice Adds a new account proof\n * @param hash proof hash\n */\n function addAccountProof(\n bytes32 hash\n )\n external\n {\n require(\n !accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\n \"ExternalAccountRegistry: proof already exists\"\n );\n\n accounts[msg.sender].proofs[hash].added = true;\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = 0;\n\n emit AccountProofAdded(\n msg.sender,\n hash\n );\n }\n\n /**\n * @notice Removes existing account proof\n * @param hash proof hash\n */\n function removeAccountProof(\n bytes32 hash\n )\n external\n {\n require(\n accounts[msg.sender].proofs[hash].verifyAtCurrentBlock(),\n \"ExternalAccountRegistry: proof doesn't exist\"\n );\n\n accounts[msg.sender].proofs[hash].removedAtBlockNumber = block.number;\n\n emit AccountProofRemoved(\n msg.sender,\n hash\n );\n }\n\n // external functions (views)\n\n /**\n * @notice Verifies the owner of the account at current block\n * @param account account address\n * @param owner owner address\n * @return true on correct account owner\n */\n function verifyAccountOwner(\n address account,\n address owner\n )\n external\n view\n returns (bool)\n {\n return accounts[account].owners[owner].verifyAtCurrentBlock();\n }\n\n /**\n * @notice Verifies the owner of the account at specific block\n * @param account account address\n * @param owner owner address\n * @param blockNumber block number to verify\n * @return true on correct account owner\n */\n function verifyAccountOwnerAtBlock(\n address account,\n address owner,\n uint256 blockNumber\n )\n external\n view\n returns (bool)\n {\n return accounts[account].owners[owner].verifyAtBlock(blockNumber);\n }\n\n /**\n * @notice Verifies the proof of the account at current block\n * @param account account address\n * @param hash proof hash\n * @return true on correct account proof\n */\n function verifyAccountProof(\n address account,\n bytes32 hash\n )\n external\n view\n returns (bool)\n {\n return accounts[account].proofs[hash].verifyAtCurrentBlock();\n }\n\n /**\n * @notice Verifies the proof of the account at specific block\n * @param account account address\n * @param hash proof hash\n * @param blockNumber block number to verify\n * @return true on correct account proof\n */\n function verifyAccountProofAtBlock(\n address account,\n bytes32 hash,\n uint256 blockNumber\n )\n external\n view\n returns (bool)\n {\n return accounts[account].proofs[hash].verifyAtBlock(blockNumber);\n }\n}\n" + }, + "src/personal/PersonalAccountRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../common/access/Guarded.sol\";\nimport \"../common/account/AccountController.sol\";\nimport \"../common/account/AccountRegistry.sol\";\nimport \"../common/libs/BlockLib.sol\";\nimport \"../common/libs/ECDSALib.sol\";\nimport \"../common/libs/ECDSAExtendedLib.sol\";\nimport \"../common/libs/SafeMathLib.sol\";\nimport \"../common/lifecycle/Initializable.sol\";\nimport \"../common/token/ERC20Token.sol\";\nimport \"../gateway/GatewayRecipient.sol\";\n\n\n/**\n * @title Personal account registry\n *\n * @notice A registry for personal (controlled by owners) accounts\n *\n * @author Stanisław Głogowski \n */\ncontract PersonalAccountRegistry is Guarded, AccountController, AccountRegistry, Initializable, GatewayRecipient {\n using BlockLib for BlockLib.BlockRelated;\n using SafeMathLib for uint256;\n using ECDSALib for bytes32;\n using ECDSAExtendedLib for bytes;\n\n struct Account {\n bool deployed;\n bytes32 salt;\n mapping(address => BlockLib.BlockRelated) owners;\n }\n\n mapping(address => Account) private accounts;\n\n // events\n\n /**\n * @dev Emitted when the new owner is added\n * @param account account address\n * @param owner owner address\n */\n event AccountOwnerAdded(\n address account,\n address owner\n );\n\n /**\n * @dev Emitted when the existing owner is removed\n * @param account account address\n * @param owner owner address\n */\n event AccountOwnerRemoved(\n address account,\n address owner\n );\n\n /**\n * @dev Emitted when the call is refunded\n * @param account account address\n * @param beneficiary beneficiary address\n * @param token token address\n * @param value value\n */\n event AccountCallRefunded(\n address account,\n address beneficiary,\n address token,\n uint256 value\n );\n\n /**\n * @dev Public constructor\n */\n constructor() public Initializable() {}\n\n // external functions\n\n /**\n * @notice Initializes `PersonalAccountRegistry` contract\n * @param guardians_ array of guardians addresses\n * @param accountImplementation_ account implementation address\n * @param gateway_ `Gateway` contract address\n */\n function initialize(\n address[] calldata guardians_,\n address accountImplementation_,\n address gateway_\n )\n external\n onlyInitializer\n {\n // Guarded\n _initializeGuarded(guardians_);\n\n // AccountController\n _initializeAccountController(address(this), accountImplementation_);\n\n // GatewayRecipient\n _initializeGatewayRecipient(gateway_);\n }\n\n /**\n * @notice Upgrades `PersonalAccountRegistry` contract\n * @param accountImplementation_ account implementation address\n */\n function upgrade(\n address accountImplementation_\n )\n external\n onlyGuardian\n {\n _setAccountImplementation(accountImplementation_, true);\n }\n\n /**\n * @notice Deploys account\n * @param account account address\n */\n function deployAccount(\n address account\n )\n external\n {\n _verifySender(account);\n _deployAccount(account);\n }\n\n /**\n * @notice Upgrades account\n * @param account account address\n */\n function upgradeAccount(\n address account\n )\n external\n {\n _verifySender(account);\n _upgradeAccount(account, true);\n }\n\n /**\n * @notice Adds a new account owner\n * @param account account address\n * @param owner owner address\n */\n function addAccountOwner(\n address account,\n address owner\n )\n external\n {\n _verifySender(account);\n\n require(\n owner != address(0),\n \"PersonalAccountRegistry: cannot add 0x0 owner\"\n );\n\n require(\n !accounts[account].owners[owner].verifyAtCurrentBlock(),\n \"PersonalAccountRegistry: owner already exists\"\n );\n\n accounts[account].owners[owner].added = true;\n accounts[account].owners[owner].removedAtBlockNumber = 0;\n\n emit AccountOwnerAdded(\n account,\n owner\n );\n }\n\n /**\n * @notice Removes the existing account owner\n * @param account account address\n * @param owner owner address\n */\n function removeAccountOwner(\n address account,\n address owner\n )\n external\n {\n address sender = _verifySender(account);\n\n require(\n owner != sender,\n \"PersonalAccountRegistry: cannot remove self\"\n );\n\n require(\n accounts[account].owners[owner].verifyAtCurrentBlock(),\n \"PersonalAccountRegistry: owner doesn't exist\"\n );\n\n accounts[account].owners[owner].removedAtBlockNumber = block.number;\n\n emit AccountOwnerRemoved(\n account,\n owner\n );\n }\n\n /**\n * @notice Executes account transaction\n * @dev Deploys an account if not deployed yet\n * @param account account address\n * @param to to address\n * @param value value\n * @param data data\n */\n function executeAccountTransaction(\n address account,\n address to,\n uint256 value,\n bytes calldata data\n )\n external\n {\n _verifySender(account);\n\n _deployAccount(account);\n\n _executeAccountTransaction(\n account,\n to,\n value,\n data,\n true\n );\n }\n\n /**\n * @notice Refunds account call\n * @dev Deploys an account if not deployed yet\n * @param account account address\n * @param token token address\n * @param value value\n */\n function refundAccountCall(\n address account,\n address token,\n uint256 value\n )\n external\n {\n _verifySender(account);\n\n _deployAccount(account);\n\n /* solhint-disable avoid-tx-origin */\n\n if (token == address(0)) {\n _executeAccountTransaction(\n account,\n tx.origin,\n value,\n new bytes(0),\n false\n );\n } else {\n bytes memory response = _executeAccountTransaction(\n account,\n token,\n 0,\n abi.encodeWithSelector(\n ERC20Token(token).transfer.selector,\n tx.origin,\n value\n ),\n false\n );\n\n if (response.length > 0) {\n require(\n abi.decode(response, (bool)),\n \"PersonalAccountRegistry: ERC20Token transfer reverted\"\n );\n }\n }\n\n emit AccountCallRefunded(\n account,\n tx.origin,\n token,\n value\n );\n\n /* solhint-enable avoid-tx-origin */\n }\n\n // external functions (views)\n\n /**\n * @notice Computes account address\n * @param saltOwner salt owner address\n * @return account address\n */\n function computeAccountAddress(\n address saltOwner\n )\n external\n view\n returns (address)\n {\n return _computeAccountAddress(saltOwner);\n }\n\n /**\n * @notice Checks if account is deployed\n * @param account account address\n * @return true when account is deployed\n */\n function isAccountDeployed(\n address account\n )\n external\n view\n returns (bool)\n {\n return accounts[account].deployed;\n }\n\n /**\n * @notice Verifies the owner of the account at the current block\n * @param account account address\n * @param owner owner address\n * @return true on correct account owner\n */\n function verifyAccountOwner(\n address account,\n address owner\n )\n external\n view\n returns (bool)\n {\n return _verifyAccountOwner(account, owner);\n }\n\n /**\n * @notice Verifies the owner of the account at a specific block\n * @param account account address\n * @param owner owner address\n * @param blockNumber block number to verify\n * @return true on correct account owner\n */\n function verifyAccountOwnerAtBlock(\n address account,\n address owner,\n uint256 blockNumber\n )\n external\n view\n returns (bool)\n {\n bool result = false;\n\n if (_verifyAccountOwner(account, owner)) {\n result = true;\n } else {\n result = accounts[account].owners[owner].verifyAtBlock(blockNumber);\n }\n\n return result;\n }\n\n /**\n * @notice Verifies account signature\n * @param account account address\n * @param messageHash message hash\n * @param signature signature\n * @return magic hash if valid\n */\n function isValidAccountSignature(\n address account,\n bytes32 messageHash,\n bytes calldata signature\n )\n override\n external\n view\n returns (bool)\n {\n return _verifyAccountOwner(\n account,\n messageHash.recoverAddress(signature)\n );\n }\n\n /**\n * @notice Verifies account signature\n * @param account account address\n * @param message message\n * @param signature signature\n * @return magic hash if valid\n */\n function isValidAccountSignature(\n address account,\n bytes calldata message,\n bytes calldata signature\n )\n override\n external\n view\n returns (bool)\n {\n return _verifyAccountOwner(\n account,\n message.toEthereumSignedMessageHash().recoverAddress(signature)\n );\n }\n\n // private functions\n\n function _verifySender(\n address account\n )\n private\n returns (address)\n {\n address sender = _getContextSender();\n\n if (accounts[account].owners[sender].added) {\n require(\n accounts[account].owners[sender].removedAtBlockNumber == 0,\n \"PersonalAccountRegistry: sender is not the account owner\"\n );\n } else {\n require(\n accounts[account].salt == 0,\n \"PersonalAccountRegistry: sender is not the account owner\"\n );\n\n bytes32 salt = keccak256(\n abi.encodePacked(sender)\n );\n\n require(\n account == _computeAccountAddress(salt),\n \"PersonalAccountRegistry: sender is not the account owner\"\n );\n\n accounts[account].salt = salt;\n accounts[account].owners[sender].added = true;\n\n emit AccountOwnerAdded(\n account,\n sender\n );\n }\n\n return sender;\n }\n\n function _deployAccount(\n address account\n )\n internal\n {\n if (!accounts[account].deployed) {\n _deployAccount(\n accounts[account].salt,\n true\n );\n\n accounts[account].deployed = true;\n }\n }\n\n // private functions (views)\n\n function _computeAccountAddress(\n address saltOwner\n )\n private\n view\n returns (address)\n {\n bytes32 salt = keccak256(\n abi.encodePacked(saltOwner)\n );\n\n return _computeAccountAddress(salt);\n }\n\n function _verifyAccountOwner(\n address account,\n address owner\n )\n private\n view\n returns (bool)\n {\n bool result;\n\n if (accounts[account].owners[owner].added) {\n result = accounts[account].owners[owner].removedAtBlockNumber == 0;\n } else if (accounts[account].salt == 0) {\n result = account == _computeAccountAddress(owner);\n }\n\n return result;\n }\n}\n" + }, + "src/gateway/GatewayRecipient.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../common/libs/BytesLib.sol\";\n\n\n/**\n * @title Gateway recipient\n *\n * @notice Gateway target contract\n *\n * @author Stanisław Głogowski \n */\ncontract GatewayRecipient {\n using BytesLib for bytes;\n\n address public gateway;\n\n /**\n * @dev internal constructor\n */\n constructor() internal {}\n\n // internal functions\n\n /**\n * @notice Initializes `GatewayRecipient` contract\n * @param gateway_ `Gateway` contract address\n */\n function _initializeGatewayRecipient(\n address gateway_\n )\n internal\n {\n gateway = gateway_;\n }\n\n // internal functions (views)\n\n /**\n * @notice Gets gateway context account\n * @return context account address\n */\n function _getContextAccount()\n internal\n view\n returns (address)\n {\n return _getContextAddress(40);\n }\n\n /**\n * @notice Gets gateway context sender\n * @return context sender address\n */\n function _getContextSender()\n internal\n view\n returns (address)\n {\n return _getContextAddress(20);\n }\n\n /**\n * @notice Gets gateway context data\n * @return context data\n */\n function _getContextData()\n internal\n view\n returns (bytes calldata)\n {\n bytes calldata result;\n\n if (_isGatewaySender()) {\n result = msg.data[:msg.data.length - 40];\n } else {\n result = msg.data;\n }\n\n return result;\n }\n\n // private functions (views)\n\n function _getContextAddress(\n uint256 offset\n )\n private\n view\n returns (address)\n {\n address result = address(0);\n\n if (_isGatewaySender()) {\n uint from = msg.data.length - offset;\n result = bytes(msg.data[from:from + 20]).toAddress();\n } else {\n result = msg.sender;\n }\n\n return result;\n }\n\n function _isGatewaySender()\n private\n view\n returns (bool)\n {\n bool result;\n\n if (msg.sender == gateway) {\n require(\n msg.data.length >= 44,\n \"GatewayRecipient: invalid msg.data\"\n );\n\n result = true;\n }\n\n return result;\n }\n}\n" + }, + "src/common/libs/BlockLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Block library\n *\n * @author Stanisław Głogowski \n */\nlibrary BlockLib {\n struct BlockRelated {\n bool added;\n uint256 removedAtBlockNumber;\n }\n\n /**\n * @notice Verifies self struct at current block\n * @param self self struct\n * @return true on correct self struct\n */\n function verifyAtCurrentBlock(\n BlockRelated memory self\n )\n internal\n view\n returns (bool)\n {\n return verifyAtBlock(self, block.number);\n }\n\n /**\n * @notice Verifies self struct at any block\n * @param self self struct\n * @return true on correct self struct\n */\n function verifyAtAnyBlock(\n BlockRelated memory self\n )\n internal\n pure\n returns (bool)\n {\n return verifyAtBlock(self, 0);\n }\n\n /**\n * @notice Verifies self struct at specific block\n * @param self self struct\n * @param blockNumber block number to verify\n * @return true on correct self struct\n */\n function verifyAtBlock(\n BlockRelated memory self,\n uint256 blockNumber\n )\n internal\n pure\n returns (bool)\n {\n bool result = false;\n\n if (self.added) {\n if (self.removedAtBlockNumber == 0) {\n result = true;\n } else if (blockNumber == 0) {\n result = true;\n } else {\n result = self.removedAtBlockNumber > blockNumber;\n }\n }\n\n return result;\n }\n}\n" + }, + "src/common/account/AccountController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"./Account.sol\";\n\n\n/**\n * @title Account controller\n *\n * @dev Contract module which provides Account deployment mechanism\n *\n * @author Stanisław Głogowski \n */\ncontract AccountController {\n address public accountRegistry;\n address public accountImplementation;\n\n // events\n\n /**\n * @dev Emitted when the account registry is updated\n * @param accountRegistry account registry address\n */\n event AccountRegistryUpdated(\n address accountRegistry\n );\n\n /**\n * @dev Emitted when the account implementation is updated\n * @param accountImplementation account implementation address\n */\n event AccountImplementationUpdated(\n address accountImplementation\n );\n\n /**\n * @dev Emitted when the account is deployed\n * @param account account address\n * @param accountImplementation account implementation address\n */\n event AccountDeployed(\n address account,\n address accountImplementation\n );\n\n /**\n * @dev Emitted when the account is upgraded\n * @param account account address\n * @param accountImplementation account implementation address\n */\n event AccountUpgraded(\n address account,\n address accountImplementation\n );\n\n /**\n * @dev Emitted when the transaction is executed\n * @param account account address\n * @param to to address\n * @param value value\n * @param data data\n * @param response response\n */\n event AccountTransactionExecuted(\n address account,\n address to,\n uint256 value,\n bytes data,\n bytes response\n );\n\n /**\n * @dev Internal constructor\n */\n constructor() internal {}\n\n // internal functions\n\n /**\n * @notice Initializes `AccountController` contract\n * @param accountRegistry_ account registry address\n * @param accountImplementation_ account implementation address\n */\n function _initializeAccountController(\n address accountRegistry_,\n address accountImplementation_\n )\n internal\n {\n _setAccountRegistry(accountRegistry_, false);\n _setAccountImplementation(accountImplementation_, false);\n }\n\n /**\n * @notice Sets account registry\n * @param accountRegistry_ account registry address\n * @param emitEvent it will emit event when flag is set to true\n */\n function _setAccountRegistry(\n address accountRegistry_,\n bool emitEvent\n )\n internal\n {\n require(\n accountRegistry_ != address(0),\n \"AccountController: cannot set account registry to 0x0\"\n );\n\n accountRegistry = accountRegistry_;\n\n if (emitEvent) {\n emit AccountRegistryUpdated(accountRegistry);\n }\n }\n\n /**\n * @notice Sets account implementation\n * @param accountImplementation_ account implementation address\n * @param emitEvent it will emit event when flag is set to true\n */\n function _setAccountImplementation(\n address accountImplementation_,\n bool emitEvent\n )\n internal\n {\n require(\n accountImplementation_ != address(0),\n \"AccountController: cannot set account Implementation to 0x0\"\n );\n\n accountImplementation = accountImplementation_;\n\n if (emitEvent) {\n emit AccountImplementationUpdated(accountImplementation);\n }\n }\n\n /**\n * @notice Deploys account\n * @param salt CREATE2 salt\n * @param emitEvent it will emit event when flag is set to true\n * @return account address\n */\n function _deployAccount(\n bytes32 salt,\n bool emitEvent\n )\n internal\n returns (address)\n {\n address account = address(new Account{salt: salt}(\n accountRegistry,\n accountImplementation\n ));\n\n if (emitEvent) {\n emit AccountDeployed(\n account,\n accountImplementation\n );\n }\n\n return account;\n }\n\n /**\n * @notice Upgrades account\n * @param account account address\n * @param emitEvent it will emit event when flag is set to true\n */\n function _upgradeAccount(\n address account,\n bool emitEvent\n )\n internal\n {\n require(\n Account(payable(account)).implementation() != accountImplementation,\n \"AccountController: account already upgraded\"\n );\n\n Account(payable(account)).setImplementation(accountImplementation);\n\n if (emitEvent) {\n emit AccountUpgraded(\n account,\n accountImplementation\n );\n }\n }\n\n /**\n * @notice Executes transaction from the account\n * @param account account address\n * @param to to address\n * @param value value\n * @param data data\n * @param emitEvent it will emit event when flag is set to true\n * @return transaction result\n */\n function _executeAccountTransaction(\n address account,\n address to,\n uint256 value,\n bytes memory data,\n bool emitEvent\n )\n internal\n returns (bytes memory)\n {\n require(\n to != address(0),\n \"AccountController: cannot send to 0x0\"\n );\n\n require(\n to != address(this),\n \"AccountController: cannot send to controller\"\n );\n\n require(\n to != account,\n \"AccountController: cannot send to self\"\n );\n\n bytes memory response = Account(payable(account)).executeTransaction(\n to,\n value,\n data\n );\n\n if (emitEvent) {\n emit AccountTransactionExecuted(\n account,\n to,\n value,\n data,\n response\n );\n }\n\n return response;\n }\n\n // internal functions (views)\n\n /**\n * @notice Computes account CREATE2 address\n * @param salt CREATE2 salt\n * @return account address\n */\n function _computeAccountAddress(\n bytes32 salt\n )\n internal\n view\n returns (address)\n {\n bytes memory creationCode = abi.encodePacked(\n type(Account).creationCode,\n bytes12(0),\n accountRegistry,\n bytes12(0),\n accountImplementation\n );\n\n bytes32 data = keccak256(\n abi.encodePacked(\n bytes1(0xff),\n address(this),\n salt,\n keccak256(creationCode)\n )\n );\n\n return address(uint160(uint256(data)));\n }\n}\n" + }, + "src/common/account/AccountRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"./Account.sol\";\n\n\n/**\n * @title Account registry\n *\n * @author Stanisław Głogowski \n */\nabstract contract AccountRegistry {\n /**\n * @notice Verifies account signature\n * @param account account address\n * @param messageHash message hash\n * @param signature signature\n * @return true if valid\n */\n function isValidAccountSignature(\n address account,\n bytes32 messageHash,\n bytes calldata signature\n )\n virtual\n external\n view\n returns (bool);\n\n /**\n * @notice Verifies account signature\n * @param account account address\n * @param message message\n * @param signature signature\n * @return true if valid\n */\n function isValidAccountSignature(\n address account,\n bytes calldata message,\n bytes calldata signature\n )\n virtual\n external\n view\n returns (bool);\n}\n" + }, + "src/common/libs/ECDSAExtendedLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"./StringsLib.sol\";\n\n\n/**\n * @title ECDSA extended library\n */\nlibrary ECDSAExtendedLib {\n using StringsLib for uint;\n\n function toEthereumSignedMessageHash(\n bytes memory message\n )\n internal\n pure\n returns (bytes32)\n {\n return keccak256(abi.encodePacked(\n \"\\x19Ethereum Signed Message:\\n\",\n message.length.toString(),\n abi.encodePacked(message)\n ));\n }\n}\n" + }, + "src/common/account/Account.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../access/Controlled.sol\";\nimport \"./AccountBase.sol\";\n\n\n/**\n * @title Account\n *\n * @author Stanisław Głogowski \n */\ncontract Account is Controlled, AccountBase {\n address public implementation;\n\n /**\n * @dev Public constructor\n * @param registry_ account registry address\n * @param implementation_ account implementation address\n */\n constructor(\n address registry_,\n address implementation_\n )\n public\n Controlled()\n {\n registry = registry_;\n implementation = implementation_;\n }\n\n // external functions\n\n /**\n * @notice Payable receive\n */\n receive()\n external\n payable\n {\n //\n }\n\n /**\n * @notice Fallback\n */\n // solhint-disable-next-line payable-fallback\n fallback()\n external\n {\n if (msg.data.length != 0) {\n address implementation_ = implementation;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let calldedatasize := calldatasize()\n\n calldatacopy(0, 0, calldedatasize)\n\n let result := delegatecall(gas(), implementation_, 0, calldedatasize, 0, 0)\n let returneddatasize := returndatasize()\n\n returndatacopy(0, 0, returneddatasize)\n\n switch result\n case 0 { revert(0, returneddatasize) }\n default { return(0, returneddatasize) }\n }\n }\n }\n\n /**\n * @notice Sets implementation\n * @param implementation_ implementation address\n */\n function setImplementation(\n address implementation_\n )\n external\n onlyController\n {\n implementation = implementation_;\n }\n\n /**\n * @notice Executes transaction\n * @param to to address\n * @param value value\n * @param data data\n * @return transaction result\n */\n function executeTransaction(\n address to,\n uint256 value,\n bytes calldata data\n )\n external\n onlyController\n returns (bytes memory)\n {\n bytes memory result;\n bool succeeded;\n\n // solhint-disable-next-line avoid-call-value, avoid-low-level-calls\n (succeeded, result) = payable(to).call{value: value}(data);\n\n require(\n succeeded,\n \"Account: transaction reverted\"\n );\n\n return result;\n }\n}\n" + }, + "src/common/account/AccountBase.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Account base\n *\n * @author Stanisław Głogowski \n */\ncontract AccountBase {\n address public registry;\n}\n" + }, + "src/common/libs/StringsLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Strings library\n *\n * @dev Based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.3.0/contracts/utils/Strings.sol#L12\n */\nlibrary StringsLib {\n function toString(\n uint256 value\n )\n internal\n pure\n returns (string memory)\n {\n if (value == 0) {\n return \"0\";\n }\n\n uint256 temp = value;\n uint256 digits;\n\n while (temp != 0) {\n digits++;\n temp /= 10;\n }\n\n bytes memory buffer = new bytes(digits);\n uint256 index = digits - 1;\n temp = value;\n\n while (temp != 0) {\n buffer[index--] = byte(uint8(48 + temp % 10));\n temp /= 10;\n }\n\n return string(buffer);\n }\n}\n" + }, + "src/common/libs/BytesLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Bytes library\n *\n * @author Stanisław Głogowski \n */\nlibrary BytesLib {\n /**\n * @notice Converts bytes to address\n * @param data data\n * @return address\n */\n function toAddress(\n bytes memory data\n )\n internal\n pure\n returns (address)\n {\n address result;\n\n require(\n data.length == 20,\n \"BytesLib: invalid data length\"\n );\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n result := div(mload(add(data, 0x20)), 0x1000000000000000000000000)\n }\n\n return result;\n }\n}\n" + }, + "src/tokens/WrappedWeiToken.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../common/lifecycle/Initializable.sol\";\nimport \"../common/token/ERC20Token.sol\";\nimport \"../gateway/GatewayRecipient.sol\";\n\n\n/**\n * @title Wrapped wei token\n *\n * @notice One to one wei consumable ERC20 token\n *\n * @dev After the transfer to consumer's account is done, the token will be automatically burned and withdrawn.\n *\n * Use `startConsuming` to become a consumer.\n *\n * @author Stanisław Głogowski \n */\ncontract WrappedWeiToken is Initializable, ERC20Token, GatewayRecipient {\n mapping(address => bool) private consumers;\n\n // events\n\n /**\n * @dev Emitted when the new consumer is added\n * @param consumer consumer address\n */\n event ConsumerAdded(\n address consumer\n );\n\n /**\n * @dev Emitted when the existing consumer is removed\n * @param consumer consumer address\n */\n event ConsumerRemoved(\n address consumer\n );\n\n /**\n * @dev Public constructor\n */\n constructor()\n public\n Initializable()\n {\n name = \"Wrapped Wei\";\n symbol = \"WWEI\";\n }\n\n /**\n * @notice Receive fallback\n */\n receive()\n external\n payable\n {\n _mint(_getSender(), msg.value);\n }\n\n // external functions\n\n /**\n * @notice Initializes `WrappedWeiToken` contract\n * @param consumers_ array of consumers addresses\n * @param gateway_ `Gateway` contract address\n */\n function initialize(\n address[] calldata consumers_,\n address gateway_\n )\n external\n onlyInitializer\n {\n if (consumers_.length != 0) {\n uint consumersLen = consumers_.length;\n for (uint i = 0; i < consumersLen; i++) {\n _addConsumer(consumers_[i]);\n }\n }\n\n _initializeGatewayRecipient(gateway_);\n }\n\n /**\n * @notice Starts consuming\n * @dev Add caller as a consumer\n */\n function startConsuming()\n external\n {\n _addConsumer(_getSender());\n }\n\n /**\n * @notice Stops consuming\n * @dev Remove caller from consumers\n */\n function stopConsuming()\n external\n {\n address consumer = _getSender();\n\n require(\n consumers[consumer],\n \"WrappedWeiToken: consumer doesn't exist\"\n );\n\n consumers[consumer] = false;\n\n emit ConsumerRemoved(consumer);\n }\n\n /**\n * @notice Deposits `msg.value` to address\n * @param to to address\n */\n function depositTo(\n address to\n )\n external\n payable\n {\n _mint(to, msg.value);\n }\n\n /**\n * @notice Withdraws\n * @param value value to withdraw\n */\n function withdraw(\n uint256 value\n )\n external\n {\n _withdraw(_getSender(), _getSender(), value);\n }\n\n /**\n * @notice Withdraws to address\n * @param to to address\n * @param value value to withdraw\n */\n function withdrawTo(\n address to,\n uint256 value\n )\n external\n {\n _withdraw(_getSender(), to, value);\n }\n\n /**\n * @notice Withdraws all\n */\n function withdrawAll()\n external\n {\n address sender = _getSender();\n\n _withdraw(sender, sender, balances[sender]);\n }\n\n /**\n * @notice Withdraws all to address\n * @param to to address\n */\n function withdrawAllTo(\n address to\n )\n external\n {\n address sender = _getSender();\n\n _withdraw(sender, to, balances[sender]);\n }\n\n // external functions (views)\n\n /**\n * @notice Checks if consumer exists\n * @param consumer consumer address\n * @return true if consumer exists\n */\n function isConsumer(\n address consumer\n )\n external\n view\n returns (bool)\n {\n return consumers[consumer];\n }\n\n // internal functions\n\n function _transfer(\n address from,\n address to,\n uint256 value\n )\n override\n internal\n {\n if (consumers[to]) {\n _withdraw(from, to, value);\n } else {\n super._transfer(from, to, value);\n }\n }\n\n // internal functions (views)\n\n function _getSender()\n override\n internal\n view\n returns (address)\n {\n return _getContextAccount();\n }\n\n // private functions\n\n function _addConsumer(\n address consumer\n )\n private\n {\n require(\n !consumers[consumer],\n \"WrappedWeiToken: consumer already exists\"\n );\n\n consumers[consumer] = true;\n\n emit ConsumerAdded(consumer);\n }\n\n function _withdraw(\n address from,\n address to,\n uint256 value\n )\n private\n {\n _burn(from, value);\n\n require(\n // solhint-disable-next-line check-send-result\n payable(to).send(value),\n \"WrappedWeiToken: transaction reverted\"\n );\n }\n}\n" + }, + "src/gateway/Gateway.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\npragma experimental ABIEncoderV2;\n\nimport \"../common/libs/ECDSALib.sol\";\nimport \"../common/libs/SafeMathLib.sol\";\nimport \"../common/lifecycle/Initializable.sol\";\nimport \"../common/signature/SignatureValidator.sol\";\nimport \"../external/ExternalAccountRegistry.sol\";\nimport \"../personal/PersonalAccountRegistry.sol\";\n\n\n/**\n * @title Gateway\n *\n * @notice GSN replacement\n *\n * @author Stanisław Głogowski \n */\ncontract Gateway is Initializable, SignatureValidator {\n using ECDSALib for bytes32;\n using SafeMathLib for uint256;\n\n struct DelegatedBatch {\n address account;\n uint256 nonce;\n address[] to;\n bytes[] data;\n }\n\n struct DelegatedBatchWithGasPrice {\n address account;\n uint256 nonce;\n address[] to;\n bytes[] data;\n uint256 gasPrice;\n }\n\n bytes32 private constant HASH_PREFIX_DELEGATED_BATCH = keccak256(\n \"DelegatedBatch(address account,uint256 nonce,address[] to,bytes[] data)\"\n );\n\n bytes32 private constant HASH_PREFIX_DELEGATED_BATCH_WITH_GAS_PRICE = keccak256(\n \"DelegatedBatchWithGasPrice(address account,uint256 nonce,address[] to,bytes[] data,uint256 gasPrice)\"\n );\n\n ExternalAccountRegistry public externalAccountRegistry;\n PersonalAccountRegistry public personalAccountRegistry;\n\n mapping(address => uint256) private accountNonce;\n\n // events\n\n /**\n * @dev Emitted when the single batch is delegated\n * @param sender sender address\n * @param batch batch\n * @param succeeded if succeeded\n */\n event BatchDelegated(\n address sender,\n bytes batch,\n bool succeeded\n );\n\n /**\n * @dev Public constructor\n */\n constructor() public Initializable() SignatureValidator() {}\n\n // external functions\n\n /**\n * @notice Initializes `Gateway` contract\n * @param externalAccountRegistry_ `ExternalAccountRegistry` contract address\n * @param personalAccountRegistry_ `PersonalAccountRegistry` contract address\n */\n function initialize(\n ExternalAccountRegistry externalAccountRegistry_,\n PersonalAccountRegistry personalAccountRegistry_\n )\n external\n onlyInitializer\n {\n externalAccountRegistry = externalAccountRegistry_;\n personalAccountRegistry = personalAccountRegistry_;\n }\n\n // public functions\n\n /**\n * @notice Sends batch\n * @dev `GatewayRecipient` context api:\n * `_getContextAccount` will return `msg.sender`\n * `_getContextSender` will return `msg.sender`\n *\n * @param to array of batch recipients contracts\n * @param data array of batch data\n */\n function sendBatch(\n address[] memory to,\n bytes[] memory data\n )\n public\n {\n _sendBatch(\n msg.sender,\n msg.sender,\n to,\n data\n );\n }\n\n /**\n * @notice Sends batch from the account\n * @dev `GatewayRecipient` context api:\n * `_getContextAccount` will return `account` arg\n * `_getContextSender` will return `msg.sender`\n *\n * @param account account address\n * @param to array of batch recipients contracts\n * @param data array of batch data\n */\n function sendBatchFromAccount(\n address account,\n address[] memory to,\n bytes[] memory data\n )\n public\n {\n _sendBatch(\n account,\n msg.sender,\n to,\n data\n );\n }\n\n /**\n * @notice Delegates batch from the account\n * @dev Use `hashDelegatedBatch` to create sender message payload.\n *\n * `GatewayRecipient` context api:\n * `_getContextAccount` will return `account` arg\n * `_getContextSender` will return recovered address from `senderSignature` arg\n *\n * @param account account address\n * @param nonce next account nonce\n * @param to array of batch recipients contracts\n * @param data array of batch data\n * @param senderSignature sender signature\n */\n function delegateBatch(\n address account,\n uint256 nonce,\n address[] memory to,\n bytes[] memory data,\n bytes memory senderSignature\n )\n public\n {\n require(\n nonce > accountNonce[account],\n \"Gateway: nonce is lower than current account nonce\"\n );\n\n address sender = _hashDelegatedBatch(\n account,\n nonce,\n to,\n data\n ).recoverAddress(senderSignature);\n\n accountNonce[account] = nonce;\n\n _sendBatch(\n account,\n sender,\n to,\n data\n );\n }\n\n /**\n * @notice Delegates batch from the account (with gas price)\n *\n * @dev Use `hashDelegatedBatchWithGasPrice` to create sender message payload (tx.gasprice as gasPrice)\n *\n * `GatewayRecipient` context api:\n * `_getContextAccount` will return `account` arg\n * `_getContextSender` will return recovered address from `senderSignature` arg\n *\n * @param account account address\n * @param nonce next account nonce\n * @param to array of batch recipients contracts\n * @param data array of batch data\n * @param senderSignature sender signature\n */\n function delegateBatchWithGasPrice(\n address account,\n uint256 nonce,\n address[] memory to,\n bytes[] memory data,\n bytes memory senderSignature\n )\n public\n {\n require(\n nonce > accountNonce[account],\n \"Gateway: nonce is lower than current account nonce\"\n );\n\n address sender = _hashDelegatedBatchWithGasPrice(\n account,\n nonce,\n to,\n data,\n tx.gasprice\n ).recoverAddress(senderSignature);\n\n accountNonce[account] = nonce;\n\n _sendBatch(\n account,\n sender,\n to,\n data\n );\n }\n\n /**\n * @notice Delegates multiple batches\n * @dev It will revert when all batches fail\n * @param batches array of batches\n * @param revertOnFailure reverts on any error\n */\n function delegateBatches(\n bytes[] memory batches,\n bool revertOnFailure\n )\n public\n {\n require(\n batches.length > 0,\n \"Gateway: cannot delegate empty batches\"\n );\n\n bool anySucceeded;\n\n for (uint256 i = 0; i < batches.length; i++) {\n // solhint-disable-next-line avoid-low-level-calls\n (bool succeeded,) = address(this).call(batches[i]);\n\n if (revertOnFailure) {\n require(\n succeeded,\n \"Gateway: batch reverted\"\n );\n } else if (succeeded && !anySucceeded) {\n anySucceeded = true;\n }\n\n emit BatchDelegated(\n msg.sender,\n batches[i],\n succeeded\n );\n }\n\n if (!anySucceeded) {\n revert(\"Gateway: all batches reverted\");\n }\n }\n\n // public functions (views)\n\n /**\n * @notice Hashes `DelegatedBatch` message payload\n * @param delegatedBatch struct\n * @return hash\n */\n function hashDelegatedBatch(\n DelegatedBatch memory delegatedBatch\n )\n public\n view\n returns (bytes32)\n {\n return _hashDelegatedBatch(\n delegatedBatch.account,\n delegatedBatch.nonce,\n delegatedBatch.to,\n delegatedBatch.data\n );\n }\n\n /**\n * @notice Hashes `DelegatedBatchWithGasPrice` message payload\n * @param delegatedBatch struct\n * @return hash\n */\n function hashDelegatedBatchWithGasPrice(\n DelegatedBatchWithGasPrice memory delegatedBatch\n )\n public\n view\n returns (bytes32)\n {\n return _hashDelegatedBatchWithGasPrice(\n delegatedBatch.account,\n delegatedBatch.nonce,\n delegatedBatch.to,\n delegatedBatch.data,\n delegatedBatch.gasPrice\n );\n }\n\n // external functions (views)\n\n /**\n * @notice Gets next account nonce\n * @param account account address\n * @return next nonce\n */\n function getAccountNextNonce(\n address account\n )\n external\n view\n returns (uint256)\n {\n return accountNonce[account].add(1);\n }\n\n // private functions\n\n function _sendBatch(\n address account,\n address sender,\n address[] memory to,\n bytes[] memory data\n )\n private\n {\n require(\n account != address(0),\n \"Gateway: cannot send from 0x0 account\"\n );\n require(\n to.length > 0,\n \"Gateway: cannot send empty batch\"\n );\n require(\n data.length == to.length,\n \"Gateway: invalid batch\"\n );\n\n if (account != sender) {\n require(\n personalAccountRegistry.verifyAccountOwner(account, sender) ||\n externalAccountRegistry.verifyAccountOwner(account, sender),\n \"Gateway: sender is not the account owner\"\n );\n }\n\n bool succeeded;\n\n for (uint256 i = 0; i < data.length; i++) {\n require(\n to[i] != address(0),\n \"Gateway: cannot send to 0x0\"\n );\n\n // solhint-disable-next-line avoid-low-level-calls\n (succeeded,) = to[i].call(abi.encodePacked(data[i], account, sender));\n\n require(\n succeeded,\n \"Gateway: batch transaction reverted\"\n );\n }\n }\n\n // private functions (views)\n\n function _hashDelegatedBatch(\n address account,\n uint256 nonce,\n address[] memory to,\n bytes[] memory data\n )\n private\n view\n returns (bytes32)\n {\n return _hashMessagePayload(HASH_PREFIX_DELEGATED_BATCH, abi.encodePacked(\n account,\n nonce,\n to,\n _concatBytes(data)\n ));\n }\n\n function _hashDelegatedBatchWithGasPrice(\n address account,\n uint256 nonce,\n address[] memory to,\n bytes[] memory data,\n uint256 gasPrice\n )\n private\n view\n returns (bytes32)\n {\n return _hashMessagePayload(HASH_PREFIX_DELEGATED_BATCH_WITH_GAS_PRICE, abi.encodePacked(\n account,\n nonce,\n to,\n _concatBytes(data),\n gasPrice\n ));\n }\n\n// private functions (pure)\n\n function _concatBytes(bytes[] memory data)\n private\n pure\n returns (bytes memory)\n {\n bytes memory result;\n uint dataLen = data.length;\n\n for (uint i = 0 ; i < dataLen ; i++) {\n result = abi.encodePacked(result, data[i]);\n }\n\n return result;\n }\n}\n" + }, + "src/ens/ENSController.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\npragma experimental ABIEncoderV2;\n\nimport \"../common/access/Guarded.sol\";\nimport \"../common/lifecycle/Initializable.sol\";\nimport \"../common/signature/SignatureValidator.sol\";\nimport \"../gateway/GatewayRecipient.sol\";\nimport \"./resolvers/ENSAddressResolver.sol\";\nimport \"./resolvers/ENSNameResolver.sol\";\nimport \"./resolvers/ENSPubKeyResolver.sol\";\nimport \"./resolvers/ENSTextResolver.sol\";\nimport \"./ENSRegistry.sol\";\n\n\n/**\n * @title ENS controller\n *\n * @notice ENS subnode registrar\n *\n * @dev The process of adding root node consists of 3 steps:\n * 1. `submitNode` - should be called from ENS node owner,\n * 2. Change ENS node owner in ENS registry to ENS controller,\n * 3. `verifyNode` - should be called from previous ENS node owner,\n *\n * To register sub node, `msg.sender` need to send valid signature from one of guardian key.\n * Once registration is complete `msg.sender` becoming both node owner and `addr` record value.\n *\n * After registration sub node cannot be replaced.\n *\n * @author Stanisław Głogowski \n */\ncontract ENSController is Guarded, Initializable, SignatureValidator, GatewayRecipient, ENSAddressResolver, ENSNameResolver, ENSPubKeyResolver, ENSTextResolver {\n struct SubNodeRegistration {\n address account;\n bytes32 node;\n bytes32 label;\n }\n\n bytes4 private constant INTERFACE_META_ID = bytes4(keccak256(abi.encodePacked(\"supportsInterface(bytes4)\")));\n\n bytes32 private constant HASH_PREFIX_SUB_NODE_REGISTRATION = keccak256(\n \"SubNodeRegistration(address account,bytes32 node,bytes32 label)\"\n );\n\n ENSRegistry public registry;\n\n mapping(bytes32 => address) public nodeOwners;\n\n // events\n\n /**\n * @dev Emitted when new node is submitted\n * @param node node name hash\n * @param owner owner address\n */\n event NodeSubmitted(\n bytes32 node,\n address owner\n );\n\n /**\n * @dev Emitted when the existing owner is verified\n * @param node node name hash\n */\n event NodeVerified(\n bytes32 node\n );\n\n /**\n * @dev Emitted when new node is released\n * @param node node name hash\n * @param owner owner address\n */\n event NodeReleased(\n bytes32 node,\n address owner\n );\n\n /**\n * @dev Emitted when ENS registry address is changed\n * @param registry registry address\n */\n event RegistryChanged(\n address registry\n );\n\n /**\n * @dev Public constructor\n */\n constructor() public Guarded() Initializable() SignatureValidator() {}\n\n // external functions\n\n /**\n * @notice Initializes `ENSController` contract\n * @param registry_ ENS registry address\n * @param gateway_ gateway address\n */\n function initialize(\n ENSRegistry registry_,\n address[] calldata guardians_,\n address gateway_\n )\n external\n onlyInitializer\n {\n require(\n address(registry_) != address(0),\n \"ENSController: cannot set 0x0 registry\"\n );\n\n registry = registry_;\n\n // Guarded\n _initializeGuarded(guardians_);\n\n // GatewayRecipient\n _initializeGatewayRecipient(gateway_);\n }\n\n /**\n * @notice Sets registry\n * @param registry_ registry address\n */\n function setRegistry(\n ENSRegistry registry_\n )\n external\n onlyGuardian\n {\n require(\n address(registry_) != address(0),\n \"ENSController: cannot set 0x0 registry\"\n );\n\n require(\n registry_ != registry,\n \"ENSController: registry already set\"\n );\n\n registry = registry_;\n\n emit RegistryChanged(\n address(registry)\n );\n }\n\n /**\n * @notice Submits node\n * @dev Should be called from the current ENS node owner\n * @param node node name hash\n */\n function submitNode(\n bytes32 node\n )\n external\n {\n address owner = _getContextAccount();\n\n require(\n _addr(node) == address(0),\n \"ENSController: node already exists\"\n );\n\n require(\n nodeOwners[node] == address(0),\n \"ENSController: node already submitted\"\n );\n\n require(\n registry.owner(node) == owner,\n \"ENSController: invalid ens node owner\"\n );\n\n nodeOwners[node] = owner;\n\n emit NodeSubmitted(node, owner);\n }\n\n /**\n * @notice Verifies node\n * @dev Should be called from the previous ENS node owner\n * @param node node name hash\n */\n function verifyNode(\n bytes32 node\n )\n external\n {\n address owner = _getContextAccount();\n\n require(\n _addr(node) == address(0),\n \"ENSController: node already exists\"\n );\n\n require(\n nodeOwners[node] == owner,\n \"ENSController: invalid node owner\"\n );\n\n require(\n registry.owner(node) == address(this),\n \"ENSController: invalid ens node owner\"\n );\n\n _setAddr(node, address(this));\n\n registry.setResolver(node, address(this));\n\n emit NodeVerified(node);\n }\n\n /**\n * @notice Releases node\n * @dev Should be called from the previous ENS node owner\n * @param node node name hash\n */\n function releaseNode(\n bytes32 node\n )\n external\n {\n address owner = _getContextAccount();\n\n require(\n _addr(node) == address(this),\n \"ENSController: node doesn't exist\"\n );\n\n require(\n nodeOwners[node] == owner,\n \"ENSController: invalid node owner\"\n );\n\n registry.setOwner(node, owner);\n\n delete nodeOwners[node];\n\n emit NodeReleased(node, owner);\n }\n\n /**\n * @notice Sync address\n * @param node node name hash\n */\n function syncAddr(\n bytes32 node\n )\n external\n {\n address account = _getContextAccount();\n\n require(\n account == registry.owner(node),\n \"ENSController: caller is not the node owner\"\n );\n\n require(\n registry.resolver(node) == address(this),\n \"ENSController: invalid node resolver\"\n );\n\n require(\n _addr(node) == address(0),\n \"ENSController: node already in sync\"\n );\n\n _setAddr(node, account);\n }\n\n /**\n * @notice Registers sub node\n * @param node node name hash\n * @param label label hash\n * @param guardianSignature guardian signature\n */\n function registerSubNode(\n bytes32 node,\n bytes32 label,\n bytes calldata guardianSignature\n )\n external\n {\n address account = _getContextAccount();\n\n bytes32 messageHash = _hashSubNodeRegistration(\n account,\n node,\n label\n );\n\n require(\n _verifyGuardianSignature(messageHash, guardianSignature),\n \"ENSController: invalid guardian signature\"\n );\n\n bytes32 subNode = keccak256(\n abi.encodePacked(\n node,\n label\n )\n );\n\n require(\n _addr(node) == address(this),\n \"ENSController: invalid node\"\n );\n\n require(\n _addr(subNode) == address(0),\n \"ENSController: label already taken\"\n );\n\n registry.setSubnodeRecord(node, label, address(this), address(this), 0);\n registry.setOwner(subNode, account);\n\n _setAddr(subNode, account);\n }\n\n // external functions (pure)\n function supportsInterface(\n bytes4 interfaceID\n )\n external\n pure\n returns(bool)\n {\n return interfaceID == INTERFACE_META_ID ||\n interfaceID == INTERFACE_ADDR_ID ||\n interfaceID == INTERFACE_ADDRESS_ID ||\n interfaceID == INTERFACE_NAME_ID ||\n interfaceID == INTERFACE_PUB_KEY_ID ||\n interfaceID == INTERFACE_TEXT_ID;\n }\n\n // public functions (views)\n\n /**\n * @notice Hashes `SubNodeRegistration` message payload\n * @param subNodeRegistration struct\n * @return hash\n */\n function hashSubNodeRegistration(\n SubNodeRegistration memory subNodeRegistration\n )\n public\n view\n returns (bytes32)\n {\n return _hashSubNodeRegistration(\n subNodeRegistration.account,\n subNodeRegistration.node,\n subNodeRegistration.label\n );\n }\n\n // internal functions (views)\n\n function _isNodeOwner(\n bytes32 node\n )\n internal\n override\n view\n returns (bool)\n {\n return registry.owner(node) == _getContextAccount();\n }\n\n // private functions (views)\n\n function _hashSubNodeRegistration(\n address account,\n bytes32 node,\n bytes32 label\n )\n private\n view\n returns (bytes32)\n {\n return _hashMessagePayload(HASH_PREFIX_SUB_NODE_REGISTRATION, abi.encodePacked(\n account,\n node,\n label\n ));\n }\n}\n" + }, + "src/ens/resolvers/ENSAddressResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"./ENSAbstractResolver.sol\";\n\n\n/**\n * @title ENS abstract address resolver\n *\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/AddrResolver.sol\n */\nabstract contract ENSAddressResolver is ENSAbstractResolver {\n bytes4 internal constant INTERFACE_ADDR_ID = bytes4(keccak256(abi.encodePacked(\"addr(bytes32)\")));\n bytes4 internal constant INTERFACE_ADDRESS_ID = bytes4(keccak256(abi.encodePacked(\"addr(bytes32,uint)\")));\n\n uint internal constant COIN_TYPE_ETH = 60;\n\n mapping(bytes32 => mapping(uint => bytes)) internal resolverAddresses;\n\n // events\n\n event AddrChanged(\n bytes32 indexed node,\n address addr\n );\n\n event AddressChanged(\n bytes32 indexed node,\n uint coinType,\n bytes newAddress\n );\n\n // external functions\n\n function setAddr(\n bytes32 node,\n address addr_\n )\n external\n onlyNodeOwner(node)\n {\n _setAddr(node, addr_);\n }\n\n function setAddr(\n bytes32 node,\n uint coinType,\n bytes memory addr_\n )\n external\n onlyNodeOwner(node)\n {\n _setAddr(node, coinType, addr_);\n }\n\n // external functions (views)\n\n function addr(\n bytes32 node\n )\n external\n view\n returns (address)\n {\n return _addr(node);\n }\n\n function addr(\n bytes32 node,\n uint coinType\n )\n external\n view\n returns (bytes memory)\n {\n return resolverAddresses[node][coinType];\n }\n\n // internal functions\n\n function _setAddr(\n bytes32 node,\n address addr_\n )\n internal\n {\n _setAddr(node, COIN_TYPE_ETH, _addressToBytes(addr_));\n }\n\n function _setAddr(\n bytes32 node,\n uint coinType,\n bytes memory addr_\n )\n internal\n {\n emit AddressChanged(node, coinType, addr_);\n\n if(coinType == COIN_TYPE_ETH) {\n emit AddrChanged(node, _bytesToAddress(addr_));\n }\n\n resolverAddresses[node][coinType] = addr_;\n }\n\n // internal functions (views)\n\n function _addr(\n bytes32 node\n )\n internal\n view\n returns (address)\n {\n address result;\n\n bytes memory addr_ = resolverAddresses[node][COIN_TYPE_ETH];\n\n if (addr_.length > 0) {\n result = _bytesToAddress(addr_);\n }\n\n return result;\n }\n\n // private function (pure)\n\n function _bytesToAddress(\n bytes memory data\n )\n private\n pure\n returns(address payable)\n {\n address payable result;\n\n require(data.length == 20);\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n result := div(mload(add(data, 32)), exp(256, 12))\n }\n\n return result;\n }\n\n function _addressToBytes(\n address addr_\n )\n private\n pure\n returns(bytes memory)\n {\n bytes memory result = new bytes(20);\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n mstore(add(result, 32), mul(addr_, exp(256, 12)))\n }\n\n return result;\n }\n}\n" + }, + "src/ens/resolvers/ENSNameResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"./ENSAbstractResolver.sol\";\n\n\n/**\n * @title ENS abstract name resolver\n *\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/NameResolver.sol\n */\nabstract contract ENSNameResolver is ENSAbstractResolver {\n bytes4 internal constant INTERFACE_NAME_ID = bytes4(keccak256(abi.encodePacked(\"name(bytes32)\")));\n\n mapping(bytes32 => string) internal resolverNames;\n\n // events\n\n event NameChanged(\n bytes32 indexed node,\n string name\n );\n\n // external functions\n\n function setName(\n bytes32 node,\n string calldata name\n )\n external\n onlyNodeOwner(node)\n {\n resolverNames[node] = name;\n\n emit NameChanged(node, name);\n }\n\n // external functions (views)\n\n function name(\n bytes32 node\n )\n external\n view\n returns (string memory)\n {\n return resolverNames[node];\n }\n}\n" + }, + "src/ens/resolvers/ENSPubKeyResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"./ENSAbstractResolver.sol\";\n\n\n/**\n * @title ENS abstract pub key resolver\n *\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/PubkeyResolver.sol\n */\nabstract contract ENSPubKeyResolver is ENSAbstractResolver {\n bytes4 internal constant INTERFACE_PUB_KEY_ID = bytes4(keccak256(abi.encodePacked(\"pubkey(bytes32)\")));\n\n struct PubKey {\n bytes32 x;\n bytes32 y;\n }\n\n mapping(bytes32 => PubKey) internal resolverPubKeys;\n\n // events\n\n event PubkeyChanged(\n bytes32 indexed node,\n bytes32 x,\n bytes32 y\n );\n\n // external functions (views)\n\n function setPubkey(\n bytes32 node,\n bytes32 x,\n bytes32 y\n )\n external\n onlyNodeOwner(node)\n {\n resolverPubKeys[node] = PubKey(x, y);\n\n emit PubkeyChanged(node, x, y);\n }\n\n // external functions (views)\n\n function pubkey(\n bytes32 node\n )\n external\n view\n returns (bytes32 x, bytes32 y)\n {\n return (resolverPubKeys[node].x, resolverPubKeys[node].y);\n }\n}\n" + }, + "src/ens/resolvers/ENSTextResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"./ENSAbstractResolver.sol\";\n\n\n/**\n * @title ENS abstract text resolver\n *\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/profiles/TextResolver.sol\n */\nabstract contract ENSTextResolver is ENSAbstractResolver {\n bytes4 internal constant INTERFACE_TEXT_ID = bytes4(keccak256(abi.encodePacked(\"text(bytes32,string)\")));\n\n mapping(bytes32 => mapping(string => string)) internal resolverTexts;\n\n // events\n\n event TextChanged(\n bytes32 indexed node,\n string indexed indexedKey,\n string key\n );\n\n // external functions (views)\n\n function setText(\n bytes32 node,\n string calldata key,\n string calldata value\n )\n external\n onlyNodeOwner(node)\n {\n resolverTexts[node][key] = value;\n\n emit TextChanged(node, key, key);\n }\n\n // external functions (views)\n\n function text(\n bytes32 node,\n string calldata key\n )\n external\n view\n returns (string memory)\n {\n return resolverTexts[node][key];\n }\n}\n" + }, + "src/ens/ENSRegistry.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title ENS registry\n *\n * @dev Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ENSRegistry.sol\n */\ncontract ENSRegistry {\n struct Record {\n address owner;\n address resolver;\n uint64 ttl;\n }\n\n mapping (bytes32 => Record) private records;\n mapping (address => mapping(address => bool)) private operators;\n\n // events\n\n event NewOwner(\n bytes32 indexed node,\n bytes32 indexed label,\n address owner\n );\n\n event Transfer(\n bytes32 indexed node,\n address owner\n );\n\n event NewResolver(\n bytes32 indexed node,\n address resolver\n );\n\n event NewTTL(\n bytes32 indexed node,\n uint64 ttl\n );\n\n event ApprovalForAll(\n address indexed owner,\n address indexed operator,\n bool approved\n );\n\n // modifiers\n\n modifier authorised(\n bytes32 node\n )\n {\n address owner = records[node].owner;\n\n require(\n owner == msg.sender || operators[owner][msg.sender],\n \"ENSRegistry: reverted by authorised modifier\"\n );\n\n _;\n }\n\n /**\n * @dev Public constructor\n */\n constructor()\n public\n {\n // solhint-disable-next-line avoid-tx-origin\n records[0x0].owner = tx.origin;\n }\n\n // external functions\n\n function setRecord(\n bytes32 node,\n address owner_,\n address resolver_,\n uint64 ttl_\n )\n external\n {\n setOwner(node, owner_);\n\n _setResolverAndTTL(node, resolver_, ttl_);\n }\n\n function setTTL(\n bytes32 node,\n uint64 ttl_\n )\n external\n authorised(node)\n {\n records[node].ttl = ttl_;\n\n emit NewTTL(node, ttl_);\n }\n\n function setSubnodeRecord(\n bytes32 node,\n bytes32 label,\n address owner_,\n address resolver_,\n uint64 ttl_\n )\n external\n {\n bytes32 subNode = setSubnodeOwner(node, label, owner_);\n\n _setResolverAndTTL(subNode, resolver_, ttl_);\n }\n\n function setApprovalForAll(\n address operator,\n bool approved\n )\n external\n {\n operators[msg.sender][operator] = approved;\n\n emit ApprovalForAll(\n msg.sender,\n operator,\n approved\n );\n }\n\n // external functions (views)\n\n function owner(\n bytes32 node\n )\n external\n view\n returns (address)\n {\n address addr = records[node].owner;\n\n if (addr == address(this)) {\n return address(0x0);\n }\n\n return addr;\n }\n\n function resolver(\n bytes32 node\n )\n external\n view\n returns (address)\n {\n return records[node].resolver;\n }\n\n function ttl(\n bytes32 node\n )\n external\n view\n returns (uint64)\n {\n return records[node].ttl;\n }\n\n function recordExists(\n bytes32 node\n )\n external\n view\n returns (bool)\n {\n return records[node].owner != address(0x0);\n }\n\n function isApprovedForAll(\n address owner_,\n address operator\n )\n external\n view\n returns (bool)\n {\n return operators[owner_][operator];\n }\n\n // public functions\n\n function setOwner(\n bytes32 node,\n address owner_\n )\n public\n authorised(node)\n {\n records[node].owner = owner_;\n\n emit Transfer(node, owner_);\n }\n\n function setResolver(\n bytes32 node,\n address resolver_\n )\n public\n authorised(node)\n {\n records[node].resolver = resolver_;\n\n emit NewResolver(node, resolver_);\n }\n\n function setSubnodeOwner(\n bytes32 node,\n bytes32 label,\n address owner_\n )\n public\n authorised(node)\n returns(bytes32)\n {\n bytes32 subNode = keccak256(abi.encodePacked(node, label));\n\n records[subNode].owner = owner_;\n\n emit NewOwner(node, label, owner_);\n\n return subNode;\n }\n\n // private functions\n\n function _setResolverAndTTL(\n bytes32 node,\n address resolver_,\n uint64 ttl_\n )\n private\n {\n if (resolver_ != records[node].resolver) {\n records[node].resolver = resolver_;\n\n emit NewResolver(node, resolver_);\n }\n\n if (ttl_ != records[node].ttl) {\n records[node].ttl = ttl_;\n\n emit NewTTL(node, ttl_);\n }\n }\n}\n" + }, + "src/ens/resolvers/ENSAbstractResolver.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title ENS abstract resolver\n *\n * @dev Base on https://github.com/ensdomains/resolvers/blob/f7d62ab04bfe1692a4344f6f1d31ff81315a98c3/contracts/ResolverBase.sol\n */\nabstract contract ENSAbstractResolver {\n // modifiers\n\n modifier onlyNodeOwner(bytes32 node)\n {\n require(\n _isNodeOwner(node),\n \"ENSAbstractResolver: reverted by onlyNodeOwner modifier\"\n );\n\n _;\n }\n\n // internal functions (views)\n\n function _isNodeOwner(\n bytes32 node\n )\n internal\n virtual\n view\n returns (bool);\n}\n" + }, + "src/ens/ENSReverseRegistrar.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../common/libs/AddressLib.sol\";\nimport \"../common/lifecycle/Initializable.sol\";\nimport \"./resolvers/ENSNameResolver.sol\";\nimport \"./ENSRegistry.sol\";\n\n/**\n * @title ENS reverse registrar\n *\n * @dev Base on https://github.com/ensdomains/ens/blob/ff0f41747c05f1598973b0fe7ad0d9e09565dfcd/contracts/ReverseRegistrar.sol\n */\ncontract ENSReverseRegistrar is Initializable {\n using AddressLib for address;\n\n // namehash('addr.reverse')\n bytes32 public constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\n\n ENSRegistry public registry;\n ENSNameResolver public resolver;\n\n /**\n * @dev Public constructor\n */\n constructor() public Initializable() {}\n\n // external functions\n\n /**\n * @notice Initializes `ENSReverseRegistrar` contract\n * @param registry_ ENS registry address\n * @param resolver_ ENS name resolver address\n */\n function initialize(\n ENSRegistry registry_,\n ENSNameResolver resolver_\n )\n external\n onlyInitializer\n {\n registry = registry_;\n resolver = resolver_;\n }\n\n // external functions\n\n function claim(\n address owner\n )\n public\n returns (bytes32)\n {\n return _claimWithResolver(owner, address(0));\n }\n\n function claimWithResolver(\n address owner,\n address resolver_\n )\n public\n returns (bytes32)\n {\n return _claimWithResolver(owner, resolver_);\n }\n\n function setName(\n string memory name\n )\n public\n returns (bytes32)\n {\n bytes32 node = _claimWithResolver(address(this), address(resolver));\n\n resolver.setName(node, name);\n\n return node;\n }\n\n // external functions (pure)\n\n function node(\n address addr_\n )\n external\n pure\n returns (bytes32)\n {\n return keccak256(abi.encodePacked(ADDR_REVERSE_NODE, addr_.toSha3Hash()));\n }\n\n // private functions\n\n function _claimWithResolver(\n address owner,\n address resolver_\n )\n private\n returns (bytes32)\n {\n bytes32 label = address(msg.sender).toSha3Hash();\n bytes32 node_ = keccak256(abi.encodePacked(ADDR_REVERSE_NODE, label));\n address currentOwner = registry.owner(node_);\n\n if (resolver_ != address(0x0) && resolver_ != registry.resolver(node_)) {\n if (currentOwner != address(this)) {\n registry.setSubnodeOwner(ADDR_REVERSE_NODE, label, address(this));\n currentOwner = address(this);\n }\n\n registry.setResolver(node_, resolver_);\n }\n\n // Update the owner if required\n if (currentOwner != owner) {\n registry.setSubnodeOwner(ADDR_REVERSE_NODE, label, owner);\n }\n\n return node_;\n }\n}\n" + }, + "src/common/libs/AddressLib.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\n/**\n * @title Address library\n */\nlibrary AddressLib {\n /**\n * @notice Converts address into sha3 hash\n * @param self address\n * @return sha3 hash\n */\n function toSha3Hash(\n address self\n )\n internal\n pure\n returns (bytes32)\n {\n bytes32 result;\n\n // solhint-disable-next-line no-inline-assembly\n assembly {\n let lookup := 0x3031323334353637383961626364656600000000000000000000000000000000\n\n for { let i := 40 } gt(i, 0) { } {\n i := sub(i, 1)\n mstore8(i, byte(and(self, 0xf), lookup))\n self := div(self, 0x10)\n i := sub(i, 1)\n mstore8(i, byte(and(self, 0xf), lookup))\n self := div(self, 0x10)\n }\n\n result := keccak256(0, 40)\n }\n\n return result;\n }\n}\n" + }, + "src/ens/ENSHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\npragma experimental ABIEncoderV2;\n\nimport \"../common/lifecycle/Initializable.sol\";\nimport \"./resolvers/ENSAddressResolver.sol\";\nimport \"./resolvers/ENSNameResolver.sol\";\nimport \"./ENSRegistry.sol\";\n\n/**\n * @title ENS helper\n *\n * @author Stanisław Głogowski \n */\ncontract ENSHelper is Initializable {\n ENSRegistry public registry;\n\n /**\n * @dev Public constructor\n */\n constructor() public Initializable() {}\n\n // external functions\n\n /**\n * @notice Initializes `ENSLookupHelper` contract\n * @param registry_ ENS registry address\n */\n function initialize(\n ENSRegistry registry_\n )\n external\n onlyInitializer\n {\n registry = registry_;\n }\n\n // external functions (views)\n\n /**\n * @notice Gets nodes addresses\n * @param nodes array of nodes\n * @return nodes addresses\n */\n function getAddresses(\n bytes32[] memory nodes\n )\n external\n view\n returns (address[] memory)\n {\n uint nodesLen = nodes.length;\n address[] memory result = new address[](nodesLen);\n\n for (uint i = 0; i < nodesLen; i++) {\n result[i] = _getAddress(nodes[i]);\n }\n\n return result;\n }\n\n /**\n * @notice Gets nodes names\n * @param nodes array of nodes\n * @return nodes names\n */\n function getNames(\n bytes32[] memory nodes\n )\n external\n view\n returns (string[] memory)\n {\n uint nodesLen = nodes.length;\n string[] memory result = new string[](nodesLen);\n\n for (uint i = 0; i < nodesLen; i++) {\n result[i] = _getName(nodes[i]);\n }\n\n return result;\n }\n\n // private functions (views)\n\n function _getAddress(\n bytes32 node\n )\n private\n view\n returns (address)\n {\n address result;\n address resolver = registry.resolver(node);\n\n if (resolver != address(0)) {\n try ENSAddressResolver(resolver).addr(node) returns (address addr) {\n result = addr;\n } catch {\n //\n }\n }\n\n return result;\n }\n\n function _getName(\n bytes32 node\n )\n private\n view\n returns (string memory)\n {\n string memory result;\n address resolver = registry.resolver(node);\n\n if (resolver != address(0)) {\n try ENSNameResolver(resolver).name(node) returns (string memory name) {\n result = name;\n } catch {\n //\n }\n }\n\n return result;\n }\n}\n" + }, + "src/common/access/mocks/GuardedMock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../Guarded.sol\";\n\n\n/**\n * @title Guarded mock\n *\n * @dev Used in `Guarded` contract tests\n *\n * @author Stanisław Głogowski \n */\ncontract GuardedMock is Guarded {\n /**\n * @dev Public constructor\n * @param guardians_ array of guardians addresses\n */\n constructor(\n address[] memory guardians_\n )\n public\n {\n _initializeGuarded(guardians_);\n }\n}\n" + }, + "src/common/account/mocks/AccountRegistryMock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../../libs/ECDSALib.sol\";\nimport \"../../libs/ECDSAExtendedLib.sol\";\nimport \"../AccountRegistry.sol\";\n\n\n/**\n * @title Account registry mock\n *\n * @author Stanisław Głogowski \n */\ncontract AccountRegistryMock is AccountRegistry {\n using ECDSALib for bytes32;\n using ECDSAExtendedLib for bytes;\n\n mapping(address => mapping(address => bool)) private mockedAccountsOwners;\n\n // external functions\n\n function mockAccountOwners(\n address account,\n address[] memory owners\n )\n external\n {\n uint ownersLen = owners.length;\n for (uint i = 0; i < ownersLen; i++) {\n mockedAccountsOwners[account][owners[i]] = true;\n }\n }\n\n // external functions (views)\n\n function isValidAccountSignature(\n address account,\n bytes32 messageHash,\n bytes calldata signature\n )\n override\n external\n view\n returns (bool)\n {\n address recovered = messageHash.recoverAddress(signature);\n\n return mockedAccountsOwners[account][recovered];\n }\n\n function isValidAccountSignature(\n address account,\n bytes calldata message,\n bytes calldata signature\n )\n override\n external\n view\n returns (bool)\n {\n address recovered = message.toEthereumSignedMessageHash().recoverAddress(signature);\n\n return mockedAccountsOwners[account][recovered];\n }\n}\n" + }, + "src/common/account/mocks/AccountControllerMock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../AccountController.sol\";\n\n\n/**\n * @title Account controller mock\n *\n * @author Stanisław Głogowski \n */\ncontract AccountControllerMock is AccountController {\n /**\n * @dev Public constructor\n * @param accountRegistry_ account registry address\n * @param accountImplementation_ account implementation address\n */\n constructor(\n address accountRegistry_,\n address accountImplementation_\n )\n public\n AccountController()\n {\n _initializeAccountController(accountRegistry_, accountImplementation_);\n }\n\n // external functions\n\n /**\n * @notice Sets account registry\n * @param accountRegistry_ account registry address\n */\n function setAccountRegistry(\n address accountRegistry_\n )\n external\n {\n _setAccountRegistry(accountRegistry_, true);\n }\n\n /**\n * @notice Sets account implementation\n * @param accountImplementation_ account implementation address\n */\n function setAccountImplementation(\n address accountImplementation_\n )\n external\n {\n _setAccountImplementation(accountImplementation_, true);\n }\n\n /**\n * @notice Deploys account\n * @param salt CREATE2 salt\n */\n function deployAccount(\n bytes32 salt\n )\n external\n {\n _deployAccount(salt, true);\n }\n\n /**\n * @notice Upgrades account\n * @param account account address\n */\n function upgradeAccount(\n address account\n )\n external\n {\n _upgradeAccount(account, true);\n }\n\n /**\n * @notice Executes transaction from the account\n * @param account account address\n * @param to to address\n * @param value value\n * @param data data\n */\n function executeAccountTransaction(\n address account,\n address to,\n uint256 value,\n bytes memory data\n )\n external\n {\n _executeAccountTransaction(account, to, value, data, true);\n }\n\n // external functions (views)\n\n /**\n * @notice Computes account CREATE2 address\n * @param salt CREATE2 salt\n * @return account address\n */\n function computeAccountAddress(\n bytes32 salt\n )\n external\n view\n returns (address)\n {\n return _computeAccountAddress(salt);\n }\n}\n" + }, + "src/common/account/AccountImplementationV1.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../lifecycle/Initializable.sol\";\nimport \"./AccountBase.sol\";\nimport \"./AccountRegistry.sol\";\n\n\n/**\n * @title Account implementation (version 1)\n *\n * @author Stanisław Głogowski \n */\ncontract AccountImplementationV1 is Initializable, AccountBase {\n bytes32 constant private ERC777_TOKENS_RECIPIENT_INTERFACE_HASH = keccak256(abi.encodePacked(\"ERC777TokensRecipient\"));\n bytes32 constant private ERC1820_ACCEPT_MAGIC = keccak256(abi.encodePacked(\"ERC1820_ACCEPT_MAGIC\"));\n\n bytes4 constant private ERC1271_VALID_MESSAGE_HASH_SIGNATURE = bytes4(keccak256(abi.encodePacked(\"isValidSignature(bytes32,bytes)\")));\n bytes4 constant private ERC1271_VALID_MESSAGE_SIGNATURE = bytes4(keccak256(abi.encodePacked(\"isValidSignature(bytes,bytes)\")));\n bytes4 constant private ERC1271_INVALID_SIGNATURE = 0xffffffff;\n\n /**\n * @dev Internal constructor\n */\n constructor() internal Initializable() {}\n\n // external functions\n\n /**\n * @notice Initializes `AccountImplementation` contract\n * @param registry_ registry address\n */\n function initialize(\n address registry_\n )\n external\n onlyInitializer\n {\n registry = registry_;\n }\n\n // external functions (views)\n\n // ERC1820\n\n function canImplementInterfaceForAddress(\n bytes32 interfaceHash,\n address addr\n )\n external\n view\n returns(bytes32)\n {\n bytes32 result;\n\n if (interfaceHash == ERC777_TOKENS_RECIPIENT_INTERFACE_HASH && addr == address(this)) {\n result = ERC1820_ACCEPT_MAGIC;\n }\n\n return result;\n }\n\n // ERC1271\n\n function isValidSignature(\n bytes32 messageHash,\n bytes calldata signature\n )\n external\n view\n returns (bytes4)\n {\n return AccountRegistry(registry).isValidAccountSignature(address(this), messageHash, signature)\n ? ERC1271_VALID_MESSAGE_HASH_SIGNATURE\n : ERC1271_INVALID_SIGNATURE;\n }\n\n function isValidSignature(\n bytes calldata message,\n bytes calldata signature\n )\n external\n view\n returns (bytes4)\n {\n return AccountRegistry(registry).isValidAccountSignature(address(this), message, signature)\n ? ERC1271_VALID_MESSAGE_SIGNATURE\n : ERC1271_INVALID_SIGNATURE;\n }\n\n // external functions (pure)\n\n // ERC721\n\n function onERC721Received(\n address,\n address,\n uint256,\n bytes calldata\n )\n external\n pure\n returns (bytes4)\n {\n return this.onERC721Received.selector;\n }\n\n // ERC1155\n\n function onERC1155Received(\n address,\n address,\n uint256,\n uint256,\n bytes calldata\n )\n external\n pure\n returns (bytes4)\n {\n return this.onERC1155Received.selector;\n }\n\n // ERC777\n\n function tokensReceived(\n address,\n address,\n address,\n uint256,\n bytes calldata,\n bytes calldata\n )\n external\n pure\n {}\n}\n" + }, + "src/personal/PersonalAccountImplementationV1.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../common/account/AccountImplementationV1.sol\";\n\n\n/**\n * @title Personal account implementation (version 1)\n *\n * @author Stanisław Głogowski \n */\ncontract PersonalAccountImplementationV1 is AccountImplementationV1 {\n\n /**\n * @dev Public constructor\n */\n constructor() public AccountImplementationV1() {}\n}\n" + }, + "src/common/account/mocks/AccountImplementationV1Mock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../AccountImplementationV1.sol\";\n\n\n/**\n * @title Account implementation mock (version 1)\n *\n * @author Stanisław Głogowski \n */\ncontract AccountImplementationV1Mock is AccountImplementationV1 {\n /**\n * @dev Public constructor\n * @param registry_ account registry address\n */\n constructor(\n address registry_\n )\n public\n AccountImplementationV1()\n {\n registry = registry_;\n }\n}\n" + }, + "src/common/helpers/BalancesHelper.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../token/ERC20Token.sol\";\nimport \"../libs/SafeMathLib.sol\";\n\n\n/**\n * @title Balances helper\n *\n * @author Jegor Sidorenko \n * @author Stanisław Głogowski \n */\ncontract BalancesHelper {\n using SafeMathLib for uint256;\n\n // external functions\n\n /**\n * @notice Checks the token balances of accounts for multiple tokens.\n * @dev Pass 0x0 as a \"token\" address to get ETH balance.\n *\n * Possible error throws:\n * - extremely large arrays for account and or tokens (gas cost too high)\n *\n * @param accounts array of accounts addresses\n * @param tokens array of tokens addresses\n * @return a one-dimensional that's user.length * tokens.length long. The\n * array is ordered by all of the 0th accounts token balances, then the 1th\n * user, and so on.\n */\n function getBalances(\n address[] calldata accounts,\n address[] calldata tokens\n )\n external\n view\n returns (uint[] memory)\n {\n uint[] memory result = new uint[](accounts.length.mul(tokens.length));\n\n for (uint i = 0; i < accounts.length; i++) {\n for (uint j = 0; j < tokens.length; j++) {\n uint index = j.add(tokens.length.mul(i));\n\n if (tokens[j] != address(0x0)) {\n result[index] = _getBalance(accounts[i], tokens[j]);\n } else {\n result[index] = accounts[i].balance;\n }\n }\n }\n\n return result;\n }\n\n // private functions\n\n function _getBalance(\n address account,\n address token\n )\n private\n view\n returns (uint256)\n {\n uint256 result = 0;\n uint256 tokenCode;\n\n /// @dev check if token is actually a contract\n // solhint-disable-next-line no-inline-assembly\n assembly { tokenCode := extcodesize(token) } // contract code size\n\n if (tokenCode > 0) {\n /// @dev is it a contract and does it implement balanceOf\n // solhint-disable-next-line avoid-low-level-calls\n (bool methodExists,) = token.staticcall(abi.encodeWithSelector(\n ERC20Token(token).balanceOf.selector,\n account\n ));\n\n if (methodExists) {\n result = ERC20Token(token).balanceOf(account);\n }\n }\n\n return result;\n }\n}\n" + }, + "src/gateway/mocks/GatewayRecipientMock.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\nimport \"../GatewayRecipient.sol\";\n\n\n/**\n * @title Gateway recipient mock\n *\n * @dev Used in `GatewayRecipient` contract tests\n *\n * @author Stanisław Głogowski \n */\ncontract GatewayRecipientMock is GatewayRecipient {\n // events\n\n event Context(\n address account,\n address sender,\n bytes data\n );\n\n /**\n * @dev Public constructor\n * @param gateway_ `Gateway` contract address\n */\n constructor(\n address gateway_\n )\n public\n {\n _initializeGatewayRecipient(gateway_);\n }\n\n function emitContext()\n external\n {\n emit Context(\n _getContextAccount(),\n _getContextSender(),\n _getContextData()\n );\n }\n}\n" + } + }, + "settings": { + "evmVersion": "istanbul", + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/deployments/fuseSparknet/solcInputs/7a183f869f73d4ccd46c6d23b208518b.json b/deployments/fuseSparknet/solcInputs/7a183f869f73d4ccd46c6d23b208518b.json new file mode 100644 index 00000000..2d777865 --- /dev/null +++ b/deployments/fuseSparknet/solcInputs/7a183f869f73d4ccd46c6d23b208518b.json @@ -0,0 +1,79 @@ +{ + "language": "Solidity", + "sources": { + "src/bridges/Diamond.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\nimport {LibDiamond} from \"./libs/LibDiamond.sol\";\nimport {IDiamondCut} from \"./interfaces/IDiamondCut.sol\";\n\ncontract Diamond {\n constructor(address _contractOwner, address _diamondCutFacet) payable {\n LibDiamond.setContractOwner(_contractOwner);\n\n // Add the diamondCut external function from the diamondCutFacet\n IDiamondCut.FacetCut[] memory cut = new IDiamondCut.FacetCut[](1);\n bytes4[] memory functionSelectors = new bytes4[](1);\n functionSelectors[0] = IDiamondCut.diamondCut.selector;\n cut[0] = IDiamondCut.FacetCut({\n facetAddress: _diamondCutFacet,\n action: IDiamondCut.FacetCutAction.Add,\n functionSelectors: functionSelectors\n });\n LibDiamond.diamondCut(cut, address(0), \"\");\n }\n\n // Find facet for function that is called and execute the\n // function if a facet is found and return any value.\n // solhint-disable-next-line no-complex-fallback\n fallback() external payable {\n LibDiamond.DiamondStorage storage ds;\n bytes32 position = LibDiamond.DIAMOND_STORAGE_POSITION;\n\n // get diamond storage\n // solhint-disable-next-line no-inline-assembly\n assembly {\n ds.slot := position\n }\n\n // get facet from function selector\n address facet = ds.selectorToFacetAndPosition[msg.sig].facetAddress;\n require(facet != address(0), \"Diamond: Function does not exist\");\n\n // Execute external function from facet using delegatecall and return any value.\n // solhint-disable-next-line no-inline-assembly\n assembly {\n // copy function selector and any arguments\n calldatacopy(0, 0, calldatasize())\n // execute function call using the facet\n let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)\n // get any return value\n returndatacopy(0, 0, returndatasize())\n // return any return value or error back to the caller\n switch result\n case 0 {\n revert(0, returndatasize())\n }\n default {\n return(0, returndatasize())\n }\n }\n }\n\n // Able to receive ether\n // solhint-disable-next-line no-empty-blocks\n receive() external payable {}\n}\n" + }, + "src/bridges/libs/LibDiamond.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\nimport { IDiamondCut } from \"../interfaces/IDiamondCut.sol\";\n\nlibrary LibDiamond {\n bytes32 internal constant DIAMOND_STORAGE_POSITION = keccak256(\"diamond.standard.diamond.storage\");\n\n struct FacetAddressAndPosition {\n address facetAddress;\n uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array\n }\n\n struct FacetFunctionSelectors {\n bytes4[] functionSelectors;\n uint256 facetAddressPosition; // position of facetAddress in facetAddresses array\n }\n\n struct DiamondStorage {\n // maps function selector to the facet address and\n // the position of the selector in the facetFunctionSelectors.selectors array\n mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;\n // maps facet addresses to function selectors\n mapping(address => FacetFunctionSelectors) facetFunctionSelectors;\n // facet addresses\n address[] facetAddresses;\n // Used to query if a contract implements an interface.\n // Used to implement ERC-165.\n mapping(bytes4 => bool) supportedInterfaces;\n // owner of the contract\n address contractOwner;\n }\n\n function diamondStorage() internal pure returns (DiamondStorage storage ds) {\n bytes32 position = DIAMOND_STORAGE_POSITION;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n ds.slot := position\n }\n }\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n function setContractOwner(address _newOwner) internal {\n DiamondStorage storage ds = diamondStorage();\n address previousOwner = ds.contractOwner;\n ds.contractOwner = _newOwner;\n emit OwnershipTransferred(previousOwner, _newOwner);\n }\n\n function contractOwner() internal view returns (address contractOwner_) {\n contractOwner_ = diamondStorage().contractOwner;\n }\n\n function enforceIsContractOwner() internal view {\n require(msg.sender == diamondStorage().contractOwner, \"LibDiamond: Must be contract owner\");\n }\n\n event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);\n\n // Internal function version of diamondCut\n function diamondCut(\n IDiamondCut.FacetCut[] memory _diamondCut,\n address _init,\n bytes memory _calldata\n ) internal {\n for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {\n IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;\n if (action == IDiamondCut.FacetCutAction.Add) {\n addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Replace) {\n replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\n } else if (action == IDiamondCut.FacetCutAction.Remove) {\n removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);\n } else {\n revert(\"LibDiamondCut: Incorrect FacetCutAction\");\n }\n }\n emit DiamondCut(_diamondCut, _init, _calldata);\n initializeDiamondCut(_init, _calldata);\n }\n\n function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\n require(_functionSelectors.length > 0, \"LibDiamondCut: No selectors in facet to cut\");\n DiamondStorage storage ds = diamondStorage();\n require(_facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(ds, _facetAddress);\n }\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\n bytes4 selector = _functionSelectors[selectorIndex];\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress == address(0), \"LibDiamondCut: Can't add function that already exists\");\n addFunction(ds, selector, selectorPosition, _facetAddress);\n selectorPosition++;\n }\n }\n\n function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\n require(_functionSelectors.length > 0, \"LibDiamondCut: No selectors in facet to cut\");\n DiamondStorage storage ds = diamondStorage();\n require(_facetAddress != address(0), \"LibDiamondCut: Add facet can't be address(0)\");\n uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);\n // add new facet address if it does not exist\n if (selectorPosition == 0) {\n addFacet(ds, _facetAddress);\n }\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\n bytes4 selector = _functionSelectors[selectorIndex];\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\n require(oldFacetAddress != _facetAddress, \"LibDiamondCut: Can't replace function with same function\");\n removeFunction(ds, oldFacetAddress, selector);\n addFunction(ds, selector, selectorPosition, _facetAddress);\n selectorPosition++;\n }\n }\n\n function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {\n require(_functionSelectors.length > 0, \"LibDiamondCut: No selectors in facet to cut\");\n DiamondStorage storage ds = diamondStorage();\n // if function does not exist then do nothing and return\n require(_facetAddress == address(0), \"LibDiamondCut: Remove facet address must be address(0)\");\n for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {\n bytes4 selector = _functionSelectors[selectorIndex];\n address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;\n removeFunction(ds, oldFacetAddress, selector);\n }\n }\n\n function addFacet(DiamondStorage storage ds, address _facetAddress) internal {\n enforceHasContractCode(_facetAddress, \"LibDiamondCut: New facet has no code\");\n ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;\n ds.facetAddresses.push(_facetAddress);\n }\n\n function addFunction(\n DiamondStorage storage ds,\n bytes4 _selector,\n uint96 _selectorPosition,\n address _facetAddress\n ) internal {\n ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);\n ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;\n }\n\n function removeFunction(\n DiamondStorage storage ds,\n address _facetAddress,\n bytes4 _selector\n ) internal {\n require(_facetAddress != address(0), \"LibDiamondCut: Can't remove function that doesn't exist\");\n // an immutable function is a function defined directly in a diamond\n require(_facetAddress != address(this), \"LibDiamondCut: Can't remove immutable function\");\n // replace selector with last selector, then delete last selector\n uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;\n uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;\n // if not the same then replace _selector with lastSelector\n if (selectorPosition != lastSelectorPosition) {\n bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];\n ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;\n ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition);\n }\n // delete the last selector\n ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();\n delete ds.selectorToFacetAndPosition[_selector];\n\n // if no more selectors for facet address then delete the facet address\n if (lastSelectorPosition == 0) {\n // replace facet address with last facet address and delete last facet address\n uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;\n uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\n if (facetAddressPosition != lastFacetAddressPosition) {\n address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];\n ds.facetAddresses[facetAddressPosition] = lastFacetAddress;\n ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition;\n }\n ds.facetAddresses.pop();\n delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;\n }\n }\n\n function initializeDiamondCut(address _init, bytes memory _calldata) internal {\n if (_init == address(0)) {\n require(_calldata.length == 0, \"LibDiamondCut: _init is address(0) but_calldata is not empty\");\n } else {\n require(_calldata.length > 0, \"LibDiamondCut: _calldata is empty but _init is not address(0)\");\n if (_init != address(this)) {\n enforceHasContractCode(_init, \"LibDiamondCut: _init address has no code\");\n }\n // solhint-disable-next-line avoid-low-level-calls\n (bool success, bytes memory error) = _init.delegatecall(_calldata);\n if (!success) {\n if (error.length > 0) {\n // bubble up the error\n revert(string(error));\n } else {\n revert(\"LibDiamondCut: _init function reverted\");\n }\n }\n }\n }\n\n function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {\n uint256 contractSize;\n // solhint-disable-next-line no-inline-assembly\n assembly {\n contractSize := extcodesize(_contract)\n }\n require(contractSize > 0, _errorMessage);\n }\n}\n" + }, + "src/bridges/interfaces/IDiamondCut.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\ninterface IDiamondCut {\n enum FacetCutAction {\n Add,\n Replace,\n Remove\n }\n // Add=0, Replace=1, Remove=2\n\n struct FacetCut {\n address facetAddress;\n FacetCutAction action;\n bytes4[] functionSelectors;\n }\n\n /// @notice Add/replace/remove any number of functions and optionally execute\n /// a function with delegatecall\n /// @param _diamondCut Contains the facet addresses and function selectors\n /// @param _init The address of the contract or facet to execute _calldata\n /// @param _calldata A function call, including function selector and arguments\n /// _calldata is executed with delegatecall on _init\n function diamondCut(\n FacetCut[] calldata _diamondCut,\n address _init,\n bytes calldata _calldata\n ) external;\n\n event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);\n}\n" + }, + "src/bridges/facets/DiamondCutFacet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\nimport { IDiamondCut } from \"../interfaces/IDiamondCut.sol\";\nimport { LibDiamond } from \"../libs/LibDiamond.sol\";\n\ncontract DiamondCutFacet is IDiamondCut {\n /// @notice Add/replace/remove any number of functions and optionally execute\n /// a function with delegatecall\n /// @param _diamondCut Contains the facet addresses and function selectors\n /// @param _init The address of the contract or facet to execute _calldata\n /// @param _calldata A function call, including function selector and arguments\n /// _calldata is executed with delegatecall on _init\n function diamondCut(\n FacetCut[] calldata _diamondCut,\n address _init,\n bytes calldata _calldata\n ) external override {\n LibDiamond.enforceIsContractOwner();\n LibDiamond.diamondCut(_diamondCut, _init, _calldata);\n }\n}\n" + }, + "src/bridges/facets/OwnershipFacet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\nimport { LibDiamond } from \"../libs/LibDiamond.sol\";\nimport { IERC173 } from \"../interfaces/IERC173.sol\";\n\ncontract OwnershipFacet is IERC173 {\n function transferOwnership(address _newOwner) external override {\n LibDiamond.enforceIsContractOwner();\n LibDiamond.setContractOwner(_newOwner);\n }\n\n function owner() external view override returns (address owner_) {\n owner_ = LibDiamond.contractOwner();\n }\n}" + }, + "src/bridges/interfaces/IERC173.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\n/// @title ERC-173 Contract Ownership Standard\n/// Note: the ERC-165 identifier for this interface is 0x7f5828d0\n/* is ERC165 */\ninterface IERC173 {\n /// @notice Get the address of the owner\n /// @return owner_ The address of the owner.\n function owner() external view returns (address owner_);\n\n /// @notice Set the address of the new owner of the contract\n /// @dev Set _newOwner to address(0) to renounce any ownership.\n /// @param _newOwner The address of the new owner of the contract\n function transferOwnership(address _newOwner) external;\n}\n" + }, + "src/bridges/facets/DiamondLoupeFacet.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\nimport { LibDiamond } from \"../libs/LibDiamond.sol\";\nimport { IDiamondLoupe } from \"../interfaces/IDiamondLoupe.sol\";\nimport { IERC165 } from \"../interfaces/IERC165.sol\";\n\ncontract DiamondLoupeFacet is IDiamondLoupe, IERC165 {\n // Diamond Loupe Functions\n ////////////////////////////////////////////////////////////////////\n /// These functions are expected to be called frequently by tools.\n //\n // struct Facet {\n // address facetAddress;\n // bytes4[] functionSelectors;\n // }\n\n /// @notice Gets all facets and their selectors.\n /// @return facets_ Facet\n function facets() external view override returns (Facet[] memory facets_) {\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n uint256 numFacets = ds.facetAddresses.length;\n facets_ = new Facet[](numFacets);\n for (uint256 i = 0; i < numFacets; i++) {\n address facetAddress_ = ds.facetAddresses[i];\n facets_[i].facetAddress = facetAddress_;\n facets_[i].functionSelectors = ds.facetFunctionSelectors[facetAddress_].functionSelectors;\n }\n }\n\n /// @notice Gets all the function selectors provided by a facet.\n /// @param _facet The facet address.\n /// @return facetFunctionSelectors_\n function facetFunctionSelectors(address _facet)\n external\n view\n override\n returns (bytes4[] memory facetFunctionSelectors_)\n {\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n facetFunctionSelectors_ = ds.facetFunctionSelectors[_facet].functionSelectors;\n }\n\n /// @notice Get all the facet addresses used by a diamond.\n /// @return facetAddresses_\n function facetAddresses() external view override returns (address[] memory facetAddresses_) {\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n facetAddresses_ = ds.facetAddresses;\n }\n\n /// @notice Gets the facet that supports the given selector.\n /// @dev If facet is not found return address(0).\n /// @param _functionSelector The function selector.\n /// @return facetAddress_ The facet address.\n function facetAddress(bytes4 _functionSelector) external view override returns (address facetAddress_) {\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n facetAddress_ = ds.selectorToFacetAndPosition[_functionSelector].facetAddress;\n }\n\n // This implements ERC-165.\n function supportsInterface(bytes4 _interfaceId) external view override returns (bool) {\n LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();\n return ds.supportedInterfaces[_interfaceId];\n }\n}\n" + }, + "src/bridges/interfaces/IDiamondLoupe.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\n// A loupe is a small magnifying glass used to look at diamonds.\n// These functions look at diamonds\ninterface IDiamondLoupe {\n /// These functions are expected to be called frequently\n /// by tools.\n\n struct Facet {\n address facetAddress;\n bytes4[] functionSelectors;\n }\n\n /// @notice Gets all facet addresses and their four byte function selectors.\n /// @return facets_ Facet\n function facets() external view returns (Facet[] memory facets_);\n\n /// @notice Gets all the function selectors supported by a specific facet.\n /// @param _facet The facet address.\n /// @return facetFunctionSelectors_\n function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);\n\n /// @notice Get all the facet addresses used by a diamond.\n /// @return facetAddresses_\n function facetAddresses() external view returns (address[] memory facetAddresses_);\n\n /// @notice Gets the facet that supports the given selector.\n /// @dev If facet is not found return address(0).\n /// @param _functionSelector The function selector.\n /// @return facetAddress_ The facet address.\n function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);\n}\n" + }, + "src/bridges/interfaces/IERC165.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.4;\n\ninterface IERC165 {\n /// @notice Query if a contract implements an interface\n /// @param interfaceId The interface identifier, as specified in ERC-165\n /// @dev Interface identification is specified in ERC-165. This function\n /// uses less than 30,000 gas.\n /// @return `true` if the contract implements `interfaceID` and\n /// `interfaceID` is not 0xffffffff, `false` otherwise\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\n}" + }, + "src/common/helpers/BalancesHelperV2.sol": { + "content": "// SPDX-License-Identifier: MIT\n// solhint-disable-next-line\npragma solidity 0.8.4;\n\n/// @title BalancesHelperV2\n/// @author Luke Wickens \n/// @notice Used to get account balances of ERC20 tokens and Wrapped Super Tokens\n\nimport {ISuperfluidToken} from \"@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluidToken.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/interfaces/IERC20.sol\";\nimport {Address} from \"@openzeppelin/contracts/utils/Address.sol\";\n\ncontract BalancesHelperV2 {\n using Address for address;\n\n /// @notice Custom errors to handle address(0)\n error AccountZeroAddress(address account, address token);\n error TokenZeroAddress(address account, address token);\n\n constructor() {}\n\n /// @notice Returns balances of accounts for multiple ERC20 tokens.\n /// @dev Error thrown if: account or token address is address(0),\n /// large arrays of accounts/tokens are passed in could cause gas block limit issue\n /// @param accounts = Array of accounts addresses\n /// @param tokens = Array of tokens addresses\n /// @return One-dimensional that's accounts.length * tokens.length long. The\n /// array is ordered by all of accounts[0] token balances, then accounts[1] etc.\n\n function getBalances(address[] calldata accounts, address[] calldata tokens)\n external\n view\n returns (uint256[] memory)\n {\n uint256[] memory result = new uint256[](\n accounts.length * tokens.length\n );\n\n for (uint256 i; i < accounts.length; i++) {\n for (uint256 j; j < tokens.length; j++) {\n uint256 index = j + (tokens.length * i);\n result[index] = _getBalance(accounts[i], tokens[j]);\n }\n }\n return result;\n }\n\n /// @notice Returns balances of accounts for multiple Wrapped Super Tokens.\n /// @dev Error thrown if: account or token address is address(0),\n /// large arrays of accounts/tokens are passed in could cause gas block limit issue\n /// @param accounts = Array of accounts addresses\n /// @param tokens = Array of tokens addresses\n /// @return One-dimensional that's accounts.length * tokens.length long. The\n /// array is ordered by all of accounts[0] token balances, then accounts[1] etc.\n\n function getSuperfluidWrappedTokenBalances(\n address[] calldata accounts,\n address[] calldata tokens\n ) external view returns (int256[] memory) {\n int256[] memory result = new int256[](accounts.length * tokens.length);\n\n for (uint256 i; i < accounts.length; i++) {\n for (uint256 j; j < tokens.length; j++) {\n uint256 index = j + (tokens.length * i);\n result[index] = _getSuperfluidWrappedTokenBalance(\n accounts[i],\n tokens[j]\n );\n }\n }\n return result;\n }\n\n /// Private fuctions\n\n /// @notice Returns balance of account for an ERC20 token.\n /// @dev Error thrown if: account or token address is address(0)\n /// @param account = account address\n /// @param token = tokens address\n /// @return balance of account as uint256.\n\n function _getBalance(address account, address token)\n private\n view\n returns (uint256)\n {\n if (account == address(0)) revert AccountZeroAddress(account, token);\n if (token == address(0)) revert TokenZeroAddress(account, token);\n\n bytes memory returnedData = token.functionStaticCall(\n abi.encodeWithSelector(IERC20(token).balanceOf.selector, account)\n );\n\n return abi.decode(returnedData, (uint256));\n }\n\n /// @notice Returns real balance of a user, taking into consideration all agreements of account\n /// @dev Error thrown if: account or token address is address(0)\n /// @param account = account address\n /// @param token = tokens address\n /// @return available balance of account as int256.\n\n function _getSuperfluidWrappedTokenBalance(address account, address token)\n private\n view\n returns (int256)\n {\n if (account == address(0)) revert AccountZeroAddress(account, token);\n if (token == address(0)) revert TokenZeroAddress(account, token);\n\n bytes memory returnedData = token.functionStaticCall(\n abi.encodeWithSelector(\n ISuperfluidToken(token).realtimeBalanceOfNow.selector,\n account\n )\n );\n\n (int256 availableBalance, , , ) = abi.decode(\n returnedData,\n (int256, uint256, uint256, uint256)\n );\n return availableBalance;\n }\n}\n" + }, + "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperfluidToken.sol": { + "content": "// SPDX-License-Identifier: AGPLv3\npragma solidity >= 0.8.0;\n\nimport { ISuperAgreement } from \"./ISuperAgreement.sol\";\n\n\n/**\n * @title Superfluid token interface\n * @author Superfluid\n */\ninterface ISuperfluidToken {\n\n /**************************************************************************\n * Basic information\n *************************************************************************/\n\n /**\n * @dev Get superfluid host contract address\n */\n function getHost() external view returns(address host);\n\n /**\n * @dev Encoded liquidation type data mainly used for handling stack to deep errors\n *\n * Note:\n * - version: 1\n * - liquidationType key:\n * - 0 = reward account receives reward (PIC period)\n * - 1 = liquidator account receives reward (Pleb period)\n * - 2 = liquidator account receives reward (Pirate period/bailout)\n */\n struct LiquidationTypeData {\n uint256 version;\n uint8 liquidationType;\n }\n\n /**************************************************************************\n * Real-time balance functions\n *************************************************************************/\n\n /**\n * @dev Calculate the real balance of a user, taking in consideration all agreements of the account\n * @param account for the query\n * @param timestamp Time of balance\n * @return availableBalance Real-time balance\n * @return deposit Account deposit\n * @return owedDeposit Account owed Deposit\n */\n function realtimeBalanceOf(\n address account,\n uint256 timestamp\n )\n external view\n returns (\n int256 availableBalance,\n uint256 deposit,\n uint256 owedDeposit);\n\n /**\n * @notice Calculate the realtime balance given the current host.getNow() value\n * @dev realtimeBalanceOf with timestamp equals to block timestamp\n * @param account for the query\n * @return availableBalance Real-time balance\n * @return deposit Account deposit\n * @return owedDeposit Account owed Deposit\n */\n function realtimeBalanceOfNow(\n address account\n )\n external view\n returns (\n int256 availableBalance,\n uint256 deposit,\n uint256 owedDeposit,\n uint256 timestamp);\n\n /**\n * @notice Check if account is critical\n * @dev A critical account is when availableBalance < 0\n * @param account The account to check\n * @param timestamp The time we'd like to check if the account is critical (should use future)\n * @return isCritical Whether the account is critical\n */\n function isAccountCritical(\n address account,\n uint256 timestamp\n )\n external view\n returns(bool isCritical);\n\n /**\n * @notice Check if account is critical now (current host.getNow())\n * @dev A critical account is when availableBalance < 0\n * @param account The account to check\n * @return isCritical Whether the account is critical\n */\n function isAccountCriticalNow(\n address account\n )\n external view\n returns(bool isCritical);\n\n /**\n * @notice Check if account is solvent\n * @dev An account is insolvent when the sum of deposits for a token can't cover the negative availableBalance\n * @param account The account to check\n * @param timestamp The time we'd like to check if the account is solvent (should use future)\n * @return isSolvent\n */\n function isAccountSolvent(\n address account,\n uint256 timestamp\n )\n external view\n returns(bool isSolvent);\n\n /**\n * @notice Check if account is solvent now\n * @dev An account is insolvent when the sum of deposits for a token can't cover the negative availableBalance\n * @param account The account to check\n * @return isSolvent\n */\n function isAccountSolventNow(\n address account\n )\n external view\n returns(bool isSolvent);\n\n /**\n * @notice Get a list of agreements that is active for the account\n * @dev An active agreement is one that has state for the account\n * @param account Account to query\n * @return activeAgreements List of accounts that have non-zero states for the account\n */\n function getAccountActiveAgreements(address account)\n external view\n returns(ISuperAgreement[] memory activeAgreements);\n\n\n /**************************************************************************\n * Super Agreement hosting functions\n *************************************************************************/\n\n /**\n * @dev Create a new agreement\n * @param id Agreement ID\n * @param data Agreement data\n */\n function createAgreement(\n bytes32 id,\n bytes32[] calldata data\n )\n external;\n /**\n * @dev Agreement created event\n * @param agreementClass Contract address of the agreement\n * @param id Agreement ID\n * @param data Agreement data\n */\n event AgreementCreated(\n address indexed agreementClass,\n bytes32 id,\n bytes32[] data\n );\n\n /**\n * @dev Get data of the agreement\n * @param agreementClass Contract address of the agreement\n * @param id Agreement ID\n * @return data Data of the agreement\n */\n function getAgreementData(\n address agreementClass,\n bytes32 id,\n uint dataLength\n )\n external view\n returns(bytes32[] memory data);\n\n /**\n * @dev Create a new agreement\n * @param id Agreement ID\n * @param data Agreement data\n */\n function updateAgreementData(\n bytes32 id,\n bytes32[] calldata data\n )\n external;\n /**\n * @dev Agreement updated event\n * @param agreementClass Contract address of the agreement\n * @param id Agreement ID\n * @param data Agreement data\n */\n event AgreementUpdated(\n address indexed agreementClass,\n bytes32 id,\n bytes32[] data\n );\n\n /**\n * @dev Close the agreement\n * @param id Agreement ID\n */\n function terminateAgreement(\n bytes32 id,\n uint dataLength\n )\n external;\n /**\n * @dev Agreement terminated event\n * @param agreementClass Contract address of the agreement\n * @param id Agreement ID\n */\n event AgreementTerminated(\n address indexed agreementClass,\n bytes32 id\n );\n\n /**\n * @dev Update agreement state slot\n * @param account Account to be updated\n *\n * NOTE\n * - To clear the storage out, provide zero-ed array of intended length\n */\n function updateAgreementStateSlot(\n address account,\n uint256 slotId,\n bytes32[] calldata slotData\n )\n external;\n /**\n * @dev Agreement account state updated event\n * @param agreementClass Contract address of the agreement\n * @param account Account updated\n * @param slotId slot id of the agreement state\n */\n event AgreementStateUpdated(\n address indexed agreementClass,\n address indexed account,\n uint256 slotId\n );\n\n /**\n * @dev Get data of the slot of the state of an agreement\n * @param agreementClass Contract address of the agreement\n * @param account Account to query\n * @param slotId slot id of the state\n * @param dataLength length of the state data\n */\n function getAgreementStateSlot(\n address agreementClass,\n address account,\n uint256 slotId,\n uint dataLength\n )\n external view\n returns (bytes32[] memory slotData);\n\n /**\n * @notice Settle balance from an account by the agreement\n * @dev The agreement needs to make sure that the balance delta is balanced afterwards\n * @param account Account to query.\n * @param delta Amount of balance delta to be settled\n *\n * Modifiers:\n * - onlyAgreement\n */\n function settleBalance(\n address account,\n int256 delta\n )\n external;\n\n /**\n * @dev Make liquidation payouts (v2)\n * @param id Agreement ID\n * @param liquidationTypeData Data regarding the version of the liquidation schema and the type\n * @param liquidatorAccount Address of the executor of the liquidation\n * @param useDefaultRewardAccount Whether or not the default reward account receives the rewardAmount\n * @param targetAccount Account of the stream sender\n * @param rewardAmount The amount the reward recepient account will receive\n * @param targetAccountBalanceDelta The amount the sender account balance should change by\n *\n * - If a bailout is required (bailoutAmount > 0)\n * - the actual reward (single deposit) goes to the executor,\n * - while the reward account becomes the bailout account\n * - total bailout include: bailout amount + reward amount\n * - the targetAccount will be bailed out\n * - If a bailout is not required\n * - the targetAccount will pay the rewardAmount\n * - the liquidator (reward account in PIC period) will receive the rewardAmount\n *\n * Modifiers:\n * - onlyAgreement\n */\n function makeLiquidationPayoutsV2\n (\n bytes32 id,\n bytes memory liquidationTypeData,\n address liquidatorAccount,\n bool useDefaultRewardAccount,\n address targetAccount,\n uint256 rewardAmount,\n int256 targetAccountBalanceDelta\n ) external;\n /**\n * @dev Agreement liquidation event v2 (including agent account)\n * @param agreementClass Contract address of the agreement\n * @param id Agreement ID\n * @param liquidatorAccount Address of the executor of the liquidation\n * @param targetAccount Account of the stream sender\n * @param rewardAccount Account that collects the reward or bails out insolvent accounts\n * @param rewardAmount The amount the reward recipient account balance should change by\n * @param targetAccountBalanceDelta The amount the sender account balance should change by\n * @param liquidationTypeData The encoded liquidation type data including the version (how to decode)\n *\n * NOTE:\n * Reward account rule:\n * - if the agreement is liquidated during the PIC period\n * - the rewardAccount will get the rewardAmount (remaining deposit), regardless of the liquidatorAccount\n * - the targetAccount will pay for the rewardAmount\n * - if the agreement is liquidated after the PIC period AND the targetAccount is solvent\n * - the liquidatorAccount will get the rewardAmount (remaining deposit)\n * - the targetAccount will pay for the rewardAmount\n * - if the targetAccount is insolvent\n * - the liquidatorAccount will get the rewardAmount (single deposit)\n * - the rewardAccount will pay for both the rewardAmount and bailoutAmount\n * - the targetAccount will receive the bailoutAmount\n */\n event AgreementLiquidatedV2(\n address indexed agreementClass,\n bytes32 id,\n address indexed liquidatorAccount,\n address indexed targetAccount,\n address rewardAccount,\n uint256 rewardAmount,\n int256 targetAccountBalanceDelta,\n bytes liquidationTypeData\n );\n\n /**************************************************************************\n * Function modifiers for access control and parameter validations\n *\n * While they cannot be explicitly stated in function definitions, they are\n * listed in function definition comments instead for clarity.\n *\n * NOTE: solidity-coverage not supporting it\n *************************************************************************/\n\n /// @dev The msg.sender must be host contract\n //modifier onlyHost() virtual;\n\n /// @dev The msg.sender must be a listed agreement.\n //modifier onlyAgreement() virtual;\n\n /**************************************************************************\n * DEPRECATED\n *************************************************************************/\n\n /**\n * @dev Agreement liquidation event (DEPRECATED BY AgreementLiquidatedBy)\n * @param agreementClass Contract address of the agreement\n * @param id Agreement ID\n * @param penaltyAccount Account of the agreement to be penalized\n * @param rewardAccount Account that collect the reward\n * @param rewardAmount Amount of liquidation reward\n *\n * NOTE:\n *\n * [DEPRECATED] Use AgreementLiquidatedV2 instead\n */\n event AgreementLiquidated(\n address indexed agreementClass,\n bytes32 id,\n address indexed penaltyAccount,\n address indexed rewardAccount,\n uint256 rewardAmount\n );\n\n /**\n * @dev System bailout occurred (DEPRECATED BY AgreementLiquidatedBy)\n * @param bailoutAccount Account that bailout the penalty account\n * @param bailoutAmount Amount of account bailout\n *\n * NOTE:\n *\n * [DEPRECATED] Use AgreementLiquidatedV2 instead\n */\n event Bailout(\n address indexed bailoutAccount,\n uint256 bailoutAmount\n );\n\n /**\n * @dev Agreement liquidation event (DEPRECATED BY AgreementLiquidatedV2)\n * @param liquidatorAccount Account of the agent that performed the liquidation.\n * @param agreementClass Contract address of the agreement\n * @param id Agreement ID\n * @param penaltyAccount Account of the agreement to be penalized\n * @param bondAccount Account that collect the reward or bailout accounts\n * @param rewardAmount Amount of liquidation reward\n * @param bailoutAmount Amount of liquidation bailouot\n *\n * NOTE:\n * Reward account rule:\n * - if bailout is equal to 0, then\n * - the bondAccount will get the rewardAmount,\n * - the penaltyAccount will pay for the rewardAmount.\n * - if bailout is larger than 0, then\n * - the liquidatorAccount will get the rewardAmouont,\n * - the bondAccount will pay for both the rewardAmount and bailoutAmount,\n * - the penaltyAccount will pay for the rewardAmount while get the bailoutAmount.\n */\n event AgreementLiquidatedBy(\n address liquidatorAccount,\n address indexed agreementClass,\n bytes32 id,\n address indexed penaltyAccount,\n address indexed bondAccount,\n uint256 rewardAmount,\n uint256 bailoutAmount\n );\n}\n" + }, + "@openzeppelin/contracts/interfaces/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../token/ERC20/IERC20.sol\";\n" + }, + "@openzeppelin/contracts/utils/Address.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n *\n * [IMPORTANT]\n * ====\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\n *\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n * constructor.\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize/address.code.length, which returns 0\n // for contracts in construction, since the code is only stored at the end\n // of the constructor execution.\n\n return account.code.length > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n" + }, + "@superfluid-finance/ethereum-contracts/contracts/interfaces/superfluid/ISuperAgreement.sol": { + "content": "// SPDX-License-Identifier: AGPLv3\npragma solidity >= 0.8.0;\n\nimport { ISuperfluidToken } from \"./ISuperfluidToken.sol\";\n\n/**\n * @title Super agreement interface\n * @author Superfluid\n */\ninterface ISuperAgreement {\n\n /**\n * @dev Get the type of the agreement class\n */\n function agreementType() external view returns (bytes32);\n\n /**\n * @dev Calculate the real-time balance for the account of this agreement class\n * @param account Account the state belongs to\n * @param time Time used for the calculation\n * @return dynamicBalance Dynamic balance portion of real-time balance of this agreement\n * @return deposit Account deposit amount of this agreement\n * @return owedDeposit Account owed deposit amount of this agreement\n */\n function realtimeBalanceOf(\n ISuperfluidToken token,\n address account,\n uint256 time\n )\n external\n view\n returns (\n int256 dynamicBalance,\n uint256 deposit,\n uint256 owedDeposit\n );\n\n}\n" + }, + "@openzeppelin/contracts/token/ERC20/IERC20.sol": { + "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `to`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address to, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `from` to `to` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address from,\n address to,\n uint256 amount\n ) external returns (bool);\n}\n" + } + }, + "settings": { + "evmVersion": "istanbul", + "metadata": { + "bytecodeHash": "none", + "useLiteralContent": true + }, + "optimizer": { + "enabled": false, + "runs": 200 + }, + "outputSelection": { + "*": { + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata", + "devdoc", + "userdoc", + "storageLayout", + "evm.gasEstimates" + ], + "": [ + "ast" + ] + } + } + } +} \ No newline at end of file diff --git a/dist/constants.d.ts b/dist/constants.d.ts index 93059733..a8d51340 100644 --- a/dist/constants.d.ts +++ b/dist/constants.d.ts @@ -4,8 +4,13 @@ export declare enum ContractNames { AccountController = 'AccountController', AccountImplementationV1 = 'AccountImplementationV1', AccountRegistry = 'AccountRegistry', + Address = 'Address', BalancesHelper = 'BalancesHelper', + BalancesHelperV2 = 'BalancesHelperV2', Controlled = 'Controlled', + Diamond = 'Diamond', + DiamondCutFacet = 'DiamondCutFacet', + DiamondLoupeFacet = 'DiamondLoupeFacet', ENSAbstractResolver = 'ENSAbstractResolver', ENSAddressResolver = 'ENSAddressResolver', ENSController = 'ENSController', @@ -20,7 +25,16 @@ export declare enum ContractNames { Gateway = 'Gateway', GatewayRecipient = 'GatewayRecipient', Guarded = 'Guarded', + IDiamondCut = 'IDiamondCut', + IDiamondLoupe = 'IDiamondLoupe', + IERC165 = 'IERC165', + IERC173 = 'IERC173', + IERC20 = 'IERC20', + ISuperAgreement = 'ISuperAgreement', + ISuperfluidToken = 'ISuperfluidToken', Initializable = 'Initializable', + LibDiamond = 'LibDiamond', + OwnershipFacet = 'OwnershipFacet', PaymentDepositAccount = 'PaymentDepositAccount', PaymentRegistry = 'PaymentRegistry', PersonalAccountImplementationV1 = 'PersonalAccountImplementationV1', diff --git a/dist/constants.js b/dist/constants.js index c0963ca7..0de5e4d2 100644 --- a/dist/constants.js +++ b/dist/constants.js @@ -7,8 +7,13 @@ module.exports = { AccountController: 'AccountController', AccountImplementationV1: 'AccountImplementationV1', AccountRegistry: 'AccountRegistry', + Address: 'Address', BalancesHelper: 'BalancesHelper', + BalancesHelperV2: 'BalancesHelperV2', Controlled: 'Controlled', + Diamond: 'Diamond', + DiamondCutFacet: 'DiamondCutFacet', + DiamondLoupeFacet: 'DiamondLoupeFacet', ENSAbstractResolver: 'ENSAbstractResolver', ENSAddressResolver: 'ENSAddressResolver', ENSController: 'ENSController', @@ -23,7 +28,16 @@ module.exports = { Gateway: 'Gateway', GatewayRecipient: 'GatewayRecipient', Guarded: 'Guarded', + IDiamondCut: 'IDiamondCut', + IDiamondLoupe: 'IDiamondLoupe', + IERC165: 'IERC165', + IERC173: 'IERC173', + IERC20: 'IERC20', + ISuperAgreement: 'ISuperAgreement', + ISuperfluidToken: 'ISuperfluidToken', Initializable: 'Initializable', + LibDiamond: 'LibDiamond', + OwnershipFacet: 'OwnershipFacet', PaymentDepositAccount: 'PaymentDepositAccount', PaymentRegistry: 'PaymentRegistry', PersonalAccountImplementationV1: 'PersonalAccountImplementationV1', diff --git a/dist/contracts.js b/dist/contracts.js index a4e57e71..1a74a0a3 100644 --- a/dist/contracts.js +++ b/dist/contracts.js @@ -121,6 +121,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -169,6 +171,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -331,6 +335,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -601,6 +607,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -694,6 +702,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -714,6 +724,42 @@ module.exports = { }, "byteCode": "0x" }, + "Address": { + "abi": [], + "addresses": { + "1": null, + "3": null, + "4": null, + "5": null, + "10": null, + "42": null, + "56": null, + "69": null, + "77": null, + "97": null, + "100": null, + "122": null, + "123": null, + "137": null, + "250": null, + "1284": null, + "1287": null, + "4002": null, + "4386": null, + "6666": null, + "9999": null, + "42161": null, + "42220": null, + "43113": null, + "43114": null, + "44787": null, + "80001": null, + "421611": null, + "1313161554": null, + "1313161555": null + }, + "byteCode": "0x602d6050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000804000a" + }, "BalancesHelper": { "abi": [ { @@ -753,6 +799,8 @@ module.exports = { "77": "0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b", "97": "0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b", "100": "0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b", + "122": "0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b", + "123": "0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b", "137": "0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b", "250": "0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b", "1284": "0xa6C165E3539A2bE6d55e2935EC9979D8C850A21b", @@ -773,6 +821,128 @@ module.exports = { }, "byteCode": "0x608060405234801561001057600080fd5b506106a2806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063ef5bfc3714610030575b600080fd5b6100fc6004803603604081101561004657600080fd5b810190808035906020019064010000000081111561006357600080fd5b82018360208201111561007557600080fd5b8035906020019184602083028401116401000000008311171561009757600080fd5b9091929391929390803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460208302840111640100000000831117156100ec57600080fd5b9091929391929390505050610153565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561013f578082015181840152602081019050610124565b505050509050019250505060405180910390f35b60608061016f848490508787905061035490919063ffffffff16565b67ffffffffffffffff8111801561018557600080fd5b506040519080825280602002602001820160405280156101b45781602001602082028036833780820191505090505b50905060005b868690508110156103475760005b858590508110156103395760006101fd6101ee848989905061035490919063ffffffff16565b836103da90919063ffffffff16565b9050600073ffffffffffffffffffffffffffffffffffffffff1687878481811061022357fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146102d2576102b589898581811061026a57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1688888581811061029357fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff16610462565b8482815181106102c157fe5b60200260200101818152505061032b565b8888848181106102de57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163184828151811061031e57fe5b6020026020010181815250505b5080806001019150506101c8565b5080806001019150506101ba565b5080915050949350505050565b60008083141561036757600090506103d4565b600082840290508284828161037857fe5b04146103cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806106726024913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015610458576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174684c69623a206164646974696f6e206f766572666c6f77000081525060200191505060405180910390fd5b8091505092915050565b600080600090506000833b905060008111156106665760008473ffffffffffffffffffffffffffffffffffffffff166370a0823160e01b87604051602401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310610550578051825260208201915060208101905060208303925061052d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146105b0576040519150601f19603f3d011682016040523d82523d6000602084013e6105b5565b606091505b505090508015610664578473ffffffffffffffffffffffffffffffffffffffff166370a08231876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561062657600080fd5b505afa15801561063a573d6000803e3d6000fd5b505050506040513d602081101561065057600080fd5b810190808051906020019092919050505092505b505b81925050509291505056fe536166654d6174684c69623a206d756c7469706c69636174696f6e206f766572666c6f77a164736f6c634300060c000a" }, + "BalancesHelperV2": { + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "AccountZeroAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "TokenZeroAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "getBalances", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + } + ], + "name": "getSuperfluidWrappedTokenBalances", + "outputs": [ + { + "internalType": "int256[]", + "name": "", + "type": "int256[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "addresses": { + "1": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "3": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "4": null, + "5": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "10": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "42": null, + "56": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "69": null, + "77": null, + "97": null, + "100": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "122": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "123": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "137": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "250": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "1284": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "1287": null, + "4002": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "4386": null, + "6666": null, + "9999": null, + "42161": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "42220": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "43113": null, + "43114": "0x13261B2b8674Cb855c408F3721281330ee16C66E", + "44787": null, + "80001": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "421611": null, + "1313161554": "0xe5A160F89f330cc933816E896a3F36376DE0a835", + "1313161555": "0xe5A160F89f330cc933816E896a3F36376DE0a835" + }, + "byteCode": "0x608060405234801561001057600080fd5b5061108a806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806350c5a7101461003b578063ef5bfc371461006b575b600080fd5b610055600480360381019061005091906109e6565b61009b565b6040516100629190610ce8565b60405180910390f35b610085600480360381019061008091906109e6565b610279565b6040516100929190610d0a565b60405180910390f35b6060600083839050868690506100b19190610e68565b67ffffffffffffffff8111156100f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405190808252806020026020018201604052801561011e5781602001602082028036833780820191505090505b50905060005b8686905081101561026c5760005b85859050811015610258576000828787905061014e9190610e68565b826101599190610e12565b90506101ff898985818110610197577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906101ac91906109bd565b8888858181106101e5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906101fa91906109bd565b610457565b848281518110610238577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101818152505050808061025090610f3b565b915050610132565b50808061026490610f3b565b915050610124565b5080915050949350505050565b60606000838390508686905061028f9190610e68565b67ffffffffffffffff8111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102fc5781602001602082028036833780820191505090505b50905060005b8686905081101561044a5760005b85859050811015610436576000828787905061032c9190610e68565b826103379190610e12565b90506103dd898985818110610375577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201602081019061038a91906109bd565b8888858181106103c3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906103d891906109bd565b610608565b848281518110610416577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101818152505050808061042e90610f3b565b915050610310565b50808061044290610f3b565b915050610302565b5080915050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156104cc5782826040517f484305ff0000000000000000000000000000000000000000000000000000000081526004016104c3929190610cbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156105405782826040517f41f93bdf000000000000000000000000000000000000000000000000000000008152600401610537929190610cbf565b60405180910390fd5b60006105e0632ec8eec760e01b8560405160240161055e9190610ca4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050508473ffffffffffffffffffffffffffffffffffffffff166107b090919063ffffffff16565b90506000818060200190518101906105f89190610a5b565b5050509050809250505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561067d5782826040517f484305ff000000000000000000000000000000000000000000000000000000008152600401610674929190610cbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156106f15782826040517f41f93bdf0000000000000000000000000000000000000000000000000000000081526004016106e8929190610cbf565b60405180910390fd5b60006107916370a0823160e01b8560405160240161070f9190610ca4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050508473ffffffffffffffffffffffffffffffffffffffff166107b090919063ffffffff16565b9050808060200190518101906107a79190610abe565b91505092915050565b60606107d58383604051806060016040528060258152602001611059602591396107dd565b905092915050565b60606107e8846108aa565b610827576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081e90610d4e565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161084f9190610c8d565b600060405180830381855afa9150503d806000811461088a576040519150601f19603f3d011682016040523d82523d6000602084013e61088f565b606091505b509150915061089f8282866108cd565b925050509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156108dd5782905061092d565b6000835111156108f05782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109249190610d2c565b60405180910390fd5b9392505050565b60008135905061094381611013565b92915050565b60008083601f84011261095b57600080fd5b8235905067ffffffffffffffff81111561097457600080fd5b60208301915083602082028301111561098c57600080fd5b9250929050565b6000815190506109a28161102a565b92915050565b6000815190506109b781611041565b92915050565b6000602082840312156109cf57600080fd5b60006109dd84828501610934565b91505092915050565b600080600080604085870312156109fc57600080fd5b600085013567ffffffffffffffff811115610a1657600080fd5b610a2287828801610949565b9450945050602085013567ffffffffffffffff811115610a4157600080fd5b610a4d87828801610949565b925092505092959194509250565b60008060008060808587031215610a7157600080fd5b6000610a7f87828801610993565b9450506020610a90878288016109a8565b9350506040610aa1878288016109a8565b9250506060610ab2878288016109a8565b91505092959194509250565b600060208284031215610ad057600080fd5b6000610ade848285016109a8565b91505092915050565b6000610af38383610c13565b60208301905092915050565b6000610b0b8383610c7e565b60208301905092915050565b610b2081610ec2565b82525050565b6000610b3182610d8e565b610b3b8185610dd4565b9350610b4683610d6e565b8060005b83811015610b77578151610b5e8882610ae7565b9750610b6983610dba565b925050600181019050610b4a565b5085935050505092915050565b6000610b8f82610d99565b610b998185610de5565b9350610ba483610d7e565b8060005b83811015610bd5578151610bbc8882610aff565b9750610bc783610dc7565b925050600181019050610ba8565b5085935050505092915050565b6000610bed82610da4565b610bf78185610df6565b9350610c07818560208601610f08565b80840191505092915050565b610c1c81610ed4565b82525050565b6000610c2d82610daf565b610c378185610e01565b9350610c47818560208601610f08565b610c5081610fb3565b840191505092915050565b6000610c68602483610e01565b9150610c7382610fc4565b604082019050919050565b610c8781610efe565b82525050565b6000610c998284610be2565b915081905092915050565b6000602082019050610cb96000830184610b17565b92915050565b6000604082019050610cd46000830185610b17565b610ce16020830184610b17565b9392505050565b60006020820190508181036000830152610d028184610b26565b905092915050565b60006020820190508181036000830152610d248184610b84565b905092915050565b60006020820190508181036000830152610d468184610c22565b905092915050565b60006020820190508181036000830152610d6781610c5b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610e1d82610efe565b9150610e2883610efe565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610e5d57610e5c610f84565b5b828201905092915050565b6000610e7382610efe565b9150610e7e83610efe565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610eb757610eb6610f84565b5b828202905092915050565b6000610ecd82610ede565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610f26578082015181840152602081019050610f0b565b83811115610f35576000848401525b50505050565b6000610f4682610efe565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610f7957610f78610f84565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000601f19601f8301169050919050565b7f416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7460008201527f7261637400000000000000000000000000000000000000000000000000000000602082015250565b61101c81610ec2565b811461102757600080fd5b50565b61103381610ed4565b811461103e57600080fd5b50565b61104a81610efe565b811461105557600080fd5b5056fe416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564a164736f6c6343000804000a" + }, "Controlled": { "abi": [ { @@ -801,6 +971,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -821,8 +993,33 @@ module.exports = { }, "byteCode": "0x" }, - "ENSAbstractResolver": { - "abi": [], + "Diamond": { + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_contractOwner", + "type": "address" + }, + { + "internalType": "address", + "name": "_diamondCutFacet", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "constructor" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ], "addresses": { "1": null, "3": null, @@ -835,6 +1032,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": "0xF1447514368fCC942279862a8B5D6Ed7beDFf431", + "123": "0xF1447514368fCC942279862a8B5D6Ed7beDFf431", "137": null, "250": null, "1284": null, @@ -853,67 +1052,142 @@ module.exports = { "1313161554": null, "1313161555": null }, - "byteCode": "0x" + "byteCode": "0x608060405260405162004fc238038062004fc2833981810160405281019062000029919062001c79565b6200003f82620002ab60201b620001681760201c565b6000600167ffffffffffffffff81111562000083577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015620000c057816020015b620000ac62001bf2565b815260200190600190039081620000a25790505b5090506000600167ffffffffffffffff81111562000107577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015620001365781602001602082028036833780820191505090505b509050631f931c1c60e01b816000815181106200017c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152505060405180606001604052808473ffffffffffffffffffffffffffffffffffffffff168152602001600060028111156200022a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815260200182815250826000815181106200026e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010181905250620002a1826000604051806020016040528060008152506200038a60201b6200023f1760201c565b5050505062002931565b6000620002bd620007e560201b60201c565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60005b835181101562000790576000848281518110620003d3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156200041c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000456577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415620004ff57620004f98583815181106200049b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160000151868481518110620004e1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151604001516200081260201b60201c565b62000779565b600160028111156200053a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000574577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156200061d5762000617858381518110620005b9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160000151868481518110620005ff577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015162000ada60201b60201c565b62000778565b60028081111562000657577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000691577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156200073a5762000734858381518110620006d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106200071c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015162000db560201b60201c565b62000777565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200076e90620021e5565b60405180910390fd5b5b5b5080806200078790620024a4565b9150506200038d565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673838383604051620007c693929190620020ee565b60405180910390a1620007e0828262000f8160201b60201c565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b600081511162000859576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200085090620021a1565b60405180910390fd5b60006200086b620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415620008e0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620008d79062002207565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156200095757620009568285620011b060201b60201c565b5b60005b835181101562000ad3576000848281518110620009a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000a97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000a8e906200226d565b60405180910390fd5b62000aab8583868a6200129460201b60201c565b838062000ab890620024f2565b9450505050808062000aca90620024a4565b9150506200095a565b5050505050565b600081511162000b21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000b1890620021a1565b60405180910390fd5b600062000b33620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141562000ba8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000b9f9062002207565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff16141562000c1f5762000c1e8285620011b060201b60201c565b5b60005b835181101562000dae57600084828151811062000c68577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000d5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000d56906200228f565b60405180910390fd5b62000d728582846200144160201b60201c565b62000d868583868a6200129460201b60201c565b838062000d9390620024f2565b9450505050808062000da590620024a4565b91505062000c22565b5050505050565b600081511162000dfc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000df390620021a1565b60405180910390fd5b600062000e0e620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161462000e82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000e7990620022b1565b60405180910390fd5b60005b825181101562000f7b57600083828151811062000ecb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905062000f638482846200144160201b60201c565b5050808062000f7290620024a4565b91505062000e85565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156200100457600081511462000ffe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ff5906200215d565b60405180910390fd5b620011ac565b60008151116200104b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620010429062002229565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614620010ab57620010aa8260405180606001604052806028815260200162004f766028913962001b9d60201b60201c565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051620010d59190620020d5565b600060405180830381855af49150503d806000811462001112576040519150601f19603f3d011682016040523d82523d6000602084013e62001117565b606091505b509150915081620011a9576000815111156200116c57806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162001163919062002139565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620011a0906200217f565b60405180910390fd5b50505b5050565b620011db8160405180606001604052806024815260200162004f9e6024913962001b9d60201b60201c565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620014b4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620014ab90620021c3565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562001526576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200151d906200224b565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180549050620015ff919062002388565b9050808214620017e25760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001828154811062001688577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000184815481106200172b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806200185d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff02191690555050600081141562001b96576000600186600201805490506200194b919062002388565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154905081811462001adb576000876002018381548110620019dd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508088600201838154811062001a48577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b8660020180548062001b16577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b905060008111829062001bec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162001be3919062002139565b60405180910390fd5b50505050565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000600281111562001c55577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001606081525090565b60008151905062001c738162002917565b92915050565b6000806040838503121562001c8d57600080fd5b600062001c9d8582860162001c62565b925050602062001cb08582860162001c62565b9150509250929050565b600062001cc8838362001df7565b60208301905092915050565b600062001ce283836200207f565b905092915050565b62001cf581620023c3565b82525050565b62001d0681620023c3565b82525050565b600062001d1982620022f3565b62001d25818562002339565b935062001d3283620022d3565b8060005b8381101562001d6957815162001d4d888262001cba565b975062001d5a836200231f565b92505060018101905062001d36565b5085935050505092915050565b600062001d8382620022fe565b62001d8f81856200234a565b93508360208202850162001da385620022e3565b8060005b8581101562001de5578484038952815162001dc3858262001cd4565b945062001dd0836200232c565b925060208a0199505060018101905062001da7565b50829750879550505050505092915050565b62001e0281620023d7565b82525050565b600062001e158262002309565b62001e2181856200235b565b935062001e338185602086016200246e565b62001e3e816200258a565b840191505092915050565b600062001e568262002309565b62001e6281856200236c565b935062001e748185602086016200246e565b80840191505092915050565b62001e8b816200245a565b82525050565b600062001e9e8262002314565b62001eaa818562002377565b935062001ebc8185602086016200246e565b62001ec7816200258a565b840191505092915050565b600062001ee1603c8362002377565b915062001eee826200259b565b604082019050919050565b600062001f0860268362002377565b915062001f1582620025ea565b604082019050919050565b600062001f2f602b8362002377565b915062001f3c8262002639565b604082019050919050565b600062001f5660378362002377565b915062001f638262002688565b604082019050919050565b600062001f7d60278362002377565b915062001f8a82620026d7565b604082019050919050565b600062001fa4602c8362002377565b915062001fb18262002726565b604082019050919050565b600062001fcb603d8362002377565b915062001fd88262002775565b604082019050919050565b600062001ff2602e8362002377565b915062001fff82620027c4565b604082019050919050565b60006200201960358362002377565b9150620020268262002813565b604082019050919050565b60006200204060388362002377565b91506200204d8262002862565b604082019050919050565b60006200206760368362002377565b91506200207482620028b1565b604082019050919050565b600060608301600083015162002099600086018262001cea565b506020830151620020ae602086018262001e80565b5060408301518482036040860152620020c8828262001d0c565b9150508091505092915050565b6000620020e3828462001e49565b915081905092915050565b600060608201905081810360008301526200210a818662001d76565b90506200211b602083018562001cfb565b81810360408301526200212f818462001e08565b9050949350505050565b6000602082019050818103600083015262002155818462001e91565b905092915050565b60006020820190508181036000830152620021788162001ed2565b9050919050565b600060208201905081810360008301526200219a8162001ef9565b9050919050565b60006020820190508181036000830152620021bc8162001f20565b9050919050565b60006020820190508181036000830152620021de8162001f47565b9050919050565b60006020820190508181036000830152620022008162001f6e565b9050919050565b60006020820190508181036000830152620022228162001f95565b9050919050565b60006020820190508181036000830152620022448162001fbc565b9050919050565b60006020820190508181036000830152620022668162001fe3565b9050919050565b6000602082019050818103600083015262002288816200200a565b9050919050565b60006020820190508181036000830152620022aa8162002031565b9050919050565b60006020820190508181036000830152620022cc8162002058565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000620023958262002438565b9150620023a28362002438565b925082821015620023b857620023b76200252c565b5b828203905092915050565b6000620023d08262002418565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050620024138262002900565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b6000620024678262002403565b9050919050565b60005b838110156200248e57808201518184015260208101905062002471565b838111156200249e576000848401525b50505050565b6000620024b18262002438565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415620024e757620024e66200252c565b5b600182019050919050565b6000620024ff8262002442565b91506bffffffffffffffffffffffff8214156200252157620025206200252c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106200291457620029136200255b565b5b50565b6200292281620023c3565b81146200292e57600080fd5b50565b61263580620029416000396000f3fe60806040523661000b57005b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9050809150600082600001600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013990611ecc565b60405180910390fd5b3660008037600080366000845af43d6000803e8060008114610163573d6000f35b3d6000fd5b600061017261065f565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60005b8351811015610614576000848281518110610286577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610307577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103a45761039f858381518110610349577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061038e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161068c565b610600565b600160028111156103de577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610417577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104b4576104af858381518110610459577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061049e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161092b565b6105ff565b6002808111156104ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610526577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156105c3576105be858381518110610568577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106105ad577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610bd5565b6105fe565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f590611e8c565b60405180910390fd5b5b5b50808061060c9061214d565b915050610242565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161064893929190611da5565b60405180910390a161065a8282610d86565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116106d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c790611e4c565b60405180910390fd5b60006106da61065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561074c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074390611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156107ba576107b98285610f99565b5b60005b8351811015610924576000848281518110610801577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ec90611f2c565b60405180910390fd5b6109018583868a611074565b838061090c90612196565b9450505050808061091c9061214d565b9150506107bd565b5050505050565b600081511161096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690611e4c565b60405180910390fd5b600061097961065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e290611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff161415610a5957610a588285610f99565b5b60005b8351811015610bce576000848281518110610aa0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8b90611f4c565b60405180910390fd5b610b9f858284611221565b610bab8583868a611074565b8380610bb690612196565b94505050508080610bc69061214d565b915050610a5c565b5050505050565b6000815111610c19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1090611e4c565b60405180910390fd5b6000610c2361065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8b90611f6c565b60405180910390fd5b60005b8251811015610d80576000838281518110610cdb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610d6b848284611221565b50508080610d789061214d565b915050610c97565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e04576000815114610dff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df690611e0c565b60405180910390fd5b610f95565b6000815111610e48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3f90611eec565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610e9e57610e9d826040518060600160405280602881526020016125dd6028913961196a565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610ec69190611d8e565b600060405180830381855af49150503d8060008114610f01576040519150601f19603f3d011682016040523d82523d6000602084013e610f06565b606091505b509150915081610f9257600081511115610f5757806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4e9190611dea565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8990611e2c565b60405180910390fd5b50505b5050565b610fbb816040518060600160405280602481526020016126056024913961196a565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611291576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128890611e6c565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611300576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f790611f0c565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506113d79190612041565b90508082146115b75760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001828154811061145e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611631577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156119635760006001866002018054905061171c9190612041565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146118a95760008760020183815481106117ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611816577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806118e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906119b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ad9190611dea565b60405180910390fd5b50505050565b60006119c88383611ad9565b60208301905092915050565b60006119e08383611d3e565b905092915050565b6119f181612075565b82525050565b611a0081612075565b82525050565b6000611a1182611fac565b611a1b8185611ff2565b9350611a2683611f8c565b8060005b83811015611a57578151611a3e88826119bc565b9750611a4983611fd8565b925050600181019050611a2a565b5085935050505092915050565b6000611a6f82611fb7565b611a798185612003565b935083602082028501611a8b85611f9c565b8060005b85811015611ac75784840389528151611aa885826119d4565b9450611ab383611fe5565b925060208a01995050600181019050611a8f565b50829750879550505050505092915050565b611ae281612087565b82525050565b6000611af382611fc2565b611afd8185612014565b9350611b0d81856020860161211a565b611b1681612229565b840191505092915050565b6000611b2c82611fc2565b611b368185612025565b9350611b4681856020860161211a565b80840191505092915050565b611b5b81612108565b82525050565b6000611b6c82611fcd565b611b768185612030565b9350611b8681856020860161211a565b611b8f81612229565b840191505092915050565b6000611ba7603c83612030565b9150611bb28261223a565b604082019050919050565b6000611bca602683612030565b9150611bd582612289565b604082019050919050565b6000611bed602b83612030565b9150611bf8826122d8565b604082019050919050565b6000611c10603783612030565b9150611c1b82612327565b604082019050919050565b6000611c33602783612030565b9150611c3e82612376565b604082019050919050565b6000611c56602c83612030565b9150611c61826123c5565b604082019050919050565b6000611c79602083612030565b9150611c8482612414565b602082019050919050565b6000611c9c603d83612030565b9150611ca78261243d565b604082019050919050565b6000611cbf602e83612030565b9150611cca8261248c565b604082019050919050565b6000611ce2603583612030565b9150611ced826124db565b604082019050919050565b6000611d05603883612030565b9150611d108261252a565b604082019050919050565b6000611d28603683612030565b9150611d3382612579565b604082019050919050565b6000606083016000830151611d5660008601826119e8565b506020830151611d696020860182611b52565b5060408301518482036040860152611d818282611a06565b9150508091505092915050565b6000611d9a8284611b21565b915081905092915050565b60006060820190508181036000830152611dbf8186611a64565b9050611dce60208301856119f7565b8181036040830152611de08184611ae8565b9050949350505050565b60006020820190508181036000830152611e048184611b61565b905092915050565b60006020820190508181036000830152611e2581611b9a565b9050919050565b60006020820190508181036000830152611e4581611bbd565b9050919050565b60006020820190508181036000830152611e6581611be0565b9050919050565b60006020820190508181036000830152611e8581611c03565b9050919050565b60006020820190508181036000830152611ea581611c26565b9050919050565b60006020820190508181036000830152611ec581611c49565b9050919050565b60006020820190508181036000830152611ee581611c6c565b9050919050565b60006020820190508181036000830152611f0581611c8f565b9050919050565b60006020820190508181036000830152611f2581611cb2565b9050919050565b60006020820190508181036000830152611f4581611cd5565b9050919050565b60006020820190508181036000830152611f6581611cf8565b9050919050565b60006020820190508181036000830152611f8581611d1b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061204c826120e6565b9150612057836120e6565b92508282101561206a576120696121cb565b5b828203905092915050565b6000612080826120c6565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60008190506120c1826125c8565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b6000612113826120b3565b9050919050565b60005b8381101561213857808201518184015260208101905061211d565b83811115612147576000848401525b50505050565b6000612158826120e6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561218b5761218a6121cb565b5b600182019050919050565b60006121a1826120f0565b91506bffffffffffffffffffffffff8214156121c0576121bf6121cb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374600082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106125d9576125d86121fa565b5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465" }, - "ENSAddressResolver": { + "DiamondCutFacet": { "abi": [ { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "node", - "type": "bytes32" + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "indexed": false, + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" }, { "indexed": false, "internalType": "address", - "name": "addr", + "name": "_init", "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" } ], - "name": "AddrChanged", + "name": "DiamondCut", "type": "event" }, { - "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "bytes32", - "name": "node", - "type": "bytes32" + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" }, { - "indexed": false, - "internalType": "uint256", - "name": "coinType", - "type": "uint256" + "internalType": "address", + "name": "_init", + "type": "address" }, { - "indexed": false, "internalType": "bytes", - "name": "newAddress", + "name": "_calldata", "type": "bytes" } ], - "name": "AddressChanged", - "type": "event" - }, + "name": "diamondCut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "addresses": { + "1": null, + "3": null, + "4": null, + "5": null, + "10": null, + "42": null, + "56": null, + "69": null, + "77": null, + "97": null, + "100": null, + "122": "0xf859F683a47b3D0E2A964eFDdf7392972700a101", + "123": "0xf859F683a47b3D0E2A964eFDdf7392972700a101", + "137": null, + "250": null, + "1284": null, + "1287": null, + "4002": null, + "4386": null, + "6666": null, + "9999": null, + "42161": null, + "42220": null, + "43113": null, + "43114": null, + "44787": null, + "80001": null, + "421611": null, + "1313161554": null, + "1313161555": null + }, + "byteCode": "0x608060405234801561001057600080fd5b5061298d806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80631f931c1c14610030575b600080fd5b61004a60048036038101906100459190611b35565b61004c565b005b6100546100b6565b6100af8585906100649190612387565b8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610151565b5050505050565b6100be610571565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461014f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101469061204e565b60405180910390fd5b565b60005b8351811015610526576000848281518110610198577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156101e0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610219577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156102b6576102b185838151811061025b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106102a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161059e565b610512565b600160028111156102f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610329577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103c6576103c185838151811061036b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106103b0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161083d565b610511565b6002808111156103ff577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610438577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104d5576104d085838151811061047a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106104bf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610ae7565b610510565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610507906120ae565b60405180910390fd5b5b5b50808061051e90612412565b915050610154565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161055a93929190611fa7565b60405180910390a161056c8282610c98565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116105e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d99061206e565b60405180910390fd5b60006105ec610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561065e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610655906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156106cc576106cb8285610eab565b5b60005b8351811015610836576000848281518110610713577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610807576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107fe9061212e565b60405180910390fd5b6108138583868a610f86565b838061081e9061245b565b9450505050808061082e90612412565b9150506106cf565b5050505050565b6000815111610881576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108789061206e565b60405180910390fd5b600061088b610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f4906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff16141561096b5761096a8285610eab565b5b60005b8351811015610ae05760008482815181106109b2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9d9061214e565b60405180910390fd5b610ab1858284611133565b610abd8583868a610f86565b8380610ac89061245b565b94505050508080610ad890612412565b91505061096e565b5050505050565b6000815111610b2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b229061206e565b60405180910390fd5b6000610b35610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610ba6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9d9061216e565b60405180910390fd5b60005b8251811015610c92576000838281518110610bed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610c7d848284611133565b50508080610c8a90612412565b915050610ba9565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d16576000815114610d11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d089061200e565b60405180910390fd5b610ea7565b6000815111610d5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d51906120ee565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610db057610daf826040518060600160405280602881526020016129356028913961187c565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610dd89190611f90565b600060405180830381855af49150503d8060008114610e13576040519150601f19603f3d011682016040523d82523d6000602084013e610e18565b606091505b509150915081610ea457600081511115610e6957806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e609190611fec565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9b9061202e565b60405180910390fd5b50505b5050565b610ecd8160405180606001604052806024815260200161295d6024913961187c565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119a9061208e565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611212576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112099061210e565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506112e991906122c0565b90508082146114c95760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018281548110611370577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611412577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611543577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156118755760006001866002018054905061162e91906122c0565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146117bb5760008760020183815481106116be577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611728577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806117f5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906118c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bf9190611fec565b60405180910390fd5b50505050565b60006118e16118dc846121b3565b61218e565b9050808382526020820190508285602086028201111561190057600080fd5b60005b8581101561193057816119168882611a49565b845260208401935060208301925050600181019050611903565b5050509392505050565b600061194d611948846121df565b61218e565b9050808382526020820190508285602086028201111561196c57600080fd5b60005b858110156119b657813567ffffffffffffffff81111561198e57600080fd5b80860161199b8982611abd565b8552602085019450602084019350505060018101905061196f565b5050509392505050565b6000813590506119cf816128f6565b92915050565b600082601f8301126119e657600080fd5b81356119f68482602086016118ce565b91505092915050565b60008083601f840112611a1157600080fd5b8235905067ffffffffffffffff811115611a2a57600080fd5b602083019150836020820283011115611a4257600080fd5b9250929050565b600081359050611a588161290d565b92915050565b60008083601f840112611a7057600080fd5b8235905067ffffffffffffffff811115611a8957600080fd5b602083019150836001820283011115611aa157600080fd5b9250929050565b600081359050611ab781612924565b92915050565b600060608284031215611acf57600080fd5b611ad9606061218e565b90506000611ae9848285016119c0565b6000830152506020611afd84828501611aa8565b602083015250604082013567ffffffffffffffff811115611b1d57600080fd5b611b29848285016119d5565b60408301525092915050565b600080600080600060608688031215611b4d57600080fd5b600086013567ffffffffffffffff811115611b6757600080fd5b611b73888289016119ff565b95509550506020611b86888289016119c0565b935050604086013567ffffffffffffffff811115611ba357600080fd5b611baf88828901611a5e565b92509250509295509295909350565b6000611bca8383611cdb565b60208301905092915050565b6000611be28383611f40565b905092915050565b611bf3816122f4565b82525050565b611c02816122f4565b82525050565b6000611c138261222b565b611c1d8185612271565b9350611c288361220b565b8060005b83811015611c59578151611c408882611bbe565b9750611c4b83612257565b925050600181019050611c2c565b5085935050505092915050565b6000611c7182612236565b611c7b8185612282565b935083602082028501611c8d8561221b565b8060005b85811015611cc95784840389528151611caa8582611bd6565b9450611cb583612264565b925060208a01995050600181019050611c91565b50829750879550505050505092915050565b611ce481612306565b82525050565b6000611cf582612241565b611cff8185612293565b9350611d0f8185602086016123ae565b611d188161251d565b840191505092915050565b6000611d2e82612241565b611d3881856122a4565b9350611d488185602086016123ae565b80840191505092915050565b611d5d8161239c565b82525050565b6000611d6e8261224c565b611d7881856122af565b9350611d888185602086016123ae565b611d918161251d565b840191505092915050565b6000611da9603c836122af565b9150611db48261252e565b604082019050919050565b6000611dcc6026836122af565b9150611dd78261257d565b604082019050919050565b6000611def6022836122af565b9150611dfa826125cc565b604082019050919050565b6000611e12602b836122af565b9150611e1d8261261b565b604082019050919050565b6000611e356037836122af565b9150611e408261266a565b604082019050919050565b6000611e586027836122af565b9150611e63826126b9565b604082019050919050565b6000611e7b602c836122af565b9150611e8682612708565b604082019050919050565b6000611e9e603d836122af565b9150611ea982612757565b604082019050919050565b6000611ec1602e836122af565b9150611ecc826127a6565b604082019050919050565b6000611ee46035836122af565b9150611eef826127f5565b604082019050919050565b6000611f076038836122af565b9150611f1282612844565b604082019050919050565b6000611f2a6036836122af565b9150611f3582612893565b604082019050919050565b6000606083016000830151611f586000860182611bea565b506020830151611f6b6020860182611d54565b5060408301518482036040860152611f838282611c08565b9150508091505092915050565b6000611f9c8284611d23565b915081905092915050565b60006060820190508181036000830152611fc18186611c66565b9050611fd06020830185611bf9565b8181036040830152611fe28184611cea565b9050949350505050565b600060208201905081810360008301526120068184611d63565b905092915050565b6000602082019050818103600083015261202781611d9c565b9050919050565b6000602082019050818103600083015261204781611dbf565b9050919050565b6000602082019050818103600083015261206781611de2565b9050919050565b6000602082019050818103600083015261208781611e05565b9050919050565b600060208201905081810360008301526120a781611e28565b9050919050565b600060208201905081810360008301526120c781611e4b565b9050919050565b600060208201905081810360008301526120e781611e6e565b9050919050565b6000602082019050818103600083015261210781611e91565b9050919050565b6000602082019050818103600083015261212781611eb4565b9050919050565b6000602082019050818103600083015261214781611ed7565b9050919050565b6000602082019050818103600083015261216781611efa565b9050919050565b6000602082019050818103600083015261218781611f1d565b9050919050565b60006121986121a9565b90506121a482826123e1565b919050565b6000604051905090565b600067ffffffffffffffff8211156121ce576121cd6124ee565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156121fa576121f96124ee565b5b602082029050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006122cb82612365565b91506122d683612365565b9250828210156122e9576122e8612490565b5b828203905092915050565b60006122ff82612345565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050612340826128e2565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b600061239436848461193a565b905092915050565b60006123a782612332565b9050919050565b60005b838110156123cc5780820151818401526020810190506123b1565b838111156123db576000848401525b50505050565b6123ea8261251d565b810181811067ffffffffffffffff82111715612409576124086124ee565b5b80604052505050565b600061241d82612365565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156124505761244f612490565b5b600182019050919050565b60006124668261236f565b91506bffffffffffffffffffffffff82141561248557612484612490565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106128f3576128f26124bf565b5b50565b6128ff816122f4565b811461290a57600080fd5b50565b61291681612306565b811461292157600080fd5b50565b6003811061293157600080fd5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a" + }, + "DiamondLoupeFacet": { + "abi": [ { "inputs": [ { - "internalType": "bytes32", - "name": "node", - "type": "bytes32" + "internalType": "bytes4", + "name": "_functionSelector", + "type": "bytes4" } ], - "name": "addr", + "name": "facetAddress", "outputs": [ { "internalType": "address", - "name": "", + "name": "facetAddress_", "type": "address" } ], @@ -921,14 +1195,226 @@ module.exports = { "type": "function" }, { - "inputs": [ - { - "internalType": "bytes32", - "name": "node", - "type": "bytes32" - }, + "inputs": [], + "name": "facetAddresses", + "outputs": [ { - "internalType": "uint256", + "internalType": "address[]", + "name": "facetAddresses_", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_facet", + "type": "address" + } + ], + "name": "facetFunctionSelectors", + "outputs": [ + { + "internalType": "bytes4[]", + "name": "facetFunctionSelectors_", + "type": "bytes4[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "facets", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IDiamondLoupe.Facet[]", + "name": "facets_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "_interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "addresses": { + "1": null, + "3": null, + "4": null, + "5": null, + "10": null, + "42": null, + "56": null, + "69": null, + "77": null, + "97": null, + "100": null, + "122": "0x8BFbB21683e21DC4B11af352117d6D4F2bc62f8e", + "123": "0x8BFbB21683e21DC4B11af352117d6D4F2bc62f8e", + "137": null, + "250": null, + "1284": null, + "1287": null, + "4002": null, + "4386": null, + "6666": null, + "9999": null, + "42161": null, + "42220": null, + "43113": null, + "43114": null, + "44787": null, + "80001": null, + "421611": null, + "1313161554": null, + "1313161555": null + }, + "byteCode": "0x608060405234801561001057600080fd5b50610c11806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c57806352ef6b2c1461008c5780637a0ed627146100aa578063adfca15e146100c8578063cdffacc6146100f8575b600080fd5b6100766004803603810190610071919061071d565b610128565b6040516100839190610a13565b60405180910390f35b61009461019e565b6040516100a191906109ad565b60405180910390f35b6100b261023b565b6040516100bf91906109f1565b60405180910390f35b6100e260048036038101906100dd91906106f4565b6104f6565b6040516100ef91906109cf565b60405180910390f35b610112600480360381019061010d919061071d565b6105e1565b60405161011f9190610992565b60405180910390f35b60008061013361066d565b9050806003016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff16915050919050565b606060006101aa61066d565b90508060020180548060200260200160405190810160405280929190818152602001828054801561023057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116101e6575b505050505091505090565b6060600061024761066d565b90506000816002018054905090508067ffffffffffffffff811115610295577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102ce57816020015b6102bb61069a565b8152602001906001900390816102b35790505b50925060005b818110156104f057600083600201828154811061031a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080858381518110610381577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561048f57602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001906004019060208260030104928301926001038202915080841161043c5790505b50505050508583815181106104cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001819052505080806104e890610b5e565b9150506102d4565b50505090565b6060600061050261066d565b90508060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806020026020016040519081016040528092919081815260200182805480156105d457602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600401906020826003010492830192600103820291508084116105815790505b5050505050915050919050565b6000806105ec61066d565b9050806000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b6000813590506106d981610bd6565b92915050565b6000813590506106ee81610bed565b92915050565b60006020828403121561070657600080fd5b6000610714848285016106ca565b91505092915050565b60006020828403121561072f57600080fd5b600061073d848285016106df565b91505092915050565b6000610752838361078a565b60208301905092915050565b600061076a8383610946565b60208301905092915050565b60006107828383610955565b905092915050565b61079381610aea565b82525050565b6107a281610aea565b82525050565b60006107b382610a5e565b6107bd8185610aa6565b93506107c883610a2e565b8060005b838110156107f95781516107e08882610746565b97506107eb83610a7f565b9250506001810190506107cc565b5085935050505092915050565b600061081182610a69565b61081b8185610ab7565b935061082683610a3e565b8060005b8381101561085757815161083e888261075e565b975061084983610a8c565b92505060018101905061082a565b5085935050505092915050565b600061086f82610a69565b6108798185610ac8565b935061088483610a3e565b8060005b838110156108b557815161089c888261075e565b97506108a783610a8c565b925050600181019050610888565b5085935050505092915050565b60006108cd82610a74565b6108d78185610ad9565b9350836020820285016108e985610a4e565b8060005b8581101561092557848403895281516109068582610776565b945061091183610a99565b925060208a019950506001810190506108ed565b50829750879550505050505092915050565b61094081610afc565b82525050565b61094f81610b08565b82525050565b600060408301600083015161096d600086018261078a565b50602083015184820360208601526109858282610806565b9150508091505092915050565b60006020820190506109a76000830184610799565b92915050565b600060208201905081810360008301526109c781846107a8565b905092915050565b600060208201905081810360008301526109e98184610864565b905092915050565b60006020820190508181036000830152610a0b81846108c2565b905092915050565b6000602082019050610a286000830184610937565b92915050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610af582610b34565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610b6982610b54565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610b9c57610b9b610ba7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610bdf81610aea565b8114610bea57600080fd5b50565b610bf681610b08565b8114610c0157600080fd5b5056fea164736f6c6343000804000a" + }, + "ENSAbstractResolver": { + "abi": [], + "addresses": { + "1": null, + "3": null, + "4": null, + "5": null, + "10": null, + "42": null, + "56": null, + "69": null, + "77": null, + "97": null, + "100": null, + "122": null, + "123": null, + "137": null, + "250": null, + "1284": null, + "1287": null, + "4002": null, + "4386": null, + "6666": null, + "9999": null, + "42161": null, + "42220": null, + "43113": null, + "43114": null, + "44787": null, + "80001": null, + "421611": null, + "1313161554": null, + "1313161555": null + }, + "byteCode": "0x" + }, + "ENSAddressResolver": { + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "AddrChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "coinType", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "newAddress", + "type": "bytes" + } + ], + "name": "AddressChanged", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "addr", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "uint256", "name": "coinType", "type": "uint256" } @@ -998,6 +1484,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -1787,6 +2275,8 @@ module.exports = { "77": "0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08", "97": "0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08", "100": "0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08", + "122": "0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08", + "123": "0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08", "137": "0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08", "250": "0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08", "1284": "0xE23c8f8aB1Cdd56D89F181c22Bf43e5b53871E08", @@ -1917,6 +2407,8 @@ module.exports = { "77": "0xF330b17e19474762E6F408D7dCf0327264d4A2C0", "97": "0xF330b17e19474762E6F408D7dCf0327264d4A2C0", "100": "0xF330b17e19474762E6F408D7dCf0327264d4A2C0", + "122": "0xF330b17e19474762E6F408D7dCf0327264d4A2C0", + "123": "0xF330b17e19474762E6F408D7dCf0327264d4A2C0", "137": "0xF330b17e19474762E6F408D7dCf0327264d4A2C0", "250": "0xF330b17e19474762E6F408D7dCf0327264d4A2C0", "1284": "0xF330b17e19474762E6F408D7dCf0327264d4A2C0", @@ -2008,6 +2500,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -2115,6 +2609,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -2524,6 +3020,8 @@ module.exports = { "77": "0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688", "97": "0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688", "100": "0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688", + "122": "0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688", + "123": "0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688", "137": "0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688", "250": "0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688", "1284": "0xf17BCfd10B65fD0792dEef7a17Aa08B4b0086688", @@ -2728,6 +3226,8 @@ module.exports = { "77": "0x523C92966e9d2067ba547f59D51E907c20FD8761", "97": "0x523C92966e9d2067ba547f59D51E907c20FD8761", "100": "0x523C92966e9d2067ba547f59D51E907c20FD8761", + "122": "0x523C92966e9d2067ba547f59D51E907c20FD8761", + "123": "0x523C92966e9d2067ba547f59D51E907c20FD8761", "137": "0x523C92966e9d2067ba547f59D51E907c20FD8761", "250": "0x523C92966e9d2067ba547f59D51E907c20FD8761", "1284": "0x523C92966e9d2067ba547f59D51E907c20FD8761", @@ -2835,6 +3335,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -3092,6 +3594,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -3361,6 +3865,8 @@ module.exports = { "77": "0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc", "97": "0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc", "100": "0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc", + "122": "0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc", + "123": "0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc", "137": "0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc", "250": "0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc", "1284": "0x502BbBcC044d2B146c310eB24E5cd8Eba37EdbEc", @@ -3650,56 +4156,1588 @@ module.exports = { "type": "address" }, { - "internalType": "contract PersonalAccountRegistry", - "name": "personalAccountRegistry_", - "type": "address" + "internalType": "contract PersonalAccountRegistry", + "name": "personalAccountRegistry_", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isInitialized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "personalAccountRegistry", + "outputs": [ + { + "internalType": "contract PersonalAccountRegistry", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "sendBatch", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address[]", + "name": "to", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "sendBatchFromAccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "addresses": { + "1": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "3": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "4": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "5": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "10": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "42": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "56": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "69": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "77": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "97": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "100": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "122": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "123": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "137": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "250": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "1284": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "1287": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "4002": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "4386": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "6666": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "9999": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "42161": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "42220": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "43113": "0xf96E0A8e408604F2c45e13c89bB395815BD5Efc6", + "43114": "0xf96E0A8e408604F2c45e13c89bB395815BD5Efc6", + "44787": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "80001": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "421611": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "1313161554": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", + "1313161555": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163" + }, + "byteCode": "0x608060405234801561001057600080fd5b50326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600046905080600181905550506123f58061006d6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063867519c61161008c5780639f255626116100665780639f255626146101fe578063b5021b161461021a578063d2c83b9a14610236578063f92c5f7c14610254576100cf565b8063867519c6146101a657806387d31313146101c25780639a8a0592146101e0576100cf565b8063231badaf146100d4578063392e53cd146100f0578063485cc9551461010e5780635afaa7bb1461012a57806373e5a13f1461014657806376db2b4c14610176575b600080fd5b6100ee60048036038101906100e99190611438565b610284565b005b6100f861037f565b6040516101059190611e71565b60405180910390f35b610128600480360381019061012391906115e0565b6103d5565b005b610144600480360381019061013f9190611563565b610561565b005b610160600480360381019061015b919061165d565b610739565b60405161016d9190611e8c565b60405180910390f35b610190600480360381019061018b919061161c565b61075e565b60405161019d9190611e8c565b60405180910390f35b6101c060048036038101906101bb91906113b9565b610788565b005b6101ca610799565b6040516101d79190611f07565b60405180910390f35b6101e86107bf565b6040516101f591906120a2565b60405180910390f35b610218600480360381019061021391906114f7565b6107c5565b005b610234600480360381019061022f9190611438565b6107d5565b005b61023e6108d1565b60405161024b9190611eec565b60405180910390f35b61026e60048036038101906102699190611390565b6108f7565b60405161027b91906120a2565b60405180910390f35b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411610305576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102fc90611f82565b60405180910390fd5b60006103258261031788888888610953565b6109b690919063ffffffff16565b905084600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061037786828686610a71565b505050505050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610463576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161045a90611f42565b60405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516105559190611def565b60405180910390a15050565b60008251116105a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059c90611fc2565b60405180910390fd5b600080600090505b83518110156106f35760003073ffffffffffffffffffffffffffffffffffffffff168583815181106105db57fe5b60200260200101516040516105f09190611d0b565b6000604051808303816000865af19150503d806000811461062d576040519150601f19603f3d011682016040523d82523d6000602084013e610632565b606091505b505090508315610681578061067c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067390611f62565b60405180910390fd5b610697565b80801561068c575082155b1561069657600192505b5b7f361c14722cc344132c73396113f7164232448b09c544a149f09048648b43d872338684815181106106c557fe5b6020026020010151836040516106dd93929190611e0a565b60405180910390a15080806001019150506105ad565b5080610734576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072b90612082565b60405180910390fd5b505050565b60006107578260000151836020015184604001518560600151610953565b9050919050565b600061078182600001518360200151846040015185606001518660800151610edc565b9050919050565b61079483338484610a71565b505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b6107d133338484610a71565b5050565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084d90611f82565b60405180910390fd5b600061087782610869888888883a610edc565b6109b690919063ffffffff16565b905084600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108c986828686610a71565b505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061094c6001600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f4290919063ffffffff16565b9050919050565b60006109ac7f6848d0622081db2451400280dead7a739a080cb93852607c381af11e289769b286868661098587610f97565b6040516020016109989493929190611c6e565b604051602081830303815290604052610ffa565b9050949350505050565b60008060009050604183511415610a675760008060006020860151925060408601519150606086015160001a9050601b8160ff1610156109f757601b810190505b601b8160ff161480610a0c5750601c8160ff16145b15610a635760018782858560405160008152602001604052604051610a349493929190611ea7565b6020604051602081039080840390855afa158015610a56573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad890611fa2565b60405180910390fd5b6000825111610b25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1c90612062565b60405180910390fd5b8151815114610b69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6090612002565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610d3d57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b8152600401610bf9929190611e48565b60206040518083038186803b158015610c1157600080fd5b505afa158015610c25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4991906115b7565b80610cfd5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b8152600401610cac929190611e48565b60206040518083038186803b158015610cc457600080fd5b505afa158015610cd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfc91906115b7565b5b610d3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3390611fe2565b60405180910390fd5b5b600080600090505b8251811015610ed457600073ffffffffffffffffffffffffffffffffffffffff16848281518110610d7257fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415610dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc890611f22565b60405180910390fd5b838181518110610ddd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16838281518110610e0757fe5b60200260200101518787604051602001610e2393929190611d22565b604051602081830303815290604052604051610e3f9190611d0b565b6000604051808303816000865af19150503d8060008114610e7c576040519150601f19603f3d011682016040523d82523d6000602084013e610e81565b606091505b50508092505081610ec7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ebe90612022565b60405180910390fd5b8080600101915050610d45565b505050505050565b6000610f377f6f4e1b2b1e5e49f4269e19e16e67a00cb0a796d96d30be3e4b540d3732e8bcad878787610f0e88610f97565b87604051602001610f23959493929190611cb4565b604051602081830303815290604052610ffa565b905095945050505050565b600080828401905083811015610f8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8490612042565b60405180910390fd5b8091505092915050565b60608060008351905060005b81811015610fef5782858281518110610fb857fe5b6020026020010151604051602001610fd1929190611d5b565b60405160208183030381529060405292508080600101915050610fa3565b508192505050919050565b60006110336001543085856040516020016110189493929190611da5565b6040516020818303038152906040528051906020012061103b565b905092915050565b60008160405160200161104e9190611d7f565b604051602081830303815290604052805190602001209050919050565b60008135905061107a81612375565b92915050565b600082601f83011261109157600080fd5b81356110a461109f826120ea565b6120bd565b915081818352602084019350602081019050838560208402820111156110c957600080fd5b60005b838110156110f957816110df888261106b565b8452602084019350602083019250506001810190506110cc565b5050505092915050565b600082601f83011261111457600080fd5b813561112761112282612112565b6120bd565b9150818183526020840193506020810190508360005b8381101561116d578135860161115388826111a1565b84526020840193506020830192505060018101905061113d565b5050505092915050565b6000813590506111868161238c565b92915050565b60008151905061119b8161238c565b92915050565b600082601f8301126111b257600080fd5b81356111c56111c08261213a565b6120bd565b915080825260208301602083018583830111156111e157600080fd5b6111ec8382846122dd565b50505092915050565b600081359050611204816123a3565b92915050565b600081359050611219816123ba565b92915050565b600060a0828403121561123157600080fd5b61123b60a06120bd565b9050600061124b8482850161106b565b600083015250602061125f8482850161137b565b602083015250604082013567ffffffffffffffff81111561127f57600080fd5b61128b84828501611080565b604083015250606082013567ffffffffffffffff8111156112ab57600080fd5b6112b784828501611103565b60608301525060806112cb8482850161137b565b60808301525092915050565b6000608082840312156112e957600080fd5b6112f360806120bd565b905060006113038482850161106b565b60008301525060206113178482850161137b565b602083015250604082013567ffffffffffffffff81111561133757600080fd5b61134384828501611080565b604083015250606082013567ffffffffffffffff81111561136357600080fd5b61136f84828501611103565b60608301525092915050565b60008135905061138a816123d1565b92915050565b6000602082840312156113a257600080fd5b60006113b08482850161106b565b91505092915050565b6000806000606084860312156113ce57600080fd5b60006113dc8682870161106b565b935050602084013567ffffffffffffffff8111156113f957600080fd5b61140586828701611080565b925050604084013567ffffffffffffffff81111561142257600080fd5b61142e86828701611103565b9150509250925092565b600080600080600060a0868803121561145057600080fd5b600061145e8882890161106b565b955050602061146f8882890161137b565b945050604086013567ffffffffffffffff81111561148c57600080fd5b61149888828901611080565b935050606086013567ffffffffffffffff8111156114b557600080fd5b6114c188828901611103565b925050608086013567ffffffffffffffff8111156114de57600080fd5b6114ea888289016111a1565b9150509295509295909350565b6000806040838503121561150a57600080fd5b600083013567ffffffffffffffff81111561152457600080fd5b61153085828601611080565b925050602083013567ffffffffffffffff81111561154d57600080fd5b61155985828601611103565b9150509250929050565b6000806040838503121561157657600080fd5b600083013567ffffffffffffffff81111561159057600080fd5b61159c85828601611103565b92505060206115ad85828601611177565b9150509250929050565b6000602082840312156115c957600080fd5b60006115d78482850161118c565b91505092915050565b600080604083850312156115f357600080fd5b6000611601858286016111f5565b92505060206116128582860161120a565b9150509250929050565b60006020828403121561162e57600080fd5b600082013567ffffffffffffffff81111561164857600080fd5b6116548482850161121f565b91505092915050565b60006020828403121561166f57600080fd5b600082013567ffffffffffffffff81111561168957600080fd5b611695848285016112d7565b91505092915050565b60006116aa83836116d4565b60208301905092915050565b6116bf8161225f565b82525050565b6116ce816121dc565b82525050565b6116dd816121dc565b82525050565b6116f46116ef826121dc565b61231f565b82525050565b600061170582612176565b61170f8185612199565b935061171a83612166565b8060005b8381101561174b578151611732888261169e565b975061173d8361218c565b92505060018101905061171e565b5085935050505092915050565b611761816121ee565b82525050565b611770816121fa565b82525050565b611787611782826121fa565b612331565b82525050565b600061179882612181565b6117a281856121a4565b93506117b28185602086016122ec565b6117bb81612357565b840191505092915050565b60006117d182612181565b6117db81856121b5565b93506117eb8185602086016122ec565b80840191505092915050565b61180081612271565b82525050565b61180f81612295565b82525050565b6000611822601b836121c0565b91507f476174657761793a2063616e6e6f742073656e6420746f2030783000000000006000830152602082019050919050565b6000611862601c836121d1565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b60006118a2602f836121c0565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b60006119086017836121c0565b91507f476174657761793a2062617463682072657665727465640000000000000000006000830152602082019050919050565b60006119486032836121c0565b91507f476174657761793a206e6f6e6365206973206c6f776572207468616e2063757260008301527f72656e74206163636f756e74206e6f6e636500000000000000000000000000006020830152604082019050919050565b60006119ae6025836121c0565b91507f476174657761793a2063616e6e6f742073656e642066726f6d2030783020616360008301527f636f756e740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a146026836121c0565b91507f476174657761793a2063616e6e6f742064656c656761746520656d707479206260008301527f61746368657300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a7a6028836121c0565b91507f476174657761793a2073656e646572206973206e6f7420746865206163636f7560008301527f6e74206f776e65720000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611ae06016836121c0565b91507f476174657761793a20696e76616c6964206261746368000000000000000000006000830152602082019050919050565b6000611b206023836121c0565b91507f476174657761793a206261746368207472616e73616374696f6e20726576657260008301527f74656400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611b86601e836121c0565b91507f536166654d6174684c69623a206164646974696f6e206f766572666c6f7700006000830152602082019050919050565b6000611bc66020836121c0565b91507f476174657761793a2063616e6e6f742073656e6420656d7074792062617463686000830152602082019050919050565b6000611c06601d836121c0565b91507f476174657761793a20616c6c20626174636865732072657665727465640000006000830152602082019050919050565b611c4281612248565b82525050565b611c59611c5482612248565b61234d565b82525050565b611c6881612252565b82525050565b6000611c7a82876116e3565b601482019150611c8a8286611c48565b602082019150611c9a82856116fa565b9150611ca682846117c6565b915081905095945050505050565b6000611cc082886116e3565b601482019150611cd08287611c48565b602082019150611ce082866116fa565b9150611cec82856117c6565b9150611cf88284611c48565b6020820191508190509695505050505050565b6000611d1782846117c6565b915081905092915050565b6000611d2e82866117c6565b9150611d3a82856116e3565b601482019150611d4a82846116e3565b601482019150819050949350505050565b6000611d6782856117c6565b9150611d7382846117c6565b91508190509392505050565b6000611d8a82611855565b9150611d968284611776565b60208201915081905092915050565b6000611db18287611c48565b602082019150611dc182866116e3565b601482019150611dd18285611776565b602082019150611de182846117c6565b915081905095945050505050565b6000602082019050611e0460008301846116b6565b92915050565b6000606082019050611e1f60008301866116b6565b8181036020830152611e31818561178d565b9050611e406040830184611758565b949350505050565b6000604082019050611e5d60008301856116c5565b611e6a60208301846116c5565b9392505050565b6000602082019050611e866000830184611758565b92915050565b6000602082019050611ea16000830184611767565b92915050565b6000608082019050611ebc6000830187611767565b611ec96020830186611c5f565b611ed66040830185611767565b611ee36060830184611767565b95945050505050565b6000602082019050611f0160008301846117f7565b92915050565b6000602082019050611f1c6000830184611806565b92915050565b60006020820190508181036000830152611f3b81611815565b9050919050565b60006020820190508181036000830152611f5b81611895565b9050919050565b60006020820190508181036000830152611f7b816118fb565b9050919050565b60006020820190508181036000830152611f9b8161193b565b9050919050565b60006020820190508181036000830152611fbb816119a1565b9050919050565b60006020820190508181036000830152611fdb81611a07565b9050919050565b60006020820190508181036000830152611ffb81611a6d565b9050919050565b6000602082019050818103600083015261201b81611ad3565b9050919050565b6000602082019050818103600083015261203b81611b13565b9050919050565b6000602082019050818103600083015261205b81611b79565b9050919050565b6000602082019050818103600083015261207b81611bb9565b9050919050565b6000602082019050818103600083015261209b81611bf9565b9050919050565b60006020820190506120b76000830184611c39565b92915050565b6000604051905081810181811067ffffffffffffffff821117156120e057600080fd5b8060405250919050565b600067ffffffffffffffff82111561210157600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561212957600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561215157600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006121e782612228565b9050919050565b60008115159050919050565b6000819050919050565b600061220f826121dc565b9050919050565b6000612221826121dc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061226a826122b9565b9050919050565b600061227c82612283565b9050919050565b600061228e82612228565b9050919050565b60006122a0826122a7565b9050919050565b60006122b282612228565b9050919050565b60006122c4826122cb565b9050919050565b60006122d682612228565b9050919050565b82818337600083830152505050565b60005b8381101561230a5780820151818401526020810190506122ef565b83811115612319576000848401525b50505050565b600061232a8261233b565b9050919050565b6000819050919050565b600061234682612368565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61237e816121dc565b811461238957600080fd5b50565b612395816121ee565b81146123a057600080fd5b50565b6123ac81612204565b81146123b757600080fd5b50565b6123c381612216565b81146123ce57600080fd5b50565b6123da81612248565b81146123e557600080fd5b5056fea164736f6c634300060c000a" + }, + "GatewayRecipient": { + "abi": [ + { + "inputs": [], + "name": "gateway", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "addresses": { + "1": null, + "3": null, + "4": null, + "5": null, + "10": null, + "42": null, + "56": null, + "69": null, + "77": null, + "97": null, + "100": null, + "122": null, + "123": null, + "137": null, + "250": null, + "1284": null, + "1287": null, + "4002": null, + "4386": null, + "6666": null, + "9999": null, + "42161": null, + "42220": null, + "43113": null, + "43114": null, + "44787": null, + "80001": null, + "421611": null, + "1313161554": null, + "1313161555": null + }, + "byteCode": "0x" + }, + "Guarded": { + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "GuardianRemoved", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "addGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "isGuardian", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "guardian", + "type": "address" + } + ], + "name": "removeGuardian", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "messageHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "verifyGuardianSignature", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "addresses": { + "1": null, + "3": null, + "4": null, + "5": null, + "10": null, + "42": null, + "56": null, + "69": null, + "77": null, + "97": null, + "100": null, + "122": null, + "123": null, + "137": null, + "250": null, + "1284": null, + "1287": null, + "4002": null, + "4386": null, + "6666": null, + "9999": null, + "42161": null, + "42220": null, + "43113": null, + "43114": null, + "44787": null, + "80001": null, + "421611": null, + "1313161554": null, + "1313161555": null + }, + "byteCode": "0x" + }, + "IDiamondCut": { + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "indexed": false, + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" + }, + { + "indexed": false, + "internalType": "address", + "name": "_init", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "DiamondCut", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "_init", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + } + ], + "name": "diamondCut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "addresses": { + "1": null, + "3": null, + "4": null, + "5": null, + "10": null, + "42": null, + "56": null, + "69": null, + "77": null, + "97": null, + "100": null, + "122": null, + "123": null, + "137": null, + "250": null, + "1284": null, + "1287": null, + "4002": null, + "4386": null, + "6666": null, + "9999": null, + "42161": null, + "42220": null, + "43113": null, + "43114": null, + "44787": null, + "80001": null, + "421611": null, + "1313161554": null, + "1313161555": null + }, + "byteCode": "0x" + }, + "IDiamondLoupe": { + "abi": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "_functionSelector", + "type": "bytes4" + } + ], + "name": "facetAddress", + "outputs": [ + { + "internalType": "address", + "name": "facetAddress_", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "facetAddresses", + "outputs": [ + { + "internalType": "address[]", + "name": "facetAddresses_", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_facet", + "type": "address" + } + ], + "name": "facetFunctionSelectors", + "outputs": [ + { + "internalType": "bytes4[]", + "name": "facetFunctionSelectors_", + "type": "bytes4[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "facets", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IDiamondLoupe.Facet[]", + "name": "facets_", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "addresses": { + "1": null, + "3": null, + "4": null, + "5": null, + "10": null, + "42": null, + "56": null, + "69": null, + "77": null, + "97": null, + "100": null, + "122": null, + "123": null, + "137": null, + "250": null, + "1284": null, + "1287": null, + "4002": null, + "4386": null, + "6666": null, + "9999": null, + "42161": null, + "42220": null, + "43113": null, + "43114": null, + "44787": null, + "80001": null, + "421611": null, + "1313161554": null, + "1313161555": null + }, + "byteCode": "0x" + }, + "IERC165": { + "abi": [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "addresses": { + "1": null, + "3": null, + "4": null, + "5": null, + "10": null, + "42": null, + "56": null, + "69": null, + "77": null, + "97": null, + "100": null, + "122": null, + "123": null, + "137": null, + "250": null, + "1284": null, + "1287": null, + "4002": null, + "4386": null, + "6666": null, + "9999": null, + "42161": null, + "42220": null, + "43113": null, + "43114": null, + "44787": null, + "80001": null, + "421611": null, + "1313161554": null, + "1313161555": null + }, + "byteCode": "0x" + }, + "IERC173": { + "abi": [ + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "owner_", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "addresses": { + "1": null, + "3": null, + "4": null, + "5": null, + "10": null, + "42": null, + "56": null, + "69": null, + "77": null, + "97": null, + "100": null, + "122": null, + "123": null, + "137": null, + "250": null, + "1284": null, + "1287": null, + "4002": null, + "4386": null, + "6666": null, + "9999": null, + "42161": null, + "42220": null, + "43113": null, + "43114": null, + "44787": null, + "80001": null, + "421611": null, + "1313161554": null, + "1313161555": null + }, + "byteCode": "0x" + }, + "IERC20": { + "abi": [ + { + "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": "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" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "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": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": "", + "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": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "addresses": { + "1": null, + "3": null, + "4": null, + "5": null, + "10": null, + "42": null, + "56": null, + "69": null, + "77": null, + "97": null, + "100": null, + "122": null, + "123": null, + "137": null, + "250": null, + "1284": null, + "1287": null, + "4002": null, + "4386": null, + "6666": null, + "9999": null, + "42161": null, + "42220": null, + "43113": null, + "43114": null, + "44787": null, + "80001": null, + "421611": null, + "1313161554": null, + "1313161555": null + }, + "byteCode": "0x" + }, + "ISuperAgreement": { + "abi": [ + { + "inputs": [], + "name": "agreementType", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract ISuperfluidToken", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "realtimeBalanceOf", + "outputs": [ + { + "internalType": "int256", + "name": "dynamicBalance", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "deposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "owedDeposit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "addresses": { + "1": null, + "3": null, + "4": null, + "5": null, + "10": null, + "42": null, + "56": null, + "69": null, + "77": null, + "97": null, + "100": null, + "122": null, + "123": null, + "137": null, + "250": null, + "1284": null, + "1287": null, + "4002": null, + "4386": null, + "6666": null, + "9999": null, + "42161": null, + "42220": null, + "43113": null, + "43114": null, + "44787": null, + "80001": null, + "421611": null, + "1313161554": null, + "1313161555": null + }, + "byteCode": "0x" + }, + "ISuperfluidToken": { + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "agreementClass", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "data", + "type": "bytes32[]" + } + ], + "name": "AgreementCreated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "agreementClass", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "penaltyAccount", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rewardAmount", + "type": "uint256" + } + ], + "name": "AgreementLiquidated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "liquidatorAccount", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "agreementClass", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "penaltyAccount", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "bondAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rewardAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "bailoutAmount", + "type": "uint256" + } + ], + "name": "AgreementLiquidatedBy", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "agreementClass", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "liquidatorAccount", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "targetAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "rewardAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "rewardAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "int256", + "name": "targetAccountBalanceDelta", + "type": "int256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "liquidationTypeData", + "type": "bytes" + } + ], + "name": "AgreementLiquidatedV2", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "agreementClass", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + } + ], + "name": "AgreementStateUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "agreementClass", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "AgreementTerminated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "agreementClass", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32[]", + "name": "data", + "type": "bytes32[]" + } + ], + "name": "AgreementUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "bailoutAccount", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "bailoutAmount", + "type": "uint256" + } + ], + "name": "Bailout", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "data", + "type": "bytes32[]" + } + ], + "name": "createAgreement", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getAccountActiveAgreements", + "outputs": [ + { + "internalType": "contract ISuperAgreement[]", + "name": "activeAgreements", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "agreementClass", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "dataLength", + "type": "uint256" + } + ], + "name": "getAgreementData", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "data", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "agreementClass", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "slotId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "dataLength", + "type": "uint256" + } + ], + "name": "getAgreementStateSlot", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "slotData", + "type": "bytes32[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getHost", + "outputs": [ + { + "internalType": "address", + "name": "host", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "isAccountCritical", + "outputs": [ + { + "internalType": "bool", + "name": "isCritical", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "isAccountCriticalNow", + "outputs": [ + { + "internalType": "bool", + "name": "isCritical", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "isAccountSolvent", + "outputs": [ + { + "internalType": "bool", + "name": "isSolvent", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "isAccountSolventNow", + "outputs": [ + { + "internalType": "bool", + "name": "isSolvent", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "liquidationTypeData", + "type": "bytes" + }, + { + "internalType": "address", + "name": "liquidatorAccount", + "type": "address" + }, + { + "internalType": "bool", + "name": "useDefaultRewardAccount", + "type": "bool" + }, + { + "internalType": "address", + "name": "targetAccount", + "type": "address" + }, + { + "internalType": "uint256", + "name": "rewardAmount", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "targetAccountBalanceDelta", + "type": "int256" + } + ], + "name": "makeLiquidationPayoutsV2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "name": "realtimeBalanceOf", + "outputs": [ + { + "internalType": "int256", + "name": "availableBalance", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "deposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "owedDeposit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "realtimeBalanceOfNow", + "outputs": [ + { + "internalType": "int256", + "name": "availableBalance", + "type": "int256" + }, + { + "internalType": "uint256", + "name": "deposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "owedDeposit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "int256", + "name": "delta", + "type": "int256" } ], - "name": "initialize", + "name": "settleBalance", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "isInitialized", - "outputs": [ + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "personalAccountRegistry", - "outputs": [ + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, { - "internalType": "contract PersonalAccountRegistry", - "name": "", - "type": "address" + "internalType": "uint256", + "name": "dataLength", + "type": "uint256" } ], - "stateMutability": "view", + "name": "terminateAgreement", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "address[]", - "name": "to", - "type": "address[]" + "internalType": "bytes32", + "name": "id", + "type": "bytes32" }, { - "internalType": "bytes[]", + "internalType": "bytes32[]", "name": "data", - "type": "bytes[]" + "type": "bytes32[]" } ], - "name": "sendBatch", + "name": "updateAgreementData", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -3712,64 +5750,79 @@ module.exports = { "type": "address" }, { - "internalType": "address[]", - "name": "to", - "type": "address[]" + "internalType": "uint256", + "name": "slotId", + "type": "uint256" }, { - "internalType": "bytes[]", - "name": "data", - "type": "bytes[]" + "internalType": "bytes32[]", + "name": "slotData", + "type": "bytes32[]" } ], - "name": "sendBatchFromAccount", + "name": "updateAgreementStateSlot", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "addresses": { - "1": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "3": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "4": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "5": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "10": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "42": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "56": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "69": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "77": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "97": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "100": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "137": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "250": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "1284": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "1287": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "4002": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "4386": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "6666": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "9999": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "42161": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "42220": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "43113": "0xf96E0A8e408604F2c45e13c89bB395815BD5Efc6", - "43114": "0xf96E0A8e408604F2c45e13c89bB395815BD5Efc6", - "44787": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "80001": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "421611": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "1313161554": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163", - "1313161555": "0x432defD2b3733e6fEBb1bD4B17Ed85D15b882163" + "1": null, + "3": null, + "4": null, + "5": null, + "10": null, + "42": null, + "56": null, + "69": null, + "77": null, + "97": null, + "100": null, + "122": null, + "123": null, + "137": null, + "250": null, + "1284": null, + "1287": null, + "4002": null, + "4386": null, + "6666": null, + "9999": null, + "42161": null, + "42220": null, + "43113": null, + "43114": null, + "44787": null, + "80001": null, + "421611": null, + "1313161554": null, + "1313161555": null }, - "byteCode": "0x608060405234801561001057600080fd5b50326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600046905080600181905550506123f58061006d6000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063867519c61161008c5780639f255626116100665780639f255626146101fe578063b5021b161461021a578063d2c83b9a14610236578063f92c5f7c14610254576100cf565b8063867519c6146101a657806387d31313146101c25780639a8a0592146101e0576100cf565b8063231badaf146100d4578063392e53cd146100f0578063485cc9551461010e5780635afaa7bb1461012a57806373e5a13f1461014657806376db2b4c14610176575b600080fd5b6100ee60048036038101906100e99190611438565b610284565b005b6100f861037f565b6040516101059190611e71565b60405180910390f35b610128600480360381019061012391906115e0565b6103d5565b005b610144600480360381019061013f9190611563565b610561565b005b610160600480360381019061015b919061165d565b610739565b60405161016d9190611e8c565b60405180910390f35b610190600480360381019061018b919061161c565b61075e565b60405161019d9190611e8c565b60405180910390f35b6101c060048036038101906101bb91906113b9565b610788565b005b6101ca610799565b6040516101d79190611f07565b60405180910390f35b6101e86107bf565b6040516101f591906120a2565b60405180910390f35b610218600480360381019061021391906114f7565b6107c5565b005b610234600480360381019061022f9190611438565b6107d5565b005b61023e6108d1565b60405161024b9190611eec565b60405180910390f35b61026e60048036038101906102699190611390565b6108f7565b60405161027b91906120a2565b60405180910390f35b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411610305576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102fc90611f82565b60405180910390fd5b60006103258261031788888888610953565b6109b690919063ffffffff16565b905084600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061037786828686610a71565b505050505050565b60008073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610463576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161045a90611f42565b60405180910390fd5b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e6326040516105559190611def565b60405180910390a15050565b60008251116105a5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059c90611fc2565b60405180910390fd5b600080600090505b83518110156106f35760003073ffffffffffffffffffffffffffffffffffffffff168583815181106105db57fe5b60200260200101516040516105f09190611d0b565b6000604051808303816000865af19150503d806000811461062d576040519150601f19603f3d011682016040523d82523d6000602084013e610632565b606091505b505090508315610681578061067c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067390611f62565b60405180910390fd5b610697565b80801561068c575082155b1561069657600192505b5b7f361c14722cc344132c73396113f7164232448b09c544a149f09048648b43d872338684815181106106c557fe5b6020026020010151836040516106dd93929190611e0a565b60405180910390a15080806001019150506105ad565b5080610734576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072b90612082565b60405180910390fd5b505050565b60006107578260000151836020015184604001518560600151610953565b9050919050565b600061078182600001518360200151846040015185606001518660800151610edc565b9050919050565b61079483338484610a71565b505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b6107d133338484610a71565b5050565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411610856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084d90611f82565b60405180910390fd5b600061087782610869888888883a610edc565b6109b690919063ffffffff16565b905084600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108c986828686610a71565b505050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061094c6001600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f4290919063ffffffff16565b9050919050565b60006109ac7f6848d0622081db2451400280dead7a739a080cb93852607c381af11e289769b286868661098587610f97565b6040516020016109989493929190611c6e565b604051602081830303815290604052610ffa565b9050949350505050565b60008060009050604183511415610a675760008060006020860151925060408601519150606086015160001a9050601b8160ff1610156109f757601b810190505b601b8160ff161480610a0c5750601c8160ff16145b15610a635760018782858560405160008152602001604052604051610a349493929190611ea7565b6020604051602081039080840390855afa158015610a56573d6000803e3d6000fd5b5050506020604051035193505b5050505b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad890611fa2565b60405180910390fd5b6000825111610b25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1c90612062565b60405180910390fd5b8151815114610b69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6090612002565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614610d3d57600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b8152600401610bf9929190611e48565b60206040518083038186803b158015610c1157600080fd5b505afa158015610c25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c4991906115b7565b80610cfd5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b8152600401610cac929190611e48565b60206040518083038186803b158015610cc457600080fd5b505afa158015610cd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cfc91906115b7565b5b610d3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3390611fe2565b60405180910390fd5b5b600080600090505b8251811015610ed457600073ffffffffffffffffffffffffffffffffffffffff16848281518110610d7257fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415610dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc890611f22565b60405180910390fd5b838181518110610ddd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16838281518110610e0757fe5b60200260200101518787604051602001610e2393929190611d22565b604051602081830303815290604052604051610e3f9190611d0b565b6000604051808303816000865af19150503d8060008114610e7c576040519150601f19603f3d011682016040523d82523d6000602084013e610e81565b606091505b50508092505081610ec7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ebe90612022565b60405180910390fd5b8080600101915050610d45565b505050505050565b6000610f377f6f4e1b2b1e5e49f4269e19e16e67a00cb0a796d96d30be3e4b540d3732e8bcad878787610f0e88610f97565b87604051602001610f23959493929190611cb4565b604051602081830303815290604052610ffa565b905095945050505050565b600080828401905083811015610f8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8490612042565b60405180910390fd5b8091505092915050565b60608060008351905060005b81811015610fef5782858281518110610fb857fe5b6020026020010151604051602001610fd1929190611d5b565b60405160208183030381529060405292508080600101915050610fa3565b508192505050919050565b60006110336001543085856040516020016110189493929190611da5565b6040516020818303038152906040528051906020012061103b565b905092915050565b60008160405160200161104e9190611d7f565b604051602081830303815290604052805190602001209050919050565b60008135905061107a81612375565b92915050565b600082601f83011261109157600080fd5b81356110a461109f826120ea565b6120bd565b915081818352602084019350602081019050838560208402820111156110c957600080fd5b60005b838110156110f957816110df888261106b565b8452602084019350602083019250506001810190506110cc565b5050505092915050565b600082601f83011261111457600080fd5b813561112761112282612112565b6120bd565b9150818183526020840193506020810190508360005b8381101561116d578135860161115388826111a1565b84526020840193506020830192505060018101905061113d565b5050505092915050565b6000813590506111868161238c565b92915050565b60008151905061119b8161238c565b92915050565b600082601f8301126111b257600080fd5b81356111c56111c08261213a565b6120bd565b915080825260208301602083018583830111156111e157600080fd5b6111ec8382846122dd565b50505092915050565b600081359050611204816123a3565b92915050565b600081359050611219816123ba565b92915050565b600060a0828403121561123157600080fd5b61123b60a06120bd565b9050600061124b8482850161106b565b600083015250602061125f8482850161137b565b602083015250604082013567ffffffffffffffff81111561127f57600080fd5b61128b84828501611080565b604083015250606082013567ffffffffffffffff8111156112ab57600080fd5b6112b784828501611103565b60608301525060806112cb8482850161137b565b60808301525092915050565b6000608082840312156112e957600080fd5b6112f360806120bd565b905060006113038482850161106b565b60008301525060206113178482850161137b565b602083015250604082013567ffffffffffffffff81111561133757600080fd5b61134384828501611080565b604083015250606082013567ffffffffffffffff81111561136357600080fd5b61136f84828501611103565b60608301525092915050565b60008135905061138a816123d1565b92915050565b6000602082840312156113a257600080fd5b60006113b08482850161106b565b91505092915050565b6000806000606084860312156113ce57600080fd5b60006113dc8682870161106b565b935050602084013567ffffffffffffffff8111156113f957600080fd5b61140586828701611080565b925050604084013567ffffffffffffffff81111561142257600080fd5b61142e86828701611103565b9150509250925092565b600080600080600060a0868803121561145057600080fd5b600061145e8882890161106b565b955050602061146f8882890161137b565b945050604086013567ffffffffffffffff81111561148c57600080fd5b61149888828901611080565b935050606086013567ffffffffffffffff8111156114b557600080fd5b6114c188828901611103565b925050608086013567ffffffffffffffff8111156114de57600080fd5b6114ea888289016111a1565b9150509295509295909350565b6000806040838503121561150a57600080fd5b600083013567ffffffffffffffff81111561152457600080fd5b61153085828601611080565b925050602083013567ffffffffffffffff81111561154d57600080fd5b61155985828601611103565b9150509250929050565b6000806040838503121561157657600080fd5b600083013567ffffffffffffffff81111561159057600080fd5b61159c85828601611103565b92505060206115ad85828601611177565b9150509250929050565b6000602082840312156115c957600080fd5b60006115d78482850161118c565b91505092915050565b600080604083850312156115f357600080fd5b6000611601858286016111f5565b92505060206116128582860161120a565b9150509250929050565b60006020828403121561162e57600080fd5b600082013567ffffffffffffffff81111561164857600080fd5b6116548482850161121f565b91505092915050565b60006020828403121561166f57600080fd5b600082013567ffffffffffffffff81111561168957600080fd5b611695848285016112d7565b91505092915050565b60006116aa83836116d4565b60208301905092915050565b6116bf8161225f565b82525050565b6116ce816121dc565b82525050565b6116dd816121dc565b82525050565b6116f46116ef826121dc565b61231f565b82525050565b600061170582612176565b61170f8185612199565b935061171a83612166565b8060005b8381101561174b578151611732888261169e565b975061173d8361218c565b92505060018101905061171e565b5085935050505092915050565b611761816121ee565b82525050565b611770816121fa565b82525050565b611787611782826121fa565b612331565b82525050565b600061179882612181565b6117a281856121a4565b93506117b28185602086016122ec565b6117bb81612357565b840191505092915050565b60006117d182612181565b6117db81856121b5565b93506117eb8185602086016122ec565b80840191505092915050565b61180081612271565b82525050565b61180f81612295565b82525050565b6000611822601b836121c0565b91507f476174657761793a2063616e6e6f742073656e6420746f2030783000000000006000830152602082019050919050565b6000611862601c836121d1565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b60006118a2602f836121c0565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b60006119086017836121c0565b91507f476174657761793a2062617463682072657665727465640000000000000000006000830152602082019050919050565b60006119486032836121c0565b91507f476174657761793a206e6f6e6365206973206c6f776572207468616e2063757260008301527f72656e74206163636f756e74206e6f6e636500000000000000000000000000006020830152604082019050919050565b60006119ae6025836121c0565b91507f476174657761793a2063616e6e6f742073656e642066726f6d2030783020616360008301527f636f756e740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a146026836121c0565b91507f476174657761793a2063616e6e6f742064656c656761746520656d707479206260008301527f61746368657300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611a7a6028836121c0565b91507f476174657761793a2073656e646572206973206e6f7420746865206163636f7560008301527f6e74206f776e65720000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611ae06016836121c0565b91507f476174657761793a20696e76616c6964206261746368000000000000000000006000830152602082019050919050565b6000611b206023836121c0565b91507f476174657761793a206261746368207472616e73616374696f6e20726576657260008301527f74656400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611b86601e836121c0565b91507f536166654d6174684c69623a206164646974696f6e206f766572666c6f7700006000830152602082019050919050565b6000611bc66020836121c0565b91507f476174657761793a2063616e6e6f742073656e6420656d7074792062617463686000830152602082019050919050565b6000611c06601d836121c0565b91507f476174657761793a20616c6c20626174636865732072657665727465640000006000830152602082019050919050565b611c4281612248565b82525050565b611c59611c5482612248565b61234d565b82525050565b611c6881612252565b82525050565b6000611c7a82876116e3565b601482019150611c8a8286611c48565b602082019150611c9a82856116fa565b9150611ca682846117c6565b915081905095945050505050565b6000611cc082886116e3565b601482019150611cd08287611c48565b602082019150611ce082866116fa565b9150611cec82856117c6565b9150611cf88284611c48565b6020820191508190509695505050505050565b6000611d1782846117c6565b915081905092915050565b6000611d2e82866117c6565b9150611d3a82856116e3565b601482019150611d4a82846116e3565b601482019150819050949350505050565b6000611d6782856117c6565b9150611d7382846117c6565b91508190509392505050565b6000611d8a82611855565b9150611d968284611776565b60208201915081905092915050565b6000611db18287611c48565b602082019150611dc182866116e3565b601482019150611dd18285611776565b602082019150611de182846117c6565b915081905095945050505050565b6000602082019050611e0460008301846116b6565b92915050565b6000606082019050611e1f60008301866116b6565b8181036020830152611e31818561178d565b9050611e406040830184611758565b949350505050565b6000604082019050611e5d60008301856116c5565b611e6a60208301846116c5565b9392505050565b6000602082019050611e866000830184611758565b92915050565b6000602082019050611ea16000830184611767565b92915050565b6000608082019050611ebc6000830187611767565b611ec96020830186611c5f565b611ed66040830185611767565b611ee36060830184611767565b95945050505050565b6000602082019050611f0160008301846117f7565b92915050565b6000602082019050611f1c6000830184611806565b92915050565b60006020820190508181036000830152611f3b81611815565b9050919050565b60006020820190508181036000830152611f5b81611895565b9050919050565b60006020820190508181036000830152611f7b816118fb565b9050919050565b60006020820190508181036000830152611f9b8161193b565b9050919050565b60006020820190508181036000830152611fbb816119a1565b9050919050565b60006020820190508181036000830152611fdb81611a07565b9050919050565b60006020820190508181036000830152611ffb81611a6d565b9050919050565b6000602082019050818103600083015261201b81611ad3565b9050919050565b6000602082019050818103600083015261203b81611b13565b9050919050565b6000602082019050818103600083015261205b81611b79565b9050919050565b6000602082019050818103600083015261207b81611bb9565b9050919050565b6000602082019050818103600083015261209b81611bf9565b9050919050565b60006020820190506120b76000830184611c39565b92915050565b6000604051905081810181811067ffffffffffffffff821117156120e057600080fd5b8060405250919050565b600067ffffffffffffffff82111561210157600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561212957600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561215157600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b60006121e782612228565b9050919050565b60008115159050919050565b6000819050919050565b600061220f826121dc565b9050919050565b6000612221826121dc565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061226a826122b9565b9050919050565b600061227c82612283565b9050919050565b600061228e82612228565b9050919050565b60006122a0826122a7565b9050919050565b60006122b282612228565b9050919050565b60006122c4826122cb565b9050919050565b60006122d682612228565b9050919050565b82818337600083830152505050565b60005b8381101561230a5780820151818401526020810190506122ef565b83811115612319576000848401525b50505050565b600061232a8261233b565b9050919050565b6000819050919050565b600061234682612368565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61237e816121dc565b811461238957600080fd5b50565b612395816121ee565b81146123a057600080fd5b50565b6123ac81612204565b81146123b757600080fd5b50565b6123c381612216565b81146123ce57600080fd5b50565b6123da81612248565b81146123e557600080fd5b5056fea164736f6c634300060c000a" + "byteCode": "0x" }, - "GatewayRecipient": { + "Initializable": { "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "initializer", + "type": "address" + } + ], + "name": "Initialized", + "type": "event" + }, { "inputs": [], - "name": "gateway", + "name": "isInitialized", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", - "type": "address" + "type": "bool" } ], "stateMutability": "view", @@ -3788,6 +5841,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -3808,114 +5863,68 @@ module.exports = { }, "byteCode": "0x" }, - "Guarded": { + "LibDiamond": { "abi": [ { "anonymous": false, "inputs": [ { + "components": [ + { + "internalType": "address", + "name": "facetAddress", + "type": "address" + }, + { + "internalType": "enum IDiamondCut.FacetCutAction", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bytes4[]", + "name": "functionSelectors", + "type": "bytes4[]" + } + ], "indexed": false, - "internalType": "address", - "name": "sender", - "type": "address" + "internalType": "struct IDiamondCut.FacetCut[]", + "name": "_diamondCut", + "type": "tuple[]" }, { "indexed": false, "internalType": "address", - "name": "guardian", - "type": "address" - } - ], - "name": "GuardianAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "sender", + "name": "_init", "type": "address" }, { "indexed": false, - "internalType": "address", - "name": "guardian", - "type": "address" + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" } ], - "name": "GuardianRemoved", + "name": "DiamondCut", "type": "event" }, { + "anonymous": false, "inputs": [ { + "indexed": true, "internalType": "address", - "name": "guardian", - "type": "address" - } - ], - "name": "addGuardian", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "guardian", + "name": "previousOwner", "type": "address" - } - ], - "name": "isGuardian", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ + }, { + "indexed": true, "internalType": "address", - "name": "guardian", + "name": "newOwner", "type": "address" } ], - "name": "removeGuardian", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "messageHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "name": "verifyGuardianSignature", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" + "name": "OwnershipTransferred", + "type": "event" } ], "addresses": { @@ -3930,6 +5939,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -3948,34 +5959,34 @@ module.exports = { "1313161554": null, "1313161555": null }, - "byteCode": "0x" + "byteCode": "0x602d6050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000804000a" }, - "Initializable": { + "OwnershipFacet": { "abi": [ { - "anonymous": false, - "inputs": [ + "inputs": [], + "name": "owner", + "outputs": [ { - "indexed": false, "internalType": "address", - "name": "initializer", + "name": "owner_", "type": "address" } ], - "name": "Initialized", - "type": "event" + "stateMutability": "view", + "type": "function" }, { - "inputs": [], - "name": "isInitialized", - "outputs": [ + "inputs": [ { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "address", + "name": "_newOwner", + "type": "address" } ], - "stateMutability": "view", + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" } ], @@ -3991,6 +6002,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": "0xdd43fA3fCB57F9F075F48F0FA564162a0eE7fa70", + "123": "0xdd43fA3fCB57F9F075F48F0FA564162a0eE7fa70", "137": null, "250": null, "1284": null, @@ -4009,7 +6022,7 @@ module.exports = { "1313161554": null, "1313161555": null }, - "byteCode": "0x" + "byteCode": "0x608060405234801561001057600080fd5b506103cb806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80638da5cb5b1461003b578063f2fde38b14610059575b600080fd5b610043610075565b60405161005091906102da565b60405180910390f35b610073600480360381019061006e919061027f565b610084565b005b600061007f610098565b905090565b61008c6100cb565b61009581610166565b50565b60006100a261023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6100d361023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015b906102f5565b60405180910390fd5b565b600061017061023d565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b600081359050610279816103a7565b92915050565b60006020828403121561029157600080fd5b600061029f8482850161026a565b91505092915050565b6102b181610326565b82525050565b60006102c4602283610315565b91506102cf82610358565b604082019050919050565b60006020820190506102ef60008301846102a8565b92915050565b6000602082019050818103600083015261030e816102b7565b9050919050565b600082825260208201905092915050565b600061033182610338565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b6103b081610326565b81146103bb57600080fd5b5056fea164736f6c6343000804000a" }, "PaymentDepositAccount": { "abi": [ @@ -4077,6 +6090,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -5013,6 +7028,8 @@ module.exports = { "77": "0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312", "97": "0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312", "100": "0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312", + "122": "0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312", + "123": "0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312", "137": "0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312", "250": "0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312", "1284": "0xB6900522DC23F3cdAeA61bf0Ca17a672b8Dbe312", @@ -5288,6 +7305,8 @@ module.exports = { "77": "0x0672aF0018fdEbACcc93c7D047D62b72CB12883A", "97": "0x0672aF0018fdEbACcc93c7D047D62b72CB12883A", "100": "0x0672aF0018fdEbACcc93c7D047D62b72CB12883A", + "122": "0x0672aF0018fdEbACcc93c7D047D62b72CB12883A", + "123": "0x0672aF0018fdEbACcc93c7D047D62b72CB12883A", "137": "0x0672aF0018fdEbACcc93c7D047D62b72CB12883A", "250": "0x0672aF0018fdEbACcc93c7D047D62b72CB12883A", "1284": "0x0672aF0018fdEbACcc93c7D047D62b72CB12883A", @@ -5968,6 +7987,8 @@ module.exports = { "77": "0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa", "97": "0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa", "100": "0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa", + "122": "0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa", + "123": "0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa", "137": "0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa", "250": "0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa", "1284": "0x7EB3A038F25B9F32f8e19A7F0De83D4916030eFa", @@ -6016,6 +8037,8 @@ module.exports = { "77": null, "97": null, "100": null, + "122": null, + "123": null, "137": null, "250": null, "1284": null, @@ -6462,6 +8485,8 @@ module.exports = { "77": "0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616", "97": "0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616", "100": "0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616", + "122": "0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616", + "123": "0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616", "137": "0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616", "250": "0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616", "1284": "0x8e5ea4368fcd17A4efF851C5ffa6cd03bBDeb616", diff --git a/dist/deploy/001_create-common.js b/dist/deploy/001_create-common.js index 7a19c226..0172c303 100644 --- a/dist/deploy/001_create-common.js +++ b/dist/deploy/001_create-common.js @@ -3,10 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true }); const func = async (hre) => { const { deployments: { deploy }, getNamedAccounts, } = hre; const { from } = await getNamedAccounts(); - await deploy('BalancesHelper', { + await deploy("BalancesHelper", { + from, + log: true, + }); + await deploy("BalancesHelperV2", { from, log: true, }); }; -func.tags = ['create', 'common']; +func.tags = ["create", "common"]; module.exports = func; diff --git a/dist/deploy/200_deploy_initial_facets.d.ts b/dist/deploy/200_deploy_initial_facets.d.ts new file mode 100644 index 00000000..2255cecc --- /dev/null +++ b/dist/deploy/200_deploy_initial_facets.d.ts @@ -0,0 +1,3 @@ +import { DeployFunction } from 'hardhat-deploy/types'; +declare const func: DeployFunction; +export default func; diff --git a/dist/deploy/200_deploy_initial_facets.js b/dist/deploy/200_deploy_initial_facets.js new file mode 100644 index 00000000..30951412 --- /dev/null +++ b/dist/deploy/200_deploy_initial_facets.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const func = async function (hre) { + const { deployments: { deploy }, getNamedAccounts, } = hre; + const { from } = await getNamedAccounts(); + await deploy('DiamondCutFacet', { + from, + log: true, + }); + await deploy('DiamondLoupeFacet', { + from, + log: true, + }); + await deploy('OwnershipFacet', { + from, + log: true, + }); +}; +func.tags = ['bridges', 'initial-facets']; +exports.default = func; diff --git a/dist/deploy/201_deploy_diamond.d.ts b/dist/deploy/201_deploy_diamond.d.ts new file mode 100644 index 00000000..2255cecc --- /dev/null +++ b/dist/deploy/201_deploy_diamond.d.ts @@ -0,0 +1,3 @@ +import { DeployFunction } from 'hardhat-deploy/types'; +declare const func: DeployFunction; +export default func; diff --git a/dist/deploy/201_deploy_diamond.js b/dist/deploy/201_deploy_diamond.js new file mode 100644 index 00000000..0f1e8c57 --- /dev/null +++ b/dist/deploy/201_deploy_diamond.js @@ -0,0 +1,15 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const func = async function (hre) { + const { deployments: { deploy }, getNamedAccounts, ethers, } = hre; + const { from } = await getNamedAccounts(); + const diamondCutFacet = await ethers.getContract('DiamondCutFacet'); + await deploy('Diamond', { + from, + args: [from, diamondCutFacet.address], + log: true, + deterministicDeployment: true, + }); +}; +func.tags = ['bridges', 'diamond']; +exports.default = func; diff --git a/dist/deploy/202_init_facets.d.ts b/dist/deploy/202_init_facets.d.ts new file mode 100644 index 00000000..2255cecc --- /dev/null +++ b/dist/deploy/202_init_facets.d.ts @@ -0,0 +1,3 @@ +import { DeployFunction } from 'hardhat-deploy/types'; +declare const func: DeployFunction; +export default func; diff --git a/dist/deploy/202_init_facets.js b/dist/deploy/202_init_facets.js new file mode 100644 index 00000000..10aadd3d --- /dev/null +++ b/dist/deploy/202_init_facets.js @@ -0,0 +1,20 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +const hardhat_1 = require("hardhat"); +const diamond_1 = require("../utils/diamond"); +const func = async function () { + const diamondLoupeFacet = await hardhat_1.ethers.getContract('DiamondLoupeFacet'); + const ownershipFacet = await hardhat_1.ethers.getContract('OwnershipFacet'); + const diamond = await hardhat_1.ethers.getContract('Diamond'); + const loupe = await hardhat_1.ethers.getContractAt('IDiamondLoupe', diamond.address); + try { + await loupe.facets(); + } + catch (e) { + await (0, diamond_1.addFacets)([diamondLoupeFacet], diamond.address); + } + await (0, diamond_1.addOrReplaceFacets)([diamondLoupeFacet, ownershipFacet], diamond.address); +}; +func.tags = ['bridges', 'init-facets']; +func.dependencies = ['initial-facets', 'diamond']; +exports.default = func; diff --git a/dist/extensions/constants.js b/dist/extensions/constants.js index 1037e7d6..77efe4d4 100644 --- a/dist/extensions/constants.js +++ b/dist/extensions/constants.js @@ -90,7 +90,6 @@ exports.NETWORK_CONFIGS = { [NetworkNames.Fantom]: { chainId: 250, defaultProviderUrl: 'https://rpcapi.fantom.network', - defaultGasPrice: 22, explorer: 'https://ftmscan.com', }, [NetworkNames.FantomTest]: { diff --git a/dist/hardhat.config.d.ts b/dist/hardhat.config.d.ts index 7dc71612..669b665e 100644 --- a/dist/hardhat.config.d.ts +++ b/dist/hardhat.config.d.ts @@ -1,6 +1,7 @@ -import '@nomiclabs/hardhat-etherscan'; -import '@typechain/hardhat'; -import 'hardhat-deploy'; -import 'hardhat-deploy-ethers'; -import 'hardhat-gas-reporter'; -import 'solidity-coverage'; +import "@nomiclabs/hardhat-etherscan"; +import "@nomiclabs/hardhat-web3"; +import "@typechain/hardhat"; +import "hardhat-deploy"; +import "hardhat-deploy-ethers"; +import "hardhat-gas-reporter"; +import "solidity-coverage"; diff --git a/dist/hardhat.config.js b/dist/hardhat.config.js index 901c6063..f2a866da 100644 --- a/dist/hardhat.config.js +++ b/dist/hardhat.config.js @@ -1,6 +1,7 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); require("@nomiclabs/hardhat-etherscan"); +require("@nomiclabs/hardhat-web3"); require("@typechain/hardhat"); require("hardhat-deploy"); require("hardhat-deploy-ethers"); @@ -16,66 +17,79 @@ const config = { networks: Object.assign({ hardhat: { accounts: { mnemonic: HARDHAT_MNEMONIC || - 'test test test test test test test test test test test junk', + "test test test test test test test test test test test junk", count: 256, }, chainId: 3333, gasPrice: 20 * 1000000000, } }, (0, extensions_1.createConfigNetworks)()), solidity: { - version: '0.6.12', - settings: { - evmVersion: 'istanbul', - metadata: { - bytecodeHash: 'none', + compilers: [ + { + version: "0.6.12", + settings: { + evmVersion: "istanbul", + metadata: { + bytecodeHash: "none", + }, + }, }, - }, + { + version: "0.8.4", + settings: { + evmVersion: "istanbul", + metadata: { + bytecodeHash: "none", + }, + }, + }, + ], }, paths: { - sources: 'src', - cache: '.hardhat/cache', - artifacts: '.hardhat/artifacts', - deploy: 'deploy', - deployments: 'deployments', + sources: "src", + cache: ".hardhat/cache", + artifacts: ".hardhat/artifacts", + deploy: "deploy", + deployments: "deployments", }, buildPaths: { - artifacts: 'artifacts', - dist: 'dist', + artifacts: "artifacts", + dist: "dist", }, typechain: { - outDir: 'typings', - target: 'ethers-v5', + outDir: "typings", + target: "ethers-v5", }, deterministicDeployment: { [extensions_1.NETWORK_CONFIGS[extensions_1.NetworkNames.Fuji].chainId]: { - factory: '0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7', - deployer: '0xE1CB04A0fA36DdD16a06ea828007E35e1a3cBC37', - funding: '10000000000000000', - signedTx: '0xf8a88085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3830150f6a032b2a806bfc34024c6638848c3798213261304af82de14002ca2b4961a643b95a03c74c13eda5ff6b9b821fbccd1a67f160eb6a0ca50dad04b7a3e564e2599722e', + factory: "0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7", + deployer: "0xE1CB04A0fA36DdD16a06ea828007E35e1a3cBC37", + funding: "10000000000000000", + signedTx: "0xf8a88085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3830150f6a032b2a806bfc34024c6638848c3798213261304af82de14002ca2b4961a643b95a03c74c13eda5ff6b9b821fbccd1a67f160eb6a0ca50dad04b7a3e564e2599722e", }, [extensions_1.NETWORK_CONFIGS[extensions_1.NetworkNames.Avalanche].chainId]: { - factory: '0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7', - deployer: '0xE1CB04A0fA36DdD16a06ea828007E35e1a3cBC37', - funding: '10000000000000000', - signedTx: '0xf8a88085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3830150f8a0d69f418f6da8f01fb95d6d87e1f2eabd85884784cd2ba2d306ba066d41b7c5e6a05a2b76982a148ca8ca2803ceac3d39a3f26208b654c473b17b01e7536eeba55e', + factory: "0x914d7Fec6aaC8cd542e72Bca78B30650d45643d7", + deployer: "0xE1CB04A0fA36DdD16a06ea828007E35e1a3cBC37", + funding: "10000000000000000", + signedTx: "0xf8a88085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf3830150f8a0d69f418f6da8f01fb95d6d87e1f2eabd85884784cd2ba2d306ba066d41b7c5e6a05a2b76982a148ca8ca2803ceac3d39a3f26208b654c473b17b01e7536eeba55e", }, }, gasReporter: { enabled: false, }, ens: { - internalTopLevelDomains: ['pillar', 'etherspot', 'dank'], + internalTopLevelDomains: ["pillar", "etherspot", "dank"], }, knownContracts: { [extensions_1.NetworkNames.Mainnet]: { - [extensions_1.ContractNames.ENSRegistry]: '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e', + [extensions_1.ContractNames.ENSRegistry]: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", }, }, create2Salts: { - default: ethers_1.utils.id('ETHERspot'), - [extensions_1.ContractNames.ENSHelper]: ethers_1.utils.id('ETHERspot@1.2.0'), - [extensions_1.ContractNames.ENSRegistry]: ethers_1.utils.id('ETHERspot@1.2.0'), - [extensions_1.ContractNames.ENSReverseRegistrar]: ethers_1.utils.id('ETHERspot@1.2.0'), + default: ethers_1.utils.id("ETHERspot"), + [extensions_1.ContractNames.ENSHelper]: ethers_1.utils.id("ETHERspot@1.2.0"), + [extensions_1.ContractNames.ENSRegistry]: ethers_1.utils.id("ETHERspot@1.2.0"), + [extensions_1.ContractNames.ENSReverseRegistrar]: ethers_1.utils.id("ETHERspot@1.2.0"), }, etherscan: { apiKey: ETHERSCAN_API_KEY, diff --git a/dist/typings/Account.d.ts b/dist/typings/Account.d.ts new file mode 100644 index 00000000..841c5bfb --- /dev/null +++ b/dist/typings/Account.d.ts @@ -0,0 +1,161 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface AccountInterface extends utils.Interface { + functions: { + "c_305923d6(bytes8)": FunctionFragment; + "c_d6b1085a(bytes8)": FunctionFragment; + "c_e208e0f4(bytes8)": FunctionFragment; + "c_false305923d6(bytes8)": FunctionFragment; + "c_falsed6b1085a(bytes8)": FunctionFragment; + "c_falsee208e0f4(bytes8)": FunctionFragment; + "c_true305923d6(bytes8)": FunctionFragment; + "c_trued6b1085a(bytes8)": FunctionFragment; + "c_truee208e0f4(bytes8)": FunctionFragment; + "controller()": FunctionFragment; + "executeTransaction(address,uint256,bytes)": FunctionFragment; + "implementation()": FunctionFragment; + "registry()": FunctionFragment; + "setImplementation(address)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_d6b1085a", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_e208e0f4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsed6b1085a", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsee208e0f4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_trued6b1085a", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truee208e0f4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "controller", values?: undefined): string; + encodeFunctionData(functionFragment: "executeTransaction", values: [string, BigNumberish, BytesLike]): string; + encodeFunctionData(functionFragment: "implementation", values?: undefined): string; + encodeFunctionData(functionFragment: "registry", values?: undefined): string; + encodeFunctionData(functionFragment: "setImplementation", values: [string]): string; + decodeFunctionResult(functionFragment: "c_305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_d6b1085a", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_e208e0f4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsed6b1085a", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsee208e0f4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_trued6b1085a", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truee208e0f4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "controller", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "executeTransaction", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "implementation", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "registry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setImplementation", data: BytesLike): Result; + events: {}; +} +export interface Account extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: AccountInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_d6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsed6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_trued6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + controller(overrides?: CallOverrides): Promise<[string]>; + executeTransaction(to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + implementation(overrides?: CallOverrides): Promise<[string]>; + registry(overrides?: CallOverrides): Promise<[string]>; + setImplementation(implementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_d6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise; + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_falsed6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_trued6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + controller(overrides?: CallOverrides): Promise; + executeTransaction(to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + implementation(overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + setImplementation(implementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_d6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise; + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_falsed6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_trued6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + controller(overrides?: CallOverrides): Promise; + executeTransaction(to: string, value: BigNumberish, data: BytesLike, overrides?: CallOverrides): Promise; + implementation(overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + setImplementation(implementation_: string, overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_d6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise; + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_falsed6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_trued6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + controller(overrides?: CallOverrides): Promise; + executeTransaction(to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + implementation(overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + setImplementation(implementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_d6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise; + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_falsed6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_trued6b1085a(c__d6b1085a: BytesLike, overrides?: CallOverrides): Promise; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + controller(overrides?: CallOverrides): Promise; + executeTransaction(to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + implementation(overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + setImplementation(implementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/Account.js b/dist/typings/Account.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/Account.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/AccountBase.d.ts b/dist/typings/AccountBase.d.ts new file mode 100644 index 00000000..bdbcb323 --- /dev/null +++ b/dist/typings/AccountBase.d.ts @@ -0,0 +1,65 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface AccountBaseInterface extends utils.Interface { + functions: { + "c_305923d6(bytes8)": FunctionFragment; + "c_false305923d6(bytes8)": FunctionFragment; + "c_true305923d6(bytes8)": FunctionFragment; + "registry()": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "registry", values?: undefined): string; + decodeFunctionResult(functionFragment: "c_305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "registry", data: BytesLike): Result; + events: {}; +} +export interface AccountBase extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: AccountBaseInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + registry(overrides?: CallOverrides): Promise<[string]>; + }; + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + callStatic: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/AccountBase.js b/dist/typings/AccountBase.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/AccountBase.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/AccountController.d.ts b/dist/typings/AccountController.d.ts new file mode 100644 index 00000000..9813638e --- /dev/null +++ b/dist/typings/AccountController.d.ts @@ -0,0 +1,137 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface AccountControllerInterface extends utils.Interface { + functions: { + "accountImplementation()": FunctionFragment; + "accountRegistry()": FunctionFragment; + "c_19d98a43(bytes8)": FunctionFragment; + "c_false19d98a43(bytes8)": FunctionFragment; + "c_true19d98a43(bytes8)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "accountImplementation", values?: undefined): string; + encodeFunctionData(functionFragment: "accountRegistry", values?: undefined): string; + encodeFunctionData(functionFragment: "c_19d98a43", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false19d98a43", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true19d98a43", values: [BytesLike]): string; + decodeFunctionResult(functionFragment: "accountImplementation", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "accountRegistry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_19d98a43", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false19d98a43", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true19d98a43", data: BytesLike): Result; + events: { + "AccountDeployed(address,address)": EventFragment; + "AccountImplementationUpdated(address)": EventFragment; + "AccountRegistryUpdated(address)": EventFragment; + "AccountTransactionExecuted(address,address,uint256,bytes,bytes)": EventFragment; + "AccountUpgraded(address,address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "AccountDeployed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountImplementationUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountRegistryUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountTransactionExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountUpgraded"): EventFragment; +} +export declare type AccountDeployedEvent = TypedEvent<[ + string, + string +], { + account: string; + accountImplementation: string; +}>; +export declare type AccountDeployedEventFilter = TypedEventFilter; +export declare type AccountImplementationUpdatedEvent = TypedEvent<[ + string +], { + accountImplementation: string; +}>; +export declare type AccountImplementationUpdatedEventFilter = TypedEventFilter; +export declare type AccountRegistryUpdatedEvent = TypedEvent<[ + string +], { + accountRegistry: string; +}>; +export declare type AccountRegistryUpdatedEventFilter = TypedEventFilter; +export declare type AccountTransactionExecutedEvent = TypedEvent<[ + string, + string, + BigNumber, + string, + string +], { + account: string; + to: string; + value: BigNumber; + data: string; + response: string; +}>; +export declare type AccountTransactionExecutedEventFilter = TypedEventFilter; +export declare type AccountUpgradedEvent = TypedEvent<[ + string, + string +], { + account: string; + accountImplementation: string; +}>; +export declare type AccountUpgradedEventFilter = TypedEventFilter; +export interface AccountController extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: AccountControllerInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + accountImplementation(overrides?: CallOverrides): Promise<[string]>; + accountRegistry(overrides?: CallOverrides): Promise<[string]>; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + }; + accountImplementation(overrides?: CallOverrides): Promise; + accountRegistry(overrides?: CallOverrides): Promise; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + callStatic: { + accountImplementation(overrides?: CallOverrides): Promise; + accountRegistry(overrides?: CallOverrides): Promise; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + }; + filters: { + "AccountDeployed(address,address)"(account?: null, accountImplementation?: null): AccountDeployedEventFilter; + AccountDeployed(account?: null, accountImplementation?: null): AccountDeployedEventFilter; + "AccountImplementationUpdated(address)"(accountImplementation?: null): AccountImplementationUpdatedEventFilter; + AccountImplementationUpdated(accountImplementation?: null): AccountImplementationUpdatedEventFilter; + "AccountRegistryUpdated(address)"(accountRegistry?: null): AccountRegistryUpdatedEventFilter; + AccountRegistryUpdated(accountRegistry?: null): AccountRegistryUpdatedEventFilter; + "AccountTransactionExecuted(address,address,uint256,bytes,bytes)"(account?: null, to?: null, value?: null, data?: null, response?: null): AccountTransactionExecutedEventFilter; + AccountTransactionExecuted(account?: null, to?: null, value?: null, data?: null, response?: null): AccountTransactionExecutedEventFilter; + "AccountUpgraded(address,address)"(account?: null, accountImplementation?: null): AccountUpgradedEventFilter; + AccountUpgraded(account?: null, accountImplementation?: null): AccountUpgradedEventFilter; + }; + estimateGas: { + accountImplementation(overrides?: CallOverrides): Promise; + accountRegistry(overrides?: CallOverrides): Promise; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + accountImplementation(overrides?: CallOverrides): Promise; + accountRegistry(overrides?: CallOverrides): Promise; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/AccountController.js b/dist/typings/AccountController.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/AccountController.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/AccountControllerMock.d.ts b/dist/typings/AccountControllerMock.d.ts new file mode 100644 index 00000000..a94e6651 --- /dev/null +++ b/dist/typings/AccountControllerMock.d.ts @@ -0,0 +1,249 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface AccountControllerMockInterface extends utils.Interface { + functions: { + "accountImplementation()": FunctionFragment; + "accountRegistry()": FunctionFragment; + "c_19d98a43(bytes8)": FunctionFragment; + "c_9c0e30ce(bytes8)": FunctionFragment; + "c_false19d98a43(bytes8)": FunctionFragment; + "c_false9c0e30ce(bytes8)": FunctionFragment; + "c_true19d98a43(bytes8)": FunctionFragment; + "c_true9c0e30ce(bytes8)": FunctionFragment; + "computeAccountAddress(bytes32)": FunctionFragment; + "deployAccount(bytes32)": FunctionFragment; + "executeAccountTransaction(address,address,uint256,bytes)": FunctionFragment; + "setAccountImplementation(address)": FunctionFragment; + "setAccountRegistry(address)": FunctionFragment; + "upgradeAccount(address)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "accountImplementation", values?: undefined): string; + encodeFunctionData(functionFragment: "accountRegistry", values?: undefined): string; + encodeFunctionData(functionFragment: "c_19d98a43", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_9c0e30ce", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false19d98a43", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false9c0e30ce", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true19d98a43", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true9c0e30ce", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "computeAccountAddress", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "deployAccount", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "executeAccountTransaction", values: [string, string, BigNumberish, BytesLike]): string; + encodeFunctionData(functionFragment: "setAccountImplementation", values: [string]): string; + encodeFunctionData(functionFragment: "setAccountRegistry", values: [string]): string; + encodeFunctionData(functionFragment: "upgradeAccount", values: [string]): string; + decodeFunctionResult(functionFragment: "accountImplementation", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "accountRegistry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_19d98a43", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_9c0e30ce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false19d98a43", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false9c0e30ce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true19d98a43", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true9c0e30ce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "computeAccountAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deployAccount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "executeAccountTransaction", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setAccountImplementation", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setAccountRegistry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "upgradeAccount", data: BytesLike): Result; + events: { + "AccountDeployed(address,address)": EventFragment; + "AccountImplementationUpdated(address)": EventFragment; + "AccountRegistryUpdated(address)": EventFragment; + "AccountTransactionExecuted(address,address,uint256,bytes,bytes)": EventFragment; + "AccountUpgraded(address,address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "AccountDeployed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountImplementationUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountRegistryUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountTransactionExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountUpgraded"): EventFragment; +} +export declare type AccountDeployedEvent = TypedEvent<[ + string, + string +], { + account: string; + accountImplementation: string; +}>; +export declare type AccountDeployedEventFilter = TypedEventFilter; +export declare type AccountImplementationUpdatedEvent = TypedEvent<[ + string +], { + accountImplementation: string; +}>; +export declare type AccountImplementationUpdatedEventFilter = TypedEventFilter; +export declare type AccountRegistryUpdatedEvent = TypedEvent<[ + string +], { + accountRegistry: string; +}>; +export declare type AccountRegistryUpdatedEventFilter = TypedEventFilter; +export declare type AccountTransactionExecutedEvent = TypedEvent<[ + string, + string, + BigNumber, + string, + string +], { + account: string; + to: string; + value: BigNumber; + data: string; + response: string; +}>; +export declare type AccountTransactionExecutedEventFilter = TypedEventFilter; +export declare type AccountUpgradedEvent = TypedEvent<[ + string, + string +], { + account: string; + accountImplementation: string; +}>; +export declare type AccountUpgradedEventFilter = TypedEventFilter; +export interface AccountControllerMock extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: AccountControllerMockInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + accountImplementation(overrides?: CallOverrides): Promise<[string]>; + accountRegistry(overrides?: CallOverrides): Promise<[string]>; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + computeAccountAddress(salt: BytesLike, overrides?: CallOverrides): Promise<[string]>; + deployAccount(salt: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + executeAccountTransaction(account: string, to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAccountImplementation(accountImplementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAccountRegistry(accountRegistry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + upgradeAccount(account: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + accountImplementation(overrides?: CallOverrides): Promise; + accountRegistry(overrides?: CallOverrides): Promise; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_false9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_true9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise; + computeAccountAddress(salt: BytesLike, overrides?: CallOverrides): Promise; + deployAccount(salt: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + executeAccountTransaction(account: string, to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAccountImplementation(accountImplementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAccountRegistry(accountRegistry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + upgradeAccount(account: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + accountImplementation(overrides?: CallOverrides): Promise; + accountRegistry(overrides?: CallOverrides): Promise; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_false9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_true9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise; + computeAccountAddress(salt: BytesLike, overrides?: CallOverrides): Promise; + deployAccount(salt: BytesLike, overrides?: CallOverrides): Promise; + executeAccountTransaction(account: string, to: string, value: BigNumberish, data: BytesLike, overrides?: CallOverrides): Promise; + setAccountImplementation(accountImplementation_: string, overrides?: CallOverrides): Promise; + setAccountRegistry(accountRegistry_: string, overrides?: CallOverrides): Promise; + upgradeAccount(account: string, overrides?: CallOverrides): Promise; + }; + filters: { + "AccountDeployed(address,address)"(account?: null, accountImplementation?: null): AccountDeployedEventFilter; + AccountDeployed(account?: null, accountImplementation?: null): AccountDeployedEventFilter; + "AccountImplementationUpdated(address)"(accountImplementation?: null): AccountImplementationUpdatedEventFilter; + AccountImplementationUpdated(accountImplementation?: null): AccountImplementationUpdatedEventFilter; + "AccountRegistryUpdated(address)"(accountRegistry?: null): AccountRegistryUpdatedEventFilter; + AccountRegistryUpdated(accountRegistry?: null): AccountRegistryUpdatedEventFilter; + "AccountTransactionExecuted(address,address,uint256,bytes,bytes)"(account?: null, to?: null, value?: null, data?: null, response?: null): AccountTransactionExecutedEventFilter; + AccountTransactionExecuted(account?: null, to?: null, value?: null, data?: null, response?: null): AccountTransactionExecutedEventFilter; + "AccountUpgraded(address,address)"(account?: null, accountImplementation?: null): AccountUpgradedEventFilter; + AccountUpgraded(account?: null, accountImplementation?: null): AccountUpgradedEventFilter; + }; + estimateGas: { + accountImplementation(overrides?: CallOverrides): Promise; + accountRegistry(overrides?: CallOverrides): Promise; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_false9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_true9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise; + computeAccountAddress(salt: BytesLike, overrides?: CallOverrides): Promise; + deployAccount(salt: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + executeAccountTransaction(account: string, to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAccountImplementation(accountImplementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAccountRegistry(accountRegistry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + upgradeAccount(account: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + accountImplementation(overrides?: CallOverrides): Promise; + accountRegistry(overrides?: CallOverrides): Promise; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_false9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_true9c0e30ce(c__9c0e30ce: BytesLike, overrides?: CallOverrides): Promise; + computeAccountAddress(salt: BytesLike, overrides?: CallOverrides): Promise; + deployAccount(salt: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + executeAccountTransaction(account: string, to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAccountImplementation(accountImplementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setAccountRegistry(accountRegistry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + upgradeAccount(account: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/AccountControllerMock.js b/dist/typings/AccountControllerMock.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/AccountControllerMock.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/AccountImplementationV1.d.ts b/dist/typings/AccountImplementationV1.d.ts new file mode 100644 index 00000000..ff80fdd7 --- /dev/null +++ b/dist/typings/AccountImplementationV1.d.ts @@ -0,0 +1,192 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface AccountImplementationV1Interface extends utils.Interface { + functions: { + "c_305923d6(bytes8)": FunctionFragment; + "c_3add61c5(bytes8)": FunctionFragment; + "c_c0828b70(bytes8)": FunctionFragment; + "c_false305923d6(bytes8)": FunctionFragment; + "c_false3add61c5(bytes8)": FunctionFragment; + "c_falsec0828b70(bytes8)": FunctionFragment; + "c_true305923d6(bytes8)": FunctionFragment; + "c_true3add61c5(bytes8)": FunctionFragment; + "c_truec0828b70(bytes8)": FunctionFragment; + "canImplementInterfaceForAddress(bytes32,address)": FunctionFragment; + "initialize(address)": FunctionFragment; + "isInitialized()": FunctionFragment; + "isValidSignature(bytes32,bytes)": FunctionFragment; + "onERC1155Received(address,address,uint256,uint256,bytes)": FunctionFragment; + "onERC721Received(address,address,uint256,bytes)": FunctionFragment; + "registry()": FunctionFragment; + "tokensReceived(address,address,address,uint256,bytes,bytes)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_3add61c5", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_c0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false3add61c5", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true3add61c5", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "canImplementInterfaceForAddress", values: [BytesLike, string]): string; + encodeFunctionData(functionFragment: "initialize", values: [string]): string; + encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; + encodeFunctionData(functionFragment: "isValidSignature", values: [BytesLike, BytesLike]): string; + encodeFunctionData(functionFragment: "onERC1155Received", values: [string, string, BigNumberish, BigNumberish, BytesLike]): string; + encodeFunctionData(functionFragment: "onERC721Received", values: [string, string, BigNumberish, BytesLike]): string; + encodeFunctionData(functionFragment: "registry", values?: undefined): string; + encodeFunctionData(functionFragment: "tokensReceived", values: [string, string, string, BigNumberish, BytesLike, BytesLike]): string; + decodeFunctionResult(functionFragment: "c_305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_3add61c5", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_c0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false3add61c5", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true3add61c5", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "canImplementInterfaceForAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isValidSignature", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onERC1155Received", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onERC721Received", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "registry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokensReceived", data: BytesLike): Result; + events: { + "Initialized(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; +} +export declare type InitializedEvent = TypedEvent<[string], { + initializer: string; +}>; +export declare type InitializedEventFilter = TypedEventFilter; +export interface AccountImplementationV1 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: AccountImplementationV1Interface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise<[string]>; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise<[boolean]>; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[string]>; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[string]>; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise<[string]>; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise<[string]>; + registry(overrides?: CallOverrides): Promise<[string]>; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise<[void]>; + }; + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise; + callStatic: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise; + }; + filters: { + "Initialized(address)"(initializer?: null): InitializedEventFilter; + Initialized(initializer?: null): InitializedEventFilter; + }; + estimateGas: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/AccountImplementationV1.js b/dist/typings/AccountImplementationV1.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/AccountImplementationV1.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/AccountImplementationV1Mock.d.ts b/dist/typings/AccountImplementationV1Mock.d.ts new file mode 100644 index 00000000..73a36832 --- /dev/null +++ b/dist/typings/AccountImplementationV1Mock.d.ts @@ -0,0 +1,216 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface AccountImplementationV1MockInterface extends utils.Interface { + functions: { + "c_274649f2(bytes8)": FunctionFragment; + "c_305923d6(bytes8)": FunctionFragment; + "c_3add61c5(bytes8)": FunctionFragment; + "c_c0828b70(bytes8)": FunctionFragment; + "c_false274649f2(bytes8)": FunctionFragment; + "c_false305923d6(bytes8)": FunctionFragment; + "c_false3add61c5(bytes8)": FunctionFragment; + "c_falsec0828b70(bytes8)": FunctionFragment; + "c_true274649f2(bytes8)": FunctionFragment; + "c_true305923d6(bytes8)": FunctionFragment; + "c_true3add61c5(bytes8)": FunctionFragment; + "c_truec0828b70(bytes8)": FunctionFragment; + "canImplementInterfaceForAddress(bytes32,address)": FunctionFragment; + "initialize(address)": FunctionFragment; + "isInitialized()": FunctionFragment; + "isValidSignature(bytes32,bytes)": FunctionFragment; + "onERC1155Received(address,address,uint256,uint256,bytes)": FunctionFragment; + "onERC721Received(address,address,uint256,bytes)": FunctionFragment; + "registry()": FunctionFragment; + "tokensReceived(address,address,address,uint256,bytes,bytes)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_274649f2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_3add61c5", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_c0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false274649f2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false3add61c5", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true274649f2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true3add61c5", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "canImplementInterfaceForAddress", values: [BytesLike, string]): string; + encodeFunctionData(functionFragment: "initialize", values: [string]): string; + encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; + encodeFunctionData(functionFragment: "isValidSignature", values: [BytesLike, BytesLike]): string; + encodeFunctionData(functionFragment: "onERC1155Received", values: [string, string, BigNumberish, BigNumberish, BytesLike]): string; + encodeFunctionData(functionFragment: "onERC721Received", values: [string, string, BigNumberish, BytesLike]): string; + encodeFunctionData(functionFragment: "registry", values?: undefined): string; + encodeFunctionData(functionFragment: "tokensReceived", values: [string, string, string, BigNumberish, BytesLike, BytesLike]): string; + decodeFunctionResult(functionFragment: "c_274649f2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_3add61c5", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_c0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false274649f2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false3add61c5", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true274649f2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true3add61c5", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "canImplementInterfaceForAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isValidSignature", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onERC1155Received", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onERC721Received", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "registry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokensReceived", data: BytesLike): Result; + events: { + "Initialized(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; +} +export declare type InitializedEvent = TypedEvent<[string], { + initializer: string; +}>; +export declare type InitializedEventFilter = TypedEventFilter; +export interface AccountImplementationV1Mock extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: AccountImplementationV1MockInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise<[string]>; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise<[boolean]>; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[string]>; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[string]>; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise<[string]>; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise<[string]>; + registry(overrides?: CallOverrides): Promise<[string]>; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise<[void]>; + }; + c_274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise; + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_false274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_true274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise; + callStatic: { + c_274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise; + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_false274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_true274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise; + }; + filters: { + "Initialized(address)"(initializer?: null): InitializedEventFilter; + Initialized(initializer?: null): InitializedEventFilter; + }; + estimateGas: { + c_274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise; + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_false274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_true274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + c_274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise; + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_false274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_true274649f2(c__274649f2: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/AccountImplementationV1Mock.js b/dist/typings/AccountImplementationV1Mock.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/AccountImplementationV1Mock.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/AccountRegistry.d.ts b/dist/typings/AccountRegistry.d.ts new file mode 100644 index 00000000..b838919f --- /dev/null +++ b/dist/typings/AccountRegistry.d.ts @@ -0,0 +1,70 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface AccountRegistryInterface extends utils.Interface { + functions: { + "c_203cf0ac(bytes8)": FunctionFragment; + "c_false203cf0ac(bytes8)": FunctionFragment; + "c_true203cf0ac(bytes8)": FunctionFragment; + "isValidAccountSignature(address,bytes,bytes)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_203cf0ac", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false203cf0ac", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true203cf0ac", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "isValidAccountSignature", values: [string, BytesLike, BytesLike]): string; + decodeFunctionResult(functionFragment: "c_203cf0ac", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false203cf0ac", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true203cf0ac", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isValidAccountSignature", data: BytesLike): Result; + events: {}; +} +export interface AccountRegistry extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: AccountRegistryInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + }; + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + callStatic: { + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/AccountRegistry.js b/dist/typings/AccountRegistry.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/AccountRegistry.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/AccountRegistryMock.d.ts b/dist/typings/AccountRegistryMock.d.ts new file mode 100644 index 00000000..9a409732 --- /dev/null +++ b/dist/typings/AccountRegistryMock.d.ts @@ -0,0 +1,110 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface AccountRegistryMockInterface extends utils.Interface { + functions: { + "c_203cf0ac(bytes8)": FunctionFragment; + "c_5dbd0fc3(bytes8)": FunctionFragment; + "c_false203cf0ac(bytes8)": FunctionFragment; + "c_false5dbd0fc3(bytes8)": FunctionFragment; + "c_true203cf0ac(bytes8)": FunctionFragment; + "c_true5dbd0fc3(bytes8)": FunctionFragment; + "isValidAccountSignature(address,bytes,bytes)": FunctionFragment; + "mockAccountOwners(address,address[])": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_203cf0ac", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_5dbd0fc3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false203cf0ac", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false5dbd0fc3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true203cf0ac", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true5dbd0fc3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "isValidAccountSignature", values: [string, BytesLike, BytesLike]): string; + encodeFunctionData(functionFragment: "mockAccountOwners", values: [string, string[]]): string; + decodeFunctionResult(functionFragment: "c_203cf0ac", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_5dbd0fc3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false203cf0ac", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false5dbd0fc3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true203cf0ac", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true5dbd0fc3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isValidAccountSignature", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mockAccountOwners", data: BytesLike): Result; + events: {}; +} +export interface AccountRegistryMock extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: AccountRegistryMockInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + mockAccountOwners(account: string, owners: string[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_false5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_true5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + mockAccountOwners(account: string, owners: string[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_false5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_true5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + mockAccountOwners(account: string, owners: string[], overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_false5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_true5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + mockAccountOwners(account: string, owners: string[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_false5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_true5dbd0fc3(c__5dbd0fc3: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + mockAccountOwners(account: string, owners: string[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/AccountRegistryMock.js b/dist/typings/AccountRegistryMock.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/AccountRegistryMock.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/BalancesHelper.d.ts b/dist/typings/BalancesHelper.d.ts new file mode 100644 index 00000000..ffee106e --- /dev/null +++ b/dist/typings/BalancesHelper.d.ts @@ -0,0 +1,65 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface BalancesHelperInterface extends utils.Interface { + functions: { + "c_053a243a(bytes8)": FunctionFragment; + "c_false053a243a(bytes8)": FunctionFragment; + "c_true053a243a(bytes8)": FunctionFragment; + "getBalances(address[],address[])": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_053a243a", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false053a243a", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true053a243a", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "getBalances", values: [string[], string[]]): string; + decodeFunctionResult(functionFragment: "c_053a243a", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false053a243a", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true053a243a", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getBalances", data: BytesLike): Result; + events: {}; +} +export interface BalancesHelper extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: BalancesHelperInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + getBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise<[BigNumber[]]>; + }; + c_053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise; + c_false053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise; + c_true053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise; + getBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise; + callStatic: { + c_053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise; + c_false053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise; + c_true053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise; + getBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + c_053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise; + c_false053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise; + c_true053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise; + getBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise; + }; + populateTransaction: { + c_053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise; + c_false053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise; + c_true053a243a(c__053a243a: BytesLike, overrides?: CallOverrides): Promise; + getBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/BalancesHelper.js b/dist/typings/BalancesHelper.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/BalancesHelper.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/BalancesHelperV2.d.ts b/dist/typings/BalancesHelperV2.d.ts new file mode 100644 index 00000000..2b3c441f --- /dev/null +++ b/dist/typings/BalancesHelperV2.d.ts @@ -0,0 +1,49 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface BalancesHelperV2Interface extends utils.Interface { + functions: { + "getBalances(address[],address[])": FunctionFragment; + "getSuperfluidWrappedTokenBalances(address[],address[])": FunctionFragment; + }; + encodeFunctionData(functionFragment: "getBalances", values: [string[], string[]]): string; + encodeFunctionData(functionFragment: "getSuperfluidWrappedTokenBalances", values: [string[], string[]]): string; + decodeFunctionResult(functionFragment: "getBalances", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getSuperfluidWrappedTokenBalances", data: BytesLike): Result; + events: {}; +} +export interface BalancesHelperV2 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: BalancesHelperV2Interface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + getBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise<[BigNumber[]]>; + getSuperfluidWrappedTokenBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise<[BigNumber[]]>; + }; + getBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise; + getSuperfluidWrappedTokenBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise; + callStatic: { + getBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise; + getSuperfluidWrappedTokenBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + getBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise; + getSuperfluidWrappedTokenBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise; + }; + populateTransaction: { + getBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise; + getSuperfluidWrappedTokenBalances(accounts: string[], tokens: string[], overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/BalancesHelperV2.js b/dist/typings/BalancesHelperV2.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/BalancesHelperV2.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/Controlled.d.ts b/dist/typings/Controlled.d.ts new file mode 100644 index 00000000..159272e2 --- /dev/null +++ b/dist/typings/Controlled.d.ts @@ -0,0 +1,65 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface ControlledInterface extends utils.Interface { + functions: { + "c_e208e0f4(bytes8)": FunctionFragment; + "c_falsee208e0f4(bytes8)": FunctionFragment; + "c_truee208e0f4(bytes8)": FunctionFragment; + "controller()": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_e208e0f4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsee208e0f4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truee208e0f4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "controller", values?: undefined): string; + decodeFunctionResult(functionFragment: "c_e208e0f4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsee208e0f4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truee208e0f4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "controller", data: BytesLike): Result; + events: {}; +} +export interface Controlled extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ControlledInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + controller(overrides?: CallOverrides): Promise<[string]>; + }; + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + controller(overrides?: CallOverrides): Promise; + callStatic: { + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + controller(overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + controller(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + controller(overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/Controlled.js b/dist/typings/Controlled.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/Controlled.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/ENSAddressResolver.d.ts b/dist/typings/ENSAddressResolver.d.ts new file mode 100644 index 00000000..d6fb1112 --- /dev/null +++ b/dist/typings/ENSAddressResolver.d.ts @@ -0,0 +1,151 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface ENSAddressResolverInterface extends utils.Interface { + functions: { + "addr(bytes32)": FunctionFragment; + "c_53f45729(bytes8)": FunctionFragment; + "c_ac93193e(bytes8)": FunctionFragment; + "c_false53f45729(bytes8)": FunctionFragment; + "c_falseac93193e(bytes8)": FunctionFragment; + "c_true53f45729(bytes8)": FunctionFragment; + "c_trueac93193e(bytes8)": FunctionFragment; + "setAddr(bytes32,uint256,bytes)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "addr", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_53f45729", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_ac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false53f45729", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falseac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true53f45729", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_trueac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "setAddr", values: [BytesLike, BigNumberish, BytesLike]): string; + decodeFunctionResult(functionFragment: "addr", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_53f45729", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_ac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false53f45729", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falseac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true53f45729", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_trueac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setAddr", data: BytesLike): Result; + events: { + "AddrChanged(bytes32,address)": EventFragment; + "AddressChanged(bytes32,uint256,bytes)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "AddrChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AddressChanged"): EventFragment; +} +export declare type AddrChangedEvent = TypedEvent<[ + string, + string +], { + node: string; + addr: string; +}>; +export declare type AddrChangedEventFilter = TypedEventFilter; +export declare type AddressChangedEvent = TypedEvent<[ + string, + BigNumber, + string +], { + node: string; + coinType: BigNumber; + newAddress: string; +}>; +export declare type AddressChangedEventFilter = TypedEventFilter; +export interface ENSAddressResolver extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ENSAddressResolverInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + "addr(bytes32)"(node: BytesLike, overrides?: CallOverrides): Promise<[string]>; + "addr(bytes32,uint256)"(node: BytesLike, coinType: BigNumberish, overrides?: CallOverrides): Promise<[string]>; + c_53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + "setAddr(bytes32,uint256,bytes)"(node: BytesLike, coinType: BigNumberish, addr_: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "setAddr(bytes32,address)"(node: BytesLike, addr_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + "addr(bytes32)"(node: BytesLike, overrides?: CallOverrides): Promise; + "addr(bytes32,uint256)"(node: BytesLike, coinType: BigNumberish, overrides?: CallOverrides): Promise; + c_53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_false53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_true53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + "setAddr(bytes32,uint256,bytes)"(node: BytesLike, coinType: BigNumberish, addr_: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "setAddr(bytes32,address)"(node: BytesLike, addr_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + "addr(bytes32)"(node: BytesLike, overrides?: CallOverrides): Promise; + "addr(bytes32,uint256)"(node: BytesLike, coinType: BigNumberish, overrides?: CallOverrides): Promise; + c_53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_false53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_true53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + "setAddr(bytes32,uint256,bytes)"(node: BytesLike, coinType: BigNumberish, addr_: BytesLike, overrides?: CallOverrides): Promise; + "setAddr(bytes32,address)"(node: BytesLike, addr_: string, overrides?: CallOverrides): Promise; + }; + filters: { + "AddrChanged(bytes32,address)"(node?: BytesLike | null, addr?: null): AddrChangedEventFilter; + AddrChanged(node?: BytesLike | null, addr?: null): AddrChangedEventFilter; + "AddressChanged(bytes32,uint256,bytes)"(node?: BytesLike | null, coinType?: null, newAddress?: null): AddressChangedEventFilter; + AddressChanged(node?: BytesLike | null, coinType?: null, newAddress?: null): AddressChangedEventFilter; + }; + estimateGas: { + "addr(bytes32)"(node: BytesLike, overrides?: CallOverrides): Promise; + "addr(bytes32,uint256)"(node: BytesLike, coinType: BigNumberish, overrides?: CallOverrides): Promise; + c_53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_false53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_true53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + "setAddr(bytes32,uint256,bytes)"(node: BytesLike, coinType: BigNumberish, addr_: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "setAddr(bytes32,address)"(node: BytesLike, addr_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + "addr(bytes32)"(node: BytesLike, overrides?: CallOverrides): Promise; + "addr(bytes32,uint256)"(node: BytesLike, coinType: BigNumberish, overrides?: CallOverrides): Promise; + c_53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_false53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_true53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + "setAddr(bytes32,uint256,bytes)"(node: BytesLike, coinType: BigNumberish, addr_: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "setAddr(bytes32,address)"(node: BytesLike, addr_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/ENSAddressResolver.js b/dist/typings/ENSAddressResolver.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/ENSAddressResolver.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/ENSController.d.ts b/dist/typings/ENSController.d.ts new file mode 100644 index 00000000..f8178718 --- /dev/null +++ b/dist/typings/ENSController.d.ts @@ -0,0 +1,762 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export declare type SubNodeRegistrationStruct = { + account: string; + node: BytesLike; + label: BytesLike; +}; +export declare type SubNodeRegistrationStructOutput = [string, string, string] & { + account: string; + node: string; + label: string; +}; +export interface ENSControllerInterface extends utils.Interface { + functions: { + "addGuardian(address)": FunctionFragment; + "addr(bytes32)": FunctionFragment; + "c_0ffe16b4(bytes8)": FunctionFragment; + "c_1b54acf3(bytes8)": FunctionFragment; + "c_3880312f(bytes8)": FunctionFragment; + "c_4f849103(bytes8)": FunctionFragment; + "c_53f45729(bytes8)": FunctionFragment; + "c_a2a35eda(bytes8)": FunctionFragment; + "c_ac93193e(bytes8)": FunctionFragment; + "c_c0828b70(bytes8)": FunctionFragment; + "c_d5c463c2(bytes8)": FunctionFragment; + "c_e1dc25ce(bytes8)": FunctionFragment; + "c_false0ffe16b4(bytes8)": FunctionFragment; + "c_false1b54acf3(bytes8)": FunctionFragment; + "c_false3880312f(bytes8)": FunctionFragment; + "c_false4f849103(bytes8)": FunctionFragment; + "c_false53f45729(bytes8)": FunctionFragment; + "c_falsea2a35eda(bytes8)": FunctionFragment; + "c_falseac93193e(bytes8)": FunctionFragment; + "c_falsec0828b70(bytes8)": FunctionFragment; + "c_falsed5c463c2(bytes8)": FunctionFragment; + "c_falsee1dc25ce(bytes8)": FunctionFragment; + "c_true0ffe16b4(bytes8)": FunctionFragment; + "c_true1b54acf3(bytes8)": FunctionFragment; + "c_true3880312f(bytes8)": FunctionFragment; + "c_true4f849103(bytes8)": FunctionFragment; + "c_true53f45729(bytes8)": FunctionFragment; + "c_truea2a35eda(bytes8)": FunctionFragment; + "c_trueac93193e(bytes8)": FunctionFragment; + "c_truec0828b70(bytes8)": FunctionFragment; + "c_trued5c463c2(bytes8)": FunctionFragment; + "c_truee1dc25ce(bytes8)": FunctionFragment; + "chainId()": FunctionFragment; + "gateway()": FunctionFragment; + "hashSubNodeRegistration((address,bytes32,bytes32))": FunctionFragment; + "initialize(address,address[],address)": FunctionFragment; + "isGuardian(address)": FunctionFragment; + "isInitialized()": FunctionFragment; + "name(bytes32)": FunctionFragment; + "nodeOwners(bytes32)": FunctionFragment; + "pubkey(bytes32)": FunctionFragment; + "registerSubNode(bytes32,bytes32,bytes)": FunctionFragment; + "registry()": FunctionFragment; + "releaseNode(bytes32)": FunctionFragment; + "removeGuardian(address)": FunctionFragment; + "setAddr(bytes32,uint256,bytes)": FunctionFragment; + "setName(bytes32,string)": FunctionFragment; + "setPubkey(bytes32,bytes32,bytes32)": FunctionFragment; + "setRegistry(address)": FunctionFragment; + "setText(bytes32,string,string)": FunctionFragment; + "submitNode(bytes32)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "syncAddr(bytes32)": FunctionFragment; + "text(bytes32,string)": FunctionFragment; + "verifyGuardianSignature(bytes32,bytes)": FunctionFragment; + "verifyNode(bytes32)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "addGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "addr", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_1b54acf3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_3880312f", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_4f849103", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_53f45729", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_a2a35eda", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_ac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_c0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_d5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_e1dc25ce", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false1b54acf3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false3880312f", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false4f849103", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false53f45729", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsea2a35eda", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falseac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsed5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsee1dc25ce", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true1b54acf3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true3880312f", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true4f849103", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true53f45729", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truea2a35eda", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_trueac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_trued5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truee1dc25ce", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "chainId", values?: undefined): string; + encodeFunctionData(functionFragment: "gateway", values?: undefined): string; + encodeFunctionData(functionFragment: "hashSubNodeRegistration", values: [SubNodeRegistrationStruct]): string; + encodeFunctionData(functionFragment: "initialize", values: [string, string[], string]): string; + encodeFunctionData(functionFragment: "isGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "nodeOwners", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "pubkey", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "registerSubNode", values: [BytesLike, BytesLike, BytesLike]): string; + encodeFunctionData(functionFragment: "registry", values?: undefined): string; + encodeFunctionData(functionFragment: "releaseNode", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "removeGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "setAddr", values: [BytesLike, BigNumberish, BytesLike]): string; + encodeFunctionData(functionFragment: "setName", values: [BytesLike, string]): string; + encodeFunctionData(functionFragment: "setPubkey", values: [BytesLike, BytesLike, BytesLike]): string; + encodeFunctionData(functionFragment: "setRegistry", values: [string]): string; + encodeFunctionData(functionFragment: "setText", values: [BytesLike, string, string]): string; + encodeFunctionData(functionFragment: "submitNode", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "syncAddr", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "text", values: [BytesLike, string]): string; + encodeFunctionData(functionFragment: "verifyGuardianSignature", values: [BytesLike, BytesLike]): string; + encodeFunctionData(functionFragment: "verifyNode", values: [BytesLike]): string; + decodeFunctionResult(functionFragment: "addGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addr", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_1b54acf3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_3880312f", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_4f849103", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_53f45729", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_a2a35eda", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_ac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_c0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_d5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_e1dc25ce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false1b54acf3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false3880312f", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false4f849103", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false53f45729", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsea2a35eda", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falseac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsed5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsee1dc25ce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true1b54acf3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true3880312f", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true4f849103", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true53f45729", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truea2a35eda", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_trueac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_trued5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truee1dc25ce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "chainId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "gateway", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hashSubNodeRegistration", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nodeOwners", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pubkey", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "registerSubNode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "registry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "releaseNode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "removeGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setAddr", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setName", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setPubkey", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setRegistry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setText", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "submitNode", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "syncAddr", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "text", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "verifyGuardianSignature", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "verifyNode", data: BytesLike): Result; + events: { + "AddrChanged(bytes32,address)": EventFragment; + "AddressChanged(bytes32,uint256,bytes)": EventFragment; + "GuardianAdded(address,address)": EventFragment; + "GuardianRemoved(address,address)": EventFragment; + "Initialized(address)": EventFragment; + "NameChanged(bytes32,string)": EventFragment; + "NodeReleased(bytes32,address)": EventFragment; + "NodeSubmitted(bytes32,address)": EventFragment; + "NodeVerified(bytes32)": EventFragment; + "PubkeyChanged(bytes32,bytes32,bytes32)": EventFragment; + "RegistryChanged(address)": EventFragment; + "TextChanged(bytes32,string,string)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "AddrChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AddressChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GuardianAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GuardianRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NameChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NodeReleased"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NodeSubmitted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NodeVerified"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PubkeyChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RegistryChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TextChanged"): EventFragment; +} +export declare type AddrChangedEvent = TypedEvent<[ + string, + string +], { + node: string; + addr: string; +}>; +export declare type AddrChangedEventFilter = TypedEventFilter; +export declare type AddressChangedEvent = TypedEvent<[ + string, + BigNumber, + string +], { + node: string; + coinType: BigNumber; + newAddress: string; +}>; +export declare type AddressChangedEventFilter = TypedEventFilter; +export declare type GuardianAddedEvent = TypedEvent<[ + string, + string +], { + sender: string; + guardian: string; +}>; +export declare type GuardianAddedEventFilter = TypedEventFilter; +export declare type GuardianRemovedEvent = TypedEvent<[ + string, + string +], { + sender: string; + guardian: string; +}>; +export declare type GuardianRemovedEventFilter = TypedEventFilter; +export declare type InitializedEvent = TypedEvent<[string], { + initializer: string; +}>; +export declare type InitializedEventFilter = TypedEventFilter; +export declare type NameChangedEvent = TypedEvent<[ + string, + string +], { + node: string; + name: string; +}>; +export declare type NameChangedEventFilter = TypedEventFilter; +export declare type NodeReleasedEvent = TypedEvent<[ + string, + string +], { + node: string; + owner: string; +}>; +export declare type NodeReleasedEventFilter = TypedEventFilter; +export declare type NodeSubmittedEvent = TypedEvent<[ + string, + string +], { + node: string; + owner: string; +}>; +export declare type NodeSubmittedEventFilter = TypedEventFilter; +export declare type NodeVerifiedEvent = TypedEvent<[string], { + node: string; +}>; +export declare type NodeVerifiedEventFilter = TypedEventFilter; +export declare type PubkeyChangedEvent = TypedEvent<[ + string, + string, + string +], { + node: string; + x: string; + y: string; +}>; +export declare type PubkeyChangedEventFilter = TypedEventFilter; +export declare type RegistryChangedEvent = TypedEvent<[string], { + registry: string; +}>; +export declare type RegistryChangedEventFilter = TypedEventFilter; +export declare type TextChangedEvent = TypedEvent<[ + string, + string, + string +], { + node: string; + indexedKey: string; + key: string; +}>; +export declare type TextChangedEventFilter = TypedEventFilter; +export interface ENSController extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ENSControllerInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "addr(bytes32)"(node: BytesLike, overrides?: CallOverrides): Promise<[string]>; + "addr(bytes32,uint256)"(node: BytesLike, coinType: BigNumberish, overrides?: CallOverrides): Promise<[string]>; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_a2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_e1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsea2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truea2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + chainId(overrides?: CallOverrides): Promise<[BigNumber]>; + gateway(overrides?: CallOverrides): Promise<[string]>; + hashSubNodeRegistration(subNodeRegistration: SubNodeRegistrationStruct, overrides?: CallOverrides): Promise<[string]>; + initialize(registry_: string, guardians_: string[], gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise<[boolean]>; + isInitialized(overrides?: CallOverrides): Promise<[boolean]>; + name(node: BytesLike, overrides?: CallOverrides): Promise<[string]>; + nodeOwners(arg0: BytesLike, overrides?: CallOverrides): Promise<[string]>; + pubkey(node: BytesLike, overrides?: CallOverrides): Promise<[string, string] & { + x: string; + y: string; + }>; + registerSubNode(node: BytesLike, label: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + registry(overrides?: CallOverrides): Promise<[string]>; + releaseNode(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "setAddr(bytes32,uint256,bytes)"(node: BytesLike, coinType: BigNumberish, addr_: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "setAddr(bytes32,address)"(node: BytesLike, addr_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setName(node: BytesLike, name: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setPubkey(node: BytesLike, x: BytesLike, y: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setRegistry(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setText(node: BytesLike, key: string, value: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + submitNode(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + supportsInterface(interfaceID: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + syncAddr(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + text(node: BytesLike, key: string, overrides?: CallOverrides): Promise<[string]>; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + verifyNode(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "addr(bytes32)"(node: BytesLike, overrides?: CallOverrides): Promise; + "addr(bytes32,uint256)"(node: BytesLike, coinType: BigNumberish, overrides?: CallOverrides): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_a2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_e1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_false3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_false4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_false53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_falsea2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_falsee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_true3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_true4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_true53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_truea2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_truee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + hashSubNodeRegistration(subNodeRegistration: SubNodeRegistrationStruct, overrides?: CallOverrides): Promise; + initialize(registry_: string, guardians_: string[], gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + name(node: BytesLike, overrides?: CallOverrides): Promise; + nodeOwners(arg0: BytesLike, overrides?: CallOverrides): Promise; + pubkey(node: BytesLike, overrides?: CallOverrides): Promise<[string, string] & { + x: string; + y: string; + }>; + registerSubNode(node: BytesLike, label: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + registry(overrides?: CallOverrides): Promise; + releaseNode(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "setAddr(bytes32,uint256,bytes)"(node: BytesLike, coinType: BigNumberish, addr_: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "setAddr(bytes32,address)"(node: BytesLike, addr_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setName(node: BytesLike, name: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setPubkey(node: BytesLike, x: BytesLike, y: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setRegistry(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setText(node: BytesLike, key: string, value: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + submitNode(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + supportsInterface(interfaceID: BytesLike, overrides?: CallOverrides): Promise; + syncAddr(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + text(node: BytesLike, key: string, overrides?: CallOverrides): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + verifyNode(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + addGuardian(guardian: string, overrides?: CallOverrides): Promise; + "addr(bytes32)"(node: BytesLike, overrides?: CallOverrides): Promise; + "addr(bytes32,uint256)"(node: BytesLike, coinType: BigNumberish, overrides?: CallOverrides): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_a2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_e1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_false3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_false4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_false53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_falsea2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_falsee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_true3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_true4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_true53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_truea2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_truee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + hashSubNodeRegistration(subNodeRegistration: SubNodeRegistrationStruct, overrides?: CallOverrides): Promise; + initialize(registry_: string, guardians_: string[], gateway_: string, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + name(node: BytesLike, overrides?: CallOverrides): Promise; + nodeOwners(arg0: BytesLike, overrides?: CallOverrides): Promise; + pubkey(node: BytesLike, overrides?: CallOverrides): Promise<[string, string] & { + x: string; + y: string; + }>; + registerSubNode(node: BytesLike, label: BytesLike, guardianSignature: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + releaseNode(node: BytesLike, overrides?: CallOverrides): Promise; + removeGuardian(guardian: string, overrides?: CallOverrides): Promise; + "setAddr(bytes32,uint256,bytes)"(node: BytesLike, coinType: BigNumberish, addr_: BytesLike, overrides?: CallOverrides): Promise; + "setAddr(bytes32,address)"(node: BytesLike, addr_: string, overrides?: CallOverrides): Promise; + setName(node: BytesLike, name: string, overrides?: CallOverrides): Promise; + setPubkey(node: BytesLike, x: BytesLike, y: BytesLike, overrides?: CallOverrides): Promise; + setRegistry(registry_: string, overrides?: CallOverrides): Promise; + setText(node: BytesLike, key: string, value: string, overrides?: CallOverrides): Promise; + submitNode(node: BytesLike, overrides?: CallOverrides): Promise; + supportsInterface(interfaceID: BytesLike, overrides?: CallOverrides): Promise; + syncAddr(node: BytesLike, overrides?: CallOverrides): Promise; + text(node: BytesLike, key: string, overrides?: CallOverrides): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + verifyNode(node: BytesLike, overrides?: CallOverrides): Promise; + }; + filters: { + "AddrChanged(bytes32,address)"(node?: BytesLike | null, addr?: null): AddrChangedEventFilter; + AddrChanged(node?: BytesLike | null, addr?: null): AddrChangedEventFilter; + "AddressChanged(bytes32,uint256,bytes)"(node?: BytesLike | null, coinType?: null, newAddress?: null): AddressChangedEventFilter; + AddressChanged(node?: BytesLike | null, coinType?: null, newAddress?: null): AddressChangedEventFilter; + "GuardianAdded(address,address)"(sender?: null, guardian?: null): GuardianAddedEventFilter; + GuardianAdded(sender?: null, guardian?: null): GuardianAddedEventFilter; + "GuardianRemoved(address,address)"(sender?: null, guardian?: null): GuardianRemovedEventFilter; + GuardianRemoved(sender?: null, guardian?: null): GuardianRemovedEventFilter; + "Initialized(address)"(initializer?: null): InitializedEventFilter; + Initialized(initializer?: null): InitializedEventFilter; + "NameChanged(bytes32,string)"(node?: BytesLike | null, name?: null): NameChangedEventFilter; + NameChanged(node?: BytesLike | null, name?: null): NameChangedEventFilter; + "NodeReleased(bytes32,address)"(node?: null, owner?: null): NodeReleasedEventFilter; + NodeReleased(node?: null, owner?: null): NodeReleasedEventFilter; + "NodeSubmitted(bytes32,address)"(node?: null, owner?: null): NodeSubmittedEventFilter; + NodeSubmitted(node?: null, owner?: null): NodeSubmittedEventFilter; + "NodeVerified(bytes32)"(node?: null): NodeVerifiedEventFilter; + NodeVerified(node?: null): NodeVerifiedEventFilter; + "PubkeyChanged(bytes32,bytes32,bytes32)"(node?: BytesLike | null, x?: null, y?: null): PubkeyChangedEventFilter; + PubkeyChanged(node?: BytesLike | null, x?: null, y?: null): PubkeyChangedEventFilter; + "RegistryChanged(address)"(registry?: null): RegistryChangedEventFilter; + RegistryChanged(registry?: null): RegistryChangedEventFilter; + "TextChanged(bytes32,string,string)"(node?: BytesLike | null, indexedKey?: string | null, key?: null): TextChangedEventFilter; + TextChanged(node?: BytesLike | null, indexedKey?: string | null, key?: null): TextChangedEventFilter; + }; + estimateGas: { + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "addr(bytes32)"(node: BytesLike, overrides?: CallOverrides): Promise; + "addr(bytes32,uint256)"(node: BytesLike, coinType: BigNumberish, overrides?: CallOverrides): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_a2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_e1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_false3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_false4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_false53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_falsea2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_falsee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_true3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_true4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_true53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_truea2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_truee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + hashSubNodeRegistration(subNodeRegistration: SubNodeRegistrationStruct, overrides?: CallOverrides): Promise; + initialize(registry_: string, guardians_: string[], gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + name(node: BytesLike, overrides?: CallOverrides): Promise; + nodeOwners(arg0: BytesLike, overrides?: CallOverrides): Promise; + pubkey(node: BytesLike, overrides?: CallOverrides): Promise; + registerSubNode(node: BytesLike, label: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + registry(overrides?: CallOverrides): Promise; + releaseNode(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "setAddr(bytes32,uint256,bytes)"(node: BytesLike, coinType: BigNumberish, addr_: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "setAddr(bytes32,address)"(node: BytesLike, addr_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setName(node: BytesLike, name: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setPubkey(node: BytesLike, x: BytesLike, y: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setRegistry(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setText(node: BytesLike, key: string, value: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + submitNode(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + supportsInterface(interfaceID: BytesLike, overrides?: CallOverrides): Promise; + syncAddr(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + text(node: BytesLike, key: string, overrides?: CallOverrides): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + verifyNode(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "addr(bytes32)"(node: BytesLike, overrides?: CallOverrides): Promise; + "addr(bytes32,uint256)"(node: BytesLike, coinType: BigNumberish, overrides?: CallOverrides): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_a2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_e1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_false3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_false4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_false53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_falsea2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_falsee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_true3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_true4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_true53f45729(c__53f45729: BytesLike, overrides?: CallOverrides): Promise; + c_truea2a35eda(c__a2a35eda: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_truee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + hashSubNodeRegistration(subNodeRegistration: SubNodeRegistrationStruct, overrides?: CallOverrides): Promise; + initialize(registry_: string, guardians_: string[], gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + name(node: BytesLike, overrides?: CallOverrides): Promise; + nodeOwners(arg0: BytesLike, overrides?: CallOverrides): Promise; + pubkey(node: BytesLike, overrides?: CallOverrides): Promise; + registerSubNode(node: BytesLike, label: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + registry(overrides?: CallOverrides): Promise; + releaseNode(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "setAddr(bytes32,uint256,bytes)"(node: BytesLike, coinType: BigNumberish, addr_: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + "setAddr(bytes32,address)"(node: BytesLike, addr_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setName(node: BytesLike, name: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setPubkey(node: BytesLike, x: BytesLike, y: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setRegistry(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setText(node: BytesLike, key: string, value: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + submitNode(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + supportsInterface(interfaceID: BytesLike, overrides?: CallOverrides): Promise; + syncAddr(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + text(node: BytesLike, key: string, overrides?: CallOverrides): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + verifyNode(node: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/ENSController.js b/dist/typings/ENSController.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/ENSController.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/ENSHelper.d.ts b/dist/typings/ENSHelper.d.ts new file mode 100644 index 00000000..b6804488 --- /dev/null +++ b/dist/typings/ENSHelper.d.ts @@ -0,0 +1,139 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface ENSHelperInterface extends utils.Interface { + functions: { + "c_c0828b70(bytes8)": FunctionFragment; + "c_ddc59594(bytes8)": FunctionFragment; + "c_falsec0828b70(bytes8)": FunctionFragment; + "c_falseddc59594(bytes8)": FunctionFragment; + "c_truec0828b70(bytes8)": FunctionFragment; + "c_trueddc59594(bytes8)": FunctionFragment; + "getAddresses(bytes32[])": FunctionFragment; + "getNames(bytes32[])": FunctionFragment; + "initialize(address)": FunctionFragment; + "isInitialized()": FunctionFragment; + "registry()": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_c0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_ddc59594", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falseddc59594", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_trueddc59594", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "getAddresses", values: [BytesLike[]]): string; + encodeFunctionData(functionFragment: "getNames", values: [BytesLike[]]): string; + encodeFunctionData(functionFragment: "initialize", values: [string]): string; + encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; + encodeFunctionData(functionFragment: "registry", values?: undefined): string; + decodeFunctionResult(functionFragment: "c_c0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_ddc59594", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falseddc59594", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_trueddc59594", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAddresses", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getNames", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "registry", data: BytesLike): Result; + events: { + "Initialized(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; +} +export declare type InitializedEvent = TypedEvent<[string], { + initializer: string; +}>; +export declare type InitializedEventFilter = TypedEventFilter; +export interface ENSHelper extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ENSHelperInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_ddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falseddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_trueddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + getAddresses(nodes: BytesLike[], overrides?: CallOverrides): Promise<[string[]]>; + getNames(nodes: BytesLike[], overrides?: CallOverrides): Promise<[string[]]>; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise<[boolean]>; + registry(overrides?: CallOverrides): Promise<[string]>; + }; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_ddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falseddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trueddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise; + getAddresses(nodes: BytesLike[], overrides?: CallOverrides): Promise; + getNames(nodes: BytesLike[], overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + callStatic: { + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_ddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falseddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trueddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise; + getAddresses(nodes: BytesLike[], overrides?: CallOverrides): Promise; + getNames(nodes: BytesLike[], overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + }; + filters: { + "Initialized(address)"(initializer?: null): InitializedEventFilter; + Initialized(initializer?: null): InitializedEventFilter; + }; + estimateGas: { + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_ddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falseddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trueddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise; + getAddresses(nodes: BytesLike[], overrides?: CallOverrides): Promise; + getNames(nodes: BytesLike[], overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_ddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falseddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trueddc59594(c__ddc59594: BytesLike, overrides?: CallOverrides): Promise; + getAddresses(nodes: BytesLike[], overrides?: CallOverrides): Promise; + getNames(nodes: BytesLike[], overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/ENSHelper.js b/dist/typings/ENSHelper.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/ENSHelper.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/ENSNameResolver.d.ts b/dist/typings/ENSNameResolver.d.ts new file mode 100644 index 00000000..f6c584c4 --- /dev/null +++ b/dist/typings/ENSNameResolver.d.ts @@ -0,0 +1,119 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface ENSNameResolverInterface extends utils.Interface { + functions: { + "c_4f849103(bytes8)": FunctionFragment; + "c_ac93193e(bytes8)": FunctionFragment; + "c_false4f849103(bytes8)": FunctionFragment; + "c_falseac93193e(bytes8)": FunctionFragment; + "c_true4f849103(bytes8)": FunctionFragment; + "c_trueac93193e(bytes8)": FunctionFragment; + "name(bytes32)": FunctionFragment; + "setName(bytes32,string)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_4f849103", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_ac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false4f849103", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falseac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true4f849103", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_trueac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "name", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "setName", values: [BytesLike, string]): string; + decodeFunctionResult(functionFragment: "c_4f849103", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_ac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false4f849103", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falseac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true4f849103", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_trueac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setName", data: BytesLike): Result; + events: { + "NameChanged(bytes32,string)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "NameChanged"): EventFragment; +} +export declare type NameChangedEvent = TypedEvent<[ + string, + string +], { + node: string; + name: string; +}>; +export declare type NameChangedEventFilter = TypedEventFilter; +export interface ENSNameResolver extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ENSNameResolverInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + name(node: BytesLike, overrides?: CallOverrides): Promise<[string]>; + setName(node: BytesLike, name: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + c_4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_false4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_true4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + name(node: BytesLike, overrides?: CallOverrides): Promise; + setName(node: BytesLike, name: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + c_4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_false4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_true4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + name(node: BytesLike, overrides?: CallOverrides): Promise; + setName(node: BytesLike, name: string, overrides?: CallOverrides): Promise; + }; + filters: { + "NameChanged(bytes32,string)"(node?: BytesLike | null, name?: null): NameChangedEventFilter; + NameChanged(node?: BytesLike | null, name?: null): NameChangedEventFilter; + }; + estimateGas: { + c_4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_false4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_true4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + name(node: BytesLike, overrides?: CallOverrides): Promise; + setName(node: BytesLike, name: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + c_4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_false4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_true4f849103(c__4f849103: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + name(node: BytesLike, overrides?: CallOverrides): Promise; + setName(node: BytesLike, name: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/ENSNameResolver.js b/dist/typings/ENSNameResolver.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/ENSNameResolver.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/ENSPubKeyResolver.d.ts b/dist/typings/ENSPubKeyResolver.d.ts new file mode 100644 index 00000000..bbec0b48 --- /dev/null +++ b/dist/typings/ENSPubKeyResolver.d.ts @@ -0,0 +1,130 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface ENSPubKeyResolverInterface extends utils.Interface { + functions: { + "c_ac93193e(bytes8)": FunctionFragment; + "c_e1dc25ce(bytes8)": FunctionFragment; + "c_falseac93193e(bytes8)": FunctionFragment; + "c_falsee1dc25ce(bytes8)": FunctionFragment; + "c_trueac93193e(bytes8)": FunctionFragment; + "c_truee1dc25ce(bytes8)": FunctionFragment; + "pubkey(bytes32)": FunctionFragment; + "setPubkey(bytes32,bytes32,bytes32)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_ac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_e1dc25ce", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falseac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsee1dc25ce", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_trueac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truee1dc25ce", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "pubkey", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "setPubkey", values: [BytesLike, BytesLike, BytesLike]): string; + decodeFunctionResult(functionFragment: "c_ac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_e1dc25ce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falseac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsee1dc25ce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_trueac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truee1dc25ce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pubkey", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setPubkey", data: BytesLike): Result; + events: { + "PubkeyChanged(bytes32,bytes32,bytes32)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "PubkeyChanged"): EventFragment; +} +export declare type PubkeyChangedEvent = TypedEvent<[ + string, + string, + string +], { + node: string; + x: string; + y: string; +}>; +export declare type PubkeyChangedEventFilter = TypedEventFilter; +export interface ENSPubKeyResolver extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ENSPubKeyResolverInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_e1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + pubkey(node: BytesLike, overrides?: CallOverrides): Promise<[string, string] & { + x: string; + y: string; + }>; + setPubkey(node: BytesLike, x: BytesLike, y: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_e1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_falsee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_truee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + pubkey(node: BytesLike, overrides?: CallOverrides): Promise<[string, string] & { + x: string; + y: string; + }>; + setPubkey(node: BytesLike, x: BytesLike, y: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_e1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_falsee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_truee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + pubkey(node: BytesLike, overrides?: CallOverrides): Promise<[string, string] & { + x: string; + y: string; + }>; + setPubkey(node: BytesLike, x: BytesLike, y: BytesLike, overrides?: CallOverrides): Promise; + }; + filters: { + "PubkeyChanged(bytes32,bytes32,bytes32)"(node?: BytesLike | null, x?: null, y?: null): PubkeyChangedEventFilter; + PubkeyChanged(node?: BytesLike | null, x?: null, y?: null): PubkeyChangedEventFilter; + }; + estimateGas: { + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_e1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_falsee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_truee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + pubkey(node: BytesLike, overrides?: CallOverrides): Promise; + setPubkey(node: BytesLike, x: BytesLike, y: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_e1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_falsee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_truee1dc25ce(c__e1dc25ce: BytesLike, overrides?: CallOverrides): Promise; + pubkey(node: BytesLike, overrides?: CallOverrides): Promise; + setPubkey(node: BytesLike, x: BytesLike, y: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/ENSPubKeyResolver.js b/dist/typings/ENSPubKeyResolver.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/ENSPubKeyResolver.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/ENSRegistry.d.ts b/dist/typings/ENSRegistry.d.ts new file mode 100644 index 00000000..259e79ee --- /dev/null +++ b/dist/typings/ENSRegistry.d.ts @@ -0,0 +1,275 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface ENSRegistryInterface extends utils.Interface { + functions: { + "c_18e7c73b(bytes8)": FunctionFragment; + "c_false18e7c73b(bytes8)": FunctionFragment; + "c_true18e7c73b(bytes8)": FunctionFragment; + "isApprovedForAll(address,address)": FunctionFragment; + "owner(bytes32)": FunctionFragment; + "recordExists(bytes32)": FunctionFragment; + "resolver(bytes32)": FunctionFragment; + "setApprovalForAll(address,bool)": FunctionFragment; + "setOwner(bytes32,address)": FunctionFragment; + "setRecord(bytes32,address,address,uint64)": FunctionFragment; + "setResolver(bytes32,address)": FunctionFragment; + "setSubnodeOwner(bytes32,bytes32,address)": FunctionFragment; + "setSubnodeRecord(bytes32,bytes32,address,address,uint64)": FunctionFragment; + "setTTL(bytes32,uint64)": FunctionFragment; + "ttl(bytes32)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_18e7c73b", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false18e7c73b", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true18e7c73b", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "isApprovedForAll", values: [string, string]): string; + encodeFunctionData(functionFragment: "owner", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "recordExists", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "resolver", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "setApprovalForAll", values: [string, boolean]): string; + encodeFunctionData(functionFragment: "setOwner", values: [BytesLike, string]): string; + encodeFunctionData(functionFragment: "setRecord", values: [BytesLike, string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: "setResolver", values: [BytesLike, string]): string; + encodeFunctionData(functionFragment: "setSubnodeOwner", values: [BytesLike, BytesLike, string]): string; + encodeFunctionData(functionFragment: "setSubnodeRecord", values: [BytesLike, BytesLike, string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: "setTTL", values: [BytesLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "ttl", values: [BytesLike]): string; + decodeFunctionResult(functionFragment: "c_18e7c73b", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false18e7c73b", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true18e7c73b", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isApprovedForAll", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "recordExists", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "resolver", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setApprovalForAll", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setRecord", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setResolver", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setSubnodeOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setSubnodeRecord", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setTTL", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "ttl", data: BytesLike): Result; + events: { + "ApprovalForAll(address,address,bool)": EventFragment; + "NewOwner(bytes32,bytes32,address)": EventFragment; + "NewResolver(bytes32,address)": EventFragment; + "NewTTL(bytes32,uint64)": EventFragment; + "Transfer(bytes32,address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewOwner"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewResolver"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewTTL"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +export declare type ApprovalForAllEvent = TypedEvent<[ + string, + string, + boolean +], { + owner: string; + operator: string; + approved: boolean; +}>; +export declare type ApprovalForAllEventFilter = TypedEventFilter; +export declare type NewOwnerEvent = TypedEvent<[ + string, + string, + string +], { + node: string; + label: string; + owner: string; +}>; +export declare type NewOwnerEventFilter = TypedEventFilter; +export declare type NewResolverEvent = TypedEvent<[ + string, + string +], { + node: string; + resolver: string; +}>; +export declare type NewResolverEventFilter = TypedEventFilter; +export declare type NewTTLEvent = TypedEvent<[ + string, + BigNumber +], { + node: string; + ttl: BigNumber; +}>; +export declare type NewTTLEventFilter = TypedEventFilter; +export declare type TransferEvent = TypedEvent<[ + string, + string +], { + node: string; + owner: string; +}>; +export declare type TransferEventFilter = TypedEventFilter; +export interface ENSRegistry extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ENSRegistryInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + isApprovedForAll(owner_: string, operator: string, overrides?: CallOverrides): Promise<[boolean]>; + owner(node: BytesLike, overrides?: CallOverrides): Promise<[string]>; + recordExists(node: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + resolver(node: BytesLike, overrides?: CallOverrides): Promise<[string]>; + setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setOwner(node: BytesLike, owner_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setRecord(node: BytesLike, owner_: string, resolver_: string, ttl_: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setResolver(node: BytesLike, resolver_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setSubnodeOwner(node: BytesLike, label: BytesLike, owner_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setSubnodeRecord(node: BytesLike, label: BytesLike, owner_: string, resolver_: string, ttl_: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setTTL(node: BytesLike, ttl_: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + ttl(node: BytesLike, overrides?: CallOverrides): Promise<[BigNumber]>; + }; + c_18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise; + c_false18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise; + c_true18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise; + isApprovedForAll(owner_: string, operator: string, overrides?: CallOverrides): Promise; + owner(node: BytesLike, overrides?: CallOverrides): Promise; + recordExists(node: BytesLike, overrides?: CallOverrides): Promise; + resolver(node: BytesLike, overrides?: CallOverrides): Promise; + setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setOwner(node: BytesLike, owner_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setRecord(node: BytesLike, owner_: string, resolver_: string, ttl_: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setResolver(node: BytesLike, resolver_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setSubnodeOwner(node: BytesLike, label: BytesLike, owner_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setSubnodeRecord(node: BytesLike, label: BytesLike, owner_: string, resolver_: string, ttl_: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setTTL(node: BytesLike, ttl_: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + ttl(node: BytesLike, overrides?: CallOverrides): Promise; + callStatic: { + c_18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise; + c_false18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise; + c_true18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise; + isApprovedForAll(owner_: string, operator: string, overrides?: CallOverrides): Promise; + owner(node: BytesLike, overrides?: CallOverrides): Promise; + recordExists(node: BytesLike, overrides?: CallOverrides): Promise; + resolver(node: BytesLike, overrides?: CallOverrides): Promise; + setApprovalForAll(operator: string, approved: boolean, overrides?: CallOverrides): Promise; + setOwner(node: BytesLike, owner_: string, overrides?: CallOverrides): Promise; + setRecord(node: BytesLike, owner_: string, resolver_: string, ttl_: BigNumberish, overrides?: CallOverrides): Promise; + setResolver(node: BytesLike, resolver_: string, overrides?: CallOverrides): Promise; + setSubnodeOwner(node: BytesLike, label: BytesLike, owner_: string, overrides?: CallOverrides): Promise; + setSubnodeRecord(node: BytesLike, label: BytesLike, owner_: string, resolver_: string, ttl_: BigNumberish, overrides?: CallOverrides): Promise; + setTTL(node: BytesLike, ttl_: BigNumberish, overrides?: CallOverrides): Promise; + ttl(node: BytesLike, overrides?: CallOverrides): Promise; + }; + filters: { + "ApprovalForAll(address,address,bool)"(owner?: string | null, operator?: string | null, approved?: null): ApprovalForAllEventFilter; + ApprovalForAll(owner?: string | null, operator?: string | null, approved?: null): ApprovalForAllEventFilter; + "NewOwner(bytes32,bytes32,address)"(node?: BytesLike | null, label?: BytesLike | null, owner?: null): NewOwnerEventFilter; + NewOwner(node?: BytesLike | null, label?: BytesLike | null, owner?: null): NewOwnerEventFilter; + "NewResolver(bytes32,address)"(node?: BytesLike | null, resolver?: null): NewResolverEventFilter; + NewResolver(node?: BytesLike | null, resolver?: null): NewResolverEventFilter; + "NewTTL(bytes32,uint64)"(node?: BytesLike | null, ttl?: null): NewTTLEventFilter; + NewTTL(node?: BytesLike | null, ttl?: null): NewTTLEventFilter; + "Transfer(bytes32,address)"(node?: BytesLike | null, owner?: null): TransferEventFilter; + Transfer(node?: BytesLike | null, owner?: null): TransferEventFilter; + }; + estimateGas: { + c_18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise; + c_false18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise; + c_true18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise; + isApprovedForAll(owner_: string, operator: string, overrides?: CallOverrides): Promise; + owner(node: BytesLike, overrides?: CallOverrides): Promise; + recordExists(node: BytesLike, overrides?: CallOverrides): Promise; + resolver(node: BytesLike, overrides?: CallOverrides): Promise; + setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setOwner(node: BytesLike, owner_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setRecord(node: BytesLike, owner_: string, resolver_: string, ttl_: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setResolver(node: BytesLike, resolver_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setSubnodeOwner(node: BytesLike, label: BytesLike, owner_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setSubnodeRecord(node: BytesLike, label: BytesLike, owner_: string, resolver_: string, ttl_: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setTTL(node: BytesLike, ttl_: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + ttl(node: BytesLike, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + c_18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise; + c_false18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise; + c_true18e7c73b(c__18e7c73b: BytesLike, overrides?: CallOverrides): Promise; + isApprovedForAll(owner_: string, operator: string, overrides?: CallOverrides): Promise; + owner(node: BytesLike, overrides?: CallOverrides): Promise; + recordExists(node: BytesLike, overrides?: CallOverrides): Promise; + resolver(node: BytesLike, overrides?: CallOverrides): Promise; + setApprovalForAll(operator: string, approved: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setOwner(node: BytesLike, owner_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setRecord(node: BytesLike, owner_: string, resolver_: string, ttl_: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setResolver(node: BytesLike, resolver_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setSubnodeOwner(node: BytesLike, label: BytesLike, owner_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setSubnodeRecord(node: BytesLike, label: BytesLike, owner_: string, resolver_: string, ttl_: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + setTTL(node: BytesLike, ttl_: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + ttl(node: BytesLike, overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/ENSRegistry.js b/dist/typings/ENSRegistry.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/ENSRegistry.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/ENSReverseRegistrar.d.ts b/dist/typings/ENSReverseRegistrar.d.ts new file mode 100644 index 00000000..5d9604f4 --- /dev/null +++ b/dist/typings/ENSReverseRegistrar.d.ts @@ -0,0 +1,195 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface ENSReverseRegistrarInterface extends utils.Interface { + functions: { + "ADDR_REVERSE_NODE()": FunctionFragment; + "c_29e7a9c7(bytes8)": FunctionFragment; + "c_c0828b70(bytes8)": FunctionFragment; + "c_false29e7a9c7(bytes8)": FunctionFragment; + "c_falsec0828b70(bytes8)": FunctionFragment; + "c_true29e7a9c7(bytes8)": FunctionFragment; + "c_truec0828b70(bytes8)": FunctionFragment; + "claim(address)": FunctionFragment; + "claimWithResolver(address,address)": FunctionFragment; + "initialize(address,address)": FunctionFragment; + "isInitialized()": FunctionFragment; + "node(address)": FunctionFragment; + "registry()": FunctionFragment; + "resolver()": FunctionFragment; + "setName(string)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "ADDR_REVERSE_NODE", values?: undefined): string; + encodeFunctionData(functionFragment: "c_29e7a9c7", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_c0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false29e7a9c7", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true29e7a9c7", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "claim", values: [string]): string; + encodeFunctionData(functionFragment: "claimWithResolver", values: [string, string]): string; + encodeFunctionData(functionFragment: "initialize", values: [string, string]): string; + encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; + encodeFunctionData(functionFragment: "node", values: [string]): string; + encodeFunctionData(functionFragment: "registry", values?: undefined): string; + encodeFunctionData(functionFragment: "resolver", values?: undefined): string; + encodeFunctionData(functionFragment: "setName", values: [string]): string; + decodeFunctionResult(functionFragment: "ADDR_REVERSE_NODE", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_29e7a9c7", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_c0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false29e7a9c7", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true29e7a9c7", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "claimWithResolver", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "node", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "registry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "resolver", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setName", data: BytesLike): Result; + events: { + "Initialized(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; +} +export declare type InitializedEvent = TypedEvent<[string], { + initializer: string; +}>; +export declare type InitializedEventFilter = TypedEventFilter; +export interface ENSReverseRegistrar extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ENSReverseRegistrarInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + ADDR_REVERSE_NODE(overrides?: CallOverrides): Promise<[string]>; + c_29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + claim(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claimWithResolver(owner: string, resolver_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + initialize(registry_: string, resolver_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise<[boolean]>; + node(addr_: string, overrides?: CallOverrides): Promise<[string]>; + registry(overrides?: CallOverrides): Promise<[string]>; + resolver(overrides?: CallOverrides): Promise<[string]>; + setName(name: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + ADDR_REVERSE_NODE(overrides?: CallOverrides): Promise; + c_29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_false29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_true29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + claim(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claimWithResolver(owner: string, resolver_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + initialize(registry_: string, resolver_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + node(addr_: string, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + resolver(overrides?: CallOverrides): Promise; + setName(name: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + ADDR_REVERSE_NODE(overrides?: CallOverrides): Promise; + c_29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_false29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_true29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + claim(owner: string, overrides?: CallOverrides): Promise; + claimWithResolver(owner: string, resolver_: string, overrides?: CallOverrides): Promise; + initialize(registry_: string, resolver_: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + node(addr_: string, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + resolver(overrides?: CallOverrides): Promise; + setName(name: string, overrides?: CallOverrides): Promise; + }; + filters: { + "Initialized(address)"(initializer?: null): InitializedEventFilter; + Initialized(initializer?: null): InitializedEventFilter; + }; + estimateGas: { + ADDR_REVERSE_NODE(overrides?: CallOverrides): Promise; + c_29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_false29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_true29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + claim(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claimWithResolver(owner: string, resolver_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + initialize(registry_: string, resolver_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + node(addr_: string, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + resolver(overrides?: CallOverrides): Promise; + setName(name: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + ADDR_REVERSE_NODE(overrides?: CallOverrides): Promise; + c_29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_false29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_true29e7a9c7(c__29e7a9c7: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + claim(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + claimWithResolver(owner: string, resolver_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + initialize(registry_: string, resolver_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + node(addr_: string, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + resolver(overrides?: CallOverrides): Promise; + setName(name: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/ENSReverseRegistrar.js b/dist/typings/ENSReverseRegistrar.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/ENSReverseRegistrar.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/ENSTextResolver.d.ts b/dist/typings/ENSTextResolver.d.ts new file mode 100644 index 00000000..a17c733b --- /dev/null +++ b/dist/typings/ENSTextResolver.d.ts @@ -0,0 +1,121 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface ENSTextResolverInterface extends utils.Interface { + functions: { + "c_3880312f(bytes8)": FunctionFragment; + "c_ac93193e(bytes8)": FunctionFragment; + "c_false3880312f(bytes8)": FunctionFragment; + "c_falseac93193e(bytes8)": FunctionFragment; + "c_true3880312f(bytes8)": FunctionFragment; + "c_trueac93193e(bytes8)": FunctionFragment; + "setText(bytes32,string,string)": FunctionFragment; + "text(bytes32,string)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_3880312f", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_ac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false3880312f", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falseac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true3880312f", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_trueac93193e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "setText", values: [BytesLike, string, string]): string; + encodeFunctionData(functionFragment: "text", values: [BytesLike, string]): string; + decodeFunctionResult(functionFragment: "c_3880312f", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_ac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false3880312f", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falseac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true3880312f", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_trueac93193e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setText", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "text", data: BytesLike): Result; + events: { + "TextChanged(bytes32,string,string)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "TextChanged"): EventFragment; +} +export declare type TextChangedEvent = TypedEvent<[ + string, + string, + string +], { + node: string; + indexedKey: string; + key: string; +}>; +export declare type TextChangedEventFilter = TypedEventFilter; +export interface ENSTextResolver extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ENSTextResolverInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + setText(node: BytesLike, key: string, value: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + text(node: BytesLike, key: string, overrides?: CallOverrides): Promise<[string]>; + }; + c_3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_false3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_true3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + setText(node: BytesLike, key: string, value: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + text(node: BytesLike, key: string, overrides?: CallOverrides): Promise; + callStatic: { + c_3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_false3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_true3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + setText(node: BytesLike, key: string, value: string, overrides?: CallOverrides): Promise; + text(node: BytesLike, key: string, overrides?: CallOverrides): Promise; + }; + filters: { + "TextChanged(bytes32,string,string)"(node?: BytesLike | null, indexedKey?: string | null, key?: null): TextChangedEventFilter; + TextChanged(node?: BytesLike | null, indexedKey?: string | null, key?: null): TextChangedEventFilter; + }; + estimateGas: { + c_3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_false3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_true3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + setText(node: BytesLike, key: string, value: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + text(node: BytesLike, key: string, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + c_3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_ac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_false3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_falseac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + c_true3880312f(c__3880312f: BytesLike, overrides?: CallOverrides): Promise; + c_trueac93193e(c__ac93193e: BytesLike, overrides?: CallOverrides): Promise; + setText(node: BytesLike, key: string, value: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + text(node: BytesLike, key: string, overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/ENSTextResolver.js b/dist/typings/ENSTextResolver.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/ENSTextResolver.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/ERC20Token.d.ts b/dist/typings/ERC20Token.d.ts new file mode 100644 index 00000000..ca843aae --- /dev/null +++ b/dist/typings/ERC20Token.d.ts @@ -0,0 +1,183 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface ERC20TokenInterface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "c_5838cc23(bytes8)": FunctionFragment; + "c_false5838cc23(bytes8)": FunctionFragment; + "c_true5838cc23(bytes8)": FunctionFragment; + "decimals()": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "allowance", values: [string, string]): string; + encodeFunctionData(functionFragment: "approve", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "c_5838cc23", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false5838cc23", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true5838cc23", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [string, string, BigNumberish]): string; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_5838cc23", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false5838cc23", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true5838cc23", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +export declare type ApprovalEvent = TypedEvent<[ + string, + string, + BigNumber +], { + owner: string; + spender: string; + value: BigNumber; +}>; +export declare type ApprovalEventFilter = TypedEventFilter; +export declare type TransferEvent = TypedEvent<[ + string, + string, + BigNumber +], { + from: string; + to: string; + value: BigNumber; +}>; +export declare type TransferEventFilter = TypedEventFilter; +export interface ERC20Token extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ERC20TokenInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<[BigNumber]>; + approve(spender: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + c_5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + decimals(overrides?: CallOverrides): Promise<[number]>; + name(overrides?: CallOverrides): Promise<[string]>; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + transfer(to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(owner: string, overrides?: CallOverrides): Promise; + c_5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_false5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_true5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, value: BigNumberish, overrides?: CallOverrides): Promise; + balanceOf(owner: string, overrides?: CallOverrides): Promise; + c_5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_false5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_true5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, value: BigNumberish, overrides?: CallOverrides): Promise; + transferFrom(from: string, to: string, value: BigNumberish, overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter; + Approval(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter; + "Transfer(address,address,uint256)"(from?: string | null, to?: string | null, value?: null): TransferEventFilter; + Transfer(from?: string | null, to?: string | null, value?: null): TransferEventFilter; + }; + estimateGas: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(owner: string, overrides?: CallOverrides): Promise; + c_5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_false5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_true5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(owner: string, overrides?: CallOverrides): Promise; + c_5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_false5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_true5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/ERC20Token.js b/dist/typings/ERC20Token.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/ERC20Token.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/ExternalAccountRegistry.d.ts b/dist/typings/ExternalAccountRegistry.d.ts new file mode 100644 index 00000000..49652f4e --- /dev/null +++ b/dist/typings/ExternalAccountRegistry.d.ts @@ -0,0 +1,203 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface ExternalAccountRegistryInterface extends utils.Interface { + functions: { + "addAccountOwner(address)": FunctionFragment; + "addAccountProof(bytes32)": FunctionFragment; + "c_67f73f84(bytes8)": FunctionFragment; + "c_false67f73f84(bytes8)": FunctionFragment; + "c_true67f73f84(bytes8)": FunctionFragment; + "removeAccountOwner(address)": FunctionFragment; + "removeAccountProof(bytes32)": FunctionFragment; + "verifyAccountOwner(address,address)": FunctionFragment; + "verifyAccountOwnerAtBlock(address,address,uint256)": FunctionFragment; + "verifyAccountProof(address,bytes32)": FunctionFragment; + "verifyAccountProofAtBlock(address,bytes32,uint256)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "addAccountOwner", values: [string]): string; + encodeFunctionData(functionFragment: "addAccountProof", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_67f73f84", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false67f73f84", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true67f73f84", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "removeAccountOwner", values: [string]): string; + encodeFunctionData(functionFragment: "removeAccountProof", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "verifyAccountOwner", values: [string, string]): string; + encodeFunctionData(functionFragment: "verifyAccountOwnerAtBlock", values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: "verifyAccountProof", values: [string, BytesLike]): string; + encodeFunctionData(functionFragment: "verifyAccountProofAtBlock", values: [string, BytesLike, BigNumberish]): string; + decodeFunctionResult(functionFragment: "addAccountOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addAccountProof", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_67f73f84", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false67f73f84", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true67f73f84", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "removeAccountOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "removeAccountProof", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "verifyAccountOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "verifyAccountOwnerAtBlock", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "verifyAccountProof", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "verifyAccountProofAtBlock", data: BytesLike): Result; + events: { + "AccountOwnerAdded(address,address)": EventFragment; + "AccountOwnerRemoved(address,address)": EventFragment; + "AccountProofAdded(address,bytes32)": EventFragment; + "AccountProofRemoved(address,bytes32)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "AccountOwnerAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountOwnerRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountProofAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountProofRemoved"): EventFragment; +} +export declare type AccountOwnerAddedEvent = TypedEvent<[ + string, + string +], { + account: string; + owner: string; +}>; +export declare type AccountOwnerAddedEventFilter = TypedEventFilter; +export declare type AccountOwnerRemovedEvent = TypedEvent<[ + string, + string +], { + account: string; + owner: string; +}>; +export declare type AccountOwnerRemovedEventFilter = TypedEventFilter; +export declare type AccountProofAddedEvent = TypedEvent<[ + string, + string +], { + account: string; + hash: string; +}>; +export declare type AccountProofAddedEventFilter = TypedEventFilter; +export declare type AccountProofRemovedEvent = TypedEvent<[ + string, + string +], { + account: string; + hash: string; +}>; +export declare type AccountProofRemovedEventFilter = TypedEventFilter; +export interface ExternalAccountRegistry extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ExternalAccountRegistryInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + addAccountOwner(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + addAccountProof(hash: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + removeAccountOwner(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeAccountProof(hash: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyAccountOwner(account: string, owner: string, overrides?: CallOverrides): Promise<[boolean]>; + verifyAccountOwnerAtBlock(account: string, owner: string, blockNumber: BigNumberish, overrides?: CallOverrides): Promise<[boolean]>; + verifyAccountProof(account: string, hash: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + verifyAccountProofAtBlock(account: string, hash: BytesLike, blockNumber: BigNumberish, overrides?: CallOverrides): Promise<[boolean]>; + }; + addAccountOwner(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + addAccountProof(hash: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise; + c_false67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise; + c_true67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise; + removeAccountOwner(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeAccountProof(hash: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyAccountOwner(account: string, owner: string, overrides?: CallOverrides): Promise; + verifyAccountOwnerAtBlock(account: string, owner: string, blockNumber: BigNumberish, overrides?: CallOverrides): Promise; + verifyAccountProof(account: string, hash: BytesLike, overrides?: CallOverrides): Promise; + verifyAccountProofAtBlock(account: string, hash: BytesLike, blockNumber: BigNumberish, overrides?: CallOverrides): Promise; + callStatic: { + addAccountOwner(owner: string, overrides?: CallOverrides): Promise; + addAccountProof(hash: BytesLike, overrides?: CallOverrides): Promise; + c_67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise; + c_false67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise; + c_true67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise; + removeAccountOwner(owner: string, overrides?: CallOverrides): Promise; + removeAccountProof(hash: BytesLike, overrides?: CallOverrides): Promise; + verifyAccountOwner(account: string, owner: string, overrides?: CallOverrides): Promise; + verifyAccountOwnerAtBlock(account: string, owner: string, blockNumber: BigNumberish, overrides?: CallOverrides): Promise; + verifyAccountProof(account: string, hash: BytesLike, overrides?: CallOverrides): Promise; + verifyAccountProofAtBlock(account: string, hash: BytesLike, blockNumber: BigNumberish, overrides?: CallOverrides): Promise; + }; + filters: { + "AccountOwnerAdded(address,address)"(account?: null, owner?: null): AccountOwnerAddedEventFilter; + AccountOwnerAdded(account?: null, owner?: null): AccountOwnerAddedEventFilter; + "AccountOwnerRemoved(address,address)"(account?: null, owner?: null): AccountOwnerRemovedEventFilter; + AccountOwnerRemoved(account?: null, owner?: null): AccountOwnerRemovedEventFilter; + "AccountProofAdded(address,bytes32)"(account?: null, hash?: null): AccountProofAddedEventFilter; + AccountProofAdded(account?: null, hash?: null): AccountProofAddedEventFilter; + "AccountProofRemoved(address,bytes32)"(account?: null, hash?: null): AccountProofRemovedEventFilter; + AccountProofRemoved(account?: null, hash?: null): AccountProofRemovedEventFilter; + }; + estimateGas: { + addAccountOwner(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + addAccountProof(hash: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise; + c_false67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise; + c_true67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise; + removeAccountOwner(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeAccountProof(hash: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyAccountOwner(account: string, owner: string, overrides?: CallOverrides): Promise; + verifyAccountOwnerAtBlock(account: string, owner: string, blockNumber: BigNumberish, overrides?: CallOverrides): Promise; + verifyAccountProof(account: string, hash: BytesLike, overrides?: CallOverrides): Promise; + verifyAccountProofAtBlock(account: string, hash: BytesLike, blockNumber: BigNumberish, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + addAccountOwner(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + addAccountProof(hash: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise; + c_false67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise; + c_true67f73f84(c__67f73f84: BytesLike, overrides?: CallOverrides): Promise; + removeAccountOwner(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeAccountProof(hash: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyAccountOwner(account: string, owner: string, overrides?: CallOverrides): Promise; + verifyAccountOwnerAtBlock(account: string, owner: string, blockNumber: BigNumberish, overrides?: CallOverrides): Promise; + verifyAccountProof(account: string, hash: BytesLike, overrides?: CallOverrides): Promise; + verifyAccountProofAtBlock(account: string, hash: BytesLike, blockNumber: BigNumberish, overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/ExternalAccountRegistry.js b/dist/typings/ExternalAccountRegistry.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/ExternalAccountRegistry.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/Gateway.d.ts b/dist/typings/Gateway.d.ts new file mode 100644 index 00000000..0af371a0 --- /dev/null +++ b/dist/typings/Gateway.d.ts @@ -0,0 +1,318 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export declare type DelegatedBatchStruct = { + account: string; + nonce: BigNumberish; + to: string[]; + data: BytesLike[]; +}; +export declare type DelegatedBatchStructOutput = [ + string, + BigNumber, + string[], + string[] +] & { + account: string; + nonce: BigNumber; + to: string[]; + data: string[]; +}; +export declare type DelegatedBatchWithGasPriceStruct = { + account: string; + nonce: BigNumberish; + to: string[]; + data: BytesLike[]; + gasPrice: BigNumberish; +}; +export declare type DelegatedBatchWithGasPriceStructOutput = [ + string, + BigNumber, + string[], + string[], + BigNumber +] & { + account: string; + nonce: BigNumber; + to: string[]; + data: string[]; + gasPrice: BigNumber; +}; +export interface GatewayInterface extends utils.Interface { + functions: { + "c_1b54acf3(bytes8)": FunctionFragment; + "c_c0828b70(bytes8)": FunctionFragment; + "c_db9228d3(bytes8)": FunctionFragment; + "c_false1b54acf3(bytes8)": FunctionFragment; + "c_falsec0828b70(bytes8)": FunctionFragment; + "c_falsedb9228d3(bytes8)": FunctionFragment; + "c_true1b54acf3(bytes8)": FunctionFragment; + "c_truec0828b70(bytes8)": FunctionFragment; + "c_truedb9228d3(bytes8)": FunctionFragment; + "chainId()": FunctionFragment; + "delegateBatch(address,uint256,address[],bytes[],bytes)": FunctionFragment; + "delegateBatchWithGasPrice(address,uint256,address[],bytes[],bytes)": FunctionFragment; + "delegateBatches(bytes[],bool)": FunctionFragment; + "externalAccountRegistry()": FunctionFragment; + "getAccountNextNonce(address)": FunctionFragment; + "hashDelegatedBatch((address,uint256,address[],bytes[]))": FunctionFragment; + "hashDelegatedBatchWithGasPrice((address,uint256,address[],bytes[],uint256))": FunctionFragment; + "initialize(address,address)": FunctionFragment; + "isInitialized()": FunctionFragment; + "personalAccountRegistry()": FunctionFragment; + "sendBatch(address[],bytes[])": FunctionFragment; + "sendBatchFromAccount(address,address[],bytes[])": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_1b54acf3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_c0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_db9228d3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false1b54acf3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsedb9228d3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true1b54acf3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truedb9228d3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "chainId", values?: undefined): string; + encodeFunctionData(functionFragment: "delegateBatch", values: [string, BigNumberish, string[], BytesLike[], BytesLike]): string; + encodeFunctionData(functionFragment: "delegateBatchWithGasPrice", values: [string, BigNumberish, string[], BytesLike[], BytesLike]): string; + encodeFunctionData(functionFragment: "delegateBatches", values: [BytesLike[], boolean]): string; + encodeFunctionData(functionFragment: "externalAccountRegistry", values?: undefined): string; + encodeFunctionData(functionFragment: "getAccountNextNonce", values: [string]): string; + encodeFunctionData(functionFragment: "hashDelegatedBatch", values: [DelegatedBatchStruct]): string; + encodeFunctionData(functionFragment: "hashDelegatedBatchWithGasPrice", values: [DelegatedBatchWithGasPriceStruct]): string; + encodeFunctionData(functionFragment: "initialize", values: [string, string]): string; + encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; + encodeFunctionData(functionFragment: "personalAccountRegistry", values?: undefined): string; + encodeFunctionData(functionFragment: "sendBatch", values: [string[], BytesLike[]]): string; + encodeFunctionData(functionFragment: "sendBatchFromAccount", values: [string, string[], BytesLike[]]): string; + decodeFunctionResult(functionFragment: "c_1b54acf3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_c0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_db9228d3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false1b54acf3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsedb9228d3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true1b54acf3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truedb9228d3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "chainId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "delegateBatch", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "delegateBatchWithGasPrice", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "delegateBatches", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "externalAccountRegistry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAccountNextNonce", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hashDelegatedBatch", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hashDelegatedBatchWithGasPrice", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "personalAccountRegistry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sendBatch", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "sendBatchFromAccount", data: BytesLike): Result; + events: { + "BatchDelegated(address,bytes,bool)": EventFragment; + "Initialized(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "BatchDelegated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; +} +export declare type BatchDelegatedEvent = TypedEvent<[ + string, + string, + boolean +], { + sender: string; + batch: string; + succeeded: boolean; +}>; +export declare type BatchDelegatedEventFilter = TypedEventFilter; +export declare type InitializedEvent = TypedEvent<[string], { + initializer: string; +}>; +export declare type InitializedEventFilter = TypedEventFilter; +export interface Gateway extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: GatewayInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_db9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsedb9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truedb9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + chainId(overrides?: CallOverrides): Promise<[BigNumber]>; + delegateBatch(account: string, nonce: BigNumberish, to: string[], data: BytesLike[], senderSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + delegateBatchWithGasPrice(account: string, nonce: BigNumberish, to: string[], data: BytesLike[], senderSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + delegateBatches(batches: BytesLike[], revertOnFailure: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + externalAccountRegistry(overrides?: CallOverrides): Promise<[string]>; + getAccountNextNonce(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + hashDelegatedBatch(delegatedBatch: DelegatedBatchStruct, overrides?: CallOverrides): Promise<[string]>; + hashDelegatedBatchWithGasPrice(delegatedBatch: DelegatedBatchWithGasPriceStruct, overrides?: CallOverrides): Promise<[string]>; + initialize(externalAccountRegistry_: string, personalAccountRegistry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise<[boolean]>; + personalAccountRegistry(overrides?: CallOverrides): Promise<[string]>; + sendBatch(to: string[], data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + sendBatchFromAccount(account: string, to: string[], data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_db9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsedb9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_truedb9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + delegateBatch(account: string, nonce: BigNumberish, to: string[], data: BytesLike[], senderSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + delegateBatchWithGasPrice(account: string, nonce: BigNumberish, to: string[], data: BytesLike[], senderSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + delegateBatches(batches: BytesLike[], revertOnFailure: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + externalAccountRegistry(overrides?: CallOverrides): Promise; + getAccountNextNonce(account: string, overrides?: CallOverrides): Promise; + hashDelegatedBatch(delegatedBatch: DelegatedBatchStruct, overrides?: CallOverrides): Promise; + hashDelegatedBatchWithGasPrice(delegatedBatch: DelegatedBatchWithGasPriceStruct, overrides?: CallOverrides): Promise; + initialize(externalAccountRegistry_: string, personalAccountRegistry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + personalAccountRegistry(overrides?: CallOverrides): Promise; + sendBatch(to: string[], data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + sendBatchFromAccount(account: string, to: string[], data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_db9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsedb9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_truedb9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + delegateBatch(account: string, nonce: BigNumberish, to: string[], data: BytesLike[], senderSignature: BytesLike, overrides?: CallOverrides): Promise; + delegateBatchWithGasPrice(account: string, nonce: BigNumberish, to: string[], data: BytesLike[], senderSignature: BytesLike, overrides?: CallOverrides): Promise; + delegateBatches(batches: BytesLike[], revertOnFailure: boolean, overrides?: CallOverrides): Promise; + externalAccountRegistry(overrides?: CallOverrides): Promise; + getAccountNextNonce(account: string, overrides?: CallOverrides): Promise; + hashDelegatedBatch(delegatedBatch: DelegatedBatchStruct, overrides?: CallOverrides): Promise; + hashDelegatedBatchWithGasPrice(delegatedBatch: DelegatedBatchWithGasPriceStruct, overrides?: CallOverrides): Promise; + initialize(externalAccountRegistry_: string, personalAccountRegistry_: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + personalAccountRegistry(overrides?: CallOverrides): Promise; + sendBatch(to: string[], data: BytesLike[], overrides?: CallOverrides): Promise; + sendBatchFromAccount(account: string, to: string[], data: BytesLike[], overrides?: CallOverrides): Promise; + }; + filters: { + "BatchDelegated(address,bytes,bool)"(sender?: null, batch?: null, succeeded?: null): BatchDelegatedEventFilter; + BatchDelegated(sender?: null, batch?: null, succeeded?: null): BatchDelegatedEventFilter; + "Initialized(address)"(initializer?: null): InitializedEventFilter; + Initialized(initializer?: null): InitializedEventFilter; + }; + estimateGas: { + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_db9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsedb9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_truedb9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + delegateBatch(account: string, nonce: BigNumberish, to: string[], data: BytesLike[], senderSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + delegateBatchWithGasPrice(account: string, nonce: BigNumberish, to: string[], data: BytesLike[], senderSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + delegateBatches(batches: BytesLike[], revertOnFailure: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + externalAccountRegistry(overrides?: CallOverrides): Promise; + getAccountNextNonce(account: string, overrides?: CallOverrides): Promise; + hashDelegatedBatch(delegatedBatch: DelegatedBatchStruct, overrides?: CallOverrides): Promise; + hashDelegatedBatchWithGasPrice(delegatedBatch: DelegatedBatchWithGasPriceStruct, overrides?: CallOverrides): Promise; + initialize(externalAccountRegistry_: string, personalAccountRegistry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + personalAccountRegistry(overrides?: CallOverrides): Promise; + sendBatch(to: string[], data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + sendBatchFromAccount(account: string, to: string[], data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_db9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsedb9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_truedb9228d3(c__db9228d3: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + delegateBatch(account: string, nonce: BigNumberish, to: string[], data: BytesLike[], senderSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + delegateBatchWithGasPrice(account: string, nonce: BigNumberish, to: string[], data: BytesLike[], senderSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + delegateBatches(batches: BytesLike[], revertOnFailure: boolean, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + externalAccountRegistry(overrides?: CallOverrides): Promise; + getAccountNextNonce(account: string, overrides?: CallOverrides): Promise; + hashDelegatedBatch(delegatedBatch: DelegatedBatchStruct, overrides?: CallOverrides): Promise; + hashDelegatedBatchWithGasPrice(delegatedBatch: DelegatedBatchWithGasPriceStruct, overrides?: CallOverrides): Promise; + initialize(externalAccountRegistry_: string, personalAccountRegistry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + personalAccountRegistry(overrides?: CallOverrides): Promise; + sendBatch(to: string[], data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + sendBatchFromAccount(account: string, to: string[], data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/Gateway.js b/dist/typings/Gateway.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/Gateway.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/GatewayRecipient.d.ts b/dist/typings/GatewayRecipient.d.ts new file mode 100644 index 00000000..278e781e --- /dev/null +++ b/dist/typings/GatewayRecipient.d.ts @@ -0,0 +1,65 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface GatewayRecipientInterface extends utils.Interface { + functions: { + "c_d5c463c2(bytes8)": FunctionFragment; + "c_falsed5c463c2(bytes8)": FunctionFragment; + "c_trued5c463c2(bytes8)": FunctionFragment; + "gateway()": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_d5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsed5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_trued5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "gateway", values?: undefined): string; + decodeFunctionResult(functionFragment: "c_d5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsed5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_trued5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "gateway", data: BytesLike): Result; + events: {}; +} +export interface GatewayRecipient extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: GatewayRecipientInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + gateway(overrides?: CallOverrides): Promise<[string]>; + }; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + callStatic: { + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/GatewayRecipient.js b/dist/typings/GatewayRecipient.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/GatewayRecipient.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/GatewayRecipientMock.d.ts b/dist/typings/GatewayRecipientMock.d.ts new file mode 100644 index 00000000..75b40f3e --- /dev/null +++ b/dist/typings/GatewayRecipientMock.d.ts @@ -0,0 +1,121 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface GatewayRecipientMockInterface extends utils.Interface { + functions: { + "c_7fd4d25d(bytes8)": FunctionFragment; + "c_d5c463c2(bytes8)": FunctionFragment; + "c_false7fd4d25d(bytes8)": FunctionFragment; + "c_falsed5c463c2(bytes8)": FunctionFragment; + "c_true7fd4d25d(bytes8)": FunctionFragment; + "c_trued5c463c2(bytes8)": FunctionFragment; + "emitContext()": FunctionFragment; + "gateway()": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_7fd4d25d", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_d5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false7fd4d25d", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsed5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true7fd4d25d", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_trued5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "emitContext", values?: undefined): string; + encodeFunctionData(functionFragment: "gateway", values?: undefined): string; + decodeFunctionResult(functionFragment: "c_7fd4d25d", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_d5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false7fd4d25d", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsed5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true7fd4d25d", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_trued5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "emitContext", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "gateway", data: BytesLike): Result; + events: { + "Context(address,address,bytes)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Context"): EventFragment; +} +export declare type ContextEvent = TypedEvent<[ + string, + string, + string +], { + account: string; + sender: string; + data: string; +}>; +export declare type ContextEventFilter = TypedEventFilter; +export interface GatewayRecipientMock extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: GatewayRecipientMockInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + emitContext(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + gateway(overrides?: CallOverrides): Promise<[string]>; + }; + c_7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + emitContext(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + gateway(overrides?: CallOverrides): Promise; + callStatic: { + c_7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + emitContext(overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + }; + filters: { + "Context(address,address,bytes)"(account?: null, sender?: null, data?: null): ContextEventFilter; + Context(account?: null, sender?: null, data?: null): ContextEventFilter; + }; + estimateGas: { + c_7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + emitContext(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + gateway(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + c_7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true7fd4d25d(c__7fd4d25d: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + emitContext(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + gateway(overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/GatewayRecipientMock.js b/dist/typings/GatewayRecipientMock.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/GatewayRecipientMock.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/Guarded.d.ts b/dist/typings/Guarded.d.ts new file mode 100644 index 00000000..95073248 --- /dev/null +++ b/dist/typings/Guarded.d.ts @@ -0,0 +1,131 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface GuardedInterface extends utils.Interface { + functions: { + "addGuardian(address)": FunctionFragment; + "c_0ffe16b4(bytes8)": FunctionFragment; + "c_false0ffe16b4(bytes8)": FunctionFragment; + "c_true0ffe16b4(bytes8)": FunctionFragment; + "isGuardian(address)": FunctionFragment; + "removeGuardian(address)": FunctionFragment; + "verifyGuardianSignature(bytes32,bytes)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "addGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "c_0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "isGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "removeGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "verifyGuardianSignature", values: [BytesLike, BytesLike]): string; + decodeFunctionResult(functionFragment: "addGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "removeGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "verifyGuardianSignature", data: BytesLike): Result; + events: { + "GuardianAdded(address,address)": EventFragment; + "GuardianRemoved(address,address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "GuardianAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GuardianRemoved"): EventFragment; +} +export declare type GuardianAddedEvent = TypedEvent<[ + string, + string +], { + sender: string; + guardian: string; +}>; +export declare type GuardianAddedEventFilter = TypedEventFilter; +export declare type GuardianRemovedEvent = TypedEvent<[ + string, + string +], { + sender: string; + guardian: string; +}>; +export declare type GuardianRemovedEventFilter = TypedEventFilter; +export interface Guarded extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: GuardedInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + isGuardian(guardian: string, overrides?: CallOverrides): Promise<[boolean]>; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + }; + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + callStatic: { + addGuardian(guardian: string, overrides?: CallOverrides): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + removeGuardian(guardian: string, overrides?: CallOverrides): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + }; + filters: { + "GuardianAdded(address,address)"(sender?: null, guardian?: null): GuardianAddedEventFilter; + GuardianAdded(sender?: null, guardian?: null): GuardianAddedEventFilter; + "GuardianRemoved(address,address)"(sender?: null, guardian?: null): GuardianRemovedEventFilter; + GuardianRemoved(sender?: null, guardian?: null): GuardianRemovedEventFilter; + }; + estimateGas: { + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/Guarded.js b/dist/typings/Guarded.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/Guarded.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/GuardedMock.d.ts b/dist/typings/GuardedMock.d.ts new file mode 100644 index 00000000..f0fba0f6 --- /dev/null +++ b/dist/typings/GuardedMock.d.ts @@ -0,0 +1,155 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface GuardedMockInterface extends utils.Interface { + functions: { + "addGuardian(address)": FunctionFragment; + "c_0ffe16b4(bytes8)": FunctionFragment; + "c_9fb0db2e(bytes8)": FunctionFragment; + "c_false0ffe16b4(bytes8)": FunctionFragment; + "c_false9fb0db2e(bytes8)": FunctionFragment; + "c_true0ffe16b4(bytes8)": FunctionFragment; + "c_true9fb0db2e(bytes8)": FunctionFragment; + "isGuardian(address)": FunctionFragment; + "removeGuardian(address)": FunctionFragment; + "verifyGuardianSignature(bytes32,bytes)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "addGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "c_0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_9fb0db2e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false9fb0db2e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true9fb0db2e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "isGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "removeGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "verifyGuardianSignature", values: [BytesLike, BytesLike]): string; + decodeFunctionResult(functionFragment: "addGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_9fb0db2e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false9fb0db2e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true9fb0db2e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "removeGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "verifyGuardianSignature", data: BytesLike): Result; + events: { + "GuardianAdded(address,address)": EventFragment; + "GuardianRemoved(address,address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "GuardianAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GuardianRemoved"): EventFragment; +} +export declare type GuardianAddedEvent = TypedEvent<[ + string, + string +], { + sender: string; + guardian: string; +}>; +export declare type GuardianAddedEventFilter = TypedEventFilter; +export declare type GuardianRemovedEvent = TypedEvent<[ + string, + string +], { + sender: string; + guardian: string; +}>; +export declare type GuardianRemovedEventFilter = TypedEventFilter; +export interface GuardedMock extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: GuardedMockInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + isGuardian(guardian: string, overrides?: CallOverrides): Promise<[boolean]>; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + }; + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + callStatic: { + addGuardian(guardian: string, overrides?: CallOverrides): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + removeGuardian(guardian: string, overrides?: CallOverrides): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + }; + filters: { + "GuardianAdded(address,address)"(sender?: null, guardian?: null): GuardianAddedEventFilter; + GuardianAdded(sender?: null, guardian?: null): GuardianAddedEventFilter; + "GuardianRemoved(address,address)"(sender?: null, guardian?: null): GuardianRemovedEventFilter; + GuardianRemoved(sender?: null, guardian?: null): GuardianRemovedEventFilter; + }; + estimateGas: { + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true9fb0db2e(c__9fb0db2e: BytesLike, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/GuardedMock.js b/dist/typings/GuardedMock.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/GuardedMock.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/IERC20.d.ts b/dist/typings/IERC20.d.ts new file mode 100644 index 00000000..6d48918e --- /dev/null +++ b/dist/typings/IERC20.d.ts @@ -0,0 +1,135 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface IERC20Interface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "allowance", values: [string, string]): string; + encodeFunctionData(functionFragment: "approve", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [string, string, BigNumberish]): string; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +export declare type ApprovalEvent = TypedEvent<[ + string, + string, + BigNumber +], { + owner: string; + spender: string; + value: BigNumber; +}>; +export declare type ApprovalEventFilter = TypedEventFilter; +export declare type TransferEvent = TypedEvent<[ + string, + string, + BigNumber +], { + from: string; + to: string; + value: BigNumber; +}>; +export declare type TransferEventFilter = TypedEventFilter; +export interface IERC20 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: IERC20Interface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<[BigNumber]>; + approve(spender: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + transfer(to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, amount: BigNumberish, overrides?: CallOverrides): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, amount: BigNumberish, overrides?: CallOverrides): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter; + Approval(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter; + "Transfer(address,address,uint256)"(from?: string | null, to?: string | null, value?: null): TransferEventFilter; + Transfer(from?: string | null, to?: string | null, value?: null): TransferEventFilter; + }; + estimateGas: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(account: string, overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, amount: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/IERC20.js b/dist/typings/IERC20.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/IERC20.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/ISuperAgreement.d.ts b/dist/typings/ISuperAgreement.d.ts new file mode 100644 index 00000000..9a5c7653 --- /dev/null +++ b/dist/typings/ISuperAgreement.d.ts @@ -0,0 +1,73 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface ISuperAgreementInterface extends utils.Interface { + functions: { + "agreementType()": FunctionFragment; + "realtimeBalanceOf(address,address,uint256)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "agreementType", values?: undefined): string; + encodeFunctionData(functionFragment: "realtimeBalanceOf", values: [string, string, BigNumberish]): string; + decodeFunctionResult(functionFragment: "agreementType", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "realtimeBalanceOf", data: BytesLike): Result; + events: {}; +} +export interface ISuperAgreement extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ISuperAgreementInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + agreementType(overrides?: CallOverrides): Promise<[string]>; + realtimeBalanceOf(token: string, account: string, time: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber + ] & { + dynamicBalance: BigNumber; + deposit: BigNumber; + owedDeposit: BigNumber; + }>; + }; + agreementType(overrides?: CallOverrides): Promise; + realtimeBalanceOf(token: string, account: string, time: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber + ] & { + dynamicBalance: BigNumber; + deposit: BigNumber; + owedDeposit: BigNumber; + }>; + callStatic: { + agreementType(overrides?: CallOverrides): Promise; + realtimeBalanceOf(token: string, account: string, time: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber + ] & { + dynamicBalance: BigNumber; + deposit: BigNumber; + owedDeposit: BigNumber; + }>; + }; + filters: {}; + estimateGas: { + agreementType(overrides?: CallOverrides): Promise; + realtimeBalanceOf(token: string, account: string, time: BigNumberish, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + agreementType(overrides?: CallOverrides): Promise; + realtimeBalanceOf(token: string, account: string, time: BigNumberish, overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/ISuperAgreement.js b/dist/typings/ISuperAgreement.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/ISuperAgreement.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/ISuperfluidToken.d.ts b/dist/typings/ISuperfluidToken.d.ts new file mode 100644 index 00000000..48a84bbd --- /dev/null +++ b/dist/typings/ISuperfluidToken.d.ts @@ -0,0 +1,419 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface ISuperfluidTokenInterface extends utils.Interface { + functions: { + "createAgreement(bytes32,bytes32[])": FunctionFragment; + "getAccountActiveAgreements(address)": FunctionFragment; + "getAgreementData(address,bytes32,uint256)": FunctionFragment; + "getAgreementStateSlot(address,address,uint256,uint256)": FunctionFragment; + "getHost()": FunctionFragment; + "isAccountCritical(address,uint256)": FunctionFragment; + "isAccountCriticalNow(address)": FunctionFragment; + "isAccountSolvent(address,uint256)": FunctionFragment; + "isAccountSolventNow(address)": FunctionFragment; + "makeLiquidationPayoutsV2(bytes32,bytes,address,bool,address,uint256,int256)": FunctionFragment; + "realtimeBalanceOf(address,uint256)": FunctionFragment; + "realtimeBalanceOfNow(address)": FunctionFragment; + "settleBalance(address,int256)": FunctionFragment; + "terminateAgreement(bytes32,uint256)": FunctionFragment; + "updateAgreementData(bytes32,bytes32[])": FunctionFragment; + "updateAgreementStateSlot(address,uint256,bytes32[])": FunctionFragment; + }; + encodeFunctionData(functionFragment: "createAgreement", values: [BytesLike, BytesLike[]]): string; + encodeFunctionData(functionFragment: "getAccountActiveAgreements", values: [string]): string; + encodeFunctionData(functionFragment: "getAgreementData", values: [string, BytesLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "getAgreementStateSlot", values: [string, string, BigNumberish, BigNumberish]): string; + encodeFunctionData(functionFragment: "getHost", values?: undefined): string; + encodeFunctionData(functionFragment: "isAccountCritical", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "isAccountCriticalNow", values: [string]): string; + encodeFunctionData(functionFragment: "isAccountSolvent", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "isAccountSolventNow", values: [string]): string; + encodeFunctionData(functionFragment: "makeLiquidationPayoutsV2", values: [ + BytesLike, + BytesLike, + string, + boolean, + string, + BigNumberish, + BigNumberish + ]): string; + encodeFunctionData(functionFragment: "realtimeBalanceOf", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "realtimeBalanceOfNow", values: [string]): string; + encodeFunctionData(functionFragment: "settleBalance", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "terminateAgreement", values: [BytesLike, BigNumberish]): string; + encodeFunctionData(functionFragment: "updateAgreementData", values: [BytesLike, BytesLike[]]): string; + encodeFunctionData(functionFragment: "updateAgreementStateSlot", values: [string, BigNumberish, BytesLike[]]): string; + decodeFunctionResult(functionFragment: "createAgreement", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAccountActiveAgreements", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAgreementData", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getAgreementStateSlot", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getHost", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isAccountCritical", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isAccountCriticalNow", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isAccountSolvent", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isAccountSolventNow", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "makeLiquidationPayoutsV2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "realtimeBalanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "realtimeBalanceOfNow", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "settleBalance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "terminateAgreement", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "updateAgreementData", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "updateAgreementStateSlot", data: BytesLike): Result; + events: { + "AgreementCreated(address,bytes32,bytes32[])": EventFragment; + "AgreementLiquidated(address,bytes32,address,address,uint256)": EventFragment; + "AgreementLiquidatedBy(address,address,bytes32,address,address,uint256,uint256)": EventFragment; + "AgreementLiquidatedV2(address,bytes32,address,address,address,uint256,int256,bytes)": EventFragment; + "AgreementStateUpdated(address,address,uint256)": EventFragment; + "AgreementTerminated(address,bytes32)": EventFragment; + "AgreementUpdated(address,bytes32,bytes32[])": EventFragment; + "Bailout(address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "AgreementCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AgreementLiquidated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AgreementLiquidatedBy"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AgreementLiquidatedV2"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AgreementStateUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AgreementTerminated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AgreementUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Bailout"): EventFragment; +} +export declare type AgreementCreatedEvent = TypedEvent<[ + string, + string, + string[] +], { + agreementClass: string; + id: string; + data: string[]; +}>; +export declare type AgreementCreatedEventFilter = TypedEventFilter; +export declare type AgreementLiquidatedEvent = TypedEvent<[ + string, + string, + string, + string, + BigNumber +], { + agreementClass: string; + id: string; + penaltyAccount: string; + rewardAccount: string; + rewardAmount: BigNumber; +}>; +export declare type AgreementLiquidatedEventFilter = TypedEventFilter; +export declare type AgreementLiquidatedByEvent = TypedEvent<[ + string, + string, + string, + string, + string, + BigNumber, + BigNumber +], { + liquidatorAccount: string; + agreementClass: string; + id: string; + penaltyAccount: string; + bondAccount: string; + rewardAmount: BigNumber; + bailoutAmount: BigNumber; +}>; +export declare type AgreementLiquidatedByEventFilter = TypedEventFilter; +export declare type AgreementLiquidatedV2Event = TypedEvent<[ + string, + string, + string, + string, + string, + BigNumber, + BigNumber, + string +], { + agreementClass: string; + id: string; + liquidatorAccount: string; + targetAccount: string; + rewardAccount: string; + rewardAmount: BigNumber; + targetAccountBalanceDelta: BigNumber; + liquidationTypeData: string; +}>; +export declare type AgreementLiquidatedV2EventFilter = TypedEventFilter; +export declare type AgreementStateUpdatedEvent = TypedEvent<[ + string, + string, + BigNumber +], { + agreementClass: string; + account: string; + slotId: BigNumber; +}>; +export declare type AgreementStateUpdatedEventFilter = TypedEventFilter; +export declare type AgreementTerminatedEvent = TypedEvent<[ + string, + string +], { + agreementClass: string; + id: string; +}>; +export declare type AgreementTerminatedEventFilter = TypedEventFilter; +export declare type AgreementUpdatedEvent = TypedEvent<[ + string, + string, + string[] +], { + agreementClass: string; + id: string; + data: string[]; +}>; +export declare type AgreementUpdatedEventFilter = TypedEventFilter; +export declare type BailoutEvent = TypedEvent<[ + string, + BigNumber +], { + bailoutAccount: string; + bailoutAmount: BigNumber; +}>; +export declare type BailoutEventFilter = TypedEventFilter; +export interface ISuperfluidToken extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: ISuperfluidTokenInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + createAgreement(id: BytesLike, data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getAccountActiveAgreements(account: string, overrides?: CallOverrides): Promise<[string[]] & { + activeAgreements: string[]; + }>; + getAgreementData(agreementClass: string, id: BytesLike, dataLength: BigNumberish, overrides?: CallOverrides): Promise<[string[]] & { + data: string[]; + }>; + getAgreementStateSlot(agreementClass: string, account: string, slotId: BigNumberish, dataLength: BigNumberish, overrides?: CallOverrides): Promise<[string[]] & { + slotData: string[]; + }>; + getHost(overrides?: CallOverrides): Promise<[string] & { + host: string; + }>; + isAccountCritical(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise<[boolean] & { + isCritical: boolean; + }>; + isAccountCriticalNow(account: string, overrides?: CallOverrides): Promise<[boolean] & { + isCritical: boolean; + }>; + isAccountSolvent(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise<[boolean] & { + isSolvent: boolean; + }>; + isAccountSolventNow(account: string, overrides?: CallOverrides): Promise<[boolean] & { + isSolvent: boolean; + }>; + makeLiquidationPayoutsV2(id: BytesLike, liquidationTypeData: BytesLike, liquidatorAccount: string, useDefaultRewardAccount: boolean, targetAccount: string, rewardAmount: BigNumberish, targetAccountBalanceDelta: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + realtimeBalanceOf(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber + ] & { + availableBalance: BigNumber; + deposit: BigNumber; + owedDeposit: BigNumber; + }>; + realtimeBalanceOfNow(account: string, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber, + BigNumber + ] & { + availableBalance: BigNumber; + deposit: BigNumber; + owedDeposit: BigNumber; + timestamp: BigNumber; + }>; + settleBalance(account: string, delta: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + terminateAgreement(id: BytesLike, dataLength: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + updateAgreementData(id: BytesLike, data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + updateAgreementStateSlot(account: string, slotId: BigNumberish, slotData: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + createAgreement(id: BytesLike, data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getAccountActiveAgreements(account: string, overrides?: CallOverrides): Promise; + getAgreementData(agreementClass: string, id: BytesLike, dataLength: BigNumberish, overrides?: CallOverrides): Promise; + getAgreementStateSlot(agreementClass: string, account: string, slotId: BigNumberish, dataLength: BigNumberish, overrides?: CallOverrides): Promise; + getHost(overrides?: CallOverrides): Promise; + isAccountCritical(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise; + isAccountCriticalNow(account: string, overrides?: CallOverrides): Promise; + isAccountSolvent(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise; + isAccountSolventNow(account: string, overrides?: CallOverrides): Promise; + makeLiquidationPayoutsV2(id: BytesLike, liquidationTypeData: BytesLike, liquidatorAccount: string, useDefaultRewardAccount: boolean, targetAccount: string, rewardAmount: BigNumberish, targetAccountBalanceDelta: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + realtimeBalanceOf(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber + ] & { + availableBalance: BigNumber; + deposit: BigNumber; + owedDeposit: BigNumber; + }>; + realtimeBalanceOfNow(account: string, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber, + BigNumber + ] & { + availableBalance: BigNumber; + deposit: BigNumber; + owedDeposit: BigNumber; + timestamp: BigNumber; + }>; + settleBalance(account: string, delta: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + terminateAgreement(id: BytesLike, dataLength: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + updateAgreementData(id: BytesLike, data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + updateAgreementStateSlot(account: string, slotId: BigNumberish, slotData: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + createAgreement(id: BytesLike, data: BytesLike[], overrides?: CallOverrides): Promise; + getAccountActiveAgreements(account: string, overrides?: CallOverrides): Promise; + getAgreementData(agreementClass: string, id: BytesLike, dataLength: BigNumberish, overrides?: CallOverrides): Promise; + getAgreementStateSlot(agreementClass: string, account: string, slotId: BigNumberish, dataLength: BigNumberish, overrides?: CallOverrides): Promise; + getHost(overrides?: CallOverrides): Promise; + isAccountCritical(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise; + isAccountCriticalNow(account: string, overrides?: CallOverrides): Promise; + isAccountSolvent(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise; + isAccountSolventNow(account: string, overrides?: CallOverrides): Promise; + makeLiquidationPayoutsV2(id: BytesLike, liquidationTypeData: BytesLike, liquidatorAccount: string, useDefaultRewardAccount: boolean, targetAccount: string, rewardAmount: BigNumberish, targetAccountBalanceDelta: BigNumberish, overrides?: CallOverrides): Promise; + realtimeBalanceOf(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber + ] & { + availableBalance: BigNumber; + deposit: BigNumber; + owedDeposit: BigNumber; + }>; + realtimeBalanceOfNow(account: string, overrides?: CallOverrides): Promise<[ + BigNumber, + BigNumber, + BigNumber, + BigNumber + ] & { + availableBalance: BigNumber; + deposit: BigNumber; + owedDeposit: BigNumber; + timestamp: BigNumber; + }>; + settleBalance(account: string, delta: BigNumberish, overrides?: CallOverrides): Promise; + terminateAgreement(id: BytesLike, dataLength: BigNumberish, overrides?: CallOverrides): Promise; + updateAgreementData(id: BytesLike, data: BytesLike[], overrides?: CallOverrides): Promise; + updateAgreementStateSlot(account: string, slotId: BigNumberish, slotData: BytesLike[], overrides?: CallOverrides): Promise; + }; + filters: { + "AgreementCreated(address,bytes32,bytes32[])"(agreementClass?: string | null, id?: null, data?: null): AgreementCreatedEventFilter; + AgreementCreated(agreementClass?: string | null, id?: null, data?: null): AgreementCreatedEventFilter; + "AgreementLiquidated(address,bytes32,address,address,uint256)"(agreementClass?: string | null, id?: null, penaltyAccount?: string | null, rewardAccount?: string | null, rewardAmount?: null): AgreementLiquidatedEventFilter; + AgreementLiquidated(agreementClass?: string | null, id?: null, penaltyAccount?: string | null, rewardAccount?: string | null, rewardAmount?: null): AgreementLiquidatedEventFilter; + "AgreementLiquidatedBy(address,address,bytes32,address,address,uint256,uint256)"(liquidatorAccount?: null, agreementClass?: string | null, id?: null, penaltyAccount?: string | null, bondAccount?: string | null, rewardAmount?: null, bailoutAmount?: null): AgreementLiquidatedByEventFilter; + AgreementLiquidatedBy(liquidatorAccount?: null, agreementClass?: string | null, id?: null, penaltyAccount?: string | null, bondAccount?: string | null, rewardAmount?: null, bailoutAmount?: null): AgreementLiquidatedByEventFilter; + "AgreementLiquidatedV2(address,bytes32,address,address,address,uint256,int256,bytes)"(agreementClass?: string | null, id?: null, liquidatorAccount?: string | null, targetAccount?: string | null, rewardAccount?: null, rewardAmount?: null, targetAccountBalanceDelta?: null, liquidationTypeData?: null): AgreementLiquidatedV2EventFilter; + AgreementLiquidatedV2(agreementClass?: string | null, id?: null, liquidatorAccount?: string | null, targetAccount?: string | null, rewardAccount?: null, rewardAmount?: null, targetAccountBalanceDelta?: null, liquidationTypeData?: null): AgreementLiquidatedV2EventFilter; + "AgreementStateUpdated(address,address,uint256)"(agreementClass?: string | null, account?: string | null, slotId?: null): AgreementStateUpdatedEventFilter; + AgreementStateUpdated(agreementClass?: string | null, account?: string | null, slotId?: null): AgreementStateUpdatedEventFilter; + "AgreementTerminated(address,bytes32)"(agreementClass?: string | null, id?: null): AgreementTerminatedEventFilter; + AgreementTerminated(agreementClass?: string | null, id?: null): AgreementTerminatedEventFilter; + "AgreementUpdated(address,bytes32,bytes32[])"(agreementClass?: string | null, id?: null, data?: null): AgreementUpdatedEventFilter; + AgreementUpdated(agreementClass?: string | null, id?: null, data?: null): AgreementUpdatedEventFilter; + "Bailout(address,uint256)"(bailoutAccount?: string | null, bailoutAmount?: null): BailoutEventFilter; + Bailout(bailoutAccount?: string | null, bailoutAmount?: null): BailoutEventFilter; + }; + estimateGas: { + createAgreement(id: BytesLike, data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getAccountActiveAgreements(account: string, overrides?: CallOverrides): Promise; + getAgreementData(agreementClass: string, id: BytesLike, dataLength: BigNumberish, overrides?: CallOverrides): Promise; + getAgreementStateSlot(agreementClass: string, account: string, slotId: BigNumberish, dataLength: BigNumberish, overrides?: CallOverrides): Promise; + getHost(overrides?: CallOverrides): Promise; + isAccountCritical(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise; + isAccountCriticalNow(account: string, overrides?: CallOverrides): Promise; + isAccountSolvent(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise; + isAccountSolventNow(account: string, overrides?: CallOverrides): Promise; + makeLiquidationPayoutsV2(id: BytesLike, liquidationTypeData: BytesLike, liquidatorAccount: string, useDefaultRewardAccount: boolean, targetAccount: string, rewardAmount: BigNumberish, targetAccountBalanceDelta: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + realtimeBalanceOf(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise; + realtimeBalanceOfNow(account: string, overrides?: CallOverrides): Promise; + settleBalance(account: string, delta: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + terminateAgreement(id: BytesLike, dataLength: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + updateAgreementData(id: BytesLike, data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + updateAgreementStateSlot(account: string, slotId: BigNumberish, slotData: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + createAgreement(id: BytesLike, data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getAccountActiveAgreements(account: string, overrides?: CallOverrides): Promise; + getAgreementData(agreementClass: string, id: BytesLike, dataLength: BigNumberish, overrides?: CallOverrides): Promise; + getAgreementStateSlot(agreementClass: string, account: string, slotId: BigNumberish, dataLength: BigNumberish, overrides?: CallOverrides): Promise; + getHost(overrides?: CallOverrides): Promise; + isAccountCritical(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise; + isAccountCriticalNow(account: string, overrides?: CallOverrides): Promise; + isAccountSolvent(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise; + isAccountSolventNow(account: string, overrides?: CallOverrides): Promise; + makeLiquidationPayoutsV2(id: BytesLike, liquidationTypeData: BytesLike, liquidatorAccount: string, useDefaultRewardAccount: boolean, targetAccount: string, rewardAmount: BigNumberish, targetAccountBalanceDelta: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + realtimeBalanceOf(account: string, timestamp: BigNumberish, overrides?: CallOverrides): Promise; + realtimeBalanceOfNow(account: string, overrides?: CallOverrides): Promise; + settleBalance(account: string, delta: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + terminateAgreement(id: BytesLike, dataLength: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + updateAgreementData(id: BytesLike, data: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + updateAgreementStateSlot(account: string, slotId: BigNumberish, slotData: BytesLike[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/ISuperfluidToken.js b/dist/typings/ISuperfluidToken.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/ISuperfluidToken.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/Initializable.d.ts b/dist/typings/Initializable.d.ts new file mode 100644 index 00000000..4d23c197 --- /dev/null +++ b/dist/typings/Initializable.d.ts @@ -0,0 +1,75 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface InitializableInterface extends utils.Interface { + functions: { + "c_c0828b70(bytes8)": FunctionFragment; + "c_falsec0828b70(bytes8)": FunctionFragment; + "c_truec0828b70(bytes8)": FunctionFragment; + "isInitialized()": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_c0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; + decodeFunctionResult(functionFragment: "c_c0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; + events: { + "Initialized(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; +} +export declare type InitializedEvent = TypedEvent<[string], { + initializer: string; +}>; +export declare type InitializedEventFilter = TypedEventFilter; +export interface Initializable extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: InitializableInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + isInitialized(overrides?: CallOverrides): Promise<[boolean]>; + }; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + callStatic: { + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + }; + filters: { + "Initialized(address)"(initializer?: null): InitializedEventFilter; + Initialized(initializer?: null): InitializedEventFilter; + }; + estimateGas: { + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/Initializable.js b/dist/typings/Initializable.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/Initializable.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/PaymentDepositAccount.d.ts b/dist/typings/PaymentDepositAccount.d.ts new file mode 100644 index 00000000..b8a81e38 --- /dev/null +++ b/dist/typings/PaymentDepositAccount.d.ts @@ -0,0 +1,105 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface PaymentDepositAccountInterface extends utils.Interface { + functions: { + "c_624bed52(bytes8)": FunctionFragment; + "c_e208e0f4(bytes8)": FunctionFragment; + "c_false624bed52(bytes8)": FunctionFragment; + "c_falsee208e0f4(bytes8)": FunctionFragment; + "c_true624bed52(bytes8)": FunctionFragment; + "c_truee208e0f4(bytes8)": FunctionFragment; + "controller()": FunctionFragment; + "executeTransaction(address,uint256,bytes)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_624bed52", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_e208e0f4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false624bed52", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsee208e0f4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true624bed52", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truee208e0f4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "controller", values?: undefined): string; + encodeFunctionData(functionFragment: "executeTransaction", values: [string, BigNumberish, BytesLike]): string; + decodeFunctionResult(functionFragment: "c_624bed52", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_e208e0f4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false624bed52", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsee208e0f4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true624bed52", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truee208e0f4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "controller", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "executeTransaction", data: BytesLike): Result; + events: {}; +} +export interface PaymentDepositAccount extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: PaymentDepositAccountInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + controller(overrides?: CallOverrides): Promise<[string]>; + executeTransaction(to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + c_624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise; + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_false624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_true624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + controller(overrides?: CallOverrides): Promise; + executeTransaction(to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + c_624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise; + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_false624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_true624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + controller(overrides?: CallOverrides): Promise; + executeTransaction(to: string, value: BigNumberish, data: BytesLike, overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + c_624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise; + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_false624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_true624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + controller(overrides?: CallOverrides): Promise; + executeTransaction(to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + c_624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise; + c_e208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_false624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise; + c_falsee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + c_true624bed52(c__624bed52: BytesLike, overrides?: CallOverrides): Promise; + c_truee208e0f4(c__e208e0f4: BytesLike, overrides?: CallOverrides): Promise; + controller(overrides?: CallOverrides): Promise; + executeTransaction(to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/PaymentDepositAccount.js b/dist/typings/PaymentDepositAccount.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/PaymentDepositAccount.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/PaymentRegistry.d.ts b/dist/typings/PaymentRegistry.d.ts new file mode 100644 index 00000000..dd681748 --- /dev/null +++ b/dist/typings/PaymentRegistry.d.ts @@ -0,0 +1,665 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export declare type DepositWithdrawalStruct = { + owner: string; + token: string; + amount: BigNumberish; +}; +export declare type DepositWithdrawalStructOutput = [string, string, BigNumber] & { + owner: string; + token: string; + amount: BigNumber; +}; +export declare type PaymentChannelCommitStruct = { + sender: string; + recipient: string; + token: string; + uid: BytesLike; + blockNumber: BigNumberish; + amount: BigNumberish; +}; +export declare type PaymentChannelCommitStructOutput = [ + string, + string, + string, + string, + BigNumber, + BigNumber +] & { + sender: string; + recipient: string; + token: string; + uid: string; + blockNumber: BigNumber; + amount: BigNumber; +}; +export interface PaymentRegistryInterface extends utils.Interface { + functions: { + "addGuardian(address)": FunctionFragment; + "c_0ffe16b4(bytes8)": FunctionFragment; + "c_1b54acf3(bytes8)": FunctionFragment; + "c_3029712e(bytes8)": FunctionFragment; + "c_c0828b70(bytes8)": FunctionFragment; + "c_d5c463c2(bytes8)": FunctionFragment; + "c_false0ffe16b4(bytes8)": FunctionFragment; + "c_false1b54acf3(bytes8)": FunctionFragment; + "c_false3029712e(bytes8)": FunctionFragment; + "c_falsec0828b70(bytes8)": FunctionFragment; + "c_falsed5c463c2(bytes8)": FunctionFragment; + "c_true0ffe16b4(bytes8)": FunctionFragment; + "c_true1b54acf3(bytes8)": FunctionFragment; + "c_true3029712e(bytes8)": FunctionFragment; + "c_truec0828b70(bytes8)": FunctionFragment; + "c_trued5c463c2(bytes8)": FunctionFragment; + "chainId()": FunctionFragment; + "commitPaymentChannelAndDeposit(address,address,bytes32,uint256,uint256,bytes,bytes)": FunctionFragment; + "commitPaymentChannelAndSplit(address,address,bytes32,uint256,uint256,uint256,bytes,bytes)": FunctionFragment; + "commitPaymentChannelAndWithdraw(address,address,bytes32,uint256,uint256,bytes,bytes)": FunctionFragment; + "computeDepositAccountAddress(address)": FunctionFragment; + "computePaymentChannelHash(address,address,address,bytes32)": FunctionFragment; + "deployDepositAccount(address)": FunctionFragment; + "depositExitLockPeriod()": FunctionFragment; + "externalAccountRegistry()": FunctionFragment; + "gateway()": FunctionFragment; + "getDepositExitLockedUntil(address,address)": FunctionFragment; + "getDepositWithdrawnAmount(address,address)": FunctionFragment; + "getPaymentChannelCommittedAmount(bytes32)": FunctionFragment; + "hashDepositWithdrawal((address,address,uint256))": FunctionFragment; + "hashPaymentChannelCommit((address,address,address,bytes32,uint256,uint256))": FunctionFragment; + "initialize(address,address,uint256,address[],address)": FunctionFragment; + "isDepositAccountDeployed(address)": FunctionFragment; + "isGuardian(address)": FunctionFragment; + "isInitialized()": FunctionFragment; + "personalAccountRegistry()": FunctionFragment; + "processDepositExit(address)": FunctionFragment; + "removeGuardian(address)": FunctionFragment; + "requestDepositExit(address)": FunctionFragment; + "verifyGuardianSignature(bytes32,bytes)": FunctionFragment; + "withdrawDeposit(address,uint256,bytes)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "addGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "c_0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_1b54acf3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_3029712e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_c0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_d5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false1b54acf3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false3029712e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsed5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true1b54acf3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true3029712e", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_trued5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "chainId", values?: undefined): string; + encodeFunctionData(functionFragment: "commitPaymentChannelAndDeposit", values: [ + string, + string, + BytesLike, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ]): string; + encodeFunctionData(functionFragment: "commitPaymentChannelAndSplit", values: [ + string, + string, + BytesLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ]): string; + encodeFunctionData(functionFragment: "commitPaymentChannelAndWithdraw", values: [ + string, + string, + BytesLike, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ]): string; + encodeFunctionData(functionFragment: "computeDepositAccountAddress", values: [string]): string; + encodeFunctionData(functionFragment: "computePaymentChannelHash", values: [string, string, string, BytesLike]): string; + encodeFunctionData(functionFragment: "deployDepositAccount", values: [string]): string; + encodeFunctionData(functionFragment: "depositExitLockPeriod", values?: undefined): string; + encodeFunctionData(functionFragment: "externalAccountRegistry", values?: undefined): string; + encodeFunctionData(functionFragment: "gateway", values?: undefined): string; + encodeFunctionData(functionFragment: "getDepositExitLockedUntil", values: [string, string]): string; + encodeFunctionData(functionFragment: "getDepositWithdrawnAmount", values: [string, string]): string; + encodeFunctionData(functionFragment: "getPaymentChannelCommittedAmount", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "hashDepositWithdrawal", values: [DepositWithdrawalStruct]): string; + encodeFunctionData(functionFragment: "hashPaymentChannelCommit", values: [PaymentChannelCommitStruct]): string; + encodeFunctionData(functionFragment: "initialize", values: [string, string, BigNumberish, string[], string]): string; + encodeFunctionData(functionFragment: "isDepositAccountDeployed", values: [string]): string; + encodeFunctionData(functionFragment: "isGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; + encodeFunctionData(functionFragment: "personalAccountRegistry", values?: undefined): string; + encodeFunctionData(functionFragment: "processDepositExit", values: [string]): string; + encodeFunctionData(functionFragment: "removeGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "requestDepositExit", values: [string]): string; + encodeFunctionData(functionFragment: "verifyGuardianSignature", values: [BytesLike, BytesLike]): string; + encodeFunctionData(functionFragment: "withdrawDeposit", values: [string, BigNumberish, BytesLike]): string; + decodeFunctionResult(functionFragment: "addGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_1b54acf3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_3029712e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_c0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_d5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false1b54acf3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false3029712e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsed5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true1b54acf3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true3029712e", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_trued5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "chainId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "commitPaymentChannelAndDeposit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "commitPaymentChannelAndSplit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "commitPaymentChannelAndWithdraw", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "computeDepositAccountAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "computePaymentChannelHash", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deployDepositAccount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "depositExitLockPeriod", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "externalAccountRegistry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "gateway", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDepositExitLockedUntil", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDepositWithdrawnAmount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getPaymentChannelCommittedAmount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hashDepositWithdrawal", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hashPaymentChannelCommit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isDepositAccountDeployed", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "personalAccountRegistry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "processDepositExit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "removeGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "requestDepositExit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "verifyGuardianSignature", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdrawDeposit", data: BytesLike): Result; + events: { + "DepositAccountDeployed(address,address)": EventFragment; + "DepositExitCompleted(address,address,address,uint256)": EventFragment; + "DepositExitRejected(address,address,address)": EventFragment; + "DepositExitRequested(address,address,address,uint256)": EventFragment; + "DepositWithdrawn(address,address,address,uint256)": EventFragment; + "GuardianAdded(address,address)": EventFragment; + "GuardianRemoved(address,address)": EventFragment; + "Initialized(address)": EventFragment; + "PaymentChannelCommitted(bytes32,address,address,address,bytes32,uint256)": EventFragment; + "PaymentDeposited(bytes32,uint256)": EventFragment; + "PaymentSplit(bytes32,uint256,uint256)": EventFragment; + "PaymentWithdrawn(bytes32,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "DepositAccountDeployed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DepositExitCompleted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DepositExitRejected"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DepositExitRequested"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DepositWithdrawn"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GuardianAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GuardianRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PaymentChannelCommitted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PaymentDeposited"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PaymentSplit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "PaymentWithdrawn"): EventFragment; +} +export declare type DepositAccountDeployedEvent = TypedEvent<[ + string, + string +], { + depositAccount: string; + owner: string; +}>; +export declare type DepositAccountDeployedEventFilter = TypedEventFilter; +export declare type DepositExitCompletedEvent = TypedEvent<[ + string, + string, + string, + BigNumber +], { + depositAccount: string; + owner: string; + token: string; + amount: BigNumber; +}>; +export declare type DepositExitCompletedEventFilter = TypedEventFilter; +export declare type DepositExitRejectedEvent = TypedEvent<[ + string, + string, + string +], { + depositAccount: string; + owner: string; + token: string; +}>; +export declare type DepositExitRejectedEventFilter = TypedEventFilter; +export declare type DepositExitRequestedEvent = TypedEvent<[ + string, + string, + string, + BigNumber +], { + depositAccount: string; + owner: string; + token: string; + lockedUntil: BigNumber; +}>; +export declare type DepositExitRequestedEventFilter = TypedEventFilter; +export declare type DepositWithdrawnEvent = TypedEvent<[ + string, + string, + string, + BigNumber +], { + depositAccount: string; + owner: string; + token: string; + amount: BigNumber; +}>; +export declare type DepositWithdrawnEventFilter = TypedEventFilter; +export declare type GuardianAddedEvent = TypedEvent<[ + string, + string +], { + sender: string; + guardian: string; +}>; +export declare type GuardianAddedEventFilter = TypedEventFilter; +export declare type GuardianRemovedEvent = TypedEvent<[ + string, + string +], { + sender: string; + guardian: string; +}>; +export declare type GuardianRemovedEventFilter = TypedEventFilter; +export declare type InitializedEvent = TypedEvent<[string], { + initializer: string; +}>; +export declare type InitializedEventFilter = TypedEventFilter; +export declare type PaymentChannelCommittedEvent = TypedEvent<[ + string, + string, + string, + string, + string, + BigNumber +], { + hash: string; + sender: string; + recipient: string; + token: string; + uid: string; + amount: BigNumber; +}>; +export declare type PaymentChannelCommittedEventFilter = TypedEventFilter; +export declare type PaymentDepositedEvent = TypedEvent<[ + string, + BigNumber +], { + channelHash: string; + value: BigNumber; +}>; +export declare type PaymentDepositedEventFilter = TypedEventFilter; +export declare type PaymentSplitEvent = TypedEvent<[ + string, + BigNumber, + BigNumber +], { + channelHash: string; + totalValue: BigNumber; + depositValue: BigNumber; +}>; +export declare type PaymentSplitEventFilter = TypedEventFilter; +export declare type PaymentWithdrawnEvent = TypedEvent<[ + string, + BigNumber +], { + channelHash: string; + value: BigNumber; +}>; +export declare type PaymentWithdrawnEventFilter = TypedEventFilter; +export interface PaymentRegistry extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: PaymentRegistryInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + chainId(overrides?: CallOverrides): Promise<[BigNumber]>; + commitPaymentChannelAndDeposit(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commitPaymentChannelAndSplit(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, depositPaymentValue: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commitPaymentChannelAndWithdraw(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + computeDepositAccountAddress(owner: string, overrides?: CallOverrides): Promise<[string]>; + computePaymentChannelHash(sender: string, recipient: string, token: string, uid: BytesLike, overrides?: CallOverrides): Promise<[string]>; + deployDepositAccount(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + depositExitLockPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + externalAccountRegistry(overrides?: CallOverrides): Promise<[string]>; + gateway(overrides?: CallOverrides): Promise<[string]>; + getDepositExitLockedUntil(owner: string, token: string, overrides?: CallOverrides): Promise<[BigNumber]>; + getDepositWithdrawnAmount(owner: string, token: string, overrides?: CallOverrides): Promise<[BigNumber]>; + getPaymentChannelCommittedAmount(hash: BytesLike, overrides?: CallOverrides): Promise<[BigNumber]>; + hashDepositWithdrawal(depositWithdrawal: DepositWithdrawalStruct, overrides?: CallOverrides): Promise<[string]>; + hashPaymentChannelCommit(paymentChannelCommit: PaymentChannelCommitStruct, overrides?: CallOverrides): Promise<[string]>; + initialize(externalAccountRegistry_: string, personalAccountRegistry_: string, depositExitLockPeriod_: BigNumberish, guardians_: string[], gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isDepositAccountDeployed(owner: string, overrides?: CallOverrides): Promise<[boolean]>; + isGuardian(guardian: string, overrides?: CallOverrides): Promise<[boolean]>; + isInitialized(overrides?: CallOverrides): Promise<[boolean]>; + personalAccountRegistry(overrides?: CallOverrides): Promise<[string]>; + processDepositExit(token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + requestDepositExit(token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + withdrawDeposit(token: string, amount: BigNumberish, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_false3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_true3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + commitPaymentChannelAndDeposit(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commitPaymentChannelAndSplit(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, depositPaymentValue: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commitPaymentChannelAndWithdraw(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + computeDepositAccountAddress(owner: string, overrides?: CallOverrides): Promise; + computePaymentChannelHash(sender: string, recipient: string, token: string, uid: BytesLike, overrides?: CallOverrides): Promise; + deployDepositAccount(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + depositExitLockPeriod(overrides?: CallOverrides): Promise; + externalAccountRegistry(overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + getDepositExitLockedUntil(owner: string, token: string, overrides?: CallOverrides): Promise; + getDepositWithdrawnAmount(owner: string, token: string, overrides?: CallOverrides): Promise; + getPaymentChannelCommittedAmount(hash: BytesLike, overrides?: CallOverrides): Promise; + hashDepositWithdrawal(depositWithdrawal: DepositWithdrawalStruct, overrides?: CallOverrides): Promise; + hashPaymentChannelCommit(paymentChannelCommit: PaymentChannelCommitStruct, overrides?: CallOverrides): Promise; + initialize(externalAccountRegistry_: string, personalAccountRegistry_: string, depositExitLockPeriod_: BigNumberish, guardians_: string[], gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isDepositAccountDeployed(owner: string, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + personalAccountRegistry(overrides?: CallOverrides): Promise; + processDepositExit(token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + requestDepositExit(token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + withdrawDeposit(token: string, amount: BigNumberish, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + addGuardian(guardian: string, overrides?: CallOverrides): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_false3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_true3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + commitPaymentChannelAndDeposit(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: CallOverrides): Promise; + commitPaymentChannelAndSplit(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, depositPaymentValue: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: CallOverrides): Promise; + commitPaymentChannelAndWithdraw(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: CallOverrides): Promise; + computeDepositAccountAddress(owner: string, overrides?: CallOverrides): Promise; + computePaymentChannelHash(sender: string, recipient: string, token: string, uid: BytesLike, overrides?: CallOverrides): Promise; + deployDepositAccount(owner: string, overrides?: CallOverrides): Promise; + depositExitLockPeriod(overrides?: CallOverrides): Promise; + externalAccountRegistry(overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + getDepositExitLockedUntil(owner: string, token: string, overrides?: CallOverrides): Promise; + getDepositWithdrawnAmount(owner: string, token: string, overrides?: CallOverrides): Promise; + getPaymentChannelCommittedAmount(hash: BytesLike, overrides?: CallOverrides): Promise; + hashDepositWithdrawal(depositWithdrawal: DepositWithdrawalStruct, overrides?: CallOverrides): Promise; + hashPaymentChannelCommit(paymentChannelCommit: PaymentChannelCommitStruct, overrides?: CallOverrides): Promise; + initialize(externalAccountRegistry_: string, personalAccountRegistry_: string, depositExitLockPeriod_: BigNumberish, guardians_: string[], gateway_: string, overrides?: CallOverrides): Promise; + isDepositAccountDeployed(owner: string, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + personalAccountRegistry(overrides?: CallOverrides): Promise; + processDepositExit(token: string, overrides?: CallOverrides): Promise; + removeGuardian(guardian: string, overrides?: CallOverrides): Promise; + requestDepositExit(token: string, overrides?: CallOverrides): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + withdrawDeposit(token: string, amount: BigNumberish, guardianSignature: BytesLike, overrides?: CallOverrides): Promise; + }; + filters: { + "DepositAccountDeployed(address,address)"(depositAccount?: null, owner?: null): DepositAccountDeployedEventFilter; + DepositAccountDeployed(depositAccount?: null, owner?: null): DepositAccountDeployedEventFilter; + "DepositExitCompleted(address,address,address,uint256)"(depositAccount?: null, owner?: null, token?: null, amount?: null): DepositExitCompletedEventFilter; + DepositExitCompleted(depositAccount?: null, owner?: null, token?: null, amount?: null): DepositExitCompletedEventFilter; + "DepositExitRejected(address,address,address)"(depositAccount?: null, owner?: null, token?: null): DepositExitRejectedEventFilter; + DepositExitRejected(depositAccount?: null, owner?: null, token?: null): DepositExitRejectedEventFilter; + "DepositExitRequested(address,address,address,uint256)"(depositAccount?: null, owner?: null, token?: null, lockedUntil?: null): DepositExitRequestedEventFilter; + DepositExitRequested(depositAccount?: null, owner?: null, token?: null, lockedUntil?: null): DepositExitRequestedEventFilter; + "DepositWithdrawn(address,address,address,uint256)"(depositAccount?: null, owner?: null, token?: null, amount?: null): DepositWithdrawnEventFilter; + DepositWithdrawn(depositAccount?: null, owner?: null, token?: null, amount?: null): DepositWithdrawnEventFilter; + "GuardianAdded(address,address)"(sender?: null, guardian?: null): GuardianAddedEventFilter; + GuardianAdded(sender?: null, guardian?: null): GuardianAddedEventFilter; + "GuardianRemoved(address,address)"(sender?: null, guardian?: null): GuardianRemovedEventFilter; + GuardianRemoved(sender?: null, guardian?: null): GuardianRemovedEventFilter; + "Initialized(address)"(initializer?: null): InitializedEventFilter; + Initialized(initializer?: null): InitializedEventFilter; + "PaymentChannelCommitted(bytes32,address,address,address,bytes32,uint256)"(hash?: null, sender?: null, recipient?: null, token?: null, uid?: null, amount?: null): PaymentChannelCommittedEventFilter; + PaymentChannelCommitted(hash?: null, sender?: null, recipient?: null, token?: null, uid?: null, amount?: null): PaymentChannelCommittedEventFilter; + "PaymentDeposited(bytes32,uint256)"(channelHash?: null, value?: null): PaymentDepositedEventFilter; + PaymentDeposited(channelHash?: null, value?: null): PaymentDepositedEventFilter; + "PaymentSplit(bytes32,uint256,uint256)"(channelHash?: null, totalValue?: null, depositValue?: null): PaymentSplitEventFilter; + PaymentSplit(channelHash?: null, totalValue?: null, depositValue?: null): PaymentSplitEventFilter; + "PaymentWithdrawn(bytes32,uint256)"(channelHash?: null, value?: null): PaymentWithdrawnEventFilter; + PaymentWithdrawn(channelHash?: null, value?: null): PaymentWithdrawnEventFilter; + }; + estimateGas: { + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_false3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_true3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + commitPaymentChannelAndDeposit(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commitPaymentChannelAndSplit(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, depositPaymentValue: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commitPaymentChannelAndWithdraw(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + computeDepositAccountAddress(owner: string, overrides?: CallOverrides): Promise; + computePaymentChannelHash(sender: string, recipient: string, token: string, uid: BytesLike, overrides?: CallOverrides): Promise; + deployDepositAccount(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + depositExitLockPeriod(overrides?: CallOverrides): Promise; + externalAccountRegistry(overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + getDepositExitLockedUntil(owner: string, token: string, overrides?: CallOverrides): Promise; + getDepositWithdrawnAmount(owner: string, token: string, overrides?: CallOverrides): Promise; + getPaymentChannelCommittedAmount(hash: BytesLike, overrides?: CallOverrides): Promise; + hashDepositWithdrawal(depositWithdrawal: DepositWithdrawalStruct, overrides?: CallOverrides): Promise; + hashPaymentChannelCommit(paymentChannelCommit: PaymentChannelCommitStruct, overrides?: CallOverrides): Promise; + initialize(externalAccountRegistry_: string, personalAccountRegistry_: string, depositExitLockPeriod_: BigNumberish, guardians_: string[], gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isDepositAccountDeployed(owner: string, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + personalAccountRegistry(overrides?: CallOverrides): Promise; + processDepositExit(token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + requestDepositExit(token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + withdrawDeposit(token: string, amount: BigNumberish, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_false3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_true3029712e(c__3029712e: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + commitPaymentChannelAndDeposit(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commitPaymentChannelAndSplit(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, depositPaymentValue: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + commitPaymentChannelAndWithdraw(sender: string, token: string, uid: BytesLike, blockNumber: BigNumberish, amount: BigNumberish, senderSignature: BytesLike, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + computeDepositAccountAddress(owner: string, overrides?: CallOverrides): Promise; + computePaymentChannelHash(sender: string, recipient: string, token: string, uid: BytesLike, overrides?: CallOverrides): Promise; + deployDepositAccount(owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + depositExitLockPeriod(overrides?: CallOverrides): Promise; + externalAccountRegistry(overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + getDepositExitLockedUntil(owner: string, token: string, overrides?: CallOverrides): Promise; + getDepositWithdrawnAmount(owner: string, token: string, overrides?: CallOverrides): Promise; + getPaymentChannelCommittedAmount(hash: BytesLike, overrides?: CallOverrides): Promise; + hashDepositWithdrawal(depositWithdrawal: DepositWithdrawalStruct, overrides?: CallOverrides): Promise; + hashPaymentChannelCommit(paymentChannelCommit: PaymentChannelCommitStruct, overrides?: CallOverrides): Promise; + initialize(externalAccountRegistry_: string, personalAccountRegistry_: string, depositExitLockPeriod_: BigNumberish, guardians_: string[], gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isDepositAccountDeployed(owner: string, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + personalAccountRegistry(overrides?: CallOverrides): Promise; + processDepositExit(token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + requestDepositExit(token: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + withdrawDeposit(token: string, amount: BigNumberish, guardianSignature: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/PaymentRegistry.js b/dist/typings/PaymentRegistry.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/PaymentRegistry.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/PersonalAccountImplementationV1.d.ts b/dist/typings/PersonalAccountImplementationV1.d.ts new file mode 100644 index 00000000..513f9439 --- /dev/null +++ b/dist/typings/PersonalAccountImplementationV1.d.ts @@ -0,0 +1,216 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface PersonalAccountImplementationV1Interface extends utils.Interface { + functions: { + "c_305923d6(bytes8)": FunctionFragment; + "c_3add61c5(bytes8)": FunctionFragment; + "c_c0828b70(bytes8)": FunctionFragment; + "c_d5fdf5ee(bytes8)": FunctionFragment; + "c_false305923d6(bytes8)": FunctionFragment; + "c_false3add61c5(bytes8)": FunctionFragment; + "c_falsec0828b70(bytes8)": FunctionFragment; + "c_falsed5fdf5ee(bytes8)": FunctionFragment; + "c_true305923d6(bytes8)": FunctionFragment; + "c_true3add61c5(bytes8)": FunctionFragment; + "c_truec0828b70(bytes8)": FunctionFragment; + "c_trued5fdf5ee(bytes8)": FunctionFragment; + "canImplementInterfaceForAddress(bytes32,address)": FunctionFragment; + "initialize(address)": FunctionFragment; + "isInitialized()": FunctionFragment; + "isValidSignature(bytes32,bytes)": FunctionFragment; + "onERC1155Received(address,address,uint256,uint256,bytes)": FunctionFragment; + "onERC721Received(address,address,uint256,bytes)": FunctionFragment; + "registry()": FunctionFragment; + "tokensReceived(address,address,address,uint256,bytes,bytes)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_3add61c5", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_c0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_d5fdf5ee", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false3add61c5", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsed5fdf5ee", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true305923d6", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true3add61c5", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_trued5fdf5ee", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "canImplementInterfaceForAddress", values: [BytesLike, string]): string; + encodeFunctionData(functionFragment: "initialize", values: [string]): string; + encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; + encodeFunctionData(functionFragment: "isValidSignature", values: [BytesLike, BytesLike]): string; + encodeFunctionData(functionFragment: "onERC1155Received", values: [string, string, BigNumberish, BigNumberish, BytesLike]): string; + encodeFunctionData(functionFragment: "onERC721Received", values: [string, string, BigNumberish, BytesLike]): string; + encodeFunctionData(functionFragment: "registry", values?: undefined): string; + encodeFunctionData(functionFragment: "tokensReceived", values: [string, string, string, BigNumberish, BytesLike, BytesLike]): string; + decodeFunctionResult(functionFragment: "c_305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_3add61c5", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_c0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_d5fdf5ee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false3add61c5", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsed5fdf5ee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true305923d6", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true3add61c5", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_trued5fdf5ee", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "canImplementInterfaceForAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isValidSignature", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onERC1155Received", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "onERC721Received", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "registry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "tokensReceived", data: BytesLike): Result; + events: { + "Initialized(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; +} +export declare type InitializedEvent = TypedEvent<[string], { + initializer: string; +}>; +export declare type InitializedEventFilter = TypedEventFilter; +export interface PersonalAccountImplementationV1 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: PersonalAccountImplementationV1Interface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_d5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsed5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_trued5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise<[string]>; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise<[boolean]>; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[string]>; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[string]>; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise<[string]>; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise<[string]>; + registry(overrides?: CallOverrides): Promise<[string]>; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise<[void]>; + }; + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise; + callStatic: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise; + }; + filters: { + "Initialized(address)"(initializer?: null): InitializedEventFilter; + Initialized(initializer?: null): InitializedEventFilter; + }; + estimateGas: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + c_305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise; + c_false305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_false3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise; + c_true305923d6(c__305923d6: BytesLike, overrides?: CallOverrides): Promise; + c_true3add61c5(c__3add61c5: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5fdf5ee(c__d5fdf5ee: BytesLike, overrides?: CallOverrides): Promise; + canImplementInterfaceForAddress(interfaceHash: BytesLike, addr: string, overrides?: CallOverrides): Promise; + initialize(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidSignature(bytes32,bytes)"(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidSignature(bytes,bytes)"(message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + onERC1155Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BigNumberish, arg4: BytesLike, overrides?: CallOverrides): Promise; + onERC721Received(arg0: string, arg1: string, arg2: BigNumberish, arg3: BytesLike, overrides?: CallOverrides): Promise; + registry(overrides?: CallOverrides): Promise; + tokensReceived(arg0: string, arg1: string, arg2: string, arg3: BigNumberish, arg4: BytesLike, arg5: BytesLike, overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/PersonalAccountImplementationV1.js b/dist/typings/PersonalAccountImplementationV1.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/PersonalAccountImplementationV1.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/PersonalAccountRegistry.d.ts b/dist/typings/PersonalAccountRegistry.d.ts new file mode 100644 index 00000000..8e3abc3e --- /dev/null +++ b/dist/typings/PersonalAccountRegistry.d.ts @@ -0,0 +1,566 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface PersonalAccountRegistryInterface extends utils.Interface { + functions: { + "accountImplementation()": FunctionFragment; + "accountRegistry()": FunctionFragment; + "addAccountOwner(address,address)": FunctionFragment; + "addGuardian(address)": FunctionFragment; + "c_0ffe16b4(bytes8)": FunctionFragment; + "c_19d98a43(bytes8)": FunctionFragment; + "c_203cf0ac(bytes8)": FunctionFragment; + "c_9b6befd1(bytes8)": FunctionFragment; + "c_c0828b70(bytes8)": FunctionFragment; + "c_d5c463c2(bytes8)": FunctionFragment; + "c_false0ffe16b4(bytes8)": FunctionFragment; + "c_false19d98a43(bytes8)": FunctionFragment; + "c_false203cf0ac(bytes8)": FunctionFragment; + "c_false9b6befd1(bytes8)": FunctionFragment; + "c_falsec0828b70(bytes8)": FunctionFragment; + "c_falsed5c463c2(bytes8)": FunctionFragment; + "c_true0ffe16b4(bytes8)": FunctionFragment; + "c_true19d98a43(bytes8)": FunctionFragment; + "c_true203cf0ac(bytes8)": FunctionFragment; + "c_true9b6befd1(bytes8)": FunctionFragment; + "c_truec0828b70(bytes8)": FunctionFragment; + "c_trued5c463c2(bytes8)": FunctionFragment; + "computeAccountAddress(address)": FunctionFragment; + "deployAccount(address)": FunctionFragment; + "executeAccountTransaction(address,address,uint256,bytes)": FunctionFragment; + "gateway()": FunctionFragment; + "initialize(address[],address,address)": FunctionFragment; + "isAccountDeployed(address)": FunctionFragment; + "isGuardian(address)": FunctionFragment; + "isInitialized()": FunctionFragment; + "isValidAccountSignature(address,bytes,bytes)": FunctionFragment; + "refundAccountCall(address,address,uint256)": FunctionFragment; + "removeAccountOwner(address,address)": FunctionFragment; + "removeGuardian(address)": FunctionFragment; + "upgrade(address)": FunctionFragment; + "upgradeAccount(address)": FunctionFragment; + "verifyAccountOwner(address,address)": FunctionFragment; + "verifyAccountOwnerAtBlock(address,address,uint256)": FunctionFragment; + "verifyGuardianSignature(bytes32,bytes)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "accountImplementation", values?: undefined): string; + encodeFunctionData(functionFragment: "accountRegistry", values?: undefined): string; + encodeFunctionData(functionFragment: "addAccountOwner", values: [string, string]): string; + encodeFunctionData(functionFragment: "addGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "c_0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_19d98a43", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_203cf0ac", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_9b6befd1", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_c0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_d5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false19d98a43", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false203cf0ac", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false9b6befd1", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsed5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true0ffe16b4", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true19d98a43", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true203cf0ac", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true9b6befd1", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_trued5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "computeAccountAddress", values: [string]): string; + encodeFunctionData(functionFragment: "deployAccount", values: [string]): string; + encodeFunctionData(functionFragment: "executeAccountTransaction", values: [string, string, BigNumberish, BytesLike]): string; + encodeFunctionData(functionFragment: "gateway", values?: undefined): string; + encodeFunctionData(functionFragment: "initialize", values: [string[], string, string]): string; + encodeFunctionData(functionFragment: "isAccountDeployed", values: [string]): string; + encodeFunctionData(functionFragment: "isGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; + encodeFunctionData(functionFragment: "isValidAccountSignature", values: [string, BytesLike, BytesLike]): string; + encodeFunctionData(functionFragment: "refundAccountCall", values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: "removeAccountOwner", values: [string, string]): string; + encodeFunctionData(functionFragment: "removeGuardian", values: [string]): string; + encodeFunctionData(functionFragment: "upgrade", values: [string]): string; + encodeFunctionData(functionFragment: "upgradeAccount", values: [string]): string; + encodeFunctionData(functionFragment: "verifyAccountOwner", values: [string, string]): string; + encodeFunctionData(functionFragment: "verifyAccountOwnerAtBlock", values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: "verifyGuardianSignature", values: [BytesLike, BytesLike]): string; + decodeFunctionResult(functionFragment: "accountImplementation", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "accountRegistry", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addAccountOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "addGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_19d98a43", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_203cf0ac", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_9b6befd1", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_c0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_d5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false19d98a43", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false203cf0ac", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false9b6befd1", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsed5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true0ffe16b4", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true19d98a43", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true203cf0ac", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true9b6befd1", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_trued5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "computeAccountAddress", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "deployAccount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "executeAccountTransaction", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "gateway", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isAccountDeployed", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isValidAccountSignature", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "refundAccountCall", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "removeAccountOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "removeGuardian", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "upgrade", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "upgradeAccount", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "verifyAccountOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "verifyAccountOwnerAtBlock", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "verifyGuardianSignature", data: BytesLike): Result; + events: { + "AccountCallRefunded(address,address,address,uint256)": EventFragment; + "AccountDeployed(address,address)": EventFragment; + "AccountImplementationUpdated(address)": EventFragment; + "AccountOwnerAdded(address,address)": EventFragment; + "AccountOwnerRemoved(address,address)": EventFragment; + "AccountRegistryUpdated(address)": EventFragment; + "AccountTransactionExecuted(address,address,uint256,bytes,bytes)": EventFragment; + "AccountUpgraded(address,address)": EventFragment; + "GuardianAdded(address,address)": EventFragment; + "GuardianRemoved(address,address)": EventFragment; + "Initialized(address)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "AccountCallRefunded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountDeployed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountImplementationUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountOwnerAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountOwnerRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountRegistryUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountTransactionExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AccountUpgraded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GuardianAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GuardianRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; +} +export declare type AccountCallRefundedEvent = TypedEvent<[ + string, + string, + string, + BigNumber +], { + account: string; + beneficiary: string; + token: string; + value: BigNumber; +}>; +export declare type AccountCallRefundedEventFilter = TypedEventFilter; +export declare type AccountDeployedEvent = TypedEvent<[ + string, + string +], { + account: string; + accountImplementation: string; +}>; +export declare type AccountDeployedEventFilter = TypedEventFilter; +export declare type AccountImplementationUpdatedEvent = TypedEvent<[ + string +], { + accountImplementation: string; +}>; +export declare type AccountImplementationUpdatedEventFilter = TypedEventFilter; +export declare type AccountOwnerAddedEvent = TypedEvent<[ + string, + string +], { + account: string; + owner: string; +}>; +export declare type AccountOwnerAddedEventFilter = TypedEventFilter; +export declare type AccountOwnerRemovedEvent = TypedEvent<[ + string, + string +], { + account: string; + owner: string; +}>; +export declare type AccountOwnerRemovedEventFilter = TypedEventFilter; +export declare type AccountRegistryUpdatedEvent = TypedEvent<[ + string +], { + accountRegistry: string; +}>; +export declare type AccountRegistryUpdatedEventFilter = TypedEventFilter; +export declare type AccountTransactionExecutedEvent = TypedEvent<[ + string, + string, + BigNumber, + string, + string +], { + account: string; + to: string; + value: BigNumber; + data: string; + response: string; +}>; +export declare type AccountTransactionExecutedEventFilter = TypedEventFilter; +export declare type AccountUpgradedEvent = TypedEvent<[ + string, + string +], { + account: string; + accountImplementation: string; +}>; +export declare type AccountUpgradedEventFilter = TypedEventFilter; +export declare type GuardianAddedEvent = TypedEvent<[ + string, + string +], { + sender: string; + guardian: string; +}>; +export declare type GuardianAddedEventFilter = TypedEventFilter; +export declare type GuardianRemovedEvent = TypedEvent<[ + string, + string +], { + sender: string; + guardian: string; +}>; +export declare type GuardianRemovedEventFilter = TypedEventFilter; +export declare type InitializedEvent = TypedEvent<[string], { + initializer: string; +}>; +export declare type InitializedEventFilter = TypedEventFilter; +export interface PersonalAccountRegistry extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: PersonalAccountRegistryInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + accountImplementation(overrides?: CallOverrides): Promise<[string]>; + accountRegistry(overrides?: CallOverrides): Promise<[string]>; + addAccountOwner(account: string, owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + computeAccountAddress(saltOwner: string, overrides?: CallOverrides): Promise<[string]>; + deployAccount(account: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + executeAccountTransaction(account: string, to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + gateway(overrides?: CallOverrides): Promise<[string]>; + initialize(guardians_: string[], accountImplementation_: string, gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isAccountDeployed(account: string, overrides?: CallOverrides): Promise<[boolean]>; + isGuardian(guardian: string, overrides?: CallOverrides): Promise<[boolean]>; + isInitialized(overrides?: CallOverrides): Promise<[boolean]>; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + refundAccountCall(account: string, token: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeAccountOwner(account: string, owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + upgrade(accountImplementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + upgradeAccount(account: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyAccountOwner(account: string, owner: string, overrides?: CallOverrides): Promise<[boolean]>; + verifyAccountOwnerAtBlock(account: string, owner: string, blockNumber: BigNumberish, overrides?: CallOverrides): Promise<[boolean]>; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + }; + accountImplementation(overrides?: CallOverrides): Promise; + accountRegistry(overrides?: CallOverrides): Promise; + addAccountOwner(account: string, owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_false9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_true9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + computeAccountAddress(saltOwner: string, overrides?: CallOverrides): Promise; + deployAccount(account: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + executeAccountTransaction(account: string, to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + gateway(overrides?: CallOverrides): Promise; + initialize(guardians_: string[], accountImplementation_: string, gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isAccountDeployed(account: string, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + refundAccountCall(account: string, token: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeAccountOwner(account: string, owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + upgrade(accountImplementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + upgradeAccount(account: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyAccountOwner(account: string, owner: string, overrides?: CallOverrides): Promise; + verifyAccountOwnerAtBlock(account: string, owner: string, blockNumber: BigNumberish, overrides?: CallOverrides): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + callStatic: { + accountImplementation(overrides?: CallOverrides): Promise; + accountRegistry(overrides?: CallOverrides): Promise; + addAccountOwner(account: string, owner: string, overrides?: CallOverrides): Promise; + addGuardian(guardian: string, overrides?: CallOverrides): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_false9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_true9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + computeAccountAddress(saltOwner: string, overrides?: CallOverrides): Promise; + deployAccount(account: string, overrides?: CallOverrides): Promise; + executeAccountTransaction(account: string, to: string, value: BigNumberish, data: BytesLike, overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + initialize(guardians_: string[], accountImplementation_: string, gateway_: string, overrides?: CallOverrides): Promise; + isAccountDeployed(account: string, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + refundAccountCall(account: string, token: string, value: BigNumberish, overrides?: CallOverrides): Promise; + removeAccountOwner(account: string, owner: string, overrides?: CallOverrides): Promise; + removeGuardian(guardian: string, overrides?: CallOverrides): Promise; + upgrade(accountImplementation_: string, overrides?: CallOverrides): Promise; + upgradeAccount(account: string, overrides?: CallOverrides): Promise; + verifyAccountOwner(account: string, owner: string, overrides?: CallOverrides): Promise; + verifyAccountOwnerAtBlock(account: string, owner: string, blockNumber: BigNumberish, overrides?: CallOverrides): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + }; + filters: { + "AccountCallRefunded(address,address,address,uint256)"(account?: null, beneficiary?: null, token?: null, value?: null): AccountCallRefundedEventFilter; + AccountCallRefunded(account?: null, beneficiary?: null, token?: null, value?: null): AccountCallRefundedEventFilter; + "AccountDeployed(address,address)"(account?: null, accountImplementation?: null): AccountDeployedEventFilter; + AccountDeployed(account?: null, accountImplementation?: null): AccountDeployedEventFilter; + "AccountImplementationUpdated(address)"(accountImplementation?: null): AccountImplementationUpdatedEventFilter; + AccountImplementationUpdated(accountImplementation?: null): AccountImplementationUpdatedEventFilter; + "AccountOwnerAdded(address,address)"(account?: null, owner?: null): AccountOwnerAddedEventFilter; + AccountOwnerAdded(account?: null, owner?: null): AccountOwnerAddedEventFilter; + "AccountOwnerRemoved(address,address)"(account?: null, owner?: null): AccountOwnerRemovedEventFilter; + AccountOwnerRemoved(account?: null, owner?: null): AccountOwnerRemovedEventFilter; + "AccountRegistryUpdated(address)"(accountRegistry?: null): AccountRegistryUpdatedEventFilter; + AccountRegistryUpdated(accountRegistry?: null): AccountRegistryUpdatedEventFilter; + "AccountTransactionExecuted(address,address,uint256,bytes,bytes)"(account?: null, to?: null, value?: null, data?: null, response?: null): AccountTransactionExecutedEventFilter; + AccountTransactionExecuted(account?: null, to?: null, value?: null, data?: null, response?: null): AccountTransactionExecutedEventFilter; + "AccountUpgraded(address,address)"(account?: null, accountImplementation?: null): AccountUpgradedEventFilter; + AccountUpgraded(account?: null, accountImplementation?: null): AccountUpgradedEventFilter; + "GuardianAdded(address,address)"(sender?: null, guardian?: null): GuardianAddedEventFilter; + GuardianAdded(sender?: null, guardian?: null): GuardianAddedEventFilter; + "GuardianRemoved(address,address)"(sender?: null, guardian?: null): GuardianRemovedEventFilter; + GuardianRemoved(sender?: null, guardian?: null): GuardianRemovedEventFilter; + "Initialized(address)"(initializer?: null): InitializedEventFilter; + Initialized(initializer?: null): InitializedEventFilter; + }; + estimateGas: { + accountImplementation(overrides?: CallOverrides): Promise; + accountRegistry(overrides?: CallOverrides): Promise; + addAccountOwner(account: string, owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_false9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_true9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + computeAccountAddress(saltOwner: string, overrides?: CallOverrides): Promise; + deployAccount(account: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + executeAccountTransaction(account: string, to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + gateway(overrides?: CallOverrides): Promise; + initialize(guardians_: string[], accountImplementation_: string, gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isAccountDeployed(account: string, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + refundAccountCall(account: string, token: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeAccountOwner(account: string, owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + upgrade(accountImplementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + upgradeAccount(account: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyAccountOwner(account: string, owner: string, overrides?: CallOverrides): Promise; + verifyAccountOwnerAtBlock(account: string, owner: string, blockNumber: BigNumberish, overrides?: CallOverrides): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + }; + populateTransaction: { + accountImplementation(overrides?: CallOverrides): Promise; + accountRegistry(overrides?: CallOverrides): Promise; + addAccountOwner(account: string, owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + addGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + c_0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_false19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_false203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_false9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true0ffe16b4(c__0ffe16b4: BytesLike, overrides?: CallOverrides): Promise; + c_true19d98a43(c__19d98a43: BytesLike, overrides?: CallOverrides): Promise; + c_true203cf0ac(c__203cf0ac: BytesLike, overrides?: CallOverrides): Promise; + c_true9b6befd1(c__9b6befd1: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + computeAccountAddress(saltOwner: string, overrides?: CallOverrides): Promise; + deployAccount(account: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + executeAccountTransaction(account: string, to: string, value: BigNumberish, data: BytesLike, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + gateway(overrides?: CallOverrides): Promise; + initialize(guardians_: string[], accountImplementation_: string, gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isAccountDeployed(account: string, overrides?: CallOverrides): Promise; + isGuardian(guardian: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes,bytes)"(account: string, message: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + "isValidAccountSignature(address,bytes32,bytes)"(account: string, messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + refundAccountCall(account: string, token: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeAccountOwner(account: string, owner: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + removeGuardian(guardian: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + upgrade(accountImplementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + upgradeAccount(account: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + verifyAccountOwner(account: string, owner: string, overrides?: CallOverrides): Promise; + verifyAccountOwnerAtBlock(account: string, owner: string, blockNumber: BigNumberish, overrides?: CallOverrides): Promise; + verifyGuardianSignature(messageHash: BytesLike, signature: BytesLike, overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/PersonalAccountRegistry.js b/dist/typings/PersonalAccountRegistry.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/PersonalAccountRegistry.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/SignatureValidator.d.ts b/dist/typings/SignatureValidator.d.ts new file mode 100644 index 00000000..b54b7fb9 --- /dev/null +++ b/dist/typings/SignatureValidator.d.ts @@ -0,0 +1,65 @@ +import { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface SignatureValidatorInterface extends utils.Interface { + functions: { + "c_1b54acf3(bytes8)": FunctionFragment; + "c_false1b54acf3(bytes8)": FunctionFragment; + "c_true1b54acf3(bytes8)": FunctionFragment; + "chainId()": FunctionFragment; + }; + encodeFunctionData(functionFragment: "c_1b54acf3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false1b54acf3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true1b54acf3", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "chainId", values?: undefined): string; + decodeFunctionResult(functionFragment: "c_1b54acf3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false1b54acf3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true1b54acf3", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "chainId", data: BytesLike): Result; + events: {}; +} +export interface SignatureValidator extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: SignatureValidatorInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + chainId(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + callStatic: { + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + }; + filters: {}; + estimateGas: { + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + }; + populateTransaction: { + c_1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_false1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + c_true1b54acf3(c__1b54acf3: BytesLike, overrides?: CallOverrides): Promise; + chainId(overrides?: CallOverrides): Promise; + }; +} diff --git a/dist/typings/SignatureValidator.js b/dist/typings/SignatureValidator.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/SignatureValidator.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/WrappedWeiToken.d.ts b/dist/typings/WrappedWeiToken.d.ts new file mode 100644 index 00000000..04b517ba --- /dev/null +++ b/dist/typings/WrappedWeiToken.d.ts @@ -0,0 +1,431 @@ +import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PayableOverrides, PopulatedTransaction, Signer, utils } from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; +export interface WrappedWeiTokenInterface extends utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "c_230891fc(bytes8)": FunctionFragment; + "c_5838cc23(bytes8)": FunctionFragment; + "c_c0828b70(bytes8)": FunctionFragment; + "c_d5c463c2(bytes8)": FunctionFragment; + "c_false230891fc(bytes8)": FunctionFragment; + "c_false5838cc23(bytes8)": FunctionFragment; + "c_falsec0828b70(bytes8)": FunctionFragment; + "c_falsed5c463c2(bytes8)": FunctionFragment; + "c_true230891fc(bytes8)": FunctionFragment; + "c_true5838cc23(bytes8)": FunctionFragment; + "c_truec0828b70(bytes8)": FunctionFragment; + "c_trued5c463c2(bytes8)": FunctionFragment; + "decimals()": FunctionFragment; + "depositTo(address)": FunctionFragment; + "gateway()": FunctionFragment; + "initialize(address[],address)": FunctionFragment; + "isConsumer(address)": FunctionFragment; + "isInitialized()": FunctionFragment; + "name()": FunctionFragment; + "startConsuming()": FunctionFragment; + "stopConsuming()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "withdraw(uint256)": FunctionFragment; + "withdrawAll()": FunctionFragment; + "withdrawAllTo(address)": FunctionFragment; + "withdrawTo(address,uint256)": FunctionFragment; + }; + encodeFunctionData(functionFragment: "allowance", values: [string, string]): string; + encodeFunctionData(functionFragment: "approve", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "c_230891fc", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_5838cc23", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_c0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_d5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false230891fc", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_false5838cc23", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_falsed5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true230891fc", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_true5838cc23", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_truec0828b70", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "c_trued5c463c2", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "depositTo", values: [string]): string; + encodeFunctionData(functionFragment: "gateway", values?: undefined): string; + encodeFunctionData(functionFragment: "initialize", values: [string[], string]): string; + encodeFunctionData(functionFragment: "isConsumer", values: [string]): string; + encodeFunctionData(functionFragment: "isInitialized", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "startConsuming", values?: undefined): string; + encodeFunctionData(functionFragment: "stopConsuming", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData(functionFragment: "totalSupply", values?: undefined): string; + encodeFunctionData(functionFragment: "transfer", values: [string, BigNumberish]): string; + encodeFunctionData(functionFragment: "transferFrom", values: [string, string, BigNumberish]): string; + encodeFunctionData(functionFragment: "withdraw", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "withdrawAll", values?: undefined): string; + encodeFunctionData(functionFragment: "withdrawAllTo", values: [string]): string; + encodeFunctionData(functionFragment: "withdrawTo", values: [string, BigNumberish]): string; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_230891fc", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_5838cc23", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_c0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_d5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false230891fc", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_false5838cc23", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_falsed5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true230891fc", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_true5838cc23", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_truec0828b70", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "c_trued5c463c2", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "depositTo", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "gateway", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isConsumer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "isInitialized", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "startConsuming", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "stopConsuming", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "totalSupply", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdrawAll", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdrawAllTo", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "withdrawTo", data: BytesLike): Result; + events: { + "Approval(address,address,uint256)": EventFragment; + "ConsumerAdded(address)": EventFragment; + "ConsumerRemoved(address)": EventFragment; + "Initialized(address)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ConsumerAdded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ConsumerRemoved"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} +export declare type ApprovalEvent = TypedEvent<[ + string, + string, + BigNumber +], { + owner: string; + spender: string; + value: BigNumber; +}>; +export declare type ApprovalEventFilter = TypedEventFilter; +export declare type ConsumerAddedEvent = TypedEvent<[string], { + consumer: string; +}>; +export declare type ConsumerAddedEventFilter = TypedEventFilter; +export declare type ConsumerRemovedEvent = TypedEvent<[string], { + consumer: string; +}>; +export declare type ConsumerRemovedEventFilter = TypedEventFilter; +export declare type InitializedEvent = TypedEvent<[string], { + initializer: string; +}>; +export declare type InitializedEventFilter = TypedEventFilter; +export declare type TransferEvent = TypedEvent<[ + string, + string, + BigNumber +], { + from: string; + to: string; + value: BigNumber; +}>; +export declare type TransferEventFilter = TypedEventFilter; +export interface WrappedWeiToken extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + interface: WrappedWeiTokenInterface; + queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; + listeners(eventFilter?: TypedEventFilter): Array>; + listeners(eventName?: string): Array; + removeAllListeners(eventFilter: TypedEventFilter): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + functions: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise<[BigNumber]>; + approve(spender: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + c_230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[void]>; + c_false230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_false5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_true5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise<[boolean]>; + decimals(overrides?: CallOverrides): Promise<[number]>; + depositTo(to: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + gateway(overrides?: CallOverrides): Promise<[string]>; + initialize(consumers_: string[], gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isConsumer(consumer: string, overrides?: CallOverrides): Promise<[boolean]>; + isInitialized(overrides?: CallOverrides): Promise<[boolean]>; + name(overrides?: CallOverrides): Promise<[string]>; + startConsuming(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + stopConsuming(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + symbol(overrides?: CallOverrides): Promise<[string]>; + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + transfer(to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdraw(value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdrawAll(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdrawAllTo(to: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdrawTo(to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(owner: string, overrides?: CallOverrides): Promise; + c_230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise; + c_5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise; + c_false5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise; + c_true5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + depositTo(to: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + gateway(overrides?: CallOverrides): Promise; + initialize(consumers_: string[], gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isConsumer(consumer: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + startConsuming(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + stopConsuming(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdraw(value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdrawAll(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdrawAllTo(to: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdrawTo(to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + callStatic: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, value: BigNumberish, overrides?: CallOverrides): Promise; + balanceOf(owner: string, overrides?: CallOverrides): Promise; + c_230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise; + c_5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise; + c_false5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise; + c_true5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + depositTo(to: string, overrides?: CallOverrides): Promise; + gateway(overrides?: CallOverrides): Promise; + initialize(consumers_: string[], gateway_: string, overrides?: CallOverrides): Promise; + isConsumer(consumer: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + startConsuming(overrides?: CallOverrides): Promise; + stopConsuming(overrides?: CallOverrides): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, value: BigNumberish, overrides?: CallOverrides): Promise; + transferFrom(from: string, to: string, value: BigNumberish, overrides?: CallOverrides): Promise; + withdraw(value: BigNumberish, overrides?: CallOverrides): Promise; + withdrawAll(overrides?: CallOverrides): Promise; + withdrawAllTo(to: string, overrides?: CallOverrides): Promise; + withdrawTo(to: string, value: BigNumberish, overrides?: CallOverrides): Promise; + }; + filters: { + "Approval(address,address,uint256)"(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter; + Approval(owner?: string | null, spender?: string | null, value?: null): ApprovalEventFilter; + "ConsumerAdded(address)"(consumer?: null): ConsumerAddedEventFilter; + ConsumerAdded(consumer?: null): ConsumerAddedEventFilter; + "ConsumerRemoved(address)"(consumer?: null): ConsumerRemovedEventFilter; + ConsumerRemoved(consumer?: null): ConsumerRemovedEventFilter; + "Initialized(address)"(initializer?: null): InitializedEventFilter; + Initialized(initializer?: null): InitializedEventFilter; + "Transfer(address,address,uint256)"(from?: string | null, to?: string | null, value?: null): TransferEventFilter; + Transfer(from?: string | null, to?: string | null, value?: null): TransferEventFilter; + }; + estimateGas: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(owner: string, overrides?: CallOverrides): Promise; + c_230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise; + c_5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise; + c_false5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise; + c_true5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + depositTo(to: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + gateway(overrides?: CallOverrides): Promise; + initialize(consumers_: string[], gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isConsumer(consumer: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + startConsuming(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + stopConsuming(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdraw(value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdrawAll(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdrawAllTo(to: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdrawTo(to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; + populateTransaction: { + allowance(owner: string, spender: string, overrides?: CallOverrides): Promise; + approve(spender: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + balanceOf(owner: string, overrides?: CallOverrides): Promise; + c_230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise; + c_5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_c0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_d5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_false230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise; + c_false5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_falsec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_falsed5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + c_true230891fc(c__230891fc: BytesLike, overrides?: CallOverrides): Promise; + c_true5838cc23(c__5838cc23: BytesLike, overrides?: CallOverrides): Promise; + c_truec0828b70(c__c0828b70: BytesLike, overrides?: CallOverrides): Promise; + c_trued5c463c2(c__d5c463c2: BytesLike, overrides?: CallOverrides): Promise; + decimals(overrides?: CallOverrides): Promise; + depositTo(to: string, overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + gateway(overrides?: CallOverrides): Promise; + initialize(consumers_: string[], gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + isConsumer(consumer: string, overrides?: CallOverrides): Promise; + isInitialized(overrides?: CallOverrides): Promise; + name(overrides?: CallOverrides): Promise; + startConsuming(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + stopConsuming(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + symbol(overrides?: CallOverrides): Promise; + totalSupply(overrides?: CallOverrides): Promise; + transfer(to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + transferFrom(from: string, to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdraw(value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdrawAll(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdrawAllTo(to: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + withdrawTo(to: string, value: BigNumberish, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + }; +} diff --git a/dist/typings/WrappedWeiToken.js b/dist/typings/WrappedWeiToken.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/WrappedWeiToken.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/common.d.ts b/dist/typings/common.d.ts new file mode 100644 index 00000000..0bbb0e07 --- /dev/null +++ b/dist/typings/common.d.ts @@ -0,0 +1,21 @@ +import type { Listener } from "@ethersproject/providers"; +import type { Event, EventFilter } from "ethers"; +export interface TypedEvent = any, TArgsObject = any> extends Event { + args: TArgsArray & TArgsObject; +} +export interface TypedEventFilter<_TEvent extends TypedEvent> extends EventFilter { +} +export interface TypedListener { + (...listenerArg: [...__TypechainArgsArray, TEvent]): void; +} +declare type __TypechainArgsArray = T extends TypedEvent ? U : never; +export interface OnEvent { + (eventFilter: TypedEventFilter, listener: TypedListener): TRes; + (eventName: string, listener: Listener): TRes; +} +export declare type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; +export declare type GetContractTypeFromFactory = F extends MinEthersFactory ? C : never; +export declare type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never; +export {}; diff --git a/dist/typings/common.js b/dist/typings/common.js new file mode 100644 index 00000000..c8ad2e54 --- /dev/null +++ b/dist/typings/common.js @@ -0,0 +1,2 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/dist/typings/factories/AccountBase__factory.d.ts b/dist/typings/factories/AccountBase__factory.d.ts new file mode 100644 index 00000000..1420e746 --- /dev/null +++ b/dist/typings/factories/AccountBase__factory.d.ts @@ -0,0 +1,34 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { AccountBase, AccountBaseInterface } from "../AccountBase"; +declare type AccountBaseConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class AccountBase__factory extends ContractFactory { + constructor(...args: AccountBaseConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): AccountBase; + connect(signer: Signer): AccountBase__factory; + static readonly bytecode = "0x608060405234801561001057600080fd5b506101d2806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806334d23875146100515780637b103999146100b05780638f27e6b6146100e4578063b49762a11461012d575b600080fd5b6100986004803603602081101561006757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061018c565b60405180821515815260200191505060405180910390f35b6100b8610197565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61012b600480360360208110156100fa57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506101bb565b005b6101746004803603602081101561014357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506101be565b60405180821515815260200191505060405180910390f35b600060019050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b50565b600091905056fea164736f6c634300060c000a"; + static readonly abi: { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + }[]; + static createInterface(): AccountBaseInterface; + static connect(address: string, signerOrProvider: Signer | Provider): AccountBase; +} +export {}; diff --git a/dist/typings/factories/AccountBase__factory.js b/dist/typings/factories/AccountBase__factory.js new file mode 100644 index 00000000..5b078eda --- /dev/null +++ b/dist/typings/factories/AccountBase__factory.js @@ -0,0 +1,103 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AccountBase__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_305923d6", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_false305923d6", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_true305923d6", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "registry", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +const _bytecode = "0x608060405234801561001057600080fd5b506101d2806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806334d23875146100515780637b103999146100b05780638f27e6b6146100e4578063b49762a11461012d575b600080fd5b6100986004803603602081101561006757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061018c565b60405180821515815260200191505060405180910390f35b6100b8610197565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61012b600480360360208110156100fa57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506101bb565b005b6101746004803603602081101561014357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506101be565b60405180821515815260200191505060405180910390f35b600060019050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b50565b600091905056fea164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class AccountBase__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.AccountBase__factory = AccountBase__factory; +AccountBase__factory.bytecode = _bytecode; +AccountBase__factory.abi = _abi; diff --git a/dist/typings/factories/AccountControllerMock__factory.d.ts b/dist/typings/factories/AccountControllerMock__factory.d.ts new file mode 100644 index 00000000..8f3496ac --- /dev/null +++ b/dist/typings/factories/AccountControllerMock__factory.d.ts @@ -0,0 +1,58 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { AccountControllerMock, AccountControllerMockInterface } from "../AccountControllerMock"; +declare type AccountControllerMockConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class AccountControllerMock__factory extends ContractFactory { + constructor(...args: AccountControllerMockConstructorParams); + deploy(accountRegistry_: string, accountImplementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(accountRegistry_: string, accountImplementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): AccountControllerMock; + connect(signer: Signer): AccountControllerMock__factory; + static readonly bytecode = "0x60806040523480156200001157600080fd5b506040516200340738038062003407833981810160405260408110156200003757600080fd5b8101908080519060200190929190805190602001909291905050506200006e6716199243b9d4db2560c01b620000dc60201b60201c565b6200008a67c7ce2a36ea2465ae60c01b620000df60201b60201c565b620000a667aa64e4e7f212d56160c01b620000df60201b60201c565b620000c2678f74f0cdbde74bdf60c01b620000df60201b60201c565b620000d48282620000e260201b60201c565b5050620006c9565b50565b50565b620000fe6741fc0c62d014a3fe60c01b620000dc60201b60201c565b6200011a67dc028465461785ee60c01b620000dc60201b60201c565b62000136673f0b21804d61a81660c01b620000dc60201b60201c565b620001498260006200019860201b60201c565b6200016567f371f0641cafc6fc60c01b620000dc60201b60201c565b62000181675928ff3c537c054060c01b620000dc60201b60201c565b620001948160006200042f60201b60201c565b5050565b620001b4670870459f2167c8dd60c01b620000dc60201b60201c565b620001d067159ba22e371895b260c01b620000dc60201b60201c565b620001ec676a3b49e785b9a8bb60c01b620000dc60201b60201c565b6200020867a63d48928d370c9b60c01b620000dc60201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000290576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526035815260200180620033d26035913960400191505060405180910390fd5b620002ac67819fe19bb91397a160c01b620000dc60201b60201c565b620002c86704616cf5be820b7c60c01b620000dc60201b60201c565b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062000324678dd1e865a5f141ff60c01b620000dc60201b60201c565b620003406701616eb5f7d1ca9b60c01b620000dc60201b60201c565b80156200040e576200036367308412b87d226ceb60c01b620000dc60201b60201c565b6200037f67e53fecce275a7d6360c01b620000dc60201b60201c565b6200039b67ea9a81daefd74f9e60c01b620000dc60201b60201c565b7f02e3c47057b8dc27a0929d3c394c314c73aa002d46939c31c9f71d1e77e86c1060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a16200042b565b6200042a6786e883f2cdbdcb4760c01b620000dc60201b60201c565b5b5050565b6200044b67778d2c4844cb57c860c01b620000dc60201b60201c565b62000467672e46345dd30446f560c01b620000dc60201b60201c565b62000483674b01c1a412029cf960c01b620000dc60201b60201c565b6200049f67b5ba0ed84140968960c01b620000dc60201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000527576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018062003397603b913960400191505060405180910390fd5b620005436712934e542bfcaae260c01b620000dc60201b60201c565b6200055f676ab5a434897f3fa460c01b620000dc60201b60201c565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620005bc671440edfeaa98b7c160c01b620000dc60201b60201c565b620005d8671da8e35e0bfd87a360c01b620000dc60201b60201c565b8015620006a857620005fb67f166ead2d805373960c01b620000dc60201b60201c565b620006176738487a6c4bc99ca160c01b620000dc60201b60201c565b62000633677be1bddbe5c5292160c01b620000dc60201b60201c565b7f70d9f5a076620216a6050e493f3ce69749de0b68fa4b839ba2518660ba8b9cf0600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1620006c5565b620006c46777dc91dc63848bbe60c01b620000dc60201b60201c565b5b5050565b612cbe80620006d96000396000f3fe60806040523480156200001157600080fd5b5060043610620001005760003560e01c80635967b7ac1162000099578063d01a9cae116200006f578063d01a9cae1462000429578063d089e11a146200045a578063d53641231462000490578063e5c7278f14620004f25762000100565b80635967b7ac14620003345780636661a51e14620003965780637663f44c14620003dd5762000100565b8063264d5cb411620000db578063264d5cb414620001e45780633bdba7ef146200023f57806343013c24146200028b578063575e2c8d14620002d25762000100565b806309766da2146200010557806311464fbe146200014c5780631673f3b71462000182575b600080fd5b6200014a600480360360208110156200011d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050620005fd565b005b620001566200064f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b620001cc600480360360208110156200019a57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062000675565b60405180821515815260200191505060405180910390f35b6200021360048036036020811015620001fc57600080fd5b810190808035906020019092919050505062000680565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b62000289600480360360208110156200025757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050620006d6565b005b620002d060048036036020811015620002a357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050620006d9565b005b6200031c60048036036020811015620002ea57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506200072b565b60405180821515815260200191505060405180910390f35b6200037e600480360360208110156200034c57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062000732565b60405180821515815260200191505060405180910390f35b620003db60048036036020811015620003ae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062000739565b005b6200042760048036036020811015620003f557600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506200078b565b005b62000458600480360360208110156200044157600080fd5b81019080803590602001909291905050506200078e565b005b62000464620007e1565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b620004da60048036036020811015620004a857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062000805565b60405180821515815260200191505060405180910390f35b620005fb600480360360808110156200050a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156200057257600080fd5b8201836020820111156200058557600080fd5b80359060200191846001830284011164010000000083111715620005a857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505062000810565b005b62000613675c50e1104f7c324260c01b620006d6565b620006296709fae8244aeb582660c01b620006d6565b6200063f67b620c91c3e2f0fcc60c01b620006d6565b6200064c81600162000869565b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b60006200069867f64c9c754bee1c0e60c01b620006d6565b620006ae67a5e9c131e33036ad60c01b620006d6565b620006c46715c1ece7e76606fa60c01b620006d6565b620006cf8262000abb565b9050919050565b50565b620006ef67bcb085cb685f265b60c01b620006d6565b62000705677dcb20ad5f16715060c01b620006d6565b6200071b67091b0164433ae73760c01b620006d6565b6200072881600162000d4d565b50565b6000919050565b6000919050565b6200074f672f1a9eb1b20f8acf60c01b620006d6565b6200076567c7a0254b4fc2db8660c01b620006d6565b6200077b674a86f3235eb8361460c01b620006d6565b62000788816001620010da565b50565b50565b620007a4670772e9cb9485eb5460c01b620006d6565b620007ba67159f08d4ae7aa4d660c01b620006d6565b620007d0675771572aa2bb16ea60c01b620006d6565b620007dd81600162001329565b5050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b6200082667979d847e8d7cd0fa60c01b620006d6565b6200083c67f36a1a94dd92ba6b60c01b620006d6565b62000852670dae790f571ced0e60c01b620006d6565b6200086284848484600162001578565b5050505050565b6200087f67778d2c4844cb57c860c01b6200078b565b62000895672e46345dd30446f560c01b6200078b565b620008ab674b01c1a412029cf960c01b6200078b565b620008c167b5ba0ed84140968960c01b6200078b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000949576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018062002ba0603b913960400191505060405180910390fd5b6200095f6712934e542bfcaae260c01b6200078b565b62000975676ab5a434897f3fa460c01b6200078b565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620009cc671440edfeaa98b7c160c01b6200078b565b620009e2671da8e35e0bfd87a360c01b6200078b565b801562000aa057620009ff67f166ead2d805373960c01b6200078b565b62000a156738487a6c4bc99ca160c01b6200078b565b62000a2b677be1bddbe5c5292160c01b6200078b565b7f70d9f5a076620216a6050e493f3ce69749de0b68fa4b839ba2518660ba8b9cf0600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a162000ab7565b62000ab66777dc91dc63848bbe60c01b6200078b565b5b5050565b600062000ad36748cdc253ccc1e67560c01b6200078b565b62000ae96780d8fe77ddc420f260c01b6200078b565b62000aff67593ae66617589b4360c01b6200078b565b60606040518060200162000b139062001c5f565b6020820181038252601f19601f82011660405250600060a01b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060a01b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516020018086805190602001908083835b6020831062000bad578051825260208201915060208101905060208303925062000b88565b6001836020036101000a0380198251168184511680821785525050505050509050018573ffffffffffffffffffffffffffffffffffffffff19168152600c018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018373ffffffffffffffffffffffffffffffffffffffff19168152600c018273ffffffffffffffffffffffffffffffffffffffff1660601b815260140195505050505050604051602081830303815290604052905062000c75670748b7c1eb60cfe660c01b6200078b565b62000c8b678d27efcb42cc3e1360c01b6200078b565b600060ff60f81b3085848051906020012060405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018473ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200194505050505060405160208183030381529060405280519060200120905062000d2a67c4f8fa250f8a60ca60c01b6200078b565b62000d40672f91b1c834bef2d060c01b6200078b565b8060001c92505050919050565b62000d6367081823c987234e9d60c01b6200078b565b62000d796760c354164930797d60c01b6200078b565b62000d8f67accf73d6a8ae294e60c01b6200078b565b62000da567b19b8a65e686f89c60c01b6200078b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000e2557600080fd5b505afa15801562000e3a573d6000803e3d6000fd5b505050506040513d602081101562000e5157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16141562000ed1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018062002c5b602b913960400191505060405180910390fd5b62000ee7674a209ed55ed71bfa60c01b6200078b565b62000efc66e8f614a9f2909a60c01b6200078b565b62000f12673bd80329fed2f8e860c01b6200078b565b8173ffffffffffffffffffffffffffffffffffffffff1663d784d426600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801562000f9e57600080fd5b505af115801562000fb3573d6000803e3d6000fd5b5050505062000fcd67b46710374855f2fe60c01b6200078b565b62000fe367d4b3203fae218bc960c01b6200078b565b8015620010bf576200100067308bce54015cf44160c01b6200078b565b620010166757203c00802916d160c01b6200078b565b6200102c67fa0f90e590f54e6460c01b6200078b565b7feec27cdb8bd6f55c2c537deb52ab094a2437e85ef5197e6f064f90bff3ff563f82600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1620010d6565b620010d56793389340e33679c160c01b6200078b565b5b5050565b620010f0670870459f2167c8dd60c01b6200078b565b6200110667159ba22e371895b260c01b6200078b565b6200111c676a3b49e785b9a8bb60c01b6200078b565b6200113267a63d48928d370c9b60c01b6200078b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620011ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018062002c016035913960400191505060405180910390fd5b620011d067819fe19bb91397a160c01b6200078b565b620011e66704616cf5be820b7c60c01b6200078b565b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200123c678dd1e865a5f141ff60c01b6200078b565b620012526701616eb5f7d1ca9b60c01b6200078b565b80156200130e576200126f67308412b87d226ceb60c01b6200078b565b6200128567e53fecce275a7d6360c01b6200078b565b6200129b67ea9a81daefd74f9e60c01b6200078b565b7f02e3c47057b8dc27a0929d3c394c314c73aa002d46939c31c9f71d1e77e86c1060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a162001325565b620013246786e883f2cdbdcb4760c01b6200078b565b5b5050565b60006200134167c87ffb0412cac78260c01b6200078b565b6200135767a3cda0ec8e20174b60c01b6200078b565b6200136d6759407cee0be0ea2b60c01b6200078b565b60008360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051620013c29062001c5f565b808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff168152602001925050508190604051809103906000f590508015801562001420573d6000803e3d6000fd5b50905062001439678c20abd98a5c4f8a60c01b6200078b565b6200144f67a5694f9ca3e134a760c01b6200078b565b82156200152b576200146c67d9808b1bdccba98b60c01b6200078b565b62001482678562204049a5cf4760c01b6200078b565b6200149867f3f1d7e23629e16060c01b6200078b565b7f2682a218602b9036c9869f006c5405ee4a1a65267653eb7e286123e5e1afde4c81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a162001542565b62001541671671bc1ea802d86a60c01b6200078b565b5b6200155867add800985aa0244060c01b6200078b565b6200156e6723c279dc5d3430fd60c01b6200078b565b8091505092915050565b606062001590678d67538b3de9ea8660c01b6200078b565b620015a667bc1200b36b6e2d3c60c01b6200078b565b620015bc67c08742122c92f63360c01b6200078b565b620015d26768a892c68abc618c60c01b6200078b565b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156200165a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018062002c366025913960400191505060405180910390fd5b620016706746a5066e72f755d060c01b6200078b565b6200168667995fefea0bfe104660c01b6200078b565b6200169c67853adc48141afd7560c01b6200078b565b620016b267c99e3f9de858fe5760c01b6200078b565b3073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141562001739576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018062002c86602c913960400191505060405180910390fd5b6200174f673ed4d87e03ce069460c01b6200078b565b6200176567815137a12ebef0bf60c01b6200078b565b6200177b6733bcca643a99e8bd60c01b6200078b565b62001791675bddd7f4a96eae8760c01b6200078b565b8573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141562001818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018062002bdb6026913960400191505060405180910390fd5b6200182e672c537727fdea5c3460c01b6200078b565b6200184467140c547275665b9e60c01b6200078b565b6200185a6714a7aab557083ab060c01b6200078b565b60608673ffffffffffffffffffffffffffffffffffffffff16633f579f428787876040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015620018ee578082015181840152602081019050620018d1565b50505050905090810190601f1680156200191c5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156200193e57600080fd5b505af115801562001953573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156200197e57600080fd5b81019080805160405193929190846401000000008211156200199f57600080fd5b83820191506020820185811115620019b657600080fd5b8251866001820283011164010000000082111715620019d457600080fd5b8083526020830192505050908051906020019080838360005b8381101562001a0a578082015181840152602081019050620019ed565b50505050905090810190601f16801562001a385780820380516001836020036101000a031916815260200191505b50604052505050905062001a5767b9a8e776cf83f1c260c01b6200078b565b62001a6d67e7ceb79e5abc2c9160c01b6200078b565b821562001c0f5762001a8a67e14033206c8f1d6f60c01b6200078b565b62001aa067eb528105fe589a6760c01b6200078b565b62001ab6675a92b172873d9fd860c01b6200078b565b7f99eeae1fb8801e2e878e060ec5e5b3557b3c4f8106e35d88cb573f293dae4e248787878785604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101562001b6057808201518184015260208101905062001b43565b50505050905090810190601f16801562001b8e5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b8381101562001bc957808201518184015260208101905062001bac565b50505050905090810190601f16801562001bf75780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a162001c26565b62001c2567ad2a18c0580626ae60c01b6200078b565b5b62001c3c673b173602e1a7471660c01b6200078b565b62001c5267ca5084af2c310ee960c01b6200078b565b8091505095945050505050565b610f328062001c6e8339019056fe608060405234801561001057600080fd5b50604051610f32380380610f328339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050610068679894797dc84081af60c01b61019960201b60201c565b610082674e0f327275f95bf160c01b61019960201b60201c565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506100dc6794e469383b340c9160c01b61019c60201b60201c565b6100f66786f2a31597afd57a60c01b61019c60201b60201c565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101516788e2a6c2eb66825d60c01b61019c60201b60201c565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505061019f565b50565b50565b610d84806101ae6000396000f3fe6080604052600436106100e15760003560e01c80637b1039991161007f578063b49762a111610059578063b49762a114610664578063d784d426146106d0578063dd54622814610721578063f77c479114610777576100e8565b80637b103999146105775780638f27e6b6146105b8578063abe124f61461060e576100e8565b806334d23875116100bb57806334d23875146103355780633f579f42146103a15780635c60da1b146104ca5780636480a27b1461050b576100e8565b8063062e4f9c146101f15780631454d4701461025d5780632486e26f146102c9576100e8565b366100e857005b3480156100f457600080fd5b5061010967267be5c007ba493660c01b6107b8565b61011d67c98405188afd4dab60c01b6107b8565b610131676a933c5d83132d2460c01b6107b8565b600080369050146101db5761015067b3d07c93e15dcc6960c01b6107b8565b610164670848f5b7587f259a60c01b6107b8565b610178677607056d4b83e95960c01b6107b8565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506101b367b7ff281b6713313460c01b6107b8565b368060008037600080826000855af43d806000803e81600081146101d657816000f35b816000fd5b6101ef6707d26d689f0268c060c01b6107b8565b005b3480156101fd57600080fd5b506102456004803603602081101561021457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107bb565b60405180821515815260200191505060405180910390f35b34801561026957600080fd5b506102b16004803603602081101561028057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107c2565b60405180821515815260200191505060405180910390f35b3480156102d557600080fd5b5061031d600480360360208110156102ec57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107c9565b60405180821515815260200191505060405180910390f35b34801561034157600080fd5b506103896004803603602081101561035857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107d4565b60405180821515815260200191505060405180910390f35b3480156103ad57600080fd5b5061044f600480360360608110156103c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561040b57600080fd5b82018360208201111561041d57600080fd5b8035906020019184600183028401116401000000008311171561043f57600080fd5b90919293919293905050506107df565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561048f578082015181840152602081019050610474565b50505050905090810190601f1680156104bc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104d657600080fd5b506104df610b13565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561051757600080fd5b5061055f6004803603602081101561052e57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b39565b60405180821515815260200191505060405180910390f35b34801561058357600080fd5b5061058c610b44565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105c457600080fd5b5061060c600480360360208110156105db57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b6a565b005b34801561061a57600080fd5b506106626004803603602081101561063157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b6d565b005b34801561067057600080fd5b506106b86004803603602081101561068757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b70565b60405180821515815260200191505060405180910390f35b3480156106dc57600080fd5b5061071f600480360360208110156106f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b77565b005b34801561072d57600080fd5b506107756004803603602081101561074457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107b8565b005b34801561078357600080fd5b5061078c610d27565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b50565b6000919050565b6000919050565b600060019050919050565b600060019050919050565b60606107f5675aa5d179f54cb87d60c01b6107b8565b61080967a226552386468aff60c01b610b6d565b61081d67bb06267d15cafc8560c01b610b6d565b61083167d0eb72184d8e714c60c01b610b6d565b61084567f128b7cf1088330a60c01b610b6d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610d4c602c913960400191505060405180910390fd5b6108fd6787dbbb5ffe0583c160c01b610b6d565b61091167f3741b7d431227a560c01b610b6d565b6109256737f078ab60df830760c01b6107b8565b61093967e4de2ba80b3b44d560c01b6107b8565b61094d675abe6251e319bc7c60c01b6107b8565b6109616726cc190ece09b7db60c01b6107b8565b6060610977676002c94a45713e1f60c01b6107b8565b61098b678d82d94b1795aafc60c01b6107b8565b60006109a167df08c3b5e2fa54f560c01b6107b8565b8673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d8060008114610a0d576040519150601f19603f3d011682016040523d82523d6000602084013e610a12565b606091505b508093508192505050610a2f67f28a312aa9cfaa7160c01b6107b8565b610a4367162325a0fb69618f60c01b6107b8565b610a576711f6077f17c7465a60c01b6107b8565b80610aca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b610ade6780640c61604c38b060c01b6107b8565b610af267157aa11e3950a2a260c01b6107b8565b610b06671a32fc353aeb8d2f60c01b6107b8565b8192505050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b50565b50565b6000919050565b610b8b67c3094137b7a928f360c01b6107b8565b610b9f67a226552386468aff60c01b610b6d565b610bb367bb06267d15cafc8560c01b610b6d565b610bc767d0eb72184d8e714c60c01b610b6d565b610bdb67f128b7cf1088330a60c01b610b6d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610d4c602c913960400191505060405180910390fd5b610c936787dbbb5ffe0583c160c01b610b6d565b610ca767f3741b7d431227a560c01b610b6d565b610cbb6710c6caed8159651f60c01b6107b8565b610ccf67ac6d8f9c43d3285d60c01b6107b8565b610ce3679d4a82d94581f52860c01b6107b8565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a4163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420496d706c656d656e746174696f6e20746f203078304163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f2073656c664163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420726567697374727920746f203078304163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f203078304163636f756e74436f6e74726f6c6c65723a206163636f756e7420616c72656164792075706772616465644163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f20636f6e74726f6c6c6572a164736f6c634300060c000a4163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420496d706c656d656e746174696f6e20746f203078304163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420726567697374727920746f20307830"; + static readonly abi: ({ + inputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): AccountControllerMockInterface; + static connect(address: string, signerOrProvider: Signer | Provider): AccountControllerMock; +} +export {}; diff --git a/dist/typings/factories/AccountControllerMock__factory.js b/dist/typings/factories/AccountControllerMock__factory.js new file mode 100644 index 00000000..d9716e2e --- /dev/null +++ b/dist/typings/factories/AccountControllerMock__factory.js @@ -0,0 +1,383 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AccountControllerMock__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "accountRegistry_", + type: "address", + }, + { + internalType: "address", + name: "accountImplementation_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "accountImplementation", + type: "address", + }, + ], + name: "AccountDeployed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "accountImplementation", + type: "address", + }, + ], + name: "AccountImplementationUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "accountRegistry", + type: "address", + }, + ], + name: "AccountRegistryUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "bytes", + name: "response", + type: "bytes", + }, + ], + name: "AccountTransactionExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "accountImplementation", + type: "address", + }, + ], + name: "AccountUpgraded", + type: "event", + }, + { + inputs: [], + name: "accountImplementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "accountRegistry", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__19d98a43", + type: "bytes8", + }, + ], + name: "c_19d98a43", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__9c0e30ce", + type: "bytes8", + }, + ], + name: "c_9c0e30ce", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__19d98a43", + type: "bytes8", + }, + ], + name: "c_false19d98a43", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__9c0e30ce", + type: "bytes8", + }, + ], + name: "c_false9c0e30ce", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__19d98a43", + type: "bytes8", + }, + ], + name: "c_true19d98a43", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__9c0e30ce", + type: "bytes8", + }, + ], + name: "c_true9c0e30ce", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + ], + name: "computeAccountAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + ], + name: "deployAccount", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeAccountTransaction", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "accountImplementation_", + type: "address", + }, + ], + name: "setAccountImplementation", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "accountRegistry_", + type: "address", + }, + ], + name: "setAccountRegistry", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "upgradeAccount", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; +const _bytecode = "0x60806040523480156200001157600080fd5b506040516200340738038062003407833981810160405260408110156200003757600080fd5b8101908080519060200190929190805190602001909291905050506200006e6716199243b9d4db2560c01b620000dc60201b60201c565b6200008a67c7ce2a36ea2465ae60c01b620000df60201b60201c565b620000a667aa64e4e7f212d56160c01b620000df60201b60201c565b620000c2678f74f0cdbde74bdf60c01b620000df60201b60201c565b620000d48282620000e260201b60201c565b5050620006c9565b50565b50565b620000fe6741fc0c62d014a3fe60c01b620000dc60201b60201c565b6200011a67dc028465461785ee60c01b620000dc60201b60201c565b62000136673f0b21804d61a81660c01b620000dc60201b60201c565b620001498260006200019860201b60201c565b6200016567f371f0641cafc6fc60c01b620000dc60201b60201c565b62000181675928ff3c537c054060c01b620000dc60201b60201c565b620001948160006200042f60201b60201c565b5050565b620001b4670870459f2167c8dd60c01b620000dc60201b60201c565b620001d067159ba22e371895b260c01b620000dc60201b60201c565b620001ec676a3b49e785b9a8bb60c01b620000dc60201b60201c565b6200020867a63d48928d370c9b60c01b620000dc60201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000290576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526035815260200180620033d26035913960400191505060405180910390fd5b620002ac67819fe19bb91397a160c01b620000dc60201b60201c565b620002c86704616cf5be820b7c60c01b620000dc60201b60201c565b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062000324678dd1e865a5f141ff60c01b620000dc60201b60201c565b620003406701616eb5f7d1ca9b60c01b620000dc60201b60201c565b80156200040e576200036367308412b87d226ceb60c01b620000dc60201b60201c565b6200037f67e53fecce275a7d6360c01b620000dc60201b60201c565b6200039b67ea9a81daefd74f9e60c01b620000dc60201b60201c565b7f02e3c47057b8dc27a0929d3c394c314c73aa002d46939c31c9f71d1e77e86c1060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a16200042b565b6200042a6786e883f2cdbdcb4760c01b620000dc60201b60201c565b5b5050565b6200044b67778d2c4844cb57c860c01b620000dc60201b60201c565b62000467672e46345dd30446f560c01b620000dc60201b60201c565b62000483674b01c1a412029cf960c01b620000dc60201b60201c565b6200049f67b5ba0ed84140968960c01b620000dc60201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000527576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018062003397603b913960400191505060405180910390fd5b620005436712934e542bfcaae260c01b620000dc60201b60201c565b6200055f676ab5a434897f3fa460c01b620000dc60201b60201c565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620005bc671440edfeaa98b7c160c01b620000dc60201b60201c565b620005d8671da8e35e0bfd87a360c01b620000dc60201b60201c565b8015620006a857620005fb67f166ead2d805373960c01b620000dc60201b60201c565b620006176738487a6c4bc99ca160c01b620000dc60201b60201c565b62000633677be1bddbe5c5292160c01b620000dc60201b60201c565b7f70d9f5a076620216a6050e493f3ce69749de0b68fa4b839ba2518660ba8b9cf0600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1620006c5565b620006c46777dc91dc63848bbe60c01b620000dc60201b60201c565b5b5050565b612cbe80620006d96000396000f3fe60806040523480156200001157600080fd5b5060043610620001005760003560e01c80635967b7ac1162000099578063d01a9cae116200006f578063d01a9cae1462000429578063d089e11a146200045a578063d53641231462000490578063e5c7278f14620004f25762000100565b80635967b7ac14620003345780636661a51e14620003965780637663f44c14620003dd5762000100565b8063264d5cb411620000db578063264d5cb414620001e45780633bdba7ef146200023f57806343013c24146200028b578063575e2c8d14620002d25762000100565b806309766da2146200010557806311464fbe146200014c5780631673f3b71462000182575b600080fd5b6200014a600480360360208110156200011d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050620005fd565b005b620001566200064f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b620001cc600480360360208110156200019a57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062000675565b60405180821515815260200191505060405180910390f35b6200021360048036036020811015620001fc57600080fd5b810190808035906020019092919050505062000680565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b62000289600480360360208110156200025757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050620006d6565b005b620002d060048036036020811015620002a357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050620006d9565b005b6200031c60048036036020811015620002ea57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506200072b565b60405180821515815260200191505060405180910390f35b6200037e600480360360208110156200034c57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062000732565b60405180821515815260200191505060405180910390f35b620003db60048036036020811015620003ae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062000739565b005b6200042760048036036020811015620003f557600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506200078b565b005b62000458600480360360208110156200044157600080fd5b81019080803590602001909291905050506200078e565b005b62000464620007e1565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b620004da60048036036020811015620004a857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062000805565b60405180821515815260200191505060405180910390f35b620005fb600480360360808110156200050a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156200057257600080fd5b8201836020820111156200058557600080fd5b80359060200191846001830284011164010000000083111715620005a857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929050505062000810565b005b62000613675c50e1104f7c324260c01b620006d6565b620006296709fae8244aeb582660c01b620006d6565b6200063f67b620c91c3e2f0fcc60c01b620006d6565b6200064c81600162000869565b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b60006200069867f64c9c754bee1c0e60c01b620006d6565b620006ae67a5e9c131e33036ad60c01b620006d6565b620006c46715c1ece7e76606fa60c01b620006d6565b620006cf8262000abb565b9050919050565b50565b620006ef67bcb085cb685f265b60c01b620006d6565b62000705677dcb20ad5f16715060c01b620006d6565b6200071b67091b0164433ae73760c01b620006d6565b6200072881600162000d4d565b50565b6000919050565b6000919050565b6200074f672f1a9eb1b20f8acf60c01b620006d6565b6200076567c7a0254b4fc2db8660c01b620006d6565b6200077b674a86f3235eb8361460c01b620006d6565b62000788816001620010da565b50565b50565b620007a4670772e9cb9485eb5460c01b620006d6565b620007ba67159f08d4ae7aa4d660c01b620006d6565b620007d0675771572aa2bb16ea60c01b620006d6565b620007dd81600162001329565b5050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b6200082667979d847e8d7cd0fa60c01b620006d6565b6200083c67f36a1a94dd92ba6b60c01b620006d6565b62000852670dae790f571ced0e60c01b620006d6565b6200086284848484600162001578565b5050505050565b6200087f67778d2c4844cb57c860c01b6200078b565b62000895672e46345dd30446f560c01b6200078b565b620008ab674b01c1a412029cf960c01b6200078b565b620008c167b5ba0ed84140968960c01b6200078b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000949576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018062002ba0603b913960400191505060405180910390fd5b6200095f6712934e542bfcaae260c01b6200078b565b62000975676ab5a434897f3fa460c01b6200078b565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620009cc671440edfeaa98b7c160c01b6200078b565b620009e2671da8e35e0bfd87a360c01b6200078b565b801562000aa057620009ff67f166ead2d805373960c01b6200078b565b62000a156738487a6c4bc99ca160c01b6200078b565b62000a2b677be1bddbe5c5292160c01b6200078b565b7f70d9f5a076620216a6050e493f3ce69749de0b68fa4b839ba2518660ba8b9cf0600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a162000ab7565b62000ab66777dc91dc63848bbe60c01b6200078b565b5b5050565b600062000ad36748cdc253ccc1e67560c01b6200078b565b62000ae96780d8fe77ddc420f260c01b6200078b565b62000aff67593ae66617589b4360c01b6200078b565b60606040518060200162000b139062001c5f565b6020820181038252601f19601f82011660405250600060a01b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060a01b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516020018086805190602001908083835b6020831062000bad578051825260208201915060208101905060208303925062000b88565b6001836020036101000a0380198251168184511680821785525050505050509050018573ffffffffffffffffffffffffffffffffffffffff19168152600c018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018373ffffffffffffffffffffffffffffffffffffffff19168152600c018273ffffffffffffffffffffffffffffffffffffffff1660601b815260140195505050505050604051602081830303815290604052905062000c75670748b7c1eb60cfe660c01b6200078b565b62000c8b678d27efcb42cc3e1360c01b6200078b565b600060ff60f81b3085848051906020012060405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018473ffffffffffffffffffffffffffffffffffffffff1660601b815260140183815260200182815260200194505050505060405160208183030381529060405280519060200120905062000d2a67c4f8fa250f8a60ca60c01b6200078b565b62000d40672f91b1c834bef2d060c01b6200078b565b8060001c92505050919050565b62000d6367081823c987234e9d60c01b6200078b565b62000d796760c354164930797d60c01b6200078b565b62000d8f67accf73d6a8ae294e60c01b6200078b565b62000da567b19b8a65e686f89c60c01b6200078b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000e2557600080fd5b505afa15801562000e3a573d6000803e3d6000fd5b505050506040513d602081101562000e5157600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff16141562000ed1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018062002c5b602b913960400191505060405180910390fd5b62000ee7674a209ed55ed71bfa60c01b6200078b565b62000efc66e8f614a9f2909a60c01b6200078b565b62000f12673bd80329fed2f8e860c01b6200078b565b8173ffffffffffffffffffffffffffffffffffffffff1663d784d426600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801562000f9e57600080fd5b505af115801562000fb3573d6000803e3d6000fd5b5050505062000fcd67b46710374855f2fe60c01b6200078b565b62000fe367d4b3203fae218bc960c01b6200078b565b8015620010bf576200100067308bce54015cf44160c01b6200078b565b620010166757203c00802916d160c01b6200078b565b6200102c67fa0f90e590f54e6460c01b6200078b565b7feec27cdb8bd6f55c2c537deb52ab094a2437e85ef5197e6f064f90bff3ff563f82600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1620010d6565b620010d56793389340e33679c160c01b6200078b565b5b5050565b620010f0670870459f2167c8dd60c01b6200078b565b6200110667159ba22e371895b260c01b6200078b565b6200111c676a3b49e785b9a8bb60c01b6200078b565b6200113267a63d48928d370c9b60c01b6200078b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620011ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018062002c016035913960400191505060405180910390fd5b620011d067819fe19bb91397a160c01b6200078b565b620011e66704616cf5be820b7c60c01b6200078b565b816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506200123c678dd1e865a5f141ff60c01b6200078b565b620012526701616eb5f7d1ca9b60c01b6200078b565b80156200130e576200126f67308412b87d226ceb60c01b6200078b565b6200128567e53fecce275a7d6360c01b6200078b565b6200129b67ea9a81daefd74f9e60c01b6200078b565b7f02e3c47057b8dc27a0929d3c394c314c73aa002d46939c31c9f71d1e77e86c1060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a162001325565b620013246786e883f2cdbdcb4760c01b6200078b565b5b5050565b60006200134167c87ffb0412cac78260c01b6200078b565b6200135767a3cda0ec8e20174b60c01b6200078b565b6200136d6759407cee0be0ea2b60c01b6200078b565b60008360008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051620013c29062001c5f565b808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff168152602001925050508190604051809103906000f590508015801562001420573d6000803e3d6000fd5b50905062001439678c20abd98a5c4f8a60c01b6200078b565b6200144f67a5694f9ca3e134a760c01b6200078b565b82156200152b576200146c67d9808b1bdccba98b60c01b6200078b565b62001482678562204049a5cf4760c01b6200078b565b6200149867f3f1d7e23629e16060c01b6200078b565b7f2682a218602b9036c9869f006c5405ee4a1a65267653eb7e286123e5e1afde4c81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a162001542565b62001541671671bc1ea802d86a60c01b6200078b565b5b6200155867add800985aa0244060c01b6200078b565b6200156e6723c279dc5d3430fd60c01b6200078b565b8091505092915050565b606062001590678d67538b3de9ea8660c01b6200078b565b620015a667bc1200b36b6e2d3c60c01b6200078b565b620015bc67c08742122c92f63360c01b6200078b565b620015d26768a892c68abc618c60c01b6200078b565b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156200165a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018062002c366025913960400191505060405180910390fd5b620016706746a5066e72f755d060c01b6200078b565b6200168667995fefea0bfe104660c01b6200078b565b6200169c67853adc48141afd7560c01b6200078b565b620016b267c99e3f9de858fe5760c01b6200078b565b3073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141562001739576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018062002c86602c913960400191505060405180910390fd5b6200174f673ed4d87e03ce069460c01b6200078b565b6200176567815137a12ebef0bf60c01b6200078b565b6200177b6733bcca643a99e8bd60c01b6200078b565b62001791675bddd7f4a96eae8760c01b6200078b565b8573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141562001818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018062002bdb6026913960400191505060405180910390fd5b6200182e672c537727fdea5c3460c01b6200078b565b6200184467140c547275665b9e60c01b6200078b565b6200185a6714a7aab557083ab060c01b6200078b565b60608673ffffffffffffffffffffffffffffffffffffffff16633f579f428787876040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015620018ee578082015181840152602081019050620018d1565b50505050905090810190601f1680156200191c5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b1580156200193e57600080fd5b505af115801562001953573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525060208110156200197e57600080fd5b81019080805160405193929190846401000000008211156200199f57600080fd5b83820191506020820185811115620019b657600080fd5b8251866001820283011164010000000082111715620019d457600080fd5b8083526020830192505050908051906020019080838360005b8381101562001a0a578082015181840152602081019050620019ed565b50505050905090810190601f16801562001a385780820380516001836020036101000a031916815260200191505b50604052505050905062001a5767b9a8e776cf83f1c260c01b6200078b565b62001a6d67e7ceb79e5abc2c9160c01b6200078b565b821562001c0f5762001a8a67e14033206c8f1d6f60c01b6200078b565b62001aa067eb528105fe589a6760c01b6200078b565b62001ab6675a92b172873d9fd860c01b6200078b565b7f99eeae1fb8801e2e878e060ec5e5b3557b3c4f8106e35d88cb573f293dae4e248787878785604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101562001b6057808201518184015260208101905062001b43565b50505050905090810190601f16801562001b8e5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b8381101562001bc957808201518184015260208101905062001bac565b50505050905090810190601f16801562001bf75780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a162001c26565b62001c2567ad2a18c0580626ae60c01b6200078b565b5b62001c3c673b173602e1a7471660c01b6200078b565b62001c5267ca5084af2c310ee960c01b6200078b565b8091505095945050505050565b610f328062001c6e8339019056fe608060405234801561001057600080fd5b50604051610f32380380610f328339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050610068679894797dc84081af60c01b61019960201b60201c565b610082674e0f327275f95bf160c01b61019960201b60201c565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506100dc6794e469383b340c9160c01b61019c60201b60201c565b6100f66786f2a31597afd57a60c01b61019c60201b60201c565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101516788e2a6c2eb66825d60c01b61019c60201b60201c565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505061019f565b50565b50565b610d84806101ae6000396000f3fe6080604052600436106100e15760003560e01c80637b1039991161007f578063b49762a111610059578063b49762a114610664578063d784d426146106d0578063dd54622814610721578063f77c479114610777576100e8565b80637b103999146105775780638f27e6b6146105b8578063abe124f61461060e576100e8565b806334d23875116100bb57806334d23875146103355780633f579f42146103a15780635c60da1b146104ca5780636480a27b1461050b576100e8565b8063062e4f9c146101f15780631454d4701461025d5780632486e26f146102c9576100e8565b366100e857005b3480156100f457600080fd5b5061010967267be5c007ba493660c01b6107b8565b61011d67c98405188afd4dab60c01b6107b8565b610131676a933c5d83132d2460c01b6107b8565b600080369050146101db5761015067b3d07c93e15dcc6960c01b6107b8565b610164670848f5b7587f259a60c01b6107b8565b610178677607056d4b83e95960c01b6107b8565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506101b367b7ff281b6713313460c01b6107b8565b368060008037600080826000855af43d806000803e81600081146101d657816000f35b816000fd5b6101ef6707d26d689f0268c060c01b6107b8565b005b3480156101fd57600080fd5b506102456004803603602081101561021457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107bb565b60405180821515815260200191505060405180910390f35b34801561026957600080fd5b506102b16004803603602081101561028057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107c2565b60405180821515815260200191505060405180910390f35b3480156102d557600080fd5b5061031d600480360360208110156102ec57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107c9565b60405180821515815260200191505060405180910390f35b34801561034157600080fd5b506103896004803603602081101561035857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107d4565b60405180821515815260200191505060405180910390f35b3480156103ad57600080fd5b5061044f600480360360608110156103c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561040b57600080fd5b82018360208201111561041d57600080fd5b8035906020019184600183028401116401000000008311171561043f57600080fd5b90919293919293905050506107df565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561048f578082015181840152602081019050610474565b50505050905090810190601f1680156104bc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104d657600080fd5b506104df610b13565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561051757600080fd5b5061055f6004803603602081101561052e57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b39565b60405180821515815260200191505060405180910390f35b34801561058357600080fd5b5061058c610b44565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105c457600080fd5b5061060c600480360360208110156105db57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b6a565b005b34801561061a57600080fd5b506106626004803603602081101561063157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b6d565b005b34801561067057600080fd5b506106b86004803603602081101561068757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b70565b60405180821515815260200191505060405180910390f35b3480156106dc57600080fd5b5061071f600480360360208110156106f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b77565b005b34801561072d57600080fd5b506107756004803603602081101561074457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107b8565b005b34801561078357600080fd5b5061078c610d27565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b50565b6000919050565b6000919050565b600060019050919050565b600060019050919050565b60606107f5675aa5d179f54cb87d60c01b6107b8565b61080967a226552386468aff60c01b610b6d565b61081d67bb06267d15cafc8560c01b610b6d565b61083167d0eb72184d8e714c60c01b610b6d565b61084567f128b7cf1088330a60c01b610b6d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610d4c602c913960400191505060405180910390fd5b6108fd6787dbbb5ffe0583c160c01b610b6d565b61091167f3741b7d431227a560c01b610b6d565b6109256737f078ab60df830760c01b6107b8565b61093967e4de2ba80b3b44d560c01b6107b8565b61094d675abe6251e319bc7c60c01b6107b8565b6109616726cc190ece09b7db60c01b6107b8565b6060610977676002c94a45713e1f60c01b6107b8565b61098b678d82d94b1795aafc60c01b6107b8565b60006109a167df08c3b5e2fa54f560c01b6107b8565b8673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d8060008114610a0d576040519150601f19603f3d011682016040523d82523d6000602084013e610a12565b606091505b508093508192505050610a2f67f28a312aa9cfaa7160c01b6107b8565b610a4367162325a0fb69618f60c01b6107b8565b610a576711f6077f17c7465a60c01b6107b8565b80610aca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b610ade6780640c61604c38b060c01b6107b8565b610af267157aa11e3950a2a260c01b6107b8565b610b06671a32fc353aeb8d2f60c01b6107b8565b8192505050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b50565b50565b6000919050565b610b8b67c3094137b7a928f360c01b6107b8565b610b9f67a226552386468aff60c01b610b6d565b610bb367bb06267d15cafc8560c01b610b6d565b610bc767d0eb72184d8e714c60c01b610b6d565b610bdb67f128b7cf1088330a60c01b610b6d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610d4c602c913960400191505060405180910390fd5b610c936787dbbb5ffe0583c160c01b610b6d565b610ca767f3741b7d431227a560c01b610b6d565b610cbb6710c6caed8159651f60c01b6107b8565b610ccf67ac6d8f9c43d3285d60c01b6107b8565b610ce3679d4a82d94581f52860c01b6107b8565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a4163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420496d706c656d656e746174696f6e20746f203078304163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f2073656c664163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420726567697374727920746f203078304163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f203078304163636f756e74436f6e74726f6c6c65723a206163636f756e7420616c72656164792075706772616465644163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f20636f6e74726f6c6c6572a164736f6c634300060c000a4163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420496d706c656d656e746174696f6e20746f203078304163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420726567697374727920746f20307830"; +const isSuperArgs = (xs) => xs.length > 1; +class AccountControllerMock__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(accountRegistry_, accountImplementation_, overrides) { + return super.deploy(accountRegistry_, accountImplementation_, overrides || {}); + } + getDeployTransaction(accountRegistry_, accountImplementation_, overrides) { + return super.getDeployTransaction(accountRegistry_, accountImplementation_, overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.AccountControllerMock__factory = AccountControllerMock__factory; +AccountControllerMock__factory.bytecode = _bytecode; +AccountControllerMock__factory.abi = _abi; diff --git a/dist/typings/factories/AccountController__factory.d.ts b/dist/typings/factories/AccountController__factory.d.ts new file mode 100644 index 00000000..b35a6761 --- /dev/null +++ b/dist/typings/factories/AccountController__factory.d.ts @@ -0,0 +1,35 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { AccountController, AccountControllerInterface } from "../AccountController"; +export declare class AccountController__factory { + static readonly abi: ({ + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + outputs?: undefined; + stateMutability?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): AccountControllerInterface; + static connect(address: string, signerOrProvider: Signer | Provider): AccountController; +} diff --git a/dist/typings/factories/AccountController__factory.js b/dist/typings/factories/AccountController__factory.js new file mode 100644 index 00000000..58e57f0b --- /dev/null +++ b/dist/typings/factories/AccountController__factory.js @@ -0,0 +1,194 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AccountController__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "accountImplementation", + type: "address", + }, + ], + name: "AccountDeployed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "accountImplementation", + type: "address", + }, + ], + name: "AccountImplementationUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "accountRegistry", + type: "address", + }, + ], + name: "AccountRegistryUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "bytes", + name: "response", + type: "bytes", + }, + ], + name: "AccountTransactionExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "accountImplementation", + type: "address", + }, + ], + name: "AccountUpgraded", + type: "event", + }, + { + inputs: [], + name: "accountImplementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "accountRegistry", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__19d98a43", + type: "bytes8", + }, + ], + name: "c_19d98a43", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__19d98a43", + type: "bytes8", + }, + ], + name: "c_false19d98a43", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__19d98a43", + type: "bytes8", + }, + ], + name: "c_true19d98a43", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, +]; +class AccountController__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.AccountController__factory = AccountController__factory; +AccountController__factory.abi = _abi; diff --git a/dist/typings/factories/AccountImplementationV1Mock__factory.d.ts b/dist/typings/factories/AccountImplementationV1Mock__factory.d.ts new file mode 100644 index 00000000..5bc44ff5 --- /dev/null +++ b/dist/typings/factories/AccountImplementationV1Mock__factory.d.ts @@ -0,0 +1,58 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { AccountImplementationV1Mock, AccountImplementationV1MockInterface } from "../AccountImplementationV1Mock"; +declare type AccountImplementationV1MockConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class AccountImplementationV1Mock__factory extends ContractFactory { + constructor(...args: AccountImplementationV1MockConstructorParams); + deploy(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(registry_: string, overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): AccountImplementationV1Mock; + connect(signer: Signer): AccountImplementationV1Mock__factory; + static readonly bytecode = "0x60806040523480156200001157600080fd5b50604051620016b4380380620016b4833981810160405260208110156200003757600080fd5b810190808051906020019092919050505062000064675e592fe27197979c60c01b6200015c60201b60201c565b6200008067eca2e4778f3efef360c01b6200015c60201b60201c565b326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000dc6709bbddebe144bcac60c01b6200015f60201b60201c565b620000f8676ade43bdb8e559bf60c01b6200016260201b60201c565b620001146721a8bb2f8620330d60c01b6200016260201b60201c565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505062000165565b50565b50565b50565b61153f80620001756000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c8063392e53cd116100b85780638f27e6b61161007c5780638f27e6b6146108a2578063b49762a1146108eb578063c4d66de81461094a578063ef1ea9581461098e578063f23a6e61146109d7578063fdec3f2914610ad757610136565b8063392e53cd1461073157806345ebf7af1461075157806377dbbbcf146107b05780637b1039991461080f5780638c0b5ab11461084357610136565b806318121646116100ff57806318121646146104c757806320c13b0b14610510578063249cb3fa146106115780632e6afd6e1461067357806334d23875146106d257610136565b806223de291461013b57806302f64b7c146102735780631262ed1c146102bc578063150b7a021461031b5780631626ba7e14610411575b600080fd5b610271600480360360c081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156101d857600080fd5b8201836020820111156101ea57600080fd5b8035906020019184600183028401116401000000008311171561020c57600080fd5b90919293919293908035906020019064010000000081111561022d57600080fd5b82018360208201111561023f57600080fd5b8035906020019184600183028401116401000000008311171561026157600080fd5b9091929391929390505050610b36565b005b6102ba6004803603602081101561028957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b54565b005b610303600480360360208110156102d257600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b57565b60405180821515815260200191505060405180910390f35b6103dc6004803603608081101561033157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561039857600080fd5b8201836020820111156103aa57600080fd5b803590602001918460018302840111640100000000831117156103cc57600080fd5b9091929391929390505050610b62565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104926004803603604081101561042757600080fd5b81019080803590602001909291908035906020019064010000000081111561044e57600080fd5b82018360208201111561046057600080fd5b8035906020019184600183028401116401000000008311171561048257600080fd5b9091929391929390505050610bb3565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b61050e600480360360208110156104dd57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610d8a565b005b6105dc6004803603604081101561052657600080fd5b810190808035906020019064010000000081111561054357600080fd5b82018360208201111561055557600080fd5b8035906020019184600183028401116401000000008311171561057757600080fd5b90919293919293908035906020019064010000000081111561059857600080fd5b8201836020820111156105aa57600080fd5b803590602001918460018302840111640100000000831117156105cc57600080fd5b9091929391929390505050610d8d565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b61065d6004803603604081101561062757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f91565b6040518082815260200191505060405180910390f35b6106ba6004803603602081101561068957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061113b565b60405180821515815260200191505060405180910390f35b610719600480360360208110156106e857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611142565b60405180821515815260200191505060405180910390f35b61073961114d565b60405180821515815260200191505060405180910390f35b6107986004803603602081101561076757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506111e0565b60405180821515815260200191505060405180910390f35b6107f7600480360360208110156107c657600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506111e7565b60405180821515815260200191505060405180910390f35b6108176111f2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61088a6004803603602081101561085957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611218565b60405180821515815260200191505060405180910390f35b6108e9600480360360208110156108b857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061121f565b005b6109326004803603602081101561090157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611222565b60405180821515815260200191505060405180910390f35b61098c6004803603602081101561096057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611229565b005b6109d5600480360360208110156109a457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506114a3565b005b610aa2600480360360a08110156109ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a5e57600080fd5b820183602082011115610a7057600080fd5b80359060200191846001830284011164010000000083111715610a9257600080fd5b90919293919293905050506114a6565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b610b1e60048036036020811015610aed57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506114f8565b60405180821515815260200191505060405180910390f35b610b4a67017df31b87810c5460c01b610b54565b5050505050505050565b50565b600060019050919050565b6000610b7867b98303ad269413cc60c01b610b54565b610b8c67d918383005e5446f60c01b610b54565b610ba0674f2f4cdbd8cfb29560c01b610b54565b63150b7a0260e01b905095945050505050565b6000610bc967b5797d6b0e7178f460c01b610b54565b610bdd6746f24b4f5fdfa5b960c01b610b54565b610bf167e0b2abc1e853224260c01b610b54565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e1e382ce308686866040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060206040518083038186803b158015610cb657600080fd5b505afa158015610cca573d6000803e3d6000fd5b505050506040513d6020811015610ce057600080fd5b81019080805190602001909291905050508015610d0d5750610d0c678166bab12740c46b60c01b6111e7565b5b80610d285750610d2767c9993a938969404a60c01b6111e0565b5b610d395763ffffffff60e01b610d81565b60405160200180807f697356616c69645369676e617475726528627974657333322c62797465732900815250601f019050604051602081830303815290604052805190602001205b90509392505050565b50565b6000610da3673366cc666f8f6ecb60c01b610b54565b610db767652c29ed636ab5f860c01b610b54565b610dcb676f4f2b259049e42b60c01b610b54565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663124e9eb330878787876040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f82011690508083019250505097505050505050505060206040518083038186803b158015610ebc57600080fd5b505afa158015610ed0573d6000803e3d6000fd5b505050506040513d6020811015610ee657600080fd5b81019080805190602001909291905050508015610f135750610f1267a42e2906e3e8a15c60c01b6111e7565b5b80610f2e5750610f2d672a01fa3e9fa5e5a260c01b6111e0565b5b610f3f5763ffffffff60e01b610f87565b60405160200180807f697356616c69645369676e61747572652862797465732c627974657329000000815250601d019050604051602081830303815290604052805190602001205b9050949350505050565b6000610fa767ca3ee0fe51202e0160c01b610b54565b610fbb67b4a80b43620676ca60c01b610b54565b610fcf67534936d0977ddc7160c01b610b54565b6000610fe567d1e0b5335b68fd6060c01b610b54565b610ff967363fb22d296acca360c01b610b54565b60405160200180807f455243373737546f6b656e73526563697069656e7400000000000000000000008152506015019050604051602081830303815290604052805190602001208414801561107957503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156110f45761109267074a18f7e88ecc1060c01b610b54565b6110a667263b3f1d731623f560c01b610b54565b60405160200180807f455243313832305f4143434550545f4d414749430000000000000000000000008152506014019050604051602081830303815290604052805190602001209050611109565b61110867a481020f1e3f0a9860c01b610b54565b5b61111d6759eee593d0b7818e60c01b610b54565b61113167d8e2a5e8436cb2b960c01b610b54565b8091505092915050565b6000919050565b600060019050919050565b60006111636726ed6cc6ca12515c60c01b610d8a565b61117767f3fc49482028cbb860c01b610d8a565b61118b6740317a79cae6a3ff60c01b610d8a565b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b6000919050565b600060019050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000919050565b50565b6000919050565b61123d67396904bfaa4b979260c01b610b54565b61125167b2266613e068a5ae60c01b610d8a565b611265676a66a63870f964f960c01b610d8a565b6112796772f22eca890742ba60c01b610d8a565b61128d67c8ab57d60023f99860c01b610d8a565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611331576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180611504602f913960400191505060405180910390fd5b61134567d31dec9098d614f660c01b610d8a565b61135967a184879381a9c67460c01b610d8a565b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506113ae675e44e6e1c885710560c01b610d8a565b6113c267ff494a582c3fbf5c60c01b610b54565b6113d66729192f1db3add72f60c01b610b54565b6113ea67fc42a1175b48bb9960c01b610b54565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061143f6732ca1833e9907bb960c01b610d8a565b611453672942130a5b94b82160c01b610d8a565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b50565b60006114bc679d34bdca53bef64660c01b610b54565b6114d06734111326528019b960c01b610b54565b6114e46755f10e9de860303160c01b610b54565b63f23a6e6160e01b90509695505050505050565b60006001905091905056fe496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a6572a164736f6c634300060c000a"; + static readonly abi: ({ + inputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): AccountImplementationV1MockInterface; + static connect(address: string, signerOrProvider: Signer | Provider): AccountImplementationV1Mock; +} +export {}; diff --git a/dist/typings/factories/AccountImplementationV1Mock__factory.js b/dist/typings/factories/AccountImplementationV1Mock__factory.js new file mode 100644 index 00000000..1e7d8abd --- /dev/null +++ b/dist/typings/factories/AccountImplementationV1Mock__factory.js @@ -0,0 +1,489 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AccountImplementationV1Mock__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "registry_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "initializer", + type: "address", + }, + ], + name: "Initialized", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__274649f2", + type: "bytes8", + }, + ], + name: "c_274649f2", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_305923d6", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3add61c5", + type: "bytes8", + }, + ], + name: "c_3add61c5", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_c0828b70", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__274649f2", + type: "bytes8", + }, + ], + name: "c_false274649f2", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_false305923d6", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3add61c5", + type: "bytes8", + }, + ], + name: "c_false3add61c5", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_falsec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__274649f2", + type: "bytes8", + }, + ], + name: "c_true274649f2", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_true305923d6", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3add61c5", + type: "bytes8", + }, + ], + name: "c_true3add61c5", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_truec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "interfaceHash", + type: "bytes32", + }, + { + internalType: "address", + name: "addr", + type: "address", + }, + ], + name: "canImplementInterfaceForAddress", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "registry_", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isInitialized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "messageHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "isValidSignature", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "isValidSignature", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + name: "onERC1155Received", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + name: "onERC721Received", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "registry", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + name: "tokensReceived", + outputs: [], + stateMutability: "pure", + type: "function", + }, +]; +const _bytecode = "0x60806040523480156200001157600080fd5b50604051620016b4380380620016b4833981810160405260208110156200003757600080fd5b810190808051906020019092919050505062000064675e592fe27197979c60c01b6200015c60201b60201c565b6200008067eca2e4778f3efef360c01b6200015c60201b60201c565b326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000dc6709bbddebe144bcac60c01b6200015f60201b60201c565b620000f8676ade43bdb8e559bf60c01b6200016260201b60201c565b620001146721a8bb2f8620330d60c01b6200016260201b60201c565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505062000165565b50565b50565b50565b61153f80620001756000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c8063392e53cd116100b85780638f27e6b61161007c5780638f27e6b6146108a2578063b49762a1146108eb578063c4d66de81461094a578063ef1ea9581461098e578063f23a6e61146109d7578063fdec3f2914610ad757610136565b8063392e53cd1461073157806345ebf7af1461075157806377dbbbcf146107b05780637b1039991461080f5780638c0b5ab11461084357610136565b806318121646116100ff57806318121646146104c757806320c13b0b14610510578063249cb3fa146106115780632e6afd6e1461067357806334d23875146106d257610136565b806223de291461013b57806302f64b7c146102735780631262ed1c146102bc578063150b7a021461031b5780631626ba7e14610411575b600080fd5b610271600480360360c081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156101d857600080fd5b8201836020820111156101ea57600080fd5b8035906020019184600183028401116401000000008311171561020c57600080fd5b90919293919293908035906020019064010000000081111561022d57600080fd5b82018360208201111561023f57600080fd5b8035906020019184600183028401116401000000008311171561026157600080fd5b9091929391929390505050610b36565b005b6102ba6004803603602081101561028957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b54565b005b610303600480360360208110156102d257600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b57565b60405180821515815260200191505060405180910390f35b6103dc6004803603608081101561033157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561039857600080fd5b8201836020820111156103aa57600080fd5b803590602001918460018302840111640100000000831117156103cc57600080fd5b9091929391929390505050610b62565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104926004803603604081101561042757600080fd5b81019080803590602001909291908035906020019064010000000081111561044e57600080fd5b82018360208201111561046057600080fd5b8035906020019184600183028401116401000000008311171561048257600080fd5b9091929391929390505050610bb3565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b61050e600480360360208110156104dd57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610d8a565b005b6105dc6004803603604081101561052657600080fd5b810190808035906020019064010000000081111561054357600080fd5b82018360208201111561055557600080fd5b8035906020019184600183028401116401000000008311171561057757600080fd5b90919293919293908035906020019064010000000081111561059857600080fd5b8201836020820111156105aa57600080fd5b803590602001918460018302840111640100000000831117156105cc57600080fd5b9091929391929390505050610d8d565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b61065d6004803603604081101561062757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f91565b6040518082815260200191505060405180910390f35b6106ba6004803603602081101561068957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061113b565b60405180821515815260200191505060405180910390f35b610719600480360360208110156106e857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611142565b60405180821515815260200191505060405180910390f35b61073961114d565b60405180821515815260200191505060405180910390f35b6107986004803603602081101561076757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506111e0565b60405180821515815260200191505060405180910390f35b6107f7600480360360208110156107c657600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506111e7565b60405180821515815260200191505060405180910390f35b6108176111f2565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61088a6004803603602081101561085957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611218565b60405180821515815260200191505060405180910390f35b6108e9600480360360208110156108b857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061121f565b005b6109326004803603602081101561090157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611222565b60405180821515815260200191505060405180910390f35b61098c6004803603602081101561096057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611229565b005b6109d5600480360360208110156109a457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506114a3565b005b610aa2600480360360a08110156109ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610a5e57600080fd5b820183602082011115610a7057600080fd5b80359060200191846001830284011164010000000083111715610a9257600080fd5b90919293919293905050506114a6565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b610b1e60048036036020811015610aed57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506114f8565b60405180821515815260200191505060405180910390f35b610b4a67017df31b87810c5460c01b610b54565b5050505050505050565b50565b600060019050919050565b6000610b7867b98303ad269413cc60c01b610b54565b610b8c67d918383005e5446f60c01b610b54565b610ba0674f2f4cdbd8cfb29560c01b610b54565b63150b7a0260e01b905095945050505050565b6000610bc967b5797d6b0e7178f460c01b610b54565b610bdd6746f24b4f5fdfa5b960c01b610b54565b610bf167e0b2abc1e853224260c01b610b54565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e1e382ce308686866040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060206040518083038186803b158015610cb657600080fd5b505afa158015610cca573d6000803e3d6000fd5b505050506040513d6020811015610ce057600080fd5b81019080805190602001909291905050508015610d0d5750610d0c678166bab12740c46b60c01b6111e7565b5b80610d285750610d2767c9993a938969404a60c01b6111e0565b5b610d395763ffffffff60e01b610d81565b60405160200180807f697356616c69645369676e617475726528627974657333322c62797465732900815250601f019050604051602081830303815290604052805190602001205b90509392505050565b50565b6000610da3673366cc666f8f6ecb60c01b610b54565b610db767652c29ed636ab5f860c01b610b54565b610dcb676f4f2b259049e42b60c01b610b54565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663124e9eb330878787876040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f82011690508083019250505097505050505050505060206040518083038186803b158015610ebc57600080fd5b505afa158015610ed0573d6000803e3d6000fd5b505050506040513d6020811015610ee657600080fd5b81019080805190602001909291905050508015610f135750610f1267a42e2906e3e8a15c60c01b6111e7565b5b80610f2e5750610f2d672a01fa3e9fa5e5a260c01b6111e0565b5b610f3f5763ffffffff60e01b610f87565b60405160200180807f697356616c69645369676e61747572652862797465732c627974657329000000815250601d019050604051602081830303815290604052805190602001205b9050949350505050565b6000610fa767ca3ee0fe51202e0160c01b610b54565b610fbb67b4a80b43620676ca60c01b610b54565b610fcf67534936d0977ddc7160c01b610b54565b6000610fe567d1e0b5335b68fd6060c01b610b54565b610ff967363fb22d296acca360c01b610b54565b60405160200180807f455243373737546f6b656e73526563697069656e7400000000000000000000008152506015019050604051602081830303815290604052805190602001208414801561107957503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156110f45761109267074a18f7e88ecc1060c01b610b54565b6110a667263b3f1d731623f560c01b610b54565b60405160200180807f455243313832305f4143434550545f4d414749430000000000000000000000008152506014019050604051602081830303815290604052805190602001209050611109565b61110867a481020f1e3f0a9860c01b610b54565b5b61111d6759eee593d0b7818e60c01b610b54565b61113167d8e2a5e8436cb2b960c01b610b54565b8091505092915050565b6000919050565b600060019050919050565b60006111636726ed6cc6ca12515c60c01b610d8a565b61117767f3fc49482028cbb860c01b610d8a565b61118b6740317a79cae6a3ff60c01b610d8a565b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b6000919050565b600060019050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000919050565b50565b6000919050565b61123d67396904bfaa4b979260c01b610b54565b61125167b2266613e068a5ae60c01b610d8a565b611265676a66a63870f964f960c01b610d8a565b6112796772f22eca890742ba60c01b610d8a565b61128d67c8ab57d60023f99860c01b610d8a565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611331576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180611504602f913960400191505060405180910390fd5b61134567d31dec9098d614f660c01b610d8a565b61135967a184879381a9c67460c01b610d8a565b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506113ae675e44e6e1c885710560c01b610d8a565b6113c267ff494a582c3fbf5c60c01b610b54565b6113d66729192f1db3add72f60c01b610b54565b6113ea67fc42a1175b48bb9960c01b610b54565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061143f6732ca1833e9907bb960c01b610d8a565b611453672942130a5b94b82160c01b610d8a565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b50565b60006114bc679d34bdca53bef64660c01b610b54565b6114d06734111326528019b960c01b610b54565b6114e46755f10e9de860303160c01b610b54565b63f23a6e6160e01b90509695505050505050565b60006001905091905056fe496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a6572a164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class AccountImplementationV1Mock__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(registry_, overrides) { + return super.deploy(registry_, overrides || {}); + } + getDeployTransaction(registry_, overrides) { + return super.getDeployTransaction(registry_, overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.AccountImplementationV1Mock__factory = AccountImplementationV1Mock__factory; +AccountImplementationV1Mock__factory.bytecode = _bytecode; +AccountImplementationV1Mock__factory.abi = _abi; diff --git a/dist/typings/factories/AccountImplementationV1__factory.d.ts b/dist/typings/factories/AccountImplementationV1__factory.d.ts new file mode 100644 index 00000000..9134df57 --- /dev/null +++ b/dist/typings/factories/AccountImplementationV1__factory.d.ts @@ -0,0 +1,35 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { AccountImplementationV1, AccountImplementationV1Interface } from "../AccountImplementationV1"; +export declare class AccountImplementationV1__factory { + static readonly abi: ({ + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + outputs?: undefined; + stateMutability?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): AccountImplementationV1Interface; + static connect(address: string, signerOrProvider: Signer | Provider): AccountImplementationV1; +} diff --git a/dist/typings/factories/AccountImplementationV1__factory.js b/dist/typings/factories/AccountImplementationV1__factory.js new file mode 100644 index 00000000..10c5e211 --- /dev/null +++ b/dist/typings/factories/AccountImplementationV1__factory.js @@ -0,0 +1,404 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AccountImplementationV1__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "initializer", + type: "address", + }, + ], + name: "Initialized", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_305923d6", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3add61c5", + type: "bytes8", + }, + ], + name: "c_3add61c5", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_c0828b70", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_false305923d6", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3add61c5", + type: "bytes8", + }, + ], + name: "c_false3add61c5", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_falsec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_true305923d6", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3add61c5", + type: "bytes8", + }, + ], + name: "c_true3add61c5", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_truec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "interfaceHash", + type: "bytes32", + }, + { + internalType: "address", + name: "addr", + type: "address", + }, + ], + name: "canImplementInterfaceForAddress", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "registry_", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isInitialized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "messageHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "isValidSignature", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "isValidSignature", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + name: "onERC1155Received", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + name: "onERC721Received", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "registry", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + name: "tokensReceived", + outputs: [], + stateMutability: "pure", + type: "function", + }, +]; +class AccountImplementationV1__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.AccountImplementationV1__factory = AccountImplementationV1__factory; +AccountImplementationV1__factory.abi = _abi; diff --git a/dist/typings/factories/AccountRegistryMock__factory.d.ts b/dist/typings/factories/AccountRegistryMock__factory.d.ts new file mode 100644 index 00000000..47fa7e8f --- /dev/null +++ b/dist/typings/factories/AccountRegistryMock__factory.d.ts @@ -0,0 +1,34 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { AccountRegistryMock, AccountRegistryMockInterface } from "../AccountRegistryMock"; +declare type AccountRegistryMockConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class AccountRegistryMock__factory extends ContractFactory { + constructor(...args: AccountRegistryMockConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): AccountRegistryMock; + connect(signer: Signer): AccountRegistryMock__factory; + static readonly bytecode = "0x608060405234801561001057600080fd5b506111d1806100206000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806392055f011161006657806392055f01146102b95780639486fe1c14610318578063cbc438bf14610361578063d628d08614610439578063e1e382ce1461048257610093565b806305ae19e614610098578063124e9eb3146100f75780631dccb787146101fb57806335a7ad4e1461025a575b600080fd5b6100df600480360360208110156100ae57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061053b565b60405180821515815260200191505060405180910390f35b6101e36004803603606081101561010d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561014a57600080fd5b82018360208201111561015c57600080fd5b8035906020019184600183028401116401000000008311171561017e57600080fd5b90919293919293908035906020019064010000000081111561019f57600080fd5b8201836020820111156101b157600080fd5b803590602001918460018302840111640100000000831117156101d357600080fd5b9091929391929390505050610546565b60405180821515815260200191505060405180910390f35b6102426004803603602081101561021157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506106e8565b60405180821515815260200191505060405180910390f35b6102a16004803603602081101561027057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506106ef565b60405180821515815260200191505060405180910390f35b610300600480360360208110156102cf57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506106fa565b60405180821515815260200191505060405180910390f35b61035f6004803603602081101561032e57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610701565b005b6104376004803603604081101561037757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156103b457600080fd5b8201836020820111156103c657600080fd5b803590602001918460208302840111640100000000831117156103e857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610704565b005b6104806004803603602081101561044f57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610847565b005b6105236004803603606081101561049857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156104df57600080fd5b8201836020820111156104f157600080fd5b8035906020019184600183028401116401000000008311171561051357600080fd5b909192939192939050505061084a565b60405180821515815260200191505060405180910390f35b600060019050919050565b600061055c67f6058d6feabedf4e60c01b610701565b61057067791d255b4b13901c60c01b610701565b61058467c2ed14287a18089060c01b610701565b600061062984848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061061b88888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061099f565b610b4490919063ffffffff16565b905061063f670293bb213b74056f60c01b610701565b61065367919748b41fa91fca60c01b610701565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505095945050505050565b6000919050565b600060019050919050565b6000919050565b50565b61071867f3c4a7298875368960c01b610701565b61072c6792589196eef0ef0260c01b610701565b61074067d212011fb9edaa3d60c01b610701565b60008151905061075a67fd344359a177403260c01b610701565b61076e67e60a35b5d2b82dfa60c01b610701565b60005b818110156108415761078d6762088388f62f3cf660c01b610701565b60016000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008584815181106107db57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050610771565b50505050565b50565b6000610860675eb20e8a5636f19660c01b610701565b610874675a493c0d16ba432360c01b610701565b61088867ce8f4f10d9dc17d560c01b610701565b60006108e184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505086610b4490919063ffffffff16565b90506108f7670b6cd25895782cad60c01b610701565b61090b67984631075067e43360c01b610701565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16915050949350505050565b60006109b567957e7830bbd813a160c01b610e61565b6109c96777388b439e4c706660c01b610e61565b6109dd678c0dad3efcfc1e3260c01b610e61565b6109e78251610e64565b826040516020018082805190602001908083835b60208310610a1e57805182526020820191506020810190506020830392506109fb565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405260405160200180807f19457468657265756d205369676e6564204d6573736167653a0a000000000000815250601a0183805190602001908083835b60208310610ab05780518252602082019150602081019050602083039250610a8d565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310610b015780518252602082019150602081019050602083039250610ade565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052805190602001209050919050565b6000610b5a67610b12321a07a31960c01b6111b3565b610b6e670f66a519ee9137b960c01b6111b3565b610b8267140d9f9935e2385360c01b6111b3565b6000610b98670bfea895a9f81bec60c01b6111b3565b610bac67a8c715ec3b9d89c160c01b6111b3565b604183511415610e1a57610bca67101129654a82afeb60c01b6111b3565b610bde67a44405322c11578a60c01b6111b3565b610bf2673ae09945b2f5082360c01b6111b3565b6000610c0867900a30e48d0fc7bd60c01b6111b3565b610c1c677d193483635abe1860c01b6111b3565b6000610c3267f24e14d594e9077960c01b6111b3565b610c4667a847d7edacf7e00c60c01b6111b3565b6000610c5c670bcc457b0963bc0f60c01b6111b3565b6020860151925060408601519150606086015160001a9050610c886730650d5e99574f3560c01b6111b3565b610c9c675197804ca644c8a460c01b6111b3565b601b8160ff161015610cdb57610cbc6781206cb7a1d9cec760c01b6111b3565b610cd0679d0aaefe9954d7fb60c01b6111b3565b601b81019050610cf0565b610cef67091b6422f681fe5560c01b6111b3565b5b610d04677849785c6ede9b0e60c01b6111b3565b610d186732075f7517db825b60c01b6111b3565b601b8160ff16148015610d3b5750610d3a67638a38da6bf5bb4360c01b6111b6565b5b80610d655750601c8160ff16148015610d645750610d63671d94865be2a4ed5560c01b6111b6565b5b5b15610dfd57610d7e67657d88528f4e396b60c01b6111b3565b610d92675469679748b05cfe60c01b6111b3565b60018782858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610dec573d6000803e3d6000fd5b505050602060405103519350610e12565b610e1167539b701a1f57136860c01b6111b3565b5b505050610e2f565b610e2e67f3927173995ed52360c01b6111b3565b5b610e4367303f1b174284648060c01b6111b3565b610e5767c60031985823124160c01b6111b3565b8091505092915050565b50565b6060610e7a67944f62c49d2211d360c01b6111c1565b610e8e67cf066073523ad27260c01b6111c1565b610ea2675e91f9b63d948d5860c01b6111c1565b6000821415610f2457610ebf677b0ce46c12188bc160c01b6111c1565b610ed3678aeefffae0d7fd7960c01b6111c1565b610ee767632899c3b9762aa260c01b6111c1565b6040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506111ae565b610f3867d4ac009e6f062aa760c01b6111c1565b610f4c6717428562d9cc82ca60c01b6111c1565b610f6067883259cc94c7ab0260c01b6111c1565b6000829050610f796714aaf87bc406f85b60c01b6111c1565b610f8d675a17c5ce53d95b1e60c01b6111c1565b6000610fa36747fbe7876372bb7760c01b6111c1565b610fb76703d91880b80ba81160c01b6111c1565b5b6000821461100257610fd4674c9b174d7e669b1660c01b6111c1565b8080600101915050610ff0674fcccc4aeaffba3360c01b6111c1565b600a8281610ffa57fe5b049150610fb8565b61101667c58fa74478d42bcd60c01b6111c1565b61102a670bc924b9eeb265b760c01b6111c1565b60608167ffffffffffffffff8111801561104357600080fd5b506040519080825280601f01601f1916602001820160405280156110765781602001600182028036833780820191505090505b50905061108d679dc5195730eeab1760c01b6111c1565b6110a167d095aa12c047f17860c01b6111c1565b60006001830390506110bd671a0d585c82f26b7560c01b6111c1565b8593506110d467623c941e41d0650160c01b6111c1565b6110e867b73f896d5bae614060c01b6111c1565b5b6000841461117e576111056773b20ed61aea105760c01b6111c1565b600a848161110f57fe5b0660300160f81b8282806001900393508151811061112957fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061116c679d6afb48f5a4141e60c01b6111c1565b600a848161117657fe5b0493506110e9565b61119267c95e90ced64cb5d060c01b6111c1565b6111a6673e3baead90f807de60c01b6111c1565b819450505050505b919050565b50565b600060019050919050565b5056fea164736f6c634300060c000a"; + static readonly abi: { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + }[]; + static createInterface(): AccountRegistryMockInterface; + static connect(address: string, signerOrProvider: Signer | Provider): AccountRegistryMock; +} +export {}; diff --git a/dist/typings/factories/AccountRegistryMock__factory.js b/dist/typings/factories/AccountRegistryMock__factory.js new file mode 100644 index 00000000..34653a9b --- /dev/null +++ b/dist/typings/factories/AccountRegistryMock__factory.js @@ -0,0 +1,217 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AccountRegistryMock__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "bytes8", + name: "c__203cf0ac", + type: "bytes8", + }, + ], + name: "c_203cf0ac", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__5dbd0fc3", + type: "bytes8", + }, + ], + name: "c_5dbd0fc3", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__203cf0ac", + type: "bytes8", + }, + ], + name: "c_false203cf0ac", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__5dbd0fc3", + type: "bytes8", + }, + ], + name: "c_false5dbd0fc3", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__203cf0ac", + type: "bytes8", + }, + ], + name: "c_true203cf0ac", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__5dbd0fc3", + type: "bytes8", + }, + ], + name: "c_true5dbd0fc3", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "isValidAccountSignature", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes32", + name: "messageHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "isValidAccountSignature", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address[]", + name: "owners", + type: "address[]", + }, + ], + name: "mockAccountOwners", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; +const _bytecode = "0x608060405234801561001057600080fd5b506111d1806100206000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c806392055f011161006657806392055f01146102b95780639486fe1c14610318578063cbc438bf14610361578063d628d08614610439578063e1e382ce1461048257610093565b806305ae19e614610098578063124e9eb3146100f75780631dccb787146101fb57806335a7ad4e1461025a575b600080fd5b6100df600480360360208110156100ae57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061053b565b60405180821515815260200191505060405180910390f35b6101e36004803603606081101561010d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561014a57600080fd5b82018360208201111561015c57600080fd5b8035906020019184600183028401116401000000008311171561017e57600080fd5b90919293919293908035906020019064010000000081111561019f57600080fd5b8201836020820111156101b157600080fd5b803590602001918460018302840111640100000000831117156101d357600080fd5b9091929391929390505050610546565b60405180821515815260200191505060405180910390f35b6102426004803603602081101561021157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506106e8565b60405180821515815260200191505060405180910390f35b6102a16004803603602081101561027057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506106ef565b60405180821515815260200191505060405180910390f35b610300600480360360208110156102cf57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506106fa565b60405180821515815260200191505060405180910390f35b61035f6004803603602081101561032e57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610701565b005b6104376004803603604081101561037757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156103b457600080fd5b8201836020820111156103c657600080fd5b803590602001918460208302840111640100000000831117156103e857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610704565b005b6104806004803603602081101561044f57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610847565b005b6105236004803603606081101561049857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156104df57600080fd5b8201836020820111156104f157600080fd5b8035906020019184600183028401116401000000008311171561051357600080fd5b909192939192939050505061084a565b60405180821515815260200191505060405180910390f35b600060019050919050565b600061055c67f6058d6feabedf4e60c01b610701565b61057067791d255b4b13901c60c01b610701565b61058467c2ed14287a18089060c01b610701565b600061062984848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061061b88888080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061099f565b610b4490919063ffffffff16565b905061063f670293bb213b74056f60c01b610701565b61065367919748b41fa91fca60c01b610701565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505095945050505050565b6000919050565b600060019050919050565b6000919050565b50565b61071867f3c4a7298875368960c01b610701565b61072c6792589196eef0ef0260c01b610701565b61074067d212011fb9edaa3d60c01b610701565b60008151905061075a67fd344359a177403260c01b610701565b61076e67e60a35b5d2b82dfa60c01b610701565b60005b818110156108415761078d6762088388f62f3cf660c01b610701565b60016000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008584815181106107db57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050610771565b50505050565b50565b6000610860675eb20e8a5636f19660c01b610701565b610874675a493c0d16ba432360c01b610701565b61088867ce8f4f10d9dc17d560c01b610701565b60006108e184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505086610b4490919063ffffffff16565b90506108f7670b6cd25895782cad60c01b610701565b61090b67984631075067e43360c01b610701565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16915050949350505050565b60006109b567957e7830bbd813a160c01b610e61565b6109c96777388b439e4c706660c01b610e61565b6109dd678c0dad3efcfc1e3260c01b610e61565b6109e78251610e64565b826040516020018082805190602001908083835b60208310610a1e57805182526020820191506020810190506020830392506109fb565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405260405160200180807f19457468657265756d205369676e6564204d6573736167653a0a000000000000815250601a0183805190602001908083835b60208310610ab05780518252602082019150602081019050602083039250610a8d565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310610b015780518252602082019150602081019050602083039250610ade565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052805190602001209050919050565b6000610b5a67610b12321a07a31960c01b6111b3565b610b6e670f66a519ee9137b960c01b6111b3565b610b8267140d9f9935e2385360c01b6111b3565b6000610b98670bfea895a9f81bec60c01b6111b3565b610bac67a8c715ec3b9d89c160c01b6111b3565b604183511415610e1a57610bca67101129654a82afeb60c01b6111b3565b610bde67a44405322c11578a60c01b6111b3565b610bf2673ae09945b2f5082360c01b6111b3565b6000610c0867900a30e48d0fc7bd60c01b6111b3565b610c1c677d193483635abe1860c01b6111b3565b6000610c3267f24e14d594e9077960c01b6111b3565b610c4667a847d7edacf7e00c60c01b6111b3565b6000610c5c670bcc457b0963bc0f60c01b6111b3565b6020860151925060408601519150606086015160001a9050610c886730650d5e99574f3560c01b6111b3565b610c9c675197804ca644c8a460c01b6111b3565b601b8160ff161015610cdb57610cbc6781206cb7a1d9cec760c01b6111b3565b610cd0679d0aaefe9954d7fb60c01b6111b3565b601b81019050610cf0565b610cef67091b6422f681fe5560c01b6111b3565b5b610d04677849785c6ede9b0e60c01b6111b3565b610d186732075f7517db825b60c01b6111b3565b601b8160ff16148015610d3b5750610d3a67638a38da6bf5bb4360c01b6111b6565b5b80610d655750601c8160ff16148015610d645750610d63671d94865be2a4ed5560c01b6111b6565b5b5b15610dfd57610d7e67657d88528f4e396b60c01b6111b3565b610d92675469679748b05cfe60c01b6111b3565b60018782858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610dec573d6000803e3d6000fd5b505050602060405103519350610e12565b610e1167539b701a1f57136860c01b6111b3565b5b505050610e2f565b610e2e67f3927173995ed52360c01b6111b3565b5b610e4367303f1b174284648060c01b6111b3565b610e5767c60031985823124160c01b6111b3565b8091505092915050565b50565b6060610e7a67944f62c49d2211d360c01b6111c1565b610e8e67cf066073523ad27260c01b6111c1565b610ea2675e91f9b63d948d5860c01b6111c1565b6000821415610f2457610ebf677b0ce46c12188bc160c01b6111c1565b610ed3678aeefffae0d7fd7960c01b6111c1565b610ee767632899c3b9762aa260c01b6111c1565b6040518060400160405280600181526020017f300000000000000000000000000000000000000000000000000000000000000081525090506111ae565b610f3867d4ac009e6f062aa760c01b6111c1565b610f4c6717428562d9cc82ca60c01b6111c1565b610f6067883259cc94c7ab0260c01b6111c1565b6000829050610f796714aaf87bc406f85b60c01b6111c1565b610f8d675a17c5ce53d95b1e60c01b6111c1565b6000610fa36747fbe7876372bb7760c01b6111c1565b610fb76703d91880b80ba81160c01b6111c1565b5b6000821461100257610fd4674c9b174d7e669b1660c01b6111c1565b8080600101915050610ff0674fcccc4aeaffba3360c01b6111c1565b600a8281610ffa57fe5b049150610fb8565b61101667c58fa74478d42bcd60c01b6111c1565b61102a670bc924b9eeb265b760c01b6111c1565b60608167ffffffffffffffff8111801561104357600080fd5b506040519080825280601f01601f1916602001820160405280156110765781602001600182028036833780820191505090505b50905061108d679dc5195730eeab1760c01b6111c1565b6110a167d095aa12c047f17860c01b6111c1565b60006001830390506110bd671a0d585c82f26b7560c01b6111c1565b8593506110d467623c941e41d0650160c01b6111c1565b6110e867b73f896d5bae614060c01b6111c1565b5b6000841461117e576111056773b20ed61aea105760c01b6111c1565b600a848161110f57fe5b0660300160f81b8282806001900393508151811061112957fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061116c679d6afb48f5a4141e60c01b6111c1565b600a848161117657fe5b0493506110e9565b61119267c95e90ced64cb5d060c01b6111c1565b6111a6673e3baead90f807de60c01b6111c1565b819450505050505b919050565b50565b600060019050919050565b5056fea164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class AccountRegistryMock__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.AccountRegistryMock__factory = AccountRegistryMock__factory; +AccountRegistryMock__factory.bytecode = _bytecode; +AccountRegistryMock__factory.abi = _abi; diff --git a/dist/typings/factories/AccountRegistry__factory.d.ts b/dist/typings/factories/AccountRegistry__factory.d.ts new file mode 100644 index 00000000..e8417316 --- /dev/null +++ b/dist/typings/factories/AccountRegistry__factory.d.ts @@ -0,0 +1,22 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { AccountRegistry, AccountRegistryInterface } from "../AccountRegistry"; +export declare class AccountRegistry__factory { + static readonly abi: { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + }[]; + static createInterface(): AccountRegistryInterface; + static connect(address: string, signerOrProvider: Signer | Provider): AccountRegistry; +} diff --git a/dist/typings/factories/AccountRegistry__factory.js b/dist/typings/factories/AccountRegistry__factory.js new file mode 100644 index 00000000..7abe047f --- /dev/null +++ b/dist/typings/factories/AccountRegistry__factory.js @@ -0,0 +1,125 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AccountRegistry__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "bytes8", + name: "c__203cf0ac", + type: "bytes8", + }, + ], + name: "c_203cf0ac", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__203cf0ac", + type: "bytes8", + }, + ], + name: "c_false203cf0ac", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__203cf0ac", + type: "bytes8", + }, + ], + name: "c_true203cf0ac", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "isValidAccountSignature", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes32", + name: "messageHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "isValidAccountSignature", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +class AccountRegistry__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.AccountRegistry__factory = AccountRegistry__factory; +AccountRegistry__factory.abi = _abi; diff --git a/dist/typings/factories/Account__factory.d.ts b/dist/typings/factories/Account__factory.d.ts new file mode 100644 index 00000000..d7ef24c9 --- /dev/null +++ b/dist/typings/factories/Account__factory.d.ts @@ -0,0 +1,50 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { Account, AccountInterface } from "../Account"; +declare type AccountConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class Account__factory extends ContractFactory { + constructor(...args: AccountConstructorParams); + deploy(registry_: string, implementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(registry_: string, implementation_: string, overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): Account; + connect(signer: Signer): Account__factory; + static readonly bytecode = "0x608060405234801561001057600080fd5b50604051610f32380380610f328339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050610068679894797dc84081af60c01b61019960201b60201c565b610082674e0f327275f95bf160c01b61019960201b60201c565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506100dc6794e469383b340c9160c01b61019c60201b60201c565b6100f66786f2a31597afd57a60c01b61019c60201b60201c565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101516788e2a6c2eb66825d60c01b61019c60201b60201c565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505061019f565b50565b50565b610d84806101ae6000396000f3fe6080604052600436106100e15760003560e01c80637b1039991161007f578063b49762a111610059578063b49762a114610664578063d784d426146106d0578063dd54622814610721578063f77c479114610777576100e8565b80637b103999146105775780638f27e6b6146105b8578063abe124f61461060e576100e8565b806334d23875116100bb57806334d23875146103355780633f579f42146103a15780635c60da1b146104ca5780636480a27b1461050b576100e8565b8063062e4f9c146101f15780631454d4701461025d5780632486e26f146102c9576100e8565b366100e857005b3480156100f457600080fd5b5061010967267be5c007ba493660c01b6107b8565b61011d67c98405188afd4dab60c01b6107b8565b610131676a933c5d83132d2460c01b6107b8565b600080369050146101db5761015067b3d07c93e15dcc6960c01b6107b8565b610164670848f5b7587f259a60c01b6107b8565b610178677607056d4b83e95960c01b6107b8565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506101b367b7ff281b6713313460c01b6107b8565b368060008037600080826000855af43d806000803e81600081146101d657816000f35b816000fd5b6101ef6707d26d689f0268c060c01b6107b8565b005b3480156101fd57600080fd5b506102456004803603602081101561021457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107bb565b60405180821515815260200191505060405180910390f35b34801561026957600080fd5b506102b16004803603602081101561028057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107c2565b60405180821515815260200191505060405180910390f35b3480156102d557600080fd5b5061031d600480360360208110156102ec57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107c9565b60405180821515815260200191505060405180910390f35b34801561034157600080fd5b506103896004803603602081101561035857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107d4565b60405180821515815260200191505060405180910390f35b3480156103ad57600080fd5b5061044f600480360360608110156103c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561040b57600080fd5b82018360208201111561041d57600080fd5b8035906020019184600183028401116401000000008311171561043f57600080fd5b90919293919293905050506107df565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561048f578082015181840152602081019050610474565b50505050905090810190601f1680156104bc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104d657600080fd5b506104df610b13565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561051757600080fd5b5061055f6004803603602081101561052e57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b39565b60405180821515815260200191505060405180910390f35b34801561058357600080fd5b5061058c610b44565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105c457600080fd5b5061060c600480360360208110156105db57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b6a565b005b34801561061a57600080fd5b506106626004803603602081101561063157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b6d565b005b34801561067057600080fd5b506106b86004803603602081101561068757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b70565b60405180821515815260200191505060405180910390f35b3480156106dc57600080fd5b5061071f600480360360208110156106f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b77565b005b34801561072d57600080fd5b506107756004803603602081101561074457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107b8565b005b34801561078357600080fd5b5061078c610d27565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b50565b6000919050565b6000919050565b600060019050919050565b600060019050919050565b60606107f5675aa5d179f54cb87d60c01b6107b8565b61080967a226552386468aff60c01b610b6d565b61081d67bb06267d15cafc8560c01b610b6d565b61083167d0eb72184d8e714c60c01b610b6d565b61084567f128b7cf1088330a60c01b610b6d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610d4c602c913960400191505060405180910390fd5b6108fd6787dbbb5ffe0583c160c01b610b6d565b61091167f3741b7d431227a560c01b610b6d565b6109256737f078ab60df830760c01b6107b8565b61093967e4de2ba80b3b44d560c01b6107b8565b61094d675abe6251e319bc7c60c01b6107b8565b6109616726cc190ece09b7db60c01b6107b8565b6060610977676002c94a45713e1f60c01b6107b8565b61098b678d82d94b1795aafc60c01b6107b8565b60006109a167df08c3b5e2fa54f560c01b6107b8565b8673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d8060008114610a0d576040519150601f19603f3d011682016040523d82523d6000602084013e610a12565b606091505b508093508192505050610a2f67f28a312aa9cfaa7160c01b6107b8565b610a4367162325a0fb69618f60c01b6107b8565b610a576711f6077f17c7465a60c01b6107b8565b80610aca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b610ade6780640c61604c38b060c01b6107b8565b610af267157aa11e3950a2a260c01b6107b8565b610b06671a32fc353aeb8d2f60c01b6107b8565b8192505050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b50565b50565b6000919050565b610b8b67c3094137b7a928f360c01b6107b8565b610b9f67a226552386468aff60c01b610b6d565b610bb367bb06267d15cafc8560c01b610b6d565b610bc767d0eb72184d8e714c60c01b610b6d565b610bdb67f128b7cf1088330a60c01b610b6d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610d4c602c913960400191505060405180910390fd5b610c936787dbbb5ffe0583c160c01b610b6d565b610ca767f3741b7d431227a560c01b610b6d565b610cbb6710c6caed8159651f60c01b6107b8565b610ccf67ac6d8f9c43d3285d60c01b6107b8565b610ce3679d4a82d94581f52860c01b6107b8565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a"; + static readonly abi: ({ + inputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + name?: undefined; + outputs?: undefined; + } | { + stateMutability: string; + type: string; + inputs?: undefined; + name?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + })[]; + static createInterface(): AccountInterface; + static connect(address: string, signerOrProvider: Signer | Provider): Account; +} +export {}; diff --git a/dist/typings/factories/Account__factory.js b/dist/typings/factories/Account__factory.js new file mode 100644 index 00000000..e5703ad7 --- /dev/null +++ b/dist/typings/factories/Account__factory.js @@ -0,0 +1,297 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Account__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "registry_", + type: "address", + }, + { + internalType: "address", + name: "implementation_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + stateMutability: "nonpayable", + type: "fallback", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_305923d6", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d6b1085a", + type: "bytes8", + }, + ], + name: "c_d6b1085a", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__e208e0f4", + type: "bytes8", + }, + ], + name: "c_e208e0f4", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_false305923d6", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d6b1085a", + type: "bytes8", + }, + ], + name: "c_falsed6b1085a", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__e208e0f4", + type: "bytes8", + }, + ], + name: "c_falsee208e0f4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_true305923d6", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d6b1085a", + type: "bytes8", + }, + ], + name: "c_trued6b1085a", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__e208e0f4", + type: "bytes8", + }, + ], + name: "c_truee208e0f4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "controller", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeTransaction", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "implementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "registry", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "implementation_", + type: "address", + }, + ], + name: "setImplementation", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +]; +const _bytecode = "0x608060405234801561001057600080fd5b50604051610f32380380610f328339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050610068679894797dc84081af60c01b61019960201b60201c565b610082674e0f327275f95bf160c01b61019960201b60201c565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506100dc6794e469383b340c9160c01b61019c60201b60201c565b6100f66786f2a31597afd57a60c01b61019c60201b60201c565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101516788e2a6c2eb66825d60c01b61019c60201b60201c565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505061019f565b50565b50565b610d84806101ae6000396000f3fe6080604052600436106100e15760003560e01c80637b1039991161007f578063b49762a111610059578063b49762a114610664578063d784d426146106d0578063dd54622814610721578063f77c479114610777576100e8565b80637b103999146105775780638f27e6b6146105b8578063abe124f61461060e576100e8565b806334d23875116100bb57806334d23875146103355780633f579f42146103a15780635c60da1b146104ca5780636480a27b1461050b576100e8565b8063062e4f9c146101f15780631454d4701461025d5780632486e26f146102c9576100e8565b366100e857005b3480156100f457600080fd5b5061010967267be5c007ba493660c01b6107b8565b61011d67c98405188afd4dab60c01b6107b8565b610131676a933c5d83132d2460c01b6107b8565b600080369050146101db5761015067b3d07c93e15dcc6960c01b6107b8565b610164670848f5b7587f259a60c01b6107b8565b610178677607056d4b83e95960c01b6107b8565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506101b367b7ff281b6713313460c01b6107b8565b368060008037600080826000855af43d806000803e81600081146101d657816000f35b816000fd5b6101ef6707d26d689f0268c060c01b6107b8565b005b3480156101fd57600080fd5b506102456004803603602081101561021457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107bb565b60405180821515815260200191505060405180910390f35b34801561026957600080fd5b506102b16004803603602081101561028057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107c2565b60405180821515815260200191505060405180910390f35b3480156102d557600080fd5b5061031d600480360360208110156102ec57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107c9565b60405180821515815260200191505060405180910390f35b34801561034157600080fd5b506103896004803603602081101561035857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107d4565b60405180821515815260200191505060405180910390f35b3480156103ad57600080fd5b5061044f600480360360608110156103c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561040b57600080fd5b82018360208201111561041d57600080fd5b8035906020019184600183028401116401000000008311171561043f57600080fd5b90919293919293905050506107df565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561048f578082015181840152602081019050610474565b50505050905090810190601f1680156104bc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104d657600080fd5b506104df610b13565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561051757600080fd5b5061055f6004803603602081101561052e57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b39565b60405180821515815260200191505060405180910390f35b34801561058357600080fd5b5061058c610b44565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105c457600080fd5b5061060c600480360360208110156105db57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b6a565b005b34801561061a57600080fd5b506106626004803603602081101561063157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b6d565b005b34801561067057600080fd5b506106b86004803603602081101561068757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b70565b60405180821515815260200191505060405180910390f35b3480156106dc57600080fd5b5061071f600480360360208110156106f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b77565b005b34801561072d57600080fd5b506107756004803603602081101561074457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107b8565b005b34801561078357600080fd5b5061078c610d27565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b50565b6000919050565b6000919050565b600060019050919050565b600060019050919050565b60606107f5675aa5d179f54cb87d60c01b6107b8565b61080967a226552386468aff60c01b610b6d565b61081d67bb06267d15cafc8560c01b610b6d565b61083167d0eb72184d8e714c60c01b610b6d565b61084567f128b7cf1088330a60c01b610b6d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610d4c602c913960400191505060405180910390fd5b6108fd6787dbbb5ffe0583c160c01b610b6d565b61091167f3741b7d431227a560c01b610b6d565b6109256737f078ab60df830760c01b6107b8565b61093967e4de2ba80b3b44d560c01b6107b8565b61094d675abe6251e319bc7c60c01b6107b8565b6109616726cc190ece09b7db60c01b6107b8565b6060610977676002c94a45713e1f60c01b6107b8565b61098b678d82d94b1795aafc60c01b6107b8565b60006109a167df08c3b5e2fa54f560c01b6107b8565b8673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d8060008114610a0d576040519150601f19603f3d011682016040523d82523d6000602084013e610a12565b606091505b508093508192505050610a2f67f28a312aa9cfaa7160c01b6107b8565b610a4367162325a0fb69618f60c01b6107b8565b610a576711f6077f17c7465a60c01b6107b8565b80610aca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b610ade6780640c61604c38b060c01b6107b8565b610af267157aa11e3950a2a260c01b6107b8565b610b06671a32fc353aeb8d2f60c01b6107b8565b8192505050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b50565b50565b6000919050565b610b8b67c3094137b7a928f360c01b6107b8565b610b9f67a226552386468aff60c01b610b6d565b610bb367bb06267d15cafc8560c01b610b6d565b610bc767d0eb72184d8e714c60c01b610b6d565b610bdb67f128b7cf1088330a60c01b610b6d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610d4c602c913960400191505060405180910390fd5b610c936787dbbb5ffe0583c160c01b610b6d565b610ca767f3741b7d431227a560c01b610b6d565b610cbb6710c6caed8159651f60c01b6107b8565b610ccf67ac6d8f9c43d3285d60c01b6107b8565b610ce3679d4a82d94581f52860c01b6107b8565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class Account__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(registry_, implementation_, overrides) { + return super.deploy(registry_, implementation_, overrides || {}); + } + getDeployTransaction(registry_, implementation_, overrides) { + return super.getDeployTransaction(registry_, implementation_, overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.Account__factory = Account__factory; +Account__factory.bytecode = _bytecode; +Account__factory.abi = _abi; diff --git a/dist/typings/factories/BalancesHelperV2__factory.d.ts b/dist/typings/factories/BalancesHelperV2__factory.d.ts new file mode 100644 index 00000000..1f6ab1fb --- /dev/null +++ b/dist/typings/factories/BalancesHelperV2__factory.d.ts @@ -0,0 +1,50 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { BalancesHelperV2, BalancesHelperV2Interface } from "../BalancesHelperV2"; +declare type BalancesHelperV2ConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class BalancesHelperV2__factory extends ContractFactory { + constructor(...args: BalancesHelperV2ConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): BalancesHelperV2; + connect(signer: Signer): BalancesHelperV2__factory; + static readonly bytecode = "0x608060405234801561001057600080fd5b5061108a806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806350c5a7101461003b578063ef5bfc371461006b575b600080fd5b610055600480360381019061005091906109e6565b61009b565b6040516100629190610ce8565b60405180910390f35b610085600480360381019061008091906109e6565b610279565b6040516100929190610d0a565b60405180910390f35b6060600083839050868690506100b19190610e68565b67ffffffffffffffff8111156100f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405190808252806020026020018201604052801561011e5781602001602082028036833780820191505090505b50905060005b8686905081101561026c5760005b85859050811015610258576000828787905061014e9190610e68565b826101599190610e12565b90506101ff898985818110610197577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906101ac91906109bd565b8888858181106101e5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906101fa91906109bd565b610457565b848281518110610238577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101818152505050808061025090610f3b565b915050610132565b50808061026490610f3b565b915050610124565b5080915050949350505050565b60606000838390508686905061028f9190610e68565b67ffffffffffffffff8111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102fc5781602001602082028036833780820191505090505b50905060005b8686905081101561044a5760005b85859050811015610436576000828787905061032c9190610e68565b826103379190610e12565b90506103dd898985818110610375577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201602081019061038a91906109bd565b8888858181106103c3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906103d891906109bd565b610608565b848281518110610416577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101818152505050808061042e90610f3b565b915050610310565b50808061044290610f3b565b915050610302565b5080915050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156104cc5782826040517f484305ff0000000000000000000000000000000000000000000000000000000081526004016104c3929190610cbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156105405782826040517f41f93bdf000000000000000000000000000000000000000000000000000000008152600401610537929190610cbf565b60405180910390fd5b60006105e0632ec8eec760e01b8560405160240161055e9190610ca4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050508473ffffffffffffffffffffffffffffffffffffffff166107b090919063ffffffff16565b90506000818060200190518101906105f89190610a5b565b5050509050809250505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561067d5782826040517f484305ff000000000000000000000000000000000000000000000000000000008152600401610674929190610cbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156106f15782826040517f41f93bdf0000000000000000000000000000000000000000000000000000000081526004016106e8929190610cbf565b60405180910390fd5b60006107916370a0823160e01b8560405160240161070f9190610ca4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050508473ffffffffffffffffffffffffffffffffffffffff166107b090919063ffffffff16565b9050808060200190518101906107a79190610abe565b91505092915050565b60606107d58383604051806060016040528060258152602001611059602591396107dd565b905092915050565b60606107e8846108aa565b610827576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081e90610d4e565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161084f9190610c8d565b600060405180830381855afa9150503d806000811461088a576040519150601f19603f3d011682016040523d82523d6000602084013e61088f565b606091505b509150915061089f8282866108cd565b925050509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156108dd5782905061092d565b6000835111156108f05782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109249190610d2c565b60405180910390fd5b9392505050565b60008135905061094381611013565b92915050565b60008083601f84011261095b57600080fd5b8235905067ffffffffffffffff81111561097457600080fd5b60208301915083602082028301111561098c57600080fd5b9250929050565b6000815190506109a28161102a565b92915050565b6000815190506109b781611041565b92915050565b6000602082840312156109cf57600080fd5b60006109dd84828501610934565b91505092915050565b600080600080604085870312156109fc57600080fd5b600085013567ffffffffffffffff811115610a1657600080fd5b610a2287828801610949565b9450945050602085013567ffffffffffffffff811115610a4157600080fd5b610a4d87828801610949565b925092505092959194509250565b60008060008060808587031215610a7157600080fd5b6000610a7f87828801610993565b9450506020610a90878288016109a8565b9350506040610aa1878288016109a8565b9250506060610ab2878288016109a8565b91505092959194509250565b600060208284031215610ad057600080fd5b6000610ade848285016109a8565b91505092915050565b6000610af38383610c13565b60208301905092915050565b6000610b0b8383610c7e565b60208301905092915050565b610b2081610ec2565b82525050565b6000610b3182610d8e565b610b3b8185610dd4565b9350610b4683610d6e565b8060005b83811015610b77578151610b5e8882610ae7565b9750610b6983610dba565b925050600181019050610b4a565b5085935050505092915050565b6000610b8f82610d99565b610b998185610de5565b9350610ba483610d7e565b8060005b83811015610bd5578151610bbc8882610aff565b9750610bc783610dc7565b925050600181019050610ba8565b5085935050505092915050565b6000610bed82610da4565b610bf78185610df6565b9350610c07818560208601610f08565b80840191505092915050565b610c1c81610ed4565b82525050565b6000610c2d82610daf565b610c378185610e01565b9350610c47818560208601610f08565b610c5081610fb3565b840191505092915050565b6000610c68602483610e01565b9150610c7382610fc4565b604082019050919050565b610c8781610efe565b82525050565b6000610c998284610be2565b915081905092915050565b6000602082019050610cb96000830184610b17565b92915050565b6000604082019050610cd46000830185610b17565b610ce16020830184610b17565b9392505050565b60006020820190508181036000830152610d028184610b26565b905092915050565b60006020820190508181036000830152610d248184610b84565b905092915050565b60006020820190508181036000830152610d468184610c22565b905092915050565b60006020820190508181036000830152610d6781610c5b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610e1d82610efe565b9150610e2883610efe565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610e5d57610e5c610f84565b5b828201905092915050565b6000610e7382610efe565b9150610e7e83610efe565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610eb757610eb6610f84565b5b828202905092915050565b6000610ecd82610ede565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610f26578082015181840152602081019050610f0b565b83811115610f35576000848401525b50505050565b6000610f4682610efe565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610f7957610f78610f84565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000601f19601f8301169050919050565b7f416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7460008201527f7261637400000000000000000000000000000000000000000000000000000000602082015250565b61101c81610ec2565b811461102757600080fd5b50565b61103381610ed4565b811461103e57600080fd5b50565b61104a81610efe565b811461105557600080fd5b5056fe416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564a164736f6c6343000804000a"; + static readonly abi: ({ + inputs: any[]; + stateMutability: string; + type: string; + name?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + })[]; + static createInterface(): BalancesHelperV2Interface; + static connect(address: string, signerOrProvider: Signer | Provider): BalancesHelperV2; +} +export {}; diff --git a/dist/typings/factories/BalancesHelperV2__factory.js b/dist/typings/factories/BalancesHelperV2__factory.js new file mode 100644 index 00000000..a6503a67 --- /dev/null +++ b/dist/typings/factories/BalancesHelperV2__factory.js @@ -0,0 +1,124 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BalancesHelperV2__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "AccountZeroAddress", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "TokenZeroAddress", + type: "error", + }, + { + inputs: [ + { + internalType: "address[]", + name: "accounts", + type: "address[]", + }, + { + internalType: "address[]", + name: "tokens", + type: "address[]", + }, + ], + name: "getBalances", + outputs: [ + { + internalType: "uint256[]", + name: "", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "accounts", + type: "address[]", + }, + { + internalType: "address[]", + name: "tokens", + type: "address[]", + }, + ], + name: "getSuperfluidWrappedTokenBalances", + outputs: [ + { + internalType: "int256[]", + name: "", + type: "int256[]", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +const _bytecode = "0x608060405234801561001057600080fd5b5061108a806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806350c5a7101461003b578063ef5bfc371461006b575b600080fd5b610055600480360381019061005091906109e6565b61009b565b6040516100629190610ce8565b60405180910390f35b610085600480360381019061008091906109e6565b610279565b6040516100929190610d0a565b60405180910390f35b6060600083839050868690506100b19190610e68565b67ffffffffffffffff8111156100f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405190808252806020026020018201604052801561011e5781602001602082028036833780820191505090505b50905060005b8686905081101561026c5760005b85859050811015610258576000828787905061014e9190610e68565b826101599190610e12565b90506101ff898985818110610197577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906101ac91906109bd565b8888858181106101e5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906101fa91906109bd565b610457565b848281518110610238577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101818152505050808061025090610f3b565b915050610132565b50808061026490610f3b565b915050610124565b5080915050949350505050565b60606000838390508686905061028f9190610e68565b67ffffffffffffffff8111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102fc5781602001602082028036833780820191505090505b50905060005b8686905081101561044a5760005b85859050811015610436576000828787905061032c9190610e68565b826103379190610e12565b90506103dd898985818110610375577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b905060200201602081019061038a91906109bd565b8888858181106103c3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90506020020160208101906103d891906109bd565b610608565b848281518110610416577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101818152505050808061042e90610f3b565b915050610310565b50808061044290610f3b565b915050610302565b5080915050949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156104cc5782826040517f484305ff0000000000000000000000000000000000000000000000000000000081526004016104c3929190610cbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156105405782826040517f41f93bdf000000000000000000000000000000000000000000000000000000008152600401610537929190610cbf565b60405180910390fd5b60006105e0632ec8eec760e01b8560405160240161055e9190610ca4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050508473ffffffffffffffffffffffffffffffffffffffff166107b090919063ffffffff16565b90506000818060200190518101906105f89190610a5b565b5050509050809250505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561067d5782826040517f484305ff000000000000000000000000000000000000000000000000000000008152600401610674929190610cbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156106f15782826040517f41f93bdf0000000000000000000000000000000000000000000000000000000081526004016106e8929190610cbf565b60405180910390fd5b60006107916370a0823160e01b8560405160240161070f9190610ca4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050508473ffffffffffffffffffffffffffffffffffffffff166107b090919063ffffffff16565b9050808060200190518101906107a79190610abe565b91505092915050565b60606107d58383604051806060016040528060258152602001611059602591396107dd565b905092915050565b60606107e8846108aa565b610827576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081e90610d4e565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168560405161084f9190610c8d565b600060405180830381855afa9150503d806000811461088a576040519150601f19603f3d011682016040523d82523d6000602084013e61088f565b606091505b509150915061089f8282866108cd565b925050509392505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b606083156108dd5782905061092d565b6000835111156108f05782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109249190610d2c565b60405180910390fd5b9392505050565b60008135905061094381611013565b92915050565b60008083601f84011261095b57600080fd5b8235905067ffffffffffffffff81111561097457600080fd5b60208301915083602082028301111561098c57600080fd5b9250929050565b6000815190506109a28161102a565b92915050565b6000815190506109b781611041565b92915050565b6000602082840312156109cf57600080fd5b60006109dd84828501610934565b91505092915050565b600080600080604085870312156109fc57600080fd5b600085013567ffffffffffffffff811115610a1657600080fd5b610a2287828801610949565b9450945050602085013567ffffffffffffffff811115610a4157600080fd5b610a4d87828801610949565b925092505092959194509250565b60008060008060808587031215610a7157600080fd5b6000610a7f87828801610993565b9450506020610a90878288016109a8565b9350506040610aa1878288016109a8565b9250506060610ab2878288016109a8565b91505092959194509250565b600060208284031215610ad057600080fd5b6000610ade848285016109a8565b91505092915050565b6000610af38383610c13565b60208301905092915050565b6000610b0b8383610c7e565b60208301905092915050565b610b2081610ec2565b82525050565b6000610b3182610d8e565b610b3b8185610dd4565b9350610b4683610d6e565b8060005b83811015610b77578151610b5e8882610ae7565b9750610b6983610dba565b925050600181019050610b4a565b5085935050505092915050565b6000610b8f82610d99565b610b998185610de5565b9350610ba483610d7e565b8060005b83811015610bd5578151610bbc8882610aff565b9750610bc783610dc7565b925050600181019050610ba8565b5085935050505092915050565b6000610bed82610da4565b610bf78185610df6565b9350610c07818560208601610f08565b80840191505092915050565b610c1c81610ed4565b82525050565b6000610c2d82610daf565b610c378185610e01565b9350610c47818560208601610f08565b610c5081610fb3565b840191505092915050565b6000610c68602483610e01565b9150610c7382610fc4565b604082019050919050565b610c8781610efe565b82525050565b6000610c998284610be2565b915081905092915050565b6000602082019050610cb96000830184610b17565b92915050565b6000604082019050610cd46000830185610b17565b610ce16020830184610b17565b9392505050565b60006020820190508181036000830152610d028184610b26565b905092915050565b60006020820190508181036000830152610d248184610b84565b905092915050565b60006020820190508181036000830152610d468184610c22565b905092915050565b60006020820190508181036000830152610d6781610c5b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000610e1d82610efe565b9150610e2883610efe565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610e5d57610e5c610f84565b5b828201905092915050565b6000610e7382610efe565b9150610e7e83610efe565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610eb757610eb6610f84565b5b828202905092915050565b6000610ecd82610ede565b9050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610f26578082015181840152602081019050610f0b565b83811115610f35576000848401525b50505050565b6000610f4682610efe565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610f7957610f78610f84565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000601f19601f8301169050919050565b7f416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e7460008201527f7261637400000000000000000000000000000000000000000000000000000000602082015250565b61101c81610ec2565b811461102757600080fd5b50565b61103381610ed4565b811461103e57600080fd5b50565b61104a81610efe565b811461105557600080fd5b5056fe416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564a164736f6c6343000804000a"; +const isSuperArgs = (xs) => xs.length > 1; +class BalancesHelperV2__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.BalancesHelperV2__factory = BalancesHelperV2__factory; +BalancesHelperV2__factory.bytecode = _bytecode; +BalancesHelperV2__factory.abi = _abi; diff --git a/dist/typings/factories/BalancesHelper__factory.d.ts b/dist/typings/factories/BalancesHelper__factory.d.ts new file mode 100644 index 00000000..31830af0 --- /dev/null +++ b/dist/typings/factories/BalancesHelper__factory.d.ts @@ -0,0 +1,34 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { BalancesHelper, BalancesHelperInterface } from "../BalancesHelper"; +declare type BalancesHelperConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class BalancesHelper__factory extends ContractFactory { + constructor(...args: BalancesHelperConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): BalancesHelper; + connect(signer: Signer): BalancesHelper__factory; + static readonly bytecode = "0x608060405234801561001057600080fd5b50610c9c806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806317bd5f8e14610051578063472d3df91461009a5780635a7e4693146100f9578063ef5bfc3714610158575b600080fd5b6100986004803603602081101561006757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061027b565b005b6100e1600480360360208110156100b057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061027e565b60405180821515815260200191505060405180910390f35b6101406004803603602081101561010f57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610285565b60405180821515815260200191505060405180910390f35b6102246004803603604081101561016e57600080fd5b810190808035906020019064010000000081111561018b57600080fd5b82018360208201111561019d57600080fd5b803590602001918460208302840111640100000000831117156101bf57600080fd5b9091929391929390803590602001906401000000008111156101e057600080fd5b8201836020820111156101f257600080fd5b8035906020019184602083028401116401000000008311171561021457600080fd5b9091929391929390505050610290565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561026757808201518184015260208101905061024c565b505050509050019250505060405180910390f35b50565b6000919050565b600060019050919050565b60606102a667bed82bc7b31d926060c01b61027b565b6102ba670ad6239a645f6f1a60c01b61027b565b6102ce67cf0e105ac59b225860c01b61027b565b60606102e984849050878790506105e690919063ffffffff16565b67ffffffffffffffff811180156102ff57600080fd5b5060405190808252806020026020018201604052801561032e5781602001602082028036833780820191505090505b5090506103456740eb63f5a5b3454160c01b61027b565b610359672ba25298f06e8d9060c01b61027b565b60005b868690508110156105b15761037b67a6fb8e2f838ed8a260c01b61027b565b61038f679c159ae136ea106860c01b61027b565b60005b858590508110156105a3576103b1670a67ae6ad3cc298c60c01b61027b565b6103c56704575a552248a9e260c01b61027b565b60006103ef6103e084898990506105e690919063ffffffff16565b8361079990919063ffffffff16565b905061040567df68981fd24ab80360c01b61027b565b61041967fcc7848d2c0eead560c01b61027b565b600073ffffffffffffffffffffffffffffffffffffffff1687878481811061043d57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105145761048967643edec54fbd66ec60c01b61027b565b61049d675c7294844336638f60c01b61027b565b6104f78989858181106104ac57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168888858181106104d557fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff166108d6565b84828151811061050357fe5b602002602001018181525050610595565b61052867e4c108fb47848eb860c01b61027b565b61053c67f14b85a8def73f7d60c01b61027b565b88888481811061054857fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163184828151811061058857fe5b6020026020010181815250505b508080600101915050610392565b50808060010191505061035c565b506105c6677ba838556773e9a560c01b61027b565b6105da677c42eb2954c3c7a160c01b61027b565b80915050949350505050565b60006105fc6781f866e7745a2bf560c01b610c68565b610610670beffe334331686060c01b610c68565b61062467d41c0321e0722e1860c01b610c68565b60008314156106725761064167727c93b903ed0ba760c01b610c68565b610655679e3db2fdc2fa724660c01b610c68565b61066967c0bc0b16c53ec3cb60c01b610c68565b60009050610793565b6106866763360ea0a510797160c01b610c68565b61069a67460fe2a347b59c8860c01b610c68565b6106ae6709f7be5665f2893f60c01b610c68565b600082840290506106c96798d1e4c3922ccdd060c01b610c68565b6106dd672eedc14807cf316b60c01b610c68565b6106f16773f87d6761c5739360c01b610c68565b828482816106fb57fe5b0414610752576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180610c6c6024913960400191505060405180910390fd5b6107666703de5f23269c10fa60c01b610c68565b61077a6719ea5578172e5c2160c01b610c68565b61078e6724595330d45e1d0960c01b610c68565b809150505b92915050565b60006107af67c86b29cadf0259cc60c01b610c68565b6107c3671cf2fd19ce80bc6460c01b610c68565b6107d767084e3d10c702b08960c01b610c68565b600082840190506107f2678715f5819eec045d60c01b610c68565b61080667389bd6f3088f8ddc60c01b610c68565b61081a67395edfe58ce67c0160c01b610c68565b83811015610890576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174684c69623a206164646974696f6e206f766572666c6f77000081525060200191505060405180910390fd5b6108a467112f71c9280eda0a60c01b610c68565b6108b8673364fede1fdbaa8a60c01b610c68565b6108cc6709a89731fdc49fbb60c01b610c68565b8091505092915050565b60006108ec672a248b9234cdec9760c01b61027b565b610900675d62c90f8eb6f06d60c01b61027b565b610914674355afa506009a8760c01b61027b565b600061092a67604b1d9fe83c0ff760c01b61027b565b61093e674420d0f955c6ce5960c01b61027b565b600061095467826a89ca94b654dc60c01b61027b565b833b905061096c67a4ce69987e31423360c01b61027b565b6109806736433f272331653a60c01b61027b565b6000811115610c205761099d67ae79fae0514c06f560c01b61027b565b6109b16786e6075d08a3926560c01b61027b565b6109c567d7c1377df872ccd760c01b61027b565b60008473ffffffffffffffffffffffffffffffffffffffff166370a0823160e01b87604051602401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310610a9d5780518252602082019150602081019050602083039250610a7a565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114610afd576040519150601f19603f3d011682016040523d82523d6000602084013e610b02565b606091505b50509050610b1a67fb0a3b7b1f22ae7460c01b61027b565b610b2e67ead04bad9953117960c01b61027b565b8015610c0557610b4867139d68566bd70b2260c01b61027b565b610b5c6708212851b27d604c60c01b61027b565b8473ffffffffffffffffffffffffffffffffffffffff166370a08231876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610bc357600080fd5b505afa158015610bd7573d6000803e3d6000fd5b505050506040513d6020811015610bed57600080fd5b81019080805190602001909291905050509250610c1a565b610c196789fe98fa34cd8aa360c01b61027b565b5b50610c35565b610c34675124d5d93d685da760c01b61027b565b5b610c49677b303c61ef4e09f560c01b61027b565b610c5d67a2f0f2ed006054f160c01b61027b565b819250505092915050565b5056fe536166654d6174684c69623a206d756c7469706c69636174696f6e206f766572666c6f77a164736f6c634300060c000a"; + static readonly abi: { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + }[]; + static createInterface(): BalancesHelperInterface; + static connect(address: string, signerOrProvider: Signer | Provider): BalancesHelper; +} +export {}; diff --git a/dist/typings/factories/BalancesHelper__factory.js b/dist/typings/factories/BalancesHelper__factory.js new file mode 100644 index 00000000..7d5d5e71 --- /dev/null +++ b/dist/typings/factories/BalancesHelper__factory.js @@ -0,0 +1,114 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BalancesHelper__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "bytes8", + name: "c__053a243a", + type: "bytes8", + }, + ], + name: "c_053a243a", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__053a243a", + type: "bytes8", + }, + ], + name: "c_false053a243a", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__053a243a", + type: "bytes8", + }, + ], + name: "c_true053a243a", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "accounts", + type: "address[]", + }, + { + internalType: "address[]", + name: "tokens", + type: "address[]", + }, + ], + name: "getBalances", + outputs: [ + { + internalType: "uint256[]", + name: "", + type: "uint256[]", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +const _bytecode = "0x608060405234801561001057600080fd5b50610c9c806100206000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806317bd5f8e14610051578063472d3df91461009a5780635a7e4693146100f9578063ef5bfc3714610158575b600080fd5b6100986004803603602081101561006757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061027b565b005b6100e1600480360360208110156100b057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061027e565b60405180821515815260200191505060405180910390f35b6101406004803603602081101561010f57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610285565b60405180821515815260200191505060405180910390f35b6102246004803603604081101561016e57600080fd5b810190808035906020019064010000000081111561018b57600080fd5b82018360208201111561019d57600080fd5b803590602001918460208302840111640100000000831117156101bf57600080fd5b9091929391929390803590602001906401000000008111156101e057600080fd5b8201836020820111156101f257600080fd5b8035906020019184602083028401116401000000008311171561021457600080fd5b9091929391929390505050610290565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561026757808201518184015260208101905061024c565b505050509050019250505060405180910390f35b50565b6000919050565b600060019050919050565b60606102a667bed82bc7b31d926060c01b61027b565b6102ba670ad6239a645f6f1a60c01b61027b565b6102ce67cf0e105ac59b225860c01b61027b565b60606102e984849050878790506105e690919063ffffffff16565b67ffffffffffffffff811180156102ff57600080fd5b5060405190808252806020026020018201604052801561032e5781602001602082028036833780820191505090505b5090506103456740eb63f5a5b3454160c01b61027b565b610359672ba25298f06e8d9060c01b61027b565b60005b868690508110156105b15761037b67a6fb8e2f838ed8a260c01b61027b565b61038f679c159ae136ea106860c01b61027b565b60005b858590508110156105a3576103b1670a67ae6ad3cc298c60c01b61027b565b6103c56704575a552248a9e260c01b61027b565b60006103ef6103e084898990506105e690919063ffffffff16565b8361079990919063ffffffff16565b905061040567df68981fd24ab80360c01b61027b565b61041967fcc7848d2c0eead560c01b61027b565b600073ffffffffffffffffffffffffffffffffffffffff1687878481811061043d57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105145761048967643edec54fbd66ec60c01b61027b565b61049d675c7294844336638f60c01b61027b565b6104f78989858181106104ac57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff168888858181106104d557fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff166108d6565b84828151811061050357fe5b602002602001018181525050610595565b61052867e4c108fb47848eb860c01b61027b565b61053c67f14b85a8def73f7d60c01b61027b565b88888481811061054857fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163184828151811061058857fe5b6020026020010181815250505b508080600101915050610392565b50808060010191505061035c565b506105c6677ba838556773e9a560c01b61027b565b6105da677c42eb2954c3c7a160c01b61027b565b80915050949350505050565b60006105fc6781f866e7745a2bf560c01b610c68565b610610670beffe334331686060c01b610c68565b61062467d41c0321e0722e1860c01b610c68565b60008314156106725761064167727c93b903ed0ba760c01b610c68565b610655679e3db2fdc2fa724660c01b610c68565b61066967c0bc0b16c53ec3cb60c01b610c68565b60009050610793565b6106866763360ea0a510797160c01b610c68565b61069a67460fe2a347b59c8860c01b610c68565b6106ae6709f7be5665f2893f60c01b610c68565b600082840290506106c96798d1e4c3922ccdd060c01b610c68565b6106dd672eedc14807cf316b60c01b610c68565b6106f16773f87d6761c5739360c01b610c68565b828482816106fb57fe5b0414610752576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180610c6c6024913960400191505060405180910390fd5b6107666703de5f23269c10fa60c01b610c68565b61077a6719ea5578172e5c2160c01b610c68565b61078e6724595330d45e1d0960c01b610c68565b809150505b92915050565b60006107af67c86b29cadf0259cc60c01b610c68565b6107c3671cf2fd19ce80bc6460c01b610c68565b6107d767084e3d10c702b08960c01b610c68565b600082840190506107f2678715f5819eec045d60c01b610c68565b61080667389bd6f3088f8ddc60c01b610c68565b61081a67395edfe58ce67c0160c01b610c68565b83811015610890576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174684c69623a206164646974696f6e206f766572666c6f77000081525060200191505060405180910390fd5b6108a467112f71c9280eda0a60c01b610c68565b6108b8673364fede1fdbaa8a60c01b610c68565b6108cc6709a89731fdc49fbb60c01b610c68565b8091505092915050565b60006108ec672a248b9234cdec9760c01b61027b565b610900675d62c90f8eb6f06d60c01b61027b565b610914674355afa506009a8760c01b61027b565b600061092a67604b1d9fe83c0ff760c01b61027b565b61093e674420d0f955c6ce5960c01b61027b565b600061095467826a89ca94b654dc60c01b61027b565b833b905061096c67a4ce69987e31423360c01b61027b565b6109806736433f272331653a60c01b61027b565b6000811115610c205761099d67ae79fae0514c06f560c01b61027b565b6109b16786e6075d08a3926560c01b61027b565b6109c567d7c1377df872ccd760c01b61027b565b60008473ffffffffffffffffffffffffffffffffffffffff166370a0823160e01b87604051602401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310610a9d5780518252602082019150602081019050602083039250610a7a565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114610afd576040519150601f19603f3d011682016040523d82523d6000602084013e610b02565b606091505b50509050610b1a67fb0a3b7b1f22ae7460c01b61027b565b610b2e67ead04bad9953117960c01b61027b565b8015610c0557610b4867139d68566bd70b2260c01b61027b565b610b5c6708212851b27d604c60c01b61027b565b8473ffffffffffffffffffffffffffffffffffffffff166370a08231876040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610bc357600080fd5b505afa158015610bd7573d6000803e3d6000fd5b505050506040513d6020811015610bed57600080fd5b81019080805190602001909291905050509250610c1a565b610c196789fe98fa34cd8aa360c01b61027b565b5b50610c35565b610c34675124d5d93d685da760c01b61027b565b5b610c49677b303c61ef4e09f560c01b61027b565b610c5d67a2f0f2ed006054f160c01b61027b565b819250505092915050565b5056fe536166654d6174684c69623a206d756c7469706c69636174696f6e206f766572666c6f77a164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class BalancesHelper__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.BalancesHelper__factory = BalancesHelper__factory; +BalancesHelper__factory.bytecode = _bytecode; +BalancesHelper__factory.abi = _abi; diff --git a/dist/typings/factories/Controlled__factory.d.ts b/dist/typings/factories/Controlled__factory.d.ts new file mode 100644 index 00000000..2f943b29 --- /dev/null +++ b/dist/typings/factories/Controlled__factory.d.ts @@ -0,0 +1,22 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { Controlled, ControlledInterface } from "../Controlled"; +export declare class Controlled__factory { + static readonly abi: { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + }[]; + static createInterface(): ControlledInterface; + static connect(address: string, signerOrProvider: Signer | Provider): Controlled; +} diff --git a/dist/typings/factories/Controlled__factory.js b/dist/typings/factories/Controlled__factory.js new file mode 100644 index 00000000..bef2d156 --- /dev/null +++ b/dist/typings/factories/Controlled__factory.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Controlled__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "bytes8", + name: "c__e208e0f4", + type: "bytes8", + }, + ], + name: "c_e208e0f4", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__e208e0f4", + type: "bytes8", + }, + ], + name: "c_falsee208e0f4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__e208e0f4", + type: "bytes8", + }, + ], + name: "c_truee208e0f4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "controller", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +class Controlled__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.Controlled__factory = Controlled__factory; +Controlled__factory.abi = _abi; diff --git a/dist/typings/factories/ENSAddressResolver__factory.d.ts b/dist/typings/factories/ENSAddressResolver__factory.d.ts new file mode 100644 index 00000000..59e67471 --- /dev/null +++ b/dist/typings/factories/ENSAddressResolver__factory.d.ts @@ -0,0 +1,35 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { ENSAddressResolver, ENSAddressResolverInterface } from "../ENSAddressResolver"; +export declare class ENSAddressResolver__factory { + static readonly abi: ({ + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + outputs?: undefined; + stateMutability?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): ENSAddressResolverInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ENSAddressResolver; +} diff --git a/dist/typings/factories/ENSAddressResolver__factory.js b/dist/typings/factories/ENSAddressResolver__factory.js new file mode 100644 index 00000000..889d321b --- /dev/null +++ b/dist/typings/factories/ENSAddressResolver__factory.js @@ -0,0 +1,246 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ENSAddressResolver__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "addr", + type: "address", + }, + ], + name: "AddrChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "coinType", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "newAddress", + type: "bytes", + }, + ], + name: "AddressChanged", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "addr", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "uint256", + name: "coinType", + type: "uint256", + }, + ], + name: "addr", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__53f45729", + type: "bytes8", + }, + ], + name: "c_53f45729", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_ac93193e", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__53f45729", + type: "bytes8", + }, + ], + name: "c_false53f45729", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_falseac93193e", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__53f45729", + type: "bytes8", + }, + ], + name: "c_true53f45729", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_trueac93193e", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "uint256", + name: "coinType", + type: "uint256", + }, + { + internalType: "bytes", + name: "addr_", + type: "bytes", + }, + ], + name: "setAddr", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "address", + name: "addr_", + type: "address", + }, + ], + name: "setAddr", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; +class ENSAddressResolver__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.ENSAddressResolver__factory = ENSAddressResolver__factory; +ENSAddressResolver__factory.abi = _abi; diff --git a/dist/typings/factories/ENSController__factory.d.ts b/dist/typings/factories/ENSController__factory.d.ts new file mode 100644 index 00000000..bc6648ee --- /dev/null +++ b/dist/typings/factories/ENSController__factory.d.ts @@ -0,0 +1,74 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { ENSController, ENSControllerInterface } from "../ENSController"; +declare type ENSControllerConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class ENSController__factory extends ContractFactory { + constructor(...args: ENSControllerConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): ENSController; + connect(signer: Signer): ENSController__factory; + static readonly bytecode = "0x60806040523480156200001157600080fd5b506200002e676ed90a7f5cb15c7560c01b6200017e60201b60201c565b6200004a675e592fe27197979c60c01b6200018160201b60201c565b6200006667eca2e4778f3efef360c01b6200018160201b60201c565b32600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000c367ce0e365443bb826260c01b6200018460201b60201c565b620000df6783f6a3768f043c5060c01b6200018460201b60201c565b620000fb67f7775edf55ee500260c01b6200018460201b60201c565b6000620001196799c44ec6f63d8b6d60c01b6200018460201b60201c565b4690506200013867f60b0de5a48d87f360c01b6200018460201b60201c565b80600281905550506200015c67db84cf13641fc64d60c01b6200018760201b60201c565b62000178670b548d95b847a13b60c01b6200018a60201b60201c565b6200018d565b50565b50565b50565b50565b50565b6172c9806200019d6000396000f3fe608060405234801561001057600080fd5b506004361061038e5760003560e01c8063691f3431116101de578063a526d83b1161010f578063c8690233116100ad578063dc5b68a61161007c578063dc5b68a614610bb4578063e831bfba14610bd0578063f1cb7e0614610bec578063f6a7ea4514610c1c5761038e565b8063c869023314610b1b578063c8cc2aee14610b4c578063d0f710d614610b68578063d5fa2b0014610b985761038e565b8063bb8c7d90116100e9578063bb8c7d9014610a6f578063bc3bf0ee14610a8b578063c1cad69e14610abb578063c369d5fe14610aeb5761038e565b8063a526d83b14610a1b578063a545251f14610a37578063a91ee0dc14610a535761038e565b80637f1308641161017c5780639a8a0592116101565780639a8a05921461096d5780639c9affe11461098b578063a139df03146109bb578063a4db4b6b146109eb5761038e565b80637f130864146108f1578063812f6185146109215780638b95dd71146109515761038e565b806372d926b9116101b857806372d926b91461086b578063773722131461089b5780637b103999146108b75780637d0e0e7e146108d55761038e565b8063691f3431146107ef5780636df0cf421461081f578063714041561461084f5761038e565b806321a5f5da116102c35780633b3b57de11610261578063589731f811610230578063589731f81461074357806359d1d43c146107735780635ff7f23b146107a3578063601c22bd146107d35761038e565b80633b3b57de146106bf57806346386f73146106ef5780635405622e1461070b57806355800f87146107275761038e565b80632e6afd6e1161029d5780632e6afd6e14610611578063375f2ca9146106415780633786d2ae14610671578063392e53cd146106a15761038e565b806321a5f5da146105a957806329ae6a7e146105d957806329cd62ea146105f55761038e565b8063116191b6116103305780631727a5fa1161030a5780631727a5fa1461052557806318121646146105415780631970b9521461055d5780631b3cd142146105795761038e565b8063116191b6146104a75780631262ed1c146104c5578063154721e6146104f55761038e565b80630c3bf3211161036c5780630c3bf3211461040f5780630c4b1a171461043f5780630c68ba211461045b57806310f13a8c1461048b5761038e565b806301ffc9a71461039357806306e88aec146103c35780630a178bc2146103f3575b600080fd5b6103ad60048036038101906103a89190615c98565b610c4c565b6040516103ba9190616ac9565b60405180910390f35b6103dd60048036038101906103d89190615cc1565b61102a565b6040516103ea9190616ac9565b60405180910390f35b61040d60048036038101906104089190615cc1565b611035565b005b61042960048036038101906104249190615cc1565b611038565b6040516104369190616ac9565b60405180910390f35b61045960048036038101906104549190615cc1565b611043565b005b6104756004803603810190610470919061594a565b611046565b6040516104829190616ac9565b60405180910390f35b6104a560048036038101906104a09190615b6c565b6110d7565b005b6104af6112aa565b6040516104bc9190616a6a565b60405180910390f35b6104df60048036038101906104da9190615cc1565b6112d0565b6040516104ec9190616ac9565b60405180910390f35b61050f600480360381019061050a9190615cc1565b6112db565b60405161051c9190616ac9565b60405180910390f35b61053f600480360381019061053a9190615cc1565b6112e6565b005b61055b60048036038101906105569190615cc1565b6112e9565b005b61057760048036038101906105729190615cc1565b6112ec565b005b610593600480360381019061058e919061599c565b6112ef565b6040516105a09190616a6a565b60405180910390f35b6105c360048036038101906105be9190615cc1565b611322565b6040516105d09190616ac9565b60405180910390f35b6105f360048036038101906105ee919061599c565b61132d565b005b61060f600480360381019061060a9190615a01565b611692565b005b61062b60048036038101906106269190615cc1565b611849565b6040516106389190616ac9565b60405180910390f35b61065b60048036038101906106569190615cc1565b611850565b6040516106689190616ac9565b60405180910390f35b61068b60048036038101906106869190615cc1565b611857565b6040516106989190616ac9565b60405180910390f35b6106a9611862565b6040516106b69190616ac9565b60405180910390f35b6106d960048036038101906106d4919061599c565b6118f7565b6040516106e69190616a6a565b60405180910390f35b61070960048036038101906107049190615a50565b611945565b005b61072560048036038101906107209190615cc1565b611e33565b005b610741600480360381019061073c919061599c565b611e36565b005b61075d60048036038101906107589190615cc1565b61224b565b60405161076a9190616ac9565b60405180910390f35b61078d60048036038101906107889190615b14565b612252565b60405161079a9190616c4a565b60405180910390f35b6107bd60048036038101906107b89190615cc1565b612363565b6040516107ca9190616ac9565b60405180910390f35b6107ed60048036038101906107e89190615cc1565b61236e565b005b6108096004803603810190610804919061599c565b612371565b6040516108169190616c4a565b60405180910390f35b61083960048036038101906108349190615d7f565b612462565b6040516108469190616ae4565b60405180910390f35b6108696004803603810190610864919061594a565b6124be565b005b61088560048036038101906108809190615cc1565b612866565b6040516108929190616ac9565b60405180910390f35b6108b560048036038101906108b09190615b14565b61286d565b005b6108bf612a08565b6040516108cc9190616c0b565b60405180910390f35b6108ef60048036038101906108ea919061599c565b612a2e565b005b61090b60048036038101906109069190615cc1565b612e62565b6040516109189190616ac9565b60405180910390f35b61093b60048036038101906109369190615cc1565b612e6d565b6040516109489190616ac9565b60405180910390f35b61096b60048036038101906109669190615c31565b612e74565b005b610975612fa9565b6040516109829190616f2c565b60405180910390f35b6109a560048036038101906109a09190615cc1565b612faf565b6040516109b29190616ac9565b60405180910390f35b6109d560048036038101906109d09190615cc1565b612fb6565b6040516109e29190616ac9565b60405180910390f35b610a056004803603810190610a009190615cc1565b612fc1565b604051610a129190616ac9565b60405180910390f35b610a356004803603810190610a30919061594a565b612fcc565b005b610a516004803603810190610a4c9190615cc1565b61313f565b005b610a6d6004803603810190610a689190615cea565b613142565b005b610a896004803603810190610a849190615cc1565b6134fb565b005b610aa56004803603810190610aa09190615cc1565b6134fe565b604051610ab29190616ac9565b60405180910390f35b610ad56004803603810190610ad09190615cc1565b613505565b604051610ae29190616ac9565b60405180910390f35b610b056004803603810190610b009190615cc1565b61350c565b604051610b129190616ac9565b60405180910390f35b610b356004803603810190610b30919061599c565b613513565b604051610b43929190616b28565b60405180910390f35b610b666004803603810190610b61919061599c565b613589565b005b610b826004803603810190610b7d9190615abc565b613a3d565b604051610b8f9190616ac9565b60405180910390f35b610bb26004803603810190610bad91906159c5565b613ad2565b005b610bce6004803603810190610bc99190615d13565b613c05565b005b610bea6004803603810190610be59190615cc1565b613fbc565b005b610c066004803603810190610c019190615bf5565b613fbf565b604051610c139190616be9565b60405180910390f35b610c366004803603810190610c319190615cc1565b6140c2565b604051610c439190616ac9565b60405180910390f35b6000610c6267cc546c9f9cf6e5b860c01b6112e6565b610c76679247758156b934c960c01b6112e6565b610c8a6752f48de5e8aa120760c01b6112e6565b604051602001610c999061697c565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610d0b5750610d0a670c507e069bb981a360c01b611038565b5b80610daf5750604051602001610d20906169b7565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610d925750610d9167e9126e671623888260c01b611038565b5b8015610dae5750610dad67fb050db7b7e0aeaa60c01b611038565b5b5b80610e535750604051602001610dc490616a0b565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610e365750610e3567e1c43482dce27a7c60c01b611038565b5b8015610e525750610e5167e2454ec1ca837a3160c01b611038565b5b5b80610ef75750604051602001610e68906169e1565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610eda5750610ed967ef1ecb53646cfb3260c01b611038565b5b8015610ef65750610ef567e883bfc7c4cd612d60c01b611038565b5b5b80610f9b5750604051602001610f0c906169f6565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610f7e5750610f7d6755d4a664940531a760c01b611038565b5b8015610f9a5750610f996733a28e5539f195c160c01b611038565b5b5b806110235750604051602001610fb0906169cc565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614801561102257506110216737472d659f7c2bd960c01b611038565b5b5b9050919050565b600060019050919050565b50565b600060019050919050565b50565b600061105c67d9e99bddfebda2f060c01b611e33565b611070676401fd9fc2105e0160c01b611e33565b6110846733760aa820b07e2a60c01b611e33565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6110eb67f946de71aca822c060c01b6112ec565b8461110067f50d5b47a249620260c01b6134fb565b6111146780a9a7e92d8b8f3360c01b6134fb565b6111276633700746b9ddbf60c01b6134fb565b61113b670296e3014015bcc160c01b6134fb565b611144816140c9565b611183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117a90616eec565b60405180910390fd5b611197674c282dc748e87be160c01b6134fb565b6111ab67fe7c4e4b475a952f60c01b6134fb565b6111bf6724625e51986e127b60c01b6112ec565b6111d3675c4552df7d791b7960c01b6112ec565b6111e767c2fbf86a18bf401a60c01b6112ec565b828260076000898152602001908152602001600020878760405161120c929190616963565b90815260200160405180910390209190611227929190615608565b5061123c6711527526351a910960c01b6112ec565b61125067b03e44f2a847e85760c01b6112ec565b8484604051611260929190616963565b6040518091039020867fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a7550878760405161129a929190616c26565b60405180910390a3505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b600060019050919050565b50565b50565b50565b60096020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b61134167a6cf1214afd7b4ab60c01b6112e6565b611355673bac9d8ba1319faf60c01b6112e6565b61136967678dbf255aa39dbf60c01b6112e6565b60006113736141ee565b905061138967763ad9663570b58d60c01b6112e6565b61139d67383fa3baf1c1946360c01b6112e6565b6113b1672ef6333f2223b1df60c01b6112e6565b3073ffffffffffffffffffffffffffffffffffffffff166113d18361423b565b73ffffffffffffffffffffffffffffffffffffffff1614611427576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141e90616d4c565b60405180910390fd5b61143b67de6886b0240cccf860c01b6112e6565b61144f67dfa5ea06e65d350f60c01b6112e6565b61146367404c0d706e526d6a60c01b6112e6565b61147767fc44e334be7e393360c01b6112e6565b8073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611518576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150f90616c8c565b60405180910390fd5b61152c6758ebc510ca5b5c9d60c01b6112e6565b61154067b1c514689ffae80960c01b6112e6565b6115546783fd5b7291daa95f60c01b6112e6565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b0fc9c383836040518363ffffffff1660e01b81526004016115b1929190616aff565b600060405180830381600087803b1580156115cb57600080fd5b505af11580156115df573d6000803e3d6000fd5b505050506115f767b040ef9043e1792560c01b6112e6565b6009600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905561164167ee421259567d236160c01b6112e6565b6116556763756edc6879694a60c01b6112e6565b7f7803a16d95f9ca635bdec561006625e7444d8a9f8463866643cc03af011779d38282604051611686929190616aff565b60405180910390a15050565b6116a667fa2e41783e8f062160c01b61236e565b826116bb67f50d5b47a249620260c01b6134fb565b6116cf6780a9a7e92d8b8f3360c01b6134fb565b6116e26633700746b9ddbf60c01b6134fb565b6116f6670296e3014015bcc160c01b6134fb565b6116ff816140c9565b61173e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173590616eec565b60405180910390fd5b611752674c282dc748e87be160c01b6134fb565b61176667fe7c4e4b475a952f60c01b6134fb565b61177a67e576665e414504e260c01b61236e565b61178e67c1951a6bf731415c60c01b61236e565b6117a267bcf9daa89781fa9260c01b61236e565b6040518060400160405280848152602001838152506006600086815260200190815260200160002060008201518160000155602082015181600101559050506117f5677d38cddaa73b4cd560c01b61236e565b611809674e369557c4cc689460c01b61236e565b837f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e46848460405161183b929190616b28565b60405180910390a250505050565b6000919050565b6000919050565b600060019050919050565b60006118786726ed6cc6ca12515c60c01b6112e9565b61188c67f3fc49482028cbb860c01b6112e9565b6118a06740317a79cae6a3ff60c01b6112e9565b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b600061190d673d62ab4d7710acbc60c01b61313f565b61192167f5ec18cba7ac1a7d60c01b61313f565b611935679db22e70efceb86460c01b61313f565b61193e8261423b565b9050919050565b611959671d680aabd6ed520f60c01b6112e6565b61196d670db8f7bdfadfeff060c01b6112e6565b611981671ae6c451e60de92860c01b6112e6565b600061198b6141ee565b90506119a167f7d32d8906820d3f60c01b6112e6565b6119b5676b5ecf2ad2717b6660c01b6112e6565b60006119c2828787614416565b90506119d8678930eff28cf2c04160c01b6112e6565b6119ec679f20e9b17500460560c01b6112e6565b611a00677ca89a569a225a0560c01b6112e6565b611a4e8185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506144aa565b611a8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8490616cac565b60405180910390fd5b611aa167c89c5256c255cd4560c01b6112e6565b611ab56706cfd7286ad73d8260c01b6112e6565b611ac9672058869716de787360c01b6112e6565b60008686604051602001611ade929190616937565b604051602081830303815290604052805190602001209050611b0a67914e8e51289ed81b60c01b6112e6565b611b1e67b640d92f5e3a92a160c01b6112e6565b611b32672e77c73401cfa3be60c01b6112e6565b3073ffffffffffffffffffffffffffffffffffffffff16611b528861423b565b73ffffffffffffffffffffffffffffffffffffffff1614611ba8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9f90616d2c565b60405180910390fd5b611bbc671b56bb304504aee160c01b6112e6565b611bd067f8d825a0eb024ee360c01b6112e6565b611be467e3cd54bfdb3dbc1960c01b6112e6565b611bf867df5cb1449bda7ee460c01b6112e6565b600073ffffffffffffffffffffffffffffffffffffffff16611c198261423b565b73ffffffffffffffffffffffffffffffffffffffff1614611c6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c6690616ccc565b60405180910390fd5b611c836787d3535b4980b13660c01b6112e6565b611c976794acf06b83d557f660c01b6112e6565b611cab6760f4aa612cf7d42160c01b6112e6565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635ef2c7f08888303060006040518663ffffffff1660e01b8152600401611d0f959493929190616b51565b600060405180830381600087803b158015611d2957600080fd5b505af1158015611d3d573d6000803e3d6000fd5b50505050611d5567c9e082359969231260c01b6112e6565b611d69671d740df0723fd05a60c01b6112e6565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b0fc9c382856040518363ffffffff1660e01b8152600401611dc6929190616aff565b600060405180830381600087803b158015611de057600080fd5b505af1158015611df4573d6000803e3d6000fd5b50505050611e0c6726f59b7ef8763d4f60c01b6112e6565b611e20673a0a0fb27f49257160c01b6112e6565b611e2a818461457c565b50505050505050565b50565b611e4a675c585e7ab40c4bd160c01b6112e6565b611e5e67b6bede9bd2147dbe60c01b6112e6565b611e7267b3e36ec211dc37a060c01b6112e6565b6000611e7c6141ee565b9050611e92671fb3f2271177d64f60c01b6112e6565b611ea667bc7e7b081ba18bb360c01b6112e6565b611eba67eb66ea1dc8fe90f060c01b6112e6565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff1660e01b8152600401611f159190616ae4565b60206040518083038186803b158015611f2d57600080fd5b505afa158015611f41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f659190615973565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611fd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fc990616d8c565b60405180910390fd5b611fe66780681ba3d3bd6c0560c01b6112e6565b611ffa67c2ee83ed18bdad0d60c01b6112e6565b61200e673ab44ffb1086bfbb60c01b6112e6565b61202267b48e8fb56cf659bd60c01b6112e6565b3073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf846040518263ffffffff1660e01b81526004016120949190616ae4565b60206040518083038186803b1580156120ac57600080fd5b505afa1580156120c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e49190615973565b73ffffffffffffffffffffffffffffffffffffffff161461213a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161213190616c6c565b60405180910390fd5b61214e67c460fb6a3efa6b6460c01b6112e6565b61216267a0dfc273c95e8b5860c01b6112e6565b612176672ac52e24f30b86ad60c01b6112e6565b61218a67111495d151c5ac5b60c01b6112e6565b600073ffffffffffffffffffffffffffffffffffffffff166121ab8361423b565b73ffffffffffffffffffffffffffffffffffffffff1614612201576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f890616e2c565b60405180910390fd5b612215674f033fc1bc83014b60c01b6112e6565b61222967f2a8865b6120c72860c01b6112e6565b61223d67c12905e462874f3a60c01b6112e6565b612247828261457c565b5050565b6000919050565b6060612268676429ed32e33f625a60c01b6112ec565b61227c670f050634fa8ef71f60c01b6112ec565b61229067f381eb2aa4a89bb460c01b6112ec565b6007600085815260200190815260200160002083836040516122b3929190616963565b90815260200160405180910390208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156123555780601f1061232a57610100808354040283529160200191612355565b820191906000526020600020905b81548152906001019060200180831161233857829003601f168201915b505050505090509392505050565b600060019050919050565b50565b6060612387677dcc04d7d9f56a1b60c01b611035565b61239b677450a3614229955160c01b611035565b6123af673d818fa87e1f8bcc60c01b611035565b600560008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124565780601f1061242b57610100808354040283529160200191612456565b820191906000526020600020905b81548152906001019060200180831161243957829003601f168201915b50505050509050919050565b60006124786722bd6e296e0c77b260c01b6112e6565b61248c67752430d62c413d8c60c01b6112e6565b6124a0674ca0e2f1f026937160c01b6112e6565b6124b7826000015183602001518460400151614416565b9050919050565b6124d267f772222a3366273960c01b611e33565b6124e6677e48a4752a028e1460c01b611e33565b6124fa6754e2f8cd8fda0cfe60c01b611e33565b61250e671b1abbc8110e006760c01b611e33565b612522677621c15edc08840a60c01b611e33565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166125ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125a490616dac565b60405180910390fd5b6125c1671978b446280e03b660c01b611e33565b6125d567bc99b99e8c2c7a2260c01b611e33565b6125e967afd0aa94ba119c4e60c01b611e33565b6125fd670fe65c577fbdf81160c01b611e33565b61261167e175d6b24c96a59a60c01b611e33565b61262567514f675749914bc160c01b611e33565b61263967fed39a5b1d24bceb60c01b611e33565b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614156126a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161269f90616eac565b60405180910390fd5b6126bc67325d0391dd900ca560c01b611e33565b6126d067f494ac4bc126e05760c01b611e33565b6126e467a8a2f5acd805e41c60c01b611e33565b6126f8679f1149f801dce85b60c01b611e33565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16612783576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161277a90616e4c565b60405180910390fd5b61279767e767f88c374b22f760c01b611e33565b6127ab679a8eb2ad91b01fb960c01b611e33565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612816675f52f4e3c8e1709960c01b611e33565b61282a67b8b235546176405e60c01b611e33565b7fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b328260405161285b929190616aa0565b60405180910390a150565b6000919050565b612881670e0365d875262ec660c01b611035565b8261289667f50d5b47a249620260c01b6134fb565b6128aa6780a9a7e92d8b8f3360c01b6134fb565b6128bd6633700746b9ddbf60c01b6134fb565b6128d1670296e3014015bcc160c01b6134fb565b6128da816140c9565b612919576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161291090616eec565b60405180910390fd5b61292d674c282dc748e87be160c01b6134fb565b61294167fe7c4e4b475a952f60c01b6134fb565b61295567bc7bd04a73b6203660c01b611035565b6129696759a9263c415da46560c01b611035565b61297d679a75a86e63f4699c60c01b611035565b828260056000878152602001908152602001600020919061299f929190615608565b506129b467c58e7e58e6033fa260c01b611035565b6129c867b5705ce309b25cc060c01b611035565b837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f784846040516129fa929190616c26565b60405180910390a250505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b612a4267b59f845eacd3e3d460c01b6112e6565b612a566703bed308595d82ec60c01b6112e6565b612a6a6735c05cb99b23924d60c01b6112e6565b6000612a746141ee565b9050612a8a676b524f27cda9e32960c01b6112e6565b612a9e6763afe5bb9ac610af60c01b6112e6565b612ab267a29647973f12d5ba60c01b6112e6565b600073ffffffffffffffffffffffffffffffffffffffff16612ad38361423b565b73ffffffffffffffffffffffffffffffffffffffff1614612b29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b2090616e0c565b60405180910390fd5b612b3d670d1d2b6f47605d7260c01b6112e6565b612b51671030c11d37f558d660c01b6112e6565b612b6567ae826e85957a1f1a60c01b6112e6565b612b7967313e6fb10339b26a60c01b6112e6565b600073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612c1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c1290616dec565b60405180910390fd5b612c2f67c35c95f5b2f5c41e60c01b6112e6565b612c4367d9475b94663b48f460c01b6112e6565b612c57676fe3715021747ac060c01b6112e6565b612c6b67248d6eedf15471ba60c01b6112e6565b8073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b8152600401612cdd9190616ae4565b60206040518083038186803b158015612cf557600080fd5b505afa158015612d09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d2d9190615973565b73ffffffffffffffffffffffffffffffffffffffff1614612d83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d7a90616e6c565b60405180910390fd5b612d9767b2f300dc39d598cc60c01b6112e6565b612dab67a0097a09cab9446160c01b6112e6565b806009600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612e1167a4975688d16fa0f660c01b6112e6565b612e25679471c1f926851d3d60c01b6112e6565b7fc1e082a8c26f27c26e1bf5d0ce7ddd579ec7f6d7eb3ea90d8abd6c40991bae368282604051612e56929190616aff565b60405180910390a15050565b600060019050919050565b6000919050565b612e8867f0dbbd97932a9cf460c01b61313f565b82612e9d67f50d5b47a249620260c01b6134fb565b612eb16780a9a7e92d8b8f3360c01b6134fb565b612ec46633700746b9ddbf60c01b6134fb565b612ed8670296e3014015bcc160c01b6134fb565b612ee1816140c9565b612f20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f1790616eec565b60405180910390fd5b612f34674c282dc748e87be160c01b6134fb565b612f4867fe7c4e4b475a952f60c01b6134fb565b612f5c679c2c6990d9886a8560c01b61313f565b612f706722b6aa590de919d760c01b61313f565b612f8467b344d0528ee48d4360c01b61313f565b612f9867f5c69e8e01e1972b60c01b61313f565b612fa38484846145d0565b50505050565b60025481565b6000919050565b600060019050919050565b600060019050919050565b612fe067b59862a5cb01d1d860c01b611e33565b612ff4677e48a4752a028e1460c01b611e33565b6130086754e2f8cd8fda0cfe60c01b611e33565b61301c671b1abbc8110e006760c01b611e33565b613030677621c15edc08840a60c01b611e33565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166130bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130b290616dac565b60405180910390fd5b6130cf671978b446280e03b660c01b611e33565b6130e367bc99b99e8c2c7a2260c01b611e33565b6130f767e0409d61ef95483b60c01b611e33565b61310b67acb2c628a7cbdba860c01b611e33565b61311f677f6b80ac4f415fbe60c01b611e33565b61313367c7dcdfc4bd89af4960c01b611e33565b61313c8161475f565b50565b50565b613156675ad357f5b5185dde60c01b6112e6565b61316a677e48a4752a028e1460c01b611e33565b61317e6754e2f8cd8fda0cfe60c01b611e33565b613192671b1abbc8110e006760c01b611e33565b6131a6677621c15edc08840a60c01b611e33565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16613231576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161322890616dac565b60405180910390fd5b613245671978b446280e03b660c01b611e33565b61325967bc99b99e8c2c7a2260c01b611e33565b61326d67b6d13a6838977b8e60c01b6112e6565b61328167b0a0962005d3c37760c01b6112e6565b61329567c0aefd843c12ea9e60c01b6112e6565b6132a967e642670e0d27f29260c01b6112e6565b6132bd67c0313a21cbd3821e60c01b6112e6565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561332d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161332490616dcc565b60405180910390fd5b613341675caac5a85133de4160c01b6112e6565b61335567a2be6d0f2de4dd4960c01b6112e6565b61336967d23b7832c1a8b2db60c01b6112e6565b61337d67a600bc2f5edecfe560c01b6112e6565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561340e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161340590616f0c565b60405180910390fd5b613422673e1cb88c06623dbd60c01b6112e6565b613436679fa0a30141c9e3c660c01b6112e6565b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061348b67b19c0378c1b36ce560c01b6112e6565b61349f67479d5cd353ac14bc60c01b6112e6565b7fdb0239c63d4033dcdd21bd44f8dd479a03efbae12f6bbe27c0a5f923d26514cc600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516134f09190616a6a565b60405180910390a150565b50565b6000919050565b6000919050565b6000919050565b60008061352a678b7eb94e0d7470e160c01b61236e565b61353e6713b8b8268dfccf6560c01b61236e565b61355267728bcb87d085989360c01b61236e565b6006600084815260200190815260200160002060000154600660008581526020019081526020016000206001015491509150915091565b61359d67cd6b89dfd7de4dbe60c01b6112e6565b6135b167fed9adae7726fca660c01b6112e6565b6135c56728deafdba22640fe60c01b6112e6565b60006135cf6141ee565b90506135e567abf597ba3b777beb60c01b6112e6565b6135f96713451046aa4f1d0460c01b6112e6565b61360d670d69672df90e55f760c01b6112e6565b600073ffffffffffffffffffffffffffffffffffffffff1661362e8361423b565b73ffffffffffffffffffffffffffffffffffffffff1614613684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161367b90616e0c565b60405180910390fd5b61369867335ee6ed9412f34d60c01b6112e6565b6136ac6751938bbe08aa7eba60c01b6112e6565b6136c0673d1ee0d78f3ec29760c01b6112e6565b6136d467deb59caecbb1665060c01b6112e6565b8073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613775576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161376c90616c8c565b60405180910390fd5b61378967028586bf5862ef6f60c01b6112e6565b61379d67065b44de57d02de360c01b6112e6565b6137b167602fbb4f5dd0ecee60c01b6112e6565b6137c56746e7762e4a7dc09360c01b6112e6565b3073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004016138379190616ae4565b60206040518083038186803b15801561384f57600080fd5b505afa158015613863573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138879190615973565b73ffffffffffffffffffffffffffffffffffffffff16146138dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016138d490616e6c565b60405180910390fd5b6138f16702bb6807de41edc960c01b6112e6565b613905679e8e05b250dfcf7660c01b6112e6565b6139196718ed0609e34537cb60c01b6112e6565b613923823061457c565b6139376748f55c9b11d3e84d60c01b6112e6565b61394b6721d9d754c514c3d060c01b6112e6565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a83306040518363ffffffff1660e01b81526004016139a8929190616aff565b600060405180830381600087803b1580156139c257600080fd5b505af11580156139d6573d6000803e3d6000fd5b505050506139ee67fd1fdef659e1010260c01b6112e6565b613a02677eb60258d7cb9f4260c01b6112e6565b7fcefbe9dbadcf675eef14e23810996ff38541fc26b4dd77cd6724b0eedc96f20082604051613a319190616ae4565b60405180910390a15050565b6000613a536746d5f36e497b280d60c01b611e33565b613a67677077a4665ef04d8360c01b611e33565b613a7b6788288bf71f1972a760c01b611e33565b613ac98484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506144aa565b90509392505050565b613ae667795dc99e426e462d60c01b61313f565b81613afb67f50d5b47a249620260c01b6134fb565b613b0f6780a9a7e92d8b8f3360c01b6134fb565b613b226633700746b9ddbf60c01b6134fb565b613b36670296e3014015bcc160c01b6134fb565b613b3f816140c9565b613b7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b7590616eec565b60405180910390fd5b613b92674c282dc748e87be160c01b6134fb565b613ba667fe7c4e4b475a952f60c01b6134fb565b613bba67ee555b1a12d1492760c01b61313f565b613bce67c3feaa5a7105ffed60c01b61313f565b613be267561ccfe8117327b160c01b61313f565b613bf667fcff312f23d9ea2a60c01b61313f565b613c00838361457c565b505050565b613c1967dd6cfcda1095e68d60c01b6112e6565b613c2d67b2266613e068a5ae60c01b6112e9565b613c41676a66a63870f964f960c01b6112e9565b613c556772f22eca890742ba60c01b6112e9565b613c6967c8ab57d60023f99860c01b6112e9565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614613cf9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613cf090616d0c565b60405180910390fd5b613d0d67d31dec9098d614f660c01b6112e9565b613d2167a184879381a9c67460c01b6112e9565b6000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613d77675e44e6e1c885710560c01b6112e9565b613d8b67aa009200742bcec960c01b6112e6565b613d9f676778b133ab52845560c01b6112e6565b613db3678667223e6872d60460c01b6112e6565b613dc76764a7d1c4780822b560c01b6112e6565b613ddb67170353d11362b36760c01b6112e6565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415613e4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613e4290616dcc565b60405180910390fd5b613e5f671bccc955ac6bffab60c01b6112e6565b613e73674e89d865d51f603b60c01b6112e6565b83600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613ec867aa75aac8727bba3060c01b6112e6565b613edc67bc05563bbe2c2b8960c01b6112e6565b613f26838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506149dd565b613f3a67c503094bc707a00a60c01b6112e6565b613f4e67ffcfb356d0e68a7c60c01b6112e6565b613f5781614b39565b613f6b6732ca1833e9907bb960c01b6112e9565b613f7f672942130a5b94b82160c01b6112e9565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051613fae9190616a85565b60405180910390a150505050565b50565b6060613fd5671b32f2f8d8869a6f60c01b61313f565b613fe96749be5d333bc42b6560c01b61313f565b613ffd6785666fa49e322ac760c01b61313f565b6004600084815260200190815260200160002060008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156140b55780601f1061408a576101008083540402835291602001916140b5565b820191906000526020600020905b81548152906001019060200180831161409857829003601f168201915b5050505050905092915050565b6000919050565b60006140df6708c77affa541e18b60c01b6112e6565b6140f367521330e5fc7d769860c01b6112e6565b61410767ee60050ca6fbb81560c01b6112e6565b61410f6141ee565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004016141809190616ae4565b60206040518083038186803b15801561419857600080fd5b505afa1580156141ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141d09190615973565b73ffffffffffffffffffffffffffffffffffffffff16149050919050565b600061420467cfc35b626608c6f260c01b611043565b614218677e4f9863b1e00bcc60c01b611043565b61422c67e01fbdbc1b0ec7df60c01b611043565b6142366028614ba5565b905090565b60006142516734c898dab669dbe060c01b61313f565b61426567cb6a024e2c9c029660c01b61313f565b614279675ec40cd398772bc260c01b61313f565b600061428f673d6406416aec196260c01b61313f565b6142a367e011bf88df11efc060c01b61313f565b6060600460008581526020019081526020016000206000603c81526020019081526020016000208054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561435e5780601f106143335761010080835404028352916020019161435e565b820191906000526020600020905b81548152906001019060200180831161434157829003601f168201915b50505050509050614379673e55432ebc04cadb60c01b61313f565b61438d67183cbc71a081b03060c01b61313f565b6000815111156143cf576143ab678355c8cf50ff3e7160c01b61313f565b6143bf67b137926d5696530f60c01b61313f565b6143c881614d3b565b91506143e4565b6143e367477c4653a0f8669a60c01b61313f565b5b6143f867a8602402197bda4b60c01b61313f565b61440c67e3a1de0cc7f9af8c60c01b61313f565b8192505050919050565b600061442c67922c8cf80d00015360c01b6112e6565b6144406712b19c2c7a88fb7260c01b6112e6565b61445467d2a36aa1db826d0660c01b6112e6565b6144a17f621363c539a3aa1024c8837ca1dc095db03b7f9512b3a95ecb429aae7fd953ed85858560405160200161448d939291906168fa565b604051602081830303815290604052614e2c565b90509392505050565b60006144c067bec4827058d1d27d60c01b611e33565b6144d4672f274b74d16058ba60c01b611e33565b6144e8670dd4bedb64e2a2d160c01b611e33565b60006144fd8385614ea990919063ffffffff16565b90506145136748284973b654d0c360c01b611e33565b61452767af16bd1d5a57497b60c01b611e33565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b61459067ec43fa02ed1b7fba60c01b61313f565b6145a46771bb738d72d2990960c01b61313f565b6145b86722ea0a680f799d0b60c01b61313f565b6145cc82603c6145c7846151b1565b6145d0565b5050565b6145e467a66be66c271d358960c01b61313f565b6145f8678fb45734fe1de6cf60c01b61313f565b61460c67f3e2cc8c4d3ab69d60c01b61313f565b827f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af752838360405161463e929190616f47565b60405180910390a261465a674b161f4d55631dca60c01b61313f565b61466e6773a3fc59a0a7d57d60c01b61313f565b603c8214156146f85761468b67678afe89a91f46ca60c01b61313f565b61469f67a65f4a15aa41550760c01b61313f565b6146b36730a298fe015e3a2d60c01b61313f565b827f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd26146de83614d3b565b6040516146eb9190616a85565b60405180910390a261470d565b61470c673d1f5fed2e823e9560c01b61313f565b5b614721673789940a5371c92060c01b61313f565b806004600085815260200190815260200160002060008481526020019081526020016000209080519060200190614759929190615688565b50505050565b6147736715e658c0f6e292b160c01b611e33565b614787672c431971dc3f178360c01b611e33565b61479b67ea35c52bf51c28f760c01b611e33565b6147af676c0120f97757204260c01b611e33565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561481f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161481690616cec565b60405180910390fd5b6148336768a59374672fe76a60c01b611e33565b614847676aacc0e4664894f760c01b611e33565b61485b67eacfbaa68e55918960c01b611e33565b61486f67b14b9b00bd32573160c01b611e33565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156148fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016148f290616e8c565b60405180910390fd5b61490f67b43b7e075756508e60c01b611e33565b614922663a0e15b185871360c01b611e33565b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061498d6719a12fa44495bf1260c01b611e33565b6149a1676a185bb7ec86ed3260c01b611e33565b7fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a32826040516149d2929190616aa0565b60405180910390a150565b6149f1672da1cbb2c8b712bf60c01b611e33565b614a0567a22c42eaa986a7b160c01b611e33565b614a1967161aa01e34b61d0a60c01b611e33565b600081511415614a6d57614a3767c00dbd5b52865bb760c01b611e33565b614a4b678a5faf951795361260c01b611e33565b614a5f6745413064a2aacfc660c01b611e33565b614a683261475f565b614b36565b614a8167d4fad28aec7c156d60c01b611e33565b614a9567a88c23ab9e9dede660c01b611e33565b614aa9675a0d1bd87812f63460c01b611e33565b600081519050614ac367a97ff88e96ad9c4460c01b611e33565b614ad7672ebda776213b4a1860c01b611e33565b60005b81811015614b3357614af667197b6470f65d698160c01b611e33565b614b0a678e0c2e8e0183d04a60c01b611e33565b614b26838281518110614b1957fe5b602002602001015161475f565b8080600101915050614ada565b50505b50565b614b4d67b69be6bf736d8c1a60c01b611043565b614b6167e18b25fd36211d0160c01b611043565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000614bbb67ef0225287ba17ba060c01b611043565b614bcf6795958667c898951b60c01b611043565b614be367ec06b0be9f42607760c01b611043565b6000614bf967b7cd17d69da836b660c01b611043565b614c0d671b7ac62a98e22a5460c01b611043565b614c15615291565b15614cde57614c2e674b9fe2d527bba60760c01b611043565b614c426737f58d18ef197c9060c01b611043565b614c56679e0c2e494127333d60c01b611043565b6000836000369050039050614c75678767fa9e72b3efac60c01b611043565b614cd660003683906014850192614c8e9392919061701e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061545c565b915050614d0a565b614cf267531fb14624ef4c0060c01b611043565b614d0667365aa35b4857b9d560c01b611043565b3390505b614d1e67bb664b7abb1efcc160c01b611043565b614d3267c66db900ff1468ad60c01b611043565b80915050919050565b6000614d5167591fa59c86b3e2b260c01b61313f565b614d656786d9d3ebf7b12de660c01b61313f565b614d79672bb7a24a76e9d99d60c01b61313f565b6000614d8f6735c80e734801636f60c01b61313f565b614da36743e003716fd39fc160c01b61313f565b614db7678182032961e4246e60c01b61313f565b6014835114614dc557600080fd5b614dd9672ac8f8558b01656560c01b61313f565b614ded6797ae494f23cf5c9360c01b61313f565b600c6101000a6020840151049050614e0f67469cded1b77485ec60c01b61313f565b614e236783a2bd13724bd88a60c01b61313f565b80915050919050565b6000614e42677f88a34eed9bb47260c01b613fbc565b614e566749bb13c5d53bb9db60c01b613fbc565b614e6a6721a77fc5a306172f60c01b613fbc565b614ea1600254308585604051602001614e869493929190616a20565b6040516020818303038152906040528051906020012061558b565b905092915050565b6000614ebf67610b12321a07a31960c01b6155f7565b614ed3670f66a519ee9137b960c01b6155f7565b614ee767140d9f9935e2385360c01b6155f7565b6000614efd670bfea895a9f81bec60c01b6155f7565b614f1167a8c715ec3b9d89c160c01b6155f7565b60418351141561516a57614f2f67101129654a82afeb60c01b6155f7565b614f4367a44405322c11578a60c01b6155f7565b614f57673ae09945b2f5082360c01b6155f7565b6000614f6d67900a30e48d0fc7bd60c01b6155f7565b614f81677d193483635abe1860c01b6155f7565b6000614f9767f24e14d594e9077960c01b6155f7565b614fab67a847d7edacf7e00c60c01b6155f7565b6000614fc1670bcc457b0963bc0f60c01b6155f7565b6020860151925060408601519150606086015160001a9050614fed6730650d5e99574f3560c01b6155f7565b615001675197804ca644c8a460c01b6155f7565b601b8160ff161015615040576150216781206cb7a1d9cec760c01b6155f7565b615035679d0aaefe9954d7fb60c01b6155f7565b601b81019050615055565b61505467091b6422f681fe5560c01b6155f7565b5b615069677849785c6ede9b0e60c01b6155f7565b61507d6732075f7517db825b60c01b6155f7565b601b8160ff161480156150a0575061509f67638a38da6bf5bb4360c01b6155fa565b5b806150ca5750601c8160ff161480156150c957506150c8671d94865be2a4ed5560c01b6155fa565b5b5b1561514d576150e367657d88528f4e396b60c01b6155f7565b6150f7675469679748b05cfe60c01b6155f7565b6001878285856040516000815260200160405260405161511a9493929190616ba4565b6020604051602081039080840390855afa15801561513c573d6000803e3d6000fd5b505050602060405103519350615162565b61516167539b701a1f57136860c01b6155f7565b5b50505061517f565b61517e67f3927173995ed52360c01b6155f7565b5b61519367303f1b174284648060c01b6155f7565b6151a767c60031985823124160c01b6155f7565b8091505092915050565b60606151c7674dfc4b50b85183c760c01b61313f565b6151db6708240a8d8866ce7560c01b61313f565b6151ef67d3d82140cad9570c60c01b61313f565b6060601467ffffffffffffffff8111801561520957600080fd5b506040519080825280601f01601f19166020018201604052801561523c5781602001600182028036833780820191505090505b50905061525367942ccf8fe5ba69e260c01b61313f565b600c6101000a830260208201526152746720dab640ed783a0f60c01b61313f565b61528867b789515e6f3baf4d60c01b61313f565b80915050919050565b60006152a76718d82ab5ae60310f60c01b611043565b6152bb67b1091fd4002007a760c01b611043565b6152cf67e754ffc9cc3865c960c01b611043565b60006152e5677ed152cd4162d4dd60c01b611043565b6152f967d897cf3d19cf81cd60c01b611043565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561541857615363677fe0037509e467e160c01b611043565b61537767d0b1c04b10d8098a60c01b611043565b61538b670b92e025f4debba760c01b611043565b61539f6739792e98f7fbfdea60c01b611043565b602c600036905010156153e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016153de90616d6c565b60405180910390fd5b6153fb6755c879b00c45b69f60c01b611043565b61540f679a100b07747e893d60c01b611043565b6001905061542d565b61542c6757b90b57dc0a6a0160c01b611043565b5b61544167cc41edf636370ef460c01b611043565b61545567ff5a153bde944b0360c01b611043565b8091505090565b600061547267e937c30ee854c6f460c01b615605565b61548667ae40a839349e539460c01b615605565b61549a6779ff25ce2e3aef5860c01b615605565b60006154b067471a531a4d41d03a60c01b615605565b6154c467dbf5cb870bd2bda760c01b615605565b6154d86715ee1c447c585eff60c01b615605565b601483511461551c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161551390616ecc565b60405180910390fd5b61553067595b08e56ca2004360c01b615605565b61554467658f3d9a047d9b2b60c01b615605565b6c01000000000000000000000000602084015104905061556e670a7d36500000fb3860c01b615605565b615582678f46d49d645b8e7560c01b615605565b80915050919050565b60006155a167cb1f58f8e99e701160c01b6155f7565b6155b567477dbcabce0c716f60c01b6155f7565b6155c967c58144008cda6be160c01b6155f7565b816040516020016155da9190616991565b604051602081830303815290604052805190602001209050919050565b50565b600060019050919050565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061564957803560ff1916838001178555615677565b82800160010185558215615677579182015b8281111561567657823582559160200191906001019061565b565b5b5090506156849190615708565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106156c957805160ff19168380011785556156f7565b828001600101855582156156f7579182015b828111156156f65782518255916020019190600101906156db565b5b5090506157049190615708565b5090565b5b80821115615721576000816000905550600101615709565b5090565b60008135905061573481617232565b92915050565b60008151905061574981617232565b92915050565b60008083601f84011261576157600080fd5b8235905067ffffffffffffffff81111561577a57600080fd5b60208301915083602082028301111561579257600080fd5b9250929050565b6000813590506157a881617249565b92915050565b6000813590506157bd81617260565b92915050565b6000813590506157d281617277565b92915050565b60008083601f8401126157ea57600080fd5b8235905067ffffffffffffffff81111561580357600080fd5b60208301915083600182028301111561581b57600080fd5b9250929050565b600082601f83011261583357600080fd5b813561584661584182616fa4565b616f77565b9150808252602083016020830185838301111561586257600080fd5b61586d83828461719a565b50505092915050565b6000813590506158858161728e565b92915050565b60008083601f84011261589d57600080fd5b8235905067ffffffffffffffff8111156158b657600080fd5b6020830191508360018202830111156158ce57600080fd5b9250929050565b6000606082840312156158e757600080fd5b6158f16060616f77565b9050600061590184828501615725565b600083015250602061591584828501615799565b602083015250604061592984828501615799565b60408301525092915050565b600081359050615944816172a5565b92915050565b60006020828403121561595c57600080fd5b600061596a84828501615725565b91505092915050565b60006020828403121561598557600080fd5b60006159938482850161573a565b91505092915050565b6000602082840312156159ae57600080fd5b60006159bc84828501615799565b91505092915050565b600080604083850312156159d857600080fd5b60006159e685828601615799565b92505060206159f785828601615725565b9150509250929050565b600080600060608486031215615a1657600080fd5b6000615a2486828701615799565b9350506020615a3586828701615799565b9250506040615a4686828701615799565b9150509250925092565b60008060008060608587031215615a6657600080fd5b6000615a7487828801615799565b9450506020615a8587828801615799565b935050604085013567ffffffffffffffff811115615aa257600080fd5b615aae878288016157d8565b925092505092959194509250565b600080600060408486031215615ad157600080fd5b6000615adf86828701615799565b935050602084013567ffffffffffffffff811115615afc57600080fd5b615b08868287016157d8565b92509250509250925092565b600080600060408486031215615b2957600080fd5b6000615b3786828701615799565b935050602084013567ffffffffffffffff811115615b5457600080fd5b615b608682870161588b565b92509250509250925092565b600080600080600060608688031215615b8457600080fd5b6000615b9288828901615799565b955050602086013567ffffffffffffffff811115615baf57600080fd5b615bbb8882890161588b565b9450945050604086013567ffffffffffffffff811115615bda57600080fd5b615be68882890161588b565b92509250509295509295909350565b60008060408385031215615c0857600080fd5b6000615c1685828601615799565b9250506020615c2785828601615935565b9150509250929050565b600080600060608486031215615c4657600080fd5b6000615c5486828701615799565b9350506020615c6586828701615935565b925050604084013567ffffffffffffffff811115615c8257600080fd5b615c8e86828701615822565b9150509250925092565b600060208284031215615caa57600080fd5b6000615cb8848285016157ae565b91505092915050565b600060208284031215615cd357600080fd5b6000615ce1848285016157c3565b91505092915050565b600060208284031215615cfc57600080fd5b6000615d0a84828501615876565b91505092915050565b60008060008060608587031215615d2957600080fd5b6000615d3787828801615876565b945050602085013567ffffffffffffffff811115615d5457600080fd5b615d608782880161574f565b93509350506040615d7387828801615725565b91505092959194509250565b600060608284031215615d9157600080fd5b6000615d9f848285016158d5565b91505092915050565b615db18161712e565b82525050565b615dc081617051565b82525050565b615dd7615dd282617051565b6171dc565b82525050565b615de681617063565b82525050565b615df58161706f565b82525050565b615e0c615e078261706f565b6171ee565b82525050565b6000615e1d82616fd0565b615e278185616fe6565b9350615e378185602086016171a9565b615e4081617214565b840191505092915050565b6000615e5682616fd0565b615e608185616ff7565b9350615e708185602086016171a9565b80840191505092915050565b615e8581617140565b82525050565b615e9481617164565b82525050565b6000615ea68385617002565b9350615eb383858461719a565b615ebc83617214565b840190509392505050565b6000615ed38385617013565b9350615ee083858461719a565b82840190509392505050565b6000615ef782616fdb565b615f018185617002565b9350615f118185602086016171a9565b615f1a81617214565b840191505092915050565b6000615f32601983617013565b91507f737570706f727473496e746572666163652862797465733429000000000000006000830152601982019050919050565b6000615f72602483617002565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f6465207265736f60008301527f6c766572000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000615fd8602183617002565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f6465206f776e6560008301527f72000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061603e602983617002565b91507f454e53436f6e74726f6c6c65723a20696e76616c696420677561726469616e2060008301527f7369676e617475726500000000000000000000000000000000000000000000006020830152604082019050919050565b60006160a4602283617002565b91507f454e53436f6e74726f6c6c65723a206c6162656c20616c72656164792074616b60008301527f656e0000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061610a601c83617013565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b600061614a602083617002565b91507f477561726465643a2063616e6e6f74206164642030783020677561726469616e6000830152602082019050919050565b600061618a602f83617002565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b60006161f0600d83617013565b91507f61646472286279746573333229000000000000000000000000000000000000006000830152600d82019050919050565b6000616230601b83617002565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f646500000000006000830152602082019050919050565b6000616270602183617002565b91507f454e53436f6e74726f6c6c65723a206e6f646520646f65736e2774206578697360008301527f74000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006162d6602283617002565b91507f47617465776179526563697069656e743a20696e76616c6964206d73672e646160008301527f74610000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061633c601483617013565b91507f7465787428627974657333322c737472696e67290000000000000000000000006000830152601482019050919050565b600061637c600d83617013565b91507f6e616d65286279746573333229000000000000000000000000000000000000006000830152600d82019050919050565b60006163bc602b83617002565b91507f454e53436f6e74726f6c6c65723a2063616c6c6572206973206e6f742074686560008301527f206e6f6465206f776e65720000000000000000000000000000000000000000006020830152604082019050919050565b6000616422602683617002565b91507f477561726465643a2074782e6f726967696e206973206e6f742074686520677560008301527f61726469616e00000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000616488602683617002565b91507f454e53436f6e74726f6c6c65723a2063616e6e6f74207365742030783020726560008301527f67697374727900000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006164ee602583617002565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c7265616479207375626d60008301527f69747465640000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000616554600f83617013565b91507f7075626b657928627974657333322900000000000000000000000000000000006000830152600f82019050919050565b6000616594602283617002565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c7265616479206578697360008301527f74730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006165fa602383617002565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c726561647920696e207360008301527f796e6300000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000616660601f83617002565b91507f477561726465643a20677561726469616e20646f65736e2774206578697374006000830152602082019050919050565b60006166a0602583617002565b91507f454e53436f6e74726f6c6c65723a20696e76616c696420656e73206e6f64652060008301527f6f776e65720000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000616706602083617002565b91507f477561726465643a20677561726469616e20616c7265616479206578697374736000830152602082019050919050565b6000616746601b83617002565b91507f477561726465643a2063616e6e6f742072656d6f76652073656c6600000000006000830152602082019050919050565b6000616786601d83617002565b91507f42797465734c69623a20696e76616c69642064617461206c656e6774680000006000830152602082019050919050565b60006167c6603783617002565b91507f454e5341627374726163745265736f6c7665723a20726576657274656420627960008301527f206f6e6c794e6f64654f776e6572206d6f6469666965720000000000000000006020830152604082019050919050565b600061682c601283617013565b91507f6164647228627974657333322c75696e742900000000000000000000000000006000830152601282019050919050565b600061686c602383617002565b91507f454e53436f6e74726f6c6c65723a20726567697374727920616c72656164792060008301527f73657400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6168ce81617103565b82525050565b6168e56168e082617103565b61720a565b82525050565b6168f481617121565b82525050565b60006169068286615dc6565b6014820191506169168285615dfb565b6020820191506169268284615dfb565b602082019150819050949350505050565b60006169438285615dfb565b6020820191506169538284615dfb565b6020820191508190509392505050565b6000616970828486615ec7565b91508190509392505050565b600061698782615f25565b9150819050919050565b600061699c826160fd565b91506169a88284615dfb565b60208201915081905092915050565b60006169c2826161e3565b9150819050919050565b60006169d78261632f565b9150819050919050565b60006169ec8261636f565b9150819050919050565b6000616a0182616547565b9150819050919050565b6000616a168261681f565b9150819050919050565b6000616a2c82876168d4565b602082019150616a3c8286615dc6565b601482019150616a4c8285615dfb565b602082019150616a5c8284615e4b565b915081905095945050505050565b6000602082019050616a7f6000830184615db7565b92915050565b6000602082019050616a9a6000830184615da8565b92915050565b6000604082019050616ab56000830185615da8565b616ac26020830184615db7565b9392505050565b6000602082019050616ade6000830184615ddd565b92915050565b6000602082019050616af96000830184615dec565b92915050565b6000604082019050616b146000830185615dec565b616b216020830184615db7565b9392505050565b6000604082019050616b3d6000830185615dec565b616b4a6020830184615dec565b9392505050565b600060a082019050616b666000830188615dec565b616b736020830187615dec565b616b806040830186615db7565b616b8d6060830185615db7565b616b9a6080830184615e8b565b9695505050505050565b6000608082019050616bb96000830187615dec565b616bc660208301866168eb565b616bd36040830185615dec565b616be06060830184615dec565b95945050505050565b60006020820190508181036000830152616c038184615e12565b905092915050565b6000602082019050616c206000830184615e7c565b92915050565b60006020820190508181036000830152616c41818486615e9a565b90509392505050565b60006020820190508181036000830152616c648184615eec565b905092915050565b60006020820190508181036000830152616c8581615f65565b9050919050565b60006020820190508181036000830152616ca581615fcb565b9050919050565b60006020820190508181036000830152616cc581616031565b9050919050565b60006020820190508181036000830152616ce581616097565b9050919050565b60006020820190508181036000830152616d058161613d565b9050919050565b60006020820190508181036000830152616d258161617d565b9050919050565b60006020820190508181036000830152616d4581616223565b9050919050565b60006020820190508181036000830152616d6581616263565b9050919050565b60006020820190508181036000830152616d85816162c9565b9050919050565b60006020820190508181036000830152616da5816163af565b9050919050565b60006020820190508181036000830152616dc581616415565b9050919050565b60006020820190508181036000830152616de58161647b565b9050919050565b60006020820190508181036000830152616e05816164e1565b9050919050565b60006020820190508181036000830152616e2581616587565b9050919050565b60006020820190508181036000830152616e45816165ed565b9050919050565b60006020820190508181036000830152616e6581616653565b9050919050565b60006020820190508181036000830152616e8581616693565b9050919050565b60006020820190508181036000830152616ea5816166f9565b9050919050565b60006020820190508181036000830152616ec581616739565b9050919050565b60006020820190508181036000830152616ee581616779565b9050919050565b60006020820190508181036000830152616f05816167b9565b9050919050565b60006020820190508181036000830152616f258161685f565b9050919050565b6000602082019050616f4160008301846168c5565b92915050565b6000604082019050616f5c60008301856168c5565b8181036020830152616f6e8184615e12565b90509392505050565b6000604051905081810181811067ffffffffffffffff82111715616f9a57600080fd5b8060405250919050565b600067ffffffffffffffff821115616fbb57600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000808585111561702e57600080fd5b8386111561703b57600080fd5b6001850283019150848603905094509492505050565b600061705c826170e3565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60007fffffffffffffffff00000000000000000000000000000000000000000000000082169050919050565b60006170dc82617051565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b600061713982617176565b9050919050565b600061714b82617152565b9050919050565b600061715d826170e3565b9050919050565b600061716f8261710d565b9050919050565b600061718182617188565b9050919050565b6000617193826170e3565b9050919050565b82818337600083830152505050565b60005b838110156171c75780820151818401526020810190506171ac565b838111156171d6576000848401525b50505050565b60006171e7826171f8565b9050919050565b6000819050919050565b600061720382617225565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61723b81617051565b811461724657600080fd5b50565b6172528161706f565b811461725d57600080fd5b50565b61726981617079565b811461727457600080fd5b50565b617280816170a5565b811461728b57600080fd5b50565b617297816170d1565b81146172a257600080fd5b50565b6172ae81617103565b81146172b957600080fd5b5056fea164736f6c634300060c000a"; + static readonly abi: ({ + inputs: any[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + } | { + inputs: { + components: { + internalType: string; + name: string; + type: string; + }[]; + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): ENSControllerInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ENSController; +} +export {}; diff --git a/dist/typings/factories/ENSController__factory.js b/dist/typings/factories/ENSController__factory.js new file mode 100644 index 00000000..47a60d91 --- /dev/null +++ b/dist/typings/factories/ENSController__factory.js @@ -0,0 +1,1303 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ENSController__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "addr", + type: "address", + }, + ], + name: "AddrChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "coinType", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "newAddress", + type: "bytes", + }, + ], + name: "AddressChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "GuardianAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "GuardianRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "initializer", + type: "address", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: false, + internalType: "string", + name: "name", + type: "string", + }, + ], + name: "NameChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "NodeReleased", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "NodeSubmitted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "NodeVerified", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "x", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "y", + type: "bytes32", + }, + ], + name: "PubkeyChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "registry", + type: "address", + }, + ], + name: "RegistryChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: true, + internalType: "string", + name: "indexedKey", + type: "string", + }, + { + indexed: false, + internalType: "string", + name: "key", + type: "string", + }, + ], + name: "TextChanged", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "addGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "addr", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "uint256", + name: "coinType", + type: "uint256", + }, + ], + name: "addr", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_0ffe16b4", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__1b54acf3", + type: "bytes8", + }, + ], + name: "c_1b54acf3", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3880312f", + type: "bytes8", + }, + ], + name: "c_3880312f", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__4f849103", + type: "bytes8", + }, + ], + name: "c_4f849103", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__53f45729", + type: "bytes8", + }, + ], + name: "c_53f45729", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__a2a35eda", + type: "bytes8", + }, + ], + name: "c_a2a35eda", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_ac93193e", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_c0828b70", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_d5c463c2", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__e1dc25ce", + type: "bytes8", + }, + ], + name: "c_e1dc25ce", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_false0ffe16b4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__1b54acf3", + type: "bytes8", + }, + ], + name: "c_false1b54acf3", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3880312f", + type: "bytes8", + }, + ], + name: "c_false3880312f", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__4f849103", + type: "bytes8", + }, + ], + name: "c_false4f849103", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__53f45729", + type: "bytes8", + }, + ], + name: "c_false53f45729", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__a2a35eda", + type: "bytes8", + }, + ], + name: "c_falsea2a35eda", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_falseac93193e", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_falsec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_falsed5c463c2", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__e1dc25ce", + type: "bytes8", + }, + ], + name: "c_falsee1dc25ce", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_true0ffe16b4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__1b54acf3", + type: "bytes8", + }, + ], + name: "c_true1b54acf3", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3880312f", + type: "bytes8", + }, + ], + name: "c_true3880312f", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__4f849103", + type: "bytes8", + }, + ], + name: "c_true4f849103", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__53f45729", + type: "bytes8", + }, + ], + name: "c_true53f45729", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__a2a35eda", + type: "bytes8", + }, + ], + name: "c_truea2a35eda", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_trueac93193e", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_truec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_trued5c463c2", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__e1dc25ce", + type: "bytes8", + }, + ], + name: "c_truee1dc25ce", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "chainId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "gateway", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "label", + type: "bytes32", + }, + ], + internalType: "struct ENSController.SubNodeRegistration", + name: "subNodeRegistration", + type: "tuple", + }, + ], + name: "hashSubNodeRegistration", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ENSRegistry", + name: "registry_", + type: "address", + }, + { + internalType: "address[]", + name: "guardians_", + type: "address[]", + }, + { + internalType: "address", + name: "gateway_", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "isGuardian", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "isInitialized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "nodeOwners", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "pubkey", + outputs: [ + { + internalType: "bytes32", + name: "x", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "y", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "label", + type: "bytes32", + }, + { + internalType: "bytes", + name: "guardianSignature", + type: "bytes", + }, + ], + name: "registerSubNode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "registry", + outputs: [ + { + internalType: "contract ENSRegistry", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "releaseNode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "removeGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "uint256", + name: "coinType", + type: "uint256", + }, + { + internalType: "bytes", + name: "addr_", + type: "bytes", + }, + ], + name: "setAddr", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "address", + name: "addr_", + type: "address", + }, + ], + name: "setAddr", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + ], + name: "setName", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "x", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "y", + type: "bytes32", + }, + ], + name: "setPubkey", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ENSRegistry", + name: "registry_", + type: "address", + }, + ], + name: "setRegistry", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "string", + name: "key", + type: "string", + }, + { + internalType: "string", + name: "value", + type: "string", + }, + ], + name: "setText", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "submitNode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceID", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "syncAddr", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "string", + name: "key", + type: "string", + }, + ], + name: "text", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "messageHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "verifyGuardianSignature", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "verifyNode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; +const _bytecode = "0x60806040523480156200001157600080fd5b506200002e676ed90a7f5cb15c7560c01b6200017e60201b60201c565b6200004a675e592fe27197979c60c01b6200018160201b60201c565b6200006667eca2e4778f3efef360c01b6200018160201b60201c565b32600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000c367ce0e365443bb826260c01b6200018460201b60201c565b620000df6783f6a3768f043c5060c01b6200018460201b60201c565b620000fb67f7775edf55ee500260c01b6200018460201b60201c565b6000620001196799c44ec6f63d8b6d60c01b6200018460201b60201c565b4690506200013867f60b0de5a48d87f360c01b6200018460201b60201c565b80600281905550506200015c67db84cf13641fc64d60c01b6200018760201b60201c565b62000178670b548d95b847a13b60c01b6200018a60201b60201c565b6200018d565b50565b50565b50565b50565b50565b6172c9806200019d6000396000f3fe608060405234801561001057600080fd5b506004361061038e5760003560e01c8063691f3431116101de578063a526d83b1161010f578063c8690233116100ad578063dc5b68a61161007c578063dc5b68a614610bb4578063e831bfba14610bd0578063f1cb7e0614610bec578063f6a7ea4514610c1c5761038e565b8063c869023314610b1b578063c8cc2aee14610b4c578063d0f710d614610b68578063d5fa2b0014610b985761038e565b8063bb8c7d90116100e9578063bb8c7d9014610a6f578063bc3bf0ee14610a8b578063c1cad69e14610abb578063c369d5fe14610aeb5761038e565b8063a526d83b14610a1b578063a545251f14610a37578063a91ee0dc14610a535761038e565b80637f1308641161017c5780639a8a0592116101565780639a8a05921461096d5780639c9affe11461098b578063a139df03146109bb578063a4db4b6b146109eb5761038e565b80637f130864146108f1578063812f6185146109215780638b95dd71146109515761038e565b806372d926b9116101b857806372d926b91461086b578063773722131461089b5780637b103999146108b75780637d0e0e7e146108d55761038e565b8063691f3431146107ef5780636df0cf421461081f578063714041561461084f5761038e565b806321a5f5da116102c35780633b3b57de11610261578063589731f811610230578063589731f81461074357806359d1d43c146107735780635ff7f23b146107a3578063601c22bd146107d35761038e565b80633b3b57de146106bf57806346386f73146106ef5780635405622e1461070b57806355800f87146107275761038e565b80632e6afd6e1161029d5780632e6afd6e14610611578063375f2ca9146106415780633786d2ae14610671578063392e53cd146106a15761038e565b806321a5f5da146105a957806329ae6a7e146105d957806329cd62ea146105f55761038e565b8063116191b6116103305780631727a5fa1161030a5780631727a5fa1461052557806318121646146105415780631970b9521461055d5780631b3cd142146105795761038e565b8063116191b6146104a75780631262ed1c146104c5578063154721e6146104f55761038e565b80630c3bf3211161036c5780630c3bf3211461040f5780630c4b1a171461043f5780630c68ba211461045b57806310f13a8c1461048b5761038e565b806301ffc9a71461039357806306e88aec146103c35780630a178bc2146103f3575b600080fd5b6103ad60048036038101906103a89190615c98565b610c4c565b6040516103ba9190616ac9565b60405180910390f35b6103dd60048036038101906103d89190615cc1565b61102a565b6040516103ea9190616ac9565b60405180910390f35b61040d60048036038101906104089190615cc1565b611035565b005b61042960048036038101906104249190615cc1565b611038565b6040516104369190616ac9565b60405180910390f35b61045960048036038101906104549190615cc1565b611043565b005b6104756004803603810190610470919061594a565b611046565b6040516104829190616ac9565b60405180910390f35b6104a560048036038101906104a09190615b6c565b6110d7565b005b6104af6112aa565b6040516104bc9190616a6a565b60405180910390f35b6104df60048036038101906104da9190615cc1565b6112d0565b6040516104ec9190616ac9565b60405180910390f35b61050f600480360381019061050a9190615cc1565b6112db565b60405161051c9190616ac9565b60405180910390f35b61053f600480360381019061053a9190615cc1565b6112e6565b005b61055b60048036038101906105569190615cc1565b6112e9565b005b61057760048036038101906105729190615cc1565b6112ec565b005b610593600480360381019061058e919061599c565b6112ef565b6040516105a09190616a6a565b60405180910390f35b6105c360048036038101906105be9190615cc1565b611322565b6040516105d09190616ac9565b60405180910390f35b6105f360048036038101906105ee919061599c565b61132d565b005b61060f600480360381019061060a9190615a01565b611692565b005b61062b60048036038101906106269190615cc1565b611849565b6040516106389190616ac9565b60405180910390f35b61065b60048036038101906106569190615cc1565b611850565b6040516106689190616ac9565b60405180910390f35b61068b60048036038101906106869190615cc1565b611857565b6040516106989190616ac9565b60405180910390f35b6106a9611862565b6040516106b69190616ac9565b60405180910390f35b6106d960048036038101906106d4919061599c565b6118f7565b6040516106e69190616a6a565b60405180910390f35b61070960048036038101906107049190615a50565b611945565b005b61072560048036038101906107209190615cc1565b611e33565b005b610741600480360381019061073c919061599c565b611e36565b005b61075d60048036038101906107589190615cc1565b61224b565b60405161076a9190616ac9565b60405180910390f35b61078d60048036038101906107889190615b14565b612252565b60405161079a9190616c4a565b60405180910390f35b6107bd60048036038101906107b89190615cc1565b612363565b6040516107ca9190616ac9565b60405180910390f35b6107ed60048036038101906107e89190615cc1565b61236e565b005b6108096004803603810190610804919061599c565b612371565b6040516108169190616c4a565b60405180910390f35b61083960048036038101906108349190615d7f565b612462565b6040516108469190616ae4565b60405180910390f35b6108696004803603810190610864919061594a565b6124be565b005b61088560048036038101906108809190615cc1565b612866565b6040516108929190616ac9565b60405180910390f35b6108b560048036038101906108b09190615b14565b61286d565b005b6108bf612a08565b6040516108cc9190616c0b565b60405180910390f35b6108ef60048036038101906108ea919061599c565b612a2e565b005b61090b60048036038101906109069190615cc1565b612e62565b6040516109189190616ac9565b60405180910390f35b61093b60048036038101906109369190615cc1565b612e6d565b6040516109489190616ac9565b60405180910390f35b61096b60048036038101906109669190615c31565b612e74565b005b610975612fa9565b6040516109829190616f2c565b60405180910390f35b6109a560048036038101906109a09190615cc1565b612faf565b6040516109b29190616ac9565b60405180910390f35b6109d560048036038101906109d09190615cc1565b612fb6565b6040516109e29190616ac9565b60405180910390f35b610a056004803603810190610a009190615cc1565b612fc1565b604051610a129190616ac9565b60405180910390f35b610a356004803603810190610a30919061594a565b612fcc565b005b610a516004803603810190610a4c9190615cc1565b61313f565b005b610a6d6004803603810190610a689190615cea565b613142565b005b610a896004803603810190610a849190615cc1565b6134fb565b005b610aa56004803603810190610aa09190615cc1565b6134fe565b604051610ab29190616ac9565b60405180910390f35b610ad56004803603810190610ad09190615cc1565b613505565b604051610ae29190616ac9565b60405180910390f35b610b056004803603810190610b009190615cc1565b61350c565b604051610b129190616ac9565b60405180910390f35b610b356004803603810190610b30919061599c565b613513565b604051610b43929190616b28565b60405180910390f35b610b666004803603810190610b61919061599c565b613589565b005b610b826004803603810190610b7d9190615abc565b613a3d565b604051610b8f9190616ac9565b60405180910390f35b610bb26004803603810190610bad91906159c5565b613ad2565b005b610bce6004803603810190610bc99190615d13565b613c05565b005b610bea6004803603810190610be59190615cc1565b613fbc565b005b610c066004803603810190610c019190615bf5565b613fbf565b604051610c139190616be9565b60405180910390f35b610c366004803603810190610c319190615cc1565b6140c2565b604051610c439190616ac9565b60405180910390f35b6000610c6267cc546c9f9cf6e5b860c01b6112e6565b610c76679247758156b934c960c01b6112e6565b610c8a6752f48de5e8aa120760c01b6112e6565b604051602001610c999061697c565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610d0b5750610d0a670c507e069bb981a360c01b611038565b5b80610daf5750604051602001610d20906169b7565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610d925750610d9167e9126e671623888260c01b611038565b5b8015610dae5750610dad67fb050db7b7e0aeaa60c01b611038565b5b5b80610e535750604051602001610dc490616a0b565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610e365750610e3567e1c43482dce27a7c60c01b611038565b5b8015610e525750610e5167e2454ec1ca837a3160c01b611038565b5b5b80610ef75750604051602001610e68906169e1565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610eda5750610ed967ef1ecb53646cfb3260c01b611038565b5b8015610ef65750610ef567e883bfc7c4cd612d60c01b611038565b5b5b80610f9b5750604051602001610f0c906169f6565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148015610f7e5750610f7d6755d4a664940531a760c01b611038565b5b8015610f9a5750610f996733a28e5539f195c160c01b611038565b5b5b806110235750604051602001610fb0906169cc565b604051602081830303815290604052805190602001207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614801561102257506110216737472d659f7c2bd960c01b611038565b5b5b9050919050565b600060019050919050565b50565b600060019050919050565b50565b600061105c67d9e99bddfebda2f060c01b611e33565b611070676401fd9fc2105e0160c01b611e33565b6110846733760aa820b07e2a60c01b611e33565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6110eb67f946de71aca822c060c01b6112ec565b8461110067f50d5b47a249620260c01b6134fb565b6111146780a9a7e92d8b8f3360c01b6134fb565b6111276633700746b9ddbf60c01b6134fb565b61113b670296e3014015bcc160c01b6134fb565b611144816140c9565b611183576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117a90616eec565b60405180910390fd5b611197674c282dc748e87be160c01b6134fb565b6111ab67fe7c4e4b475a952f60c01b6134fb565b6111bf6724625e51986e127b60c01b6112ec565b6111d3675c4552df7d791b7960c01b6112ec565b6111e767c2fbf86a18bf401a60c01b6112ec565b828260076000898152602001908152602001600020878760405161120c929190616963565b90815260200160405180910390209190611227929190615608565b5061123c6711527526351a910960c01b6112ec565b61125067b03e44f2a847e85760c01b6112ec565b8484604051611260929190616963565b6040518091039020867fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a7550878760405161129a929190616c26565b60405180910390a3505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b600060019050919050565b50565b50565b50565b60096020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b61134167a6cf1214afd7b4ab60c01b6112e6565b611355673bac9d8ba1319faf60c01b6112e6565b61136967678dbf255aa39dbf60c01b6112e6565b60006113736141ee565b905061138967763ad9663570b58d60c01b6112e6565b61139d67383fa3baf1c1946360c01b6112e6565b6113b1672ef6333f2223b1df60c01b6112e6565b3073ffffffffffffffffffffffffffffffffffffffff166113d18361423b565b73ffffffffffffffffffffffffffffffffffffffff1614611427576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141e90616d4c565b60405180910390fd5b61143b67de6886b0240cccf860c01b6112e6565b61144f67dfa5ea06e65d350f60c01b6112e6565b61146367404c0d706e526d6a60c01b6112e6565b61147767fc44e334be7e393360c01b6112e6565b8073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611518576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150f90616c8c565b60405180910390fd5b61152c6758ebc510ca5b5c9d60c01b6112e6565b61154067b1c514689ffae80960c01b6112e6565b6115546783fd5b7291daa95f60c01b6112e6565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b0fc9c383836040518363ffffffff1660e01b81526004016115b1929190616aff565b600060405180830381600087803b1580156115cb57600080fd5b505af11580156115df573d6000803e3d6000fd5b505050506115f767b040ef9043e1792560c01b6112e6565b6009600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905561164167ee421259567d236160c01b6112e6565b6116556763756edc6879694a60c01b6112e6565b7f7803a16d95f9ca635bdec561006625e7444d8a9f8463866643cc03af011779d38282604051611686929190616aff565b60405180910390a15050565b6116a667fa2e41783e8f062160c01b61236e565b826116bb67f50d5b47a249620260c01b6134fb565b6116cf6780a9a7e92d8b8f3360c01b6134fb565b6116e26633700746b9ddbf60c01b6134fb565b6116f6670296e3014015bcc160c01b6134fb565b6116ff816140c9565b61173e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173590616eec565b60405180910390fd5b611752674c282dc748e87be160c01b6134fb565b61176667fe7c4e4b475a952f60c01b6134fb565b61177a67e576665e414504e260c01b61236e565b61178e67c1951a6bf731415c60c01b61236e565b6117a267bcf9daa89781fa9260c01b61236e565b6040518060400160405280848152602001838152506006600086815260200190815260200160002060008201518160000155602082015181600101559050506117f5677d38cddaa73b4cd560c01b61236e565b611809674e369557c4cc689460c01b61236e565b837f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e46848460405161183b929190616b28565b60405180910390a250505050565b6000919050565b6000919050565b600060019050919050565b60006118786726ed6cc6ca12515c60c01b6112e9565b61188c67f3fc49482028cbb860c01b6112e9565b6118a06740317a79cae6a3ff60c01b6112e9565b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b600061190d673d62ab4d7710acbc60c01b61313f565b61192167f5ec18cba7ac1a7d60c01b61313f565b611935679db22e70efceb86460c01b61313f565b61193e8261423b565b9050919050565b611959671d680aabd6ed520f60c01b6112e6565b61196d670db8f7bdfadfeff060c01b6112e6565b611981671ae6c451e60de92860c01b6112e6565b600061198b6141ee565b90506119a167f7d32d8906820d3f60c01b6112e6565b6119b5676b5ecf2ad2717b6660c01b6112e6565b60006119c2828787614416565b90506119d8678930eff28cf2c04160c01b6112e6565b6119ec679f20e9b17500460560c01b6112e6565b611a00677ca89a569a225a0560c01b6112e6565b611a4e8185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506144aa565b611a8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8490616cac565b60405180910390fd5b611aa167c89c5256c255cd4560c01b6112e6565b611ab56706cfd7286ad73d8260c01b6112e6565b611ac9672058869716de787360c01b6112e6565b60008686604051602001611ade929190616937565b604051602081830303815290604052805190602001209050611b0a67914e8e51289ed81b60c01b6112e6565b611b1e67b640d92f5e3a92a160c01b6112e6565b611b32672e77c73401cfa3be60c01b6112e6565b3073ffffffffffffffffffffffffffffffffffffffff16611b528861423b565b73ffffffffffffffffffffffffffffffffffffffff1614611ba8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9f90616d2c565b60405180910390fd5b611bbc671b56bb304504aee160c01b6112e6565b611bd067f8d825a0eb024ee360c01b6112e6565b611be467e3cd54bfdb3dbc1960c01b6112e6565b611bf867df5cb1449bda7ee460c01b6112e6565b600073ffffffffffffffffffffffffffffffffffffffff16611c198261423b565b73ffffffffffffffffffffffffffffffffffffffff1614611c6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c6690616ccc565b60405180910390fd5b611c836787d3535b4980b13660c01b6112e6565b611c976794acf06b83d557f660c01b6112e6565b611cab6760f4aa612cf7d42160c01b6112e6565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635ef2c7f08888303060006040518663ffffffff1660e01b8152600401611d0f959493929190616b51565b600060405180830381600087803b158015611d2957600080fd5b505af1158015611d3d573d6000803e3d6000fd5b50505050611d5567c9e082359969231260c01b6112e6565b611d69671d740df0723fd05a60c01b6112e6565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635b0fc9c382856040518363ffffffff1660e01b8152600401611dc6929190616aff565b600060405180830381600087803b158015611de057600080fd5b505af1158015611df4573d6000803e3d6000fd5b50505050611e0c6726f59b7ef8763d4f60c01b6112e6565b611e20673a0a0fb27f49257160c01b6112e6565b611e2a818461457c565b50505050505050565b50565b611e4a675c585e7ab40c4bd160c01b6112e6565b611e5e67b6bede9bd2147dbe60c01b6112e6565b611e7267b3e36ec211dc37a060c01b6112e6565b6000611e7c6141ee565b9050611e92671fb3f2271177d64f60c01b6112e6565b611ea667bc7e7b081ba18bb360c01b6112e6565b611eba67eb66ea1dc8fe90f060c01b6112e6565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff1660e01b8152600401611f159190616ae4565b60206040518083038186803b158015611f2d57600080fd5b505afa158015611f41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f659190615973565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611fd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fc990616d8c565b60405180910390fd5b611fe66780681ba3d3bd6c0560c01b6112e6565b611ffa67c2ee83ed18bdad0d60c01b6112e6565b61200e673ab44ffb1086bfbb60c01b6112e6565b61202267b48e8fb56cf659bd60c01b6112e6565b3073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf846040518263ffffffff1660e01b81526004016120949190616ae4565b60206040518083038186803b1580156120ac57600080fd5b505afa1580156120c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120e49190615973565b73ffffffffffffffffffffffffffffffffffffffff161461213a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161213190616c6c565b60405180910390fd5b61214e67c460fb6a3efa6b6460c01b6112e6565b61216267a0dfc273c95e8b5860c01b6112e6565b612176672ac52e24f30b86ad60c01b6112e6565b61218a67111495d151c5ac5b60c01b6112e6565b600073ffffffffffffffffffffffffffffffffffffffff166121ab8361423b565b73ffffffffffffffffffffffffffffffffffffffff1614612201576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f890616e2c565b60405180910390fd5b612215674f033fc1bc83014b60c01b6112e6565b61222967f2a8865b6120c72860c01b6112e6565b61223d67c12905e462874f3a60c01b6112e6565b612247828261457c565b5050565b6000919050565b6060612268676429ed32e33f625a60c01b6112ec565b61227c670f050634fa8ef71f60c01b6112ec565b61229067f381eb2aa4a89bb460c01b6112ec565b6007600085815260200190815260200160002083836040516122b3929190616963565b90815260200160405180910390208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156123555780601f1061232a57610100808354040283529160200191612355565b820191906000526020600020905b81548152906001019060200180831161233857829003601f168201915b505050505090509392505050565b600060019050919050565b50565b6060612387677dcc04d7d9f56a1b60c01b611035565b61239b677450a3614229955160c01b611035565b6123af673d818fa87e1f8bcc60c01b611035565b600560008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124565780601f1061242b57610100808354040283529160200191612456565b820191906000526020600020905b81548152906001019060200180831161243957829003601f168201915b50505050509050919050565b60006124786722bd6e296e0c77b260c01b6112e6565b61248c67752430d62c413d8c60c01b6112e6565b6124a0674ca0e2f1f026937160c01b6112e6565b6124b7826000015183602001518460400151614416565b9050919050565b6124d267f772222a3366273960c01b611e33565b6124e6677e48a4752a028e1460c01b611e33565b6124fa6754e2f8cd8fda0cfe60c01b611e33565b61250e671b1abbc8110e006760c01b611e33565b612522677621c15edc08840a60c01b611e33565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166125ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125a490616dac565b60405180910390fd5b6125c1671978b446280e03b660c01b611e33565b6125d567bc99b99e8c2c7a2260c01b611e33565b6125e967afd0aa94ba119c4e60c01b611e33565b6125fd670fe65c577fbdf81160c01b611e33565b61261167e175d6b24c96a59a60c01b611e33565b61262567514f675749914bc160c01b611e33565b61263967fed39a5b1d24bceb60c01b611e33565b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614156126a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161269f90616eac565b60405180910390fd5b6126bc67325d0391dd900ca560c01b611e33565b6126d067f494ac4bc126e05760c01b611e33565b6126e467a8a2f5acd805e41c60c01b611e33565b6126f8679f1149f801dce85b60c01b611e33565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16612783576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161277a90616e4c565b60405180910390fd5b61279767e767f88c374b22f760c01b611e33565b6127ab679a8eb2ad91b01fb960c01b611e33565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550612816675f52f4e3c8e1709960c01b611e33565b61282a67b8b235546176405e60c01b611e33565b7fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b328260405161285b929190616aa0565b60405180910390a150565b6000919050565b612881670e0365d875262ec660c01b611035565b8261289667f50d5b47a249620260c01b6134fb565b6128aa6780a9a7e92d8b8f3360c01b6134fb565b6128bd6633700746b9ddbf60c01b6134fb565b6128d1670296e3014015bcc160c01b6134fb565b6128da816140c9565b612919576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161291090616eec565b60405180910390fd5b61292d674c282dc748e87be160c01b6134fb565b61294167fe7c4e4b475a952f60c01b6134fb565b61295567bc7bd04a73b6203660c01b611035565b6129696759a9263c415da46560c01b611035565b61297d679a75a86e63f4699c60c01b611035565b828260056000878152602001908152602001600020919061299f929190615608565b506129b467c58e7e58e6033fa260c01b611035565b6129c867b5705ce309b25cc060c01b611035565b837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f784846040516129fa929190616c26565b60405180910390a250505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b612a4267b59f845eacd3e3d460c01b6112e6565b612a566703bed308595d82ec60c01b6112e6565b612a6a6735c05cb99b23924d60c01b6112e6565b6000612a746141ee565b9050612a8a676b524f27cda9e32960c01b6112e6565b612a9e6763afe5bb9ac610af60c01b6112e6565b612ab267a29647973f12d5ba60c01b6112e6565b600073ffffffffffffffffffffffffffffffffffffffff16612ad38361423b565b73ffffffffffffffffffffffffffffffffffffffff1614612b29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b2090616e0c565b60405180910390fd5b612b3d670d1d2b6f47605d7260c01b6112e6565b612b51671030c11d37f558d660c01b6112e6565b612b6567ae826e85957a1f1a60c01b6112e6565b612b7967313e6fb10339b26a60c01b6112e6565b600073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612c1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c1290616dec565b60405180910390fd5b612c2f67c35c95f5b2f5c41e60c01b6112e6565b612c4367d9475b94663b48f460c01b6112e6565b612c57676fe3715021747ac060c01b6112e6565b612c6b67248d6eedf15471ba60c01b6112e6565b8073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b8152600401612cdd9190616ae4565b60206040518083038186803b158015612cf557600080fd5b505afa158015612d09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d2d9190615973565b73ffffffffffffffffffffffffffffffffffffffff1614612d83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d7a90616e6c565b60405180910390fd5b612d9767b2f300dc39d598cc60c01b6112e6565b612dab67a0097a09cab9446160c01b6112e6565b806009600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550612e1167a4975688d16fa0f660c01b6112e6565b612e25679471c1f926851d3d60c01b6112e6565b7fc1e082a8c26f27c26e1bf5d0ce7ddd579ec7f6d7eb3ea90d8abd6c40991bae368282604051612e56929190616aff565b60405180910390a15050565b600060019050919050565b6000919050565b612e8867f0dbbd97932a9cf460c01b61313f565b82612e9d67f50d5b47a249620260c01b6134fb565b612eb16780a9a7e92d8b8f3360c01b6134fb565b612ec46633700746b9ddbf60c01b6134fb565b612ed8670296e3014015bcc160c01b6134fb565b612ee1816140c9565b612f20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f1790616eec565b60405180910390fd5b612f34674c282dc748e87be160c01b6134fb565b612f4867fe7c4e4b475a952f60c01b6134fb565b612f5c679c2c6990d9886a8560c01b61313f565b612f706722b6aa590de919d760c01b61313f565b612f8467b344d0528ee48d4360c01b61313f565b612f9867f5c69e8e01e1972b60c01b61313f565b612fa38484846145d0565b50505050565b60025481565b6000919050565b600060019050919050565b600060019050919050565b612fe067b59862a5cb01d1d860c01b611e33565b612ff4677e48a4752a028e1460c01b611e33565b6130086754e2f8cd8fda0cfe60c01b611e33565b61301c671b1abbc8110e006760c01b611e33565b613030677621c15edc08840a60c01b611e33565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166130bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130b290616dac565b60405180910390fd5b6130cf671978b446280e03b660c01b611e33565b6130e367bc99b99e8c2c7a2260c01b611e33565b6130f767e0409d61ef95483b60c01b611e33565b61310b67acb2c628a7cbdba860c01b611e33565b61311f677f6b80ac4f415fbe60c01b611e33565b61313367c7dcdfc4bd89af4960c01b611e33565b61313c8161475f565b50565b50565b613156675ad357f5b5185dde60c01b6112e6565b61316a677e48a4752a028e1460c01b611e33565b61317e6754e2f8cd8fda0cfe60c01b611e33565b613192671b1abbc8110e006760c01b611e33565b6131a6677621c15edc08840a60c01b611e33565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16613231576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161322890616dac565b60405180910390fd5b613245671978b446280e03b660c01b611e33565b61325967bc99b99e8c2c7a2260c01b611e33565b61326d67b6d13a6838977b8e60c01b6112e6565b61328167b0a0962005d3c37760c01b6112e6565b61329567c0aefd843c12ea9e60c01b6112e6565b6132a967e642670e0d27f29260c01b6112e6565b6132bd67c0313a21cbd3821e60c01b6112e6565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561332d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161332490616dcc565b60405180910390fd5b613341675caac5a85133de4160c01b6112e6565b61335567a2be6d0f2de4dd4960c01b6112e6565b61336967d23b7832c1a8b2db60c01b6112e6565b61337d67a600bc2f5edecfe560c01b6112e6565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561340e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161340590616f0c565b60405180910390fd5b613422673e1cb88c06623dbd60c01b6112e6565b613436679fa0a30141c9e3c660c01b6112e6565b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061348b67b19c0378c1b36ce560c01b6112e6565b61349f67479d5cd353ac14bc60c01b6112e6565b7fdb0239c63d4033dcdd21bd44f8dd479a03efbae12f6bbe27c0a5f923d26514cc600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516134f09190616a6a565b60405180910390a150565b50565b6000919050565b6000919050565b6000919050565b60008061352a678b7eb94e0d7470e160c01b61236e565b61353e6713b8b8268dfccf6560c01b61236e565b61355267728bcb87d085989360c01b61236e565b6006600084815260200190815260200160002060000154600660008581526020019081526020016000206001015491509150915091565b61359d67cd6b89dfd7de4dbe60c01b6112e6565b6135b167fed9adae7726fca660c01b6112e6565b6135c56728deafdba22640fe60c01b6112e6565b60006135cf6141ee565b90506135e567abf597ba3b777beb60c01b6112e6565b6135f96713451046aa4f1d0460c01b6112e6565b61360d670d69672df90e55f760c01b6112e6565b600073ffffffffffffffffffffffffffffffffffffffff1661362e8361423b565b73ffffffffffffffffffffffffffffffffffffffff1614613684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161367b90616e0c565b60405180910390fd5b61369867335ee6ed9412f34d60c01b6112e6565b6136ac6751938bbe08aa7eba60c01b6112e6565b6136c0673d1ee0d78f3ec29760c01b6112e6565b6136d467deb59caecbb1665060c01b6112e6565b8073ffffffffffffffffffffffffffffffffffffffff166009600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614613775576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161376c90616c8c565b60405180910390fd5b61378967028586bf5862ef6f60c01b6112e6565b61379d67065b44de57d02de360c01b6112e6565b6137b167602fbb4f5dd0ecee60c01b6112e6565b6137c56746e7762e4a7dc09360c01b6112e6565b3073ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004016138379190616ae4565b60206040518083038186803b15801561384f57600080fd5b505afa158015613863573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138879190615973565b73ffffffffffffffffffffffffffffffffffffffff16146138dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016138d490616e6c565b60405180910390fd5b6138f16702bb6807de41edc960c01b6112e6565b613905679e8e05b250dfcf7660c01b6112e6565b6139196718ed0609e34537cb60c01b6112e6565b613923823061457c565b6139376748f55c9b11d3e84d60c01b6112e6565b61394b6721d9d754c514c3d060c01b6112e6565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a83306040518363ffffffff1660e01b81526004016139a8929190616aff565b600060405180830381600087803b1580156139c257600080fd5b505af11580156139d6573d6000803e3d6000fd5b505050506139ee67fd1fdef659e1010260c01b6112e6565b613a02677eb60258d7cb9f4260c01b6112e6565b7fcefbe9dbadcf675eef14e23810996ff38541fc26b4dd77cd6724b0eedc96f20082604051613a319190616ae4565b60405180910390a15050565b6000613a536746d5f36e497b280d60c01b611e33565b613a67677077a4665ef04d8360c01b611e33565b613a7b6788288bf71f1972a760c01b611e33565b613ac98484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506144aa565b90509392505050565b613ae667795dc99e426e462d60c01b61313f565b81613afb67f50d5b47a249620260c01b6134fb565b613b0f6780a9a7e92d8b8f3360c01b6134fb565b613b226633700746b9ddbf60c01b6134fb565b613b36670296e3014015bcc160c01b6134fb565b613b3f816140c9565b613b7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613b7590616eec565b60405180910390fd5b613b92674c282dc748e87be160c01b6134fb565b613ba667fe7c4e4b475a952f60c01b6134fb565b613bba67ee555b1a12d1492760c01b61313f565b613bce67c3feaa5a7105ffed60c01b61313f565b613be267561ccfe8117327b160c01b61313f565b613bf667fcff312f23d9ea2a60c01b61313f565b613c00838361457c565b505050565b613c1967dd6cfcda1095e68d60c01b6112e6565b613c2d67b2266613e068a5ae60c01b6112e9565b613c41676a66a63870f964f960c01b6112e9565b613c556772f22eca890742ba60c01b6112e9565b613c6967c8ab57d60023f99860c01b6112e9565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614613cf9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613cf090616d0c565b60405180910390fd5b613d0d67d31dec9098d614f660c01b6112e9565b613d2167a184879381a9c67460c01b6112e9565b6000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613d77675e44e6e1c885710560c01b6112e9565b613d8b67aa009200742bcec960c01b6112e6565b613d9f676778b133ab52845560c01b6112e6565b613db3678667223e6872d60460c01b6112e6565b613dc76764a7d1c4780822b560c01b6112e6565b613ddb67170353d11362b36760c01b6112e6565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415613e4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613e4290616dcc565b60405180910390fd5b613e5f671bccc955ac6bffab60c01b6112e6565b613e73674e89d865d51f603b60c01b6112e6565b83600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613ec867aa75aac8727bba3060c01b6112e6565b613edc67bc05563bbe2c2b8960c01b6112e6565b613f26838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506149dd565b613f3a67c503094bc707a00a60c01b6112e6565b613f4e67ffcfb356d0e68a7c60c01b6112e6565b613f5781614b39565b613f6b6732ca1833e9907bb960c01b6112e9565b613f7f672942130a5b94b82160c01b6112e9565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051613fae9190616a85565b60405180910390a150505050565b50565b6060613fd5671b32f2f8d8869a6f60c01b61313f565b613fe96749be5d333bc42b6560c01b61313f565b613ffd6785666fa49e322ac760c01b61313f565b6004600084815260200190815260200160002060008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156140b55780601f1061408a576101008083540402835291602001916140b5565b820191906000526020600020905b81548152906001019060200180831161409857829003601f168201915b5050505050905092915050565b6000919050565b60006140df6708c77affa541e18b60c01b6112e6565b6140f367521330e5fc7d769860c01b6112e6565b61410767ee60050ca6fbb81560c01b6112e6565b61410f6141ee565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004016141809190616ae4565b60206040518083038186803b15801561419857600080fd5b505afa1580156141ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141d09190615973565b73ffffffffffffffffffffffffffffffffffffffff16149050919050565b600061420467cfc35b626608c6f260c01b611043565b614218677e4f9863b1e00bcc60c01b611043565b61422c67e01fbdbc1b0ec7df60c01b611043565b6142366028614ba5565b905090565b60006142516734c898dab669dbe060c01b61313f565b61426567cb6a024e2c9c029660c01b61313f565b614279675ec40cd398772bc260c01b61313f565b600061428f673d6406416aec196260c01b61313f565b6142a367e011bf88df11efc060c01b61313f565b6060600460008581526020019081526020016000206000603c81526020019081526020016000208054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561435e5780601f106143335761010080835404028352916020019161435e565b820191906000526020600020905b81548152906001019060200180831161434157829003601f168201915b50505050509050614379673e55432ebc04cadb60c01b61313f565b61438d67183cbc71a081b03060c01b61313f565b6000815111156143cf576143ab678355c8cf50ff3e7160c01b61313f565b6143bf67b137926d5696530f60c01b61313f565b6143c881614d3b565b91506143e4565b6143e367477c4653a0f8669a60c01b61313f565b5b6143f867a8602402197bda4b60c01b61313f565b61440c67e3a1de0cc7f9af8c60c01b61313f565b8192505050919050565b600061442c67922c8cf80d00015360c01b6112e6565b6144406712b19c2c7a88fb7260c01b6112e6565b61445467d2a36aa1db826d0660c01b6112e6565b6144a17f621363c539a3aa1024c8837ca1dc095db03b7f9512b3a95ecb429aae7fd953ed85858560405160200161448d939291906168fa565b604051602081830303815290604052614e2c565b90509392505050565b60006144c067bec4827058d1d27d60c01b611e33565b6144d4672f274b74d16058ba60c01b611e33565b6144e8670dd4bedb64e2a2d160c01b611e33565b60006144fd8385614ea990919063ffffffff16565b90506145136748284973b654d0c360c01b611e33565b61452767af16bd1d5a57497b60c01b611e33565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b61459067ec43fa02ed1b7fba60c01b61313f565b6145a46771bb738d72d2990960c01b61313f565b6145b86722ea0a680f799d0b60c01b61313f565b6145cc82603c6145c7846151b1565b6145d0565b5050565b6145e467a66be66c271d358960c01b61313f565b6145f8678fb45734fe1de6cf60c01b61313f565b61460c67f3e2cc8c4d3ab69d60c01b61313f565b827f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af752838360405161463e929190616f47565b60405180910390a261465a674b161f4d55631dca60c01b61313f565b61466e6773a3fc59a0a7d57d60c01b61313f565b603c8214156146f85761468b67678afe89a91f46ca60c01b61313f565b61469f67a65f4a15aa41550760c01b61313f565b6146b36730a298fe015e3a2d60c01b61313f565b827f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd26146de83614d3b565b6040516146eb9190616a85565b60405180910390a261470d565b61470c673d1f5fed2e823e9560c01b61313f565b5b614721673789940a5371c92060c01b61313f565b806004600085815260200190815260200160002060008481526020019081526020016000209080519060200190614759929190615688565b50505050565b6147736715e658c0f6e292b160c01b611e33565b614787672c431971dc3f178360c01b611e33565b61479b67ea35c52bf51c28f760c01b611e33565b6147af676c0120f97757204260c01b611e33565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561481f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161481690616cec565b60405180910390fd5b6148336768a59374672fe76a60c01b611e33565b614847676aacc0e4664894f760c01b611e33565b61485b67eacfbaa68e55918960c01b611e33565b61486f67b14b9b00bd32573160c01b611e33565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156148fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016148f290616e8c565b60405180910390fd5b61490f67b43b7e075756508e60c01b611e33565b614922663a0e15b185871360c01b611e33565b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061498d6719a12fa44495bf1260c01b611e33565b6149a1676a185bb7ec86ed3260c01b611e33565b7fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a32826040516149d2929190616aa0565b60405180910390a150565b6149f1672da1cbb2c8b712bf60c01b611e33565b614a0567a22c42eaa986a7b160c01b611e33565b614a1967161aa01e34b61d0a60c01b611e33565b600081511415614a6d57614a3767c00dbd5b52865bb760c01b611e33565b614a4b678a5faf951795361260c01b611e33565b614a5f6745413064a2aacfc660c01b611e33565b614a683261475f565b614b36565b614a8167d4fad28aec7c156d60c01b611e33565b614a9567a88c23ab9e9dede660c01b611e33565b614aa9675a0d1bd87812f63460c01b611e33565b600081519050614ac367a97ff88e96ad9c4460c01b611e33565b614ad7672ebda776213b4a1860c01b611e33565b60005b81811015614b3357614af667197b6470f65d698160c01b611e33565b614b0a678e0c2e8e0183d04a60c01b611e33565b614b26838281518110614b1957fe5b602002602001015161475f565b8080600101915050614ada565b50505b50565b614b4d67b69be6bf736d8c1a60c01b611043565b614b6167e18b25fd36211d0160c01b611043565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000614bbb67ef0225287ba17ba060c01b611043565b614bcf6795958667c898951b60c01b611043565b614be367ec06b0be9f42607760c01b611043565b6000614bf967b7cd17d69da836b660c01b611043565b614c0d671b7ac62a98e22a5460c01b611043565b614c15615291565b15614cde57614c2e674b9fe2d527bba60760c01b611043565b614c426737f58d18ef197c9060c01b611043565b614c56679e0c2e494127333d60c01b611043565b6000836000369050039050614c75678767fa9e72b3efac60c01b611043565b614cd660003683906014850192614c8e9392919061701e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061545c565b915050614d0a565b614cf267531fb14624ef4c0060c01b611043565b614d0667365aa35b4857b9d560c01b611043565b3390505b614d1e67bb664b7abb1efcc160c01b611043565b614d3267c66db900ff1468ad60c01b611043565b80915050919050565b6000614d5167591fa59c86b3e2b260c01b61313f565b614d656786d9d3ebf7b12de660c01b61313f565b614d79672bb7a24a76e9d99d60c01b61313f565b6000614d8f6735c80e734801636f60c01b61313f565b614da36743e003716fd39fc160c01b61313f565b614db7678182032961e4246e60c01b61313f565b6014835114614dc557600080fd5b614dd9672ac8f8558b01656560c01b61313f565b614ded6797ae494f23cf5c9360c01b61313f565b600c6101000a6020840151049050614e0f67469cded1b77485ec60c01b61313f565b614e236783a2bd13724bd88a60c01b61313f565b80915050919050565b6000614e42677f88a34eed9bb47260c01b613fbc565b614e566749bb13c5d53bb9db60c01b613fbc565b614e6a6721a77fc5a306172f60c01b613fbc565b614ea1600254308585604051602001614e869493929190616a20565b6040516020818303038152906040528051906020012061558b565b905092915050565b6000614ebf67610b12321a07a31960c01b6155f7565b614ed3670f66a519ee9137b960c01b6155f7565b614ee767140d9f9935e2385360c01b6155f7565b6000614efd670bfea895a9f81bec60c01b6155f7565b614f1167a8c715ec3b9d89c160c01b6155f7565b60418351141561516a57614f2f67101129654a82afeb60c01b6155f7565b614f4367a44405322c11578a60c01b6155f7565b614f57673ae09945b2f5082360c01b6155f7565b6000614f6d67900a30e48d0fc7bd60c01b6155f7565b614f81677d193483635abe1860c01b6155f7565b6000614f9767f24e14d594e9077960c01b6155f7565b614fab67a847d7edacf7e00c60c01b6155f7565b6000614fc1670bcc457b0963bc0f60c01b6155f7565b6020860151925060408601519150606086015160001a9050614fed6730650d5e99574f3560c01b6155f7565b615001675197804ca644c8a460c01b6155f7565b601b8160ff161015615040576150216781206cb7a1d9cec760c01b6155f7565b615035679d0aaefe9954d7fb60c01b6155f7565b601b81019050615055565b61505467091b6422f681fe5560c01b6155f7565b5b615069677849785c6ede9b0e60c01b6155f7565b61507d6732075f7517db825b60c01b6155f7565b601b8160ff161480156150a0575061509f67638a38da6bf5bb4360c01b6155fa565b5b806150ca5750601c8160ff161480156150c957506150c8671d94865be2a4ed5560c01b6155fa565b5b5b1561514d576150e367657d88528f4e396b60c01b6155f7565b6150f7675469679748b05cfe60c01b6155f7565b6001878285856040516000815260200160405260405161511a9493929190616ba4565b6020604051602081039080840390855afa15801561513c573d6000803e3d6000fd5b505050602060405103519350615162565b61516167539b701a1f57136860c01b6155f7565b5b50505061517f565b61517e67f3927173995ed52360c01b6155f7565b5b61519367303f1b174284648060c01b6155f7565b6151a767c60031985823124160c01b6155f7565b8091505092915050565b60606151c7674dfc4b50b85183c760c01b61313f565b6151db6708240a8d8866ce7560c01b61313f565b6151ef67d3d82140cad9570c60c01b61313f565b6060601467ffffffffffffffff8111801561520957600080fd5b506040519080825280601f01601f19166020018201604052801561523c5781602001600182028036833780820191505090505b50905061525367942ccf8fe5ba69e260c01b61313f565b600c6101000a830260208201526152746720dab640ed783a0f60c01b61313f565b61528867b789515e6f3baf4d60c01b61313f565b80915050919050565b60006152a76718d82ab5ae60310f60c01b611043565b6152bb67b1091fd4002007a760c01b611043565b6152cf67e754ffc9cc3865c960c01b611043565b60006152e5677ed152cd4162d4dd60c01b611043565b6152f967d897cf3d19cf81cd60c01b611043565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561541857615363677fe0037509e467e160c01b611043565b61537767d0b1c04b10d8098a60c01b611043565b61538b670b92e025f4debba760c01b611043565b61539f6739792e98f7fbfdea60c01b611043565b602c600036905010156153e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016153de90616d6c565b60405180910390fd5b6153fb6755c879b00c45b69f60c01b611043565b61540f679a100b07747e893d60c01b611043565b6001905061542d565b61542c6757b90b57dc0a6a0160c01b611043565b5b61544167cc41edf636370ef460c01b611043565b61545567ff5a153bde944b0360c01b611043565b8091505090565b600061547267e937c30ee854c6f460c01b615605565b61548667ae40a839349e539460c01b615605565b61549a6779ff25ce2e3aef5860c01b615605565b60006154b067471a531a4d41d03a60c01b615605565b6154c467dbf5cb870bd2bda760c01b615605565b6154d86715ee1c447c585eff60c01b615605565b601483511461551c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161551390616ecc565b60405180910390fd5b61553067595b08e56ca2004360c01b615605565b61554467658f3d9a047d9b2b60c01b615605565b6c01000000000000000000000000602084015104905061556e670a7d36500000fb3860c01b615605565b615582678f46d49d645b8e7560c01b615605565b80915050919050565b60006155a167cb1f58f8e99e701160c01b6155f7565b6155b567477dbcabce0c716f60c01b6155f7565b6155c967c58144008cda6be160c01b6155f7565b816040516020016155da9190616991565b604051602081830303815290604052805190602001209050919050565b50565b600060019050919050565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061564957803560ff1916838001178555615677565b82800160010185558215615677579182015b8281111561567657823582559160200191906001019061565b565b5b5090506156849190615708565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106156c957805160ff19168380011785556156f7565b828001600101855582156156f7579182015b828111156156f65782518255916020019190600101906156db565b5b5090506157049190615708565b5090565b5b80821115615721576000816000905550600101615709565b5090565b60008135905061573481617232565b92915050565b60008151905061574981617232565b92915050565b60008083601f84011261576157600080fd5b8235905067ffffffffffffffff81111561577a57600080fd5b60208301915083602082028301111561579257600080fd5b9250929050565b6000813590506157a881617249565b92915050565b6000813590506157bd81617260565b92915050565b6000813590506157d281617277565b92915050565b60008083601f8401126157ea57600080fd5b8235905067ffffffffffffffff81111561580357600080fd5b60208301915083600182028301111561581b57600080fd5b9250929050565b600082601f83011261583357600080fd5b813561584661584182616fa4565b616f77565b9150808252602083016020830185838301111561586257600080fd5b61586d83828461719a565b50505092915050565b6000813590506158858161728e565b92915050565b60008083601f84011261589d57600080fd5b8235905067ffffffffffffffff8111156158b657600080fd5b6020830191508360018202830111156158ce57600080fd5b9250929050565b6000606082840312156158e757600080fd5b6158f16060616f77565b9050600061590184828501615725565b600083015250602061591584828501615799565b602083015250604061592984828501615799565b60408301525092915050565b600081359050615944816172a5565b92915050565b60006020828403121561595c57600080fd5b600061596a84828501615725565b91505092915050565b60006020828403121561598557600080fd5b60006159938482850161573a565b91505092915050565b6000602082840312156159ae57600080fd5b60006159bc84828501615799565b91505092915050565b600080604083850312156159d857600080fd5b60006159e685828601615799565b92505060206159f785828601615725565b9150509250929050565b600080600060608486031215615a1657600080fd5b6000615a2486828701615799565b9350506020615a3586828701615799565b9250506040615a4686828701615799565b9150509250925092565b60008060008060608587031215615a6657600080fd5b6000615a7487828801615799565b9450506020615a8587828801615799565b935050604085013567ffffffffffffffff811115615aa257600080fd5b615aae878288016157d8565b925092505092959194509250565b600080600060408486031215615ad157600080fd5b6000615adf86828701615799565b935050602084013567ffffffffffffffff811115615afc57600080fd5b615b08868287016157d8565b92509250509250925092565b600080600060408486031215615b2957600080fd5b6000615b3786828701615799565b935050602084013567ffffffffffffffff811115615b5457600080fd5b615b608682870161588b565b92509250509250925092565b600080600080600060608688031215615b8457600080fd5b6000615b9288828901615799565b955050602086013567ffffffffffffffff811115615baf57600080fd5b615bbb8882890161588b565b9450945050604086013567ffffffffffffffff811115615bda57600080fd5b615be68882890161588b565b92509250509295509295909350565b60008060408385031215615c0857600080fd5b6000615c1685828601615799565b9250506020615c2785828601615935565b9150509250929050565b600080600060608486031215615c4657600080fd5b6000615c5486828701615799565b9350506020615c6586828701615935565b925050604084013567ffffffffffffffff811115615c8257600080fd5b615c8e86828701615822565b9150509250925092565b600060208284031215615caa57600080fd5b6000615cb8848285016157ae565b91505092915050565b600060208284031215615cd357600080fd5b6000615ce1848285016157c3565b91505092915050565b600060208284031215615cfc57600080fd5b6000615d0a84828501615876565b91505092915050565b60008060008060608587031215615d2957600080fd5b6000615d3787828801615876565b945050602085013567ffffffffffffffff811115615d5457600080fd5b615d608782880161574f565b93509350506040615d7387828801615725565b91505092959194509250565b600060608284031215615d9157600080fd5b6000615d9f848285016158d5565b91505092915050565b615db18161712e565b82525050565b615dc081617051565b82525050565b615dd7615dd282617051565b6171dc565b82525050565b615de681617063565b82525050565b615df58161706f565b82525050565b615e0c615e078261706f565b6171ee565b82525050565b6000615e1d82616fd0565b615e278185616fe6565b9350615e378185602086016171a9565b615e4081617214565b840191505092915050565b6000615e5682616fd0565b615e608185616ff7565b9350615e708185602086016171a9565b80840191505092915050565b615e8581617140565b82525050565b615e9481617164565b82525050565b6000615ea68385617002565b9350615eb383858461719a565b615ebc83617214565b840190509392505050565b6000615ed38385617013565b9350615ee083858461719a565b82840190509392505050565b6000615ef782616fdb565b615f018185617002565b9350615f118185602086016171a9565b615f1a81617214565b840191505092915050565b6000615f32601983617013565b91507f737570706f727473496e746572666163652862797465733429000000000000006000830152601982019050919050565b6000615f72602483617002565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f6465207265736f60008301527f6c766572000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000615fd8602183617002565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f6465206f776e6560008301527f72000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061603e602983617002565b91507f454e53436f6e74726f6c6c65723a20696e76616c696420677561726469616e2060008301527f7369676e617475726500000000000000000000000000000000000000000000006020830152604082019050919050565b60006160a4602283617002565b91507f454e53436f6e74726f6c6c65723a206c6162656c20616c72656164792074616b60008301527f656e0000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061610a601c83617013565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b600061614a602083617002565b91507f477561726465643a2063616e6e6f74206164642030783020677561726469616e6000830152602082019050919050565b600061618a602f83617002565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b60006161f0600d83617013565b91507f61646472286279746573333229000000000000000000000000000000000000006000830152600d82019050919050565b6000616230601b83617002565b91507f454e53436f6e74726f6c6c65723a20696e76616c6964206e6f646500000000006000830152602082019050919050565b6000616270602183617002565b91507f454e53436f6e74726f6c6c65723a206e6f646520646f65736e2774206578697360008301527f74000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006162d6602283617002565b91507f47617465776179526563697069656e743a20696e76616c6964206d73672e646160008301527f74610000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061633c601483617013565b91507f7465787428627974657333322c737472696e67290000000000000000000000006000830152601482019050919050565b600061637c600d83617013565b91507f6e616d65286279746573333229000000000000000000000000000000000000006000830152600d82019050919050565b60006163bc602b83617002565b91507f454e53436f6e74726f6c6c65723a2063616c6c6572206973206e6f742074686560008301527f206e6f6465206f776e65720000000000000000000000000000000000000000006020830152604082019050919050565b6000616422602683617002565b91507f477561726465643a2074782e6f726967696e206973206e6f742074686520677560008301527f61726469616e00000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000616488602683617002565b91507f454e53436f6e74726f6c6c65723a2063616e6e6f74207365742030783020726560008301527f67697374727900000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006164ee602583617002565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c7265616479207375626d60008301527f69747465640000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000616554600f83617013565b91507f7075626b657928627974657333322900000000000000000000000000000000006000830152600f82019050919050565b6000616594602283617002565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c7265616479206578697360008301527f74730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006165fa602383617002565b91507f454e53436f6e74726f6c6c65723a206e6f646520616c726561647920696e207360008301527f796e6300000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000616660601f83617002565b91507f477561726465643a20677561726469616e20646f65736e2774206578697374006000830152602082019050919050565b60006166a0602583617002565b91507f454e53436f6e74726f6c6c65723a20696e76616c696420656e73206e6f64652060008301527f6f776e65720000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000616706602083617002565b91507f477561726465643a20677561726469616e20616c7265616479206578697374736000830152602082019050919050565b6000616746601b83617002565b91507f477561726465643a2063616e6e6f742072656d6f76652073656c6600000000006000830152602082019050919050565b6000616786601d83617002565b91507f42797465734c69623a20696e76616c69642064617461206c656e6774680000006000830152602082019050919050565b60006167c6603783617002565b91507f454e5341627374726163745265736f6c7665723a20726576657274656420627960008301527f206f6e6c794e6f64654f776e6572206d6f6469666965720000000000000000006020830152604082019050919050565b600061682c601283617013565b91507f6164647228627974657333322c75696e742900000000000000000000000000006000830152601282019050919050565b600061686c602383617002565b91507f454e53436f6e74726f6c6c65723a20726567697374727920616c72656164792060008301527f73657400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6168ce81617103565b82525050565b6168e56168e082617103565b61720a565b82525050565b6168f481617121565b82525050565b60006169068286615dc6565b6014820191506169168285615dfb565b6020820191506169268284615dfb565b602082019150819050949350505050565b60006169438285615dfb565b6020820191506169538284615dfb565b6020820191508190509392505050565b6000616970828486615ec7565b91508190509392505050565b600061698782615f25565b9150819050919050565b600061699c826160fd565b91506169a88284615dfb565b60208201915081905092915050565b60006169c2826161e3565b9150819050919050565b60006169d78261632f565b9150819050919050565b60006169ec8261636f565b9150819050919050565b6000616a0182616547565b9150819050919050565b6000616a168261681f565b9150819050919050565b6000616a2c82876168d4565b602082019150616a3c8286615dc6565b601482019150616a4c8285615dfb565b602082019150616a5c8284615e4b565b915081905095945050505050565b6000602082019050616a7f6000830184615db7565b92915050565b6000602082019050616a9a6000830184615da8565b92915050565b6000604082019050616ab56000830185615da8565b616ac26020830184615db7565b9392505050565b6000602082019050616ade6000830184615ddd565b92915050565b6000602082019050616af96000830184615dec565b92915050565b6000604082019050616b146000830185615dec565b616b216020830184615db7565b9392505050565b6000604082019050616b3d6000830185615dec565b616b4a6020830184615dec565b9392505050565b600060a082019050616b666000830188615dec565b616b736020830187615dec565b616b806040830186615db7565b616b8d6060830185615db7565b616b9a6080830184615e8b565b9695505050505050565b6000608082019050616bb96000830187615dec565b616bc660208301866168eb565b616bd36040830185615dec565b616be06060830184615dec565b95945050505050565b60006020820190508181036000830152616c038184615e12565b905092915050565b6000602082019050616c206000830184615e7c565b92915050565b60006020820190508181036000830152616c41818486615e9a565b90509392505050565b60006020820190508181036000830152616c648184615eec565b905092915050565b60006020820190508181036000830152616c8581615f65565b9050919050565b60006020820190508181036000830152616ca581615fcb565b9050919050565b60006020820190508181036000830152616cc581616031565b9050919050565b60006020820190508181036000830152616ce581616097565b9050919050565b60006020820190508181036000830152616d058161613d565b9050919050565b60006020820190508181036000830152616d258161617d565b9050919050565b60006020820190508181036000830152616d4581616223565b9050919050565b60006020820190508181036000830152616d6581616263565b9050919050565b60006020820190508181036000830152616d85816162c9565b9050919050565b60006020820190508181036000830152616da5816163af565b9050919050565b60006020820190508181036000830152616dc581616415565b9050919050565b60006020820190508181036000830152616de58161647b565b9050919050565b60006020820190508181036000830152616e05816164e1565b9050919050565b60006020820190508181036000830152616e2581616587565b9050919050565b60006020820190508181036000830152616e45816165ed565b9050919050565b60006020820190508181036000830152616e6581616653565b9050919050565b60006020820190508181036000830152616e8581616693565b9050919050565b60006020820190508181036000830152616ea5816166f9565b9050919050565b60006020820190508181036000830152616ec581616739565b9050919050565b60006020820190508181036000830152616ee581616779565b9050919050565b60006020820190508181036000830152616f05816167b9565b9050919050565b60006020820190508181036000830152616f258161685f565b9050919050565b6000602082019050616f4160008301846168c5565b92915050565b6000604082019050616f5c60008301856168c5565b8181036020830152616f6e8184615e12565b90509392505050565b6000604051905081810181811067ffffffffffffffff82111715616f9a57600080fd5b8060405250919050565b600067ffffffffffffffff821115616fbb57600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000808585111561702e57600080fd5b8386111561703b57600080fd5b6001850283019150848603905094509492505050565b600061705c826170e3565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60007fffffffffffffffff00000000000000000000000000000000000000000000000082169050919050565b60006170dc82617051565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b600061713982617176565b9050919050565b600061714b82617152565b9050919050565b600061715d826170e3565b9050919050565b600061716f8261710d565b9050919050565b600061718182617188565b9050919050565b6000617193826170e3565b9050919050565b82818337600083830152505050565b60005b838110156171c75780820151818401526020810190506171ac565b838111156171d6576000848401525b50505050565b60006171e7826171f8565b9050919050565b6000819050919050565b600061720382617225565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61723b81617051565b811461724657600080fd5b50565b6172528161706f565b811461725d57600080fd5b50565b61726981617079565b811461727457600080fd5b50565b617280816170a5565b811461728b57600080fd5b50565b617297816170d1565b81146172a257600080fd5b50565b6172ae81617103565b81146172b957600080fd5b5056fea164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class ENSController__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.ENSController__factory = ENSController__factory; +ENSController__factory.bytecode = _bytecode; +ENSController__factory.abi = _abi; diff --git a/dist/typings/factories/ENSHelper__factory.d.ts b/dist/typings/factories/ENSHelper__factory.d.ts new file mode 100644 index 00000000..25d7904c --- /dev/null +++ b/dist/typings/factories/ENSHelper__factory.d.ts @@ -0,0 +1,54 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { ENSHelper, ENSHelperInterface } from "../ENSHelper"; +declare type ENSHelperConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class ENSHelper__factory extends ContractFactory { + constructor(...args: ENSHelperConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): ENSHelper; + connect(signer: Signer): ENSHelper__factory; + static readonly bytecode = "0x608060405234801561001057600080fd5b5061002b675e592fe27197979c60c01b6100a460201b60201c565b61004567eca2e4778f3efef360c01b6100a460201b60201c565b326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061009f67394751df3a1c14c460c01b6100a760201b60201c565b6100aa565b50565b50565b611576806100b96000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063392e53cd11610071578063392e53cd1461017657806377c14656146101945780637b103999146101c4578063c2ed35f9146101e2578063c4d66de814610212578063dc6008e21461022e576100a9565b80631262ed1c146100ae57806318121646146100de5780631a671dff146100fa5780632e6afd6e1461011657806338bc01b514610146575b600080fd5b6100c860048036038101906100c39190610f7d565b61025e565b6040516100d59190611258565b60405180910390f35b6100f860048036038101906100f39190610f7d565b610269565b005b610114600480360381019061010f9190610f7d565b61026c565b005b610130600480360381019061012b9190610f7d565b61026f565b60405161013d9190611258565b60405180910390f35b610160600480360381019061015b9190610f3c565b610276565b60405161016d9190611214565b60405180910390f35b61017e610416565b60405161018b9190611258565b60405180910390f35b6101ae60048036038101906101a99190610f7d565b6104a9565b6040516101bb9190611258565b60405180910390f35b6101cc6104b4565b6040516101d9919061128e565b60405180910390f35b6101fc60048036038101906101f79190610f7d565b6104da565b6040516102099190611258565b60405180910390f35b61022c60048036038101906102279190610fa6565b6104e1565b005b61024860048036038101906102439190610f3c565b61072f565b6040516102559190611236565b60405180910390f35b600060019050919050565b50565b50565b6000919050565b606061028c67968c5b91faf442fa60c01b61026c565b6102a067da2f5572c06a842f60c01b61026c565b6102b46753e7ceb88321b81060c01b61026c565b6000825190506102ce67646b2bb54e32693260c01b61026c565b6102e267e3d248402ec7bcff60c01b61026c565b60608167ffffffffffffffff811180156102fb57600080fd5b5060405190808252806020026020018201604052801561032a5781602001602082028036833780820191505090505b509050610341674106590d4555f61b60c01b61026c565b61035567fdb8ff02143d0e9c60c01b61026c565b60005b828110156103e35761037467dd8e4bcdb0cd756560c01b61026c565b61039085828151811061038357fe5b60200260200101516108a5565b82828151811061039c57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080600101915050610358565b506103f8672d3900363f2a218660c01b61026c565b61040c67b7cd2b9d67f6b5bb60c01b61026c565b8092505050919050565b600061042c6726ed6cc6ca12515c60c01b610269565b61044067f3fc49482028cbb860c01b610269565b6104546740317a79cae6a3ff60c01b610269565b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b600060019050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000919050565b6104f567510b4c9be9d3368f60c01b61026c565b61050967b2266613e068a5ae60c01b610269565b61051d676a66a63870f964f960c01b610269565b6105316772f22eca890742ba60c01b610269565b61054567c8ab57d60023f99860c01b610269565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146105d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ca906112a9565b60405180910390fd5b6105e767d31dec9098d614f660c01b610269565b6105fb67a184879381a9c67460c01b610269565b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610650675e44e6e1c885710560c01b610269565b610664674878f7d472b49b7a60c01b61026c565b610678676e66d9008fa80cac60c01b61026c565b61068c67895e7c8825623ef760c01b61026c565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506106e16732ca1833e9907bb960c01b610269565b6106f5672942130a5b94b82160c01b610269565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e63260405161072491906111f9565b60405180910390a150565b606061074567f14316bd7e60e6ab60c01b61026c565b61075967242a64e0a13b3c2860c01b61026c565b61076d6759b9e3d9f9eff07060c01b61026c565b60008251905061078767e9fbd92fa4403efb60c01b61026c565b61079b674dca2f5a234cacf160c01b61026c565b60608167ffffffffffffffff811180156107b457600080fd5b506040519080825280602002602001820160405280156107e857816020015b60608152602001906001900390816107d35790505b5090506107ff6710942fd66ff9dcf260c01b61026c565b61081367b10f83b0680b29b660c01b61026c565b60005b82811015610872576108326710da97ff2fa1aa1d60c01b61026c565b61084e85828151811061084157fe5b6020026020010151610b44565b82828151811061085a57fe5b60200260200101819052508080600101915050610816565b5061088767c694597cd636da2560c01b61026c565b61089b670e38d3728112f1f560c01b61026c565b8092505050919050565b60006108bb67b89c295d5cd35aa160c01b61026c565b6108cf675c1df4539f179b1e60c01b61026c565b6108e3672857589b0d7460e560c01b61026c565b60006108f967fd9cfba2a737693360c01b61026c565b61090d67d1d192b73f93d6df60c01b61026c565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf856040518263ffffffff1660e01b815260040161096a9190611273565b60206040518083038186803b15801561098257600080fd5b505afa158015610996573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ba9190610f13565b90506109d0672a95edfcae87182260c01b61026c565b6109e467147c973a980da33c60c01b61026c565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610afd57610a2c671ddba76a02b4cb9760c01b61026c565b610a4067ffdb3eeb5c0c579e60c01b61026c565b610a5467174feea2f1afe6f560c01b61026c565b8073ffffffffffffffffffffffffffffffffffffffff16633b3b57de856040518263ffffffff1660e01b8152600401610a8d9190611273565b60206040518083038186803b158015610aa557600080fd5b505afa925050508015610ad657506040513d601f19601f82011682018060405250810190610ad39190610f13565b60015b610adf57610af8565b610af3678cf4ad2a02db4d0f60c01b61026c565b809250505b610b12565b610b11677818ac296e60c84b60c01b61026c565b5b610b26673e24c80370f9fa2460c01b61026c565b610b3a672d02243d289782ce60c01b61026c565b8192505050919050565b6060610b5a67bc3febb59b3e401560c01b61026c565b610b6e6712aa1f19a58b740b60c01b61026c565b610b82676f4c97d30e52432360c01b61026c565b6060610b98675aa045af88498c5560c01b61026c565b610bac67d7645f95c26a2d7d60c01b61026c565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf856040518263ffffffff1660e01b8152600401610c099190611273565b60206040518083038186803b158015610c2157600080fd5b505afa158015610c35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c599190610f13565b9050610c6f67e461f759e461249360c01b61026c565b610c8367c29b2561c981c6bb60c01b61026c565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610da157610ccb6784835b99edbabdcb60c01b61026c565b610cdf6720036cb97318381660c01b61026c565b610cf36769d6f6aeb07703f760c01b61026c565b8073ffffffffffffffffffffffffffffffffffffffff1663691f3431856040518263ffffffff1660e01b8152600401610d2c9190611273565b60006040518083038186803b158015610d4457600080fd5b505afa925050508015610d7a57506040513d6000823e3d601f19601f82011682018060405250810190610d779190610fcf565b60015b610d8357610d9c565b610d9767d51f95af0d587ad460c01b61026c565b809250505b610db6565b610db567853a44d4c227790b60c01b61026c565b5b610dca6767a3ae7a392af36f60c01b61026c565b610dde670b2eba75c0e4f38860c01b61026c565b8192505050919050565b600081519050610df78161150d565b92915050565b600082601f830112610e0e57600080fd5b8135610e21610e1c826112f6565b6112c9565b91508181835260208401935060208101905083856020840282011115610e4657600080fd5b60005b83811015610e765781610e5c8882610e80565b845260208401935060208301925050600181019050610e49565b5050505092915050565b600081359050610e8f81611524565b92915050565b600081359050610ea48161153b565b92915050565b600081359050610eb981611552565b92915050565b600082601f830112610ed057600080fd5b8151610ee3610ede8261131e565b6112c9565b91508082526020830160208301858383011115610eff57600080fd5b610f0a8382846114c9565b50505092915050565b600060208284031215610f2557600080fd5b6000610f3384828501610de8565b91505092915050565b600060208284031215610f4e57600080fd5b600082013567ffffffffffffffff811115610f6857600080fd5b610f7484828501610dfd565b91505092915050565b600060208284031215610f8f57600080fd5b6000610f9d84828501610e95565b91505092915050565b600060208284031215610fb857600080fd5b6000610fc684828501610eaa565b91505092915050565b600060208284031215610fe157600080fd5b600082015167ffffffffffffffff811115610ffb57600080fd5b61100784828501610ebf565b91505092915050565b600061101c838361104b565b60208301905092915050565b6000611034838361115a565b905092915050565b6110458161146f565b82525050565b611054816113e9565b82525050565b60006110658261136a565b61106f81856113a5565b935061107a8361134a565b8060005b838110156110ab5781516110928882611010565b975061109d8361138b565b92505060018101905061107e565b5085935050505092915050565b60006110c382611375565b6110cd81856113b6565b9350836020820285016110df8561135a565b8060005b8581101561111b57848403895281516110fc8582611028565b945061110783611398565b925060208a019950506001810190506110e3565b50829750879550505050505092915050565b611136816113fb565b82525050565b61114581611407565b82525050565b61115481611481565b82525050565b600061116582611380565b61116f81856113c7565b935061117f8185602086016114c9565b611188816114fc565b840191505092915050565b60006111a0602f836113d8565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b600060208201905061120e600083018461103c565b92915050565b6000602082019050818103600083015261122e818461105a565b905092915050565b6000602082019050818103600083015261125081846110b8565b905092915050565b600060208201905061126d600083018461112d565b92915050565b6000602082019050611288600083018461113c565b92915050565b60006020820190506112a3600083018461114b565b92915050565b600060208201905081810360008301526112c281611193565b9050919050565b6000604051905081810181811067ffffffffffffffff821117156112ec57600080fd5b8060405250919050565b600067ffffffffffffffff82111561130d57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561133557600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b60006113f48261144f565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffffffffffff00000000000000000000000000000000000000000000000082169050919050565b6000611448826113e9565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061147a826114a5565b9050919050565b600061148c82611493565b9050919050565b600061149e8261144f565b9050919050565b60006114b0826114b7565b9050919050565b60006114c28261144f565b9050919050565b60005b838110156114e75780820151818401526020810190506114cc565b838111156114f6576000848401525b50505050565b6000601f19601f8301169050919050565b611516816113e9565b811461152157600080fd5b50565b61152d81611407565b811461153857600080fd5b50565b61154481611411565b811461154f57600080fd5b50565b61155b8161143d565b811461156657600080fd5b5056fea164736f6c634300060c000a"; + static readonly abi: ({ + inputs: any[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): ENSHelperInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ENSHelper; +} +export {}; diff --git a/dist/typings/factories/ENSHelper__factory.js b/dist/typings/factories/ENSHelper__factory.js new file mode 100644 index 00000000..1477c94e --- /dev/null +++ b/dist/typings/factories/ENSHelper__factory.js @@ -0,0 +1,236 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ENSHelper__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "initializer", + type: "address", + }, + ], + name: "Initialized", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_c0828b70", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ddc59594", + type: "bytes8", + }, + ], + name: "c_ddc59594", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_falsec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ddc59594", + type: "bytes8", + }, + ], + name: "c_falseddc59594", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_truec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ddc59594", + type: "bytes8", + }, + ], + name: "c_trueddc59594", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32[]", + name: "nodes", + type: "bytes32[]", + }, + ], + name: "getAddresses", + outputs: [ + { + internalType: "address[]", + name: "", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32[]", + name: "nodes", + type: "bytes32[]", + }, + ], + name: "getNames", + outputs: [ + { + internalType: "string[]", + name: "", + type: "string[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ENSRegistry", + name: "registry_", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isInitialized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "registry", + outputs: [ + { + internalType: "contract ENSRegistry", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +const _bytecode = "0x608060405234801561001057600080fd5b5061002b675e592fe27197979c60c01b6100a460201b60201c565b61004567eca2e4778f3efef360c01b6100a460201b60201c565b326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061009f67394751df3a1c14c460c01b6100a760201b60201c565b6100aa565b50565b50565b611576806100b96000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063392e53cd11610071578063392e53cd1461017657806377c14656146101945780637b103999146101c4578063c2ed35f9146101e2578063c4d66de814610212578063dc6008e21461022e576100a9565b80631262ed1c146100ae57806318121646146100de5780631a671dff146100fa5780632e6afd6e1461011657806338bc01b514610146575b600080fd5b6100c860048036038101906100c39190610f7d565b61025e565b6040516100d59190611258565b60405180910390f35b6100f860048036038101906100f39190610f7d565b610269565b005b610114600480360381019061010f9190610f7d565b61026c565b005b610130600480360381019061012b9190610f7d565b61026f565b60405161013d9190611258565b60405180910390f35b610160600480360381019061015b9190610f3c565b610276565b60405161016d9190611214565b60405180910390f35b61017e610416565b60405161018b9190611258565b60405180910390f35b6101ae60048036038101906101a99190610f7d565b6104a9565b6040516101bb9190611258565b60405180910390f35b6101cc6104b4565b6040516101d9919061128e565b60405180910390f35b6101fc60048036038101906101f79190610f7d565b6104da565b6040516102099190611258565b60405180910390f35b61022c60048036038101906102279190610fa6565b6104e1565b005b61024860048036038101906102439190610f3c565b61072f565b6040516102559190611236565b60405180910390f35b600060019050919050565b50565b50565b6000919050565b606061028c67968c5b91faf442fa60c01b61026c565b6102a067da2f5572c06a842f60c01b61026c565b6102b46753e7ceb88321b81060c01b61026c565b6000825190506102ce67646b2bb54e32693260c01b61026c565b6102e267e3d248402ec7bcff60c01b61026c565b60608167ffffffffffffffff811180156102fb57600080fd5b5060405190808252806020026020018201604052801561032a5781602001602082028036833780820191505090505b509050610341674106590d4555f61b60c01b61026c565b61035567fdb8ff02143d0e9c60c01b61026c565b60005b828110156103e35761037467dd8e4bcdb0cd756560c01b61026c565b61039085828151811061038357fe5b60200260200101516108a5565b82828151811061039c57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080600101915050610358565b506103f8672d3900363f2a218660c01b61026c565b61040c67b7cd2b9d67f6b5bb60c01b61026c565b8092505050919050565b600061042c6726ed6cc6ca12515c60c01b610269565b61044067f3fc49482028cbb860c01b610269565b6104546740317a79cae6a3ff60c01b610269565b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b600060019050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000919050565b6104f567510b4c9be9d3368f60c01b61026c565b61050967b2266613e068a5ae60c01b610269565b61051d676a66a63870f964f960c01b610269565b6105316772f22eca890742ba60c01b610269565b61054567c8ab57d60023f99860c01b610269565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146105d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ca906112a9565b60405180910390fd5b6105e767d31dec9098d614f660c01b610269565b6105fb67a184879381a9c67460c01b610269565b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610650675e44e6e1c885710560c01b610269565b610664674878f7d472b49b7a60c01b61026c565b610678676e66d9008fa80cac60c01b61026c565b61068c67895e7c8825623ef760c01b61026c565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506106e16732ca1833e9907bb960c01b610269565b6106f5672942130a5b94b82160c01b610269565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e63260405161072491906111f9565b60405180910390a150565b606061074567f14316bd7e60e6ab60c01b61026c565b61075967242a64e0a13b3c2860c01b61026c565b61076d6759b9e3d9f9eff07060c01b61026c565b60008251905061078767e9fbd92fa4403efb60c01b61026c565b61079b674dca2f5a234cacf160c01b61026c565b60608167ffffffffffffffff811180156107b457600080fd5b506040519080825280602002602001820160405280156107e857816020015b60608152602001906001900390816107d35790505b5090506107ff6710942fd66ff9dcf260c01b61026c565b61081367b10f83b0680b29b660c01b61026c565b60005b82811015610872576108326710da97ff2fa1aa1d60c01b61026c565b61084e85828151811061084157fe5b6020026020010151610b44565b82828151811061085a57fe5b60200260200101819052508080600101915050610816565b5061088767c694597cd636da2560c01b61026c565b61089b670e38d3728112f1f560c01b61026c565b8092505050919050565b60006108bb67b89c295d5cd35aa160c01b61026c565b6108cf675c1df4539f179b1e60c01b61026c565b6108e3672857589b0d7460e560c01b61026c565b60006108f967fd9cfba2a737693360c01b61026c565b61090d67d1d192b73f93d6df60c01b61026c565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf856040518263ffffffff1660e01b815260040161096a9190611273565b60206040518083038186803b15801561098257600080fd5b505afa158015610996573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ba9190610f13565b90506109d0672a95edfcae87182260c01b61026c565b6109e467147c973a980da33c60c01b61026c565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610afd57610a2c671ddba76a02b4cb9760c01b61026c565b610a4067ffdb3eeb5c0c579e60c01b61026c565b610a5467174feea2f1afe6f560c01b61026c565b8073ffffffffffffffffffffffffffffffffffffffff16633b3b57de856040518263ffffffff1660e01b8152600401610a8d9190611273565b60206040518083038186803b158015610aa557600080fd5b505afa925050508015610ad657506040513d601f19601f82011682018060405250810190610ad39190610f13565b60015b610adf57610af8565b610af3678cf4ad2a02db4d0f60c01b61026c565b809250505b610b12565b610b11677818ac296e60c84b60c01b61026c565b5b610b26673e24c80370f9fa2460c01b61026c565b610b3a672d02243d289782ce60c01b61026c565b8192505050919050565b6060610b5a67bc3febb59b3e401560c01b61026c565b610b6e6712aa1f19a58b740b60c01b61026c565b610b82676f4c97d30e52432360c01b61026c565b6060610b98675aa045af88498c5560c01b61026c565b610bac67d7645f95c26a2d7d60c01b61026c565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf856040518263ffffffff1660e01b8152600401610c099190611273565b60206040518083038186803b158015610c2157600080fd5b505afa158015610c35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c599190610f13565b9050610c6f67e461f759e461249360c01b61026c565b610c8367c29b2561c981c6bb60c01b61026c565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610da157610ccb6784835b99edbabdcb60c01b61026c565b610cdf6720036cb97318381660c01b61026c565b610cf36769d6f6aeb07703f760c01b61026c565b8073ffffffffffffffffffffffffffffffffffffffff1663691f3431856040518263ffffffff1660e01b8152600401610d2c9190611273565b60006040518083038186803b158015610d4457600080fd5b505afa925050508015610d7a57506040513d6000823e3d601f19601f82011682018060405250810190610d779190610fcf565b60015b610d8357610d9c565b610d9767d51f95af0d587ad460c01b61026c565b809250505b610db6565b610db567853a44d4c227790b60c01b61026c565b5b610dca6767a3ae7a392af36f60c01b61026c565b610dde670b2eba75c0e4f38860c01b61026c565b8192505050919050565b600081519050610df78161150d565b92915050565b600082601f830112610e0e57600080fd5b8135610e21610e1c826112f6565b6112c9565b91508181835260208401935060208101905083856020840282011115610e4657600080fd5b60005b83811015610e765781610e5c8882610e80565b845260208401935060208301925050600181019050610e49565b5050505092915050565b600081359050610e8f81611524565b92915050565b600081359050610ea48161153b565b92915050565b600081359050610eb981611552565b92915050565b600082601f830112610ed057600080fd5b8151610ee3610ede8261131e565b6112c9565b91508082526020830160208301858383011115610eff57600080fd5b610f0a8382846114c9565b50505092915050565b600060208284031215610f2557600080fd5b6000610f3384828501610de8565b91505092915050565b600060208284031215610f4e57600080fd5b600082013567ffffffffffffffff811115610f6857600080fd5b610f7484828501610dfd565b91505092915050565b600060208284031215610f8f57600080fd5b6000610f9d84828501610e95565b91505092915050565b600060208284031215610fb857600080fd5b6000610fc684828501610eaa565b91505092915050565b600060208284031215610fe157600080fd5b600082015167ffffffffffffffff811115610ffb57600080fd5b61100784828501610ebf565b91505092915050565b600061101c838361104b565b60208301905092915050565b6000611034838361115a565b905092915050565b6110458161146f565b82525050565b611054816113e9565b82525050565b60006110658261136a565b61106f81856113a5565b935061107a8361134a565b8060005b838110156110ab5781516110928882611010565b975061109d8361138b565b92505060018101905061107e565b5085935050505092915050565b60006110c382611375565b6110cd81856113b6565b9350836020820285016110df8561135a565b8060005b8581101561111b57848403895281516110fc8582611028565b945061110783611398565b925060208a019950506001810190506110e3565b50829750879550505050505092915050565b611136816113fb565b82525050565b61114581611407565b82525050565b61115481611481565b82525050565b600061116582611380565b61116f81856113c7565b935061117f8185602086016114c9565b611188816114fc565b840191505092915050565b60006111a0602f836113d8565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b600060208201905061120e600083018461103c565b92915050565b6000602082019050818103600083015261122e818461105a565b905092915050565b6000602082019050818103600083015261125081846110b8565b905092915050565b600060208201905061126d600083018461112d565b92915050565b6000602082019050611288600083018461113c565b92915050565b60006020820190506112a3600083018461114b565b92915050565b600060208201905081810360008301526112c281611193565b9050919050565b6000604051905081810181811067ffffffffffffffff821117156112ec57600080fd5b8060405250919050565b600067ffffffffffffffff82111561130d57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561133557600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b60006113f48261144f565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffffffffffff00000000000000000000000000000000000000000000000082169050919050565b6000611448826113e9565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061147a826114a5565b9050919050565b600061148c82611493565b9050919050565b600061149e8261144f565b9050919050565b60006114b0826114b7565b9050919050565b60006114c28261144f565b9050919050565b60005b838110156114e75780820151818401526020810190506114cc565b838111156114f6576000848401525b50505050565b6000601f19601f8301169050919050565b611516816113e9565b811461152157600080fd5b50565b61152d81611407565b811461153857600080fd5b50565b61154481611411565b811461154f57600080fd5b50565b61155b8161143d565b811461156657600080fd5b5056fea164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class ENSHelper__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.ENSHelper__factory = ENSHelper__factory; +ENSHelper__factory.bytecode = _bytecode; +ENSHelper__factory.abi = _abi; diff --git a/dist/typings/factories/ENSNameResolver__factory.d.ts b/dist/typings/factories/ENSNameResolver__factory.d.ts new file mode 100644 index 00000000..add13801 --- /dev/null +++ b/dist/typings/factories/ENSNameResolver__factory.d.ts @@ -0,0 +1,35 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { ENSNameResolver, ENSNameResolverInterface } from "../ENSNameResolver"; +export declare class ENSNameResolver__factory { + static readonly abi: ({ + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + outputs?: undefined; + stateMutability?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): ENSNameResolverInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ENSNameResolver; +} diff --git a/dist/typings/factories/ENSNameResolver__factory.js b/dist/typings/factories/ENSNameResolver__factory.js new file mode 100644 index 00000000..049e045a --- /dev/null +++ b/dist/typings/factories/ENSNameResolver__factory.js @@ -0,0 +1,174 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ENSNameResolver__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: false, + internalType: "string", + name: "name", + type: "string", + }, + ], + name: "NameChanged", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__4f849103", + type: "bytes8", + }, + ], + name: "c_4f849103", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_ac93193e", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__4f849103", + type: "bytes8", + }, + ], + name: "c_false4f849103", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_falseac93193e", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__4f849103", + type: "bytes8", + }, + ], + name: "c_true4f849103", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_trueac93193e", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + ], + name: "setName", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; +class ENSNameResolver__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.ENSNameResolver__factory = ENSNameResolver__factory; +ENSNameResolver__factory.abi = _abi; diff --git a/dist/typings/factories/ENSPubKeyResolver__factory.d.ts b/dist/typings/factories/ENSPubKeyResolver__factory.d.ts new file mode 100644 index 00000000..d5e4e1fa --- /dev/null +++ b/dist/typings/factories/ENSPubKeyResolver__factory.d.ts @@ -0,0 +1,35 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { ENSPubKeyResolver, ENSPubKeyResolverInterface } from "../ENSPubKeyResolver"; +export declare class ENSPubKeyResolver__factory { + static readonly abi: ({ + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + outputs?: undefined; + stateMutability?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): ENSPubKeyResolverInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ENSPubKeyResolver; +} diff --git a/dist/typings/factories/ENSPubKeyResolver__factory.js b/dist/typings/factories/ENSPubKeyResolver__factory.js new file mode 100644 index 00000000..4a697f35 --- /dev/null +++ b/dist/typings/factories/ENSPubKeyResolver__factory.js @@ -0,0 +1,190 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ENSPubKeyResolver__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "x", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "y", + type: "bytes32", + }, + ], + name: "PubkeyChanged", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_ac93193e", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__e1dc25ce", + type: "bytes8", + }, + ], + name: "c_e1dc25ce", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_falseac93193e", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__e1dc25ce", + type: "bytes8", + }, + ], + name: "c_falsee1dc25ce", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_trueac93193e", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__e1dc25ce", + type: "bytes8", + }, + ], + name: "c_truee1dc25ce", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "pubkey", + outputs: [ + { + internalType: "bytes32", + name: "x", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "y", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "x", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "y", + type: "bytes32", + }, + ], + name: "setPubkey", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; +class ENSPubKeyResolver__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.ENSPubKeyResolver__factory = ENSPubKeyResolver__factory; +ENSPubKeyResolver__factory.abi = _abi; diff --git a/dist/typings/factories/ENSRegistry__factory.d.ts b/dist/typings/factories/ENSRegistry__factory.d.ts new file mode 100644 index 00000000..c13c5d6b --- /dev/null +++ b/dist/typings/factories/ENSRegistry__factory.d.ts @@ -0,0 +1,54 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { ENSRegistry, ENSRegistryInterface } from "../ENSRegistry"; +declare type ENSRegistryConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class ENSRegistry__factory extends ContractFactory { + constructor(...args: ENSRegistryConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): ENSRegistry; + connect(signer: Signer): ENSRegistry__factory; + static readonly bytecode = "0x608060405234801561001057600080fd5b5061002b673cc203e54093179c60c01b6100a160201b60201c565b6100456717dcf093ac318c6260c01b6100a160201b60201c565b326000808060001b815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506100a4565b50565b611d5c806100b36000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063563940ec11610097578063b446aebb11610066578063b446aebb146104c4578063cf40882314610523578063e985e9c5146105a5578063f79fe5381461061f576100f5565b8063563940ec1461033b5780635b0fc9c31461039a5780635ef2c7f0146103e8578063a22cb46514610474576100f5565b806314ab9038116100d357806314ab90381461021657806316a25cbd146102585780631896f70a146102a45780633a285d49146102f2576100f5565b80630178b8bf146100fa57806302571be31461015257806306ab5923146101aa575b600080fd5b6101266004803603602081101561011057600080fd5b8101908080359060200190929190505050610663565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61017e6004803603602081101561016857600080fd5b81019080803590602001909291905050506106de565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610200600480360360608110156101c057600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061083e565b6040518082815260200191505060405180910390f35b6102566004803603604081101561022c57600080fd5b8101908080359060200190929190803567ffffffffffffffff169060200190929190505050610c13565b005b6102846004803603602081101561026e57600080fd5b8101908080359060200190929190505050610f37565b604051808267ffffffffffffffff16815260200191505060405180910390f35b6102f0600480360360408110156102ba57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fa6565b005b6103396004803603602081101561030857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506112ee565b005b6103826004803603602081101561035157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506112f1565b60405180821515815260200191505060405180910390f35b6103e6600480360360408110156103b057600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112f8565b005b610472600480360360a08110156103fe57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803567ffffffffffffffff169060200190929190505050611640565b005b6104c26004803603604081101561048a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035151590602001909291905050506116c6565b005b61050b600480360360208110156104da57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611815565b60405180821515815260200191505060405180910390f35b6105a36004803603608081101561053957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803567ffffffffffffffff169060200190929190505050611820565b005b610607600480360360408110156105bb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061189f565b60405180821515815260200191505060405180910390f35b61064b6004803603602081101561063557600080fd5b810190808035906020019092919050505061196f565b60405180821515815260200191505060405180910390f35b600061067967eca157517099742d60c01b6112ee565b61068d679d653dc44efe131c60c01b6112ee565b6106a16780779279c8a41ae760c01b6112ee565b60008083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006106f467384a3bd8792f375360c01b6112ee565b61070867e8f0ea32d50bac1960c01b6112ee565b61071c67e5906e7b2ac8244e60c01b6112ee565b600080600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061076a6792e0ad965500a7fa60c01b6112ee565b61077e67d36dfeeced9ada5460c01b6112ee565b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156107f8576107c66720c1a15c6b40065760c01b6112ee565b6107da6792db8efeae2b5a5760c01b6112ee565b6107ee67b52eef4d55c217db60c01b6112ee565b6000915050610839565b61080c67c9555c1ed049941160c01b6112ee565b610820672007fc3e417877f860c01b6112ee565b610834673fb75fd1e9f7129460c01b6112ee565b809150505b919050565b60006108546753b854ce8503d86d60c01b6112ee565b8361086967ae4d34559648283a60c01b6112ee565b61087d6727fa76608231909860c01b6112ee565b61089167e76ecf7696d24d4b60c01b6112ee565b600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506108df67fa20791bdebe2e8660c01b6112ee565b6108f3679c258c8d76da35f860c01b6112ee565b610907676de623b1fa73da3d60c01b6112ee565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16148015610952575061095167f6a48d9f2388c41260c01b611815565b5b806109ff5750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680156109fe57506109fd67fa0aca4573cd080160c01b611815565b5b5b610a54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611d24602c913960400191505060405180910390fd5b610a68673f8a07559ccae65460c01b6112ee565b610a7c675dc29edd3cdba7bd60c01b6112ee565b610a90678c53f26a9d813f3760c01b6112ee565b610aa4678254b191cb7e5dee60c01b6112ee565b610ab86786eb85866ac6004760c01b6112ee565b610acc6719155cc9a22d1fb460c01b6112ee565b600086866040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050610b136717ad0a6e71d0674e60c01b6112ee565b8460008083815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610b7b673a06394a886e785260c01b6112ee565b610b8f673743d3ddaa41b82e60c01b6112ee565b85877fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e8287604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a3610bf2678079ae8cb89e291260c01b6112ee565b610c0667997dfeb745224e0c60c01b6112ee565b8093505050509392505050565b610c2767397dd781daa1a76360c01b6112ee565b81610c3c67ae4d34559648283a60c01b6112ee565b610c506727fa76608231909860c01b6112ee565b610c6467e76ecf7696d24d4b60c01b6112ee565b600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610cb267fa20791bdebe2e8660c01b6112ee565b610cc6679c258c8d76da35f860c01b6112ee565b610cda676de623b1fa73da3d60c01b6112ee565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16148015610d255750610d2467f6a48d9f2388c41260c01b611815565b5b80610dd25750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015610dd15750610dd067fa0aca4573cd080160c01b611815565b5b5b610e27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611d24602c913960400191505060405180910390fd5b610e3b673f8a07559ccae65460c01b6112ee565b610e4f675dc29edd3cdba7bd60c01b6112ee565b610e63676fe0a58a4dd21f8660c01b6112ee565b610e77672e679c49748c7f0760c01b6112ee565b610e8b67a2bf75e3952a5a4360c01b6112ee565b8260008086815260200190815260200160002060010160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550610edb67a7ec980af9d33e1960c01b6112ee565b610eef67c2c4b67905cc97f860c01b6112ee565b837f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa6884604051808267ffffffffffffffff16815260200191505060405180910390a250505050565b6000610f4d67864eaf761278559d60c01b6112ee565b610f6167e60e0ccef8f953a760c01b6112ee565b610f7567859952db8669d5d960c01b6112ee565b60008083815260200190815260200160002060010160149054906101000a900467ffffffffffffffff169050919050565b610fba67805708a845e0b2d160c01b6112ee565b81610fcf67ae4d34559648283a60c01b6112ee565b610fe36727fa76608231909860c01b6112ee565b610ff767e76ecf7696d24d4b60c01b6112ee565b600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061104567fa20791bdebe2e8660c01b6112ee565b611059679c258c8d76da35f860c01b6112ee565b61106d676de623b1fa73da3d60c01b6112ee565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480156110b857506110b767f6a48d9f2388c41260c01b611815565b5b806111655750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015611164575061116367fa0aca4573cd080160c01b611815565b5b5b6111ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611d24602c913960400191505060405180910390fd5b6111ce673f8a07559ccae65460c01b6112ee565b6111e2675dc29edd3cdba7bd60c01b6112ee565b6111f667040a0a548705718d60c01b6112ee565b61120a671d5d4bfa835d4ccb60c01b6112ee565b61121e67a59f345953c9adf560c01b6112ee565b8260008086815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506112866722ce4fff93d84f7460c01b6112ee565b61129a67129c0e77932643e760c01b6112ee565b837f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a084604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a250505050565b50565b6000919050565b61130c67a5292e13b669b2eb60c01b6112ee565b8161132167ae4d34559648283a60c01b6112ee565b6113356727fa76608231909860c01b6112ee565b61134967e76ecf7696d24d4b60c01b6112ee565b600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061139767fa20791bdebe2e8660c01b6112ee565b6113ab679c258c8d76da35f860c01b6112ee565b6113bf676de623b1fa73da3d60c01b6112ee565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614801561140a575061140967f6a48d9f2388c41260c01b611815565b5b806114b75750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680156114b657506114b567fa0aca4573cd080160c01b611815565b5b5b61150c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611d24602c913960400191505060405180910390fd5b611520673f8a07559ccae65460c01b6112ee565b611534675dc29edd3cdba7bd60c01b6112ee565b61154867d2d7e0c86f3b4ab460c01b6112ee565b61155c67bced6297afc4096360c01b6112ee565b611570672774e29caa033f4760c01b6112ee565b8260008086815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506115d867a8cbeea826f0c20d60c01b6112ee565b6115ec6774c73891e1b8e87960c01b6112ee565b837fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d26684604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a250505050565b61165467c6c86a43a36f81d060c01b6112ee565b61166867b56234552a487c3760c01b6112ee565b61167c67164f2dd238e5c68e60c01b6112ee565b600061168986868661083e565b905061169f67cd599cd7c522e5e860c01b6112ee565b6116b367565345668340fd7160c01b6112ee565b6116be818484611a1a565b505050505050565b6116da67f9bc5be3538e2f8460c01b6112ee565b6116ee67df8752e3a07ff93160c01b6112ee565b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611796671fcd2847e9b54e4460c01b6112ee565b6117aa67ead0a5571223dc1660c01b6112ee565b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b600060019050919050565b6118346715909a040f3def2960c01b6112ee565b61184867ef20cff9401eed6c60c01b6112ee565b61185c67c18f3f14a9757c6060c01b6112ee565b61186684846112f8565b61187a670dd560f0ccad952160c01b6112ee565b61188e67c9aee63ad76ad21460c01b6112ee565b611899848383611a1a565b50505050565b60006118b567f2d699bbcddca45760c01b6112ee565b6118c967e330ba59c16d0bc360c01b6112ee565b6118dd6743a7fd2323f0b86060c01b6112ee565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600061198567fd81ae25c0ab767a60c01b6112ee565b6119996723007af3aa29dd4160c01b6112ee565b6119ad67285ea3dfe9e0b78b60c01b6112ee565b600073ffffffffffffffffffffffffffffffffffffffff1660008084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b611a2e67c1a0e6a707be19cb60c01b6112ee565b611a42676910669555cf407060c01b6112ee565b611a5667c5376103363d27a160c01b6112ee565b60008084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611bb557611ad267a90d580023207d7060c01b6112ee565b611ae667d649c271901761fb60c01b6112ee565b8160008085815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611b4e679f5cfc3c2893e46d60c01b6112ee565b611b62677ea8a76fb6527ccb60c01b6112ee565b827f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a083604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a2611bca565b611bc967382b4fe9653714e360c01b6112ee565b5b611bde670752c708a41f6d9060c01b6112ee565b611bf267cbad71a062b7c52b60c01b6112ee565b60008084815260200190815260200160002060010160149054906101000a900467ffffffffffffffff1667ffffffffffffffff168167ffffffffffffffff1614611d0957611c4a67c3e23000ecb83aed60c01b6112ee565b611c5e675f8abdbd14de3f0260c01b6112ee565b8060008085815260200190815260200160002060010160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550611cae67cf3450aed0c852ed60c01b6112ee565b611cc2671a1a4331391f727660c01b6112ee565b827f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa6882604051808267ffffffffffffffff16815260200191505060405180910390a2611d1e565b611d1d678fb2e383e5c17d9160c01b6112ee565b5b50505056fe454e5352656769737472793a20726576657274656420627920617574686f7269736564206d6f646966696572a164736f6c634300060c000a"; + static readonly abi: ({ + inputs: any[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): ENSRegistryInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ENSRegistry; +} +export {}; diff --git a/dist/typings/factories/ENSRegistry__factory.js b/dist/typings/factories/ENSRegistry__factory.js new file mode 100644 index 00000000..1520e3d4 --- /dev/null +++ b/dist/typings/factories/ENSRegistry__factory.js @@ -0,0 +1,464 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ENSRegistry__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "ApprovalForAll", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "label", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "NewOwner", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "resolver", + type: "address", + }, + ], + name: "NewResolver", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint64", + name: "ttl", + type: "uint64", + }, + ], + name: "NewTTL", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__18e7c73b", + type: "bytes8", + }, + ], + name: "c_18e7c73b", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__18e7c73b", + type: "bytes8", + }, + ], + name: "c_false18e7c73b", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__18e7c73b", + type: "bytes8", + }, + ], + name: "c_true18e7c73b", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner_", + type: "address", + }, + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "isApprovedForAll", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "recordExists", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "resolver", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "setApprovalForAll", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "address", + name: "owner_", + type: "address", + }, + ], + name: "setOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "address", + name: "owner_", + type: "address", + }, + { + internalType: "address", + name: "resolver_", + type: "address", + }, + { + internalType: "uint64", + name: "ttl_", + type: "uint64", + }, + ], + name: "setRecord", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "address", + name: "resolver_", + type: "address", + }, + ], + name: "setResolver", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "label", + type: "bytes32", + }, + { + internalType: "address", + name: "owner_", + type: "address", + }, + ], + name: "setSubnodeOwner", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "label", + type: "bytes32", + }, + { + internalType: "address", + name: "owner_", + type: "address", + }, + { + internalType: "address", + name: "resolver_", + type: "address", + }, + { + internalType: "uint64", + name: "ttl_", + type: "uint64", + }, + ], + name: "setSubnodeRecord", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "uint64", + name: "ttl_", + type: "uint64", + }, + ], + name: "setTTL", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "ttl", + outputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +const _bytecode = "0x608060405234801561001057600080fd5b5061002b673cc203e54093179c60c01b6100a160201b60201c565b6100456717dcf093ac318c6260c01b6100a160201b60201c565b326000808060001b815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506100a4565b50565b611d5c806100b36000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c8063563940ec11610097578063b446aebb11610066578063b446aebb146104c4578063cf40882314610523578063e985e9c5146105a5578063f79fe5381461061f576100f5565b8063563940ec1461033b5780635b0fc9c31461039a5780635ef2c7f0146103e8578063a22cb46514610474576100f5565b806314ab9038116100d357806314ab90381461021657806316a25cbd146102585780631896f70a146102a45780633a285d49146102f2576100f5565b80630178b8bf146100fa57806302571be31461015257806306ab5923146101aa575b600080fd5b6101266004803603602081101561011057600080fd5b8101908080359060200190929190505050610663565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61017e6004803603602081101561016857600080fd5b81019080803590602001909291905050506106de565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610200600480360360608110156101c057600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061083e565b6040518082815260200191505060405180910390f35b6102566004803603604081101561022c57600080fd5b8101908080359060200190929190803567ffffffffffffffff169060200190929190505050610c13565b005b6102846004803603602081101561026e57600080fd5b8101908080359060200190929190505050610f37565b604051808267ffffffffffffffff16815260200191505060405180910390f35b6102f0600480360360408110156102ba57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fa6565b005b6103396004803603602081101561030857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506112ee565b005b6103826004803603602081101561035157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506112f1565b60405180821515815260200191505060405180910390f35b6103e6600480360360408110156103b057600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112f8565b005b610472600480360360a08110156103fe57600080fd5b810190808035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803567ffffffffffffffff169060200190929190505050611640565b005b6104c26004803603604081101561048a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035151590602001909291905050506116c6565b005b61050b600480360360208110156104da57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611815565b60405180821515815260200191505060405180910390f35b6105a36004803603608081101561053957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803567ffffffffffffffff169060200190929190505050611820565b005b610607600480360360408110156105bb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061189f565b60405180821515815260200191505060405180910390f35b61064b6004803603602081101561063557600080fd5b810190808035906020019092919050505061196f565b60405180821515815260200191505060405180910390f35b600061067967eca157517099742d60c01b6112ee565b61068d679d653dc44efe131c60c01b6112ee565b6106a16780779279c8a41ae760c01b6112ee565b60008083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006106f467384a3bd8792f375360c01b6112ee565b61070867e8f0ea32d50bac1960c01b6112ee565b61071c67e5906e7b2ac8244e60c01b6112ee565b600080600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061076a6792e0ad965500a7fa60c01b6112ee565b61077e67d36dfeeced9ada5460c01b6112ee565b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156107f8576107c66720c1a15c6b40065760c01b6112ee565b6107da6792db8efeae2b5a5760c01b6112ee565b6107ee67b52eef4d55c217db60c01b6112ee565b6000915050610839565b61080c67c9555c1ed049941160c01b6112ee565b610820672007fc3e417877f860c01b6112ee565b610834673fb75fd1e9f7129460c01b6112ee565b809150505b919050565b60006108546753b854ce8503d86d60c01b6112ee565b8361086967ae4d34559648283a60c01b6112ee565b61087d6727fa76608231909860c01b6112ee565b61089167e76ecf7696d24d4b60c01b6112ee565b600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506108df67fa20791bdebe2e8660c01b6112ee565b6108f3679c258c8d76da35f860c01b6112ee565b610907676de623b1fa73da3d60c01b6112ee565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16148015610952575061095167f6a48d9f2388c41260c01b611815565b5b806109ff5750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680156109fe57506109fd67fa0aca4573cd080160c01b611815565b5b5b610a54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611d24602c913960400191505060405180910390fd5b610a68673f8a07559ccae65460c01b6112ee565b610a7c675dc29edd3cdba7bd60c01b6112ee565b610a90678c53f26a9d813f3760c01b6112ee565b610aa4678254b191cb7e5dee60c01b6112ee565b610ab86786eb85866ac6004760c01b6112ee565b610acc6719155cc9a22d1fb460c01b6112ee565b600086866040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050610b136717ad0a6e71d0674e60c01b6112ee565b8460008083815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610b7b673a06394a886e785260c01b6112ee565b610b8f673743d3ddaa41b82e60c01b6112ee565b85877fce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e8287604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a3610bf2678079ae8cb89e291260c01b6112ee565b610c0667997dfeb745224e0c60c01b6112ee565b8093505050509392505050565b610c2767397dd781daa1a76360c01b6112ee565b81610c3c67ae4d34559648283a60c01b6112ee565b610c506727fa76608231909860c01b6112ee565b610c6467e76ecf7696d24d4b60c01b6112ee565b600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610cb267fa20791bdebe2e8660c01b6112ee565b610cc6679c258c8d76da35f860c01b6112ee565b610cda676de623b1fa73da3d60c01b6112ee565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16148015610d255750610d2467f6a48d9f2388c41260c01b611815565b5b80610dd25750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015610dd15750610dd067fa0aca4573cd080160c01b611815565b5b5b610e27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611d24602c913960400191505060405180910390fd5b610e3b673f8a07559ccae65460c01b6112ee565b610e4f675dc29edd3cdba7bd60c01b6112ee565b610e63676fe0a58a4dd21f8660c01b6112ee565b610e77672e679c49748c7f0760c01b6112ee565b610e8b67a2bf75e3952a5a4360c01b6112ee565b8260008086815260200190815260200160002060010160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550610edb67a7ec980af9d33e1960c01b6112ee565b610eef67c2c4b67905cc97f860c01b6112ee565b837f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa6884604051808267ffffffffffffffff16815260200191505060405180910390a250505050565b6000610f4d67864eaf761278559d60c01b6112ee565b610f6167e60e0ccef8f953a760c01b6112ee565b610f7567859952db8669d5d960c01b6112ee565b60008083815260200190815260200160002060010160149054906101000a900467ffffffffffffffff169050919050565b610fba67805708a845e0b2d160c01b6112ee565b81610fcf67ae4d34559648283a60c01b6112ee565b610fe36727fa76608231909860c01b6112ee565b610ff767e76ecf7696d24d4b60c01b6112ee565b600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061104567fa20791bdebe2e8660c01b6112ee565b611059679c258c8d76da35f860c01b6112ee565b61106d676de623b1fa73da3d60c01b6112ee565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480156110b857506110b767f6a48d9f2388c41260c01b611815565b5b806111655750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015611164575061116367fa0aca4573cd080160c01b611815565b5b5b6111ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611d24602c913960400191505060405180910390fd5b6111ce673f8a07559ccae65460c01b6112ee565b6111e2675dc29edd3cdba7bd60c01b6112ee565b6111f667040a0a548705718d60c01b6112ee565b61120a671d5d4bfa835d4ccb60c01b6112ee565b61121e67a59f345953c9adf560c01b6112ee565b8260008086815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506112866722ce4fff93d84f7460c01b6112ee565b61129a67129c0e77932643e760c01b6112ee565b837f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a084604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a250505050565b50565b6000919050565b61130c67a5292e13b669b2eb60c01b6112ee565b8161132167ae4d34559648283a60c01b6112ee565b6113356727fa76608231909860c01b6112ee565b61134967e76ecf7696d24d4b60c01b6112ee565b600080600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061139767fa20791bdebe2e8660c01b6112ee565b6113ab679c258c8d76da35f860c01b6112ee565b6113bf676de623b1fa73da3d60c01b6112ee565b3373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614801561140a575061140967f6a48d9f2388c41260c01b611815565b5b806114b75750600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680156114b657506114b567fa0aca4573cd080160c01b611815565b5b5b61150c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180611d24602c913960400191505060405180910390fd5b611520673f8a07559ccae65460c01b6112ee565b611534675dc29edd3cdba7bd60c01b6112ee565b61154867d2d7e0c86f3b4ab460c01b6112ee565b61155c67bced6297afc4096360c01b6112ee565b611570672774e29caa033f4760c01b6112ee565b8260008086815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506115d867a8cbeea826f0c20d60c01b6112ee565b6115ec6774c73891e1b8e87960c01b6112ee565b837fd4735d920b0f87494915f556dd9b54c8f309026070caea5c737245152564d26684604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a250505050565b61165467c6c86a43a36f81d060c01b6112ee565b61166867b56234552a487c3760c01b6112ee565b61167c67164f2dd238e5c68e60c01b6112ee565b600061168986868661083e565b905061169f67cd599cd7c522e5e860c01b6112ee565b6116b367565345668340fd7160c01b6112ee565b6116be818484611a1a565b505050505050565b6116da67f9bc5be3538e2f8460c01b6112ee565b6116ee67df8752e3a07ff93160c01b6112ee565b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611796671fcd2847e9b54e4460c01b6112ee565b6117aa67ead0a5571223dc1660c01b6112ee565b8173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b600060019050919050565b6118346715909a040f3def2960c01b6112ee565b61184867ef20cff9401eed6c60c01b6112ee565b61185c67c18f3f14a9757c6060c01b6112ee565b61186684846112f8565b61187a670dd560f0ccad952160c01b6112ee565b61188e67c9aee63ad76ad21460c01b6112ee565b611899848383611a1a565b50505050565b60006118b567f2d699bbcddca45760c01b6112ee565b6118c967e330ba59c16d0bc360c01b6112ee565b6118dd6743a7fd2323f0b86060c01b6112ee565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600061198567fd81ae25c0ab767a60c01b6112ee565b6119996723007af3aa29dd4160c01b6112ee565b6119ad67285ea3dfe9e0b78b60c01b6112ee565b600073ffffffffffffffffffffffffffffffffffffffff1660008084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b611a2e67c1a0e6a707be19cb60c01b6112ee565b611a42676910669555cf407060c01b6112ee565b611a5667c5376103363d27a160c01b6112ee565b60008084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611bb557611ad267a90d580023207d7060c01b6112ee565b611ae667d649c271901761fb60c01b6112ee565b8160008085815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611b4e679f5cfc3c2893e46d60c01b6112ee565b611b62677ea8a76fb6527ccb60c01b6112ee565b827f335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a083604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a2611bca565b611bc967382b4fe9653714e360c01b6112ee565b5b611bde670752c708a41f6d9060c01b6112ee565b611bf267cbad71a062b7c52b60c01b6112ee565b60008084815260200190815260200160002060010160149054906101000a900467ffffffffffffffff1667ffffffffffffffff168167ffffffffffffffff1614611d0957611c4a67c3e23000ecb83aed60c01b6112ee565b611c5e675f8abdbd14de3f0260c01b6112ee565b8060008085815260200190815260200160002060010160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550611cae67cf3450aed0c852ed60c01b6112ee565b611cc2671a1a4331391f727660c01b6112ee565b827f1d4f9bbfc9cab89d66e1a1562f2233ccbf1308cb4f63de2ead5787adddb8fa6882604051808267ffffffffffffffff16815260200191505060405180910390a2611d1e565b611d1d678fb2e383e5c17d9160c01b6112ee565b5b50505056fe454e5352656769737472793a20726576657274656420627920617574686f7269736564206d6f646966696572a164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class ENSRegistry__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.ENSRegistry__factory = ENSRegistry__factory; +ENSRegistry__factory.bytecode = _bytecode; +ENSRegistry__factory.abi = _abi; diff --git a/dist/typings/factories/ENSReverseRegistrar__factory.d.ts b/dist/typings/factories/ENSReverseRegistrar__factory.d.ts new file mode 100644 index 00000000..2b06be9c --- /dev/null +++ b/dist/typings/factories/ENSReverseRegistrar__factory.d.ts @@ -0,0 +1,54 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { ENSReverseRegistrar, ENSReverseRegistrarInterface } from "../ENSReverseRegistrar"; +declare type ENSReverseRegistrarConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class ENSReverseRegistrar__factory extends ContractFactory { + constructor(...args: ENSReverseRegistrarConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): ENSReverseRegistrar; + connect(signer: Signer): ENSReverseRegistrar__factory; + static readonly bytecode = "0x608060405234801561001057600080fd5b5061002b675e592fe27197979c60c01b6100a460201b60201c565b61004567eca2e4778f3efef360c01b6100a460201b60201c565b326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061009f672881dd3a1d75b6e160c01b6100a760201b60201c565b6100aa565b50565b50565b6115e4806100b96000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80633a4442ed1161009757806398f4a9411161006657806398f4a94114610424578063bde481af14610483578063bffbe61c146104e2578063c47f00271461053a576100f5565b80633a4442ed14610325578063485cc9551461036e5780637b103999146103d25780637cf8a2eb14610406576100f5565b806318121646116100d357806318121646146102055780631e83409a1461024e5780632e6afd6e146102a6578063392e53cd14610305576100f5565b806304f3bcec146100fa5780630f5a54661461012e5780631262ed1c146101a6575b600080fd5b610102610609565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101906004803603604081101561014457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061062f565b6040518082815260200191505060405180910390f35b6101ed600480360360208110156101bc57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061067f565b60405180821515815260200191505060405180910390f35b61024c6004803603602081101561021b57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061068a565b005b6102906004803603602081101561026457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061068d565b6040518082815260200191505060405180910390f35b6102ed600480360360208110156102bc57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506106dd565b60405180821515815260200191505060405180910390f35b61030d6106e4565b60405180821515815260200191505060405180910390f35b61036c6004803603602081101561033b57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610777565b005b6103d06004803603604081101561038457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061077a565b005b6103da610a4a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61040e610a70565b6040518082815260200191505060405180910390f35b61046b6004803603602081101561043a57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610a97565b60405180821515815260200191505060405180910390f35b6104ca6004803603602081101561049957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610aa2565b60405180821515815260200191505060405180910390f35b610524600480360360208110156104f857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aa9565b6040518082815260200191505060405180910390f35b6105f36004803603602081101561055057600080fd5b810190808035906020019064010000000081111561056d57600080fd5b82018360208201111561057f57600080fd5b803590602001918460018302840111640100000000831117156105a157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610b5e565b6040518082815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006106456766215c18a365c9c560c01b610777565b61065967ff9c8324359387d860c01b610777565b61066d675cda4055a6a93da160c01b610777565b6106778383610d1f565b905092915050565b600060019050919050565b50565b60006106a36746ca7fae323bdd0e60c01b610777565b6106b767046ff7d5be837b3160c01b610777565b6106cb672b9765f688075e1b60c01b610777565b6106d6826000610d1f565b9050919050565b6000919050565b60006106fa6726ed6cc6ca12515c60c01b61068a565b61070e67f3fc49482028cbb860c01b61068a565b6107226740317a79cae6a3ff60c01b61068a565b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b50565b61078e67e539342b0ae7f28c60c01b610777565b6107a267b2266613e068a5ae60c01b61068a565b6107b6676a66a63870f964f960c01b61068a565b6107ca6772f22eca890742ba60c01b61068a565b6107de67c8ab57d60023f99860c01b61068a565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610882576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806115a9602f913960400191505060405180910390fd5b61089667d31dec9098d614f660c01b61068a565b6108aa67a184879381a9c67460c01b61068a565b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108ff675e44e6e1c885710560c01b61068a565b61091367c627f7fd501e0b5160c01b610777565b610927670d6ff072c181214560c01b610777565b61093b67aa1438c046ab10c960c01b610777565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061099067bc458f9e17b5ec7e60c01b610777565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506109e56732ca1833e9907bb960c01b61068a565b6109f9672942130a5b94b82160c01b61068a565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b81565b600060019050919050565b6000919050565b6000610abf67bcf814991273788560c01b610777565b610ad367344b09aa890ac87960c01b610777565b610ae76702c597c75fc8de5860c01b610777565b7f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b610b2a8373ffffffffffffffffffffffffffffffffffffffff166114bd565b6040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b6000610b746798da84a4ab1962b660c01b610777565b610b88671b16f3d335b6e47660c01b610777565b610b9c67d76e40928d20283d60c01b610777565b6000610bca30600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610d1f565b9050610be067879e943436cc66b960c01b610777565b610bf467369b96312ee447b960c01b610777565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637737221382856040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610c89578082015181840152602081019050610c6e565b50505050905090810190601f168015610cb65780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b158015610cd657600080fd5b505af1158015610cea573d6000803e3d6000fd5b50505050610d02674fbb5285401f983c60c01b610777565b610d16675f75a63c3fbfa6a360c01b610777565b80915050919050565b6000610d3567cbd291c61c1fed8a60c01b610777565b610d4967e13ab3067701b2c160c01b610777565b610d5d67b8bfb8754307d1bf60c01b610777565b6000610d7e3373ffffffffffffffffffffffffffffffffffffffff166114bd565b9050610d94678bf2f6e1023cff9a60c01b610777565b610da867573d7f8b4e7d104260c01b610777565b60007f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b826040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050610e12671508e9c1dc7eb26660c01b610777565b610e2667f769b1764bb9c26260c01b610777565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610e9b57600080fd5b505afa158015610eaf573d6000803e3d6000fd5b505050506040513d6020811015610ec557600080fd5b81019080805190602001909291905050509050610eec673e81217cedb7e53960c01b610777565b610f0067a8a1ffe21d6c086160c01b610777565b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141580156110165750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610fab57600080fd5b505afa158015610fbf573d6000803e3d6000fd5b505050506040513d6020811015610fd557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b156112c95761102f6726d17378b4b7a59a60c01b610777565b6110436718d37d0437f4c86660c01b610777565b61105767b856ee14e2c142f760c01b610777565b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111dc5761109e671b33fe493236a4fc60c01b610777565b6110b26759a6fed70f4da4f360c01b610777565b6110c667dd71181abe755d9860c01b610777565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59237f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b85306040518463ffffffff1660e01b8152600401808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b15801561118457600080fd5b505af1158015611198573d6000803e3d6000fd5b505050506040513d60208110156111ae57600080fd5b8101908080519060200190929190505050506111d4675006325aa799a98b60c01b610777565b3090506111f1565b6111f0678c0d74a9ba0fbc2660c01b610777565b5b61120567c67d9103334a355660c01b610777565b61121967ffb5e9aa08f8c75f60c01b610777565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a83876040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1580156112ac57600080fd5b505af11580156112c0573d6000803e3d6000fd5b505050506112de565b6112dd67903442241e2eec9060c01b610777565b5b6112f2674b605d35a056ac9460c01b610777565b61130667912abbd721a0261a60c01b610777565b8573ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146114745761134d673110383992fe9e8660c01b610777565b61136167c2af4834795e6f1c60c01b610777565b61137567c83116539ea0813260c01b610777565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59237f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b85896040518463ffffffff1660e01b8152600401808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b15801561143357600080fd5b505af1158015611447573d6000803e3d6000fd5b505050506040513d602081101561145d57600080fd5b810190808051906020019092919050505050611489565b611488676067c5ce00f313d260c01b610777565b5b61149d6743ca19565f27759f60c01b610777565b6114b167eea6109e6afbaaed60c01b610777565b81935050505092915050565b60006114d3672c144eb663cdf4f860c01b6115a5565b6114e767ada98ff3757496c060c01b6115a5565b6114fb672ba36b39e8cc107a60c01b6115a5565b60006115116736defab92616d2bf60c01b6115a5565b7f303132333435363738396162636465660000000000000000000000000000000060285b600081111561156b5760018103905081600f86161a815360108504945060018103905081600f86161a8153601085049450611535565b50602860002091505061158867bcad0247232d1c4960c01b6115a5565b61159c677824e78d495d1c9b60c01b6115a5565b80915050919050565b5056fe496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a6572a164736f6c634300060c000a"; + static readonly abi: ({ + inputs: any[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): ENSReverseRegistrarInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ENSReverseRegistrar; +} +export {}; diff --git a/dist/typings/factories/ENSReverseRegistrar__factory.js b/dist/typings/factories/ENSReverseRegistrar__factory.js new file mode 100644 index 00000000..1991fd48 --- /dev/null +++ b/dist/typings/factories/ENSReverseRegistrar__factory.js @@ -0,0 +1,310 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ENSReverseRegistrar__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "initializer", + type: "address", + }, + ], + name: "Initialized", + type: "event", + }, + { + inputs: [], + name: "ADDR_REVERSE_NODE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__29e7a9c7", + type: "bytes8", + }, + ], + name: "c_29e7a9c7", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_c0828b70", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__29e7a9c7", + type: "bytes8", + }, + ], + name: "c_false29e7a9c7", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_falsec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__29e7a9c7", + type: "bytes8", + }, + ], + name: "c_true29e7a9c7", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_truec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "claim", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "resolver_", + type: "address", + }, + ], + name: "claimWithResolver", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ENSRegistry", + name: "registry_", + type: "address", + }, + { + internalType: "contract ENSNameResolver", + name: "resolver_", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isInitialized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "addr_", + type: "address", + }, + ], + name: "node", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "registry", + outputs: [ + { + internalType: "contract ENSRegistry", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "resolver", + outputs: [ + { + internalType: "contract ENSNameResolver", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "string", + name: "name", + type: "string", + }, + ], + name: "setName", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; +const _bytecode = "0x608060405234801561001057600080fd5b5061002b675e592fe27197979c60c01b6100a460201b60201c565b61004567eca2e4778f3efef360c01b6100a460201b60201c565b326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061009f672881dd3a1d75b6e160c01b6100a760201b60201c565b6100aa565b50565b50565b6115e4806100b96000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80633a4442ed1161009757806398f4a9411161006657806398f4a94114610424578063bde481af14610483578063bffbe61c146104e2578063c47f00271461053a576100f5565b80633a4442ed14610325578063485cc9551461036e5780637b103999146103d25780637cf8a2eb14610406576100f5565b806318121646116100d357806318121646146102055780631e83409a1461024e5780632e6afd6e146102a6578063392e53cd14610305576100f5565b806304f3bcec146100fa5780630f5a54661461012e5780631262ed1c146101a6575b600080fd5b610102610609565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101906004803603604081101561014457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061062f565b6040518082815260200191505060405180910390f35b6101ed600480360360208110156101bc57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061067f565b60405180821515815260200191505060405180910390f35b61024c6004803603602081101561021b57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061068a565b005b6102906004803603602081101561026457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061068d565b6040518082815260200191505060405180910390f35b6102ed600480360360208110156102bc57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506106dd565b60405180821515815260200191505060405180910390f35b61030d6106e4565b60405180821515815260200191505060405180910390f35b61036c6004803603602081101561033b57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610777565b005b6103d06004803603604081101561038457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061077a565b005b6103da610a4a565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61040e610a70565b6040518082815260200191505060405180910390f35b61046b6004803603602081101561043a57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610a97565b60405180821515815260200191505060405180910390f35b6104ca6004803603602081101561049957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610aa2565b60405180821515815260200191505060405180910390f35b610524600480360360208110156104f857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aa9565b6040518082815260200191505060405180910390f35b6105f36004803603602081101561055057600080fd5b810190808035906020019064010000000081111561056d57600080fd5b82018360208201111561057f57600080fd5b803590602001918460018302840111640100000000831117156105a157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050610b5e565b6040518082815260200191505060405180910390f35b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006106456766215c18a365c9c560c01b610777565b61065967ff9c8324359387d860c01b610777565b61066d675cda4055a6a93da160c01b610777565b6106778383610d1f565b905092915050565b600060019050919050565b50565b60006106a36746ca7fae323bdd0e60c01b610777565b6106b767046ff7d5be837b3160c01b610777565b6106cb672b9765f688075e1b60c01b610777565b6106d6826000610d1f565b9050919050565b6000919050565b60006106fa6726ed6cc6ca12515c60c01b61068a565b61070e67f3fc49482028cbb860c01b61068a565b6107226740317a79cae6a3ff60c01b61068a565b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b50565b61078e67e539342b0ae7f28c60c01b610777565b6107a267b2266613e068a5ae60c01b61068a565b6107b6676a66a63870f964f960c01b61068a565b6107ca6772f22eca890742ba60c01b61068a565b6107de67c8ab57d60023f99860c01b61068a565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614610882576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f8152602001806115a9602f913960400191505060405180910390fd5b61089667d31dec9098d614f660c01b61068a565b6108aa67a184879381a9c67460c01b61068a565b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108ff675e44e6e1c885710560c01b61068a565b61091367c627f7fd501e0b5160c01b610777565b610927670d6ff072c181214560c01b610777565b61093b67aa1438c046ab10c960c01b610777565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061099067bc458f9e17b5ec7e60c01b610777565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506109e56732ca1833e9907bb960c01b61068a565b6109f9672942130a5b94b82160c01b61068a565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b81565b600060019050919050565b6000919050565b6000610abf67bcf814991273788560c01b610777565b610ad367344b09aa890ac87960c01b610777565b610ae76702c597c75fc8de5860c01b610777565b7f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b610b2a8373ffffffffffffffffffffffffffffffffffffffff166114bd565b6040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b6000610b746798da84a4ab1962b660c01b610777565b610b88671b16f3d335b6e47660c01b610777565b610b9c67d76e40928d20283d60c01b610777565b6000610bca30600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610d1f565b9050610be067879e943436cc66b960c01b610777565b610bf467369b96312ee447b960c01b610777565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637737221382856040518363ffffffff1660e01b81526004018083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610c89578082015181840152602081019050610c6e565b50505050905090810190601f168015610cb65780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b158015610cd657600080fd5b505af1158015610cea573d6000803e3d6000fd5b50505050610d02674fbb5285401f983c60c01b610777565b610d16675f75a63c3fbfa6a360c01b610777565b80915050919050565b6000610d3567cbd291c61c1fed8a60c01b610777565b610d4967e13ab3067701b2c160c01b610777565b610d5d67b8bfb8754307d1bf60c01b610777565b6000610d7e3373ffffffffffffffffffffffffffffffffffffffff166114bd565b9050610d94678bf2f6e1023cff9a60c01b610777565b610da867573d7f8b4e7d104260c01b610777565b60007f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b826040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209050610e12671508e9c1dc7eb26660c01b610777565b610e2667f769b1764bb9c26260c01b610777565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610e9b57600080fd5b505afa158015610eaf573d6000803e3d6000fd5b505050506040513d6020811015610ec557600080fd5b81019080805190602001909291905050509050610eec673e81217cedb7e53960c01b610777565b610f0067a8a1ffe21d6c086160c01b610777565b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141580156110165750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630178b8bf836040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610fab57600080fd5b505afa158015610fbf573d6000803e3d6000fd5b505050506040513d6020811015610fd557600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b156112c95761102f6726d17378b4b7a59a60c01b610777565b6110436718d37d0437f4c86660c01b610777565b61105767b856ee14e2c142f760c01b610777565b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146111dc5761109e671b33fe493236a4fc60c01b610777565b6110b26759a6fed70f4da4f360c01b610777565b6110c667dd71181abe755d9860c01b610777565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59237f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b85306040518463ffffffff1660e01b8152600401808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b15801561118457600080fd5b505af1158015611198573d6000803e3d6000fd5b505050506040513d60208110156111ae57600080fd5b8101908080519060200190929190505050506111d4675006325aa799a98b60c01b610777565b3090506111f1565b6111f0678c0d74a9ba0fbc2660c01b610777565b5b61120567c67d9103334a355660c01b610777565b61121967ffb5e9aa08f8c75f60c01b610777565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631896f70a83876040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1580156112ac57600080fd5b505af11580156112c0573d6000803e3d6000fd5b505050506112de565b6112dd67903442241e2eec9060c01b610777565b5b6112f2674b605d35a056ac9460c01b610777565b61130667912abbd721a0261a60c01b610777565b8573ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146114745761134d673110383992fe9e8660c01b610777565b61136167c2af4834795e6f1c60c01b610777565b61137567c83116539ea0813260c01b610777565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166306ab59237f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e260001b85896040518463ffffffff1660e01b8152600401808481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b15801561143357600080fd5b505af1158015611447573d6000803e3d6000fd5b505050506040513d602081101561145d57600080fd5b810190808051906020019092919050505050611489565b611488676067c5ce00f313d260c01b610777565b5b61149d6743ca19565f27759f60c01b610777565b6114b167eea6109e6afbaaed60c01b610777565b81935050505092915050565b60006114d3672c144eb663cdf4f860c01b6115a5565b6114e767ada98ff3757496c060c01b6115a5565b6114fb672ba36b39e8cc107a60c01b6115a5565b60006115116736defab92616d2bf60c01b6115a5565b7f303132333435363738396162636465660000000000000000000000000000000060285b600081111561156b5760018103905081600f86161a815360108504945060018103905081600f86161a8153601085049450611535565b50602860002091505061158867bcad0247232d1c4960c01b6115a5565b61159c677824e78d495d1c9b60c01b6115a5565b80915050919050565b5056fe496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a6572a164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class ENSReverseRegistrar__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.ENSReverseRegistrar__factory = ENSReverseRegistrar__factory; +ENSReverseRegistrar__factory.bytecode = _bytecode; +ENSReverseRegistrar__factory.abi = _abi; diff --git a/dist/typings/factories/ENSTextResolver__factory.d.ts b/dist/typings/factories/ENSTextResolver__factory.d.ts new file mode 100644 index 00000000..c8e23d41 --- /dev/null +++ b/dist/typings/factories/ENSTextResolver__factory.d.ts @@ -0,0 +1,35 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { ENSTextResolver, ENSTextResolverInterface } from "../ENSTextResolver"; +export declare class ENSTextResolver__factory { + static readonly abi: ({ + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + outputs?: undefined; + stateMutability?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): ENSTextResolverInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ENSTextResolver; +} diff --git a/dist/typings/factories/ENSTextResolver__factory.js b/dist/typings/factories/ENSTextResolver__factory.js new file mode 100644 index 00000000..fdf69790 --- /dev/null +++ b/dist/typings/factories/ENSTextResolver__factory.js @@ -0,0 +1,190 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ENSTextResolver__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + indexed: true, + internalType: "string", + name: "indexedKey", + type: "string", + }, + { + indexed: false, + internalType: "string", + name: "key", + type: "string", + }, + ], + name: "TextChanged", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3880312f", + type: "bytes8", + }, + ], + name: "c_3880312f", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_ac93193e", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3880312f", + type: "bytes8", + }, + ], + name: "c_false3880312f", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_falseac93193e", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3880312f", + type: "bytes8", + }, + ], + name: "c_true3880312f", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__ac93193e", + type: "bytes8", + }, + ], + name: "c_trueac93193e", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "string", + name: "key", + type: "string", + }, + { + internalType: "string", + name: "value", + type: "string", + }, + ], + name: "setText", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "node", + type: "bytes32", + }, + { + internalType: "string", + name: "key", + type: "string", + }, + ], + name: "text", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +class ENSTextResolver__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.ENSTextResolver__factory = ENSTextResolver__factory; +ENSTextResolver__factory.abi = _abi; diff --git a/dist/typings/factories/ERC20Token__factory.d.ts b/dist/typings/factories/ERC20Token__factory.d.ts new file mode 100644 index 00000000..0ecec0ac --- /dev/null +++ b/dist/typings/factories/ERC20Token__factory.d.ts @@ -0,0 +1,35 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { ERC20Token, ERC20TokenInterface } from "../ERC20Token"; +export declare class ERC20Token__factory { + static readonly abi: ({ + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + outputs?: undefined; + stateMutability?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): ERC20TokenInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ERC20Token; +} diff --git a/dist/typings/factories/ERC20Token__factory.js b/dist/typings/factories/ERC20Token__factory.js new file mode 100644 index 00000000..9ae4d2b4 --- /dev/null +++ b/dist/typings/factories/ERC20Token__factory.js @@ -0,0 +1,289 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ERC20Token__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + 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: "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", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__5838cc23", + type: "bytes8", + }, + ], + name: "c_5838cc23", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__5838cc23", + type: "bytes8", + }, + ], + name: "c_false5838cc23", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__5838cc23", + type: "bytes8", + }, + ], + name: "c_true5838cc23", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; +class ERC20Token__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.ERC20Token__factory = ERC20Token__factory; +ERC20Token__factory.abi = _abi; diff --git a/dist/typings/factories/ExternalAccountRegistry__factory.d.ts b/dist/typings/factories/ExternalAccountRegistry__factory.d.ts new file mode 100644 index 00000000..446aa968 --- /dev/null +++ b/dist/typings/factories/ExternalAccountRegistry__factory.d.ts @@ -0,0 +1,47 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { ExternalAccountRegistry, ExternalAccountRegistryInterface } from "../ExternalAccountRegistry"; +declare type ExternalAccountRegistryConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class ExternalAccountRegistry__factory extends ContractFactory { + constructor(...args: ExternalAccountRegistryConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): ExternalAccountRegistry; + connect(signer: Signer): ExternalAccountRegistry__factory; + static readonly bytecode = "0x608060405234801561001057600080fd5b506116e1806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80638ecc1365116100715780638ecc1365146102c257806394000b0214610306578063bb890d3f14610334578063d0873057146103ae578063d543c34a146103f7578063e278cfc614610425576100a9565b806334d323a4146100ae57806359b52ef8146101325780636c9560ad146101a05780637cd53489146101ff5780638a3133781461025e575b600080fd5b61011a600480360360608110156100c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610469565b60405180821515815260200191505060405180910390f35b6101886004803603606081101561014857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610570565b60405180821515815260200191505060405180910390f35b6101e7600480360360208110156101b657600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061064b565b60405180821515815260200191505060405180910390f35b6102466004803603602081101561021557600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610652565b60405180821515815260200191505060405180910390f35b6102aa6004803603604081101561027457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061065d565b60405180821515815260200191505060405180910390f35b610304600480360360208110156102d857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061072d565b005b6103326004803603602081101561031c57600080fd5b8101908080359060200190929190505050610b52565b005b6103966004803603604081101561034a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d83565b60405180821515815260200191505060405180910390f35b6103f5600480360360208110156103c457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610e7f565b005b6104236004803603602081101561040d57600080fd5b8101908080359060200190929190505050610e82565b005b6104676004803603602081101561043b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611137565b005b600061047f6713d9041a118c344260c01b610e7f565b610493672e24e418dbc275de60c01b610e7f565b6104a76793c6167f84f3118f60c01b610e7f565b610567826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506113d690919063ffffffff16565b90509392505050565b60006105866767d127a37ae2d0cb60c01b610e7f565b61059a679c68a2fe977df37360c01b610e7f565b6105ae67d0b96ffa762936bf60c01b610e7f565b610642826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506113d690919063ffffffff16565b90509392505050565b6000919050565b600060019050919050565b600061067367a7f317030316783e60c01b610e7f565b6106876768e2eee9381ad8bb60c01b610e7f565b61069b6757ad413bbeafb55260c01b610e7f565b6107256000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008481526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506115a3565b905092915050565b61074167d6c36a8e65aed5db60c01b610e7f565b61075567512102a90eb3854660c01b610e7f565b610769676b1457754c98e8ad60c01b610e7f565b61077d675d3da7137096c93560c01b610e7f565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610803576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d8152602001806115f6602d913960400191505060405180910390fd5b61081767a13cd0a6ff93200b60c01b610e7f565b61082b673107f512f4a5180460c01b610e7f565b61083f675167df5b2600199960c01b610e7f565b61085367e1f19a7246dd81bb60c01b610e7f565b6109096000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506115a3565b1561095f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180611650602d913960400191505060405180910390fd5b61097367779ac343cfccacec60c01b610e7f565b6109876733f964c2ffced8f260c01b610e7f565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff021916908315150217905550610a3567b0a4016a584a98a860c01b610e7f565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550610ad0679b3d87ec1667234960c01b610e7f565b610ae467fb1c5b7067b6500460c01b610e7f565b7f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644683382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b610b6667cb4d40f0e2afef3f60c01b610e7f565b610b7a6709a8a7a3cf206d5760c01b610e7f565b610b8e67396e03f5666b21ff60c01b610e7f565b610ba2678e30cceea218005a60c01b610e7f565b610c2c6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008381526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506115a3565b610c81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806116a9602c913960400191505060405180910390fd5b610c95678fa45804d7562d6b60c01b610e7f565b610ca967028ed1a412c53daf60c01b610e7f565b436000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600083815260200190815260200160002060010181905550610d1767a0977ee469f0b3f060c01b610e7f565b610d2b6706671866d2f278cc60c01b610e7f565b7f87dde712783ad4895642c7a875998317a71cf424a2444eb79545ce3795431ff93382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000610d9967c2653bac4a3d39c460c01b610e7f565b610dad675ef2f76257369dd260c01b610e7f565b610dc167711f45a80d168caa60c01b610e7f565b610e776000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506115a3565b905092915050565b50565b610e9667576c41e7e7b7208360c01b610e7f565b610eaa67b5dc79c273aab80260c01b610e7f565b610ebe6782206beb1497e4b760c01b610e7f565b610ed26754c563b8f12008ed60c01b610e7f565b610f5c6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008381526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506115a3565b15610fb2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180611623602d913960400191505060405180910390fd5b610fc6676de3250260736c1d60c01b610e7f565b610fda673ca7b6100481fb4c60c01b610e7f565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600083815260200190815260200160002060000160006101000a81548160ff02191690831515021790555061105c676b5d3e75a87a13a360c01b610e7f565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000838152602001908152602001600020600101819055506110cb6765cb11f91dde54f160c01b610e7f565b6110df675926ebf5b9e5110960c01b610e7f565b7f4075b367eed0513a54aa39c287c66d6ae98e5df6f73ac087b26b8f89d05d1aa83382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b61114b6767530280ca42544560c01b610e7f565b61115f671a5dcb4a4b0f3aef60c01b610e7f565b61117367e95e9216fd0f0fa160c01b610e7f565b6111876776c38618baafc27560c01b610e7f565b61123d6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506115a3565b611292576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061167d602c913960400191505060405180910390fd5b6112a6675000bbf708f3d63c60c01b610e7f565b6112ba67ee410c12d6420e5d60c01b610e7f565b436000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550611354673dc71e1f91fc026160c01b610e7f565b61136867562da47d1d3ce51560c01b610e7f565b7f1ce3cbbc43ee231e5b950332f2b0b9dd7d349291a3ee411ce5c5c7ed745661bb3382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b60006113ec67b93cca31d93a2da060c01b6115f2565b611400679b3366ff5586cbcb60c01b6115f2565b611414670a6c1d6e66d9b12860c01b6115f2565b600061142a674c0130c069ab77bb60c01b6115f2565b61143e6790c91fcf571f955b60c01b6115f2565b83600001511561155c5761145c67e7011bc29dbcc53d60c01b6115f2565b61147067326b8da8148cf64b60c01b6115f2565b61148467955b6006d18a31f860c01b6115f2565b6000846020015114156114c2576114a5670aa7911fc928619860c01b6115f2565b6114b9679af8a90d24ea0b9a60c01b6115f2565b60019050611557565b6114d6671d61c7bbbc41b4a460c01b6115f2565b6114ea67163e427f8e2dad7960c01b6115f2565b60008314156115245761150767b5ef86ed02b8943660c01b6115f2565b61151b67a12424a58a27066860c01b6115f2565b60019050611556565b61153867f20b97e6b687869260c01b6115f2565b61154c67069e2da21e7ce91360c01b6115f2565b8284602001511190505b5b611571565b61157067bc5bb55bea0c32fc60c01b6115f2565b5b611585675d4f0e0e7d41a81f60c01b6115f2565b611599670fb7d742fb4b185760c01b6115f2565b8091505092915050565b60006115b967983085a61ff08a3a60c01b6115f2565b6115cd67f957f33d43cb511360c01b6115f2565b6115e167cd826c96bcb7be1860c01b6115f2565b6115eb82436113d6565b9050919050565b5056fe45787465726e616c4163636f756e7452656769737472793a2063616e6e6f742061646420307830206f776e657245787465726e616c4163636f756e7452656769737472793a2070726f6f6620616c72656164792065786973747345787465726e616c4163636f756e7452656769737472793a206f776e657220616c72656164792065786973747345787465726e616c4163636f756e7452656769737472793a206f776e657220646f65736e277420657869737445787465726e616c4163636f756e7452656769737472793a2070726f6f6620646f65736e2774206578697374a164736f6c634300060c000a"; + static readonly abi: ({ + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + outputs?: undefined; + stateMutability?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): ExternalAccountRegistryInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ExternalAccountRegistry; +} +export {}; diff --git a/dist/typings/factories/ExternalAccountRegistry__factory.js b/dist/typings/factories/ExternalAccountRegistry__factory.js new file mode 100644 index 00000000..1d143259 --- /dev/null +++ b/dist/typings/factories/ExternalAccountRegistry__factory.js @@ -0,0 +1,324 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ExternalAccountRegistry__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "AccountOwnerAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "AccountOwnerRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + ], + name: "AccountProofAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + ], + name: "AccountProofRemoved", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "addAccountOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + ], + name: "addAccountProof", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__67f73f84", + type: "bytes8", + }, + ], + name: "c_67f73f84", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__67f73f84", + type: "bytes8", + }, + ], + name: "c_false67f73f84", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__67f73f84", + type: "bytes8", + }, + ], + name: "c_true67f73f84", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "removeAccountOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + ], + name: "removeAccountProof", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "verifyAccountOwner", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "verifyAccountOwnerAtBlock", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + ], + name: "verifyAccountProof", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "verifyAccountProofAtBlock", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +const _bytecode = "0x608060405234801561001057600080fd5b506116e1806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80638ecc1365116100715780638ecc1365146102c257806394000b0214610306578063bb890d3f14610334578063d0873057146103ae578063d543c34a146103f7578063e278cfc614610425576100a9565b806334d323a4146100ae57806359b52ef8146101325780636c9560ad146101a05780637cd53489146101ff5780638a3133781461025e575b600080fd5b61011a600480360360608110156100c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610469565b60405180821515815260200191505060405180910390f35b6101886004803603606081101561014857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610570565b60405180821515815260200191505060405180910390f35b6101e7600480360360208110156101b657600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061064b565b60405180821515815260200191505060405180910390f35b6102466004803603602081101561021557600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610652565b60405180821515815260200191505060405180910390f35b6102aa6004803603604081101561027457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061065d565b60405180821515815260200191505060405180910390f35b610304600480360360208110156102d857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061072d565b005b6103326004803603602081101561031c57600080fd5b8101908080359060200190929190505050610b52565b005b6103966004803603604081101561034a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d83565b60405180821515815260200191505060405180910390f35b6103f5600480360360208110156103c457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610e7f565b005b6104236004803603602081101561040d57600080fd5b8101908080359060200190929190505050610e82565b005b6104676004803603602081101561043b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611137565b005b600061047f6713d9041a118c344260c01b610e7f565b610493672e24e418dbc275de60c01b610e7f565b6104a76793c6167f84f3118f60c01b610e7f565b610567826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506113d690919063ffffffff16565b90509392505050565b60006105866767d127a37ae2d0cb60c01b610e7f565b61059a679c68a2fe977df37360c01b610e7f565b6105ae67d0b96ffa762936bf60c01b610e7f565b610642826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506113d690919063ffffffff16565b90509392505050565b6000919050565b600060019050919050565b600061067367a7f317030316783e60c01b610e7f565b6106876768e2eee9381ad8bb60c01b610e7f565b61069b6757ad413bbeafb55260c01b610e7f565b6107256000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008481526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506115a3565b905092915050565b61074167d6c36a8e65aed5db60c01b610e7f565b61075567512102a90eb3854660c01b610e7f565b610769676b1457754c98e8ad60c01b610e7f565b61077d675d3da7137096c93560c01b610e7f565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610803576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d8152602001806115f6602d913960400191505060405180910390fd5b61081767a13cd0a6ff93200b60c01b610e7f565b61082b673107f512f4a5180460c01b610e7f565b61083f675167df5b2600199960c01b610e7f565b61085367e1f19a7246dd81bb60c01b610e7f565b6109096000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506115a3565b1561095f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180611650602d913960400191505060405180910390fd5b61097367779ac343cfccacec60c01b610e7f565b6109876733f964c2ffced8f260c01b610e7f565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff021916908315150217905550610a3567b0a4016a584a98a860c01b610e7f565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550610ad0679b3d87ec1667234960c01b610e7f565b610ae467fb1c5b7067b6500460c01b610e7f565b7f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644683382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b610b6667cb4d40f0e2afef3f60c01b610e7f565b610b7a6709a8a7a3cf206d5760c01b610e7f565b610b8e67396e03f5666b21ff60c01b610e7f565b610ba2678e30cceea218005a60c01b610e7f565b610c2c6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008381526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506115a3565b610c81576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806116a9602c913960400191505060405180910390fd5b610c95678fa45804d7562d6b60c01b610e7f565b610ca967028ed1a412c53daf60c01b610e7f565b436000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600083815260200190815260200160002060010181905550610d1767a0977ee469f0b3f060c01b610e7f565b610d2b6706671866d2f278cc60c01b610e7f565b7f87dde712783ad4895642c7a875998317a71cf424a2444eb79545ce3795431ff93382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b6000610d9967c2653bac4a3d39c460c01b610e7f565b610dad675ef2f76257369dd260c01b610e7f565b610dc167711f45a80d168caa60c01b610e7f565b610e776000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506115a3565b905092915050565b50565b610e9667576c41e7e7b7208360c01b610e7f565b610eaa67b5dc79c273aab80260c01b610e7f565b610ebe6782206beb1497e4b760c01b610e7f565b610ed26754c563b8f12008ed60c01b610e7f565b610f5c6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008381526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506115a3565b15610fb2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180611623602d913960400191505060405180910390fd5b610fc6676de3250260736c1d60c01b610e7f565b610fda673ca7b6100481fb4c60c01b610e7f565b60016000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600083815260200190815260200160002060000160006101000a81548160ff02191690831515021790555061105c676b5d3e75a87a13a360c01b610e7f565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000838152602001908152602001600020600101819055506110cb6765cb11f91dde54f160c01b610e7f565b6110df675926ebf5b9e5110960c01b610e7f565b7f4075b367eed0513a54aa39c287c66d6ae98e5df6f73ac087b26b8f89d05d1aa83382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150565b61114b6767530280ca42544560c01b610e7f565b61115f671a5dcb4a4b0f3aef60c01b610e7f565b61117367e95e9216fd0f0fa160c01b610e7f565b6111876776c38618baafc27560c01b610e7f565b61123d6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff161515151581526020016001820154815250506115a3565b611292576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018061167d602c913960400191505060405180910390fd5b6112a6675000bbf708f3d63c60c01b610e7f565b6112ba67ee410c12d6420e5d60c01b610e7f565b436000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550611354673dc71e1f91fc026160c01b610e7f565b61136867562da47d1d3ce51560c01b610e7f565b7f1ce3cbbc43ee231e5b950332f2b0b9dd7d349291a3ee411ce5c5c7ed745661bb3382604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b60006113ec67b93cca31d93a2da060c01b6115f2565b611400679b3366ff5586cbcb60c01b6115f2565b611414670a6c1d6e66d9b12860c01b6115f2565b600061142a674c0130c069ab77bb60c01b6115f2565b61143e6790c91fcf571f955b60c01b6115f2565b83600001511561155c5761145c67e7011bc29dbcc53d60c01b6115f2565b61147067326b8da8148cf64b60c01b6115f2565b61148467955b6006d18a31f860c01b6115f2565b6000846020015114156114c2576114a5670aa7911fc928619860c01b6115f2565b6114b9679af8a90d24ea0b9a60c01b6115f2565b60019050611557565b6114d6671d61c7bbbc41b4a460c01b6115f2565b6114ea67163e427f8e2dad7960c01b6115f2565b60008314156115245761150767b5ef86ed02b8943660c01b6115f2565b61151b67a12424a58a27066860c01b6115f2565b60019050611556565b61153867f20b97e6b687869260c01b6115f2565b61154c67069e2da21e7ce91360c01b6115f2565b8284602001511190505b5b611571565b61157067bc5bb55bea0c32fc60c01b6115f2565b5b611585675d4f0e0e7d41a81f60c01b6115f2565b611599670fb7d742fb4b185760c01b6115f2565b8091505092915050565b60006115b967983085a61ff08a3a60c01b6115f2565b6115cd67f957f33d43cb511360c01b6115f2565b6115e167cd826c96bcb7be1860c01b6115f2565b6115eb82436113d6565b9050919050565b5056fe45787465726e616c4163636f756e7452656769737472793a2063616e6e6f742061646420307830206f776e657245787465726e616c4163636f756e7452656769737472793a2070726f6f6620616c72656164792065786973747345787465726e616c4163636f756e7452656769737472793a206f776e657220616c72656164792065786973747345787465726e616c4163636f756e7452656769737472793a206f776e657220646f65736e277420657869737445787465726e616c4163636f756e7452656769737472793a2070726f6f6620646f65736e2774206578697374a164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class ExternalAccountRegistry__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.ExternalAccountRegistry__factory = ExternalAccountRegistry__factory; +ExternalAccountRegistry__factory.bytecode = _bytecode; +ExternalAccountRegistry__factory.abi = _abi; diff --git a/dist/typings/factories/GatewayRecipientMock__factory.d.ts b/dist/typings/factories/GatewayRecipientMock__factory.d.ts new file mode 100644 index 00000000..8d2e7821 --- /dev/null +++ b/dist/typings/factories/GatewayRecipientMock__factory.d.ts @@ -0,0 +1,58 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { GatewayRecipientMock, GatewayRecipientMockInterface } from "../GatewayRecipientMock"; +declare type GatewayRecipientMockConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class GatewayRecipientMock__factory extends ContractFactory { + constructor(...args: GatewayRecipientMockConstructorParams); + deploy(gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(gateway_: string, overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): GatewayRecipientMock; + connect(signer: Signer): GatewayRecipientMock__factory; + static readonly bytecode = "0x608060405234801561001057600080fd5b50604051610c62380380610c628339818101604052602081101561003357600080fd5b810190808051906020019092919050505061005e67db84cf13641fc64d60c01b6100c160201b60201c565b61007867d348dcbb9c0cd92f60c01b6100c460201b60201c565b61009267a6589e60a19c054760c01b6100c460201b60201c565b6100ac67e21a8bd3b2ddf20c60c01b6100c460201b60201c565b6100bb816100c760201b60201c565b5061013e565b50565b50565b6100e167b69be6bf736d8c1a60c01b6100c160201b60201c565b6100fb67e18b25fd36211d0160c01b6100c160201b60201c565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610b158061014d6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80633ca3acf51161005b5780633ca3acf5146101b257806350aa3dff146102115780636d0e778014610270578063c369d5fe1461027a57610088565b80630c4b1a171461008d5780630dacdff0146100d6578063116191b61461011f57806321a5f5da14610153575b600080fd5b6100d4600480360360208110156100a357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506102d9565b005b61011d600480360360208110156100ec57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506102dc565b005b6101276102df565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61019a6004803603602081101561016957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610303565b60405180821515815260200191505060405180910390f35b6101f9600480360360208110156101c857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061030e565b60405180821515815260200191505060405180910390f35b6102586004803603602081101561022757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610319565b60405180821515815260200191505060405180910390f35b610278610320565b005b6102c16004803603602081101561029057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610411565b60405180821515815260200191505060405180910390f35b50565b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b600060019050919050565b6000919050565b61033467c8f11858cc988cef60c01b6102dc565b61034867d940f86af9f49a7260c01b6102dc565b61035c67ba7cb6b8bfe7a9d660c01b6102dc565b7f1b86fe2ccdffbf1a2c71e8eca215369d319e2c66c438a84d666fb2536ffbfb3a610385610418565b61038d610465565b6103956104b2565b604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060405180910390a1565b6000919050565b600061042e67cfc35b626608c6f260c01b6102d9565b610442677e4f9863b1e00bcc60c01b6102d9565b61045667e01fbdbc1b0ec7df60c01b6102d9565b61046060286105d9565b905090565b600061047b6796610338700568e460c01b6102d9565b61048f6736abbbfc9ea4e0bf60c01b6102d9565b6104a3675d0cc2962515b7bc60c01b6102d9565b6104ad60146105d9565b905090565b3660006104c967999df1ebdfac33ae60c01b6102d9565b6104dd6705ff84a8c54035ba60c01b6102d9565b6104f167f3ca01e4e4beffb960c01b6102d9565b36600061050867e933d788eba18b4760c01b6102d9565b61051c6746bb1589faef1d9760c01b6102d9565b61052461076f565b156105755761053d67ffcebb5c797921ae60c01b6102d9565b61055167a80d3e91ff11dbfd60c01b6102d9565b60003660009060286000369050039261056c93929190610ab3565b915091506105a5565b6105896706d79d606ee7be7760c01b6102d9565b61059d676369acbfd1bb4f2660c01b6102d9565b600036915091505b6105b9674369eba1cfe4155560c01b6102d9565b6105cd67e2cad94467be8e9f60c01b6102d9565b81819350935050509091565b60006105ef67ef0225287ba17ba060c01b6102d9565b6106036795958667c898951b60c01b6102d9565b61061767ec06b0be9f42607760c01b6102d9565b600061062d67b7cd17d69da836b660c01b6102d9565b610641671b7ac62a98e22a5460c01b6102d9565b61064961076f565b1561071257610662674b9fe2d527bba60760c01b6102d9565b6106766737f58d18ef197c9060c01b6102d9565b61068a679e0c2e494127333d60c01b6102d9565b60008360003690500390506106a9678767fa9e72b3efac60c01b6102d9565b61070a600036839060148501926106c293929190610ab3565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061094e565b91505061073e565b61072667531fb14624ef4c0060c01b6102d9565b61073a67365aa35b4857b9d560c01b6102d9565b3390505b61075267bb664b7abb1efcc160c01b6102d9565b61076667c66db900ff1468ad60c01b6102d9565b80915050919050565b60006107856718d82ab5ae60310f60c01b6102d9565b61079967b1091fd4002007a760c01b6102d9565b6107ad67e754ffc9cc3865c960c01b6102d9565b60006107c3677ed152cd4162d4dd60c01b6102d9565b6107d767d897cf3d19cf81cd60c01b6102d9565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561090a5761083f677fe0037509e467e160c01b6102d9565b61085367d0b1c04b10d8098a60c01b6102d9565b610867670b92e025f4debba760c01b6102d9565b61087b6739792e98f7fbfdea60c01b6102d9565b602c600036905010156108d9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610ae76022913960400191505060405180910390fd5b6108ed6755c879b00c45b69f60c01b6102d9565b610901679a100b07747e893d60c01b6102d9565b6001905061091f565b61091e6757b90b57dc0a6a0160c01b6102d9565b5b61093367cc41edf636370ef460c01b6102d9565b61094767ff5a153bde944b0360c01b6102d9565b8091505090565b600061096467e937c30ee854c6f460c01b610ab0565b61097867ae40a839349e539460c01b610ab0565b61098c6779ff25ce2e3aef5860c01b610ab0565b60006109a267471a531a4d41d03a60c01b610ab0565b6109b667dbf5cb870bd2bda760c01b610ab0565b6109ca6715ee1c447c585eff60c01b610ab0565b6014835114610a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f42797465734c69623a20696e76616c69642064617461206c656e67746800000081525060200191505060405180910390fd5b610a5567595b08e56ca2004360c01b610ab0565b610a6967658f3d9a047d9b2b60c01b610ab0565b6c010000000000000000000000006020840151049050610a93670a7d36500000fb3860c01b610ab0565b610aa7678f46d49d645b8e7560c01b610ab0565b80915050919050565b50565b60008085851115610ac357600080fd5b83861115610ad057600080fd5b600185028301915084860390509450949250505056fe47617465776179526563697069656e743a20696e76616c6964206d73672e64617461a164736f6c634300060c000a"; + static readonly abi: ({ + inputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): GatewayRecipientMockInterface; + static connect(address: string, signerOrProvider: Signer | Provider): GatewayRecipientMock; +} +export {}; diff --git a/dist/typings/factories/GatewayRecipientMock__factory.js b/dist/typings/factories/GatewayRecipientMock__factory.js new file mode 100644 index 00000000..29227185 --- /dev/null +++ b/dist/typings/factories/GatewayRecipientMock__factory.js @@ -0,0 +1,197 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GatewayRecipientMock__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "gateway_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "Context", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__7fd4d25d", + type: "bytes8", + }, + ], + name: "c_7fd4d25d", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_d5c463c2", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__7fd4d25d", + type: "bytes8", + }, + ], + name: "c_false7fd4d25d", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_falsed5c463c2", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__7fd4d25d", + type: "bytes8", + }, + ], + name: "c_true7fd4d25d", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_trued5c463c2", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "emitContext", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "gateway", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +const _bytecode = "0x608060405234801561001057600080fd5b50604051610c62380380610c628339818101604052602081101561003357600080fd5b810190808051906020019092919050505061005e67db84cf13641fc64d60c01b6100c160201b60201c565b61007867d348dcbb9c0cd92f60c01b6100c460201b60201c565b61009267a6589e60a19c054760c01b6100c460201b60201c565b6100ac67e21a8bd3b2ddf20c60c01b6100c460201b60201c565b6100bb816100c760201b60201c565b5061013e565b50565b50565b6100e167b69be6bf736d8c1a60c01b6100c160201b60201c565b6100fb67e18b25fd36211d0160c01b6100c160201b60201c565b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610b158061014d6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80633ca3acf51161005b5780633ca3acf5146101b257806350aa3dff146102115780636d0e778014610270578063c369d5fe1461027a57610088565b80630c4b1a171461008d5780630dacdff0146100d6578063116191b61461011f57806321a5f5da14610153575b600080fd5b6100d4600480360360208110156100a357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506102d9565b005b61011d600480360360208110156100ec57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506102dc565b005b6101276102df565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61019a6004803603602081101561016957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610303565b60405180821515815260200191505060405180910390f35b6101f9600480360360208110156101c857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061030e565b60405180821515815260200191505060405180910390f35b6102586004803603602081101561022757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610319565b60405180821515815260200191505060405180910390f35b610278610320565b005b6102c16004803603602081101561029057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610411565b60405180821515815260200191505060405180910390f35b50565b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b600060019050919050565b6000919050565b61033467c8f11858cc988cef60c01b6102dc565b61034867d940f86af9f49a7260c01b6102dc565b61035c67ba7cb6b8bfe7a9d660c01b6102dc565b7f1b86fe2ccdffbf1a2c71e8eca215369d319e2c66c438a84d666fb2536ffbfb3a610385610418565b61038d610465565b6103956104b2565b604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060405180910390a1565b6000919050565b600061042e67cfc35b626608c6f260c01b6102d9565b610442677e4f9863b1e00bcc60c01b6102d9565b61045667e01fbdbc1b0ec7df60c01b6102d9565b61046060286105d9565b905090565b600061047b6796610338700568e460c01b6102d9565b61048f6736abbbfc9ea4e0bf60c01b6102d9565b6104a3675d0cc2962515b7bc60c01b6102d9565b6104ad60146105d9565b905090565b3660006104c967999df1ebdfac33ae60c01b6102d9565b6104dd6705ff84a8c54035ba60c01b6102d9565b6104f167f3ca01e4e4beffb960c01b6102d9565b36600061050867e933d788eba18b4760c01b6102d9565b61051c6746bb1589faef1d9760c01b6102d9565b61052461076f565b156105755761053d67ffcebb5c797921ae60c01b6102d9565b61055167a80d3e91ff11dbfd60c01b6102d9565b60003660009060286000369050039261056c93929190610ab3565b915091506105a5565b6105896706d79d606ee7be7760c01b6102d9565b61059d676369acbfd1bb4f2660c01b6102d9565b600036915091505b6105b9674369eba1cfe4155560c01b6102d9565b6105cd67e2cad94467be8e9f60c01b6102d9565b81819350935050509091565b60006105ef67ef0225287ba17ba060c01b6102d9565b6106036795958667c898951b60c01b6102d9565b61061767ec06b0be9f42607760c01b6102d9565b600061062d67b7cd17d69da836b660c01b6102d9565b610641671b7ac62a98e22a5460c01b6102d9565b61064961076f565b1561071257610662674b9fe2d527bba60760c01b6102d9565b6106766737f58d18ef197c9060c01b6102d9565b61068a679e0c2e494127333d60c01b6102d9565b60008360003690500390506106a9678767fa9e72b3efac60c01b6102d9565b61070a600036839060148501926106c293929190610ab3565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061094e565b91505061073e565b61072667531fb14624ef4c0060c01b6102d9565b61073a67365aa35b4857b9d560c01b6102d9565b3390505b61075267bb664b7abb1efcc160c01b6102d9565b61076667c66db900ff1468ad60c01b6102d9565b80915050919050565b60006107856718d82ab5ae60310f60c01b6102d9565b61079967b1091fd4002007a760c01b6102d9565b6107ad67e754ffc9cc3865c960c01b6102d9565b60006107c3677ed152cd4162d4dd60c01b6102d9565b6107d767d897cf3d19cf81cd60c01b6102d9565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561090a5761083f677fe0037509e467e160c01b6102d9565b61085367d0b1c04b10d8098a60c01b6102d9565b610867670b92e025f4debba760c01b6102d9565b61087b6739792e98f7fbfdea60c01b6102d9565b602c600036905010156108d9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610ae76022913960400191505060405180910390fd5b6108ed6755c879b00c45b69f60c01b6102d9565b610901679a100b07747e893d60c01b6102d9565b6001905061091f565b61091e6757b90b57dc0a6a0160c01b6102d9565b5b61093367cc41edf636370ef460c01b6102d9565b61094767ff5a153bde944b0360c01b6102d9565b8091505090565b600061096467e937c30ee854c6f460c01b610ab0565b61097867ae40a839349e539460c01b610ab0565b61098c6779ff25ce2e3aef5860c01b610ab0565b60006109a267471a531a4d41d03a60c01b610ab0565b6109b667dbf5cb870bd2bda760c01b610ab0565b6109ca6715ee1c447c585eff60c01b610ab0565b6014835114610a41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f42797465734c69623a20696e76616c69642064617461206c656e67746800000081525060200191505060405180910390fd5b610a5567595b08e56ca2004360c01b610ab0565b610a6967658f3d9a047d9b2b60c01b610ab0565b6c010000000000000000000000006020840151049050610a93670a7d36500000fb3860c01b610ab0565b610aa7678f46d49d645b8e7560c01b610ab0565b80915050919050565b50565b60008085851115610ac357600080fd5b83861115610ad057600080fd5b600185028301915084860390509450949250505056fe47617465776179526563697069656e743a20696e76616c6964206d73672e64617461a164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class GatewayRecipientMock__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(gateway_, overrides) { + return super.deploy(gateway_, overrides || {}); + } + getDeployTransaction(gateway_, overrides) { + return super.getDeployTransaction(gateway_, overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.GatewayRecipientMock__factory = GatewayRecipientMock__factory; +GatewayRecipientMock__factory.bytecode = _bytecode; +GatewayRecipientMock__factory.abi = _abi; diff --git a/dist/typings/factories/GatewayRecipient__factory.d.ts b/dist/typings/factories/GatewayRecipient__factory.d.ts new file mode 100644 index 00000000..0471a6be --- /dev/null +++ b/dist/typings/factories/GatewayRecipient__factory.d.ts @@ -0,0 +1,22 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { GatewayRecipient, GatewayRecipientInterface } from "../GatewayRecipient"; +export declare class GatewayRecipient__factory { + static readonly abi: { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + }[]; + static createInterface(): GatewayRecipientInterface; + static connect(address: string, signerOrProvider: Signer | Provider): GatewayRecipient; +} diff --git a/dist/typings/factories/GatewayRecipient__factory.js b/dist/typings/factories/GatewayRecipient__factory.js new file mode 100644 index 00000000..003e4510 --- /dev/null +++ b/dist/typings/factories/GatewayRecipient__factory.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GatewayRecipient__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_d5c463c2", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_falsed5c463c2", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_trued5c463c2", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "gateway", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +class GatewayRecipient__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.GatewayRecipient__factory = GatewayRecipient__factory; +GatewayRecipient__factory.abi = _abi; diff --git a/dist/typings/factories/Gateway__factory.d.ts b/dist/typings/factories/Gateway__factory.d.ts new file mode 100644 index 00000000..94bccabe --- /dev/null +++ b/dist/typings/factories/Gateway__factory.d.ts @@ -0,0 +1,74 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { Gateway, GatewayInterface } from "../Gateway"; +declare type GatewayConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class Gateway__factory extends ContractFactory { + constructor(...args: GatewayConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): Gateway; + connect(signer: Signer): Gateway__factory; + static readonly bytecode = "0x60806040523480156200001157600080fd5b506200002e675e592fe27197979c60c01b6200014560201b60201c565b6200004a67eca2e4778f3efef360c01b6200014560201b60201c565b326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000a667ce0e365443bb826260c01b6200014860201b60201c565b620000c26783f6a3768f043c5060c01b6200014860201b60201c565b620000de67f7775edf55ee500260c01b6200014860201b60201c565b6000620000fc6799c44ec6f63d8b6d60c01b6200014860201b60201c565b4690506200011b67f60b0de5a48d87f360c01b6200014860201b60201c565b80600181905550506200013f674c884d6f602830a660c01b6200014b60201b60201c565b6200014e565b50565b50565b50565b6134c9806200015e6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80637f130864116100b8578063b5021b161161007c578063b5021b1614610385578063bbd3466c146103a1578063d2c83b9a146103d1578063e831bfba146103ef578063edf092b11461040b578063f92c5f7c1461043b57610142565b80637f130864146102e1578063867519c61461031157806387d313131461032d5780639a8a05921461034b5780639f2556261461036957610142565b8063485cc9551161010a578063485cc955146101fd578063589731f8146102195780635afaa7bb1461024957806373e5a13f146102655780637403056c1461029557806376db2b4c146102b157610142565b80631262ed1c146101475780631812164614610177578063231badaf146101935780632e6afd6e146101af578063392e53cd146101df575b600080fd5b610161600480360381019061015c9190612648565b61046b565b60405161016e9190612f02565b60405180910390f35b610191600480360381019061018c9190612648565b610476565b005b6101ad60048036038101906101a891906124a0565b610479565b005b6101c960048036038101906101c49190612648565b61063c565b6040516101d69190612f02565b60405180910390f35b6101e7610643565b6040516101f49190612f02565b60405180910390f35b61021760048036038101906102129190612671565b6106d6565b005b610233600480360381019061022e9190612648565b61097a565b6040516102409190612f02565b60405180910390f35b610263600480360381019061025e91906125cb565b610981565b005b61027f600480360381019061027a91906126ee565b610dc7565b60405161028c9190612f1d565b60405180910390f35b6102af60048036038101906102aa9190612648565b610e28565b005b6102cb60048036038101906102c691906126ad565b610e2b565b6040516102d89190612f1d565b60405180910390f35b6102fb60048036038101906102f69190612648565b610e91565b6040516103089190612f02565b60405180910390f35b61032b60048036038101906103269190612421565b610e9c565b005b610335610ee9565b6040516103429190612f98565b60405180910390f35b610353610f0f565b6040516103609190613133565b60405180910390f35b610383600480360381019061037e919061255f565b610f15565b005b61039f600480360381019061039a91906124a0565b610f61565b005b6103bb60048036038101906103b69190612648565b611125565b6040516103c89190612f02565b60405180910390f35b6103d9611130565b6040516103e69190612f7d565b60405180910390f35b61040960048036038101906104049190612648565b611156565b005b61042560048036038101906104209190612648565b611159565b6040516104329190612f02565b60405180910390f35b610455600480360381019061045091906123f8565b611160565b6040516104629190613133565b60405180910390f35b600060019050919050565b50565b61048d676037fbcf33ddd98060c01b610e28565b6104a1676039a114b039219260c01b610e28565b6104b567c9d946f389ff09a460c01b610e28565b6104c9677322c84c309ffe1e60c01b610e28565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054841161054a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613013565b60405180910390fd5b61055e67e6caf078c6bdd23f60c01b610e28565b61057267441a497b703ddd3160c01b610e28565b61058667e0aa6e2118e892b260c01b610e28565b60006105a682610598888888886111f8565b61129790919063ffffffff16565b90506105bc67e6ab3e367a27ac9460c01b610e28565b84600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061061467b5347fc0d9e80a4060c01b610e28565b610628672109b1f29f1ab07160c01b610e28565b6106348682868661159f565b505050505050565b6000919050565b60006106596726ed6cc6ca12515c60c01b610476565b61066d67f3fc49482028cbb860c01b610476565b6106816740317a79cae6a3ff60c01b610476565b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b6106ea6717ff0feaed55b96660c01b610e28565b6106fe67b2266613e068a5ae60c01b610476565b610712676a66a63870f964f960c01b610476565b6107266772f22eca890742ba60c01b610476565b61073a67c8ab57d60023f99860c01b610476565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146107c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107bf90612fd3565b60405180910390fd5b6107dc67d31dec9098d614f660c01b610476565b6107f067a184879381a9c67460c01b610476565b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610845675e44e6e1c885710560c01b610476565b61085967444b86e07cea466a60c01b610e28565b61086d67e296b9f7cbb0f26d60c01b610e28565b61088167c83ea7004b045bbb60c01b610e28565b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108d66715eeaa5c79dbc65c60c01b610e28565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061092b6732ca1833e9907bb960c01b610476565b61093f672942130a5b94b82160c01b610476565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e63260405161096e9190612e80565b60405180910390a15050565b6000919050565b6109956782ccccb348cff5a660c01b610e28565b6109a967e48b130b8be6838f60c01b610e28565b6109bd67f7ab97529619630960c01b610e28565b6109d167905db6454bd90fd460c01b610e28565b6000825111610a15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0c90613053565b60405180910390fd5b610a2967a92b1f7ac460110c60c01b610e28565b610a3d67212a744614cfa8ce60c01b610e28565b610a5167927216162781aef360c01b610e28565b6000610a6767a8e8fc7cad1f1aee60c01b610e28565b610a7b67d342d6b51cc3404a60c01b610e28565b60005b8351811015610d0957610a9b679ff4bfb46a2b310560c01b610e28565b610aaf67d9a617b02ae612cb60c01b610e28565b60003073ffffffffffffffffffffffffffffffffffffffff16858381518110610ad457fe5b6020026020010151604051610ae99190612d9c565b6000604051808303816000865af19150503d8060008114610b26576040519150601f19603f3d011682016040523d82523d6000602084013e610b2b565b606091505b50509050610b4367ea7052689fb0eefb60c01b610e28565b610b5767c643fc19ac277e5f60c01b610e28565b8315610c0657610b71676461634cbe224bca60c01b610e28565b610b856793fdb7dbead4baab60c01b610e28565b610b9967e3ab19de5acee7c760c01b610e28565b610bad67a3c7e0a36057732260c01b610e28565b80610bed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be490612ff3565b60405180910390fd5b610c0167d91053b1e6003c8960c01b610e28565b610c85565b610c1a67927bfeed8ca929ab60c01b610e28565b610c2e6718f2eae153eaf4be60c01b610e28565b808015610c39575082155b15610c6f57610c5267055b096b8b62661460c01b610e28565b610c666773be38b70bc2f92960c01b610e28565b60019250610c84565b610c83674403e694c9c62a3b60c01b610e28565b5b5b610c996732f8245938feae4860c01b610e28565b610cad67ed70357ab9b0c18060c01b610e28565b7f361c14722cc344132c73396113f7164232448b09c544a149f09048648b43d87233868481518110610cdb57fe5b602002602001015183604051610cf393929190612e9b565b60405180910390a1508080600101915050610a7e565b50610d1e67a12cce0092cebf2c60c01b610e28565b610d3267f946fbb04792607660c01b610e28565b80610dae57610d4b67b04a883139198c5e60c01b610e28565b610d5f67c11fcbde39e6f94760c01b610e28565b610d7367058e3a721118278460c01b610e28565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da590613113565b60405180910390fd5b610dc2671e4304a67350283360c01b610e28565b505050565b6000610ddd673bb17a50c972802a60c01b610e28565b610df1670916af369d11cac760c01b610e28565b610e05671dd964075f20509460c01b610e28565b610e2182600001518360200151846040015185606001516111f8565b9050919050565b50565b6000610e4167dbe717e9c3242f2860c01b610e28565b610e5567e22d42741a2f534160c01b610e28565b610e69675e86dfda27804a8e60c01b610e28565b610e8a82600001518360200151846040015185606001518660800151611cec565b9050919050565b600060019050919050565b610eb06745622f1250401aa760c01b610e28565b610ec467df8453cb499d849f60c01b610e28565b610ed8679d6f87e4b233699d60c01b610e28565b610ee48333848461159f565b505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b610f2967b820a31fa1fa2a6660c01b610e28565b610f3d67692d54b43173fcac60c01b610e28565b610f51672a66d5a91893b5e860c01b610e28565b610f5d3333848461159f565b5050565b610f7567ecd8929d819bda5f60c01b610e28565b610f89677dbdc4d6fef5fa2760c01b610e28565b610f9d67ab0764dff7e0c90d60c01b610e28565b610fb1675d162cb239250b2660c01b610e28565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102990613013565b60405180910390fd5b611046671f2af619b254154d60c01b610e28565b61105a671244bfb76854209460c01b610e28565b61106e67c8890a1809516e6360c01b610e28565b600061108f82611081888888883a611cec565b61129790919063ffffffff16565b90506110a5673538ad741c8e50ac60c01b610e28565b84600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506110fd67e836e14f49732cb260c01b610e28565b61111167d6c06a389eb6cdd560c01b610e28565b61111d8682868661159f565b505050505050565b600060019050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b50565b6000919050565b600061117667ca1a4ed657f1ad2760c01b610e28565b61118a678058eefa0ede4fd260c01b610e28565b61119e67be9d8892ef3dcd6560c01b610e28565b6111f16001600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8e90919063ffffffff16565b9050919050565b600061120e67a4630994663031ae60c01b610e28565b61122267e2250f8433d572b960c01b610e28565b61123667f08332a59752492660c01b610e28565b61128d7f6848d0622081db2451400280dead7a739a080cb93852607c381af11e289769b286868661126687611e98565b6040516020016112799493929190612cff565b604051602081830303815290604052611fc4565b9050949350505050565b60006112ad67610b12321a07a31960c01b612041565b6112c1670f66a519ee9137b960c01b612041565b6112d567140d9f9935e2385360c01b612041565b60006112eb670bfea895a9f81bec60c01b612041565b6112ff67a8c715ec3b9d89c160c01b612041565b6041835114156115585761131d67101129654a82afeb60c01b612041565b61133167a44405322c11578a60c01b612041565b611345673ae09945b2f5082360c01b612041565b600061135b67900a30e48d0fc7bd60c01b612041565b61136f677d193483635abe1860c01b612041565b600061138567f24e14d594e9077960c01b612041565b61139967a847d7edacf7e00c60c01b612041565b60006113af670bcc457b0963bc0f60c01b612041565b6020860151925060408601519150606086015160001a90506113db6730650d5e99574f3560c01b612041565b6113ef675197804ca644c8a460c01b612041565b601b8160ff16101561142e5761140f6781206cb7a1d9cec760c01b612041565b611423679d0aaefe9954d7fb60c01b612041565b601b81019050611443565b61144267091b6422f681fe5560c01b612041565b5b611457677849785c6ede9b0e60c01b612041565b61146b6732075f7517db825b60c01b612041565b601b8160ff1614801561148e575061148d67638a38da6bf5bb4360c01b612044565b5b806114b85750601c8160ff161480156114b757506114b6671d94865be2a4ed5560c01b612044565b5b5b1561153b576114d167657d88528f4e396b60c01b612041565b6114e5675469679748b05cfe60c01b612041565b600187828585604051600081526020016040526040516115089493929190612f38565b6020604051602081039080840390855afa15801561152a573d6000803e3d6000fd5b505050602060405103519350611550565b61154f67539b701a1f57136860c01b612041565b5b50505061156d565b61156c67f3927173995ed52360c01b612041565b5b61158167303f1b174284648060c01b612041565b61159567c60031985823124160c01b612041565b8091505092915050565b6115b3676441c685d8faa7a360c01b610e28565b6115c767e811f03b00638c6060c01b610e28565b6115db6797e80e85103fcf2b60c01b610e28565b6115ef678ed7421c1c55b76760c01b610e28565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561165f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165690613033565b60405180910390fd5b61167367b86e4c5ffbfa1f9260c01b610e28565b61168767a1d86ad5993c51f660c01b610e28565b61169b67f853434bf6d4db6e60c01b610e28565b6116af67103226e3b6110a4560c01b610e28565b60008251116116f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ea906130f3565b60405180910390fd5b611707676aab01221f16401c60c01b610e28565b61171b671abd188806007e5c60c01b610e28565b61172f679b5db059de5da2f160c01b610e28565b61174367fab88e3c9269e27e60c01b610e28565b8151815114611787576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161177e90613093565b60405180910390fd5b61179b670e3e5fe530153f0560c01b610e28565b6117af67113457a486265d4060c01b610e28565b6117c367b0dcb375ecbd219860c01b610e28565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614611a375761180a67cb4050c8a8fd4b7560c01b610e28565b61181e675433735c08cdca4860c01b610e28565b6118326762332fcf03134a8f60c01b610e28565b611846674db3b4f9358bba7d60c01b610e28565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b81526004016118a3929190612ed9565b60206040518083038186803b1580156118bb57600080fd5b505afa1580156118cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f3919061261f565b801561190f575061190e67a6a5bc33fad6252e60c01b611125565b5b806119df5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b8152600401611972929190612ed9565b60206040518083038186803b15801561198a57600080fd5b505afa15801561199e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c2919061261f565b80156119de57506119dd671c01f6c1033e769060c01b611125565b5b5b611a1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1590613073565b60405180910390fd5b611a3267d319390135e6afc660c01b610e28565b611a4c565b611a4b67b2175f09c9cd559660c01b610e28565b5b611a6067dda4cd65db6114a060c01b610e28565b611a7467b4b215aa3cbb538660c01b610e28565b6000611a8a67ad6b1f83e0750b7660c01b610e28565b611a9e67055365486ef69fbd60c01b610e28565b60005b8251811015611ce457611abe67a665168fe839ce7760c01b610e28565b611ad267776afe1da2b1539e60c01b610e28565b611ae66740a5a5c53bf0a7f560c01b610e28565b600073ffffffffffffffffffffffffffffffffffffffff16848281518110611b0a57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415611b69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6090612fb3565b60405180910390fd5b611b7d673c083406643e788660c01b610e28565b611b91676c0c4e090ccd795f60c01b610e28565b838181518110611b9d57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16838281518110611bc757fe5b60200260200101518787604051602001611be393929190612db3565b604051602081830303815290604052604051611bff9190612d9c565b6000604051808303816000865af19150503d8060008114611c3c576040519150601f19603f3d011682016040523d82523d6000602084013e611c41565b606091505b505080925050611c5b6718224efc758b205b60c01b610e28565b611c6f67910d8295aec7430460c01b610e28565b611c83671d77a3f5dc76d8d660c01b610e28565b81611cc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cba906130b3565b60405180910390fd5b611cd7679b7cc0a02a0e652560c01b610e28565b8080600101915050611aa1565b505050505050565b6000611d0267b6508e3469729c9660c01b610e28565b611d1667191df4545eed857160c01b610e28565b611d2a67281f6891bffc1fcf60c01b610e28565b611d837f6f4e1b2b1e5e49f4269e19e16e67a00cb0a796d96d30be3e4b540d3732e8bcad878787611d5a88611e98565b87604051602001611d6f959493929190612d45565b604051602081830303815290604052611fc4565b905095945050505050565b6000611da467c86b29cadf0259cc60c01b61204f565b611db8671cf2fd19ce80bc6460c01b61204f565b611dcc67084e3d10c702b08960c01b61204f565b60008284019050611de7678715f5819eec045d60c01b61204f565b611dfb67389bd6f3088f8ddc60c01b61204f565b611e0f67395edfe58ce67c0160c01b61204f565b83811015611e52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e49906130d3565b60405180910390fd5b611e6667112f71c9280eda0a60c01b61204f565b611e7a673364fede1fdbaa8a60c01b61204f565b611e8e6709a89731fdc49fbb60c01b61204f565b8091505092915050565b6060611eae674bd996d68c1eb10660c01b610e28565b611ec267cd2d128c0566b51260c01b610e28565b611ed667ba92d2c3a98af2f860c01b610e28565b6060611eec67bcbbc9fd7986889360c01b610e28565b611f006713993dbf4299296760c01b610e28565b600083519050611f1a6703fe5b6118f240f360c01b610e28565b611f2e67a47d7a84cf918ad560c01b610e28565b60005b81811015611f9157611f4d672503e865687cdedf60c01b610e28565b82858281518110611f5a57fe5b6020026020010151604051602001611f73929190612dec565b60405160208183030381529060405292508080600101915050611f31565b50611fa667d4e20fbf77660b3e60c01b610e28565b611fba67e514d53d98e4333660c01b610e28565b8192505050919050565b6000611fda677f88a34eed9bb47260c01b611156565b611fee6749bb13c5d53bb9db60c01b611156565b6120026721a77fc5a306172f60c01b611156565b61203960015430858560405160200161201e9493929190612e36565b60405160208183030381529060405280519060200120612052565b905092915050565b50565b600060019050919050565b50565b600061206867cb1f58f8e99e701160c01b612041565b61207c67477dbcabce0c716f60c01b612041565b61209067c58144008cda6be160c01b612041565b816040516020016120a19190612e10565b604051602081830303815290604052805190602001209050919050565b6000813590506120cd81613432565b92915050565b600082601f8301126120e457600080fd5b81356120f76120f28261317b565b61314e565b9150818183526020840193506020810190508385602084028201111561211c57600080fd5b60005b8381101561214c578161213288826120be565b84526020840193506020830192505060018101905061211f565b5050505092915050565b600082601f83011261216757600080fd5b813561217a612175826131a3565b61314e565b9150818183526020840193506020810190508360005b838110156121c057813586016121a68882612209565b845260208401935060208301925050600181019050612190565b5050505092915050565b6000813590506121d981613449565b92915050565b6000815190506121ee81613449565b92915050565b60008135905061220381613460565b92915050565b600082601f83011261221a57600080fd5b813561222d612228826131cb565b61314e565b9150808252602083016020830185838301111561224957600080fd5b61225483828461339a565b50505092915050565b60008135905061226c81613477565b92915050565b6000813590506122818161348e565b92915050565b600060a0828403121561229957600080fd5b6122a360a061314e565b905060006122b3848285016120be565b60008301525060206122c7848285016123e3565b602083015250604082013567ffffffffffffffff8111156122e757600080fd5b6122f3848285016120d3565b604083015250606082013567ffffffffffffffff81111561231357600080fd5b61231f84828501612156565b6060830152506080612333848285016123e3565b60808301525092915050565b60006080828403121561235157600080fd5b61235b608061314e565b9050600061236b848285016120be565b600083015250602061237f848285016123e3565b602083015250604082013567ffffffffffffffff81111561239f57600080fd5b6123ab848285016120d3565b604083015250606082013567ffffffffffffffff8111156123cb57600080fd5b6123d784828501612156565b60608301525092915050565b6000813590506123f2816134a5565b92915050565b60006020828403121561240a57600080fd5b6000612418848285016120be565b91505092915050565b60008060006060848603121561243657600080fd5b6000612444868287016120be565b935050602084013567ffffffffffffffff81111561246157600080fd5b61246d868287016120d3565b925050604084013567ffffffffffffffff81111561248a57600080fd5b61249686828701612156565b9150509250925092565b600080600080600060a086880312156124b857600080fd5b60006124c6888289016120be565b95505060206124d7888289016123e3565b945050604086013567ffffffffffffffff8111156124f457600080fd5b612500888289016120d3565b935050606086013567ffffffffffffffff81111561251d57600080fd5b61252988828901612156565b925050608086013567ffffffffffffffff81111561254657600080fd5b61255288828901612209565b9150509295509295909350565b6000806040838503121561257257600080fd5b600083013567ffffffffffffffff81111561258c57600080fd5b612598858286016120d3565b925050602083013567ffffffffffffffff8111156125b557600080fd5b6125c185828601612156565b9150509250929050565b600080604083850312156125de57600080fd5b600083013567ffffffffffffffff8111156125f857600080fd5b61260485828601612156565b9250506020612615858286016121ca565b9150509250929050565b60006020828403121561263157600080fd5b600061263f848285016121df565b91505092915050565b60006020828403121561265a57600080fd5b6000612668848285016121f4565b91505092915050565b6000806040838503121561268457600080fd5b60006126928582860161225d565b92505060206126a385828601612272565b9150509250929050565b6000602082840312156126bf57600080fd5b600082013567ffffffffffffffff8111156126d957600080fd5b6126e584828501612287565b91505092915050565b60006020828403121561270057600080fd5b600082013567ffffffffffffffff81111561271a57600080fd5b6127268482850161233f565b91505092915050565b600061273b8383612765565b60208301905092915050565b6127508161331c565b82525050565b61275f8161326d565b82525050565b61276e8161326d565b82525050565b6127856127808261326d565b6133dc565b82525050565b600061279682613207565b6127a0818561322a565b93506127ab836131f7565b8060005b838110156127dc5781516127c3888261272f565b97506127ce8361321d565b9250506001810190506127af565b5085935050505092915050565b6127f28161327f565b82525050565b6128018161328b565b82525050565b6128186128138261328b565b6133ee565b82525050565b600061282982613212565b6128338185613235565b93506128438185602086016133a9565b61284c81613414565b840191505092915050565b600061286282613212565b61286c8185613246565b935061287c8185602086016133a9565b80840191505092915050565b6128918161332e565b82525050565b6128a081613352565b82525050565b60006128b3601b83613251565b91507f476174657761793a2063616e6e6f742073656e6420746f2030783000000000006000830152602082019050919050565b60006128f3601c83613262565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b6000612933602f83613251565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b6000612999601783613251565b91507f476174657761793a2062617463682072657665727465640000000000000000006000830152602082019050919050565b60006129d9603283613251565b91507f476174657761793a206e6f6e6365206973206c6f776572207468616e2063757260008301527f72656e74206163636f756e74206e6f6e636500000000000000000000000000006020830152604082019050919050565b6000612a3f602583613251565b91507f476174657761793a2063616e6e6f742073656e642066726f6d2030783020616360008301527f636f756e740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612aa5602683613251565b91507f476174657761793a2063616e6e6f742064656c656761746520656d707479206260008301527f61746368657300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612b0b602883613251565b91507f476174657761793a2073656e646572206973206e6f7420746865206163636f7560008301527f6e74206f776e65720000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612b71601683613251565b91507f476174657761793a20696e76616c6964206261746368000000000000000000006000830152602082019050919050565b6000612bb1602383613251565b91507f476174657761793a206261746368207472616e73616374696f6e20726576657260008301527f74656400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612c17601e83613251565b91507f536166654d6174684c69623a206164646974696f6e206f766572666c6f7700006000830152602082019050919050565b6000612c57602083613251565b91507f476174657761793a2063616e6e6f742073656e6420656d7074792062617463686000830152602082019050919050565b6000612c97601d83613251565b91507f476174657761793a20616c6c20626174636865732072657665727465640000006000830152602082019050919050565b612cd381613305565b82525050565b612cea612ce582613305565b61340a565b82525050565b612cf98161330f565b82525050565b6000612d0b8287612774565b601482019150612d1b8286612cd9565b602082019150612d2b828561278b565b9150612d378284612857565b915081905095945050505050565b6000612d518288612774565b601482019150612d618287612cd9565b602082019150612d71828661278b565b9150612d7d8285612857565b9150612d898284612cd9565b6020820191508190509695505050505050565b6000612da88284612857565b915081905092915050565b6000612dbf8286612857565b9150612dcb8285612774565b601482019150612ddb8284612774565b601482019150819050949350505050565b6000612df88285612857565b9150612e048284612857565b91508190509392505050565b6000612e1b826128e6565b9150612e278284612807565b60208201915081905092915050565b6000612e428287612cd9565b602082019150612e528286612774565b601482019150612e628285612807565b602082019150612e728284612857565b915081905095945050505050565b6000602082019050612e956000830184612747565b92915050565b6000606082019050612eb06000830186612747565b8181036020830152612ec2818561281e565b9050612ed160408301846127e9565b949350505050565b6000604082019050612eee6000830185612756565b612efb6020830184612756565b9392505050565b6000602082019050612f1760008301846127e9565b92915050565b6000602082019050612f3260008301846127f8565b92915050565b6000608082019050612f4d60008301876127f8565b612f5a6020830186612cf0565b612f6760408301856127f8565b612f7460608301846127f8565b95945050505050565b6000602082019050612f926000830184612888565b92915050565b6000602082019050612fad6000830184612897565b92915050565b60006020820190508181036000830152612fcc816128a6565b9050919050565b60006020820190508181036000830152612fec81612926565b9050919050565b6000602082019050818103600083015261300c8161298c565b9050919050565b6000602082019050818103600083015261302c816129cc565b9050919050565b6000602082019050818103600083015261304c81612a32565b9050919050565b6000602082019050818103600083015261306c81612a98565b9050919050565b6000602082019050818103600083015261308c81612afe565b9050919050565b600060208201905081810360008301526130ac81612b64565b9050919050565b600060208201905081810360008301526130cc81612ba4565b9050919050565b600060208201905081810360008301526130ec81612c0a565b9050919050565b6000602082019050818103600083015261310c81612c4a565b9050919050565b6000602082019050818103600083015261312c81612c8a565b9050919050565b60006020820190506131486000830184612cca565b92915050565b6000604051905081810181811067ffffffffffffffff8211171561317157600080fd5b8060405250919050565b600067ffffffffffffffff82111561319257600080fd5b602082029050602081019050919050565b600067ffffffffffffffff8211156131ba57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff8211156131e257600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000613278826132e5565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffffffffffff00000000000000000000000000000000000000000000000082169050919050565b60006132cc8261326d565b9050919050565b60006132de8261326d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332782613376565b9050919050565b600061333982613340565b9050919050565b600061334b826132e5565b9050919050565b600061335d82613364565b9050919050565b600061336f826132e5565b9050919050565b600061338182613388565b9050919050565b6000613393826132e5565b9050919050565b82818337600083830152505050565b60005b838110156133c75780820151818401526020810190506133ac565b838111156133d6576000848401525b50505050565b60006133e7826133f8565b9050919050565b6000819050919050565b600061340382613425565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61343b8161326d565b811461344657600080fd5b50565b6134528161327f565b811461345d57600080fd5b50565b61346981613295565b811461347457600080fd5b50565b613480816132c1565b811461348b57600080fd5b50565b613497816132d3565b81146134a257600080fd5b50565b6134ae81613305565b81146134b957600080fd5b5056fea164736f6c634300060c000a"; + static readonly abi: ({ + inputs: any[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + } | { + inputs: { + components: { + internalType: string; + name: string; + type: string; + }[]; + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): GatewayInterface; + static connect(address: string, signerOrProvider: Signer | Provider): Gateway; +} +export {}; diff --git a/dist/typings/factories/Gateway__factory.js b/dist/typings/factories/Gateway__factory.js new file mode 100644 index 00000000..968639c0 --- /dev/null +++ b/dist/typings/factories/Gateway__factory.js @@ -0,0 +1,536 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Gateway__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "bytes", + name: "batch", + type: "bytes", + }, + { + indexed: false, + internalType: "bool", + name: "succeeded", + type: "bool", + }, + ], + name: "BatchDelegated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "initializer", + type: "address", + }, + ], + name: "Initialized", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__1b54acf3", + type: "bytes8", + }, + ], + name: "c_1b54acf3", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_c0828b70", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__db9228d3", + type: "bytes8", + }, + ], + name: "c_db9228d3", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__1b54acf3", + type: "bytes8", + }, + ], + name: "c_false1b54acf3", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_falsec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__db9228d3", + type: "bytes8", + }, + ], + name: "c_falsedb9228d3", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__1b54acf3", + type: "bytes8", + }, + ], + name: "c_true1b54acf3", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_truec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__db9228d3", + type: "bytes8", + }, + ], + name: "c_truedb9228d3", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "chainId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "address[]", + name: "to", + type: "address[]", + }, + { + internalType: "bytes[]", + name: "data", + type: "bytes[]", + }, + { + internalType: "bytes", + name: "senderSignature", + type: "bytes", + }, + ], + name: "delegateBatch", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "address[]", + name: "to", + type: "address[]", + }, + { + internalType: "bytes[]", + name: "data", + type: "bytes[]", + }, + { + internalType: "bytes", + name: "senderSignature", + type: "bytes", + }, + ], + name: "delegateBatchWithGasPrice", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes[]", + name: "batches", + type: "bytes[]", + }, + { + internalType: "bool", + name: "revertOnFailure", + type: "bool", + }, + ], + name: "delegateBatches", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "externalAccountRegistry", + outputs: [ + { + internalType: "contract ExternalAccountRegistry", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "getAccountNextNonce", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "address[]", + name: "to", + type: "address[]", + }, + { + internalType: "bytes[]", + name: "data", + type: "bytes[]", + }, + ], + internalType: "struct Gateway.DelegatedBatch", + name: "delegatedBatch", + type: "tuple", + }, + ], + name: "hashDelegatedBatch", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "address[]", + name: "to", + type: "address[]", + }, + { + internalType: "bytes[]", + name: "data", + type: "bytes[]", + }, + { + internalType: "uint256", + name: "gasPrice", + type: "uint256", + }, + ], + internalType: "struct Gateway.DelegatedBatchWithGasPrice", + name: "delegatedBatch", + type: "tuple", + }, + ], + name: "hashDelegatedBatchWithGasPrice", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ExternalAccountRegistry", + name: "externalAccountRegistry_", + type: "address", + }, + { + internalType: "contract PersonalAccountRegistry", + name: "personalAccountRegistry_", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isInitialized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "personalAccountRegistry", + outputs: [ + { + internalType: "contract PersonalAccountRegistry", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "to", + type: "address[]", + }, + { + internalType: "bytes[]", + name: "data", + type: "bytes[]", + }, + ], + name: "sendBatch", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address[]", + name: "to", + type: "address[]", + }, + { + internalType: "bytes[]", + name: "data", + type: "bytes[]", + }, + ], + name: "sendBatchFromAccount", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; +const _bytecode = "0x60806040523480156200001157600080fd5b506200002e675e592fe27197979c60c01b6200014560201b60201c565b6200004a67eca2e4778f3efef360c01b6200014560201b60201c565b326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000a667ce0e365443bb826260c01b6200014860201b60201c565b620000c26783f6a3768f043c5060c01b6200014860201b60201c565b620000de67f7775edf55ee500260c01b6200014860201b60201c565b6000620000fc6799c44ec6f63d8b6d60c01b6200014860201b60201c565b4690506200011b67f60b0de5a48d87f360c01b6200014860201b60201c565b80600181905550506200013f674c884d6f602830a660c01b6200014b60201b60201c565b6200014e565b50565b50565b50565b6134c9806200015e6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80637f130864116100b8578063b5021b161161007c578063b5021b1614610385578063bbd3466c146103a1578063d2c83b9a146103d1578063e831bfba146103ef578063edf092b11461040b578063f92c5f7c1461043b57610142565b80637f130864146102e1578063867519c61461031157806387d313131461032d5780639a8a05921461034b5780639f2556261461036957610142565b8063485cc9551161010a578063485cc955146101fd578063589731f8146102195780635afaa7bb1461024957806373e5a13f146102655780637403056c1461029557806376db2b4c146102b157610142565b80631262ed1c146101475780631812164614610177578063231badaf146101935780632e6afd6e146101af578063392e53cd146101df575b600080fd5b610161600480360381019061015c9190612648565b61046b565b60405161016e9190612f02565b60405180910390f35b610191600480360381019061018c9190612648565b610476565b005b6101ad60048036038101906101a891906124a0565b610479565b005b6101c960048036038101906101c49190612648565b61063c565b6040516101d69190612f02565b60405180910390f35b6101e7610643565b6040516101f49190612f02565b60405180910390f35b61021760048036038101906102129190612671565b6106d6565b005b610233600480360381019061022e9190612648565b61097a565b6040516102409190612f02565b60405180910390f35b610263600480360381019061025e91906125cb565b610981565b005b61027f600480360381019061027a91906126ee565b610dc7565b60405161028c9190612f1d565b60405180910390f35b6102af60048036038101906102aa9190612648565b610e28565b005b6102cb60048036038101906102c691906126ad565b610e2b565b6040516102d89190612f1d565b60405180910390f35b6102fb60048036038101906102f69190612648565b610e91565b6040516103089190612f02565b60405180910390f35b61032b60048036038101906103269190612421565b610e9c565b005b610335610ee9565b6040516103429190612f98565b60405180910390f35b610353610f0f565b6040516103609190613133565b60405180910390f35b610383600480360381019061037e919061255f565b610f15565b005b61039f600480360381019061039a91906124a0565b610f61565b005b6103bb60048036038101906103b69190612648565b611125565b6040516103c89190612f02565b60405180910390f35b6103d9611130565b6040516103e69190612f7d565b60405180910390f35b61040960048036038101906104049190612648565b611156565b005b61042560048036038101906104209190612648565b611159565b6040516104329190612f02565b60405180910390f35b610455600480360381019061045091906123f8565b611160565b6040516104629190613133565b60405180910390f35b600060019050919050565b50565b61048d676037fbcf33ddd98060c01b610e28565b6104a1676039a114b039219260c01b610e28565b6104b567c9d946f389ff09a460c01b610e28565b6104c9677322c84c309ffe1e60c01b610e28565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054841161054a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054190613013565b60405180910390fd5b61055e67e6caf078c6bdd23f60c01b610e28565b61057267441a497b703ddd3160c01b610e28565b61058667e0aa6e2118e892b260c01b610e28565b60006105a682610598888888886111f8565b61129790919063ffffffff16565b90506105bc67e6ab3e367a27ac9460c01b610e28565b84600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061061467b5347fc0d9e80a4060c01b610e28565b610628672109b1f29f1ab07160c01b610e28565b6106348682868661159f565b505050505050565b6000919050565b60006106596726ed6cc6ca12515c60c01b610476565b61066d67f3fc49482028cbb860c01b610476565b6106816740317a79cae6a3ff60c01b610476565b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b6106ea6717ff0feaed55b96660c01b610e28565b6106fe67b2266613e068a5ae60c01b610476565b610712676a66a63870f964f960c01b610476565b6107266772f22eca890742ba60c01b610476565b61073a67c8ab57d60023f99860c01b610476565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16146107c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107bf90612fd3565b60405180910390fd5b6107dc67d31dec9098d614f660c01b610476565b6107f067a184879381a9c67460c01b610476565b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610845675e44e6e1c885710560c01b610476565b61085967444b86e07cea466a60c01b610e28565b61086d67e296b9f7cbb0f26d60c01b610e28565b61088167c83ea7004b045bbb60c01b610e28565b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108d66715eeaa5c79dbc65c60c01b610e28565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061092b6732ca1833e9907bb960c01b610476565b61093f672942130a5b94b82160c01b610476565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e63260405161096e9190612e80565b60405180910390a15050565b6000919050565b6109956782ccccb348cff5a660c01b610e28565b6109a967e48b130b8be6838f60c01b610e28565b6109bd67f7ab97529619630960c01b610e28565b6109d167905db6454bd90fd460c01b610e28565b6000825111610a15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0c90613053565b60405180910390fd5b610a2967a92b1f7ac460110c60c01b610e28565b610a3d67212a744614cfa8ce60c01b610e28565b610a5167927216162781aef360c01b610e28565b6000610a6767a8e8fc7cad1f1aee60c01b610e28565b610a7b67d342d6b51cc3404a60c01b610e28565b60005b8351811015610d0957610a9b679ff4bfb46a2b310560c01b610e28565b610aaf67d9a617b02ae612cb60c01b610e28565b60003073ffffffffffffffffffffffffffffffffffffffff16858381518110610ad457fe5b6020026020010151604051610ae99190612d9c565b6000604051808303816000865af19150503d8060008114610b26576040519150601f19603f3d011682016040523d82523d6000602084013e610b2b565b606091505b50509050610b4367ea7052689fb0eefb60c01b610e28565b610b5767c643fc19ac277e5f60c01b610e28565b8315610c0657610b71676461634cbe224bca60c01b610e28565b610b856793fdb7dbead4baab60c01b610e28565b610b9967e3ab19de5acee7c760c01b610e28565b610bad67a3c7e0a36057732260c01b610e28565b80610bed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be490612ff3565b60405180910390fd5b610c0167d91053b1e6003c8960c01b610e28565b610c85565b610c1a67927bfeed8ca929ab60c01b610e28565b610c2e6718f2eae153eaf4be60c01b610e28565b808015610c39575082155b15610c6f57610c5267055b096b8b62661460c01b610e28565b610c666773be38b70bc2f92960c01b610e28565b60019250610c84565b610c83674403e694c9c62a3b60c01b610e28565b5b5b610c996732f8245938feae4860c01b610e28565b610cad67ed70357ab9b0c18060c01b610e28565b7f361c14722cc344132c73396113f7164232448b09c544a149f09048648b43d87233868481518110610cdb57fe5b602002602001015183604051610cf393929190612e9b565b60405180910390a1508080600101915050610a7e565b50610d1e67a12cce0092cebf2c60c01b610e28565b610d3267f946fbb04792607660c01b610e28565b80610dae57610d4b67b04a883139198c5e60c01b610e28565b610d5f67c11fcbde39e6f94760c01b610e28565b610d7367058e3a721118278460c01b610e28565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da590613113565b60405180910390fd5b610dc2671e4304a67350283360c01b610e28565b505050565b6000610ddd673bb17a50c972802a60c01b610e28565b610df1670916af369d11cac760c01b610e28565b610e05671dd964075f20509460c01b610e28565b610e2182600001518360200151846040015185606001516111f8565b9050919050565b50565b6000610e4167dbe717e9c3242f2860c01b610e28565b610e5567e22d42741a2f534160c01b610e28565b610e69675e86dfda27804a8e60c01b610e28565b610e8a82600001518360200151846040015185606001518660800151611cec565b9050919050565b600060019050919050565b610eb06745622f1250401aa760c01b610e28565b610ec467df8453cb499d849f60c01b610e28565b610ed8679d6f87e4b233699d60c01b610e28565b610ee48333848461159f565b505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b610f2967b820a31fa1fa2a6660c01b610e28565b610f3d67692d54b43173fcac60c01b610e28565b610f51672a66d5a91893b5e860c01b610e28565b610f5d3333848461159f565b5050565b610f7567ecd8929d819bda5f60c01b610e28565b610f89677dbdc4d6fef5fa2760c01b610e28565b610f9d67ab0764dff7e0c90d60c01b610e28565b610fb1675d162cb239250b2660c01b610e28565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102990613013565b60405180910390fd5b611046671f2af619b254154d60c01b610e28565b61105a671244bfb76854209460c01b610e28565b61106e67c8890a1809516e6360c01b610e28565b600061108f82611081888888883a611cec565b61129790919063ffffffff16565b90506110a5673538ad741c8e50ac60c01b610e28565b84600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506110fd67e836e14f49732cb260c01b610e28565b61111167d6c06a389eb6cdd560c01b610e28565b61111d8682868661159f565b505050505050565b600060019050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b50565b6000919050565b600061117667ca1a4ed657f1ad2760c01b610e28565b61118a678058eefa0ede4fd260c01b610e28565b61119e67be9d8892ef3dcd6560c01b610e28565b6111f16001600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8e90919063ffffffff16565b9050919050565b600061120e67a4630994663031ae60c01b610e28565b61122267e2250f8433d572b960c01b610e28565b61123667f08332a59752492660c01b610e28565b61128d7f6848d0622081db2451400280dead7a739a080cb93852607c381af11e289769b286868661126687611e98565b6040516020016112799493929190612cff565b604051602081830303815290604052611fc4565b9050949350505050565b60006112ad67610b12321a07a31960c01b612041565b6112c1670f66a519ee9137b960c01b612041565b6112d567140d9f9935e2385360c01b612041565b60006112eb670bfea895a9f81bec60c01b612041565b6112ff67a8c715ec3b9d89c160c01b612041565b6041835114156115585761131d67101129654a82afeb60c01b612041565b61133167a44405322c11578a60c01b612041565b611345673ae09945b2f5082360c01b612041565b600061135b67900a30e48d0fc7bd60c01b612041565b61136f677d193483635abe1860c01b612041565b600061138567f24e14d594e9077960c01b612041565b61139967a847d7edacf7e00c60c01b612041565b60006113af670bcc457b0963bc0f60c01b612041565b6020860151925060408601519150606086015160001a90506113db6730650d5e99574f3560c01b612041565b6113ef675197804ca644c8a460c01b612041565b601b8160ff16101561142e5761140f6781206cb7a1d9cec760c01b612041565b611423679d0aaefe9954d7fb60c01b612041565b601b81019050611443565b61144267091b6422f681fe5560c01b612041565b5b611457677849785c6ede9b0e60c01b612041565b61146b6732075f7517db825b60c01b612041565b601b8160ff1614801561148e575061148d67638a38da6bf5bb4360c01b612044565b5b806114b85750601c8160ff161480156114b757506114b6671d94865be2a4ed5560c01b612044565b5b5b1561153b576114d167657d88528f4e396b60c01b612041565b6114e5675469679748b05cfe60c01b612041565b600187828585604051600081526020016040526040516115089493929190612f38565b6020604051602081039080840390855afa15801561152a573d6000803e3d6000fd5b505050602060405103519350611550565b61154f67539b701a1f57136860c01b612041565b5b50505061156d565b61156c67f3927173995ed52360c01b612041565b5b61158167303f1b174284648060c01b612041565b61159567c60031985823124160c01b612041565b8091505092915050565b6115b3676441c685d8faa7a360c01b610e28565b6115c767e811f03b00638c6060c01b610e28565b6115db6797e80e85103fcf2b60c01b610e28565b6115ef678ed7421c1c55b76760c01b610e28565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561165f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165690613033565b60405180910390fd5b61167367b86e4c5ffbfa1f9260c01b610e28565b61168767a1d86ad5993c51f660c01b610e28565b61169b67f853434bf6d4db6e60c01b610e28565b6116af67103226e3b6110a4560c01b610e28565b60008251116116f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ea906130f3565b60405180910390fd5b611707676aab01221f16401c60c01b610e28565b61171b671abd188806007e5c60c01b610e28565b61172f679b5db059de5da2f160c01b610e28565b61174367fab88e3c9269e27e60c01b610e28565b8151815114611787576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161177e90613093565b60405180910390fd5b61179b670e3e5fe530153f0560c01b610e28565b6117af67113457a486265d4060c01b610e28565b6117c367b0dcb375ecbd219860c01b610e28565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614611a375761180a67cb4050c8a8fd4b7560c01b610e28565b61181e675433735c08cdca4860c01b610e28565b6118326762332fcf03134a8f60c01b610e28565b611846674db3b4f9358bba7d60c01b610e28565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b81526004016118a3929190612ed9565b60206040518083038186803b1580156118bb57600080fd5b505afa1580156118cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f3919061261f565b801561190f575061190e67a6a5bc33fad6252e60c01b611125565b5b806119df5750600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb890d3f85856040518363ffffffff1660e01b8152600401611972929190612ed9565b60206040518083038186803b15801561198a57600080fd5b505afa15801561199e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c2919061261f565b80156119de57506119dd671c01f6c1033e769060c01b611125565b5b5b611a1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1590613073565b60405180910390fd5b611a3267d319390135e6afc660c01b610e28565b611a4c565b611a4b67b2175f09c9cd559660c01b610e28565b5b611a6067dda4cd65db6114a060c01b610e28565b611a7467b4b215aa3cbb538660c01b610e28565b6000611a8a67ad6b1f83e0750b7660c01b610e28565b611a9e67055365486ef69fbd60c01b610e28565b60005b8251811015611ce457611abe67a665168fe839ce7760c01b610e28565b611ad267776afe1da2b1539e60c01b610e28565b611ae66740a5a5c53bf0a7f560c01b610e28565b600073ffffffffffffffffffffffffffffffffffffffff16848281518110611b0a57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415611b69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6090612fb3565b60405180910390fd5b611b7d673c083406643e788660c01b610e28565b611b91676c0c4e090ccd795f60c01b610e28565b838181518110611b9d57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16838281518110611bc757fe5b60200260200101518787604051602001611be393929190612db3565b604051602081830303815290604052604051611bff9190612d9c565b6000604051808303816000865af19150503d8060008114611c3c576040519150601f19603f3d011682016040523d82523d6000602084013e611c41565b606091505b505080925050611c5b6718224efc758b205b60c01b610e28565b611c6f67910d8295aec7430460c01b610e28565b611c83671d77a3f5dc76d8d660c01b610e28565b81611cc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cba906130b3565b60405180910390fd5b611cd7679b7cc0a02a0e652560c01b610e28565b8080600101915050611aa1565b505050505050565b6000611d0267b6508e3469729c9660c01b610e28565b611d1667191df4545eed857160c01b610e28565b611d2a67281f6891bffc1fcf60c01b610e28565b611d837f6f4e1b2b1e5e49f4269e19e16e67a00cb0a796d96d30be3e4b540d3732e8bcad878787611d5a88611e98565b87604051602001611d6f959493929190612d45565b604051602081830303815290604052611fc4565b905095945050505050565b6000611da467c86b29cadf0259cc60c01b61204f565b611db8671cf2fd19ce80bc6460c01b61204f565b611dcc67084e3d10c702b08960c01b61204f565b60008284019050611de7678715f5819eec045d60c01b61204f565b611dfb67389bd6f3088f8ddc60c01b61204f565b611e0f67395edfe58ce67c0160c01b61204f565b83811015611e52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e49906130d3565b60405180910390fd5b611e6667112f71c9280eda0a60c01b61204f565b611e7a673364fede1fdbaa8a60c01b61204f565b611e8e6709a89731fdc49fbb60c01b61204f565b8091505092915050565b6060611eae674bd996d68c1eb10660c01b610e28565b611ec267cd2d128c0566b51260c01b610e28565b611ed667ba92d2c3a98af2f860c01b610e28565b6060611eec67bcbbc9fd7986889360c01b610e28565b611f006713993dbf4299296760c01b610e28565b600083519050611f1a6703fe5b6118f240f360c01b610e28565b611f2e67a47d7a84cf918ad560c01b610e28565b60005b81811015611f9157611f4d672503e865687cdedf60c01b610e28565b82858281518110611f5a57fe5b6020026020010151604051602001611f73929190612dec565b60405160208183030381529060405292508080600101915050611f31565b50611fa667d4e20fbf77660b3e60c01b610e28565b611fba67e514d53d98e4333660c01b610e28565b8192505050919050565b6000611fda677f88a34eed9bb47260c01b611156565b611fee6749bb13c5d53bb9db60c01b611156565b6120026721a77fc5a306172f60c01b611156565b61203960015430858560405160200161201e9493929190612e36565b60405160208183030381529060405280519060200120612052565b905092915050565b50565b600060019050919050565b50565b600061206867cb1f58f8e99e701160c01b612041565b61207c67477dbcabce0c716f60c01b612041565b61209067c58144008cda6be160c01b612041565b816040516020016120a19190612e10565b604051602081830303815290604052805190602001209050919050565b6000813590506120cd81613432565b92915050565b600082601f8301126120e457600080fd5b81356120f76120f28261317b565b61314e565b9150818183526020840193506020810190508385602084028201111561211c57600080fd5b60005b8381101561214c578161213288826120be565b84526020840193506020830192505060018101905061211f565b5050505092915050565b600082601f83011261216757600080fd5b813561217a612175826131a3565b61314e565b9150818183526020840193506020810190508360005b838110156121c057813586016121a68882612209565b845260208401935060208301925050600181019050612190565b5050505092915050565b6000813590506121d981613449565b92915050565b6000815190506121ee81613449565b92915050565b60008135905061220381613460565b92915050565b600082601f83011261221a57600080fd5b813561222d612228826131cb565b61314e565b9150808252602083016020830185838301111561224957600080fd5b61225483828461339a565b50505092915050565b60008135905061226c81613477565b92915050565b6000813590506122818161348e565b92915050565b600060a0828403121561229957600080fd5b6122a360a061314e565b905060006122b3848285016120be565b60008301525060206122c7848285016123e3565b602083015250604082013567ffffffffffffffff8111156122e757600080fd5b6122f3848285016120d3565b604083015250606082013567ffffffffffffffff81111561231357600080fd5b61231f84828501612156565b6060830152506080612333848285016123e3565b60808301525092915050565b60006080828403121561235157600080fd5b61235b608061314e565b9050600061236b848285016120be565b600083015250602061237f848285016123e3565b602083015250604082013567ffffffffffffffff81111561239f57600080fd5b6123ab848285016120d3565b604083015250606082013567ffffffffffffffff8111156123cb57600080fd5b6123d784828501612156565b60608301525092915050565b6000813590506123f2816134a5565b92915050565b60006020828403121561240a57600080fd5b6000612418848285016120be565b91505092915050565b60008060006060848603121561243657600080fd5b6000612444868287016120be565b935050602084013567ffffffffffffffff81111561246157600080fd5b61246d868287016120d3565b925050604084013567ffffffffffffffff81111561248a57600080fd5b61249686828701612156565b9150509250925092565b600080600080600060a086880312156124b857600080fd5b60006124c6888289016120be565b95505060206124d7888289016123e3565b945050604086013567ffffffffffffffff8111156124f457600080fd5b612500888289016120d3565b935050606086013567ffffffffffffffff81111561251d57600080fd5b61252988828901612156565b925050608086013567ffffffffffffffff81111561254657600080fd5b61255288828901612209565b9150509295509295909350565b6000806040838503121561257257600080fd5b600083013567ffffffffffffffff81111561258c57600080fd5b612598858286016120d3565b925050602083013567ffffffffffffffff8111156125b557600080fd5b6125c185828601612156565b9150509250929050565b600080604083850312156125de57600080fd5b600083013567ffffffffffffffff8111156125f857600080fd5b61260485828601612156565b9250506020612615858286016121ca565b9150509250929050565b60006020828403121561263157600080fd5b600061263f848285016121df565b91505092915050565b60006020828403121561265a57600080fd5b6000612668848285016121f4565b91505092915050565b6000806040838503121561268457600080fd5b60006126928582860161225d565b92505060206126a385828601612272565b9150509250929050565b6000602082840312156126bf57600080fd5b600082013567ffffffffffffffff8111156126d957600080fd5b6126e584828501612287565b91505092915050565b60006020828403121561270057600080fd5b600082013567ffffffffffffffff81111561271a57600080fd5b6127268482850161233f565b91505092915050565b600061273b8383612765565b60208301905092915050565b6127508161331c565b82525050565b61275f8161326d565b82525050565b61276e8161326d565b82525050565b6127856127808261326d565b6133dc565b82525050565b600061279682613207565b6127a0818561322a565b93506127ab836131f7565b8060005b838110156127dc5781516127c3888261272f565b97506127ce8361321d565b9250506001810190506127af565b5085935050505092915050565b6127f28161327f565b82525050565b6128018161328b565b82525050565b6128186128138261328b565b6133ee565b82525050565b600061282982613212565b6128338185613235565b93506128438185602086016133a9565b61284c81613414565b840191505092915050565b600061286282613212565b61286c8185613246565b935061287c8185602086016133a9565b80840191505092915050565b6128918161332e565b82525050565b6128a081613352565b82525050565b60006128b3601b83613251565b91507f476174657761793a2063616e6e6f742073656e6420746f2030783000000000006000830152602082019050919050565b60006128f3601c83613262565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b6000612933602f83613251565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b6000612999601783613251565b91507f476174657761793a2062617463682072657665727465640000000000000000006000830152602082019050919050565b60006129d9603283613251565b91507f476174657761793a206e6f6e6365206973206c6f776572207468616e2063757260008301527f72656e74206163636f756e74206e6f6e636500000000000000000000000000006020830152604082019050919050565b6000612a3f602583613251565b91507f476174657761793a2063616e6e6f742073656e642066726f6d2030783020616360008301527f636f756e740000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612aa5602683613251565b91507f476174657761793a2063616e6e6f742064656c656761746520656d707479206260008301527f61746368657300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612b0b602883613251565b91507f476174657761793a2073656e646572206973206e6f7420746865206163636f7560008301527f6e74206f776e65720000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612b71601683613251565b91507f476174657761793a20696e76616c6964206261746368000000000000000000006000830152602082019050919050565b6000612bb1602383613251565b91507f476174657761793a206261746368207472616e73616374696f6e20726576657260008301527f74656400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612c17601e83613251565b91507f536166654d6174684c69623a206164646974696f6e206f766572666c6f7700006000830152602082019050919050565b6000612c57602083613251565b91507f476174657761793a2063616e6e6f742073656e6420656d7074792062617463686000830152602082019050919050565b6000612c97601d83613251565b91507f476174657761793a20616c6c20626174636865732072657665727465640000006000830152602082019050919050565b612cd381613305565b82525050565b612cea612ce582613305565b61340a565b82525050565b612cf98161330f565b82525050565b6000612d0b8287612774565b601482019150612d1b8286612cd9565b602082019150612d2b828561278b565b9150612d378284612857565b915081905095945050505050565b6000612d518288612774565b601482019150612d618287612cd9565b602082019150612d71828661278b565b9150612d7d8285612857565b9150612d898284612cd9565b6020820191508190509695505050505050565b6000612da88284612857565b915081905092915050565b6000612dbf8286612857565b9150612dcb8285612774565b601482019150612ddb8284612774565b601482019150819050949350505050565b6000612df88285612857565b9150612e048284612857565b91508190509392505050565b6000612e1b826128e6565b9150612e278284612807565b60208201915081905092915050565b6000612e428287612cd9565b602082019150612e528286612774565b601482019150612e628285612807565b602082019150612e728284612857565b915081905095945050505050565b6000602082019050612e956000830184612747565b92915050565b6000606082019050612eb06000830186612747565b8181036020830152612ec2818561281e565b9050612ed160408301846127e9565b949350505050565b6000604082019050612eee6000830185612756565b612efb6020830184612756565b9392505050565b6000602082019050612f1760008301846127e9565b92915050565b6000602082019050612f3260008301846127f8565b92915050565b6000608082019050612f4d60008301876127f8565b612f5a6020830186612cf0565b612f6760408301856127f8565b612f7460608301846127f8565b95945050505050565b6000602082019050612f926000830184612888565b92915050565b6000602082019050612fad6000830184612897565b92915050565b60006020820190508181036000830152612fcc816128a6565b9050919050565b60006020820190508181036000830152612fec81612926565b9050919050565b6000602082019050818103600083015261300c8161298c565b9050919050565b6000602082019050818103600083015261302c816129cc565b9050919050565b6000602082019050818103600083015261304c81612a32565b9050919050565b6000602082019050818103600083015261306c81612a98565b9050919050565b6000602082019050818103600083015261308c81612afe565b9050919050565b600060208201905081810360008301526130ac81612b64565b9050919050565b600060208201905081810360008301526130cc81612ba4565b9050919050565b600060208201905081810360008301526130ec81612c0a565b9050919050565b6000602082019050818103600083015261310c81612c4a565b9050919050565b6000602082019050818103600083015261312c81612c8a565b9050919050565b60006020820190506131486000830184612cca565b92915050565b6000604051905081810181811067ffffffffffffffff8211171561317157600080fd5b8060405250919050565b600067ffffffffffffffff82111561319257600080fd5b602082029050602081019050919050565b600067ffffffffffffffff8211156131ba57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff8211156131e257600080fd5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b6000613278826132e5565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffffffffffff00000000000000000000000000000000000000000000000082169050919050565b60006132cc8261326d565b9050919050565b60006132de8261326d565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332782613376565b9050919050565b600061333982613340565b9050919050565b600061334b826132e5565b9050919050565b600061335d82613364565b9050919050565b600061336f826132e5565b9050919050565b600061338182613388565b9050919050565b6000613393826132e5565b9050919050565b82818337600083830152505050565b60005b838110156133c75780820151818401526020810190506133ac565b838111156133d6576000848401525b50505050565b60006133e7826133f8565b9050919050565b6000819050919050565b600061340382613425565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b61343b8161326d565b811461344657600080fd5b50565b6134528161327f565b811461345d57600080fd5b50565b61346981613295565b811461347457600080fd5b50565b613480816132c1565b811461348b57600080fd5b50565b613497816132d3565b81146134a257600080fd5b50565b6134ae81613305565b81146134b957600080fd5b5056fea164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class Gateway__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.Gateway__factory = Gateway__factory; +Gateway__factory.bytecode = _bytecode; +Gateway__factory.abi = _abi; diff --git a/dist/typings/factories/GuardedMock__factory.d.ts b/dist/typings/factories/GuardedMock__factory.d.ts new file mode 100644 index 00000000..c8b01a78 --- /dev/null +++ b/dist/typings/factories/GuardedMock__factory.d.ts @@ -0,0 +1,58 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { GuardedMock, GuardedMockInterface } from "../GuardedMock"; +declare type GuardedMockConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class GuardedMock__factory extends ContractFactory { + constructor(...args: GuardedMockConstructorParams); + deploy(guardians_: string[], overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(guardians_: string[], overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): GuardedMock; + connect(signer: Signer): GuardedMock__factory; + static readonly bytecode = "0x60806040523480156200001157600080fd5b506040516200196338038062001963833981810160405260208110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660208202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015620000c6578082015181840152602081019050620000a9565b50505050905001604052505050620000ef676ed90a7f5cb15c7560c01b6200015b60201b60201c565b6200010b67424eb5b364cfc86860c01b6200015e60201b60201c565b62000127671bb95f9bacc8b14b60c01b6200015e60201b60201c565b6200014367f3f35d5497ad8f8860c01b6200015e60201b60201c565b62000154816200016160201b60201c565b50620006b2565b50565b50565b6200017d672da1cbb2c8b712bf60c01b6200015b60201b60201c565b6200019967a22c42eaa986a7b160c01b6200015b60201b60201c565b620001b567161aa01e34b61d0a60c01b6200015b60201b60201c565b6000815114156200022b57620001dc67c00dbd5b52865bb760c01b6200015b60201b60201c565b620001f8678a5faf951795361260c01b6200015b60201b60201c565b620002146745413064a2aacfc660c01b6200015b60201b60201c565b62000225326200033a60201b60201c565b62000337565b6200024767d4fad28aec7c156d60c01b6200015b60201b60201c565b6200026367a88c23ab9e9dede660c01b6200015b60201b60201c565b6200027f675a0d1bd87812f63460c01b6200015b60201b60201c565b600081519050620002a167a97ff88e96ad9c4460c01b6200015b60201b60201c565b620002bd672ebda776213b4a1860c01b6200015b60201b60201c565b60005b818110156200033457620002e567197b6470f65d698160c01b6200015b60201b60201c565b62000301678e0c2e8e0183d04a60c01b6200015b60201b60201c565b620003268382815181106200031257fe5b60200260200101516200033a60201b60201c565b8080600101915050620002c0565b50505b50565b620003566715e658c0f6e292b160c01b6200015b60201b60201c565b62000372672c431971dc3f178360c01b6200015b60201b60201c565b6200038e67ea35c52bf51c28f760c01b6200015b60201b60201c565b620003aa676c0120f97757204260c01b6200015b60201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156200044e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a2063616e6e6f74206164642030783020677561726469616e81525060200191505060405180910390fd5b6200046a6768a59374672fe76a60c01b6200015b60201b60201c565b62000486676aacc0e4664894f760c01b6200015b60201b60201c565b620004a267eacfbaa68e55918960c01b6200015b60201b60201c565b620004be67b14b9b00bd32573160c01b6200015b60201b60201c565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156200057e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a20677561726469616e20616c72656164792065786973747381525060200191505060405180910390fd5b6200059a67b43b7e075756508e60c01b6200015b60201b60201c565b620005b5663a0e15b185871360c01b6200015b60201b60201c565b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550620006286719a12fa44495bf1260c01b6200015b60201b60201c565b62000644676a185bb7ec86ed3260c01b6200015b60201b60201c565b7fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b6112a180620006c26000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80637f182d74116100665780637f182d7414610232578063a4db4b6b14610291578063a526d83b146102f0578063c1cad69e14610334578063d0f710d6146103935761009e565b80630c68ba21146100a357806315588bcd146100fd5780635405622e146101465780635fd4b9371461018f57806371404156146101ee575b600080fd5b6100e5600480360360208110156100b957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061042c565b60405180821515815260200191505060405180910390f35b6101446004803603602081101561011357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506104bd565b005b61018d6004803603602081101561015c57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506104c0565b005b6101d6600480360360208110156101a557600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506104c3565b60405180821515815260200191505060405180910390f35b6102306004803603602081101561020457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104ce565b005b6102796004803603602081101561024857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610924565b60405180821515815260200191505060405180910390f35b6102d8600480360360208110156102a757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061092b565b60405180821515815260200191505060405180910390f35b6103326004803603602081101561030657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610936565b005b61037b6004803603602081101561034a57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610abf565b60405180821515815260200191505060405180910390f35b610414600480360360408110156103a957600080fd5b8101908080359060200190929190803590602001906401000000008111156103d057600080fd5b8201836020820111156103e257600080fd5b8035906020019184600183028401116401000000008311171561040457600080fd5b9091929391929390505050610ac6565b60405180821515815260200191505060405180910390f35b600061044267d9e99bddfebda2f060c01b6104c0565b610456676401fd9fc2105e0160c01b6104c0565b61046a6733760aa820b07e2a60c01b6104c0565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b50565b50565b600060019050919050565b6104e267f772222a3366273960c01b6104c0565b6104f6677e48a4752a028e1460c01b6104c0565b61050a6754e2f8cd8fda0cfe60c01b6104c0565b61051e671b1abbc8110e006760c01b6104c0565b610532677621c15edc08840a60c01b6104c0565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166105d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061126f6026913960400191505060405180910390fd5b6105e7671978b446280e03b660c01b6104c0565b6105fb67bc99b99e8c2c7a2260c01b6104c0565b61060f67afd0aa94ba119c4e60c01b6104c0565b610623670fe65c577fbdf81160c01b6104c0565b61063767e175d6b24c96a59a60c01b6104c0565b61064b67514f675749914bc160c01b6104c0565b61065f67fed39a5b1d24bceb60c01b6104c0565b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161415610701576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f477561726465643a2063616e6e6f742072656d6f76652073656c66000000000081525060200191505060405180910390fd5b61071567325d0391dd900ca560c01b6104c0565b61072967f494ac4bc126e05760c01b6104c0565b61073d67a8a2f5acd805e41c60c01b6104c0565b610751679f1149f801dce85b60c01b6104c0565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661080f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f477561726465643a20677561726469616e20646f65736e27742065786973740081525060200191505060405180910390fd5b61082367e767f88c374b22f760c01b6104c0565b610837679a8eb2ad91b01fb960c01b6104c0565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506108a2675f52f4e3c8e1709960c01b6104c0565b6108b667b8b235546176405e60c01b6104c0565b7fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b6000919050565b600060019050919050565b61094a67b59862a5cb01d1d860c01b6104c0565b61095e677e48a4752a028e1460c01b6104c0565b6109726754e2f8cd8fda0cfe60c01b6104c0565b610986671b1abbc8110e006760c01b6104c0565b61099a677621c15edc08840a60c01b6104c0565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610a3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061126f6026913960400191505060405180910390fd5b610a4f671978b446280e03b660c01b6104c0565b610a6367bc99b99e8c2c7a2260c01b6104c0565b610a7767e0409d61ef95483b60c01b6104c0565b610a8b67acb2c628a7cbdba860c01b6104c0565b610a9f677f6b80ac4f415fbe60c01b6104c0565b610ab367c7dcdfc4bd89af4960c01b6104c0565b610abc81610b5b565b50565b6000919050565b6000610adc6746d5f36e497b280d60c01b6104c0565b610af0677077a4665ef04d8360c01b6104c0565b610b046788288bf71f1972a760c01b6104c0565b610b528484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610e71565b90509392505050565b610b6f6715e658c0f6e292b160c01b6104c0565b610b83672c431971dc3f178360c01b6104c0565b610b9767ea35c52bf51c28f760c01b6104c0565b610bab676c0120f97757204260c01b6104c0565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a2063616e6e6f74206164642030783020677561726469616e81525060200191505060405180910390fd5b610c626768a59374672fe76a60c01b6104c0565b610c76676aacc0e4664894f760c01b6104c0565b610c8a67eacfbaa68e55918960c01b6104c0565b610c9e67b14b9b00bd32573160c01b6104c0565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610d5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a20677561726469616e20616c72656164792065786973747381525060200191505060405180910390fd5b610d7167b43b7e075756508e60c01b6104c0565b610d84663a0e15b185871360c01b6104c0565b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610def6719a12fa44495bf1260c01b6104c0565b610e03676a185bb7ec86ed3260c01b6104c0565b7fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b6000610e8767bec4827058d1d27d60c01b6104c0565b610e9b672f274b74d16058ba60c01b6104c0565b610eaf670dd4bedb64e2a2d160c01b6104c0565b6000610ec48385610f4390919063ffffffff16565b9050610eda6748284973b654d0c360c01b6104c0565b610eee67af16bd1d5a57497b60c01b6104c0565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b6000610f5967610b12321a07a31960c01b611260565b610f6d670f66a519ee9137b960c01b611260565b610f8167140d9f9935e2385360c01b611260565b6000610f97670bfea895a9f81bec60c01b611260565b610fab67a8c715ec3b9d89c160c01b611260565b60418351141561121957610fc967101129654a82afeb60c01b611260565b610fdd67a44405322c11578a60c01b611260565b610ff1673ae09945b2f5082360c01b611260565b600061100767900a30e48d0fc7bd60c01b611260565b61101b677d193483635abe1860c01b611260565b600061103167f24e14d594e9077960c01b611260565b61104567a847d7edacf7e00c60c01b611260565b600061105b670bcc457b0963bc0f60c01b611260565b6020860151925060408601519150606086015160001a90506110876730650d5e99574f3560c01b611260565b61109b675197804ca644c8a460c01b611260565b601b8160ff1610156110da576110bb6781206cb7a1d9cec760c01b611260565b6110cf679d0aaefe9954d7fb60c01b611260565b601b810190506110ef565b6110ee67091b6422f681fe5560c01b611260565b5b611103677849785c6ede9b0e60c01b611260565b6111176732075f7517db825b60c01b611260565b601b8160ff1614801561113a575061113967638a38da6bf5bb4360c01b611263565b5b806111645750601c8160ff161480156111635750611162671d94865be2a4ed5560c01b611263565b5b5b156111fc5761117d67657d88528f4e396b60c01b611260565b611191675469679748b05cfe60c01b611260565b60018782858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156111eb573d6000803e3d6000fd5b505050602060405103519350611211565b61121067539b701a1f57136860c01b611260565b5b50505061122e565b61122d67f3927173995ed52360c01b611260565b5b61124267303f1b174284648060c01b611260565b61125667c60031985823124160c01b611260565b8091505092915050565b50565b60006001905091905056fe477561726465643a2074782e6f726967696e206973206e6f742074686520677561726469616ea164736f6c634300060c000a"; + static readonly abi: ({ + inputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): GuardedMockInterface; + static connect(address: string, signerOrProvider: Signer | Provider): GuardedMock; +} +export {}; diff --git a/dist/typings/factories/GuardedMock__factory.js b/dist/typings/factories/GuardedMock__factory.js new file mode 100644 index 00000000..92cd1dee --- /dev/null +++ b/dist/typings/factories/GuardedMock__factory.js @@ -0,0 +1,259 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GuardedMock__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "address[]", + name: "guardians_", + type: "address[]", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "GuardianAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "GuardianRemoved", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "addGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_0ffe16b4", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__9fb0db2e", + type: "bytes8", + }, + ], + name: "c_9fb0db2e", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_false0ffe16b4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__9fb0db2e", + type: "bytes8", + }, + ], + name: "c_false9fb0db2e", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_true0ffe16b4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__9fb0db2e", + type: "bytes8", + }, + ], + name: "c_true9fb0db2e", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "isGuardian", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "removeGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "messageHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "verifyGuardianSignature", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +const _bytecode = "0x60806040523480156200001157600080fd5b506040516200196338038062001963833981810160405260208110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660208202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015620000c6578082015181840152602081019050620000a9565b50505050905001604052505050620000ef676ed90a7f5cb15c7560c01b6200015b60201b60201c565b6200010b67424eb5b364cfc86860c01b6200015e60201b60201c565b62000127671bb95f9bacc8b14b60c01b6200015e60201b60201c565b6200014367f3f35d5497ad8f8860c01b6200015e60201b60201c565b62000154816200016160201b60201c565b50620006b2565b50565b50565b6200017d672da1cbb2c8b712bf60c01b6200015b60201b60201c565b6200019967a22c42eaa986a7b160c01b6200015b60201b60201c565b620001b567161aa01e34b61d0a60c01b6200015b60201b60201c565b6000815114156200022b57620001dc67c00dbd5b52865bb760c01b6200015b60201b60201c565b620001f8678a5faf951795361260c01b6200015b60201b60201c565b620002146745413064a2aacfc660c01b6200015b60201b60201c565b62000225326200033a60201b60201c565b62000337565b6200024767d4fad28aec7c156d60c01b6200015b60201b60201c565b6200026367a88c23ab9e9dede660c01b6200015b60201b60201c565b6200027f675a0d1bd87812f63460c01b6200015b60201b60201c565b600081519050620002a167a97ff88e96ad9c4460c01b6200015b60201b60201c565b620002bd672ebda776213b4a1860c01b6200015b60201b60201c565b60005b818110156200033457620002e567197b6470f65d698160c01b6200015b60201b60201c565b62000301678e0c2e8e0183d04a60c01b6200015b60201b60201c565b620003268382815181106200031257fe5b60200260200101516200033a60201b60201c565b8080600101915050620002c0565b50505b50565b620003566715e658c0f6e292b160c01b6200015b60201b60201c565b62000372672c431971dc3f178360c01b6200015b60201b60201c565b6200038e67ea35c52bf51c28f760c01b6200015b60201b60201c565b620003aa676c0120f97757204260c01b6200015b60201b60201c565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156200044e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a2063616e6e6f74206164642030783020677561726469616e81525060200191505060405180910390fd5b6200046a6768a59374672fe76a60c01b6200015b60201b60201c565b62000486676aacc0e4664894f760c01b6200015b60201b60201c565b620004a267eacfbaa68e55918960c01b6200015b60201b60201c565b620004be67b14b9b00bd32573160c01b6200015b60201b60201c565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156200057e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a20677561726469616e20616c72656164792065786973747381525060200191505060405180910390fd5b6200059a67b43b7e075756508e60c01b6200015b60201b60201c565b620005b5663a0e15b185871360c01b6200015b60201b60201c565b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550620006286719a12fa44495bf1260c01b6200015b60201b60201c565b62000644676a185bb7ec86ed3260c01b6200015b60201b60201c565b7fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b6112a180620006c26000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80637f182d74116100665780637f182d7414610232578063a4db4b6b14610291578063a526d83b146102f0578063c1cad69e14610334578063d0f710d6146103935761009e565b80630c68ba21146100a357806315588bcd146100fd5780635405622e146101465780635fd4b9371461018f57806371404156146101ee575b600080fd5b6100e5600480360360208110156100b957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061042c565b60405180821515815260200191505060405180910390f35b6101446004803603602081101561011357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506104bd565b005b61018d6004803603602081101561015c57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506104c0565b005b6101d6600480360360208110156101a557600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506104c3565b60405180821515815260200191505060405180910390f35b6102306004803603602081101561020457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506104ce565b005b6102796004803603602081101561024857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610924565b60405180821515815260200191505060405180910390f35b6102d8600480360360208110156102a757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061092b565b60405180821515815260200191505060405180910390f35b6103326004803603602081101561030657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610936565b005b61037b6004803603602081101561034a57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610abf565b60405180821515815260200191505060405180910390f35b610414600480360360408110156103a957600080fd5b8101908080359060200190929190803590602001906401000000008111156103d057600080fd5b8201836020820111156103e257600080fd5b8035906020019184600183028401116401000000008311171561040457600080fd5b9091929391929390505050610ac6565b60405180821515815260200191505060405180910390f35b600061044267d9e99bddfebda2f060c01b6104c0565b610456676401fd9fc2105e0160c01b6104c0565b61046a6733760aa820b07e2a60c01b6104c0565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b50565b50565b600060019050919050565b6104e267f772222a3366273960c01b6104c0565b6104f6677e48a4752a028e1460c01b6104c0565b61050a6754e2f8cd8fda0cfe60c01b6104c0565b61051e671b1abbc8110e006760c01b6104c0565b610532677621c15edc08840a60c01b6104c0565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166105d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061126f6026913960400191505060405180910390fd5b6105e7671978b446280e03b660c01b6104c0565b6105fb67bc99b99e8c2c7a2260c01b6104c0565b61060f67afd0aa94ba119c4e60c01b6104c0565b610623670fe65c577fbdf81160c01b6104c0565b61063767e175d6b24c96a59a60c01b6104c0565b61064b67514f675749914bc160c01b6104c0565b61065f67fed39a5b1d24bceb60c01b6104c0565b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161415610701576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f477561726465643a2063616e6e6f742072656d6f76652073656c66000000000081525060200191505060405180910390fd5b61071567325d0391dd900ca560c01b6104c0565b61072967f494ac4bc126e05760c01b6104c0565b61073d67a8a2f5acd805e41c60c01b6104c0565b610751679f1149f801dce85b60c01b6104c0565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661080f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f477561726465643a20677561726469616e20646f65736e27742065786973740081525060200191505060405180910390fd5b61082367e767f88c374b22f760c01b6104c0565b610837679a8eb2ad91b01fb960c01b6104c0565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506108a2675f52f4e3c8e1709960c01b6104c0565b6108b667b8b235546176405e60c01b6104c0565b7fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b6000919050565b600060019050919050565b61094a67b59862a5cb01d1d860c01b6104c0565b61095e677e48a4752a028e1460c01b6104c0565b6109726754e2f8cd8fda0cfe60c01b6104c0565b610986671b1abbc8110e006760c01b6104c0565b61099a677621c15edc08840a60c01b6104c0565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610a3b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061126f6026913960400191505060405180910390fd5b610a4f671978b446280e03b660c01b6104c0565b610a6367bc99b99e8c2c7a2260c01b6104c0565b610a7767e0409d61ef95483b60c01b6104c0565b610a8b67acb2c628a7cbdba860c01b6104c0565b610a9f677f6b80ac4f415fbe60c01b6104c0565b610ab367c7dcdfc4bd89af4960c01b6104c0565b610abc81610b5b565b50565b6000919050565b6000610adc6746d5f36e497b280d60c01b6104c0565b610af0677077a4665ef04d8360c01b6104c0565b610b046788288bf71f1972a760c01b6104c0565b610b528484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610e71565b90509392505050565b610b6f6715e658c0f6e292b160c01b6104c0565b610b83672c431971dc3f178360c01b6104c0565b610b9767ea35c52bf51c28f760c01b6104c0565b610bab676c0120f97757204260c01b6104c0565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a2063616e6e6f74206164642030783020677561726469616e81525060200191505060405180910390fd5b610c626768a59374672fe76a60c01b6104c0565b610c76676aacc0e4664894f760c01b6104c0565b610c8a67eacfbaa68e55918960c01b6104c0565b610c9e67b14b9b00bd32573160c01b6104c0565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610d5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a20677561726469616e20616c72656164792065786973747381525060200191505060405180910390fd5b610d7167b43b7e075756508e60c01b6104c0565b610d84663a0e15b185871360c01b6104c0565b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610def6719a12fa44495bf1260c01b6104c0565b610e03676a185bb7ec86ed3260c01b6104c0565b7fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b6000610e8767bec4827058d1d27d60c01b6104c0565b610e9b672f274b74d16058ba60c01b6104c0565b610eaf670dd4bedb64e2a2d160c01b6104c0565b6000610ec48385610f4390919063ffffffff16565b9050610eda6748284973b654d0c360c01b6104c0565b610eee67af16bd1d5a57497b60c01b6104c0565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b6000610f5967610b12321a07a31960c01b611260565b610f6d670f66a519ee9137b960c01b611260565b610f8167140d9f9935e2385360c01b611260565b6000610f97670bfea895a9f81bec60c01b611260565b610fab67a8c715ec3b9d89c160c01b611260565b60418351141561121957610fc967101129654a82afeb60c01b611260565b610fdd67a44405322c11578a60c01b611260565b610ff1673ae09945b2f5082360c01b611260565b600061100767900a30e48d0fc7bd60c01b611260565b61101b677d193483635abe1860c01b611260565b600061103167f24e14d594e9077960c01b611260565b61104567a847d7edacf7e00c60c01b611260565b600061105b670bcc457b0963bc0f60c01b611260565b6020860151925060408601519150606086015160001a90506110876730650d5e99574f3560c01b611260565b61109b675197804ca644c8a460c01b611260565b601b8160ff1610156110da576110bb6781206cb7a1d9cec760c01b611260565b6110cf679d0aaefe9954d7fb60c01b611260565b601b810190506110ef565b6110ee67091b6422f681fe5560c01b611260565b5b611103677849785c6ede9b0e60c01b611260565b6111176732075f7517db825b60c01b611260565b601b8160ff1614801561113a575061113967638a38da6bf5bb4360c01b611263565b5b806111645750601c8160ff161480156111635750611162671d94865be2a4ed5560c01b611263565b5b5b156111fc5761117d67657d88528f4e396b60c01b611260565b611191675469679748b05cfe60c01b611260565b60018782858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156111eb573d6000803e3d6000fd5b505050602060405103519350611211565b61121067539b701a1f57136860c01b611260565b5b50505061122e565b61122d67f3927173995ed52360c01b611260565b5b61124267303f1b174284648060c01b611260565b61125667c60031985823124160c01b611260565b8091505092915050565b50565b60006001905091905056fe477561726465643a2074782e6f726967696e206973206e6f742074686520677561726469616ea164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class GuardedMock__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(guardians_, overrides) { + return super.deploy(guardians_, overrides || {}); + } + getDeployTransaction(guardians_, overrides) { + return super.getDeployTransaction(guardians_, overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.GuardedMock__factory = GuardedMock__factory; +GuardedMock__factory.bytecode = _bytecode; +GuardedMock__factory.abi = _abi; diff --git a/dist/typings/factories/Guarded__factory.d.ts b/dist/typings/factories/Guarded__factory.d.ts new file mode 100644 index 00000000..0528ce33 --- /dev/null +++ b/dist/typings/factories/Guarded__factory.d.ts @@ -0,0 +1,35 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { Guarded, GuardedInterface } from "../Guarded"; +export declare class Guarded__factory { + static readonly abi: ({ + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + outputs?: undefined; + stateMutability?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): GuardedInterface; + static connect(address: string, signerOrProvider: Signer | Provider): Guarded; +} diff --git a/dist/typings/factories/Guarded__factory.js b/dist/typings/factories/Guarded__factory.js new file mode 100644 index 00000000..50609485 --- /dev/null +++ b/dist/typings/factories/Guarded__factory.js @@ -0,0 +1,174 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Guarded__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "GuardianAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "GuardianRemoved", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "addGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_0ffe16b4", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_false0ffe16b4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_true0ffe16b4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "isGuardian", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "removeGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "messageHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "verifyGuardianSignature", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +class Guarded__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.Guarded__factory = Guarded__factory; +Guarded__factory.abi = _abi; diff --git a/dist/typings/factories/IERC20__factory.d.ts b/dist/typings/factories/IERC20__factory.d.ts new file mode 100644 index 00000000..565a1f36 --- /dev/null +++ b/dist/typings/factories/IERC20__factory.d.ts @@ -0,0 +1,35 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { IERC20, IERC20Interface } from "../IERC20"; +export declare class IERC20__factory { + static readonly abi: ({ + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + outputs?: undefined; + stateMutability?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): IERC20Interface; + static connect(address: string, signerOrProvider: Signer | Provider): IERC20; +} diff --git a/dist/typings/factories/IERC20__factory.js b/dist/typings/factories/IERC20__factory.js new file mode 100644 index 00000000..9f4748f4 --- /dev/null +++ b/dist/typings/factories/IERC20__factory.js @@ -0,0 +1,199 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.IERC20__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + 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: "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", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + 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: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + 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: "", + 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: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; +class IERC20__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.IERC20__factory = IERC20__factory; +IERC20__factory.abi = _abi; diff --git a/dist/typings/factories/ISuperAgreement__factory.d.ts b/dist/typings/factories/ISuperAgreement__factory.d.ts new file mode 100644 index 00000000..22770814 --- /dev/null +++ b/dist/typings/factories/ISuperAgreement__factory.d.ts @@ -0,0 +1,22 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { ISuperAgreement, ISuperAgreementInterface } from "../ISuperAgreement"; +export declare class ISuperAgreement__factory { + static readonly abi: { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + }[]; + static createInterface(): ISuperAgreementInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ISuperAgreement; +} diff --git a/dist/typings/factories/ISuperAgreement__factory.js b/dist/typings/factories/ISuperAgreement__factory.js new file mode 100644 index 00000000..7a703597 --- /dev/null +++ b/dist/typings/factories/ISuperAgreement__factory.js @@ -0,0 +1,68 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ISuperAgreement__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [], + name: "agreementType", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ISuperfluidToken", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "time", + type: "uint256", + }, + ], + name: "realtimeBalanceOf", + outputs: [ + { + internalType: "int256", + name: "dynamicBalance", + type: "int256", + }, + { + internalType: "uint256", + name: "deposit", + type: "uint256", + }, + { + internalType: "uint256", + name: "owedDeposit", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +class ISuperAgreement__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.ISuperAgreement__factory = ISuperAgreement__factory; +ISuperAgreement__factory.abi = _abi; diff --git a/dist/typings/factories/ISuperfluidToken__factory.d.ts b/dist/typings/factories/ISuperfluidToken__factory.d.ts new file mode 100644 index 00000000..229e78cd --- /dev/null +++ b/dist/typings/factories/ISuperfluidToken__factory.d.ts @@ -0,0 +1,35 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { ISuperfluidToken, ISuperfluidTokenInterface } from "../ISuperfluidToken"; +export declare class ISuperfluidToken__factory { + static readonly abi: ({ + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + outputs?: undefined; + stateMutability?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): ISuperfluidTokenInterface; + static connect(address: string, signerOrProvider: Signer | Provider): ISuperfluidToken; +} diff --git a/dist/typings/factories/ISuperfluidToken__factory.js b/dist/typings/factories/ISuperfluidToken__factory.js new file mode 100644 index 00000000..ee120199 --- /dev/null +++ b/dist/typings/factories/ISuperfluidToken__factory.js @@ -0,0 +1,657 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ISuperfluidToken__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "agreementClass", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32[]", + name: "data", + type: "bytes32[]", + }, + ], + name: "AgreementCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "agreementClass", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "penaltyAccount", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "rewardAccount", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "rewardAmount", + type: "uint256", + }, + ], + name: "AgreementLiquidated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "liquidatorAccount", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "agreementClass", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "penaltyAccount", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "bondAccount", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "rewardAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "bailoutAmount", + type: "uint256", + }, + ], + name: "AgreementLiquidatedBy", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "agreementClass", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "liquidatorAccount", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "targetAccount", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "rewardAccount", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "rewardAmount", + type: "uint256", + }, + { + indexed: false, + internalType: "int256", + name: "targetAccountBalanceDelta", + type: "int256", + }, + { + indexed: false, + internalType: "bytes", + name: "liquidationTypeData", + type: "bytes", + }, + ], + name: "AgreementLiquidatedV2", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "agreementClass", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "slotId", + type: "uint256", + }, + ], + name: "AgreementStateUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "agreementClass", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + ], + name: "AgreementTerminated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "agreementClass", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32[]", + name: "data", + type: "bytes32[]", + }, + ], + name: "AgreementUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "bailoutAccount", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "bailoutAmount", + type: "uint256", + }, + ], + name: "Bailout", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + { + internalType: "bytes32[]", + name: "data", + type: "bytes32[]", + }, + ], + name: "createAgreement", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "getAccountActiveAgreements", + outputs: [ + { + internalType: "contract ISuperAgreement[]", + name: "activeAgreements", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "agreementClass", + type: "address", + }, + { + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + { + internalType: "uint256", + name: "dataLength", + type: "uint256", + }, + ], + name: "getAgreementData", + outputs: [ + { + internalType: "bytes32[]", + name: "data", + type: "bytes32[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "agreementClass", + type: "address", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "slotId", + type: "uint256", + }, + { + internalType: "uint256", + name: "dataLength", + type: "uint256", + }, + ], + name: "getAgreementStateSlot", + outputs: [ + { + internalType: "bytes32[]", + name: "slotData", + type: "bytes32[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getHost", + outputs: [ + { + internalType: "address", + name: "host", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + ], + name: "isAccountCritical", + outputs: [ + { + internalType: "bool", + name: "isCritical", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "isAccountCriticalNow", + outputs: [ + { + internalType: "bool", + name: "isCritical", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + ], + name: "isAccountSolvent", + outputs: [ + { + internalType: "bool", + name: "isSolvent", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "isAccountSolventNow", + outputs: [ + { + internalType: "bool", + name: "isSolvent", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + { + internalType: "bytes", + name: "liquidationTypeData", + type: "bytes", + }, + { + internalType: "address", + name: "liquidatorAccount", + type: "address", + }, + { + internalType: "bool", + name: "useDefaultRewardAccount", + type: "bool", + }, + { + internalType: "address", + name: "targetAccount", + type: "address", + }, + { + internalType: "uint256", + name: "rewardAmount", + type: "uint256", + }, + { + internalType: "int256", + name: "targetAccountBalanceDelta", + type: "int256", + }, + ], + name: "makeLiquidationPayoutsV2", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + ], + name: "realtimeBalanceOf", + outputs: [ + { + internalType: "int256", + name: "availableBalance", + type: "int256", + }, + { + internalType: "uint256", + name: "deposit", + type: "uint256", + }, + { + internalType: "uint256", + name: "owedDeposit", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "realtimeBalanceOfNow", + outputs: [ + { + internalType: "int256", + name: "availableBalance", + type: "int256", + }, + { + internalType: "uint256", + name: "deposit", + type: "uint256", + }, + { + internalType: "uint256", + name: "owedDeposit", + type: "uint256", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "int256", + name: "delta", + type: "int256", + }, + ], + name: "settleBalance", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + { + internalType: "uint256", + name: "dataLength", + type: "uint256", + }, + ], + name: "terminateAgreement", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + { + internalType: "bytes32[]", + name: "data", + type: "bytes32[]", + }, + ], + name: "updateAgreementData", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "slotId", + type: "uint256", + }, + { + internalType: "bytes32[]", + name: "slotData", + type: "bytes32[]", + }, + ], + name: "updateAgreementStateSlot", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; +class ISuperfluidToken__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.ISuperfluidToken__factory = ISuperfluidToken__factory; +ISuperfluidToken__factory.abi = _abi; diff --git a/dist/typings/factories/Initializable__factory.d.ts b/dist/typings/factories/Initializable__factory.d.ts new file mode 100644 index 00000000..1fea10ab --- /dev/null +++ b/dist/typings/factories/Initializable__factory.d.ts @@ -0,0 +1,35 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { Initializable, InitializableInterface } from "../Initializable"; +export declare class Initializable__factory { + static readonly abi: ({ + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + outputs?: undefined; + stateMutability?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): InitializableInterface; + static connect(address: string, signerOrProvider: Signer | Provider): Initializable; +} diff --git a/dist/typings/factories/Initializable__factory.js b/dist/typings/factories/Initializable__factory.js new file mode 100644 index 00000000..22982f41 --- /dev/null +++ b/dist/typings/factories/Initializable__factory.js @@ -0,0 +1,93 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Initializable__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "initializer", + type: "address", + }, + ], + name: "Initialized", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_c0828b70", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_falsec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_truec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "isInitialized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +class Initializable__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.Initializable__factory = Initializable__factory; +Initializable__factory.abi = _abi; diff --git a/dist/typings/factories/PaymentDepositAccount__factory.d.ts b/dist/typings/factories/PaymentDepositAccount__factory.d.ts new file mode 100644 index 00000000..162bb93c --- /dev/null +++ b/dist/typings/factories/PaymentDepositAccount__factory.d.ts @@ -0,0 +1,46 @@ +import { Signer, ContractFactory, PayableOverrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PaymentDepositAccount, PaymentDepositAccountInterface } from "../PaymentDepositAccount"; +declare type PaymentDepositAccountConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class PaymentDepositAccount__factory extends ContractFactory { + constructor(...args: PaymentDepositAccountConstructorParams); + deploy(overrides?: PayableOverrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: PayableOverrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): PaymentDepositAccount; + connect(signer: Signer): PaymentDepositAccount__factory; + static readonly bytecode = "0x608060405261001e679894797dc84081af60c01b61009760201b60201c565b610038674e0f327275f95bf160c01b61009760201b60201c565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061009267bca2a619426d502460c01b61009a60201b60201c565b61009d565b50565b50565b61080c806100ac6000396000f3fe60806040526004361061007f5760003560e01c8063abe124f61161004e578063abe124f6146102f8578063b719e0571461034e578063c25a4496146103ba578063f77c47911461041057610086565b8063062e4f9c1461008b5780633f579f42146100f75780636480a27b146102205780636c3da61f1461028c57610086565b3661008657005b600080fd5b34801561009757600080fd5b506100df600480360360208110156100ae57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610451565b60405180821515815260200191505060405180910390f35b34801561010357600080fd5b506101a56004803603606081101561011a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561016157600080fd5b82018360208201111561017357600080fd5b8035906020019184600183028401116401000000008311171561019557600080fd5b9091929391929390505050610458565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e55780820151818401526020810190506101ca565b50505050905090810190601f1680156102125780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561022c57600080fd5b506102746004803603602081101561024357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061078c565b60405180821515815260200191505060405180910390f35b34801561029857600080fd5b506102e0600480360360208110156102af57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610797565b60405180821515815260200191505060405180910390f35b34801561030457600080fd5b5061034c6004803603602081101561031b57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107a2565b005b34801561035a57600080fd5b506103a26004803603602081101561037157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107a5565b60405180821515815260200191505060405180910390f35b3480156103c657600080fd5b5061040e600480360360208110156103dd57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107ac565b005b34801561041c57600080fd5b506104256107af565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000919050565b606061046e67d75916bd4c2e4fad60c01b6107ac565b61048267a226552386468aff60c01b6107a2565b61049667bb06267d15cafc8560c01b6107a2565b6104aa67d0eb72184d8e714c60c01b6107a2565b6104be67f128b7cf1088330a60c01b6107a2565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610562576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806107d4602c913960400191505060405180910390fd5b6105766787dbbb5ffe0583c160c01b6107a2565b61058a67f3741b7d431227a560c01b6107a2565b61059e67610428765944746860c01b6107ac565b6105b2676e804da1f05284de60c01b6107ac565b6105c6670a116b54072e078160c01b6107ac565b6105da67fae6e3328ae368d560c01b6107ac565b60606105f067400bca7a996bd4dc60c01b6107ac565b610604678a96bcbb24b128ac60c01b6107ac565b600061061a670c06ccf9e79a56eb60c01b6107ac565b8673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d8060008114610686576040519150601f19603f3d011682016040523d82523d6000602084013e61068b565b606091505b5080935081925050506106a8676c9308f9612de55060c01b6107ac565b6106bc67b4c2e51df69df26f60c01b6107ac565b6106d067582ecd5a0e7e114b60c01b6107ac565b80610743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b610757673a312ec397e2590e60c01b6107ac565b61076b6764b769ece4930ed060c01b6107ac565b61077f67ece725b1dc907d4260c01b6107ac565b8192505050949350505050565b600060019050919050565b600060019050919050565b50565b6000919050565b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a"; + static readonly abi: ({ + inputs: any[]; + stateMutability: string; + type: string; + name?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + } | { + stateMutability: string; + type: string; + inputs?: undefined; + name?: undefined; + outputs?: undefined; + })[]; + static createInterface(): PaymentDepositAccountInterface; + static connect(address: string, signerOrProvider: Signer | Provider): PaymentDepositAccount; +} +export {}; diff --git a/dist/typings/factories/PaymentDepositAccount__factory.js b/dist/typings/factories/PaymentDepositAccount__factory.js new file mode 100644 index 00000000..724039b3 --- /dev/null +++ b/dist/typings/factories/PaymentDepositAccount__factory.js @@ -0,0 +1,192 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PaymentDepositAccount__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [], + stateMutability: "payable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__624bed52", + type: "bytes8", + }, + ], + name: "c_624bed52", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__e208e0f4", + type: "bytes8", + }, + ], + name: "c_e208e0f4", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__624bed52", + type: "bytes8", + }, + ], + name: "c_false624bed52", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__e208e0f4", + type: "bytes8", + }, + ], + name: "c_falsee208e0f4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__624bed52", + type: "bytes8", + }, + ], + name: "c_true624bed52", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__e208e0f4", + type: "bytes8", + }, + ], + name: "c_truee208e0f4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "controller", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeTransaction", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +]; +const _bytecode = "0x608060405261001e679894797dc84081af60c01b61009760201b60201c565b610038674e0f327275f95bf160c01b61009760201b60201c565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061009267bca2a619426d502460c01b61009a60201b60201c565b61009d565b50565b50565b61080c806100ac6000396000f3fe60806040526004361061007f5760003560e01c8063abe124f61161004e578063abe124f6146102f8578063b719e0571461034e578063c25a4496146103ba578063f77c47911461041057610086565b8063062e4f9c1461008b5780633f579f42146100f75780636480a27b146102205780636c3da61f1461028c57610086565b3661008657005b600080fd5b34801561009757600080fd5b506100df600480360360208110156100ae57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610451565b60405180821515815260200191505060405180910390f35b34801561010357600080fd5b506101a56004803603606081101561011a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561016157600080fd5b82018360208201111561017357600080fd5b8035906020019184600183028401116401000000008311171561019557600080fd5b9091929391929390505050610458565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e55780820151818401526020810190506101ca565b50505050905090810190601f1680156102125780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561022c57600080fd5b506102746004803603602081101561024357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061078c565b60405180821515815260200191505060405180910390f35b34801561029857600080fd5b506102e0600480360360208110156102af57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610797565b60405180821515815260200191505060405180910390f35b34801561030457600080fd5b5061034c6004803603602081101561031b57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107a2565b005b34801561035a57600080fd5b506103a26004803603602081101561037157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107a5565b60405180821515815260200191505060405180910390f35b3480156103c657600080fd5b5061040e600480360360208110156103dd57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107ac565b005b34801561041c57600080fd5b506104256107af565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000919050565b606061046e67d75916bd4c2e4fad60c01b6107ac565b61048267a226552386468aff60c01b6107a2565b61049667bb06267d15cafc8560c01b6107a2565b6104aa67d0eb72184d8e714c60c01b6107a2565b6104be67f128b7cf1088330a60c01b6107a2565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610562576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806107d4602c913960400191505060405180910390fd5b6105766787dbbb5ffe0583c160c01b6107a2565b61058a67f3741b7d431227a560c01b6107a2565b61059e67610428765944746860c01b6107ac565b6105b2676e804da1f05284de60c01b6107ac565b6105c6670a116b54072e078160c01b6107ac565b6105da67fae6e3328ae368d560c01b6107ac565b60606105f067400bca7a996bd4dc60c01b6107ac565b610604678a96bcbb24b128ac60c01b6107ac565b600061061a670c06ccf9e79a56eb60c01b6107ac565b8673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d8060008114610686576040519150601f19603f3d011682016040523d82523d6000602084013e61068b565b606091505b5080935081925050506106a8676c9308f9612de55060c01b6107ac565b6106bc67b4c2e51df69df26f60c01b6107ac565b6106d067582ecd5a0e7e114b60c01b6107ac565b80610743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b610757673a312ec397e2590e60c01b6107ac565b61076b6764b769ece4930ed060c01b6107ac565b61077f67ece725b1dc907d4260c01b6107ac565b8192505050949350505050565b600060019050919050565b600060019050919050565b50565b6000919050565b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class PaymentDepositAccount__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.PaymentDepositAccount__factory = PaymentDepositAccount__factory; +PaymentDepositAccount__factory.bytecode = _bytecode; +PaymentDepositAccount__factory.abi = _abi; diff --git a/dist/typings/factories/PaymentRegistry__factory.d.ts b/dist/typings/factories/PaymentRegistry__factory.d.ts new file mode 100644 index 00000000..7c1818fc --- /dev/null +++ b/dist/typings/factories/PaymentRegistry__factory.d.ts @@ -0,0 +1,74 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PaymentRegistry, PaymentRegistryInterface } from "../PaymentRegistry"; +declare type PaymentRegistryConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class PaymentRegistry__factory extends ContractFactory { + constructor(...args: PaymentRegistryConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): PaymentRegistry; + connect(signer: Signer): PaymentRegistry__factory; + static readonly bytecode = "0x60806040523480156200001157600080fd5b506200002e676ed90a7f5cb15c7560c01b6200017e60201b60201c565b6200004a675e592fe27197979c60c01b6200018160201b60201c565b6200006667eca2e4778f3efef360c01b6200018160201b60201c565b32600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000c367ce0e365443bb826260c01b6200018460201b60201c565b620000df6783f6a3768f043c5060c01b6200018460201b60201c565b620000fb67f7775edf55ee500260c01b6200018460201b60201c565b6000620001196799c44ec6f63d8b6d60c01b6200018460201b60201c565b4690506200013867f60b0de5a48d87f360c01b6200018460201b60201c565b80600281905550506200015c67db84cf13641fc64d60c01b6200018760201b60201c565b6200017867baa6cc62f05e2a2460c01b6200018a60201b60201c565b6200018d565b50565b50565b50565b50565b50565b617d64806200019d6000396000f3fe60806040523480156200001157600080fd5b50600436106200028c5760003560e01c80638a1773ab1162000165578063bdff4b3b11620000d5578063d2c83b9a1162000093578063d2c83b9a146200089d578063da1b213d14620008bf578063dc7d6c3114620008df578063df0433801462000915578063e0fe396e1462000935578063e831bfba1462000955576200028c565b8063bdff4b3b14620007a3578063c1cad69e14620007c5578063c36326e714620007fb578063c369d5fe1462000831578063d0f710d61462000867576200028c565b8063a526d83b1162000123578063a526d83b14620006d7578063abafcde414620006f7578063acd2a8841462000717578063b0274a73146200074d578063bcc9b17d146200076d576200028c565b80638a1773ab14620006095780639130c06e146200063f5780639a85fae2146200065f5780639a8a0592146200067f578063a4db4b6b14620006a1576200028c565b80635405622e11620002015780636866da5211620001bf5780636866da52146200053b57806371404156146200055b5780637f130864146200057b57806384389a2b14620005b157806387d3131314620005e7576200028c565b80635405622e1462000459578063589731f8146200047957806360bf4df214620004af5780636121fcfc14620004e55780636524a947146200051b576200028c565b806321a5f5da116200024f57806321a5f5da146200035f5780632e4f161e14620003955780632e6afd6e14620003cb5780632e7037a01462000401578063392e53cd1462000437576200028c565b80630c4b1a1714620002915780630c68ba2114620002b1578063116191b614620002e75780631262ed1c146200030957806318121646146200033f575b600080fd5b620002af6004803603810190620002a9919062005dde565b62000975565b005b620002cf6004803603810190620002c99190620059f6565b62000978565b604051620002de919062006c70565b60405180910390f35b620002f162000a0f565b60405162000300919062006a23565b60405180910390f35b62000327600480360381019062000321919062005dde565b62000a35565b60405162000336919062006c70565b60405180910390f35b6200035d600480360381019062000357919062005dde565b62000a40565b005b6200037d600480360381019062000377919062005dde565b62000a43565b6040516200038c919062006c70565b60405180910390f35b620003b36004803603810190620003ad919062005a63565b62000a4e565b604051620003c2919062006c8d565b60405180910390f35b620003e96004803603810190620003e3919062005dde565b62000aaa565b604051620003f8919062006c70565b60405180910390f35b6200041f600480360381019062000419919062005eed565b62000ab1565b6040516200042e919062006c8d565b60405180910390f35b6200044162000b15565b60405162000450919062006c70565b60405180910390f35b62000477600480360381019062000471919062005dde565b62000bb0565b005b62000497600480360381019062000491919062005dde565b62000bb3565b604051620004a6919062006c70565b60405180910390f35b620004cd6004803603810190620004c79190620059f6565b62000bba565b604051620004dc919062006a23565b60405180910390f35b620005036004803603810190620004fd9190620059f6565b62000c10565b60405162000512919062006c70565b60405180910390f35b620005396004803603810190620005339190620059f6565b62000cee565b005b62000559600480360381019062000553919062005cb4565b62000d3e565b005b620005796004803603810190620005739190620059f6565b6200125b565b005b62000599600480360381019062000593919062005dde565b62001636565b604051620005a8919062006c70565b60405180910390f35b620005cf6004803603810190620005c9919062005f19565b62001641565b604051620005de919062006c8d565b60405180910390f35b620005f1620016b4565b60405162000600919062006deb565b60405180910390f35b62000627600480360381019062000621919062005d54565b620016da565b604051620006369190620070b2565b60405180910390f35b6200065d6004803603810190620006579190620059f6565b6200173c565b005b6200067d600480360381019062000677919062005acf565b62001ced565b005b6200068962001ec8565b604051620006989190620070b2565b60405180910390f35b620006bf6004803603810190620006b9919062005dde565b62001ece565b604051620006ce919062006c70565b60405180910390f35b620006f56004803603810190620006ef9190620059f6565b62001ed9565b005b6200071560048036038101906200070f919062005dde565b62002067565b005b6200073560048036038101906200072f919062005dde565b6200206a565b60405162000744919062006c70565b60405180910390f35b6200076b6004803603810190620007659190620059f6565b62002071565b005b6200078b600480360381019062000785919062005dde565b620023e1565b6040516200079a919062006c70565b60405180910390f35b620007ad620023ec565b604051620007bc9190620070b2565b60405180910390f35b620007e36004803603810190620007dd919062005dde565b620023f2565b604051620007f2919062006c70565b60405180910390f35b62000819600480360381019062000813919062005a22565b620023f9565b604051620008289190620070b2565b60405180910390f35b6200084f600480360381019062000849919062005dde565b620024c4565b6040516200085e919062006c70565b60405180910390f35b6200088560048036038101906200087f919062005d80565b620024cb565b60405162000894919062006c70565b60405180910390f35b620008a762002568565b604051620008b6919062006dce565b60405180910390f35b620008dd6004803603810190620008d7919062005bb6565b6200258e565b005b620008fd6004803603810190620008f7919062005a22565b62002763565b6040516200090c9190620070b2565b60405180910390f35b6200093360048036038101906200092d919062005acf565b6200282f565b005b6200095360048036038101906200094d919062005e4f565b62002a00565b005b6200097360048036038101906200096d919062005dde565b62002e21565b005b50565b60006200099067d9e99bddfebda2f060c01b62000bb0565b620009a6676401fd9fc2105e0160c01b62000bb0565b620009bc6733760aa820b07e2a60c01b62000bb0565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b50565b600060019050919050565b600062000a666736bb89c4ecbfe20960c01b62002067565b62000a7c67e60487b4e67a440e60c01b62002067565b62000a9267582b270858c936ab60c01b62002067565b62000aa08585858562002e24565b9050949350505050565b6000919050565b600062000ac967214450377faf2dca60c01b62002067565b62000adf6737faf866564a276460c01b62002067565b62000af567c6dd92c069b9d30e60c01b62002067565b62000b0e82600001518360200151846040015162002ea1565b9050919050565b600062000b2d6726ed6cc6ca12515c60c01b62000a40565b62000b4367f3fc49482028cbb860c01b62000a40565b62000b596740317a79cae6a3ff60c01b62000a40565b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b50565b6000919050565b600062000bd26731ca53459f8b9cda60c01b62002067565b62000be867cd414bc5a50d96b560c01b62002067565b62000bfe67e8acc77cfdec5c1560c01b62002067565b62000c098262002f3f565b9050919050565b600062000c2867e8a60e9a69c0525660c01b62002067565b62000c3e67660b6d0421c844e260c01b62002067565b62000c5467d3cacfb819e2f00660c01b62002067565b600073ffffffffffffffffffffffffffffffffffffffff16600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b62000d0467570640b07c12d58a60c01b62002067565b62000d1a67223ac86b8c0612ae60c01b62002067565b62000d306742ae1602e32cd7ef60c01b62002067565b62000d3b81620030aa565b50565b62000d5467918509026124e0b260c01b62002067565b62000d6a6743c778e90affb12760c01b62002067565b62000d8067b33e063612f7799d60c01b62002067565b600062000d8c620033a4565b905062000da467adb23a0601167ccd60c01b62002067565b62000dba67c4ab5f7f86bf109a60c01b62002067565b600062000e50600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205486620033f990919063ffffffff16565b905062000e6867578ccd8c5ec3fc8460c01b62002067565b62000e7e67157d3832c55031ab60c01b62002067565b62000e9467e6d0f71203a7ac9e60c01b62002067565b6000811162000eda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ed19062006f5e565b60405180910390fd5b62000ef067a12dd3560d4fdb1060c01b62002067565b62000f0667239c295c8502f02460c01b62002067565b62000f1c67056efae46473b78160c01b62002067565b600062000f2b83888862002ea1565b905062000f43674a33f86dee681b8060c01b62002067565b62000f59677e10bd0c2c0e189960c01b62002067565b62000f6f670103a18a022f425a60c01b62002067565b62000fbf8186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506200346b565b62001001576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ff89062007090565b60405180910390fd5b6200101767109ade323413e8eb60c01b62002067565b6200102d67cacf3efba89f986060c01b62002067565b85600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550620010c767028a34a2d7a074ac60c01b62002067565b620010dd67d7bddd2858767c9560c01b62002067565b620010e9838862003549565b620010ff674b5e142be74a164c60c01b62002067565b62001115677cf91695b18d76f060c01b62002067565b62001185600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848985620037e8565b6200119b673d9d5f3f70a752de60c01b62002067565b620011b167fea9f069af22fa6460c01b62002067565b7f95f66b073d65f18e43f6b76c7ab8557787f5f766d86cab7c9c76f41be9f8abc6600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168489896040516200124a949392919062006af4565b60405180910390a150505050505050565b6200127167f772222a3366273960c01b62000bb0565b62001287677e48a4752a028e1460c01b62000bb0565b6200129d6754e2f8cd8fda0cfe60c01b62000bb0565b620012b3671b1abbc8110e006760c01b62000bb0565b620012c9677621c15edc08840a60c01b62000bb0565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1662001357576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200134e9062006f3c565b60405180910390fd5b6200136d671978b446280e03b660c01b62000bb0565b6200138367bc99b99e8c2c7a2260c01b62000bb0565b6200139967afd0aa94ba119c4e60c01b62000bb0565b620013af670fe65c577fbdf81160c01b62000bb0565b620013c567e175d6b24c96a59a60c01b62000bb0565b620013db67514f675749914bc160c01b62000bb0565b620013f167fed39a5b1d24bceb60c01b62000bb0565b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16141562001463576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200145a906200704c565b60405180910390fd5b6200147967325d0391dd900ca560c01b62000bb0565b6200148f67f494ac4bc126e05760c01b62000bb0565b620014a567a8a2f5acd805e41c60c01b62000bb0565b620014bb679f1149f801dce85b60c01b62000bb0565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1662001549576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620015409062006fe6565b60405180910390fd5b6200155f67e767f88c374b22f760c01b62000bb0565b62001575679a8eb2ad91b01fb960c01b62000bb0565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550620015e2675f52f4e3c8e1709960c01b62000bb0565b620015f867b8b235546176405e60c01b62000bb0565b7fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b32826040516200162b92919062006a5d565b60405180910390a150565b600060019050919050565b6000620016596713ed686498f015d160c01b62002067565b6200166f67ca5922562c17be8660c01b62002067565b6200168567c1b37b01266ac24360c01b62002067565b620016ad826000015183602001518460400151856060015186608001518760a0015162003c0c565b9050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000620016f267da2e33f8443209c660c01b62002067565b620017086706c5d2e88da9d1e760c01b62002067565b6200171e674b15fd83bebdb0e260c01b62002067565b60086000838152602001908152602001600020600001549050919050565b62001752671a40322cd5abc5a260c01b62002067565b6200176867f106d21e911c22a660c01b62002067565b6200177e678ea7a0ee89f50a2460c01b62002067565b60006200178a620033a4565b9050620017a267bcef315aae85ce3660c01b62002067565b620017b86721811e8f9c14d53360c01b62002067565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506200185267897447e1881909ed60c01b62002067565b6200186867f1a61735241d089260c01b62002067565b6200187e673de26f5018e4601d60c01b62002067565b6000811415620018c5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620018bc9062006ef8565b60405180910390fd5b620018db67b15d3a9f8e11801260c01b62002067565b620018f1671a063760447950ef60c01b62002067565b62001907672bbc5a4b920c70ea60c01b62002067565b6200191d67b1663fede356804260c01b62002067565b4281111562001963576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200195a9062006f80565b60405180910390fd5b62001979678bcc78f1d252616c60c01b62002067565b6200198f679cbbb084247075a260c01b62002067565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555062001a2a6751e3269fdeeb79bb60c01b62002067565b62001a4067cebea9208fb07a6a60c01b62002067565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905062001abd678076a3acb44263c260c01b62002067565b62001ad367d4210f1c8552b84060c01b62002067565b600062001aeb6759d24b5866c77eaf60c01b62002067565b62001b0167afe4c818abc36fc560c01b62002067565b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141562001b835762001b4d6776c482e38114900d60c01b62002067565b62001b6367cdd416a814f87b8860c01b62002067565b8173ffffffffffffffffffffffffffffffffffffffff1631905062001c41565b62001b996743e93e9662c3f48760c01b62002067565b62001baf67fa160c0c5a9ab87460c01b62002067565b8473ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b815260040162001bea919062006a23565b60206040518083038186803b15801562001c0357600080fd5b505afa15801562001c18573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001c3e919062005f45565b90505b62001c57672a4ff42932d4c6dc60c01b62002067565b62001c6d673ea6047a6a82887260c01b62002067565b62001c7b82858784620037e8565b62001c916757dbbad63fddae7860c01b62002067565b62001ca76743d9684cdc328a4160c01b62002067565b7f5300d9a2838baade7cdc628c82cb80c1298853ba5f389d51e2b47330336aeffc8285878460405162001cde949392919062006af4565b60405180910390a15050505050565b62001d03675d92544cb8942e6e60c01b62002067565b62001d1967250ecc88e2e3343360c01b62002067565b62001d2f6713fbf401ed42217360c01b62002067565b600062001d3b620033a4565b905062001d5367eca29ce47195e1c460c01b62002067565b62001d696711615b621e48095760c01b62002067565b600080600062001e088d858e8e8e8e8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505062003cb3565b92509250925062001e24670d0b626aa50fa12d60c01b62002067565b62001e3a6721aff132ffe07e6460c01b62002067565b62001e528262001e4a8662002f3f565b8e84620037e8565b62001e68679190cce2aecba75760c01b62002067565b62001e7e6777cdad2b8821e0e360c01b62002067565b7f771bc0494e1a2fcbef19a8762845000d8c4500454c756a7370c955e39ed60fd4838260405162001eb192919062006d17565b60405180910390a150505050505050505050505050565b60025481565b600060019050919050565b62001eef67b59862a5cb01d1d860c01b62000bb0565b62001f05677e48a4752a028e1460c01b62000bb0565b62001f1b6754e2f8cd8fda0cfe60c01b62000bb0565b62001f31671b1abbc8110e006760c01b62000bb0565b62001f47677621c15edc08840a60c01b62000bb0565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1662001fd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162001fcc9062006f3c565b60405180910390fd5b62001feb671978b446280e03b660c01b62000bb0565b6200200167bc99b99e8c2c7a2260c01b62000bb0565b6200201767e0409d61ef95483b60c01b62000bb0565b6200202d67acb2c628a7cbdba860c01b62000bb0565b62002043677f6b80ac4f415fbe60c01b62000bb0565b6200205967c7dcdfc4bd89af4960c01b62000bb0565b620020648162004526565b50565b50565b6000919050565b620020876732b561056c43b25960c01b62002067565b6200209d67d97b42b510da68c060c01b62002067565b620020b36755c0c458d57b0a2960c01b62002067565b6000620020bf620033a4565b9050620020d7677a79807f20b3b68360c01b62002067565b620020ed67eac57aeca764e67860c01b62002067565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506200218767015eb0fe1c75bba260c01b62002067565b6200219d672094abd66a2c6fa460c01b62002067565b620021b3678036aae33dd79dd060c01b62002067565b60008114620021f9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620021f09062006e92565b60405180910390fd5b6200220f670ce96be04b61166760c01b62002067565b620022256705426ec32359290d60c01b62002067565b6200223b67d5a5b696418736a660c01b62002067565b6200224682620030aa565b6200225c678417c7c294e46abc60c01b62002067565b6200227360065442620047c490919063ffffffff16565b90506200228b67e20ad1701434089160c01b62002067565b80600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555062002325674aa91cd4437e4cca60c01b62002067565b6200233b6742bea4f3a3b01d0d60c01b62002067565b7fed3c8c6cdfc6d7b91dc9db3e1f54866587c26c3c3e0f9e32cd1944974be43a50600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838584604051620023d4949392919062006af4565b60405180910390a1505050565b600060019050919050565b60065481565b6000919050565b600062002410662f18c76d42e7fd60c01b62002067565b6200242667f71b2ca55e47233960c01b62002067565b6200243c6773b5b99a4eebc04460c01b62002067565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000919050565b6000620024e36746d5f36e497b280d60c01b62000bb0565b620024f9677077a4665ef04d8360c01b62000bb0565b6200250f6788288bf71f1972a760c01b62000bb0565b6200255f8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506200346b565b90509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620025a46731f0b44650b6739d60c01b62002067565b620025ba676c6f285f5ec419aa60c01b62002067565b620025d0674b8643e87f51ab7860c01b62002067565b6000620025dc620033a4565b9050620025f4676cf65ea3dd6cea8d60c01b62002067565b6200260a67ea4657749694fc3060c01b62002067565b6000806000620026a98e858f8f8f8f8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505062003cb3565b925092509250620026c56710d64b9a55d53e9960c01b62002067565b620026db671780eb91dc48385160c01b62002067565b620026ea82858f848d620048e3565b620027006772e240e1101c48a060c01b62002067565b62002716677d58ce1c66bfd30260c01b62002067565b7f8b67efde501ee9cd0e771f7436554c44a5c076239ff3a6fbb397646a4689c0f283828b6040516200274b9392919062006d44565b60405180910390a15050505050505050505050505050565b60006200277b678e0aebdcc0e2302160c01b62002067565b620027916702406ea20164aba860c01b62002067565b620027a76728aeb1bdf6b1978560c01b62002067565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b62002845676edeb9f37c3787da60c01b62002067565b6200285b671e5a18f5856214e560c01b62002067565b62002871674c175eb61042b96560c01b62002067565b60006200287d620033a4565b90506200289567a8b4341a721fc79d60c01b62002067565b620028ab679f27b523a6cff21d60c01b62002067565b60008060006200294a8d858e8e8e8e8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505062003cb3565b92509250925062002966674115f842c65f077160c01b62002067565b6200297c673bbfc68db85864a260c01b62002067565b6200298a82858e84620037e8565b620029a067f7731a63cc9cab9360c01b62002067565b620029b667ab813463f035efd460c01b62002067565b7f6675346cd43846f7d47c310d39fb5c15bc7db66b3770338cdf1f133613a5ae988382604051620029e992919062006d17565b60405180910390a150505050505050505050505050565b62002a1667038fae57cc7de53a60c01b62002067565b62002a2c67b2266613e068a5ae60c01b62000a40565b62002a42676a66a63870f964f960c01b62000a40565b62002a586772f22eca890742ba60c01b62000a40565b62002a6e67c8ab57d60023f99860c01b62000a40565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161462002b01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162002af89062006e70565b60405180910390fd5b62002b1767d31dec9098d614f660c01b62000a40565b62002b2d67a184879381a9c67460c01b62000a40565b6000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062002b85675e44e6e1c885710560c01b62000a40565b62002b9b672687f8653cc2d56860c01b62002067565b62002bb16789245d786ace7c7c60c01b62002067565b62002bc767b5c21824c240d52860c01b62002067565b85600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062002c1e670987aa5e3c96826760c01b62002067565b84600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062002c756773244fe7fd40136460c01b62002067565b62002c8b67801a170edfd2b34660c01b62002067565b600084141562002cd15762002cab67f36fa7f804a7e53f60c01b62002067565b62002cc1673687809c1b81861260c01b62002067565b6224ea0060068190555062002d05565b62002ce7678708451d8a1368c460c01b62002067565b62002cfd67d2ce0332a46d370460c01b62002067565b836006819055505b62002d1b675c719caf67bb9c5760c01b62002067565b62002d316743714b117873d46a60c01b62002067565b62002d7d838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505062004b00565b62002d9367658c9b1ee75bd75f60c01b62002067565b62002da9671af0627b008e0f5860c01b62002067565b62002db48162004c7f565b62002dca6732ca1833e9907bb960c01b62000a40565b62002de0672942130a5b94b82160c01b62000a40565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e63260405162002e11919062006a40565b60405180910390a1505050505050565b50565b600062002e3c674644ccb05703b3b460c01b62002067565b62002e5267f2046857ed11fca760c01b62002067565b62002e6867ee9f0bde74d3913860c01b62002067565b8484848460405160200162002e8194939291906200683c565b604051602081830303815290604052805190602001209050949350505050565b600062002eb967b8f45bbd682e7c0260c01b62002067565b62002ecf67beaf3087b9c66a6760c01b62002067565b62002ee567dfb6ca2f7d8498d160c01b62002067565b62002f367f3b3087c8f883f1f44cabe66444f5f9d96f69de6a88f364ea10959eef0331414a85858560405160200162002f21939291906200690e565b60405160208183030381529060405262004cef565b90509392505050565b600062002f5767285310379ac432e560c01b62002067565b62002f6d675969fbb06d27363760c01b62002067565b62002f836761a6bf3b9fb9357960c01b62002067565b60008260405160200162002f9891906200681f565b60405160208183030381529060405280519060200120905062002fc667c0c3d7edb7bd03b360c01b62002067565b62002fdc67fb466e08e9a49fc560c01b62002067565b60606040518060200162002ff09062005726565b6020820181038252601f19601f8201166040525090506200301c67e870d1f401d8fcf760c01b62002067565b620030326732d23225921de5c860c01b62002067565b600060ff60f81b3084848051906020012060405160200162003058949392919062006951565b6040516020818303038152906040528051906020012090506200308667bb8017be492d4db460c01b62002067565b6200309c67c7318b64a6a7421460c01b62002067565b8060001c9350505050919050565b620030c0676fce0aa97515b77d60c01b62002067565b620030d667c7c36c0a6756529a60c01b62002067565b620030ec6752005f21e49feb4660c01b62002067565b600073ffffffffffffffffffffffffffffffffffffffff16600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156200338a576200319a67082d1a5a0b028bf260c01b62002067565b620031b067d5909b2f1e36a57260c01b62002067565b620031c667f2c73688812ad0a060c01b62002067565b600081604051602001620031db91906200681f565b6040516020818303038152906040528051906020012090506200320967147752e2c189d75b60c01b62002067565b80604051620032189062005726565b8190604051809103906000f590508015801562003239573d6000803e3d6000fd5b50600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620032d06785dd95c97bba586c60c01b62002067565b620032e6677612bbe53fbed36760c01b62002067565b7fd80572c0f2f24f2d9d726d831bd860ed82b12bafaf01cfb6e4d38fb23c4347e9600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040516200337b92919062006a8a565b60405180910390a150620033a1565b620033a067a7c6080ba2fdccb460c01b62002067565b5b50565b6000620033bc67cfc35b626608c6f260c01b62000975565b620033d2677e4f9863b1e00bcc60c01b62000975565b620033e867e01fbdbc1b0ec7df60c01b62000975565b620033f4602862004d76565b905090565b60006200341167014583c13352eba860c01b62004f2e565b62003427677eb719b38b6a5c0560c01b62004f2e565b6200343d676b8cf5cee081f8c560c01b62004f2e565b62003463838360405180606001604052806021815260200162007d376021913962004f31565b905092915050565b60006200348367bec4827058d1d27d60c01b62000bb0565b62003499672f274b74d16058ba60c01b62000bb0565b620034af670dd4bedb64e2a2d160c01b62000bb0565b6000620034c683856200502390919063ffffffff16565b9050620034de6748284973b654d0c360c01b62000bb0565b620034f467af16bd1d5a57497b60c01b62000bb0565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b6200355f67c904e3ae3901100460c01b62002067565b6200357567e537229ec0efae4860c01b62002067565b6200358b67f038a7f588c7fac460c01b62002067565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111562003796576200362a672a9ceb9dfd13184460c01b62002067565b6200364067c31cff3f3e550a5b60c01b62002067565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550620036db672b280b06da382d9960c01b62002067565b620036f1675adc70d487c10a6760c01b62002067565b7fa19281a6f3163da06f6b82f3ecf0130493c52aba23cdc2a312f652742f0d1801600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383604051620037889392919062006ab7565b60405180910390a1620037e4565b620037ac67ececb952128405aa60c01b62002067565b620037c26760518e6fc9a4e5b360c01b62002067565b620037d8675db6617262db666b60c01b62002067565b620037e382620030aa565b5b5050565b620037fe673a2eb384e40e758060c01b62002067565b62003814672cb766e71c7a406960c01b62002067565b6200382a67278724ebb0cf7af860c01b62002067565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620039905762003876676e84abefbe8d854b60c01b62002067565b6200388c67f0da4acbe07aaf6a60c01b62002067565b620038a267ca471dbb8f3bdd2d60c01b62002067565b8373ffffffffffffffffffffffffffffffffffffffff16633f579f428483600067ffffffffffffffff81118015620038d957600080fd5b506040519080825280601f01601f1916602001820160405280156200390d5781602001600182028036833780820191505090505b506040518463ffffffff1660e01b81526004016200392e9392919062006c2c565b600060405180830381600087803b1580156200394957600080fd5b505af11580156200395e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019062003989919062005e0a565b5062003c06565b620039a667401b4704901e051360c01b62002067565b620039bc677f2a405a6df3baf060c01b62002067565b620039d267d6569432ecb9cc9360c01b62002067565b60608473ffffffffffffffffffffffffffffffffffffffff16633f579f4284600063a9059cbb60e01b888760405160240162003a1092919062006bff565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518463ffffffff1660e01b815260040162003a8d9392919062006bbb565b600060405180830381600087803b15801562003aa857600080fd5b505af115801562003abd573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019062003ae8919062005e0a565b905062003b00677e17dc092f47a91c60c01b62002067565b62003b166772d8d39890fc6c2e60c01b62002067565b60008151111562003bed5762003b3767bf9ce49733f0d5d460c01b62002067565b62003b4d67e13175f8b139236760c01b62002067565b62003b63672fe2ba94c1340ae460c01b62002067565b62003b79670c63a27c41f188c760c01b62002067565b8080602001905181019062003b8f919062005d28565b62003bd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162003bc89062006f1a565b60405180910390fd5b62003be767dd885c421cf5fbdc60c01b62002067565b62003c04565b62003c03674733c84b85ee08c060c01b62002067565b5b505b50505050565b600062003c2467b2149190a8543f7960c01b62002067565b62003c3a673810433fad7eeddf60c01b62002067565b62003c506751c11bbc91e2bca060c01b62002067565b62003ca77f745089e29f2abf28f618236a5dc04d214ac05ead3440ba532b69e9d160ba2e7288888888888860405160200162003c929695949392919062006892565b60405160208183030381529060405262004cef565b90509695505050505050565b600080600062003cce67311a2b478cbd282960c01b62002067565b62003ce467df17c1c75aeafe1760c01b62002067565b62003cfa67bf7c2195446d590560c01b62002067565b600062003d0c8c8c8c8c8c8c62003c0c565b905062003d246783b15be829979b3c60c01b62002067565b62003d3a67a45e1ec83381431360c01b62002067565b60008651141562003eb05762003d5b6785f0004beed1333760c01b62002067565b62003d7167ac895a243b1e70d160c01b62002067565b62003d8767b1616e28e494530d60c01b62002067565b62003d9d67597ac664a0799cdc60c01b62002067565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166359b52ef88d838b6040518463ffffffff1660e01b815260040162003dfe9392919062006b7e565b60206040518083038186803b15801562003e1757600080fd5b505afa15801562003e2c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062003e52919062005d28565b62003e94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162003e8b9062007090565b60405180910390fd5b62003eaa67f051107645bb2f5f60c01b62002067565b620041ea565b62003ec66797c9ecd66da0292d60c01b62002067565b62003edc675ac8aa1c6342917560c01b62002067565b62003ef2679978cc53dda5abb160c01b62002067565b600062003f0987836200502390919063ffffffff16565b905062003f2167417165fc7f166ada60c01b62002067565b62003f37676efa792376e005a660c01b62002067565b8073ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff1614620041d15762003f81672a2e7dacaf78928860c01b62002067565b62003f97670bda7ab114ac40ae60c01b62002067565b62003fad678bf9bed1ee64214e60c01b62002067565b62003fc367d485703a6bf78db460c01b62002067565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334d323a48e838c6040518463ffffffff1660e01b8152600401620040249392919062006b41565b60206040518083038186803b1580156200403d57600080fd5b505afa15801562004052573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062004078919062005d28565b8015620040975750620040966790d690c867c69c3b60c01b620023e1565b5b80620041735750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334d323a48e838c6040518463ffffffff1660e01b8152600401620040ff9392919062006b41565b60206040518083038186803b1580156200411857600080fd5b505afa1580156200412d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062004153919062005d28565b801562004172575062004171671c2094d1644273ba60c01b620023e1565b5b5b620041b5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620041ac9062006fc4565b60405180910390fd5b620041cb67f08f78570eea95c760c01b62002067565b620041e8565b620041e7672a7d6e5a2e5d307560c01b62002067565b5b505b6200420067bc93d613e072dd5260c01b62002067565b62004216672b45b526b06e0c0760c01b62002067565b6200422c678d7692b21dbec17060c01b62002067565b6200423881866200346b565b6200427a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620042719062007090565b60405180910390fd5b6200429067d226df703a97dbf460c01b62002067565b620042a6672c9f99655ac639c960c01b62002067565b620042b48c8c8c8c62002e24565b9350620042cc6749690a565fea1a8960c01b62002067565b620042f7600860008681526020019081526020016000206000015488620033f990919063ffffffff16565b91506200430f676b1f4e0135277c7d60c01b62002067565b6200432567e138ecd8c234b6b960c01b62002067565b6200433b67a958077cbd809ed260c01b62002067565b600082141562004382576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620043799062006eb4565b60405180910390fd5b620043986773e90c803b4066e160c01b62002067565b620043ae679427a9f51ed5eee460c01b62002067565b866008600086815260200190815260200160002060000181905550620043df674bf084bc0b16d95660c01b62002067565b620043f567db29c573a19a624860c01b62002067565b620044018c8b62003549565b6200441767033d8f482a6734cc60c01b62002067565b600760008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1692506200449267ce71f1ff1c42794d60c01b62002067565b620044a867eae9d50085e0030860c01b62002067565b7f0d1cb77d1fe491f98926195d0b885509da18bc305dd1489f45610237d971ed46848d8d8d8d8c604051620044e39695949392919062006caa565b60405180910390a16200450167ac71d3f756020fd760c01b62002067565b620045176763fa8c5cf02895a560c01b62002067565b50985098509895505050505050565b6200453c6715e658c0f6e292b160c01b62000bb0565b62004552672c431971dc3f178360c01b62000bb0565b6200456867ea35c52bf51c28f760c01b62000bb0565b6200457e676c0120f97757204260c01b62000bb0565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620045f1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620045e89062006e4e565b60405180910390fd5b620046076768a59374672fe76a60c01b62000bb0565b6200461d676aacc0e4664894f760c01b62000bb0565b6200463367eacfbaa68e55918960c01b62000bb0565b6200464967b14b9b00bd32573160c01b62000bb0565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615620046d8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620046cf906200702a565b60405180910390fd5b620046ee67b43b7e075756508e60c01b62000bb0565b62004703663a0e15b185871360c01b62000bb0565b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550620047706719a12fa44495bf1260c01b62000bb0565b62004786676a185bb7ec86ed3260c01b62000bb0565b7fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051620047b992919062006a5d565b60405180910390a150565b6000620047dc67c86b29cadf0259cc60c01b62004f2e565b620047f2671cf2fd19ce80bc6460c01b62004f2e565b6200480867084e3d10c702b08960c01b62004f2e565b6000828401905062004825678715f5819eec045d60c01b62004f2e565b6200483b67389bd6f3088f8ddc60c01b62004f2e565b6200485167395edfe58ce67c0160c01b62004f2e565b8381101562004897576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200488e9062007008565b60405180910390fd5b620048ad67112f71c9280eda0a60c01b62004f2e565b620048c3673364fede1fdbaa8a60c01b62004f2e565b620048d96709a89731fdc49fbb60c01b62004f2e565b8091505092915050565b620048f967030f285a60ecefc360c01b62002067565b6200490f67fd9571c5c0f44df660c01b62002067565b62004925679cc362db300cb21860c01b62002067565b6200493b670a22294cfbf9f46160c01b62002067565b6000811162004981576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620049789062006e2c565b60405180910390fd5b620049976762964a89cfb16b0a60c01b62002067565b620049ad671a0aaa133b20e44560c01b62002067565b620049c3676de114036d14af3560c01b62002067565b6000620049da8284620033f990919063ffffffff16565b9050620049f26724d2a3851e27213d60c01b62002067565b62004a0867ea9e37af276df86660c01b62002067565b62004a1e67bd6009e65bc53ce560c01b62002067565b6000811162004a64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162004a5b9062006fa2565b60405180910390fd5b62004a7a67fabd930319874c0d60c01b62002067565b62004a9067fac60f578025d3b560c01b62002067565b62004aa6672e6282c6a7fea9c160c01b62002067565b62004ab486868684620037e8565b62004aca67d3d6664f2bfa8cfd60c01b62002067565b62004ae067ebaa71306d6092a560c01b62002067565b62004af88662004af08762002f3f565b8685620037e8565b505050505050565b62004b16672da1cbb2c8b712bf60c01b62000bb0565b62004b2c67a22c42eaa986a7b160c01b62000bb0565b62004b4267161aa01e34b61d0a60c01b62000bb0565b60008151141562004ba05762004b6367c00dbd5b52865bb760c01b62000bb0565b62004b79678a5faf951795361260c01b62000bb0565b62004b8f6745413064a2aacfc660c01b62000bb0565b62004b9a3262004526565b62004c7c565b62004bb667d4fad28aec7c156d60c01b62000bb0565b62004bcc67a88c23ab9e9dede660c01b62000bb0565b62004be2675a0d1bd87812f63460c01b62000bb0565b60008151905062004bfe67a97ff88e96ad9c4460c01b62000bb0565b62004c14672ebda776213b4a1860c01b62000bb0565b60005b8181101562004c795762004c3667197b6470f65d698160c01b62000bb0565b62004c4c678e0c2e8e0183d04a60c01b62000bb0565b62004c6b83828151811062004c5d57fe5b602002602001015162004526565b808060010191505062004c17565b50505b50565b62004c9567b69be6bf736d8c1a60c01b62000975565b62004cab67e18b25fd36211d0160c01b62000975565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600062004d07677f88a34eed9bb47260c01b62002e21565b62004d1d6749bb13c5d53bb9db60c01b62002e21565b62004d336721a77fc5a306172f60c01b62002e21565b62004d6e60025430858560405160200162004d529493929190620069d1565b604051602081830303815290604052805190602001206200536f565b905092915050565b600062004d8e67ef0225287ba17ba060c01b62000975565b62004da46795958667c898951b60c01b62000975565b62004dba67ec06b0be9f42607760c01b62000975565b600062004dd267b7cd17d69da836b660c01b62000975565b62004de8671b7ac62a98e22a5460c01b62000975565b62004df2620053e3565b1562004ec95762004e0e674b9fe2d527bba60760c01b62000975565b62004e246737f58d18ef197c9060c01b62000975565b62004e3a679e0c2e494127333d60c01b62000975565b600083600036905003905062004e5b678767fa9e72b3efac60c01b62000975565b62004ec06000368390601485019262004e779392919062007178565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050620055cf565b91505062004ef9565b62004edf67531fb14624ef4c0060c01b62000975565b62004ef567365aa35b4857b9d560c01b62000975565b3390505b62004f0f67bb664b7abb1efcc160c01b62000975565b62004f2567c66db900ff1468ad60c01b62000975565b80915050919050565b50565b600062004f4967661b3e046c6cd30d60c01b62004f2e565b62004f5f67e38f22ae7186b57a60c01b62004f2e565b62004f7567907af1471e9eea1460c01b62004f2e565b62004f8b670ee1dc39f0f8880f60c01b62004f2e565b83831115829062004fd4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162004fcb919062006e08565b60405180910390fd5b5062004feb67722ed1e49049e2b960c01b62004f2e565b6200500167542b492b55f417a760c01b62004f2e565b6200501767d0fc59f528f581e460c01b62004f2e565b82840390509392505050565b60006200503b67610b12321a07a31960c01b62005715565b62005051670f66a519ee9137b960c01b62005715565b6200506767140d9f9935e2385360c01b62005715565b60006200507f670bfea895a9f81bec60c01b62005715565b6200509567a8c715ec3b9d89c160c01b62005715565b6041835114156200532257620050b667101129654a82afeb60c01b62005715565b620050cc67a44405322c11578a60c01b62005715565b620050e2673ae09945b2f5082360c01b62005715565b6000620050fa67900a30e48d0fc7bd60c01b62005715565b62005110677d193483635abe1860c01b62005715565b60006200512867f24e14d594e9077960c01b62005715565b6200513e67a847d7edacf7e00c60c01b62005715565b600062005156670bcc457b0963bc0f60c01b62005715565b6020860151925060408601519150606086015160001a9050620051846730650d5e99574f3560c01b62005715565b6200519a675197804ca644c8a460c01b62005715565b601b8160ff161015620051df57620051bd6781206cb7a1d9cec760c01b62005715565b620051d3679d0aaefe9954d7fb60c01b62005715565b601b81019050620051f6565b620051f567091b6422f681fe5560c01b62005715565b5b6200520c677849785c6ede9b0e60c01b62005715565b620052226732075f7517db825b60c01b62005715565b601b8160ff161480156200524857506200524767638a38da6bf5bb4360c01b62005718565b5b80620052765750601c8160ff1614801562005275575062005274671d94865be2a4ed5560c01b62005718565b5b5b1562005302576200529267657d88528f4e396b60c01b62005715565b620052a8675469679748b05cfe60c01b62005715565b60018782858560405160008152602001604052604051620052cd949392919062006d81565b6020604051602081039080840390855afa158015620052f0573d6000803e3d6000fd5b50505060206040510351935062005319565b6200531867539b701a1f57136860c01b62005715565b5b50505062005339565b6200533867f3927173995ed52360c01b62005715565b5b6200534f67303f1b174284648060c01b62005715565b6200536567c60031985823124160c01b62005715565b8091505092915050565b60006200538767cb1f58f8e99e701160c01b62005715565b6200539d67477dbcabce0c716f60c01b62005715565b620053b367c58144008cda6be160c01b62005715565b81604051602001620053c69190620069a7565b604051602081830303815290604052805190602001209050919050565b6000620053fb6718d82ab5ae60310f60c01b62000975565b6200541167b1091fd4002007a760c01b62000975565b6200542767e754ffc9cc3865c960c01b62000975565b60006200543f677ed152cd4162d4dd60c01b62000975565b6200545567d897cf3d19cf81cd60c01b62000975565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156200558557620054c2677fe0037509e467e160c01b62000975565b620054d867d0b1c04b10d8098a60c01b62000975565b620054ee670b92e025f4debba760c01b62000975565b620055046739792e98f7fbfdea60c01b62000975565b602c600036905010156200554f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620055469062006ed6565b60405180910390fd5b620055656755c879b00c45b69f60c01b62000975565b6200557b679a100b07747e893d60c01b62000975565b600190506200559c565b6200559b6757b90b57dc0a6a0160c01b62000975565b5b620055b267cc41edf636370ef460c01b62000975565b620055c867ff5a153bde944b0360c01b62000975565b8091505090565b6000620055e767e937c30ee854c6f460c01b62005723565b620055fd67ae40a839349e539460c01b62005723565b620056136779ff25ce2e3aef5860c01b62005723565b60006200562b67471a531a4d41d03a60c01b62005723565b6200564167dbf5cb870bd2bda760c01b62005723565b620056576715ee1c447c585eff60c01b62005723565b60148351146200569e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162005695906200706e565b60405180910390fd5b620056b467595b08e56ca2004360c01b62005723565b620056ca67658f3d9a047d9b2b60c01b62005723565b6c010000000000000000000000006020840151049050620056f6670a7d36500000fb3860c01b62005723565b6200570c678f46d49d645b8e7560c01b62005723565b80915050919050565b50565b600060019050919050565b50565b6108b8806200747f83390190565b6000813590506200574581620073c8565b92915050565b60008083601f8401126200575e57600080fd5b8235905067ffffffffffffffff8111156200577857600080fd5b6020830191508360208202830111156200579157600080fd5b9250929050565b600081519050620057a981620073e2565b92915050565b600081359050620057c081620073fc565b92915050565b600081359050620057d78162007416565b92915050565b60008083601f840112620057f057600080fd5b8235905067ffffffffffffffff8111156200580a57600080fd5b6020830191508360018202830111156200582357600080fd5b9250929050565b600082601f8301126200583c57600080fd5b8151620058536200584d82620070fd565b620070cf565b915080825260208301602083018583830111156200587057600080fd5b6200587d8382846200732e565b50505092915050565b600081359050620058978162007430565b92915050565b600081359050620058ae816200744a565b92915050565b600060608284031215620058c757600080fd5b620058d36060620070cf565b90506000620058e58482850162005734565b6000830152506020620058fb8482850162005734565b60208301525060406200591184828501620059c8565b60408301525092915050565b600060c082840312156200593057600080fd5b6200593c60c0620070cf565b905060006200594e8482850162005734565b6000830152506020620059648482850162005734565b60208301525060406200597a8482850162005734565b60408301525060606200599084828501620057af565b6060830152506080620059a684828501620059c8565b60808301525060a0620059bc84828501620059c8565b60a08301525092915050565b600081359050620059d98162007464565b92915050565b600081519050620059f08162007464565b92915050565b60006020828403121562005a0957600080fd5b600062005a198482850162005734565b91505092915050565b6000806040838503121562005a3657600080fd5b600062005a468582860162005734565b925050602062005a598582860162005734565b9150509250929050565b6000806000806080858703121562005a7a57600080fd5b600062005a8a8782880162005734565b945050602062005a9d8782880162005734565b935050604062005ab08782880162005734565b925050606062005ac387828801620057af565b91505092959194509250565b600080600080600080600080600060e08a8c03121562005aee57600080fd5b600062005afe8c828d0162005734565b995050602062005b118c828d0162005734565b985050604062005b248c828d01620057af565b975050606062005b378c828d01620059c8565b965050608062005b4a8c828d01620059c8565b95505060a08a013567ffffffffffffffff81111562005b6857600080fd5b62005b768c828d01620057dd565b945094505060c08a013567ffffffffffffffff81111562005b9657600080fd5b62005ba48c828d01620057dd565b92509250509295985092959850929598565b6000806000806000806000806000806101008b8d03121562005bd757600080fd5b600062005be78d828e0162005734565b9a5050602062005bfa8d828e0162005734565b995050604062005c0d8d828e01620057af565b985050606062005c208d828e01620059c8565b975050608062005c338d828e01620059c8565b96505060a062005c468d828e01620059c8565b95505060c08b013567ffffffffffffffff81111562005c6457600080fd5b62005c728d828e01620057dd565b945094505060e08b013567ffffffffffffffff81111562005c9257600080fd5b62005ca08d828e01620057dd565b92509250509295989b9194979a5092959850565b6000806000806060858703121562005ccb57600080fd5b600062005cdb8782880162005734565b945050602062005cee87828801620059c8565b935050604085013567ffffffffffffffff81111562005d0c57600080fd5b62005d1a87828801620057dd565b925092505092959194509250565b60006020828403121562005d3b57600080fd5b600062005d4b8482850162005798565b91505092915050565b60006020828403121562005d6757600080fd5b600062005d7784828501620057af565b91505092915050565b60008060006040848603121562005d9657600080fd5b600062005da686828701620057af565b935050602084013567ffffffffffffffff81111562005dc457600080fd5b62005dd286828701620057dd565b92509250509250925092565b60006020828403121562005df157600080fd5b600062005e0184828501620057c6565b91505092915050565b60006020828403121562005e1d57600080fd5b600082015167ffffffffffffffff81111562005e3857600080fd5b62005e46848285016200582a565b91505092915050565b60008060008060008060a0878903121562005e6957600080fd5b600062005e7989828a0162005886565b965050602062005e8c89828a016200589d565b955050604062005e9f89828a01620059c8565b945050606087013567ffffffffffffffff81111562005ebd57600080fd5b62005ecb89828a016200574b565b9350935050608062005ee089828a0162005734565b9150509295509295509295565b60006060828403121562005f0057600080fd5b600062005f1084828501620058b4565b91505092915050565b600060c0828403121562005f2c57600080fd5b600062005f3c848285016200591d565b91505092915050565b60006020828403121562005f5857600080fd5b600062005f6884828501620059df565b91505092915050565b62005f7c816200728e565b82525050565b62005f8d81620071ad565b82525050565b62005fa862005fa282620071ad565b62007364565b82525050565b62005fb981620071c1565b82525050565b62005fd462005fce82620071cd565b62007378565b82525050565b62005fe581620071f9565b82525050565b6200600062005ffa82620071f9565b62007382565b82525050565b600062006013826200712a565b6200601f818562007140565b9350620060318185602086016200732e565b6200603c81620073aa565b840191505092915050565b600062006054826200712a565b62006060818562007151565b9350620060728185602086016200732e565b80840191505092915050565b6200608981620072a2565b82525050565b6200609a81620072ca565b82525050565b620060ab81620072f2565b82525050565b6000620060be8262007135565b620060ca81856200715c565b9350620060dc8185602086016200732e565b620060e781620073aa565b840191505092915050565b6000620061016026836200715c565b91507f5061796d656e7452656769737472793a20696e76616c6964206465706f73697460008301527f2076616c756500000000000000000000000000000000000000000000000000006020830152604082019050919050565b600062006169601c836200716d565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b6000620061ab6020836200715c565b91507f477561726465643a2063616e6e6f74206164642030783020677561726469616e6000830152602082019050919050565b6000620061ed602f836200715c565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b600062006255602f836200715c565b91507f5061796d656e7452656769737472793a206465706f736974206578697420616c60008301527f72656164792072657175657374656400000000000000000000000000000000006020830152604082019050919050565b6000620062bd6026836200715c565b91507f5061796d656e7452656769737472793a20696e76616c6964207061796d656e7460008301527f2076616c756500000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000620063256022836200715c565b91507f47617465776179526563697069656e743a20696e76616c6964206d73672e646160008301527f74610000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006200638d602b836200715c565b91507f5061796d656e7452656769737472793a206465706f7369742065786974206e6f60008301527f74207265717565737465640000000000000000000000000000000000000000006020830152604082019050919050565b6000620063f5602d836200715c565b91507f5061796d656e7452656769737472793a204552433230546f6b656e207472616e60008301527f73666572207265766572746564000000000000000000000000000000000000006020830152604082019050919050565b60006200645d6026836200715c565b91507f477561726465643a2074782e6f726967696e206973206e6f742074686520677560008301527f61726469616e00000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000620064c5601f836200715c565b91507f5061796d656e7452656769737472793a20696e76616c696420616d6f756e74006000830152602082019050919050565b6000620065076024836200715c565b91507f5061796d656e7452656769737472793a206465706f7369742065786974206c6f60008301527f636b6564000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006200656f6027836200715c565b91507f5061796d656e7452656769737472793a20696e76616c6964207769746864726160008301527f772076616c7565000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000620065d76029836200715c565b91507f5061796d656e7452656769737472793a20696e76616c69642073656e6465722060008301527f7369676e617475726500000000000000000000000000000000000000000000006020830152604082019050919050565b60006200663f601f836200715c565b91507f477561726465643a20677561726469616e20646f65736e2774206578697374006000830152602082019050919050565b600062006681601e836200715c565b91507f536166654d6174684c69623a206164646974696f6e206f766572666c6f7700006000830152602082019050919050565b6000620066c36020836200715c565b91507f477561726465643a20677561726469616e20616c7265616479206578697374736000830152602082019050919050565b600062006705601b836200715c565b91507f477561726465643a2063616e6e6f742072656d6f76652073656c6600000000006000830152602082019050919050565b600062006747601d836200715c565b91507f42797465734c69623a20696e76616c69642064617461206c656e6774680000006000830152602082019050919050565b600062006789602b836200715c565b91507f5061796d656e7452656769737472793a20696e76616c6964206775617264696160008301527f6e207369676e61747572650000000000000000000000000000000000000000006020830152604082019050919050565b620067ed8162007277565b82525050565b62006808620068028262007277565b620073a0565b82525050565b620068198162007281565b82525050565b60006200682d828462005f93565b60148201915081905092915050565b60006200684a828762005f93565b6014820191506200685c828662005f93565b6014820191506200686e828562005f93565b60148201915062006880828462005feb565b60208201915081905095945050505050565b6000620068a0828962005f93565b601482019150620068b2828862005f93565b601482019150620068c4828762005f93565b601482019150620068d6828662005feb565b602082019150620068e88285620067f3565b602082019150620068fa8284620067f3565b602082019150819050979650505050505050565b60006200691c828662005f93565b6014820191506200692e828562005f93565b601482019150620069408284620067f3565b602082019150819050949350505050565b60006200695f828762005fbf565b60018201915062006971828662005f93565b60148201915062006983828562005feb565b60208201915062006995828462005feb565b60208201915081905095945050505050565b6000620069b4826200615a565b9150620069c2828462005feb565b60208201915081905092915050565b6000620069df8287620067f3565b602082019150620069f1828662005f93565b60148201915062006a03828562005feb565b60208201915062006a15828462006047565b915081905095945050505050565b600060208201905062006a3a600083018462005f82565b92915050565b600060208201905062006a57600083018462005f71565b92915050565b600060408201905062006a74600083018562005f71565b62006a83602083018462005f82565b9392505050565b600060408201905062006aa1600083018562005f82565b62006ab0602083018462005f82565b9392505050565b600060608201905062006ace600083018662005f82565b62006add602083018562005f82565b62006aec604083018462005f82565b949350505050565b600060808201905062006b0b600083018762005f82565b62006b1a602083018662005f82565b62006b29604083018562005f82565b62006b386060830184620067e2565b95945050505050565b600060608201905062006b58600083018662005f82565b62006b67602083018562005f82565b62006b766040830184620067e2565b949350505050565b600060608201905062006b95600083018662005f82565b62006ba4602083018562005fda565b62006bb36040830184620067e2565b949350505050565b600060608201905062006bd2600083018662005f82565b62006be16020830185620060a0565b818103604083015262006bf5818462006006565b9050949350505050565b600060408201905062006c16600083018562005f82565b62006c256020830184620067e2565b9392505050565b600060608201905062006c43600083018662005f82565b62006c526020830185620067e2565b818103604083015262006c66818462006006565b9050949350505050565b600060208201905062006c87600083018462005fae565b92915050565b600060208201905062006ca4600083018462005fda565b92915050565b600060c08201905062006cc1600083018962005fda565b62006cd0602083018862005f82565b62006cdf604083018762005f82565b62006cee606083018662005f82565b62006cfd608083018562005fda565b62006d0c60a0830184620067e2565b979650505050505050565b600060408201905062006d2e600083018562005fda565b62006d3d6020830184620067e2565b9392505050565b600060608201905062006d5b600083018662005fda565b62006d6a6020830185620067e2565b62006d796040830184620067e2565b949350505050565b600060808201905062006d98600083018762005fda565b62006da760208301866200680e565b62006db6604083018562005fda565b62006dc5606083018462005fda565b95945050505050565b600060208201905062006de560008301846200607e565b92915050565b600060208201905062006e0260008301846200608f565b92915050565b6000602082019050818103600083015262006e248184620060b1565b905092915050565b6000602082019050818103600083015262006e4781620060f2565b9050919050565b6000602082019050818103600083015262006e69816200619c565b9050919050565b6000602082019050818103600083015262006e8b81620061de565b9050919050565b6000602082019050818103600083015262006ead8162006246565b9050919050565b6000602082019050818103600083015262006ecf81620062ae565b9050919050565b6000602082019050818103600083015262006ef18162006316565b9050919050565b6000602082019050818103600083015262006f13816200637e565b9050919050565b6000602082019050818103600083015262006f3581620063e6565b9050919050565b6000602082019050818103600083015262006f57816200644e565b9050919050565b6000602082019050818103600083015262006f7981620064b6565b9050919050565b6000602082019050818103600083015262006f9b81620064f8565b9050919050565b6000602082019050818103600083015262006fbd8162006560565b9050919050565b6000602082019050818103600083015262006fdf81620065c8565b9050919050565b60006020820190508181036000830152620070018162006630565b9050919050565b60006020820190508181036000830152620070238162006672565b9050919050565b600060208201905081810360008301526200704581620066b4565b9050919050565b600060208201905081810360008301526200706781620066f6565b9050919050565b60006020820190508181036000830152620070898162006738565b9050919050565b60006020820190508181036000830152620070ab816200677a565b9050919050565b6000602082019050620070c96000830184620067e2565b92915050565b6000604051905081810181811067ffffffffffffffff82111715620070f357600080fd5b8060405250919050565b600067ffffffffffffffff8211156200711557600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600080858511156200718957600080fd5b838611156200719757600080fd5b6001850283019150848603905094509492505050565b6000620071ba8262007257565b9050919050565b60008115159050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b60007fffffffffffffffff00000000000000000000000000000000000000000000000082169050919050565b60006200723c82620071ad565b9050919050565b60006200725082620071ad565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006200729b8262007306565b9050919050565b6000620072af82620072b6565b9050919050565b6000620072c38262007257565b9050919050565b6000620072d782620072de565b9050919050565b6000620072eb8262007257565b9050919050565b6000620072ff8262007277565b9050919050565b600062007313826200731a565b9050919050565b6000620073278262007257565b9050919050565b60005b838110156200734e57808201518184015260208101905062007331565b838111156200735e576000848401525b50505050565b600062007371826200738c565b9050919050565b6000819050919050565b6000819050919050565b60006200739982620073bb565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b620073d381620071ad565b8114620073df57600080fd5b50565b620073ed81620071c1565b8114620073f957600080fd5b50565b6200740781620071f9565b81146200741357600080fd5b50565b620074218162007203565b81146200742d57600080fd5b50565b6200743b816200722f565b81146200744757600080fd5b50565b620074558162007243565b81146200746157600080fd5b50565b6200746f8162007277565b81146200747b57600080fd5b5056fe608060405261001e679894797dc84081af60c01b61009760201b60201c565b610038674e0f327275f95bf160c01b61009760201b60201c565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061009267bca2a619426d502460c01b61009a60201b60201c565b61009d565b50565b50565b61080c806100ac6000396000f3fe60806040526004361061007f5760003560e01c8063abe124f61161004e578063abe124f6146102f8578063b719e0571461034e578063c25a4496146103ba578063f77c47911461041057610086565b8063062e4f9c1461008b5780633f579f42146100f75780636480a27b146102205780636c3da61f1461028c57610086565b3661008657005b600080fd5b34801561009757600080fd5b506100df600480360360208110156100ae57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610451565b60405180821515815260200191505060405180910390f35b34801561010357600080fd5b506101a56004803603606081101561011a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561016157600080fd5b82018360208201111561017357600080fd5b8035906020019184600183028401116401000000008311171561019557600080fd5b9091929391929390505050610458565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e55780820151818401526020810190506101ca565b50505050905090810190601f1680156102125780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561022c57600080fd5b506102746004803603602081101561024357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061078c565b60405180821515815260200191505060405180910390f35b34801561029857600080fd5b506102e0600480360360208110156102af57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610797565b60405180821515815260200191505060405180910390f35b34801561030457600080fd5b5061034c6004803603602081101561031b57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107a2565b005b34801561035a57600080fd5b506103a26004803603602081101561037157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107a5565b60405180821515815260200191505060405180910390f35b3480156103c657600080fd5b5061040e600480360360208110156103dd57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107ac565b005b34801561041c57600080fd5b506104256107af565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000919050565b606061046e67d75916bd4c2e4fad60c01b6107ac565b61048267a226552386468aff60c01b6107a2565b61049667bb06267d15cafc8560c01b6107a2565b6104aa67d0eb72184d8e714c60c01b6107a2565b6104be67f128b7cf1088330a60c01b6107a2565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610562576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806107d4602c913960400191505060405180910390fd5b6105766787dbbb5ffe0583c160c01b6107a2565b61058a67f3741b7d431227a560c01b6107a2565b61059e67610428765944746860c01b6107ac565b6105b2676e804da1f05284de60c01b6107ac565b6105c6670a116b54072e078160c01b6107ac565b6105da67fae6e3328ae368d560c01b6107ac565b60606105f067400bca7a996bd4dc60c01b6107ac565b610604678a96bcbb24b128ac60c01b6107ac565b600061061a670c06ccf9e79a56eb60c01b6107ac565b8673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d8060008114610686576040519150601f19603f3d011682016040523d82523d6000602084013e61068b565b606091505b5080935081925050506106a8676c9308f9612de55060c01b6107ac565b6106bc67b4c2e51df69df26f60c01b6107ac565b6106d067582ecd5a0e7e114b60c01b6107ac565b80610743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b610757673a312ec397e2590e60c01b6107ac565b61076b6764b769ece4930ed060c01b6107ac565b61077f67ece725b1dc907d4260c01b6107ac565b8192505050949350505050565b600060019050919050565b600060019050919050565b50565b6000919050565b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a536166654d6174684c69623a207375627472616374696f6e206f766572666c6f77a164736f6c634300060c000a"; + static readonly abi: ({ + inputs: any[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + } | { + inputs: { + components: { + internalType: string; + name: string; + type: string; + }[]; + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): PaymentRegistryInterface; + static connect(address: string, signerOrProvider: Signer | Provider): PaymentRegistry; +} +export {}; diff --git a/dist/typings/factories/PaymentRegistry__factory.js b/dist/typings/factories/PaymentRegistry__factory.js new file mode 100644 index 00000000..97428da2 --- /dev/null +++ b/dist/typings/factories/PaymentRegistry__factory.js @@ -0,0 +1,1195 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PaymentRegistry__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "depositAccount", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "DepositAccountDeployed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "depositAccount", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "DepositExitCompleted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "depositAccount", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "DepositExitRejected", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "depositAccount", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "lockedUntil", + type: "uint256", + }, + ], + name: "DepositExitRequested", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "depositAccount", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "DepositWithdrawn", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "GuardianAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "GuardianRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "initializer", + type: "address", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "recipient", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "uid", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "PaymentChannelCommitted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "channelHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "PaymentDeposited", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "channelHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "totalValue", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "depositValue", + type: "uint256", + }, + ], + name: "PaymentSplit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "channelHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "PaymentWithdrawn", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "addGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_0ffe16b4", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__1b54acf3", + type: "bytes8", + }, + ], + name: "c_1b54acf3", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3029712e", + type: "bytes8", + }, + ], + name: "c_3029712e", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_c0828b70", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_d5c463c2", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_false0ffe16b4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__1b54acf3", + type: "bytes8", + }, + ], + name: "c_false1b54acf3", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3029712e", + type: "bytes8", + }, + ], + name: "c_false3029712e", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_falsec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_falsed5c463c2", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_true0ffe16b4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__1b54acf3", + type: "bytes8", + }, + ], + name: "c_true1b54acf3", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3029712e", + type: "bytes8", + }, + ], + name: "c_true3029712e", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_truec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_trued5c463c2", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "chainId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "bytes32", + name: "uid", + type: "bytes32", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "senderSignature", + type: "bytes", + }, + { + internalType: "bytes", + name: "guardianSignature", + type: "bytes", + }, + ], + name: "commitPaymentChannelAndDeposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "bytes32", + name: "uid", + type: "bytes32", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "depositPaymentValue", + type: "uint256", + }, + { + internalType: "bytes", + name: "senderSignature", + type: "bytes", + }, + { + internalType: "bytes", + name: "guardianSignature", + type: "bytes", + }, + ], + name: "commitPaymentChannelAndSplit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "bytes32", + name: "uid", + type: "bytes32", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "senderSignature", + type: "bytes", + }, + { + internalType: "bytes", + name: "guardianSignature", + type: "bytes", + }, + ], + name: "commitPaymentChannelAndWithdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "computeDepositAccountAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "bytes32", + name: "uid", + type: "bytes32", + }, + ], + name: "computePaymentChannelHash", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "deployDepositAccount", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "depositExitLockPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "externalAccountRegistry", + outputs: [ + { + internalType: "contract ExternalAccountRegistry", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "gateway", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "getDepositExitLockedUntil", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "getDepositWithdrawnAmount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + ], + name: "getPaymentChannelCommittedAmount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + internalType: "struct PaymentRegistry.DepositWithdrawal", + name: "depositWithdrawal", + type: "tuple", + }, + ], + name: "hashDepositWithdrawal", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "bytes32", + name: "uid", + type: "bytes32", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + internalType: "struct PaymentRegistry.PaymentChannelCommit", + name: "paymentChannelCommit", + type: "tuple", + }, + ], + name: "hashPaymentChannelCommit", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ExternalAccountRegistry", + name: "externalAccountRegistry_", + type: "address", + }, + { + internalType: "contract PersonalAccountRegistry", + name: "personalAccountRegistry_", + type: "address", + }, + { + internalType: "uint256", + name: "depositExitLockPeriod_", + type: "uint256", + }, + { + internalType: "address[]", + name: "guardians_", + type: "address[]", + }, + { + internalType: "address", + name: "gateway_", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "isDepositAccountDeployed", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "isGuardian", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "isInitialized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "personalAccountRegistry", + outputs: [ + { + internalType: "contract PersonalAccountRegistry", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "processDepositExit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "removeGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "requestDepositExit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "messageHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "verifyGuardianSignature", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "guardianSignature", + type: "bytes", + }, + ], + name: "withdrawDeposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; +const _bytecode = "0x60806040523480156200001157600080fd5b506200002e676ed90a7f5cb15c7560c01b6200017e60201b60201c565b6200004a675e592fe27197979c60c01b6200018160201b60201c565b6200006667eca2e4778f3efef360c01b6200018160201b60201c565b32600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000c367ce0e365443bb826260c01b6200018460201b60201c565b620000df6783f6a3768f043c5060c01b6200018460201b60201c565b620000fb67f7775edf55ee500260c01b6200018460201b60201c565b6000620001196799c44ec6f63d8b6d60c01b6200018460201b60201c565b4690506200013867f60b0de5a48d87f360c01b6200018460201b60201c565b80600281905550506200015c67db84cf13641fc64d60c01b6200018760201b60201c565b6200017867baa6cc62f05e2a2460c01b6200018a60201b60201c565b6200018d565b50565b50565b50565b50565b50565b617d64806200019d6000396000f3fe60806040523480156200001157600080fd5b50600436106200028c5760003560e01c80638a1773ab1162000165578063bdff4b3b11620000d5578063d2c83b9a1162000093578063d2c83b9a146200089d578063da1b213d14620008bf578063dc7d6c3114620008df578063df0433801462000915578063e0fe396e1462000935578063e831bfba1462000955576200028c565b8063bdff4b3b14620007a3578063c1cad69e14620007c5578063c36326e714620007fb578063c369d5fe1462000831578063d0f710d61462000867576200028c565b8063a526d83b1162000123578063a526d83b14620006d7578063abafcde414620006f7578063acd2a8841462000717578063b0274a73146200074d578063bcc9b17d146200076d576200028c565b80638a1773ab14620006095780639130c06e146200063f5780639a85fae2146200065f5780639a8a0592146200067f578063a4db4b6b14620006a1576200028c565b80635405622e11620002015780636866da5211620001bf5780636866da52146200053b57806371404156146200055b5780637f130864146200057b57806384389a2b14620005b157806387d3131314620005e7576200028c565b80635405622e1462000459578063589731f8146200047957806360bf4df214620004af5780636121fcfc14620004e55780636524a947146200051b576200028c565b806321a5f5da116200024f57806321a5f5da146200035f5780632e4f161e14620003955780632e6afd6e14620003cb5780632e7037a01462000401578063392e53cd1462000437576200028c565b80630c4b1a1714620002915780630c68ba2114620002b1578063116191b614620002e75780631262ed1c146200030957806318121646146200033f575b600080fd5b620002af6004803603810190620002a9919062005dde565b62000975565b005b620002cf6004803603810190620002c99190620059f6565b62000978565b604051620002de919062006c70565b60405180910390f35b620002f162000a0f565b60405162000300919062006a23565b60405180910390f35b62000327600480360381019062000321919062005dde565b62000a35565b60405162000336919062006c70565b60405180910390f35b6200035d600480360381019062000357919062005dde565b62000a40565b005b6200037d600480360381019062000377919062005dde565b62000a43565b6040516200038c919062006c70565b60405180910390f35b620003b36004803603810190620003ad919062005a63565b62000a4e565b604051620003c2919062006c8d565b60405180910390f35b620003e96004803603810190620003e3919062005dde565b62000aaa565b604051620003f8919062006c70565b60405180910390f35b6200041f600480360381019062000419919062005eed565b62000ab1565b6040516200042e919062006c8d565b60405180910390f35b6200044162000b15565b60405162000450919062006c70565b60405180910390f35b62000477600480360381019062000471919062005dde565b62000bb0565b005b62000497600480360381019062000491919062005dde565b62000bb3565b604051620004a6919062006c70565b60405180910390f35b620004cd6004803603810190620004c79190620059f6565b62000bba565b604051620004dc919062006a23565b60405180910390f35b620005036004803603810190620004fd9190620059f6565b62000c10565b60405162000512919062006c70565b60405180910390f35b620005396004803603810190620005339190620059f6565b62000cee565b005b62000559600480360381019062000553919062005cb4565b62000d3e565b005b620005796004803603810190620005739190620059f6565b6200125b565b005b62000599600480360381019062000593919062005dde565b62001636565b604051620005a8919062006c70565b60405180910390f35b620005cf6004803603810190620005c9919062005f19565b62001641565b604051620005de919062006c8d565b60405180910390f35b620005f1620016b4565b60405162000600919062006deb565b60405180910390f35b62000627600480360381019062000621919062005d54565b620016da565b604051620006369190620070b2565b60405180910390f35b6200065d6004803603810190620006579190620059f6565b6200173c565b005b6200067d600480360381019062000677919062005acf565b62001ced565b005b6200068962001ec8565b604051620006989190620070b2565b60405180910390f35b620006bf6004803603810190620006b9919062005dde565b62001ece565b604051620006ce919062006c70565b60405180910390f35b620006f56004803603810190620006ef9190620059f6565b62001ed9565b005b6200071560048036038101906200070f919062005dde565b62002067565b005b6200073560048036038101906200072f919062005dde565b6200206a565b60405162000744919062006c70565b60405180910390f35b6200076b6004803603810190620007659190620059f6565b62002071565b005b6200078b600480360381019062000785919062005dde565b620023e1565b6040516200079a919062006c70565b60405180910390f35b620007ad620023ec565b604051620007bc9190620070b2565b60405180910390f35b620007e36004803603810190620007dd919062005dde565b620023f2565b604051620007f2919062006c70565b60405180910390f35b62000819600480360381019062000813919062005a22565b620023f9565b604051620008289190620070b2565b60405180910390f35b6200084f600480360381019062000849919062005dde565b620024c4565b6040516200085e919062006c70565b60405180910390f35b6200088560048036038101906200087f919062005d80565b620024cb565b60405162000894919062006c70565b60405180910390f35b620008a762002568565b604051620008b6919062006dce565b60405180910390f35b620008dd6004803603810190620008d7919062005bb6565b6200258e565b005b620008fd6004803603810190620008f7919062005a22565b62002763565b6040516200090c9190620070b2565b60405180910390f35b6200093360048036038101906200092d919062005acf565b6200282f565b005b6200095360048036038101906200094d919062005e4f565b62002a00565b005b6200097360048036038101906200096d919062005dde565b62002e21565b005b50565b60006200099067d9e99bddfebda2f060c01b62000bb0565b620009a6676401fd9fc2105e0160c01b62000bb0565b620009bc6733760aa820b07e2a60c01b62000bb0565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b50565b600060019050919050565b600062000a666736bb89c4ecbfe20960c01b62002067565b62000a7c67e60487b4e67a440e60c01b62002067565b62000a9267582b270858c936ab60c01b62002067565b62000aa08585858562002e24565b9050949350505050565b6000919050565b600062000ac967214450377faf2dca60c01b62002067565b62000adf6737faf866564a276460c01b62002067565b62000af567c6dd92c069b9d30e60c01b62002067565b62000b0e82600001518360200151846040015162002ea1565b9050919050565b600062000b2d6726ed6cc6ca12515c60c01b62000a40565b62000b4367f3fc49482028cbb860c01b62000a40565b62000b596740317a79cae6a3ff60c01b62000a40565b600073ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b50565b6000919050565b600062000bd26731ca53459f8b9cda60c01b62002067565b62000be867cd414bc5a50d96b560c01b62002067565b62000bfe67e8acc77cfdec5c1560c01b62002067565b62000c098262002f3f565b9050919050565b600062000c2867e8a60e9a69c0525660c01b62002067565b62000c3e67660b6d0421c844e260c01b62002067565b62000c5467d3cacfb819e2f00660c01b62002067565b600073ffffffffffffffffffffffffffffffffffffffff16600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b62000d0467570640b07c12d58a60c01b62002067565b62000d1a67223ac86b8c0612ae60c01b62002067565b62000d306742ae1602e32cd7ef60c01b62002067565b62000d3b81620030aa565b50565b62000d5467918509026124e0b260c01b62002067565b62000d6a6743c778e90affb12760c01b62002067565b62000d8067b33e063612f7799d60c01b62002067565b600062000d8c620033a4565b905062000da467adb23a0601167ccd60c01b62002067565b62000dba67c4ab5f7f86bf109a60c01b62002067565b600062000e50600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205486620033f990919063ffffffff16565b905062000e6867578ccd8c5ec3fc8460c01b62002067565b62000e7e67157d3832c55031ab60c01b62002067565b62000e9467e6d0f71203a7ac9e60c01b62002067565b6000811162000eda576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ed19062006f5e565b60405180910390fd5b62000ef067a12dd3560d4fdb1060c01b62002067565b62000f0667239c295c8502f02460c01b62002067565b62000f1c67056efae46473b78160c01b62002067565b600062000f2b83888862002ea1565b905062000f43674a33f86dee681b8060c01b62002067565b62000f59677e10bd0c2c0e189960c01b62002067565b62000f6f670103a18a022f425a60c01b62002067565b62000fbf8186868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506200346b565b62001001576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ff89062007090565b60405180910390fd5b6200101767109ade323413e8eb60c01b62002067565b6200102d67cacf3efba89f986060c01b62002067565b85600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550620010c767028a34a2d7a074ac60c01b62002067565b620010dd67d7bddd2858767c9560c01b62002067565b620010e9838862003549565b620010ff674b5e142be74a164c60c01b62002067565b62001115677cf91695b18d76f060c01b62002067565b62001185600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16848985620037e8565b6200119b673d9d5f3f70a752de60c01b62002067565b620011b167fea9f069af22fa6460c01b62002067565b7f95f66b073d65f18e43f6b76c7ab8557787f5f766d86cab7c9c76f41be9f8abc6600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168489896040516200124a949392919062006af4565b60405180910390a150505050505050565b6200127167f772222a3366273960c01b62000bb0565b62001287677e48a4752a028e1460c01b62000bb0565b6200129d6754e2f8cd8fda0cfe60c01b62000bb0565b620012b3671b1abbc8110e006760c01b62000bb0565b620012c9677621c15edc08840a60c01b62000bb0565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1662001357576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200134e9062006f3c565b60405180910390fd5b6200136d671978b446280e03b660c01b62000bb0565b6200138367bc99b99e8c2c7a2260c01b62000bb0565b6200139967afd0aa94ba119c4e60c01b62000bb0565b620013af670fe65c577fbdf81160c01b62000bb0565b620013c567e175d6b24c96a59a60c01b62000bb0565b620013db67514f675749914bc160c01b62000bb0565b620013f167fed39a5b1d24bceb60c01b62000bb0565b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16141562001463576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200145a906200704c565b60405180910390fd5b6200147967325d0391dd900ca560c01b62000bb0565b6200148f67f494ac4bc126e05760c01b62000bb0565b620014a567a8a2f5acd805e41c60c01b62000bb0565b620014bb679f1149f801dce85b60c01b62000bb0565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1662001549576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620015409062006fe6565b60405180910390fd5b6200155f67e767f88c374b22f760c01b62000bb0565b62001575679a8eb2ad91b01fb960c01b62000bb0565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550620015e2675f52f4e3c8e1709960c01b62000bb0565b620015f867b8b235546176405e60c01b62000bb0565b7fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b32826040516200162b92919062006a5d565b60405180910390a150565b600060019050919050565b6000620016596713ed686498f015d160c01b62002067565b6200166f67ca5922562c17be8660c01b62002067565b6200168567c1b37b01266ac24360c01b62002067565b620016ad826000015183602001518460400151856060015186608001518760a0015162003c0c565b9050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000620016f267da2e33f8443209c660c01b62002067565b620017086706c5d2e88da9d1e760c01b62002067565b6200171e674b15fd83bebdb0e260c01b62002067565b60086000838152602001908152602001600020600001549050919050565b62001752671a40322cd5abc5a260c01b62002067565b6200176867f106d21e911c22a660c01b62002067565b6200177e678ea7a0ee89f50a2460c01b62002067565b60006200178a620033a4565b9050620017a267bcef315aae85ce3660c01b62002067565b620017b86721811e8f9c14d53360c01b62002067565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506200185267897447e1881909ed60c01b62002067565b6200186867f1a61735241d089260c01b62002067565b6200187e673de26f5018e4601d60c01b62002067565b6000811415620018c5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620018bc9062006ef8565b60405180910390fd5b620018db67b15d3a9f8e11801260c01b62002067565b620018f1671a063760447950ef60c01b62002067565b62001907672bbc5a4b920c70ea60c01b62002067565b6200191d67b1663fede356804260c01b62002067565b4281111562001963576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200195a9062006f80565b60405180910390fd5b62001979678bcc78f1d252616c60c01b62002067565b6200198f679cbbb084247075a260c01b62002067565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555062001a2a6751e3269fdeeb79bb60c01b62002067565b62001a4067cebea9208fb07a6a60c01b62002067565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905062001abd678076a3acb44263c260c01b62002067565b62001ad367d4210f1c8552b84060c01b62002067565b600062001aeb6759d24b5866c77eaf60c01b62002067565b62001b0167afe4c818abc36fc560c01b62002067565b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141562001b835762001b4d6776c482e38114900d60c01b62002067565b62001b6367cdd416a814f87b8860c01b62002067565b8173ffffffffffffffffffffffffffffffffffffffff1631905062001c41565b62001b996743e93e9662c3f48760c01b62002067565b62001baf67fa160c0c5a9ab87460c01b62002067565b8473ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b815260040162001bea919062006a23565b60206040518083038186803b15801562001c0357600080fd5b505afa15801562001c18573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001c3e919062005f45565b90505b62001c57672a4ff42932d4c6dc60c01b62002067565b62001c6d673ea6047a6a82887260c01b62002067565b62001c7b82858784620037e8565b62001c916757dbbad63fddae7860c01b62002067565b62001ca76743d9684cdc328a4160c01b62002067565b7f5300d9a2838baade7cdc628c82cb80c1298853ba5f389d51e2b47330336aeffc8285878460405162001cde949392919062006af4565b60405180910390a15050505050565b62001d03675d92544cb8942e6e60c01b62002067565b62001d1967250ecc88e2e3343360c01b62002067565b62001d2f6713fbf401ed42217360c01b62002067565b600062001d3b620033a4565b905062001d5367eca29ce47195e1c460c01b62002067565b62001d696711615b621e48095760c01b62002067565b600080600062001e088d858e8e8e8e8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505062003cb3565b92509250925062001e24670d0b626aa50fa12d60c01b62002067565b62001e3a6721aff132ffe07e6460c01b62002067565b62001e528262001e4a8662002f3f565b8e84620037e8565b62001e68679190cce2aecba75760c01b62002067565b62001e7e6777cdad2b8821e0e360c01b62002067565b7f771bc0494e1a2fcbef19a8762845000d8c4500454c756a7370c955e39ed60fd4838260405162001eb192919062006d17565b60405180910390a150505050505050505050505050565b60025481565b600060019050919050565b62001eef67b59862a5cb01d1d860c01b62000bb0565b62001f05677e48a4752a028e1460c01b62000bb0565b62001f1b6754e2f8cd8fda0cfe60c01b62000bb0565b62001f31671b1abbc8110e006760c01b62000bb0565b62001f47677621c15edc08840a60c01b62000bb0565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1662001fd5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162001fcc9062006f3c565b60405180910390fd5b62001feb671978b446280e03b660c01b62000bb0565b6200200167bc99b99e8c2c7a2260c01b62000bb0565b6200201767e0409d61ef95483b60c01b62000bb0565b6200202d67acb2c628a7cbdba860c01b62000bb0565b62002043677f6b80ac4f415fbe60c01b62000bb0565b6200205967c7dcdfc4bd89af4960c01b62000bb0565b620020648162004526565b50565b50565b6000919050565b620020876732b561056c43b25960c01b62002067565b6200209d67d97b42b510da68c060c01b62002067565b620020b36755c0c458d57b0a2960c01b62002067565b6000620020bf620033a4565b9050620020d7677a79807f20b3b68360c01b62002067565b620020ed67eac57aeca764e67860c01b62002067565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506200218767015eb0fe1c75bba260c01b62002067565b6200219d672094abd66a2c6fa460c01b62002067565b620021b3678036aae33dd79dd060c01b62002067565b60008114620021f9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620021f09062006e92565b60405180910390fd5b6200220f670ce96be04b61166760c01b62002067565b620022256705426ec32359290d60c01b62002067565b6200223b67d5a5b696418736a660c01b62002067565b6200224682620030aa565b6200225c678417c7c294e46abc60c01b62002067565b6200227360065442620047c490919063ffffffff16565b90506200228b67e20ad1701434089160c01b62002067565b80600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555062002325674aa91cd4437e4cca60c01b62002067565b6200233b6742bea4f3a3b01d0d60c01b62002067565b7fed3c8c6cdfc6d7b91dc9db3e1f54866587c26c3c3e0f9e32cd1944974be43a50600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838584604051620023d4949392919062006af4565b60405180910390a1505050565b600060019050919050565b60065481565b6000919050565b600062002410662f18c76d42e7fd60c01b62002067565b6200242667f71b2ca55e47233960c01b62002067565b6200243c6773b5b99a4eebc04460c01b62002067565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000919050565b6000620024e36746d5f36e497b280d60c01b62000bb0565b620024f9677077a4665ef04d8360c01b62000bb0565b6200250f6788288bf71f1972a760c01b62000bb0565b6200255f8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506200346b565b90509392505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b620025a46731f0b44650b6739d60c01b62002067565b620025ba676c6f285f5ec419aa60c01b62002067565b620025d0674b8643e87f51ab7860c01b62002067565b6000620025dc620033a4565b9050620025f4676cf65ea3dd6cea8d60c01b62002067565b6200260a67ea4657749694fc3060c01b62002067565b6000806000620026a98e858f8f8f8f8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505062003cb3565b925092509250620026c56710d64b9a55d53e9960c01b62002067565b620026db671780eb91dc48385160c01b62002067565b620026ea82858f848d620048e3565b620027006772e240e1101c48a060c01b62002067565b62002716677d58ce1c66bfd30260c01b62002067565b7f8b67efde501ee9cd0e771f7436554c44a5c076239ff3a6fbb397646a4689c0f283828b6040516200274b9392919062006d44565b60405180910390a15050505050505050505050505050565b60006200277b678e0aebdcc0e2302160c01b62002067565b620027916702406ea20164aba860c01b62002067565b620027a76728aeb1bdf6b1978560c01b62002067565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b62002845676edeb9f37c3787da60c01b62002067565b6200285b671e5a18f5856214e560c01b62002067565b62002871674c175eb61042b96560c01b62002067565b60006200287d620033a4565b90506200289567a8b4341a721fc79d60c01b62002067565b620028ab679f27b523a6cff21d60c01b62002067565b60008060006200294a8d858e8e8e8e8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505062003cb3565b92509250925062002966674115f842c65f077160c01b62002067565b6200297c673bbfc68db85864a260c01b62002067565b6200298a82858e84620037e8565b620029a067f7731a63cc9cab9360c01b62002067565b620029b667ab813463f035efd460c01b62002067565b7f6675346cd43846f7d47c310d39fb5c15bc7db66b3770338cdf1f133613a5ae988382604051620029e992919062006d17565b60405180910390a150505050505050505050505050565b62002a1667038fae57cc7de53a60c01b62002067565b62002a2c67b2266613e068a5ae60c01b62000a40565b62002a42676a66a63870f964f960c01b62000a40565b62002a586772f22eca890742ba60c01b62000a40565b62002a6e67c8ab57d60023f99860c01b62000a40565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161462002b01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162002af89062006e70565b60405180910390fd5b62002b1767d31dec9098d614f660c01b62000a40565b62002b2d67a184879381a9c67460c01b62000a40565b6000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062002b85675e44e6e1c885710560c01b62000a40565b62002b9b672687f8653cc2d56860c01b62002067565b62002bb16789245d786ace7c7c60c01b62002067565b62002bc767b5c21824c240d52860c01b62002067565b85600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062002c1e670987aa5e3c96826760c01b62002067565b84600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062002c756773244fe7fd40136460c01b62002067565b62002c8b67801a170edfd2b34660c01b62002067565b600084141562002cd15762002cab67f36fa7f804a7e53f60c01b62002067565b62002cc1673687809c1b81861260c01b62002067565b6224ea0060068190555062002d05565b62002ce7678708451d8a1368c460c01b62002067565b62002cfd67d2ce0332a46d370460c01b62002067565b836006819055505b62002d1b675c719caf67bb9c5760c01b62002067565b62002d316743714b117873d46a60c01b62002067565b62002d7d838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505062004b00565b62002d9367658c9b1ee75bd75f60c01b62002067565b62002da9671af0627b008e0f5860c01b62002067565b62002db48162004c7f565b62002dca6732ca1833e9907bb960c01b62000a40565b62002de0672942130a5b94b82160c01b62000a40565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e63260405162002e11919062006a40565b60405180910390a1505050505050565b50565b600062002e3c674644ccb05703b3b460c01b62002067565b62002e5267f2046857ed11fca760c01b62002067565b62002e6867ee9f0bde74d3913860c01b62002067565b8484848460405160200162002e8194939291906200683c565b604051602081830303815290604052805190602001209050949350505050565b600062002eb967b8f45bbd682e7c0260c01b62002067565b62002ecf67beaf3087b9c66a6760c01b62002067565b62002ee567dfb6ca2f7d8498d160c01b62002067565b62002f367f3b3087c8f883f1f44cabe66444f5f9d96f69de6a88f364ea10959eef0331414a85858560405160200162002f21939291906200690e565b60405160208183030381529060405262004cef565b90509392505050565b600062002f5767285310379ac432e560c01b62002067565b62002f6d675969fbb06d27363760c01b62002067565b62002f836761a6bf3b9fb9357960c01b62002067565b60008260405160200162002f9891906200681f565b60405160208183030381529060405280519060200120905062002fc667c0c3d7edb7bd03b360c01b62002067565b62002fdc67fb466e08e9a49fc560c01b62002067565b60606040518060200162002ff09062005726565b6020820181038252601f19601f8201166040525090506200301c67e870d1f401d8fcf760c01b62002067565b620030326732d23225921de5c860c01b62002067565b600060ff60f81b3084848051906020012060405160200162003058949392919062006951565b6040516020818303038152906040528051906020012090506200308667bb8017be492d4db460c01b62002067565b6200309c67c7318b64a6a7421460c01b62002067565b8060001c9350505050919050565b620030c0676fce0aa97515b77d60c01b62002067565b620030d667c7c36c0a6756529a60c01b62002067565b620030ec6752005f21e49feb4660c01b62002067565b600073ffffffffffffffffffffffffffffffffffffffff16600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156200338a576200319a67082d1a5a0b028bf260c01b62002067565b620031b067d5909b2f1e36a57260c01b62002067565b620031c667f2c73688812ad0a060c01b62002067565b600081604051602001620031db91906200681f565b6040516020818303038152906040528051906020012090506200320967147752e2c189d75b60c01b62002067565b80604051620032189062005726565b8190604051809103906000f590508015801562003239573d6000803e3d6000fd5b50600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620032d06785dd95c97bba586c60c01b62002067565b620032e6677612bbe53fbed36760c01b62002067565b7fd80572c0f2f24f2d9d726d831bd860ed82b12bafaf01cfb6e4d38fb23c4347e9600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040516200337b92919062006a8a565b60405180910390a150620033a1565b620033a067a7c6080ba2fdccb460c01b62002067565b5b50565b6000620033bc67cfc35b626608c6f260c01b62000975565b620033d2677e4f9863b1e00bcc60c01b62000975565b620033e867e01fbdbc1b0ec7df60c01b62000975565b620033f4602862004d76565b905090565b60006200341167014583c13352eba860c01b62004f2e565b62003427677eb719b38b6a5c0560c01b62004f2e565b6200343d676b8cf5cee081f8c560c01b62004f2e565b62003463838360405180606001604052806021815260200162007d376021913962004f31565b905092915050565b60006200348367bec4827058d1d27d60c01b62000bb0565b62003499672f274b74d16058ba60c01b62000bb0565b620034af670dd4bedb64e2a2d160c01b62000bb0565b6000620034c683856200502390919063ffffffff16565b9050620034de6748284973b654d0c360c01b62000bb0565b620034f467af16bd1d5a57497b60c01b62000bb0565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b6200355f67c904e3ae3901100460c01b62002067565b6200357567e537229ec0efae4860c01b62002067565b6200358b67f038a7f588c7fac460c01b62002067565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111562003796576200362a672a9ceb9dfd13184460c01b62002067565b6200364067c31cff3f3e550a5b60c01b62002067565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550620036db672b280b06da382d9960c01b62002067565b620036f1675adc70d487c10a6760c01b62002067565b7fa19281a6f3163da06f6b82f3ecf0130493c52aba23cdc2a312f652742f0d1801600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383604051620037889392919062006ab7565b60405180910390a1620037e4565b620037ac67ececb952128405aa60c01b62002067565b620037c26760518e6fc9a4e5b360c01b62002067565b620037d8675db6617262db666b60c01b62002067565b620037e382620030aa565b5b5050565b620037fe673a2eb384e40e758060c01b62002067565b62003814672cb766e71c7a406960c01b62002067565b6200382a67278724ebb0cf7af860c01b62002067565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620039905762003876676e84abefbe8d854b60c01b62002067565b6200388c67f0da4acbe07aaf6a60c01b62002067565b620038a267ca471dbb8f3bdd2d60c01b62002067565b8373ffffffffffffffffffffffffffffffffffffffff16633f579f428483600067ffffffffffffffff81118015620038d957600080fd5b506040519080825280601f01601f1916602001820160405280156200390d5781602001600182028036833780820191505090505b506040518463ffffffff1660e01b81526004016200392e9392919062006c2c565b600060405180830381600087803b1580156200394957600080fd5b505af11580156200395e573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019062003989919062005e0a565b5062003c06565b620039a667401b4704901e051360c01b62002067565b620039bc677f2a405a6df3baf060c01b62002067565b620039d267d6569432ecb9cc9360c01b62002067565b60608473ffffffffffffffffffffffffffffffffffffffff16633f579f4284600063a9059cbb60e01b888760405160240162003a1092919062006bff565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518463ffffffff1660e01b815260040162003a8d9392919062006bbb565b600060405180830381600087803b15801562003aa857600080fd5b505af115801562003abd573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019062003ae8919062005e0a565b905062003b00677e17dc092f47a91c60c01b62002067565b62003b166772d8d39890fc6c2e60c01b62002067565b60008151111562003bed5762003b3767bf9ce49733f0d5d460c01b62002067565b62003b4d67e13175f8b139236760c01b62002067565b62003b63672fe2ba94c1340ae460c01b62002067565b62003b79670c63a27c41f188c760c01b62002067565b8080602001905181019062003b8f919062005d28565b62003bd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162003bc89062006f1a565b60405180910390fd5b62003be767dd885c421cf5fbdc60c01b62002067565b62003c04565b62003c03674733c84b85ee08c060c01b62002067565b5b505b50505050565b600062003c2467b2149190a8543f7960c01b62002067565b62003c3a673810433fad7eeddf60c01b62002067565b62003c506751c11bbc91e2bca060c01b62002067565b62003ca77f745089e29f2abf28f618236a5dc04d214ac05ead3440ba532b69e9d160ba2e7288888888888860405160200162003c929695949392919062006892565b60405160208183030381529060405262004cef565b90509695505050505050565b600080600062003cce67311a2b478cbd282960c01b62002067565b62003ce467df17c1c75aeafe1760c01b62002067565b62003cfa67bf7c2195446d590560c01b62002067565b600062003d0c8c8c8c8c8c8c62003c0c565b905062003d246783b15be829979b3c60c01b62002067565b62003d3a67a45e1ec83381431360c01b62002067565b60008651141562003eb05762003d5b6785f0004beed1333760c01b62002067565b62003d7167ac895a243b1e70d160c01b62002067565b62003d8767b1616e28e494530d60c01b62002067565b62003d9d67597ac664a0799cdc60c01b62002067565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166359b52ef88d838b6040518463ffffffff1660e01b815260040162003dfe9392919062006b7e565b60206040518083038186803b15801562003e1757600080fd5b505afa15801562003e2c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062003e52919062005d28565b62003e94576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162003e8b9062007090565b60405180910390fd5b62003eaa67f051107645bb2f5f60c01b62002067565b620041ea565b62003ec66797c9ecd66da0292d60c01b62002067565b62003edc675ac8aa1c6342917560c01b62002067565b62003ef2679978cc53dda5abb160c01b62002067565b600062003f0987836200502390919063ffffffff16565b905062003f2167417165fc7f166ada60c01b62002067565b62003f37676efa792376e005a660c01b62002067565b8073ffffffffffffffffffffffffffffffffffffffff168d73ffffffffffffffffffffffffffffffffffffffff1614620041d15762003f81672a2e7dacaf78928860c01b62002067565b62003f97670bda7ab114ac40ae60c01b62002067565b62003fad678bf9bed1ee64214e60c01b62002067565b62003fc367d485703a6bf78db460c01b62002067565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334d323a48e838c6040518463ffffffff1660e01b8152600401620040249392919062006b41565b60206040518083038186803b1580156200403d57600080fd5b505afa15801562004052573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062004078919062005d28565b8015620040975750620040966790d690c867c69c3b60c01b620023e1565b5b80620041735750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166334d323a48e838c6040518463ffffffff1660e01b8152600401620040ff9392919062006b41565b60206040518083038186803b1580156200411857600080fd5b505afa1580156200412d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062004153919062005d28565b801562004172575062004171671c2094d1644273ba60c01b620023e1565b5b5b620041b5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620041ac9062006fc4565b60405180910390fd5b620041cb67f08f78570eea95c760c01b62002067565b620041e8565b620041e7672a7d6e5a2e5d307560c01b62002067565b5b505b6200420067bc93d613e072dd5260c01b62002067565b62004216672b45b526b06e0c0760c01b62002067565b6200422c678d7692b21dbec17060c01b62002067565b6200423881866200346b565b6200427a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620042719062007090565b60405180910390fd5b6200429067d226df703a97dbf460c01b62002067565b620042a6672c9f99655ac639c960c01b62002067565b620042b48c8c8c8c62002e24565b9350620042cc6749690a565fea1a8960c01b62002067565b620042f7600860008681526020019081526020016000206000015488620033f990919063ffffffff16565b91506200430f676b1f4e0135277c7d60c01b62002067565b6200432567e138ecd8c234b6b960c01b62002067565b6200433b67a958077cbd809ed260c01b62002067565b600082141562004382576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620043799062006eb4565b60405180910390fd5b620043986773e90c803b4066e160c01b62002067565b620043ae679427a9f51ed5eee460c01b62002067565b866008600086815260200190815260200160002060000181905550620043df674bf084bc0b16d95660c01b62002067565b620043f567db29c573a19a624860c01b62002067565b620044018c8b62003549565b6200441767033d8f482a6734cc60c01b62002067565b600760008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1692506200449267ce71f1ff1c42794d60c01b62002067565b620044a867eae9d50085e0030860c01b62002067565b7f0d1cb77d1fe491f98926195d0b885509da18bc305dd1489f45610237d971ed46848d8d8d8d8c604051620044e39695949392919062006caa565b60405180910390a16200450167ac71d3f756020fd760c01b62002067565b620045176763fa8c5cf02895a560c01b62002067565b50985098509895505050505050565b6200453c6715e658c0f6e292b160c01b62000bb0565b62004552672c431971dc3f178360c01b62000bb0565b6200456867ea35c52bf51c28f760c01b62000bb0565b6200457e676c0120f97757204260c01b62000bb0565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620045f1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620045e89062006e4e565b60405180910390fd5b620046076768a59374672fe76a60c01b62000bb0565b6200461d676aacc0e4664894f760c01b62000bb0565b6200463367eacfbaa68e55918960c01b62000bb0565b6200464967b14b9b00bd32573160c01b62000bb0565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615620046d8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620046cf906200702a565b60405180910390fd5b620046ee67b43b7e075756508e60c01b62000bb0565b62004703663a0e15b185871360c01b62000bb0565b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550620047706719a12fa44495bf1260c01b62000bb0565b62004786676a185bb7ec86ed3260c01b62000bb0565b7fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051620047b992919062006a5d565b60405180910390a150565b6000620047dc67c86b29cadf0259cc60c01b62004f2e565b620047f2671cf2fd19ce80bc6460c01b62004f2e565b6200480867084e3d10c702b08960c01b62004f2e565b6000828401905062004825678715f5819eec045d60c01b62004f2e565b6200483b67389bd6f3088f8ddc60c01b62004f2e565b6200485167395edfe58ce67c0160c01b62004f2e565b8381101562004897576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200488e9062007008565b60405180910390fd5b620048ad67112f71c9280eda0a60c01b62004f2e565b620048c3673364fede1fdbaa8a60c01b62004f2e565b620048d96709a89731fdc49fbb60c01b62004f2e565b8091505092915050565b620048f967030f285a60ecefc360c01b62002067565b6200490f67fd9571c5c0f44df660c01b62002067565b62004925679cc362db300cb21860c01b62002067565b6200493b670a22294cfbf9f46160c01b62002067565b6000811162004981576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620049789062006e2c565b60405180910390fd5b620049976762964a89cfb16b0a60c01b62002067565b620049ad671a0aaa133b20e44560c01b62002067565b620049c3676de114036d14af3560c01b62002067565b6000620049da8284620033f990919063ffffffff16565b9050620049f26724d2a3851e27213d60c01b62002067565b62004a0867ea9e37af276df86660c01b62002067565b62004a1e67bd6009e65bc53ce560c01b62002067565b6000811162004a64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162004a5b9062006fa2565b60405180910390fd5b62004a7a67fabd930319874c0d60c01b62002067565b62004a9067fac60f578025d3b560c01b62002067565b62004aa6672e6282c6a7fea9c160c01b62002067565b62004ab486868684620037e8565b62004aca67d3d6664f2bfa8cfd60c01b62002067565b62004ae067ebaa71306d6092a560c01b62002067565b62004af88662004af08762002f3f565b8685620037e8565b505050505050565b62004b16672da1cbb2c8b712bf60c01b62000bb0565b62004b2c67a22c42eaa986a7b160c01b62000bb0565b62004b4267161aa01e34b61d0a60c01b62000bb0565b60008151141562004ba05762004b6367c00dbd5b52865bb760c01b62000bb0565b62004b79678a5faf951795361260c01b62000bb0565b62004b8f6745413064a2aacfc660c01b62000bb0565b62004b9a3262004526565b62004c7c565b62004bb667d4fad28aec7c156d60c01b62000bb0565b62004bcc67a88c23ab9e9dede660c01b62000bb0565b62004be2675a0d1bd87812f63460c01b62000bb0565b60008151905062004bfe67a97ff88e96ad9c4460c01b62000bb0565b62004c14672ebda776213b4a1860c01b62000bb0565b60005b8181101562004c795762004c3667197b6470f65d698160c01b62000bb0565b62004c4c678e0c2e8e0183d04a60c01b62000bb0565b62004c6b83828151811062004c5d57fe5b602002602001015162004526565b808060010191505062004c17565b50505b50565b62004c9567b69be6bf736d8c1a60c01b62000975565b62004cab67e18b25fd36211d0160c01b62000975565b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600062004d07677f88a34eed9bb47260c01b62002e21565b62004d1d6749bb13c5d53bb9db60c01b62002e21565b62004d336721a77fc5a306172f60c01b62002e21565b62004d6e60025430858560405160200162004d529493929190620069d1565b604051602081830303815290604052805190602001206200536f565b905092915050565b600062004d8e67ef0225287ba17ba060c01b62000975565b62004da46795958667c898951b60c01b62000975565b62004dba67ec06b0be9f42607760c01b62000975565b600062004dd267b7cd17d69da836b660c01b62000975565b62004de8671b7ac62a98e22a5460c01b62000975565b62004df2620053e3565b1562004ec95762004e0e674b9fe2d527bba60760c01b62000975565b62004e246737f58d18ef197c9060c01b62000975565b62004e3a679e0c2e494127333d60c01b62000975565b600083600036905003905062004e5b678767fa9e72b3efac60c01b62000975565b62004ec06000368390601485019262004e779392919062007178565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050620055cf565b91505062004ef9565b62004edf67531fb14624ef4c0060c01b62000975565b62004ef567365aa35b4857b9d560c01b62000975565b3390505b62004f0f67bb664b7abb1efcc160c01b62000975565b62004f2567c66db900ff1468ad60c01b62000975565b80915050919050565b50565b600062004f4967661b3e046c6cd30d60c01b62004f2e565b62004f5f67e38f22ae7186b57a60c01b62004f2e565b62004f7567907af1471e9eea1460c01b62004f2e565b62004f8b670ee1dc39f0f8880f60c01b62004f2e565b83831115829062004fd4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162004fcb919062006e08565b60405180910390fd5b5062004feb67722ed1e49049e2b960c01b62004f2e565b6200500167542b492b55f417a760c01b62004f2e565b6200501767d0fc59f528f581e460c01b62004f2e565b82840390509392505050565b60006200503b67610b12321a07a31960c01b62005715565b62005051670f66a519ee9137b960c01b62005715565b6200506767140d9f9935e2385360c01b62005715565b60006200507f670bfea895a9f81bec60c01b62005715565b6200509567a8c715ec3b9d89c160c01b62005715565b6041835114156200532257620050b667101129654a82afeb60c01b62005715565b620050cc67a44405322c11578a60c01b62005715565b620050e2673ae09945b2f5082360c01b62005715565b6000620050fa67900a30e48d0fc7bd60c01b62005715565b62005110677d193483635abe1860c01b62005715565b60006200512867f24e14d594e9077960c01b62005715565b6200513e67a847d7edacf7e00c60c01b62005715565b600062005156670bcc457b0963bc0f60c01b62005715565b6020860151925060408601519150606086015160001a9050620051846730650d5e99574f3560c01b62005715565b6200519a675197804ca644c8a460c01b62005715565b601b8160ff161015620051df57620051bd6781206cb7a1d9cec760c01b62005715565b620051d3679d0aaefe9954d7fb60c01b62005715565b601b81019050620051f6565b620051f567091b6422f681fe5560c01b62005715565b5b6200520c677849785c6ede9b0e60c01b62005715565b620052226732075f7517db825b60c01b62005715565b601b8160ff161480156200524857506200524767638a38da6bf5bb4360c01b62005718565b5b80620052765750601c8160ff1614801562005275575062005274671d94865be2a4ed5560c01b62005718565b5b5b1562005302576200529267657d88528f4e396b60c01b62005715565b620052a8675469679748b05cfe60c01b62005715565b60018782858560405160008152602001604052604051620052cd949392919062006d81565b6020604051602081039080840390855afa158015620052f0573d6000803e3d6000fd5b50505060206040510351935062005319565b6200531867539b701a1f57136860c01b62005715565b5b50505062005339565b6200533867f3927173995ed52360c01b62005715565b5b6200534f67303f1b174284648060c01b62005715565b6200536567c60031985823124160c01b62005715565b8091505092915050565b60006200538767cb1f58f8e99e701160c01b62005715565b6200539d67477dbcabce0c716f60c01b62005715565b620053b367c58144008cda6be160c01b62005715565b81604051602001620053c69190620069a7565b604051602081830303815290604052805190602001209050919050565b6000620053fb6718d82ab5ae60310f60c01b62000975565b6200541167b1091fd4002007a760c01b62000975565b6200542767e754ffc9cc3865c960c01b62000975565b60006200543f677ed152cd4162d4dd60c01b62000975565b6200545567d897cf3d19cf81cd60c01b62000975565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156200558557620054c2677fe0037509e467e160c01b62000975565b620054d867d0b1c04b10d8098a60c01b62000975565b620054ee670b92e025f4debba760c01b62000975565b620055046739792e98f7fbfdea60c01b62000975565b602c600036905010156200554f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620055469062006ed6565b60405180910390fd5b620055656755c879b00c45b69f60c01b62000975565b6200557b679a100b07747e893d60c01b62000975565b600190506200559c565b6200559b6757b90b57dc0a6a0160c01b62000975565b5b620055b267cc41edf636370ef460c01b62000975565b620055c867ff5a153bde944b0360c01b62000975565b8091505090565b6000620055e767e937c30ee854c6f460c01b62005723565b620055fd67ae40a839349e539460c01b62005723565b620056136779ff25ce2e3aef5860c01b62005723565b60006200562b67471a531a4d41d03a60c01b62005723565b6200564167dbf5cb870bd2bda760c01b62005723565b620056576715ee1c447c585eff60c01b62005723565b60148351146200569e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162005695906200706e565b60405180910390fd5b620056b467595b08e56ca2004360c01b62005723565b620056ca67658f3d9a047d9b2b60c01b62005723565b6c010000000000000000000000006020840151049050620056f6670a7d36500000fb3860c01b62005723565b6200570c678f46d49d645b8e7560c01b62005723565b80915050919050565b50565b600060019050919050565b50565b6108b8806200747f83390190565b6000813590506200574581620073c8565b92915050565b60008083601f8401126200575e57600080fd5b8235905067ffffffffffffffff8111156200577857600080fd5b6020830191508360208202830111156200579157600080fd5b9250929050565b600081519050620057a981620073e2565b92915050565b600081359050620057c081620073fc565b92915050565b600081359050620057d78162007416565b92915050565b60008083601f840112620057f057600080fd5b8235905067ffffffffffffffff8111156200580a57600080fd5b6020830191508360018202830111156200582357600080fd5b9250929050565b600082601f8301126200583c57600080fd5b8151620058536200584d82620070fd565b620070cf565b915080825260208301602083018583830111156200587057600080fd5b6200587d8382846200732e565b50505092915050565b600081359050620058978162007430565b92915050565b600081359050620058ae816200744a565b92915050565b600060608284031215620058c757600080fd5b620058d36060620070cf565b90506000620058e58482850162005734565b6000830152506020620058fb8482850162005734565b60208301525060406200591184828501620059c8565b60408301525092915050565b600060c082840312156200593057600080fd5b6200593c60c0620070cf565b905060006200594e8482850162005734565b6000830152506020620059648482850162005734565b60208301525060406200597a8482850162005734565b60408301525060606200599084828501620057af565b6060830152506080620059a684828501620059c8565b60808301525060a0620059bc84828501620059c8565b60a08301525092915050565b600081359050620059d98162007464565b92915050565b600081519050620059f08162007464565b92915050565b60006020828403121562005a0957600080fd5b600062005a198482850162005734565b91505092915050565b6000806040838503121562005a3657600080fd5b600062005a468582860162005734565b925050602062005a598582860162005734565b9150509250929050565b6000806000806080858703121562005a7a57600080fd5b600062005a8a8782880162005734565b945050602062005a9d8782880162005734565b935050604062005ab08782880162005734565b925050606062005ac387828801620057af565b91505092959194509250565b600080600080600080600080600060e08a8c03121562005aee57600080fd5b600062005afe8c828d0162005734565b995050602062005b118c828d0162005734565b985050604062005b248c828d01620057af565b975050606062005b378c828d01620059c8565b965050608062005b4a8c828d01620059c8565b95505060a08a013567ffffffffffffffff81111562005b6857600080fd5b62005b768c828d01620057dd565b945094505060c08a013567ffffffffffffffff81111562005b9657600080fd5b62005ba48c828d01620057dd565b92509250509295985092959850929598565b6000806000806000806000806000806101008b8d03121562005bd757600080fd5b600062005be78d828e0162005734565b9a5050602062005bfa8d828e0162005734565b995050604062005c0d8d828e01620057af565b985050606062005c208d828e01620059c8565b975050608062005c338d828e01620059c8565b96505060a062005c468d828e01620059c8565b95505060c08b013567ffffffffffffffff81111562005c6457600080fd5b62005c728d828e01620057dd565b945094505060e08b013567ffffffffffffffff81111562005c9257600080fd5b62005ca08d828e01620057dd565b92509250509295989b9194979a5092959850565b6000806000806060858703121562005ccb57600080fd5b600062005cdb8782880162005734565b945050602062005cee87828801620059c8565b935050604085013567ffffffffffffffff81111562005d0c57600080fd5b62005d1a87828801620057dd565b925092505092959194509250565b60006020828403121562005d3b57600080fd5b600062005d4b8482850162005798565b91505092915050565b60006020828403121562005d6757600080fd5b600062005d7784828501620057af565b91505092915050565b60008060006040848603121562005d9657600080fd5b600062005da686828701620057af565b935050602084013567ffffffffffffffff81111562005dc457600080fd5b62005dd286828701620057dd565b92509250509250925092565b60006020828403121562005df157600080fd5b600062005e0184828501620057c6565b91505092915050565b60006020828403121562005e1d57600080fd5b600082015167ffffffffffffffff81111562005e3857600080fd5b62005e46848285016200582a565b91505092915050565b60008060008060008060a0878903121562005e6957600080fd5b600062005e7989828a0162005886565b965050602062005e8c89828a016200589d565b955050604062005e9f89828a01620059c8565b945050606087013567ffffffffffffffff81111562005ebd57600080fd5b62005ecb89828a016200574b565b9350935050608062005ee089828a0162005734565b9150509295509295509295565b60006060828403121562005f0057600080fd5b600062005f1084828501620058b4565b91505092915050565b600060c0828403121562005f2c57600080fd5b600062005f3c848285016200591d565b91505092915050565b60006020828403121562005f5857600080fd5b600062005f6884828501620059df565b91505092915050565b62005f7c816200728e565b82525050565b62005f8d81620071ad565b82525050565b62005fa862005fa282620071ad565b62007364565b82525050565b62005fb981620071c1565b82525050565b62005fd462005fce82620071cd565b62007378565b82525050565b62005fe581620071f9565b82525050565b6200600062005ffa82620071f9565b62007382565b82525050565b600062006013826200712a565b6200601f818562007140565b9350620060318185602086016200732e565b6200603c81620073aa565b840191505092915050565b600062006054826200712a565b62006060818562007151565b9350620060728185602086016200732e565b80840191505092915050565b6200608981620072a2565b82525050565b6200609a81620072ca565b82525050565b620060ab81620072f2565b82525050565b6000620060be8262007135565b620060ca81856200715c565b9350620060dc8185602086016200732e565b620060e781620073aa565b840191505092915050565b6000620061016026836200715c565b91507f5061796d656e7452656769737472793a20696e76616c6964206465706f73697460008301527f2076616c756500000000000000000000000000000000000000000000000000006020830152604082019050919050565b600062006169601c836200716d565b91507f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000830152601c82019050919050565b6000620061ab6020836200715c565b91507f477561726465643a2063616e6e6f74206164642030783020677561726469616e6000830152602082019050919050565b6000620061ed602f836200715c565b91507f496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742060008301527f74686520696e697469616c697a657200000000000000000000000000000000006020830152604082019050919050565b600062006255602f836200715c565b91507f5061796d656e7452656769737472793a206465706f736974206578697420616c60008301527f72656164792072657175657374656400000000000000000000000000000000006020830152604082019050919050565b6000620062bd6026836200715c565b91507f5061796d656e7452656769737472793a20696e76616c6964207061796d656e7460008301527f2076616c756500000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000620063256022836200715c565b91507f47617465776179526563697069656e743a20696e76616c6964206d73672e646160008301527f74610000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006200638d602b836200715c565b91507f5061796d656e7452656769737472793a206465706f7369742065786974206e6f60008301527f74207265717565737465640000000000000000000000000000000000000000006020830152604082019050919050565b6000620063f5602d836200715c565b91507f5061796d656e7452656769737472793a204552433230546f6b656e207472616e60008301527f73666572207265766572746564000000000000000000000000000000000000006020830152604082019050919050565b60006200645d6026836200715c565b91507f477561726465643a2074782e6f726967696e206973206e6f742074686520677560008301527f61726469616e00000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000620064c5601f836200715c565b91507f5061796d656e7452656769737472793a20696e76616c696420616d6f756e74006000830152602082019050919050565b6000620065076024836200715c565b91507f5061796d656e7452656769737472793a206465706f7369742065786974206c6f60008301527f636b6564000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006200656f6027836200715c565b91507f5061796d656e7452656769737472793a20696e76616c6964207769746864726160008301527f772076616c7565000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000620065d76029836200715c565b91507f5061796d656e7452656769737472793a20696e76616c69642073656e6465722060008301527f7369676e617475726500000000000000000000000000000000000000000000006020830152604082019050919050565b60006200663f601f836200715c565b91507f477561726465643a20677561726469616e20646f65736e2774206578697374006000830152602082019050919050565b600062006681601e836200715c565b91507f536166654d6174684c69623a206164646974696f6e206f766572666c6f7700006000830152602082019050919050565b6000620066c36020836200715c565b91507f477561726465643a20677561726469616e20616c7265616479206578697374736000830152602082019050919050565b600062006705601b836200715c565b91507f477561726465643a2063616e6e6f742072656d6f76652073656c6600000000006000830152602082019050919050565b600062006747601d836200715c565b91507f42797465734c69623a20696e76616c69642064617461206c656e6774680000006000830152602082019050919050565b600062006789602b836200715c565b91507f5061796d656e7452656769737472793a20696e76616c6964206775617264696160008301527f6e207369676e61747572650000000000000000000000000000000000000000006020830152604082019050919050565b620067ed8162007277565b82525050565b62006808620068028262007277565b620073a0565b82525050565b620068198162007281565b82525050565b60006200682d828462005f93565b60148201915081905092915050565b60006200684a828762005f93565b6014820191506200685c828662005f93565b6014820191506200686e828562005f93565b60148201915062006880828462005feb565b60208201915081905095945050505050565b6000620068a0828962005f93565b601482019150620068b2828862005f93565b601482019150620068c4828762005f93565b601482019150620068d6828662005feb565b602082019150620068e88285620067f3565b602082019150620068fa8284620067f3565b602082019150819050979650505050505050565b60006200691c828662005f93565b6014820191506200692e828562005f93565b601482019150620069408284620067f3565b602082019150819050949350505050565b60006200695f828762005fbf565b60018201915062006971828662005f93565b60148201915062006983828562005feb565b60208201915062006995828462005feb565b60208201915081905095945050505050565b6000620069b4826200615a565b9150620069c2828462005feb565b60208201915081905092915050565b6000620069df8287620067f3565b602082019150620069f1828662005f93565b60148201915062006a03828562005feb565b60208201915062006a15828462006047565b915081905095945050505050565b600060208201905062006a3a600083018462005f82565b92915050565b600060208201905062006a57600083018462005f71565b92915050565b600060408201905062006a74600083018562005f71565b62006a83602083018462005f82565b9392505050565b600060408201905062006aa1600083018562005f82565b62006ab0602083018462005f82565b9392505050565b600060608201905062006ace600083018662005f82565b62006add602083018562005f82565b62006aec604083018462005f82565b949350505050565b600060808201905062006b0b600083018762005f82565b62006b1a602083018662005f82565b62006b29604083018562005f82565b62006b386060830184620067e2565b95945050505050565b600060608201905062006b58600083018662005f82565b62006b67602083018562005f82565b62006b766040830184620067e2565b949350505050565b600060608201905062006b95600083018662005f82565b62006ba4602083018562005fda565b62006bb36040830184620067e2565b949350505050565b600060608201905062006bd2600083018662005f82565b62006be16020830185620060a0565b818103604083015262006bf5818462006006565b9050949350505050565b600060408201905062006c16600083018562005f82565b62006c256020830184620067e2565b9392505050565b600060608201905062006c43600083018662005f82565b62006c526020830185620067e2565b818103604083015262006c66818462006006565b9050949350505050565b600060208201905062006c87600083018462005fae565b92915050565b600060208201905062006ca4600083018462005fda565b92915050565b600060c08201905062006cc1600083018962005fda565b62006cd0602083018862005f82565b62006cdf604083018762005f82565b62006cee606083018662005f82565b62006cfd608083018562005fda565b62006d0c60a0830184620067e2565b979650505050505050565b600060408201905062006d2e600083018562005fda565b62006d3d6020830184620067e2565b9392505050565b600060608201905062006d5b600083018662005fda565b62006d6a6020830185620067e2565b62006d796040830184620067e2565b949350505050565b600060808201905062006d98600083018762005fda565b62006da760208301866200680e565b62006db6604083018562005fda565b62006dc5606083018462005fda565b95945050505050565b600060208201905062006de560008301846200607e565b92915050565b600060208201905062006e0260008301846200608f565b92915050565b6000602082019050818103600083015262006e248184620060b1565b905092915050565b6000602082019050818103600083015262006e4781620060f2565b9050919050565b6000602082019050818103600083015262006e69816200619c565b9050919050565b6000602082019050818103600083015262006e8b81620061de565b9050919050565b6000602082019050818103600083015262006ead8162006246565b9050919050565b6000602082019050818103600083015262006ecf81620062ae565b9050919050565b6000602082019050818103600083015262006ef18162006316565b9050919050565b6000602082019050818103600083015262006f13816200637e565b9050919050565b6000602082019050818103600083015262006f3581620063e6565b9050919050565b6000602082019050818103600083015262006f57816200644e565b9050919050565b6000602082019050818103600083015262006f7981620064b6565b9050919050565b6000602082019050818103600083015262006f9b81620064f8565b9050919050565b6000602082019050818103600083015262006fbd8162006560565b9050919050565b6000602082019050818103600083015262006fdf81620065c8565b9050919050565b60006020820190508181036000830152620070018162006630565b9050919050565b60006020820190508181036000830152620070238162006672565b9050919050565b600060208201905081810360008301526200704581620066b4565b9050919050565b600060208201905081810360008301526200706781620066f6565b9050919050565b60006020820190508181036000830152620070898162006738565b9050919050565b60006020820190508181036000830152620070ab816200677a565b9050919050565b6000602082019050620070c96000830184620067e2565b92915050565b6000604051905081810181811067ffffffffffffffff82111715620070f357600080fd5b8060405250919050565b600067ffffffffffffffff8211156200711557600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600080858511156200718957600080fd5b838611156200719757600080fd5b6001850283019150848603905094509492505050565b6000620071ba8262007257565b9050919050565b60008115159050919050565b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6000819050919050565b60007fffffffffffffffff00000000000000000000000000000000000000000000000082169050919050565b60006200723c82620071ad565b9050919050565b60006200725082620071ad565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006200729b8262007306565b9050919050565b6000620072af82620072b6565b9050919050565b6000620072c38262007257565b9050919050565b6000620072d782620072de565b9050919050565b6000620072eb8262007257565b9050919050565b6000620072ff8262007277565b9050919050565b600062007313826200731a565b9050919050565b6000620073278262007257565b9050919050565b60005b838110156200734e57808201518184015260208101905062007331565b838111156200735e576000848401525b50505050565b600062007371826200738c565b9050919050565b6000819050919050565b6000819050919050565b60006200739982620073bb565b9050919050565b6000819050919050565b6000601f19601f8301169050919050565b60008160601b9050919050565b620073d381620071ad565b8114620073df57600080fd5b50565b620073ed81620071c1565b8114620073f957600080fd5b50565b6200740781620071f9565b81146200741357600080fd5b50565b620074218162007203565b81146200742d57600080fd5b50565b6200743b816200722f565b81146200744757600080fd5b50565b620074558162007243565b81146200746157600080fd5b50565b6200746f8162007277565b81146200747b57600080fd5b5056fe608060405261001e679894797dc84081af60c01b61009760201b60201c565b610038674e0f327275f95bf160c01b61009760201b60201c565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061009267bca2a619426d502460c01b61009a60201b60201c565b61009d565b50565b50565b61080c806100ac6000396000f3fe60806040526004361061007f5760003560e01c8063abe124f61161004e578063abe124f6146102f8578063b719e0571461034e578063c25a4496146103ba578063f77c47911461041057610086565b8063062e4f9c1461008b5780633f579f42146100f75780636480a27b146102205780636c3da61f1461028c57610086565b3661008657005b600080fd5b34801561009757600080fd5b506100df600480360360208110156100ae57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610451565b60405180821515815260200191505060405180910390f35b34801561010357600080fd5b506101a56004803603606081101561011a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561016157600080fd5b82018360208201111561017357600080fd5b8035906020019184600183028401116401000000008311171561019557600080fd5b9091929391929390505050610458565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e55780820151818401526020810190506101ca565b50505050905090810190601f1680156102125780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561022c57600080fd5b506102746004803603602081101561024357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061078c565b60405180821515815260200191505060405180910390f35b34801561029857600080fd5b506102e0600480360360208110156102af57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610797565b60405180821515815260200191505060405180910390f35b34801561030457600080fd5b5061034c6004803603602081101561031b57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107a2565b005b34801561035a57600080fd5b506103a26004803603602081101561037157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107a5565b60405180821515815260200191505060405180910390f35b3480156103c657600080fd5b5061040e600480360360208110156103dd57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107ac565b005b34801561041c57600080fd5b506104256107af565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000919050565b606061046e67d75916bd4c2e4fad60c01b6107ac565b61048267a226552386468aff60c01b6107a2565b61049667bb06267d15cafc8560c01b6107a2565b6104aa67d0eb72184d8e714c60c01b6107a2565b6104be67f128b7cf1088330a60c01b6107a2565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610562576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806107d4602c913960400191505060405180910390fd5b6105766787dbbb5ffe0583c160c01b6107a2565b61058a67f3741b7d431227a560c01b6107a2565b61059e67610428765944746860c01b6107ac565b6105b2676e804da1f05284de60c01b6107ac565b6105c6670a116b54072e078160c01b6107ac565b6105da67fae6e3328ae368d560c01b6107ac565b60606105f067400bca7a996bd4dc60c01b6107ac565b610604678a96bcbb24b128ac60c01b6107ac565b600061061a670c06ccf9e79a56eb60c01b6107ac565b8673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d8060008114610686576040519150601f19603f3d011682016040523d82523d6000602084013e61068b565b606091505b5080935081925050506106a8676c9308f9612de55060c01b6107ac565b6106bc67b4c2e51df69df26f60c01b6107ac565b6106d067582ecd5a0e7e114b60c01b6107ac565b80610743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b610757673a312ec397e2590e60c01b6107ac565b61076b6764b769ece4930ed060c01b6107ac565b61077f67ece725b1dc907d4260c01b6107ac565b8192505050949350505050565b600060019050919050565b600060019050919050565b50565b6000919050565b50565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a536166654d6174684c69623a207375627472616374696f6e206f766572666c6f77a164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class PaymentRegistry__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.PaymentRegistry__factory = PaymentRegistry__factory; +PaymentRegistry__factory.bytecode = _bytecode; +PaymentRegistry__factory.abi = _abi; diff --git a/dist/typings/factories/PersonalAccountImplementationV1__factory.d.ts b/dist/typings/factories/PersonalAccountImplementationV1__factory.d.ts new file mode 100644 index 00000000..6e608031 --- /dev/null +++ b/dist/typings/factories/PersonalAccountImplementationV1__factory.d.ts @@ -0,0 +1,54 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PersonalAccountImplementationV1, PersonalAccountImplementationV1Interface } from "../PersonalAccountImplementationV1"; +declare type PersonalAccountImplementationV1ConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class PersonalAccountImplementationV1__factory extends ContractFactory { + constructor(...args: PersonalAccountImplementationV1ConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): PersonalAccountImplementationV1; + connect(signer: Signer): PersonalAccountImplementationV1__factory; + static readonly bytecode = "0x608060405234801561001057600080fd5b5061002b675e592fe27197979c60c01b6100be60201b60201c565b61004567eca2e4778f3efef360c01b6100be60201b60201c565b326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061009f6709bbddebe144bcac60c01b6100c160201b60201c565b6100b967ed18049c77c0f91860c01b6100c460201b60201c565b6100c7565b50565b50565b50565b61153f806100d66000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c8063392e53cd116100b85780638f27e6b61161007c5780638f27e6b6146108a2578063aec6b680146108eb578063b49762a114610934578063c4d66de814610993578063ddd007be146109d7578063f23a6e6114610a3657610136565b8063392e53cd1461073157806345ebf7af146107515780634f952741146107b057806377dbbbcf1461080f5780637b1039991461086e57610136565b806318121646116100ff57806318121646146104c757806320c13b0b14610510578063249cb3fa146106115780632e6afd6e1461067357806334d23875146106d257610136565b806223de291461013b57806302f64b7c146102735780631262ed1c146102bc578063150b7a021461031b5780631626ba7e14610411575b600080fd5b610271600480360360c081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156101d857600080fd5b8201836020820111156101ea57600080fd5b8035906020019184600183028401116401000000008311171561020c57600080fd5b90919293919293908035906020019064010000000081111561022d57600080fd5b82018360208201111561023f57600080fd5b8035906020019184600183028401116401000000008311171561026157600080fd5b9091929391929390505050610b36565b005b6102ba6004803603602081101561028957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b54565b005b610303600480360360208110156102d257600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b57565b60405180821515815260200191505060405180910390f35b6103dc6004803603608081101561033157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561039857600080fd5b8201836020820111156103aa57600080fd5b803590602001918460018302840111640100000000831117156103cc57600080fd5b9091929391929390505050610b62565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104926004803603604081101561042757600080fd5b81019080803590602001909291908035906020019064010000000081111561044e57600080fd5b82018360208201111561046057600080fd5b8035906020019184600183028401116401000000008311171561048257600080fd5b9091929391929390505050610bb3565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b61050e600480360360208110156104dd57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610d8a565b005b6105dc6004803603604081101561052657600080fd5b810190808035906020019064010000000081111561054357600080fd5b82018360208201111561055557600080fd5b8035906020019184600183028401116401000000008311171561057757600080fd5b90919293919293908035906020019064010000000081111561059857600080fd5b8201836020820111156105aa57600080fd5b803590602001918460018302840111640100000000831117156105cc57600080fd5b9091929391929390505050610d8d565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b61065d6004803603604081101561062757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f91565b6040518082815260200191505060405180910390f35b6106ba6004803603602081101561068957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061113b565b60405180821515815260200191505060405180910390f35b610719600480360360208110156106e857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611142565b60405180821515815260200191505060405180910390f35b61073961114d565b60405180821515815260200191505060405180910390f35b6107986004803603602081101561076757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506111e0565b60405180821515815260200191505060405180910390f35b6107f7600480360360208110156107c657600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506111e7565b60405180821515815260200191505060405180910390f35b6108566004803603602081101561082557600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506111ee565b60405180821515815260200191505060405180910390f35b6108766111f9565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108e9600480360360208110156108b857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061121f565b005b6109326004803603602081101561090157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611222565b005b61097b6004803603602081101561094a57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611225565b60405180821515815260200191505060405180910390f35b6109d5600480360360208110156109a957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061122c565b005b610a1e600480360360208110156109ed57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506114a6565b60405180821515815260200191505060405180910390f35b610b01600480360360a0811015610a4c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610abd57600080fd5b820183602082011115610acf57600080fd5b80359060200191846001830284011164010000000083111715610af157600080fd5b90919293919293905050506114b1565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b610b4a67017df31b87810c5460c01b610b54565b5050505050505050565b50565b600060019050919050565b6000610b7867b98303ad269413cc60c01b610b54565b610b8c67d918383005e5446f60c01b610b54565b610ba0674f2f4cdbd8cfb29560c01b610b54565b63150b7a0260e01b905095945050505050565b6000610bc967b5797d6b0e7178f460c01b610b54565b610bdd6746f24b4f5fdfa5b960c01b610b54565b610bf167e0b2abc1e853224260c01b610b54565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e1e382ce308686866040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060206040518083038186803b158015610cb657600080fd5b505afa158015610cca573d6000803e3d6000fd5b505050506040513d6020811015610ce057600080fd5b81019080805190602001909291905050508015610d0d5750610d0c678166bab12740c46b60c01b6111ee565b5b80610d285750610d2767c9993a938969404a60c01b6111e0565b5b610d395763ffffffff60e01b610d81565b60405160200180807f697356616c69645369676e617475726528627974657333322c62797465732900815250601f019050604051602081830303815290604052805190602001205b90509392505050565b50565b6000610da3673366cc666f8f6ecb60c01b610b54565b610db767652c29ed636ab5f860c01b610b54565b610dcb676f4f2b259049e42b60c01b610b54565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663124e9eb330878787876040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f82011690508083019250505097505050505050505060206040518083038186803b158015610ebc57600080fd5b505afa158015610ed0573d6000803e3d6000fd5b505050506040513d6020811015610ee657600080fd5b81019080805190602001909291905050508015610f135750610f1267a42e2906e3e8a15c60c01b6111ee565b5b80610f2e5750610f2d672a01fa3e9fa5e5a260c01b6111e0565b5b610f3f5763ffffffff60e01b610f87565b60405160200180807f697356616c69645369676e61747572652862797465732c627974657329000000815250601d019050604051602081830303815290604052805190602001205b9050949350505050565b6000610fa767ca3ee0fe51202e0160c01b610b54565b610fbb67b4a80b43620676ca60c01b610b54565b610fcf67534936d0977ddc7160c01b610b54565b6000610fe567d1e0b5335b68fd6060c01b610b54565b610ff967363fb22d296acca360c01b610b54565b60405160200180807f455243373737546f6b656e73526563697069656e7400000000000000000000008152506015019050604051602081830303815290604052805190602001208414801561107957503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156110f45761109267074a18f7e88ecc1060c01b610b54565b6110a667263b3f1d731623f560c01b610b54565b60405160200180807f455243313832305f4143434550545f4d414749430000000000000000000000008152506014019050604051602081830303815290604052805190602001209050611109565b61110867a481020f1e3f0a9860c01b610b54565b5b61111d6759eee593d0b7818e60c01b610b54565b61113167d8e2a5e8436cb2b960c01b610b54565b8091505092915050565b6000919050565b600060019050919050565b60006111636726ed6cc6ca12515c60c01b610d8a565b61117767f3fc49482028cbb860c01b610d8a565b61118b6740317a79cae6a3ff60c01b610d8a565b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b6000919050565b6000919050565b600060019050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b50565b50565b6000919050565b61124067396904bfaa4b979260c01b610b54565b61125467b2266613e068a5ae60c01b610d8a565b611268676a66a63870f964f960c01b610d8a565b61127c6772f22eca890742ba60c01b610d8a565b61129067c8ab57d60023f99860c01b610d8a565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611334576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180611504602f913960400191505060405180910390fd5b61134867d31dec9098d614f660c01b610d8a565b61135c67a184879381a9c67460c01b610d8a565b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506113b1675e44e6e1c885710560c01b610d8a565b6113c567ff494a582c3fbf5c60c01b610b54565b6113d96729192f1db3add72f60c01b610b54565b6113ed67fc42a1175b48bb9960c01b610b54565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506114426732ca1833e9907bb960c01b610d8a565b611456672942130a5b94b82160c01b610d8a565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600060019050919050565b60006114c7679d34bdca53bef64660c01b610b54565b6114db6734111326528019b960c01b610b54565b6114ef6755f10e9de860303160c01b610b54565b63f23a6e6160e01b9050969550505050505056fe496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a6572a164736f6c634300060c000a"; + static readonly abi: ({ + inputs: any[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): PersonalAccountImplementationV1Interface; + static connect(address: string, signerOrProvider: Signer | Provider): PersonalAccountImplementationV1; +} +export {}; diff --git a/dist/typings/factories/PersonalAccountImplementationV1__factory.js b/dist/typings/factories/PersonalAccountImplementationV1__factory.js new file mode 100644 index 00000000..ec25b6cc --- /dev/null +++ b/dist/typings/factories/PersonalAccountImplementationV1__factory.js @@ -0,0 +1,483 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PersonalAccountImplementationV1__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "initializer", + type: "address", + }, + ], + name: "Initialized", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_305923d6", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3add61c5", + type: "bytes8", + }, + ], + name: "c_3add61c5", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_c0828b70", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5fdf5ee", + type: "bytes8", + }, + ], + name: "c_d5fdf5ee", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_false305923d6", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3add61c5", + type: "bytes8", + }, + ], + name: "c_false3add61c5", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_falsec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5fdf5ee", + type: "bytes8", + }, + ], + name: "c_falsed5fdf5ee", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__305923d6", + type: "bytes8", + }, + ], + name: "c_true305923d6", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__3add61c5", + type: "bytes8", + }, + ], + name: "c_true3add61c5", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_truec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5fdf5ee", + type: "bytes8", + }, + ], + name: "c_trued5fdf5ee", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "interfaceHash", + type: "bytes32", + }, + { + internalType: "address", + name: "addr", + type: "address", + }, + ], + name: "canImplementInterfaceForAddress", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "registry_", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "isInitialized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "messageHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "isValidSignature", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "isValidSignature", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + name: "onERC1155Received", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + name: "onERC721Received", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "registry", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + name: "tokensReceived", + outputs: [], + stateMutability: "pure", + type: "function", + }, +]; +const _bytecode = "0x608060405234801561001057600080fd5b5061002b675e592fe27197979c60c01b6100be60201b60201c565b61004567eca2e4778f3efef360c01b6100be60201b60201c565b326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061009f6709bbddebe144bcac60c01b6100c160201b60201c565b6100b967ed18049c77c0f91860c01b6100c460201b60201c565b6100c7565b50565b50565b50565b61153f806100d66000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c8063392e53cd116100b85780638f27e6b61161007c5780638f27e6b6146108a2578063aec6b680146108eb578063b49762a114610934578063c4d66de814610993578063ddd007be146109d7578063f23a6e6114610a3657610136565b8063392e53cd1461073157806345ebf7af146107515780634f952741146107b057806377dbbbcf1461080f5780637b1039991461086e57610136565b806318121646116100ff57806318121646146104c757806320c13b0b14610510578063249cb3fa146106115780632e6afd6e1461067357806334d23875146106d257610136565b806223de291461013b57806302f64b7c146102735780631262ed1c146102bc578063150b7a021461031b5780631626ba7e14610411575b600080fd5b610271600480360360c081101561015157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156101d857600080fd5b8201836020820111156101ea57600080fd5b8035906020019184600183028401116401000000008311171561020c57600080fd5b90919293919293908035906020019064010000000081111561022d57600080fd5b82018360208201111561023f57600080fd5b8035906020019184600183028401116401000000008311171561026157600080fd5b9091929391929390505050610b36565b005b6102ba6004803603602081101561028957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b54565b005b610303600480360360208110156102d257600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b57565b60405180821515815260200191505060405180910390f35b6103dc6004803603608081101561033157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561039857600080fd5b8201836020820111156103aa57600080fd5b803590602001918460018302840111640100000000831117156103cc57600080fd5b9091929391929390505050610b62565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6104926004803603604081101561042757600080fd5b81019080803590602001909291908035906020019064010000000081111561044e57600080fd5b82018360208201111561046057600080fd5b8035906020019184600183028401116401000000008311171561048257600080fd5b9091929391929390505050610bb3565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b61050e600480360360208110156104dd57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610d8a565b005b6105dc6004803603604081101561052657600080fd5b810190808035906020019064010000000081111561054357600080fd5b82018360208201111561055557600080fd5b8035906020019184600183028401116401000000008311171561057757600080fd5b90919293919293908035906020019064010000000081111561059857600080fd5b8201836020820111156105aa57600080fd5b803590602001918460018302840111640100000000831117156105cc57600080fd5b9091929391929390505050610d8d565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b61065d6004803603604081101561062757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f91565b6040518082815260200191505060405180910390f35b6106ba6004803603602081101561068957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061113b565b60405180821515815260200191505060405180910390f35b610719600480360360208110156106e857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611142565b60405180821515815260200191505060405180910390f35b61073961114d565b60405180821515815260200191505060405180910390f35b6107986004803603602081101561076757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506111e0565b60405180821515815260200191505060405180910390f35b6107f7600480360360208110156107c657600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506111e7565b60405180821515815260200191505060405180910390f35b6108566004803603602081101561082557600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506111ee565b60405180821515815260200191505060405180910390f35b6108766111f9565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108e9600480360360208110156108b857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061121f565b005b6109326004803603602081101561090157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611222565b005b61097b6004803603602081101561094a57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611225565b60405180821515815260200191505060405180910390f35b6109d5600480360360208110156109a957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061122c565b005b610a1e600480360360208110156109ed57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506114a6565b60405180821515815260200191505060405180910390f35b610b01600480360360a0811015610a4c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190640100000000811115610abd57600080fd5b820183602082011115610acf57600080fd5b80359060200191846001830284011164010000000083111715610af157600080fd5b90919293919293905050506114b1565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b610b4a67017df31b87810c5460c01b610b54565b5050505050505050565b50565b600060019050919050565b6000610b7867b98303ad269413cc60c01b610b54565b610b8c67d918383005e5446f60c01b610b54565b610ba0674f2f4cdbd8cfb29560c01b610b54565b63150b7a0260e01b905095945050505050565b6000610bc967b5797d6b0e7178f460c01b610b54565b610bdd6746f24b4f5fdfa5b960c01b610b54565b610bf167e0b2abc1e853224260c01b610b54565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e1e382ce308686866040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f8201169050808301925050509550505050505060206040518083038186803b158015610cb657600080fd5b505afa158015610cca573d6000803e3d6000fd5b505050506040513d6020811015610ce057600080fd5b81019080805190602001909291905050508015610d0d5750610d0c678166bab12740c46b60c01b6111ee565b5b80610d285750610d2767c9993a938969404a60c01b6111e0565b5b610d395763ffffffff60e01b610d81565b60405160200180807f697356616c69645369676e617475726528627974657333322c62797465732900815250601f019050604051602081830303815290604052805190602001205b90509392505050565b50565b6000610da3673366cc666f8f6ecb60c01b610b54565b610db767652c29ed636ab5f860c01b610b54565b610dcb676f4f2b259049e42b60c01b610b54565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663124e9eb330878787876040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f82011690508083019250505097505050505050505060206040518083038186803b158015610ebc57600080fd5b505afa158015610ed0573d6000803e3d6000fd5b505050506040513d6020811015610ee657600080fd5b81019080805190602001909291905050508015610f135750610f1267a42e2906e3e8a15c60c01b6111ee565b5b80610f2e5750610f2d672a01fa3e9fa5e5a260c01b6111e0565b5b610f3f5763ffffffff60e01b610f87565b60405160200180807f697356616c69645369676e61747572652862797465732c627974657329000000815250601d019050604051602081830303815290604052805190602001205b9050949350505050565b6000610fa767ca3ee0fe51202e0160c01b610b54565b610fbb67b4a80b43620676ca60c01b610b54565b610fcf67534936d0977ddc7160c01b610b54565b6000610fe567d1e0b5335b68fd6060c01b610b54565b610ff967363fb22d296acca360c01b610b54565b60405160200180807f455243373737546f6b656e73526563697069656e7400000000000000000000008152506015019050604051602081830303815290604052805190602001208414801561107957503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156110f45761109267074a18f7e88ecc1060c01b610b54565b6110a667263b3f1d731623f560c01b610b54565b60405160200180807f455243313832305f4143434550545f4d414749430000000000000000000000008152506014019050604051602081830303815290604052805190602001209050611109565b61110867a481020f1e3f0a9860c01b610b54565b5b61111d6759eee593d0b7818e60c01b610b54565b61113167d8e2a5e8436cb2b960c01b610b54565b8091505092915050565b6000919050565b600060019050919050565b60006111636726ed6cc6ca12515c60c01b610d8a565b61117767f3fc49482028cbb860c01b610d8a565b61118b6740317a79cae6a3ff60c01b610d8a565b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b6000919050565b6000919050565b600060019050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b50565b50565b6000919050565b61124067396904bfaa4b979260c01b610b54565b61125467b2266613e068a5ae60c01b610d8a565b611268676a66a63870f964f960c01b610d8a565b61127c6772f22eca890742ba60c01b610d8a565b61129067c8ab57d60023f99860c01b610d8a565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611334576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180611504602f913960400191505060405180910390fd5b61134867d31dec9098d614f660c01b610d8a565b61135c67a184879381a9c67460c01b610d8a565b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506113b1675e44e6e1c885710560c01b610d8a565b6113c567ff494a582c3fbf5c60c01b610b54565b6113d96729192f1db3add72f60c01b610b54565b6113ed67fc42a1175b48bb9960c01b610b54565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506114426732ca1833e9907bb960c01b610d8a565b611456672942130a5b94b82160c01b610d8a565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600060019050919050565b60006114c7679d34bdca53bef64660c01b610b54565b6114db6734111326528019b960c01b610b54565b6114ef6755f10e9de860303160c01b610b54565b63f23a6e6160e01b9050969550505050505056fe496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a6572a164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class PersonalAccountImplementationV1__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.PersonalAccountImplementationV1__factory = PersonalAccountImplementationV1__factory; +PersonalAccountImplementationV1__factory.bytecode = _bytecode; +PersonalAccountImplementationV1__factory.abi = _abi; diff --git a/dist/typings/factories/PersonalAccountRegistry__factory.d.ts b/dist/typings/factories/PersonalAccountRegistry__factory.d.ts new file mode 100644 index 00000000..f74f46cb --- /dev/null +++ b/dist/typings/factories/PersonalAccountRegistry__factory.d.ts @@ -0,0 +1,54 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { PersonalAccountRegistry, PersonalAccountRegistryInterface } from "../PersonalAccountRegistry"; +declare type PersonalAccountRegistryConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class PersonalAccountRegistry__factory extends ContractFactory { + constructor(...args: PersonalAccountRegistryConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): PersonalAccountRegistry; + connect(signer: Signer): PersonalAccountRegistry__factory; + static readonly bytecode = "0x60806040523480156200001157600080fd5b506200002e676ed90a7f5cb15c7560c01b6200010160201b60201c565b6200004a6716199243b9d4db2560c01b6200010460201b60201c565b62000066675e592fe27197979c60c01b6200010760201b60201c565b6200008267eca2e4778f3efef360c01b6200010760201b60201c565b32600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000df67db84cf13641fc64d60c01b6200010a60201b60201c565b620000fb678a3d97f4ff6270f860c01b6200010d60201b60201c565b62000110565b50565b50565b50565b50565b50565b617d4980620001206000396000f3fe60806040523480156200001157600080fd5b5060043610620002805760003560e01c80635967b7ac1162000159578063cade6a5d11620000c9578063da9fc1ae1162000087578063da9fc1ae1462000fd0578063db63f5821462001017578063e1e382ce146200107e578063e5c7278f146200113d578063f4876c7414620012065762000280565b8063cade6a5d1462000ddc578063d089e11a1462000e4d578063d0f710d61462000e83578063d53641231462000f22578063d628d0861462000f845762000280565b8063a4db4b6b1162000117578063a4db4b6b1462000bf2578063a526d83b1462000c54578063bb890d3f1462000c9b578063c1cad69e1462000d18578063c369d5fe1462000d7a5762000280565b80635967b7ac14620009dc578063714041561462000a3e5780637663f44c1462000a8557806390482d721462000ad1578063a23441e71462000b905762000280565b80631a84140311620001f557806334d323a411620001b357806334d323a4146200083e578063392e53cd14620008c557806343013c2414620008e75780634623ec77146200092e5780635405622e14620009905762000280565b80631a841403146200064a5780631dccb78714620006bb57806321a5f5da146200071d5780632e6afd6e146200077f5780633164b5e114620007e15762000280565b806311464fbe116200024357806311464fbe1462000423578063116191b61462000459578063124e9eb3146200048f5780631262ed1c146200059c5780631812164614620005fe5762000280565b806301883a24146200028557806305ae19e614620002d15780630900f01014620003335780630c4b1a17146200037a5780630c68ba2114620003c6575b600080fd5b620002cf600480360360208110156200029d57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506200126d565b005b6200031b60048036036020811015620002e957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001270565b60405180821515815260200191505060405180910390f35b62000378600480360360208110156200034b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506200127b565b005b620003c4600480360360208110156200039257600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001420565b005b6200040b60048036036020811015620003de57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062001423565b60405180821515815260200191505060405180910390f35b6200042d620014ba565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b62000463620014e0565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6200058460048036036060811015620004a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115620004e557600080fd5b820183602082011115620004f857600080fd5b803590602001918460018302840111640100000000831117156200051b57600080fd5b9091929391929390803590602001906401000000008111156200053d57600080fd5b8201836020820111156200055057600080fd5b803590602001918460018302840111640100000000831117156200057357600080fd5b909192939192939050505062001506565b60405180821515815260200191505060405180910390f35b620005e660048036036020811015620005b457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001607565b60405180821515815260200191505060405180910390f35b62000648600480360360208110156200061657600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001612565b005b620006b9600480360360608110156200066257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505062001615565b005b6200070560048036036020811015620006d357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001a90565b60405180821515815260200191505060405180910390f35b62000767600480360360208110156200073557600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001a97565b60405180821515815260200191505060405180910390f35b620007c9600480360360208110156200079757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001aa2565b60405180821515815260200191505060405180910390f35b6200082660048036036020811015620007f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062001aa9565b60405180821515815260200191505060405180910390f35b620008ad600480360360608110156200085657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505062001b44565b60405180821515815260200191505060405180910390f35b620008cf62001d27565b60405180821515815260200191505060405180910390f35b6200092c60048036036020811015620008ff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062001dc2565b005b62000978600480360360208110156200094657600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001e4c565b60405180821515815260200191505060405180910390f35b620009da60048036036020811015620009a857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001e57565b005b62000a2660048036036020811015620009f457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001e5a565b60405180821515815260200191505060405180910390f35b62000a836004803603602081101562000a5657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062001e61565b005b62000acf6004803603602081101562000a9d57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050620022e3565b005b62000b8e6004803603606081101562000ae957600080fd5b810190808035906020019064010000000081111562000b0757600080fd5b82018360208201111562000b1a57600080fd5b8035906020019184602083028401116401000000008311171562000b3d57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050620022e6565b005b62000bda6004803603602081101562000ba857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062002612565b60405180821515815260200191505060405180910390f35b62000c3c6004803603602081101562000c0a57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062002619565b60405180821515815260200191505060405180910390f35b62000c996004803603602081101562000c6c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062002624565b005b62000d006004803603604081101562000cb357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050620027c7565b60405180821515815260200191505060405180910390f35b62000d626004803603602081101562000d3057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506200281f565b60405180821515815260200191505060405180910390f35b62000dc46004803603602081101562000d9257600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062002826565b60405180821515815260200191505060405180910390f35b62000e216004803603602081101562000df457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506200282d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b62000e5762002883565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b62000f0a6004803603604081101562000e9b57600080fd5b81019080803590602001909291908035906020019064010000000081111562000ec357600080fd5b82018360208201111562000ed657600080fd5b8035906020019184600183028401116401000000008311171562000ef957600080fd5b9091929391929390505050620028a9565b60405180821515815260200191505060405180910390f35b62000f6c6004803603602081101562000f3a57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062002946565b60405180821515815260200191505060405180910390f35b62000fce6004803603602081101562000f9c57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062002951565b005b620010156004803603602081101562000fe857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062002954565b005b6200107c600480360360408110156200102f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050620029dc565b005b62001125600480360360608110156200109657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115620010de57600080fd5b820183602082011115620010f157600080fd5b803590602001918460018302840111640100000000831117156200111457600080fd5b909192939192939050505062002dad565b60405180821515815260200191505060405180910390f35b62001204600480360360808110156200115557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115620011bd57600080fd5b820183602082011115620011d057600080fd5b80359060200191846001830284011164010000000083111715620011f357600080fd5b909192939192939050505062002e5f565b005b6200126b600480360360408110156200121e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062002f6c565b005b50565b600060019050919050565b620012916754a94b41112a5ad160c01b6200126d565b620012a7677e48a4752a028e1460c01b62001e57565b620012bd6754e2f8cd8fda0cfe60c01b62001e57565b620012d3671b1abbc8110e006760c01b62001e57565b620012e9677621c15edc08840a60c01b62001e57565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166200138c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018062007c5c6026913960400191505060405180910390fd5b620013a2671978b446280e03b660c01b62001e57565b620013b867bc99b99e8c2c7a2260c01b62001e57565b620013ce67e1c0388b3599041b60c01b6200126d565b620013e467b9274d0c04643b1c60c01b6200126d565b620013fa67aeb462cbaf19eb2b60c01b6200126d565b62001410671a6e1b90aaa718b060c01b6200126d565b6200141d816001620033ed565b50565b50565b60006200143b67d9e99bddfebda2f060c01b62001e57565b62001451676401fd9fc2105e0160c01b62001e57565b620014676733760aa820b07e2a60c01b62001e57565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006200151e6791a6df43dbc9e35160c01b6200126d565b6200153467542e91cab1b3959f60c01b6200126d565b6200154a67c16820893afe542560c01b6200126d565b620015fc86620015f685858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050620015e789898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506200363f565b620037f290919063ffffffff16565b62003b51565b905095945050505050565b600060019050919050565b50565b6200162b6791b72b30fc06da6160c01b6200126d565b62001641671813bc58da934b9760c01b6200126d565b62001657670bb0a84d15b88ab660c01b6200126d565b620016628362003e48565b506200167967192ead767e0b426d60c01b6200126d565b6200168f67c49d61359e3bbd7b60c01b6200126d565b6200169a83620044ee565b620016b06718def0e9d596a22960c01b6200126d565b620016c667577729cbc87e65c360c01b6200126d565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620017a25762001712678c80f84aaeabedeb60c01b6200126d565b620017286789186e2b1c6751f960c01b6200126d565b6200173e6752ebed5195a6127860c01b6200126d565b6200179b833283600067ffffffffffffffff811180156200175e57600080fd5b506040519080825280601f01601f191660200182016040528015620017925781602001600182028036833780820191505090505b506000620046a8565b50620019ce565b620017b867e53a5fc2508d9d1360c01b6200126d565b620017ce6765383383f6acd6d860c01b6200126d565b620017e467aadb0dd2d6a4318160c01b6200126d565b60606200188a8484600063a9059cbb60e01b3287604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506000620046a8565b9050620018a267d11c2ab2624bd9b860c01b6200126d565b620018b8672cbe18415362a3b460c01b6200126d565b600081511115620019b557620018d967897c81ba5765a56e60c01b6200126d565b620018ef67b61079bde7aae4a960c01b6200126d565b6200190567ba1b477618236ab960c01b6200126d565b6200191b67f3987bffc80604c860c01b6200126d565b8080602001905160208110156200193157600080fd5b810190808051906020019092919050505062001999576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018062007c826035913960400191505060405180910390fd5b620019af67926cf9d8fbf8088c60c01b6200126d565b620019cc565b620019cb6728a54db3b55ec06a60c01b6200126d565b5b505b620019e46730cd3b1bf7ea854460c01b6200126d565b620019fa6702cf38c5dccf169060c01b6200126d565b7feb5511fbef89123439f12682f0e9d0fc9696913b26eee55434c77d62c30aa7ca83328484604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200194505050505060405180910390a1505050565b6000919050565b600060019050919050565b6000919050565b600062001ac167f99ada48de50c7cf60c01b6200126d565b62001ad76778102406ebbfe33f60c01b6200126d565b62001aed67681f7ab1e8ba294a60c01b6200126d565b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff169050919050565b600062001b5c6793a39e2c9f7ee9ba60c01b6200126d565b62001b72673c97afc8ecfead0560c01b6200126d565b62001b88676acdb8d58ef6346660c01b6200126d565b600062001ba0674e80aa82dfed6db160c01b6200126d565b62001bb66702ab7d633dd730ee60c01b6200126d565b62001bc2858562003b51565b1562001bfe5762001bde6778226c994dcbf9a360c01b6200126d565b62001bf46703140093de95238560c01b6200126d565b6001905062001cf0565b62001c14679adf213db50d225060c01b6200126d565b62001c2a67076837ed1b1c119460c01b6200126d565b62001ced83600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff1615151515815260200160018201548152505062004d8f90919063ffffffff16565b90505b62001d0667e9e38f04d4f808bb60c01b6200126d565b62001d1c6781c8150efac1d5ad60c01b6200126d565b809150509392505050565b600062001d3f6726ed6cc6ca12515c60c01b62001612565b62001d5567f3fc49482028cbb860c01b62001612565b62001d6b6740317a79cae6a3ff60c01b62001612565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b62001dd867f5a44943e88d339060c01b6200126d565b62001dee6722f63d5bd060bbe460c01b6200126d565b62001e0467e8676f911de306ac60c01b6200126d565b62001e0f8162003e48565b5062001e2667d95317d1b0cdf90460c01b6200126d565b62001e3c676f173d95227f79c460c01b6200126d565b62001e4981600162004f88565b50565b600060019050919050565b50565b6000919050565b62001e7767f772222a3366273960c01b62001e57565b62001e8d677e48a4752a028e1460c01b62001e57565b62001ea36754e2f8cd8fda0cfe60c01b62001e57565b62001eb9671b1abbc8110e006760c01b62001e57565b62001ecf677621c15edc08840a60c01b62001e57565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1662001f72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018062007c5c6026913960400191505060405180910390fd5b62001f88671978b446280e03b660c01b62001e57565b62001f9e67bc99b99e8c2c7a2260c01b62001e57565b62001fb467afd0aa94ba119c4e60c01b62001e57565b62001fca670fe65c577fbdf81160c01b62001e57565b62001fe067e175d6b24c96a59a60c01b62001e57565b62001ff667514f675749914bc160c01b62001e57565b6200200c67fed39a5b1d24bceb60c01b62001e57565b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161415620020af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f477561726465643a2063616e6e6f742072656d6f76652073656c66000000000081525060200191505060405180910390fd5b620020c567325d0391dd900ca560c01b62001e57565b620020db67f494ac4bc126e05760c01b62001e57565b620020f167a8a2f5acd805e41c60c01b62001e57565b62002107679f1149f801dce85b60c01b62001e57565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16620021c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f477561726465643a20677561726469616e20646f65736e27742065786973740081525060200191505060405180910390fd5b620021dc67e767f88c374b22f760c01b62001e57565b620021f2679a8eb2ad91b01fb960c01b62001e57565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506200225f675f52f4e3c8e1709960c01b62001e57565b6200227567b8b235546176405e60c01b62001e57565b7fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b50565b620022fc6769e37de4b7a8c6db60c01b6200126d565b6200231267b2266613e068a5ae60c01b62001612565b62002328676a66a63870f964f960c01b62001612565b6200233e6772f22eca890742ba60c01b62001612565b6200235467c8ab57d60023f99860c01b62001612565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614620023fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f81526020018062007b90602f913960400191505060405180910390fd5b6200241267d31dec9098d614f660c01b62001612565b6200242867a184879381a9c67460c01b62001612565b6000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062002480675e44e6e1c885710560c01b62001612565b62002496677c725e0e9d21290b60c01b6200126d565b620024ac67d70eb0fbd8c587fd60c01b6200126d565b620024c267dede73f89e94490c60c01b6200126d565b620024d86715731c365df53ffa60c01b6200126d565b62002524848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505062005315565b6200253a67fb7bfb057c4bd97560c01b6200126d565b620025506735feea27802efcef60c01b6200126d565b6200255c308362005494565b6200257267b5e8f96e156f1bc560c01b6200126d565b62002588674c8c76316743ceb260c01b6200126d565b620025938162005520565b620025a96732ca1833e9907bb960c01b62001612565b620025bf672942130a5b94b82160c01b62001612565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150505050565b6000919050565b600060019050919050565b6200263a67b59862a5cb01d1d860c01b62001e57565b62002650677e48a4752a028e1460c01b62001e57565b620026666754e2f8cd8fda0cfe60c01b62001e57565b6200267c671b1abbc8110e006760c01b62001e57565b62002692677621c15edc08840a60c01b62001e57565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1662002735576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018062007c5c6026913960400191505060405180910390fd5b6200274b671978b446280e03b660c01b62001e57565b6200276167bc99b99e8c2c7a2260c01b62001e57565b6200277767e0409d61ef95483b60c01b62001e57565b6200278d67acb2c628a7cbdba860c01b62001e57565b620027a3677f6b80ac4f415fbe60c01b62001e57565b620027b967c7dcdfc4bd89af4960c01b62001e57565b620027c48162005590565b50565b6000620027df67b9a62806a5aac64560c01b6200126d565b620027f56742a98292c69e6ed760c01b6200126d565b6200280b678a9ee5d10ccc3ed860c01b6200126d565b62002817838362003b51565b905092915050565b6000919050565b6000919050565b60006200284567fdf339f1effa493f60c01b6200126d565b6200285b67b0819f27545d8ba860c01b6200126d565b62002871673b6d20211f4fbf3960c01b6200126d565b6200287c82620058c0565b9050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000620028c16746d5f36e497b280d60c01b62001e57565b620028d7677077a4665ef04d8360c01b62001e57565b620028ed6788288bf71f1972a760c01b62001e57565b6200293d8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505062005986565b90509392505050565b600060019050919050565b50565b6200296a67b0c22330b325e16860c01b6200126d565b6200298067314eff398ce1d91360c01b6200126d565b62002996670eb8f87657af427760c01b6200126d565b620029a18162003e48565b50620029b86726bd12ff2de0d51460c01b6200126d565b620029ce67b34a67d458ff31ae60c01b6200126d565b620029d981620044ee565b50565b620029f267926a1c5ba0f7822960c01b6200126d565b62002a0867bdbe2d22e80196f760c01b6200126d565b62002a1e67d2ef2385457bb49c60c01b6200126d565b600062002a2b8362003e48565b905062002a436746d2b04003be993560c01b6200126d565b62002a5967515d4314fe5509d860c01b6200126d565b62002a6f67a1f43c6393bae7d960c01b6200126d565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562002af6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018062007c31602b913960400191505060405180910390fd5b62002b0c67f0e83eebd30a3eb860c01b6200126d565b62002b226747538f56d841b53a60c01b6200126d565b62002b3867fd3d505e34aa133c60c01b6200126d565b62002b4e6704a7dc5ab485862d60c01b6200126d565b62002c07600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff1615151515815260200160018201548152505062005a64565b62002c5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018062007b2f602c913960400191505060405180910390fd5b62002c7467c426f4b79e74889e60c01b6200126d565b62002c8a67e213077cf4ae202d60c01b6200126d565b43600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555062002d27670d0fef597ce030c460c01b6200126d565b62002d3d674bf2c671b0a6478660c01b6200126d565b7f1ce3cbbc43ee231e5b950332f2b0b9dd7d349291a3ee411ce5c5c7ed745661bb8383604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1505050565b600062002dc56741030c2972d6e34f60c01b6200126d565b62002ddb6742bd540d958de81e60c01b6200126d565b62002df167b0440667352e718860c01b6200126d565b62002e558562002e4f85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505087620037f290919063ffffffff16565b62003b51565b9050949350505050565b62002e7567364c7f3f88c09e6f60c01b6200126d565b62002e8b67ebb573595f25095c60c01b6200126d565b62002ea167e590352c1a2702ea60c01b6200126d565b62002eac8562003e48565b5062002ec367fb0737d76cdd370f60c01b6200126d565b62002ed967987d775282fac11360c01b6200126d565b62002ee485620044ee565b62002efa67a4eb73f96731bc0e60c01b6200126d565b62002f1067a1c04e5b5645157d60c01b6200126d565b62002f6485858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506001620046a8565b505050505050565b62002f82673a80f36de3a3614760c01b6200126d565b62002f9867f68b672a5ec3af7160c01b6200126d565b62002fae674a9088d7d425154260c01b6200126d565b62002fb98262003e48565b5062002fd0670cd4838ff272421160c01b6200126d565b62002fe667b86c1c5cd898ecdd60c01b6200126d565b62002ffc678af24ae56013df8a60c01b6200126d565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562003084576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d81526020018062007d10602d913960400191505060405180910390fd5b6200309a6788d7f01b7455142d60c01b6200126d565b620030b06704bceefd079fca5160c01b6200126d565b620030c667a3403c226087073760c01b6200126d565b620030dc672d0c5e3310f0eaaa60c01b6200126d565b62003195600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff1615151515815260200160018201548152505062005a64565b15620031ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d81526020018062007ce3602d913960400191505060405180910390fd5b62003203671826b86dc6571f6160c01b6200126d565b6200321967d1dd0c83140c51a660c01b6200126d565b6001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff021916908315150217905550620032ca6721e789db4fa579d860c01b6200126d565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055506200336867e913e41e2decf46f60c01b6200126d565b6200337e670bd891d39b172f5960c01b6200126d565b7f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644688282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15050565b6200340367778d2c4844cb57c860c01b620022e3565b62003419672e46345dd30446f560c01b620022e3565b6200342f674b01c1a412029cf960c01b620022e3565b6200344567b5ba0ed84140968960c01b620022e3565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620034cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018062007a96603b913960400191505060405180910390fd5b620034e36712934e542bfcaae260c01b620022e3565b620034f9676ab5a434897f3fa460c01b620022e3565b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062003550671440edfeaa98b7c160c01b620022e3565b62003566671da8e35e0bfd87a360c01b620022e3565b801562003624576200358367f166ead2d805373960c01b620022e3565b620035996738487a6c4bc99ca160c01b620022e3565b620035af677be1bddbe5c5292160c01b620022e3565b7f70d9f5a076620216a6050e493f3ce69749de0b68fa4b839ba2518660ba8b9cf0600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a16200363b565b6200363a6777dc91dc63848bbe60c01b620022e3565b5b5050565b60006200365767957e7830bbd813a160c01b62005abb565b6200366d6777388b439e4c706660c01b62005abb565b62003683678c0dad3efcfc1e3260c01b62005abb565b6200368f825162005abe565b826040516020018082805190602001908083835b60208310620036c85780518252602082019150602081019050602083039250620036a3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405260405160200180807f19457468657265756d205369676e6564204d6573736167653a0a000000000000815250601a0183805190602001908083835b602083106200375c578051825260208201915060208101905060208303925062003737565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310620037af57805182526020820191506020810190506020830392506200378a565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052805190602001209050919050565b60006200380a67610b12321a07a31960c01b62005e4d565b62003820670f66a519ee9137b960c01b62005e4d565b6200383667140d9f9935e2385360c01b62005e4d565b60006200384e670bfea895a9f81bec60c01b62005e4d565b6200386467a8c715ec3b9d89c160c01b62005e4d565b60418351141562003b04576200388567101129654a82afeb60c01b62005e4d565b6200389b67a44405322c11578a60c01b62005e4d565b620038b1673ae09945b2f5082360c01b62005e4d565b6000620038c967900a30e48d0fc7bd60c01b62005e4d565b620038df677d193483635abe1860c01b62005e4d565b6000620038f767f24e14d594e9077960c01b62005e4d565b6200390d67a847d7edacf7e00c60c01b62005e4d565b600062003925670bcc457b0963bc0f60c01b62005e4d565b6020860151925060408601519150606086015160001a9050620039536730650d5e99574f3560c01b62005e4d565b62003969675197804ca644c8a460c01b62005e4d565b601b8160ff161015620039ae576200398c6781206cb7a1d9cec760c01b62005e4d565b620039a2679d0aaefe9954d7fb60c01b62005e4d565b601b81019050620039c5565b620039c467091b6422f681fe5560c01b62005e4d565b5b620039db677849785c6ede9b0e60c01b62005e4d565b620039f16732075f7517db825b60c01b62005e4d565b601b8160ff1614801562003a17575062003a1667638a38da6bf5bb4360c01b62005e50565b5b8062003a455750601c8160ff1614801562003a44575062003a43671d94865be2a4ed5560c01b62005e50565b5b5b1562003ae45762003a6167657d88528f4e396b60c01b62005e4d565b62003a77675469679748b05cfe60c01b62005e4d565b60018782858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801562003ad2573d6000803e3d6000fd5b50505060206040510351935062003afb565b62003afa67539b701a1f57136860c01b62005e4d565b5b50505062003b1b565b62003b1a67f3927173995ed52360c01b62005e4d565b5b62003b3167303f1b174284648060c01b62005e4d565b62003b4767c60031985823124160c01b62005e4d565b8091505092915050565b600062003b6967c354c8450bcd34cf60c01b6200126d565b62003b7f67cd0742fe4e99483360c01b6200126d565b62003b95677f418a800c9b82c060c01b6200126d565b600062003bad67b04d72f6a417485060c01b6200126d565b62003bc36738d65856eaee29dc60c01b6200126d565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff161562003d135762003c6f67f5f005ee48c1870760c01b6200126d565b62003c85675a1d48884d5da9cf60c01b6200126d565b6000600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015414905062003e12565b62003d296756bb552a06669d0160c01b6200126d565b62003d3f676753146f02c0ecc560c01b6200126d565b6000801b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154141562003dfa5762003da36726683adc01e2cd1a60c01b6200126d565b62003db967a6ef75a43a66e93a60c01b6200126d565b62003dc483620058c0565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614905062003e11565b62003e1067cb15a9b78ba067e360c01b6200126d565b5b5b62003e28675b6d76a1ab8462e060c01b6200126d565b62003e3e673432615ddef5022060c01b6200126d565b8091505092915050565b600062003e60671c06bc1c16c1f77c60c01b6200126d565b62003e7667ce75fb64a17437c960c01b6200126d565b62003e8c677a3a2ae35660ac0360c01b6200126d565b600062003e9862005e5b565b905062003eb0674320e171edc92c9760c01b6200126d565b62003ec6677b54aad621e001e060c01b6200126d565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1615620040ad5762003f72675b9196a79da8eee960c01b6200126d565b62003f88676f6a423ac6ff1ffe60c01b6200126d565b62003f9e672c5e03296536439f60c01b6200126d565b62003fb467b770e11113162d0c60c01b6200126d565b6000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541462004091576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018062007ad16038913960400191505060405180910390fd5b620040a7677a9ead63ef6ae64e60c01b6200126d565b620044b9565b620040c367275560e0a21b70fc60c01b6200126d565b620040d9678e13bff009acfa7e60c01b6200126d565b620040ef67151fa54bc9999fbd60c01b6200126d565b6200410567da81c3129081711a60c01b6200126d565b6000801b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015414620041a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018062007ad16038913960400191505060405180910390fd5b620041ba67870b738b3012751160c01b6200126d565b620041d0673d47daa55862f60360c01b6200126d565b620041e66735eaa3f4bee1b6b760c01b6200126d565b600081604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b815260140191505060405160208183030381529060405280519060200120905062004240672742dad7d55a86e660c01b6200126d565b62004256678d56020a3f743a6260c01b6200126d565b6200426c67cf4cdf4a622a45c860c01b6200126d565b620042778162005eb0565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614620042fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018062007ad16038913960400191505060405180910390fd5b620043126771a41025a0bcc88360c01b6200126d565b6200432867d06d00b914125f0360c01b6200126d565b80600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055506200438567f3c966cb89981dc860c01b6200126d565b6001600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055506200443667f248b723bf97dcfb60c01b6200126d565b6200444c67538ed3731eca3a7f60c01b6200126d565b7f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644688483604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1505b620044cf678aa2f1b631fb753160c01b6200126d565b620044e567458da016e938a2b460c01b6200126d565b80915050919050565b6200450467e981b1a97547bc6b60c01b6200126d565b6200451a674e4c5d840a3c552560c01b6200126d565b6200453067bcbac04197efe07a60c01b6200126d565b600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff166200468e576200459b677dec6119996f769b60c01b6200126d565b620045b1676abc8513cc8fded060c01b6200126d565b620045c7672419eb1c541c35c560c01b6200126d565b62004616600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600162006144565b506200462d67b4ccac91e45e279760c01b6200126d565b6001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff021916908315150217905550620046a5565b620046a467f3896eb17910a82160c01b6200126d565b5b50565b6060620046c0678d67538b3de9ea8660c01b620022e3565b620046d667bc1200b36b6e2d3c60c01b620022e3565b620046ec67c08742122c92f63360c01b620022e3565b620047026768a892c68abc618c60c01b620022e3565b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156200478a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018062007bbf6025913960400191505060405180910390fd5b620047a06746a5066e72f755d060c01b620022e3565b620047b667995fefea0bfe104660c01b620022e3565b620047cc67853adc48141afd7560c01b620022e3565b620047e267c99e3f9de858fe5760c01b620022e3565b3073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141562004869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018062007cb7602c913960400191505060405180910390fd5b6200487f673ed4d87e03ce069460c01b620022e3565b6200489567815137a12ebef0bf60c01b620022e3565b620048ab6733bcca643a99e8bd60c01b620022e3565b620048c1675bddd7f4a96eae8760c01b620022e3565b8573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141562004948576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018062007b096026913960400191505060405180910390fd5b6200495e672c537727fdea5c3460c01b620022e3565b6200497467140c547275665b9e60c01b620022e3565b6200498a6714a7aab557083ab060c01b620022e3565b60608673ffffffffffffffffffffffffffffffffffffffff16633f579f428787876040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101562004a1e57808201518184015260208101905062004a01565b50505050905090810190601f16801562004a4c5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801562004a6e57600080fd5b505af115801562004a83573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101562004aae57600080fd5b810190808051604051939291908464010000000082111562004acf57600080fd5b8382019150602082018581111562004ae657600080fd5b825186600182028301116401000000008211171562004b0457600080fd5b8083526020830192505050908051906020019080838360005b8381101562004b3a57808201518184015260208101905062004b1d565b50505050905090810190601f16801562004b685780820380516001836020036101000a031916815260200191505b50604052505050905062004b8767b9a8e776cf83f1c260c01b620022e3565b62004b9d67e7ceb79e5abc2c9160c01b620022e3565b821562004d3f5762004bba67e14033206c8f1d6f60c01b620022e3565b62004bd067eb528105fe589a6760c01b620022e3565b62004be6675a92b172873d9fd860c01b620022e3565b7f99eeae1fb8801e2e878e060ec5e5b3557b3c4f8106e35d88cb573f293dae4e248787878785604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101562004c9057808201518184015260208101905062004c73565b50505050905090810190601f16801562004cbe5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b8381101562004cf957808201518184015260208101905062004cdc565b50505050905090810190601f16801562004d275780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a162004d56565b62004d5567ad2a18c0580626ae60c01b620022e3565b5b62004d6c673b173602e1a7471660c01b620022e3565b62004d8267ca5084af2c310ee960c01b620022e3565b8091505095945050505050565b600062004da767b93cca31d93a2da060c01b62006395565b62004dbd679b3366ff5586cbcb60c01b62006395565b62004dd3670a6c1d6e66d9b12860c01b62006395565b600062004deb674c0130c069ab77bb60c01b62006395565b62004e016790c91fcf571f955b60c01b62006395565b83600001511562004f3b5762004e2267e7011bc29dbcc53d60c01b62006395565b62004e3867326b8da8148cf64b60c01b62006395565b62004e4e67955b6006d18a31f860c01b62006395565b60008460200151141562004e925762004e72670aa7911fc928619860c01b62006395565b62004e88679af8a90d24ea0b9a60c01b62006395565b6001905062004f35565b62004ea8671d61c7bbbc41b4a460c01b62006395565b62004ebe67163e427f8e2dad7960c01b62006395565b600083141562004efe5762004ede67b5ef86ed02b8943660c01b62006395565b62004ef467a12424a58a27066860c01b62006395565b6001905062004f34565b62004f1467f20b97e6b687869260c01b62006395565b62004f2a67069e2da21e7ce91360c01b62006395565b8284602001511190505b5b62004f52565b62004f5167bc5bb55bea0c32fc60c01b62006395565b5b62004f68675d4f0e0e7d41a81f60c01b62006395565b62004f7e670fb7d742fb4b185760c01b62006395565b8091505092915050565b62004f9e67081823c987234e9d60c01b620022e3565b62004fb46760c354164930797d60c01b620022e3565b62004fca67accf73d6a8ae294e60c01b620022e3565b62004fe067b19b8a65e686f89c60c01b620022e3565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200506057600080fd5b505afa15801562005075573d6000803e3d6000fd5b505050506040513d60208110156200508c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614156200510c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018062007c06602b913960400191505060405180910390fd5b62005122674a209ed55ed71bfa60c01b620022e3565b6200513766e8f614a9f2909a60c01b620022e3565b6200514d673bd80329fed2f8e860c01b620022e3565b8173ffffffffffffffffffffffffffffffffffffffff1663d784d426600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015620051d957600080fd5b505af1158015620051ee573d6000803e3d6000fd5b505050506200520867b46710374855f2fe60c01b620022e3565b6200521e67d4b3203fae218bc960c01b620022e3565b8015620052fa576200523b67308bce54015cf44160c01b620022e3565b620052516757203c00802916d160c01b620022e3565b6200526767fa0f90e590f54e6460c01b620022e3565b7feec27cdb8bd6f55c2c537deb52ab094a2437e85ef5197e6f064f90bff3ff563f82600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a162005311565b620053106793389340e33679c160c01b620022e3565b5b5050565b6200532b672da1cbb2c8b712bf60c01b62001e57565b6200534167a22c42eaa986a7b160c01b62001e57565b6200535767161aa01e34b61d0a60c01b62001e57565b600081511415620053b5576200537867c00dbd5b52865bb760c01b62001e57565b6200538e678a5faf951795361260c01b62001e57565b620053a46745413064a2aacfc660c01b62001e57565b620053af3262005590565b62005491565b620053cb67d4fad28aec7c156d60c01b62001e57565b620053e167a88c23ab9e9dede660c01b62001e57565b620053f7675a0d1bd87812f63460c01b62001e57565b6000815190506200541367a97ff88e96ad9c4460c01b62001e57565b62005429672ebda776213b4a1860c01b62001e57565b60005b818110156200548e576200544b67197b6470f65d698160c01b62001e57565b62005461678e0c2e8e0183d04a60c01b62001e57565b620054808382815181106200547257fe5b602002602001015162005590565b80806001019150506200542c565b50505b50565b620054aa6741fc0c62d014a3fe60c01b620022e3565b620054c067dc028465461785ee60c01b620022e3565b620054d6673f0b21804d61a81660c01b620022e3565b620054e382600062006398565b620054f967f371f0641cafc6fc60c01b620022e3565b6200550f675928ff3c537c054060c01b620022e3565b6200551c816000620033ed565b5050565b6200553667b69be6bf736d8c1a60c01b62001420565b6200554c67e18b25fd36211d0160c01b62001420565b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b620055a66715e658c0f6e292b160c01b62001e57565b620055bc672c431971dc3f178360c01b62001e57565b620055d267ea35c52bf51c28f760c01b62001e57565b620055e8676c0120f97757204260c01b62001e57565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156200568c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a2063616e6e6f74206164642030783020677561726469616e81525060200191505060405180910390fd5b620056a26768a59374672fe76a60c01b62001e57565b620056b8676aacc0e4664894f760c01b62001e57565b620056ce67eacfbaa68e55918960c01b62001e57565b620056e467b14b9b00bd32573160c01b62001e57565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615620057a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a20677561726469616e20616c72656164792065786973747381525060200191505060405180910390fd5b620057ba67b43b7e075756508e60c01b62001e57565b620057cf663a0e15b185871360c01b62001e57565b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506200583c6719a12fa44495bf1260c01b62001e57565b62005852676a185bb7ec86ed3260c01b62001e57565b7fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b6000620058d8677b59acf8ddaef66c60c01b6200126d565b620058ee679a812734380aa10b60c01b6200126d565b620059036622369a6cb4aeb260c01b6200126d565b600082604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040528051906020012090506200595d67ddc9721a3416b6e160c01b6200126d565b62005973679201b0d69a10132760c01b6200126d565b6200597e8162005eb0565b915050919050565b60006200599e67bec4827058d1d27d60c01b62001e57565b620059b4672f274b74d16058ba60c01b62001e57565b620059ca670dd4bedb64e2a2d160c01b62001e57565b6000620059e18385620037f290919063ffffffff16565b9050620059f96748284973b654d0c360c01b62001e57565b62005a0f67af16bd1d5a57497b60c01b62001e57565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b600062005a7c67983085a61ff08a3a60c01b62006395565b62005a9267f957f33d43cb511360c01b62006395565b62005aa867cd826c96bcb7be1860c01b62006395565b62005ab4824362004d8f565b9050919050565b50565b606062005ad667944f62c49d2211d360c01b620065ea565b62005aec67cf066073523ad27260c01b620065ea565b62005b02675e91f9b63d948d5860c01b620065ea565b600082141562005b8c5762005b22677b0ce46c12188bc160c01b620065ea565b62005b38678aeefffae0d7fd7960c01b620065ea565b62005b4e67632899c3b9762aa260c01b620065ea565b6040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905062005e48565b62005ba267d4ac009e6f062aa760c01b620065ea565b62005bb86717428562d9cc82ca60c01b620065ea565b62005bce67883259cc94c7ab0260c01b620065ea565b600082905062005be96714aaf87bc406f85b60c01b620065ea565b62005bff675a17c5ce53d95b1e60c01b620065ea565b600062005c176747fbe7876372bb7760c01b620065ea565b62005c2d6703d91880b80ba81160c01b620065ea565b5b6000821462005c7f5762005c4d674c9b174d7e669b1660c01b620065ea565b808060010191505062005c6b674fcccc4aeaffba3360c01b620065ea565b600a828162005c7657fe5b04915062005c2e565b62005c9567c58fa74478d42bcd60c01b620065ea565b62005cab670bc924b9eeb265b760c01b620065ea565b60608167ffffffffffffffff8111801562005cc557600080fd5b506040519080825280601f01601f19166020018201604052801562005cf95781602001600182028036833780820191505090505b50905062005d12679dc5195730eeab1760c01b620065ea565b62005d2867d095aa12c047f17860c01b620065ea565b600060018303905062005d46671a0d585c82f26b7560c01b620065ea565b85935062005d5f67623c941e41d0650160c01b620065ea565b62005d7567b73f896d5bae614060c01b620065ea565b5b6000841462005e145762005d956773b20ed61aea105760c01b620065ea565b600a848162005da057fe5b0660300160f81b8282806001900393508151811062005dbb57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535062005e00679d6afb48f5a4141e60c01b620065ea565b600a848162005e0b57fe5b04935062005d76565b62005e2a67c95e90ced64cb5d060c01b620065ea565b62005e40673e3baead90f807de60c01b620065ea565b819450505050505b919050565b50565b600060019050919050565b600062005e736796610338700568e460c01b62001420565b62005e896736abbbfc9ea4e0bf60c01b62001420565b62005e9f675d0cc2962515b7bc60c01b62001420565b62005eab6014620065ed565b905090565b600062005ec86748cdc253ccc1e67560c01b620022e3565b62005ede6780d8fe77ddc420f260c01b620022e3565b62005ef467593ae66617589b4360c01b620022e3565b60606040518060200162005f089062006b20565b6020820181038252601f19601f82011660405250600060a01b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060a01b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516020018086805190602001908083835b6020831062005fa4578051825260208201915060208101905060208303925062005f7f565b6001836020036101000a0380198251168184511680821785525050505050509050018573ffffffffffffffffffffffffffffffffffffffff19168152600c018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018373ffffffffffffffffffffffffffffffffffffffff19168152600c018273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019550505050505060405160208183030381529060405290506200606c670748b7c1eb60cfe660c01b620022e3565b62006082678d27efcb42cc3e1360c01b620022e3565b600060ff60f81b3085848051906020012060405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018381526020018281526020019450505050506040516020818303038152906040528051906020012090506200612167c4f8fa250f8a60ca60c01b620022e3565b62006137672f91b1c834bef2d060c01b620022e3565b8060001c92505050919050565b60006200615c67c87ffb0412cac78260c01b620022e3565b6200617267a3cda0ec8e20174b60c01b620022e3565b620061886759407cee0be0ea2b60c01b620022e3565b600083600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051620061df9062006b20565b808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff168152602001925050508190604051809103906000f59050801580156200623d573d6000803e3d6000fd5b50905062006256678c20abd98a5c4f8a60c01b620022e3565b6200626c67a5694f9ca3e134a760c01b620022e3565b821562006348576200628967d9808b1bdccba98b60c01b620022e3565b6200629f678562204049a5cf4760c01b620022e3565b620062b567f3f1d7e23629e16060c01b620022e3565b7f2682a218602b9036c9869f006c5405ee4a1a65267653eb7e286123e5e1afde4c81600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a16200635f565b6200635e671671bc1ea802d86a60c01b620022e3565b5b6200637567add800985aa0244060c01b620022e3565b6200638b6723c279dc5d3430fd60c01b620022e3565b8091505092915050565b50565b620063ae670870459f2167c8dd60c01b620022e3565b620063c467159ba22e371895b260c01b620022e3565b620063da676a3b49e785b9a8bb60c01b620022e3565b620063f067a63d48928d370c9b60c01b620022e3565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562006478576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018062007b5b6035913960400191505060405180910390fd5b6200648e67819fe19bb91397a160c01b620022e3565b620064a46704616cf5be820b7c60c01b620022e3565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620064fb678dd1e865a5f141ff60c01b620022e3565b620065116701616eb5f7d1ca9b60c01b620022e3565b8015620065cf576200652e67308412b87d226ceb60c01b620022e3565b6200654467e53fecce275a7d6360c01b620022e3565b6200655a67ea9a81daefd74f9e60c01b620022e3565b7f02e3c47057b8dc27a0929d3c394c314c73aa002d46939c31c9f71d1e77e86c10600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1620065e6565b620065e56786e883f2cdbdcb4760c01b620022e3565b5b5050565b50565b60006200660567ef0225287ba17ba060c01b62001420565b6200661b6795958667c898951b60c01b62001420565b6200663167ec06b0be9f42607760c01b62001420565b60006200664967b7cd17d69da836b660c01b62001420565b6200665f671b7ac62a98e22a5460c01b62001420565b62006669620067a5565b15620067405762006685674b9fe2d527bba60760c01b62001420565b6200669b6737f58d18ef197c9060c01b62001420565b620066b1679e0c2e494127333d60c01b62001420565b6000836000369050039050620066d2678767fa9e72b3efac60c01b62001420565b6200673760003683906014850192620066ee9392919062006b2e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050620069a6565b91505062006770565b6200675667531fb14624ef4c0060c01b62001420565b6200676c67365aa35b4857b9d560c01b62001420565b3390505b6200678667bb664b7abb1efcc160c01b62001420565b6200679c67c66db900ff1468ad60c01b62001420565b80915050919050565b6000620067bd6718d82ab5ae60310f60c01b62001420565b620067d367b1091fd4002007a760c01b62001420565b620067e967e754ffc9cc3865c960c01b62001420565b600062006801677ed152cd4162d4dd60c01b62001420565b6200681767d897cf3d19cf81cd60c01b62001420565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156200695c5762006884677fe0037509e467e160c01b62001420565b6200689a67d0b1c04b10d8098a60c01b62001420565b620068b0670b92e025f4debba760c01b62001420565b620068c66739792e98f7fbfdea60c01b62001420565b602c6000369050101562006926576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018062007be46022913960400191505060405180910390fd5b6200693c6755c879b00c45b69f60c01b62001420565b62006952679a100b07747e893d60c01b62001420565b6001905062006973565b620069726757b90b57dc0a6a0160c01b62001420565b5b6200698967cc41edf636370ef460c01b62001420565b6200699f67ff5a153bde944b0360c01b62001420565b8091505090565b6000620069be67e937c30ee854c6f460c01b62006b1d565b620069d467ae40a839349e539460c01b62006b1d565b620069ea6779ff25ce2e3aef5860c01b62006b1d565b600062006a0267471a531a4d41d03a60c01b62006b1d565b62006a1867dbf5cb870bd2bda760c01b62006b1d565b62006a2e6715ee1c447c585eff60c01b62006b1d565b601483511462006aa6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f42797465734c69623a20696e76616c69642064617461206c656e67746800000081525060200191505060405180910390fd5b62006abc67595b08e56ca2004360c01b62006b1d565b62006ad267658f3d9a047d9b2b60c01b62006b1d565b6c01000000000000000000000000602084015104905062006afe670a7d36500000fb3860c01b62006b1d565b62006b14678f46d49d645b8e7560c01b62006b1d565b80915050919050565b50565b610f328062006b6483390190565b6000808585111562006b3f57600080fd5b8386111562006b4d57600080fd5b600185028301915084860390509450949250505056fe608060405234801561001057600080fd5b50604051610f32380380610f328339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050610068679894797dc84081af60c01b61019960201b60201c565b610082674e0f327275f95bf160c01b61019960201b60201c565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506100dc6794e469383b340c9160c01b61019c60201b60201c565b6100f66786f2a31597afd57a60c01b61019c60201b60201c565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101516788e2a6c2eb66825d60c01b61019c60201b60201c565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505061019f565b50565b50565b610d84806101ae6000396000f3fe6080604052600436106100e15760003560e01c80637b1039991161007f578063b49762a111610059578063b49762a114610664578063d784d426146106d0578063dd54622814610721578063f77c479114610777576100e8565b80637b103999146105775780638f27e6b6146105b8578063abe124f61461060e576100e8565b806334d23875116100bb57806334d23875146103355780633f579f42146103a15780635c60da1b146104ca5780636480a27b1461050b576100e8565b8063062e4f9c146101f15780631454d4701461025d5780632486e26f146102c9576100e8565b366100e857005b3480156100f457600080fd5b5061010967267be5c007ba493660c01b6107b8565b61011d67c98405188afd4dab60c01b6107b8565b610131676a933c5d83132d2460c01b6107b8565b600080369050146101db5761015067b3d07c93e15dcc6960c01b6107b8565b610164670848f5b7587f259a60c01b6107b8565b610178677607056d4b83e95960c01b6107b8565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506101b367b7ff281b6713313460c01b6107b8565b368060008037600080826000855af43d806000803e81600081146101d657816000f35b816000fd5b6101ef6707d26d689f0268c060c01b6107b8565b005b3480156101fd57600080fd5b506102456004803603602081101561021457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107bb565b60405180821515815260200191505060405180910390f35b34801561026957600080fd5b506102b16004803603602081101561028057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107c2565b60405180821515815260200191505060405180910390f35b3480156102d557600080fd5b5061031d600480360360208110156102ec57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107c9565b60405180821515815260200191505060405180910390f35b34801561034157600080fd5b506103896004803603602081101561035857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107d4565b60405180821515815260200191505060405180910390f35b3480156103ad57600080fd5b5061044f600480360360608110156103c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561040b57600080fd5b82018360208201111561041d57600080fd5b8035906020019184600183028401116401000000008311171561043f57600080fd5b90919293919293905050506107df565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561048f578082015181840152602081019050610474565b50505050905090810190601f1680156104bc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104d657600080fd5b506104df610b13565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561051757600080fd5b5061055f6004803603602081101561052e57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b39565b60405180821515815260200191505060405180910390f35b34801561058357600080fd5b5061058c610b44565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105c457600080fd5b5061060c600480360360208110156105db57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b6a565b005b34801561061a57600080fd5b506106626004803603602081101561063157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b6d565b005b34801561067057600080fd5b506106b86004803603602081101561068757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b70565b60405180821515815260200191505060405180910390f35b3480156106dc57600080fd5b5061071f600480360360208110156106f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b77565b005b34801561072d57600080fd5b506107756004803603602081101561074457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107b8565b005b34801561078357600080fd5b5061078c610d27565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b50565b6000919050565b6000919050565b600060019050919050565b600060019050919050565b60606107f5675aa5d179f54cb87d60c01b6107b8565b61080967a226552386468aff60c01b610b6d565b61081d67bb06267d15cafc8560c01b610b6d565b61083167d0eb72184d8e714c60c01b610b6d565b61084567f128b7cf1088330a60c01b610b6d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610d4c602c913960400191505060405180910390fd5b6108fd6787dbbb5ffe0583c160c01b610b6d565b61091167f3741b7d431227a560c01b610b6d565b6109256737f078ab60df830760c01b6107b8565b61093967e4de2ba80b3b44d560c01b6107b8565b61094d675abe6251e319bc7c60c01b6107b8565b6109616726cc190ece09b7db60c01b6107b8565b6060610977676002c94a45713e1f60c01b6107b8565b61098b678d82d94b1795aafc60c01b6107b8565b60006109a167df08c3b5e2fa54f560c01b6107b8565b8673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d8060008114610a0d576040519150601f19603f3d011682016040523d82523d6000602084013e610a12565b606091505b508093508192505050610a2f67f28a312aa9cfaa7160c01b6107b8565b610a4367162325a0fb69618f60c01b6107b8565b610a576711f6077f17c7465a60c01b6107b8565b80610aca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b610ade6780640c61604c38b060c01b6107b8565b610af267157aa11e3950a2a260c01b6107b8565b610b06671a32fc353aeb8d2f60c01b6107b8565b8192505050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b50565b50565b6000919050565b610b8b67c3094137b7a928f360c01b6107b8565b610b9f67a226552386468aff60c01b610b6d565b610bb367bb06267d15cafc8560c01b610b6d565b610bc767d0eb72184d8e714c60c01b610b6d565b610bdb67f128b7cf1088330a60c01b610b6d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610d4c602c913960400191505060405180910390fd5b610c936787dbbb5ffe0583c160c01b610b6d565b610ca767f3741b7d431227a560c01b610b6d565b610cbb6710c6caed8159651f60c01b6107b8565b610ccf67ac6d8f9c43d3285d60c01b6107b8565b610ce3679d4a82d94581f52860c01b6107b8565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a4163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420496d706c656d656e746174696f6e20746f20307830506572736f6e616c4163636f756e7452656769737472793a2073656e646572206973206e6f7420746865206163636f756e74206f776e65724163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f2073656c66506572736f6e616c4163636f756e7452656769737472793a206f776e657220646f65736e27742065786973744163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420726567697374727920746f20307830496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a65724163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f2030783047617465776179526563697069656e743a20696e76616c6964206d73672e646174614163636f756e74436f6e74726f6c6c65723a206163636f756e7420616c7265616479207570677261646564506572736f6e616c4163636f756e7452656769737472793a2063616e6e6f742072656d6f76652073656c66477561726465643a2074782e6f726967696e206973206e6f742074686520677561726469616e506572736f6e616c4163636f756e7452656769737472793a204552433230546f6b656e207472616e736665722072657665727465644163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f20636f6e74726f6c6c6572506572736f6e616c4163636f756e7452656769737472793a206f776e657220616c726561647920657869737473506572736f6e616c4163636f756e7452656769737472793a2063616e6e6f742061646420307830206f776e6572a164736f6c634300060c000a"; + static readonly abi: ({ + inputs: any[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + })[]; + static createInterface(): PersonalAccountRegistryInterface; + static connect(address: string, signerOrProvider: Signer | Provider): PersonalAccountRegistry; +} +export {}; diff --git a/dist/typings/factories/PersonalAccountRegistry__factory.js b/dist/typings/factories/PersonalAccountRegistry__factory.js new file mode 100644 index 00000000..07cedd46 --- /dev/null +++ b/dist/typings/factories/PersonalAccountRegistry__factory.js @@ -0,0 +1,990 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.PersonalAccountRegistry__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "beneficiary", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "AccountCallRefunded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "accountImplementation", + type: "address", + }, + ], + name: "AccountDeployed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "accountImplementation", + type: "address", + }, + ], + name: "AccountImplementationUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "AccountOwnerAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "AccountOwnerRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "accountRegistry", + type: "address", + }, + ], + name: "AccountRegistryUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "bytes", + name: "response", + type: "bytes", + }, + ], + name: "AccountTransactionExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "accountImplementation", + type: "address", + }, + ], + name: "AccountUpgraded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "GuardianAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "GuardianRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "initializer", + type: "address", + }, + ], + name: "Initialized", + type: "event", + }, + { + inputs: [], + name: "accountImplementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "accountRegistry", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "addAccountOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "addGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_0ffe16b4", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__19d98a43", + type: "bytes8", + }, + ], + name: "c_19d98a43", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__203cf0ac", + type: "bytes8", + }, + ], + name: "c_203cf0ac", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__9b6befd1", + type: "bytes8", + }, + ], + name: "c_9b6befd1", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_c0828b70", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_d5c463c2", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_false0ffe16b4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__19d98a43", + type: "bytes8", + }, + ], + name: "c_false19d98a43", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__203cf0ac", + type: "bytes8", + }, + ], + name: "c_false203cf0ac", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__9b6befd1", + type: "bytes8", + }, + ], + name: "c_false9b6befd1", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_falsec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_falsed5c463c2", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__0ffe16b4", + type: "bytes8", + }, + ], + name: "c_true0ffe16b4", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__19d98a43", + type: "bytes8", + }, + ], + name: "c_true19d98a43", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__203cf0ac", + type: "bytes8", + }, + ], + name: "c_true203cf0ac", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__9b6befd1", + type: "bytes8", + }, + ], + name: "c_true9b6befd1", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_truec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_trued5c463c2", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "saltOwner", + type: "address", + }, + ], + name: "computeAccountAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "deployAccount", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "executeAccountTransaction", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "gateway", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "guardians_", + type: "address[]", + }, + { + internalType: "address", + name: "accountImplementation_", + type: "address", + }, + { + internalType: "address", + name: "gateway_", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "isAccountDeployed", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "isGuardian", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "isInitialized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "isValidAccountSignature", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes32", + name: "messageHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "isValidAccountSignature", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "token", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "refundAccountCall", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "removeAccountOwner", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + name: "removeGuardian", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "accountImplementation_", + type: "address", + }, + ], + name: "upgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "upgradeAccount", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "verifyAccountOwner", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "verifyAccountOwnerAtBlock", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "messageHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "verifyGuardianSignature", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +const _bytecode = "0x60806040523480156200001157600080fd5b506200002e676ed90a7f5cb15c7560c01b6200010160201b60201c565b6200004a6716199243b9d4db2560c01b6200010460201b60201c565b62000066675e592fe27197979c60c01b6200010760201b60201c565b6200008267eca2e4778f3efef360c01b6200010760201b60201c565b32600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000df67db84cf13641fc64d60c01b6200010a60201b60201c565b620000fb678a3d97f4ff6270f860c01b6200010d60201b60201c565b62000110565b50565b50565b50565b50565b50565b617d4980620001206000396000f3fe60806040523480156200001157600080fd5b5060043610620002805760003560e01c80635967b7ac1162000159578063cade6a5d11620000c9578063da9fc1ae1162000087578063da9fc1ae1462000fd0578063db63f5821462001017578063e1e382ce146200107e578063e5c7278f146200113d578063f4876c7414620012065762000280565b8063cade6a5d1462000ddc578063d089e11a1462000e4d578063d0f710d61462000e83578063d53641231462000f22578063d628d0861462000f845762000280565b8063a4db4b6b1162000117578063a4db4b6b1462000bf2578063a526d83b1462000c54578063bb890d3f1462000c9b578063c1cad69e1462000d18578063c369d5fe1462000d7a5762000280565b80635967b7ac14620009dc578063714041561462000a3e5780637663f44c1462000a8557806390482d721462000ad1578063a23441e71462000b905762000280565b80631a84140311620001f557806334d323a411620001b357806334d323a4146200083e578063392e53cd14620008c557806343013c2414620008e75780634623ec77146200092e5780635405622e14620009905762000280565b80631a841403146200064a5780631dccb78714620006bb57806321a5f5da146200071d5780632e6afd6e146200077f5780633164b5e114620007e15762000280565b806311464fbe116200024357806311464fbe1462000423578063116191b61462000459578063124e9eb3146200048f5780631262ed1c146200059c5780631812164614620005fe5762000280565b806301883a24146200028557806305ae19e614620002d15780630900f01014620003335780630c4b1a17146200037a5780630c68ba2114620003c6575b600080fd5b620002cf600480360360208110156200029d57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506200126d565b005b6200031b60048036036020811015620002e957600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001270565b60405180821515815260200191505060405180910390f35b62000378600480360360208110156200034b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506200127b565b005b620003c4600480360360208110156200039257600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001420565b005b6200040b60048036036020811015620003de57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062001423565b60405180821515815260200191505060405180910390f35b6200042d620014ba565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b62000463620014e0565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6200058460048036036060811015620004a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190640100000000811115620004e557600080fd5b820183602082011115620004f857600080fd5b803590602001918460018302840111640100000000831117156200051b57600080fd5b9091929391929390803590602001906401000000008111156200053d57600080fd5b8201836020820111156200055057600080fd5b803590602001918460018302840111640100000000831117156200057357600080fd5b909192939192939050505062001506565b60405180821515815260200191505060405180910390f35b620005e660048036036020811015620005b457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001607565b60405180821515815260200191505060405180910390f35b62000648600480360360208110156200061657600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001612565b005b620006b9600480360360608110156200066257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505062001615565b005b6200070560048036036020811015620006d357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001a90565b60405180821515815260200191505060405180910390f35b62000767600480360360208110156200073557600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001a97565b60405180821515815260200191505060405180910390f35b620007c9600480360360208110156200079757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001aa2565b60405180821515815260200191505060405180910390f35b6200082660048036036020811015620007f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062001aa9565b60405180821515815260200191505060405180910390f35b620008ad600480360360608110156200085657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505062001b44565b60405180821515815260200191505060405180910390f35b620008cf62001d27565b60405180821515815260200191505060405180910390f35b6200092c60048036036020811015620008ff57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062001dc2565b005b62000978600480360360208110156200094657600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001e4c565b60405180821515815260200191505060405180910390f35b620009da60048036036020811015620009a857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001e57565b005b62000a2660048036036020811015620009f457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062001e5a565b60405180821515815260200191505060405180910390f35b62000a836004803603602081101562000a5657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062001e61565b005b62000acf6004803603602081101562000a9d57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050620022e3565b005b62000b8e6004803603606081101562000ae957600080fd5b810190808035906020019064010000000081111562000b0757600080fd5b82018360208201111562000b1a57600080fd5b8035906020019184602083028401116401000000008311171562000b3d57600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050620022e6565b005b62000bda6004803603602081101562000ba857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062002612565b60405180821515815260200191505060405180910390f35b62000c3c6004803603602081101562000c0a57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062002619565b60405180821515815260200191505060405180910390f35b62000c996004803603602081101562000c6c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062002624565b005b62000d006004803603604081101562000cb357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050620027c7565b60405180821515815260200191505060405180910390f35b62000d626004803603602081101562000d3057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506200281f565b60405180821515815260200191505060405180910390f35b62000dc46004803603602081101562000d9257600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062002826565b60405180821515815260200191505060405180910390f35b62000e216004803603602081101562000df457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506200282d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b62000e5762002883565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b62000f0a6004803603604081101562000e9b57600080fd5b81019080803590602001909291908035906020019064010000000081111562000ec357600080fd5b82018360208201111562000ed657600080fd5b8035906020019184600183028401116401000000008311171562000ef957600080fd5b9091929391929390505050620028a9565b60405180821515815260200191505060405180910390f35b62000f6c6004803603602081101562000f3a57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062002946565b60405180821515815260200191505060405180910390f35b62000fce6004803603602081101562000f9c57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505062002951565b005b620010156004803603602081101562000fe857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062002954565b005b6200107c600480360360408110156200102f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050620029dc565b005b62001125600480360360608110156200109657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115620010de57600080fd5b820183602082011115620010f157600080fd5b803590602001918460018302840111640100000000831117156200111457600080fd5b909192939192939050505062002dad565b60405180821515815260200191505060405180910390f35b62001204600480360360808110156200115557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115620011bd57600080fd5b820183602082011115620011d057600080fd5b80359060200191846001830284011164010000000083111715620011f357600080fd5b909192939192939050505062002e5f565b005b6200126b600480360360408110156200121e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505062002f6c565b005b50565b600060019050919050565b620012916754a94b41112a5ad160c01b6200126d565b620012a7677e48a4752a028e1460c01b62001e57565b620012bd6754e2f8cd8fda0cfe60c01b62001e57565b620012d3671b1abbc8110e006760c01b62001e57565b620012e9677621c15edc08840a60c01b62001e57565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166200138c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018062007c5c6026913960400191505060405180910390fd5b620013a2671978b446280e03b660c01b62001e57565b620013b867bc99b99e8c2c7a2260c01b62001e57565b620013ce67e1c0388b3599041b60c01b6200126d565b620013e467b9274d0c04643b1c60c01b6200126d565b620013fa67aeb462cbaf19eb2b60c01b6200126d565b62001410671a6e1b90aaa718b060c01b6200126d565b6200141d816001620033ed565b50565b50565b60006200143b67d9e99bddfebda2f060c01b62001e57565b62001451676401fd9fc2105e0160c01b62001e57565b620014676733760aa820b07e2a60c01b62001e57565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006200151e6791a6df43dbc9e35160c01b6200126d565b6200153467542e91cab1b3959f60c01b6200126d565b6200154a67c16820893afe542560c01b6200126d565b620015fc86620015f685858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050620015e789898080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506200363f565b620037f290919063ffffffff16565b62003b51565b905095945050505050565b600060019050919050565b50565b6200162b6791b72b30fc06da6160c01b6200126d565b62001641671813bc58da934b9760c01b6200126d565b62001657670bb0a84d15b88ab660c01b6200126d565b620016628362003e48565b506200167967192ead767e0b426d60c01b6200126d565b6200168f67c49d61359e3bbd7b60c01b6200126d565b6200169a83620044ee565b620016b06718def0e9d596a22960c01b6200126d565b620016c667577729cbc87e65c360c01b6200126d565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620017a25762001712678c80f84aaeabedeb60c01b6200126d565b620017286789186e2b1c6751f960c01b6200126d565b6200173e6752ebed5195a6127860c01b6200126d565b6200179b833283600067ffffffffffffffff811180156200175e57600080fd5b506040519080825280601f01601f191660200182016040528015620017925781602001600182028036833780820191505090505b506000620046a8565b50620019ce565b620017b867e53a5fc2508d9d1360c01b6200126d565b620017ce6765383383f6acd6d860c01b6200126d565b620017e467aadb0dd2d6a4318160c01b6200126d565b60606200188a8484600063a9059cbb60e01b3287604051602401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506000620046a8565b9050620018a267d11c2ab2624bd9b860c01b6200126d565b620018b8672cbe18415362a3b460c01b6200126d565b600081511115620019b557620018d967897c81ba5765a56e60c01b6200126d565b620018ef67b61079bde7aae4a960c01b6200126d565b6200190567ba1b477618236ab960c01b6200126d565b6200191b67f3987bffc80604c860c01b6200126d565b8080602001905160208110156200193157600080fd5b810190808051906020019092919050505062001999576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018062007c826035913960400191505060405180910390fd5b620019af67926cf9d8fbf8088c60c01b6200126d565b620019cc565b620019cb6728a54db3b55ec06a60c01b6200126d565b5b505b620019e46730cd3b1bf7ea854460c01b6200126d565b620019fa6702cf38c5dccf169060c01b6200126d565b7feb5511fbef89123439f12682f0e9d0fc9696913b26eee55434c77d62c30aa7ca83328484604051808573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200194505050505060405180910390a1505050565b6000919050565b600060019050919050565b6000919050565b600062001ac167f99ada48de50c7cf60c01b6200126d565b62001ad76778102406ebbfe33f60c01b6200126d565b62001aed67681f7ab1e8ba294a60c01b6200126d565b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff169050919050565b600062001b5c6793a39e2c9f7ee9ba60c01b6200126d565b62001b72673c97afc8ecfead0560c01b6200126d565b62001b88676acdb8d58ef6346660c01b6200126d565b600062001ba0674e80aa82dfed6db160c01b6200126d565b62001bb66702ab7d633dd730ee60c01b6200126d565b62001bc2858562003b51565b1562001bfe5762001bde6778226c994dcbf9a360c01b6200126d565b62001bf46703140093de95238560c01b6200126d565b6001905062001cf0565b62001c14679adf213db50d225060c01b6200126d565b62001c2a67076837ed1b1c119460c01b6200126d565b62001ced83600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff1615151515815260200160018201548152505062004d8f90919063ffffffff16565b90505b62001d0667e9e38f04d4f808bb60c01b6200126d565b62001d1c6781c8150efac1d5ad60c01b6200126d565b809150509392505050565b600062001d3f6726ed6cc6ca12515c60c01b62001612565b62001d5567f3fc49482028cbb860c01b62001612565b62001d6b6740317a79cae6a3ff60c01b62001612565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b62001dd867f5a44943e88d339060c01b6200126d565b62001dee6722f63d5bd060bbe460c01b6200126d565b62001e0467e8676f911de306ac60c01b6200126d565b62001e0f8162003e48565b5062001e2667d95317d1b0cdf90460c01b6200126d565b62001e3c676f173d95227f79c460c01b6200126d565b62001e4981600162004f88565b50565b600060019050919050565b50565b6000919050565b62001e7767f772222a3366273960c01b62001e57565b62001e8d677e48a4752a028e1460c01b62001e57565b62001ea36754e2f8cd8fda0cfe60c01b62001e57565b62001eb9671b1abbc8110e006760c01b62001e57565b62001ecf677621c15edc08840a60c01b62001e57565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1662001f72576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018062007c5c6026913960400191505060405180910390fd5b62001f88671978b446280e03b660c01b62001e57565b62001f9e67bc99b99e8c2c7a2260c01b62001e57565b62001fb467afd0aa94ba119c4e60c01b62001e57565b62001fca670fe65c577fbdf81160c01b62001e57565b62001fe067e175d6b24c96a59a60c01b62001e57565b62001ff667514f675749914bc160c01b62001e57565b6200200c67fed39a5b1d24bceb60c01b62001e57565b8073ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff161415620020af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f477561726465643a2063616e6e6f742072656d6f76652073656c66000000000081525060200191505060405180910390fd5b620020c567325d0391dd900ca560c01b62001e57565b620020db67f494ac4bc126e05760c01b62001e57565b620020f167a8a2f5acd805e41c60c01b62001e57565b62002107679f1149f801dce85b60c01b62001e57565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16620021c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f477561726465643a20677561726469616e20646f65736e27742065786973740081525060200191505060405180910390fd5b620021dc67e767f88c374b22f760c01b62001e57565b620021f2679a8eb2ad91b01fb960c01b62001e57565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506200225f675f52f4e3c8e1709960c01b62001e57565b6200227567b8b235546176405e60c01b62001e57565b7fee943cdb81826d5909c559c6b1ae6908fcaf2dbc16c4b730346736b486283e8b3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b50565b620022fc6769e37de4b7a8c6db60c01b6200126d565b6200231267b2266613e068a5ae60c01b62001612565b62002328676a66a63870f964f960c01b62001612565b6200233e6772f22eca890742ba60c01b62001612565b6200235467c8ab57d60023f99860c01b62001612565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614620023fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f81526020018062007b90602f913960400191505060405180910390fd5b6200241267d31dec9098d614f660c01b62001612565b6200242867a184879381a9c67460c01b62001612565b6000600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062002480675e44e6e1c885710560c01b62001612565b62002496677c725e0e9d21290b60c01b6200126d565b620024ac67d70eb0fbd8c587fd60c01b6200126d565b620024c267dede73f89e94490c60c01b6200126d565b620024d86715731c365df53ffa60c01b6200126d565b62002524848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505062005315565b6200253a67fb7bfb057c4bd97560c01b6200126d565b620025506735feea27802efcef60c01b6200126d565b6200255c308362005494565b6200257267b5e8f96e156f1bc560c01b6200126d565b62002588674c8c76316743ceb260c01b6200126d565b620025938162005520565b620025a96732ca1833e9907bb960c01b62001612565b620025bf672942130a5b94b82160c01b62001612565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150505050565b6000919050565b600060019050919050565b6200263a67b59862a5cb01d1d860c01b62001e57565b62002650677e48a4752a028e1460c01b62001e57565b620026666754e2f8cd8fda0cfe60c01b62001e57565b6200267c671b1abbc8110e006760c01b62001e57565b62002692677621c15edc08840a60c01b62001e57565b6000803273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1662002735576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018062007c5c6026913960400191505060405180910390fd5b6200274b671978b446280e03b660c01b62001e57565b6200276167bc99b99e8c2c7a2260c01b62001e57565b6200277767e0409d61ef95483b60c01b62001e57565b6200278d67acb2c628a7cbdba860c01b62001e57565b620027a3677f6b80ac4f415fbe60c01b62001e57565b620027b967c7dcdfc4bd89af4960c01b62001e57565b620027c48162005590565b50565b6000620027df67b9a62806a5aac64560c01b6200126d565b620027f56742a98292c69e6ed760c01b6200126d565b6200280b678a9ee5d10ccc3ed860c01b6200126d565b62002817838362003b51565b905092915050565b6000919050565b6000919050565b60006200284567fdf339f1effa493f60c01b6200126d565b6200285b67b0819f27545d8ba860c01b6200126d565b62002871673b6d20211f4fbf3960c01b6200126d565b6200287c82620058c0565b9050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000620028c16746d5f36e497b280d60c01b62001e57565b620028d7677077a4665ef04d8360c01b62001e57565b620028ed6788288bf71f1972a760c01b62001e57565b6200293d8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505062005986565b90509392505050565b600060019050919050565b50565b6200296a67b0c22330b325e16860c01b6200126d565b6200298067314eff398ce1d91360c01b6200126d565b62002996670eb8f87657af427760c01b6200126d565b620029a18162003e48565b50620029b86726bd12ff2de0d51460c01b6200126d565b620029ce67b34a67d458ff31ae60c01b6200126d565b620029d981620044ee565b50565b620029f267926a1c5ba0f7822960c01b6200126d565b62002a0867bdbe2d22e80196f760c01b6200126d565b62002a1e67d2ef2385457bb49c60c01b6200126d565b600062002a2b8362003e48565b905062002a436746d2b04003be993560c01b6200126d565b62002a5967515d4314fe5509d860c01b6200126d565b62002a6f67a1f43c6393bae7d960c01b6200126d565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562002af6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018062007c31602b913960400191505060405180910390fd5b62002b0c67f0e83eebd30a3eb860c01b6200126d565b62002b226747538f56d841b53a60c01b6200126d565b62002b3867fd3d505e34aa133c60c01b6200126d565b62002b4e6704a7dc5ab485862d60c01b6200126d565b62002c07600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff1615151515815260200160018201548152505062005a64565b62002c5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018062007b2f602c913960400191505060405180910390fd5b62002c7467c426f4b79e74889e60c01b6200126d565b62002c8a67e213077cf4ae202d60c01b6200126d565b43600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555062002d27670d0fef597ce030c460c01b6200126d565b62002d3d674bf2c671b0a6478660c01b6200126d565b7f1ce3cbbc43ee231e5b950332f2b0b9dd7d349291a3ee411ce5c5c7ed745661bb8383604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1505050565b600062002dc56741030c2972d6e34f60c01b6200126d565b62002ddb6742bd540d958de81e60c01b6200126d565b62002df167b0440667352e718860c01b6200126d565b62002e558562002e4f85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505087620037f290919063ffffffff16565b62003b51565b9050949350505050565b62002e7567364c7f3f88c09e6f60c01b6200126d565b62002e8b67ebb573595f25095c60c01b6200126d565b62002ea167e590352c1a2702ea60c01b6200126d565b62002eac8562003e48565b5062002ec367fb0737d76cdd370f60c01b6200126d565b62002ed967987d775282fac11360c01b6200126d565b62002ee485620044ee565b62002efa67a4eb73f96731bc0e60c01b6200126d565b62002f1067a1c04e5b5645157d60c01b6200126d565b62002f6485858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506001620046a8565b505050505050565b62002f82673a80f36de3a3614760c01b6200126d565b62002f9867f68b672a5ec3af7160c01b6200126d565b62002fae674a9088d7d425154260c01b6200126d565b62002fb98262003e48565b5062002fd0670cd4838ff272421160c01b6200126d565b62002fe667b86c1c5cd898ecdd60c01b6200126d565b62002ffc678af24ae56013df8a60c01b6200126d565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562003084576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d81526020018062007d10602d913960400191505060405180910390fd5b6200309a6788d7f01b7455142d60c01b6200126d565b620030b06704bceefd079fca5160c01b6200126d565b620030c667a3403c226087073760c01b6200126d565b620030dc672d0c5e3310f0eaaa60c01b6200126d565b62003195600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900460ff1615151515815260200160018201548152505062005a64565b15620031ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d81526020018062007ce3602d913960400191505060405180910390fd5b62003203671826b86dc6571f6160c01b6200126d565b6200321967d1dd0c83140c51a660c01b6200126d565b6001600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff021916908315150217905550620032ca6721e789db4fa579d860c01b6200126d565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055506200336867e913e41e2decf46f60c01b6200126d565b6200337e670bd891d39b172f5960c01b6200126d565b7f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644688282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15050565b6200340367778d2c4844cb57c860c01b620022e3565b62003419672e46345dd30446f560c01b620022e3565b6200342f674b01c1a412029cf960c01b620022e3565b6200344567b5ba0ed84140968960c01b620022e3565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620034cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018062007a96603b913960400191505060405180910390fd5b620034e36712934e542bfcaae260c01b620022e3565b620034f9676ab5a434897f3fa460c01b620022e3565b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062003550671440edfeaa98b7c160c01b620022e3565b62003566671da8e35e0bfd87a360c01b620022e3565b801562003624576200358367f166ead2d805373960c01b620022e3565b620035996738487a6c4bc99ca160c01b620022e3565b620035af677be1bddbe5c5292160c01b620022e3565b7f70d9f5a076620216a6050e493f3ce69749de0b68fa4b839ba2518660ba8b9cf0600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a16200363b565b6200363a6777dc91dc63848bbe60c01b620022e3565b5b5050565b60006200365767957e7830bbd813a160c01b62005abb565b6200366d6777388b439e4c706660c01b62005abb565b62003683678c0dad3efcfc1e3260c01b62005abb565b6200368f825162005abe565b826040516020018082805190602001908083835b60208310620036c85780518252602082019150602081019050602083039250620036a3565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405260405160200180807f19457468657265756d205369676e6564204d6573736167653a0a000000000000815250601a0183805190602001908083835b602083106200375c578051825260208201915060208101905060208303925062003737565b6001836020036101000a03801982511681845116808217855250505050505090500182805190602001908083835b60208310620037af57805182526020820191506020810190506020830392506200378a565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052805190602001209050919050565b60006200380a67610b12321a07a31960c01b62005e4d565b62003820670f66a519ee9137b960c01b62005e4d565b6200383667140d9f9935e2385360c01b62005e4d565b60006200384e670bfea895a9f81bec60c01b62005e4d565b6200386467a8c715ec3b9d89c160c01b62005e4d565b60418351141562003b04576200388567101129654a82afeb60c01b62005e4d565b6200389b67a44405322c11578a60c01b62005e4d565b620038b1673ae09945b2f5082360c01b62005e4d565b6000620038c967900a30e48d0fc7bd60c01b62005e4d565b620038df677d193483635abe1860c01b62005e4d565b6000620038f767f24e14d594e9077960c01b62005e4d565b6200390d67a847d7edacf7e00c60c01b62005e4d565b600062003925670bcc457b0963bc0f60c01b62005e4d565b6020860151925060408601519150606086015160001a9050620039536730650d5e99574f3560c01b62005e4d565b62003969675197804ca644c8a460c01b62005e4d565b601b8160ff161015620039ae576200398c6781206cb7a1d9cec760c01b62005e4d565b620039a2679d0aaefe9954d7fb60c01b62005e4d565b601b81019050620039c5565b620039c467091b6422f681fe5560c01b62005e4d565b5b620039db677849785c6ede9b0e60c01b62005e4d565b620039f16732075f7517db825b60c01b62005e4d565b601b8160ff1614801562003a17575062003a1667638a38da6bf5bb4360c01b62005e50565b5b8062003a455750601c8160ff1614801562003a44575062003a43671d94865be2a4ed5560c01b62005e50565b5b5b1562003ae45762003a6167657d88528f4e396b60c01b62005e4d565b62003a77675469679748b05cfe60c01b62005e4d565b60018782858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801562003ad2573d6000803e3d6000fd5b50505060206040510351935062003afb565b62003afa67539b701a1f57136860c01b62005e4d565b5b50505062003b1b565b62003b1a67f3927173995ed52360c01b62005e4d565b5b62003b3167303f1b174284648060c01b62005e4d565b62003b4767c60031985823124160c01b62005e4d565b8091505092915050565b600062003b6967c354c8450bcd34cf60c01b6200126d565b62003b7f67cd0742fe4e99483360c01b6200126d565b62003b95677f418a800c9b82c060c01b6200126d565b600062003bad67b04d72f6a417485060c01b6200126d565b62003bc36738d65856eaee29dc60c01b6200126d565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff161562003d135762003c6f67f5f005ee48c1870760c01b6200126d565b62003c85675a1d48884d5da9cf60c01b6200126d565b6000600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015414905062003e12565b62003d296756bb552a06669d0160c01b6200126d565b62003d3f676753146f02c0ecc560c01b6200126d565b6000801b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154141562003dfa5762003da36726683adc01e2cd1a60c01b6200126d565b62003db967a6ef75a43a66e93a60c01b6200126d565b62003dc483620058c0565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614905062003e11565b62003e1067cb15a9b78ba067e360c01b6200126d565b5b5b62003e28675b6d76a1ab8462e060c01b6200126d565b62003e3e673432615ddef5022060c01b6200126d565b8091505092915050565b600062003e60671c06bc1c16c1f77c60c01b6200126d565b62003e7667ce75fb64a17437c960c01b6200126d565b62003e8c677a3a2ae35660ac0360c01b6200126d565b600062003e9862005e5b565b905062003eb0674320e171edc92c9760c01b6200126d565b62003ec6677b54aad621e001e060c01b6200126d565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1615620040ad5762003f72675b9196a79da8eee960c01b6200126d565b62003f88676f6a423ac6ff1ffe60c01b6200126d565b62003f9e672c5e03296536439f60c01b6200126d565b62003fb467b770e11113162d0c60c01b6200126d565b6000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541462004091576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018062007ad16038913960400191505060405180910390fd5b620040a7677a9ead63ef6ae64e60c01b6200126d565b620044b9565b620040c367275560e0a21b70fc60c01b6200126d565b620040d9678e13bff009acfa7e60c01b6200126d565b620040ef67151fa54bc9999fbd60c01b6200126d565b6200410567da81c3129081711a60c01b6200126d565b6000801b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015414620041a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018062007ad16038913960400191505060405180910390fd5b620041ba67870b738b3012751160c01b6200126d565b620041d0673d47daa55862f60360c01b6200126d565b620041e66735eaa3f4bee1b6b760c01b6200126d565b600081604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b815260140191505060405160208183030381529060405280519060200120905062004240672742dad7d55a86e660c01b6200126d565b62004256678d56020a3f743a6260c01b6200126d565b6200426c67cf4cdf4a622a45c860c01b6200126d565b620042778162005eb0565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614620042fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603881526020018062007ad16038913960400191505060405180910390fd5b620043126771a41025a0bcc88360c01b6200126d565b6200432867d06d00b914125f0360c01b6200126d565b80600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055506200438567f3c966cb89981dc860c01b6200126d565b6001600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff0219169083151502179055506200443667f248b723bf97dcfb60c01b6200126d565b6200444c67538ed3731eca3a7f60c01b6200126d565b7f27e282f7712c5b4617277759c834b86d163dfc1aad25c8c3c5926a1c9e5644688483604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1505b620044cf678aa2f1b631fb753160c01b6200126d565b620044e567458da016e938a2b460c01b6200126d565b80915050919050565b6200450467e981b1a97547bc6b60c01b6200126d565b6200451a674e4c5d840a3c552560c01b6200126d565b6200453067bcbac04197efe07a60c01b6200126d565b600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff166200468e576200459b677dec6119996f769b60c01b6200126d565b620045b1676abc8513cc8fded060c01b6200126d565b620045c7672419eb1c541c35c560c01b6200126d565b62004616600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600162006144565b506200462d67b4ccac91e45e279760c01b6200126d565b6001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160006101000a81548160ff021916908315150217905550620046a5565b620046a467f3896eb17910a82160c01b6200126d565b5b50565b6060620046c0678d67538b3de9ea8660c01b620022e3565b620046d667bc1200b36b6e2d3c60c01b620022e3565b620046ec67c08742122c92f63360c01b620022e3565b620047026768a892c68abc618c60c01b620022e3565b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156200478a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018062007bbf6025913960400191505060405180910390fd5b620047a06746a5066e72f755d060c01b620022e3565b620047b667995fefea0bfe104660c01b620022e3565b620047cc67853adc48141afd7560c01b620022e3565b620047e267c99e3f9de858fe5760c01b620022e3565b3073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141562004869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c81526020018062007cb7602c913960400191505060405180910390fd5b6200487f673ed4d87e03ce069460c01b620022e3565b6200489567815137a12ebef0bf60c01b620022e3565b620048ab6733bcca643a99e8bd60c01b620022e3565b620048c1675bddd7f4a96eae8760c01b620022e3565b8573ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16141562004948576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018062007b096026913960400191505060405180910390fd5b6200495e672c537727fdea5c3460c01b620022e3565b6200497467140c547275665b9e60c01b620022e3565b6200498a6714a7aab557083ab060c01b620022e3565b60608673ffffffffffffffffffffffffffffffffffffffff16633f579f428787876040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff16815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101562004a1e57808201518184015260208101905062004a01565b50505050905090810190601f16801562004a4c5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b15801562004a6e57600080fd5b505af115801562004a83573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250602081101562004aae57600080fd5b810190808051604051939291908464010000000082111562004acf57600080fd5b8382019150602082018581111562004ae657600080fd5b825186600182028301116401000000008211171562004b0457600080fd5b8083526020830192505050908051906020019080838360005b8381101562004b3a57808201518184015260208101905062004b1d565b50505050905090810190601f16801562004b685780820380516001836020036101000a031916815260200191505b50604052505050905062004b8767b9a8e776cf83f1c260c01b620022e3565b62004b9d67e7ceb79e5abc2c9160c01b620022e3565b821562004d3f5762004bba67e14033206c8f1d6f60c01b620022e3565b62004bd067eb528105fe589a6760c01b620022e3565b62004be6675a92b172873d9fd860c01b620022e3565b7f99eeae1fb8801e2e878e060ec5e5b3557b3c4f8106e35d88cb573f293dae4e248787878785604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101562004c9057808201518184015260208101905062004c73565b50505050905090810190601f16801562004cbe5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b8381101562004cf957808201518184015260208101905062004cdc565b50505050905090810190601f16801562004d275780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a162004d56565b62004d5567ad2a18c0580626ae60c01b620022e3565b5b62004d6c673b173602e1a7471660c01b620022e3565b62004d8267ca5084af2c310ee960c01b620022e3565b8091505095945050505050565b600062004da767b93cca31d93a2da060c01b62006395565b62004dbd679b3366ff5586cbcb60c01b62006395565b62004dd3670a6c1d6e66d9b12860c01b62006395565b600062004deb674c0130c069ab77bb60c01b62006395565b62004e016790c91fcf571f955b60c01b62006395565b83600001511562004f3b5762004e2267e7011bc29dbcc53d60c01b62006395565b62004e3867326b8da8148cf64b60c01b62006395565b62004e4e67955b6006d18a31f860c01b62006395565b60008460200151141562004e925762004e72670aa7911fc928619860c01b62006395565b62004e88679af8a90d24ea0b9a60c01b62006395565b6001905062004f35565b62004ea8671d61c7bbbc41b4a460c01b62006395565b62004ebe67163e427f8e2dad7960c01b62006395565b600083141562004efe5762004ede67b5ef86ed02b8943660c01b62006395565b62004ef467a12424a58a27066860c01b62006395565b6001905062004f34565b62004f1467f20b97e6b687869260c01b62006395565b62004f2a67069e2da21e7ce91360c01b62006395565b8284602001511190505b5b62004f52565b62004f5167bc5bb55bea0c32fc60c01b62006395565b5b62004f68675d4f0e0e7d41a81f60c01b62006395565b62004f7e670fb7d742fb4b185760c01b62006395565b8091505092915050565b62004f9e67081823c987234e9d60c01b620022e3565b62004fb46760c354164930797d60c01b620022e3565b62004fca67accf73d6a8ae294e60c01b620022e3565b62004fe067b19b8a65e686f89c60c01b620022e3565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16635c60da1b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200506057600080fd5b505afa15801562005075573d6000803e3d6000fd5b505050506040513d60208110156200508c57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614156200510c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b81526020018062007c06602b913960400191505060405180910390fd5b62005122674a209ed55ed71bfa60c01b620022e3565b6200513766e8f614a9f2909a60c01b620022e3565b6200514d673bd80329fed2f8e860c01b620022e3565b8173ffffffffffffffffffffffffffffffffffffffff1663d784d426600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015620051d957600080fd5b505af1158015620051ee573d6000803e3d6000fd5b505050506200520867b46710374855f2fe60c01b620022e3565b6200521e67d4b3203fae218bc960c01b620022e3565b8015620052fa576200523b67308bce54015cf44160c01b620022e3565b620052516757203c00802916d160c01b620022e3565b6200526767fa0f90e590f54e6460c01b620022e3565b7feec27cdb8bd6f55c2c537deb52ab094a2437e85ef5197e6f064f90bff3ff563f82600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a162005311565b620053106793389340e33679c160c01b620022e3565b5b5050565b6200532b672da1cbb2c8b712bf60c01b62001e57565b6200534167a22c42eaa986a7b160c01b62001e57565b6200535767161aa01e34b61d0a60c01b62001e57565b600081511415620053b5576200537867c00dbd5b52865bb760c01b62001e57565b6200538e678a5faf951795361260c01b62001e57565b620053a46745413064a2aacfc660c01b62001e57565b620053af3262005590565b62005491565b620053cb67d4fad28aec7c156d60c01b62001e57565b620053e167a88c23ab9e9dede660c01b62001e57565b620053f7675a0d1bd87812f63460c01b62001e57565b6000815190506200541367a97ff88e96ad9c4460c01b62001e57565b62005429672ebda776213b4a1860c01b62001e57565b60005b818110156200548e576200544b67197b6470f65d698160c01b62001e57565b62005461678e0c2e8e0183d04a60c01b62001e57565b620054808382815181106200547257fe5b602002602001015162005590565b80806001019150506200542c565b50505b50565b620054aa6741fc0c62d014a3fe60c01b620022e3565b620054c067dc028465461785ee60c01b620022e3565b620054d6673f0b21804d61a81660c01b620022e3565b620054e382600062006398565b620054f967f371f0641cafc6fc60c01b620022e3565b6200550f675928ff3c537c054060c01b620022e3565b6200551c816000620033ed565b5050565b6200553667b69be6bf736d8c1a60c01b62001420565b6200554c67e18b25fd36211d0160c01b62001420565b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b620055a66715e658c0f6e292b160c01b62001e57565b620055bc672c431971dc3f178360c01b62001e57565b620055d267ea35c52bf51c28f760c01b62001e57565b620055e8676c0120f97757204260c01b62001e57565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156200568c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a2063616e6e6f74206164642030783020677561726469616e81525060200191505060405180910390fd5b620056a26768a59374672fe76a60c01b62001e57565b620056b8676aacc0e4664894f760c01b62001e57565b620056ce67eacfbaa68e55918960c01b62001e57565b620056e467b14b9b00bd32573160c01b62001e57565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615620057a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f477561726465643a20677561726469616e20616c72656164792065786973747381525060200191505060405180910390fd5b620057ba67b43b7e075756508e60c01b62001e57565b620057cf663a0e15b185871360c01b62001e57565b60016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506200583c6719a12fa44495bf1260c01b62001e57565b62005852676a185bb7ec86ed3260c01b62001e57565b7fbc3292102fa77e083913064b282926717cdfaede4d35f553d66366c0a3da755a3282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150565b6000620058d8677b59acf8ddaef66c60c01b6200126d565b620058ee679a812734380aa10b60c01b6200126d565b620059036622369a6cb4aeb260c01b6200126d565b600082604051602001808273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019150506040516020818303038152906040528051906020012090506200595d67ddc9721a3416b6e160c01b6200126d565b62005973679201b0d69a10132760c01b6200126d565b6200597e8162005eb0565b915050919050565b60006200599e67bec4827058d1d27d60c01b62001e57565b620059b4672f274b74d16058ba60c01b62001e57565b620059ca670dd4bedb64e2a2d160c01b62001e57565b6000620059e18385620037f290919063ffffffff16565b9050620059f96748284973b654d0c360c01b62001e57565b62005a0f67af16bd1d5a57497b60c01b62001e57565b6000808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1691505092915050565b600062005a7c67983085a61ff08a3a60c01b62006395565b62005a9267f957f33d43cb511360c01b62006395565b62005aa867cd826c96bcb7be1860c01b62006395565b62005ab4824362004d8f565b9050919050565b50565b606062005ad667944f62c49d2211d360c01b620065ea565b62005aec67cf066073523ad27260c01b620065ea565b62005b02675e91f9b63d948d5860c01b620065ea565b600082141562005b8c5762005b22677b0ce46c12188bc160c01b620065ea565b62005b38678aeefffae0d7fd7960c01b620065ea565b62005b4e67632899c3b9762aa260c01b620065ea565b6040518060400160405280600181526020017f3000000000000000000000000000000000000000000000000000000000000000815250905062005e48565b62005ba267d4ac009e6f062aa760c01b620065ea565b62005bb86717428562d9cc82ca60c01b620065ea565b62005bce67883259cc94c7ab0260c01b620065ea565b600082905062005be96714aaf87bc406f85b60c01b620065ea565b62005bff675a17c5ce53d95b1e60c01b620065ea565b600062005c176747fbe7876372bb7760c01b620065ea565b62005c2d6703d91880b80ba81160c01b620065ea565b5b6000821462005c7f5762005c4d674c9b174d7e669b1660c01b620065ea565b808060010191505062005c6b674fcccc4aeaffba3360c01b620065ea565b600a828162005c7657fe5b04915062005c2e565b62005c9567c58fa74478d42bcd60c01b620065ea565b62005cab670bc924b9eeb265b760c01b620065ea565b60608167ffffffffffffffff8111801562005cc557600080fd5b506040519080825280601f01601f19166020018201604052801562005cf95781602001600182028036833780820191505090505b50905062005d12679dc5195730eeab1760c01b620065ea565b62005d2867d095aa12c047f17860c01b620065ea565b600060018303905062005d46671a0d585c82f26b7560c01b620065ea565b85935062005d5f67623c941e41d0650160c01b620065ea565b62005d7567b73f896d5bae614060c01b620065ea565b5b6000841462005e145762005d956773b20ed61aea105760c01b620065ea565b600a848162005da057fe5b0660300160f81b8282806001900393508151811062005dbb57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535062005e00679d6afb48f5a4141e60c01b620065ea565b600a848162005e0b57fe5b04935062005d76565b62005e2a67c95e90ced64cb5d060c01b620065ea565b62005e40673e3baead90f807de60c01b620065ea565b819450505050505b919050565b50565b600060019050919050565b600062005e736796610338700568e460c01b62001420565b62005e896736abbbfc9ea4e0bf60c01b62001420565b62005e9f675d0cc2962515b7bc60c01b62001420565b62005eab6014620065ed565b905090565b600062005ec86748cdc253ccc1e67560c01b620022e3565b62005ede6780d8fe77ddc420f260c01b620022e3565b62005ef467593ae66617589b4360c01b620022e3565b60606040518060200162005f089062006b20565b6020820181038252601f19601f82011660405250600060a01b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060a01b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516020018086805190602001908083835b6020831062005fa4578051825260208201915060208101905060208303925062005f7f565b6001836020036101000a0380198251168184511680821785525050505050509050018573ffffffffffffffffffffffffffffffffffffffff19168152600c018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018373ffffffffffffffffffffffffffffffffffffffff19168152600c018273ffffffffffffffffffffffffffffffffffffffff1660601b81526014019550505050505060405160208183030381529060405290506200606c670748b7c1eb60cfe660c01b620022e3565b62006082678d27efcb42cc3e1360c01b620022e3565b600060ff60f81b3085848051906020012060405160200180857effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526001018473ffffffffffffffffffffffffffffffffffffffff1660601b81526014018381526020018281526020019450505050506040516020818303038152906040528051906020012090506200612167c4f8fa250f8a60ca60c01b620022e3565b62006137672f91b1c834bef2d060c01b620022e3565b8060001c92505050919050565b60006200615c67c87ffb0412cac78260c01b620022e3565b6200617267a3cda0ec8e20174b60c01b620022e3565b620061886759407cee0be0ea2b60c01b620022e3565b600083600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051620061df9062006b20565b808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff168152602001925050508190604051809103906000f59050801580156200623d573d6000803e3d6000fd5b50905062006256678c20abd98a5c4f8a60c01b620022e3565b6200626c67a5694f9ca3e134a760c01b620022e3565b821562006348576200628967d9808b1bdccba98b60c01b620022e3565b6200629f678562204049a5cf4760c01b620022e3565b620062b567f3f1d7e23629e16060c01b620022e3565b7f2682a218602b9036c9869f006c5405ee4a1a65267653eb7e286123e5e1afde4c81600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a16200635f565b6200635e671671bc1ea802d86a60c01b620022e3565b5b6200637567add800985aa0244060c01b620022e3565b6200638b6723c279dc5d3430fd60c01b620022e3565b8091505092915050565b50565b620063ae670870459f2167c8dd60c01b620022e3565b620063c467159ba22e371895b260c01b620022e3565b620063da676a3b49e785b9a8bb60c01b620022e3565b620063f067a63d48928d370c9b60c01b620022e3565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562006478576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603581526020018062007b5b6035913960400191505060405180910390fd5b6200648e67819fe19bb91397a160c01b620022e3565b620064a46704616cf5be820b7c60c01b620022e3565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620064fb678dd1e865a5f141ff60c01b620022e3565b620065116701616eb5f7d1ca9b60c01b620022e3565b8015620065cf576200652e67308412b87d226ceb60c01b620022e3565b6200654467e53fecce275a7d6360c01b620022e3565b6200655a67ea9a81daefd74f9e60c01b620022e3565b7f02e3c47057b8dc27a0929d3c394c314c73aa002d46939c31c9f71d1e77e86c10600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1620065e6565b620065e56786e883f2cdbdcb4760c01b620022e3565b5b5050565b50565b60006200660567ef0225287ba17ba060c01b62001420565b6200661b6795958667c898951b60c01b62001420565b6200663167ec06b0be9f42607760c01b62001420565b60006200664967b7cd17d69da836b660c01b62001420565b6200665f671b7ac62a98e22a5460c01b62001420565b62006669620067a5565b15620067405762006685674b9fe2d527bba60760c01b62001420565b6200669b6737f58d18ef197c9060c01b62001420565b620066b1679e0c2e494127333d60c01b62001420565b6000836000369050039050620066d2678767fa9e72b3efac60c01b62001420565b6200673760003683906014850192620066ee9392919062006b2e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050620069a6565b91505062006770565b6200675667531fb14624ef4c0060c01b62001420565b6200676c67365aa35b4857b9d560c01b62001420565b3390505b6200678667bb664b7abb1efcc160c01b62001420565b6200679c67c66db900ff1468ad60c01b62001420565b80915050919050565b6000620067bd6718d82ab5ae60310f60c01b62001420565b620067d367b1091fd4002007a760c01b62001420565b620067e967e754ffc9cc3865c960c01b62001420565b600062006801677ed152cd4162d4dd60c01b62001420565b6200681767d897cf3d19cf81cd60c01b62001420565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156200695c5762006884677fe0037509e467e160c01b62001420565b6200689a67d0b1c04b10d8098a60c01b62001420565b620068b0670b92e025f4debba760c01b62001420565b620068c66739792e98f7fbfdea60c01b62001420565b602c6000369050101562006926576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018062007be46022913960400191505060405180910390fd5b6200693c6755c879b00c45b69f60c01b62001420565b62006952679a100b07747e893d60c01b62001420565b6001905062006973565b620069726757b90b57dc0a6a0160c01b62001420565b5b6200698967cc41edf636370ef460c01b62001420565b6200699f67ff5a153bde944b0360c01b62001420565b8091505090565b6000620069be67e937c30ee854c6f460c01b62006b1d565b620069d467ae40a839349e539460c01b62006b1d565b620069ea6779ff25ce2e3aef5860c01b62006b1d565b600062006a0267471a531a4d41d03a60c01b62006b1d565b62006a1867dbf5cb870bd2bda760c01b62006b1d565b62006a2e6715ee1c447c585eff60c01b62006b1d565b601483511462006aa6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f42797465734c69623a20696e76616c69642064617461206c656e67746800000081525060200191505060405180910390fd5b62006abc67595b08e56ca2004360c01b62006b1d565b62006ad267658f3d9a047d9b2b60c01b62006b1d565b6c01000000000000000000000000602084015104905062006afe670a7d36500000fb3860c01b62006b1d565b62006b14678f46d49d645b8e7560c01b62006b1d565b80915050919050565b50565b610f328062006b6483390190565b6000808585111562006b3f57600080fd5b8386111562006b4d57600080fd5b600185028301915084860390509450949250505056fe608060405234801561001057600080fd5b50604051610f32380380610f328339818101604052604081101561003357600080fd5b810190808051906020019092919080519060200190929190505050610068679894797dc84081af60c01b61019960201b60201c565b610082674e0f327275f95bf160c01b61019960201b60201c565b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506100dc6794e469383b340c9160c01b61019c60201b60201c565b6100f66786f2a31597afd57a60c01b61019c60201b60201c565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506101516788e2a6c2eb66825d60c01b61019c60201b60201c565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505061019f565b50565b50565b610d84806101ae6000396000f3fe6080604052600436106100e15760003560e01c80637b1039991161007f578063b49762a111610059578063b49762a114610664578063d784d426146106d0578063dd54622814610721578063f77c479114610777576100e8565b80637b103999146105775780638f27e6b6146105b8578063abe124f61461060e576100e8565b806334d23875116100bb57806334d23875146103355780633f579f42146103a15780635c60da1b146104ca5780636480a27b1461050b576100e8565b8063062e4f9c146101f15780631454d4701461025d5780632486e26f146102c9576100e8565b366100e857005b3480156100f457600080fd5b5061010967267be5c007ba493660c01b6107b8565b61011d67c98405188afd4dab60c01b6107b8565b610131676a933c5d83132d2460c01b6107b8565b600080369050146101db5761015067b3d07c93e15dcc6960c01b6107b8565b610164670848f5b7587f259a60c01b6107b8565b610178677607056d4b83e95960c01b6107b8565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506101b367b7ff281b6713313460c01b6107b8565b368060008037600080826000855af43d806000803e81600081146101d657816000f35b816000fd5b6101ef6707d26d689f0268c060c01b6107b8565b005b3480156101fd57600080fd5b506102456004803603602081101561021457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107bb565b60405180821515815260200191505060405180910390f35b34801561026957600080fd5b506102b16004803603602081101561028057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107c2565b60405180821515815260200191505060405180910390f35b3480156102d557600080fd5b5061031d600480360360208110156102ec57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107c9565b60405180821515815260200191505060405180910390f35b34801561034157600080fd5b506103896004803603602081101561035857600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107d4565b60405180821515815260200191505060405180910390f35b3480156103ad57600080fd5b5061044f600480360360608110156103c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561040b57600080fd5b82018360208201111561041d57600080fd5b8035906020019184600183028401116401000000008311171561043f57600080fd5b90919293919293905050506107df565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561048f578082015181840152602081019050610474565b50505050905090810190601f1680156104bc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156104d657600080fd5b506104df610b13565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561051757600080fd5b5061055f6004803603602081101561052e57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b39565b60405180821515815260200191505060405180910390f35b34801561058357600080fd5b5061058c610b44565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105c457600080fd5b5061060c600480360360208110156105db57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b6a565b005b34801561061a57600080fd5b506106626004803603602081101561063157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b6d565b005b34801561067057600080fd5b506106b86004803603602081101561068757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610b70565b60405180821515815260200191505060405180910390f35b3480156106dc57600080fd5b5061071f600480360360208110156106f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b77565b005b34801561072d57600080fd5b506107756004803603602081101561074457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506107b8565b005b34801561078357600080fd5b5061078c610d27565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b50565b6000919050565b6000919050565b600060019050919050565b600060019050919050565b60606107f5675aa5d179f54cb87d60c01b6107b8565b61080967a226552386468aff60c01b610b6d565b61081d67bb06267d15cafc8560c01b610b6d565b61083167d0eb72184d8e714c60c01b610b6d565b61084567f128b7cf1088330a60c01b610b6d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610d4c602c913960400191505060405180910390fd5b6108fd6787dbbb5ffe0583c160c01b610b6d565b61091167f3741b7d431227a560c01b610b6d565b6109256737f078ab60df830760c01b6107b8565b61093967e4de2ba80b3b44d560c01b6107b8565b61094d675abe6251e319bc7c60c01b6107b8565b6109616726cc190ece09b7db60c01b6107b8565b6060610977676002c94a45713e1f60c01b6107b8565b61098b678d82d94b1795aafc60c01b6107b8565b60006109a167df08c3b5e2fa54f560c01b6107b8565b8673ffffffffffffffffffffffffffffffffffffffff1686868660405180838380828437808301925050509250505060006040518083038185875af1925050503d8060008114610a0d576040519150601f19603f3d011682016040523d82523d6000602084013e610a12565b606091505b508093508192505050610a2f67f28a312aa9cfaa7160c01b6107b8565b610a4367162325a0fb69618f60c01b6107b8565b610a576711f6077f17c7465a60c01b6107b8565b80610aca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4163636f756e743a207472616e73616374696f6e20726576657274656400000081525060200191505060405180910390fd5b610ade6780640c61604c38b060c01b6107b8565b610af267157aa11e3950a2a260c01b6107b8565b610b06671a32fc353aeb8d2f60c01b6107b8565b8192505050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b50565b50565b6000919050565b610b8b67c3094137b7a928f360c01b6107b8565b610b9f67a226552386468aff60c01b610b6d565b610bb367bb06267d15cafc8560c01b610b6d565b610bc767d0eb72184d8e714c60c01b610b6d565b610bdb67f128b7cf1088330a60c01b610b6d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180610d4c602c913960400191505060405180910390fd5b610c936787dbbb5ffe0583c160c01b610b6d565b610ca767f3741b7d431227a560c01b610b6d565b610cbb6710c6caed8159651f60c01b6107b8565b610ccf67ac6d8f9c43d3285d60c01b6107b8565b610ce3679d4a82d94581f52860c01b6107b8565b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff168156fe436f6e74726f6c6c65643a206d73672e73656e646572206973206e6f742074686520636f6e74726f6c6c6572a164736f6c634300060c000a4163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420496d706c656d656e746174696f6e20746f20307830506572736f6e616c4163636f756e7452656769737472793a2073656e646572206973206e6f7420746865206163636f756e74206f776e65724163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f2073656c66506572736f6e616c4163636f756e7452656769737472793a206f776e657220646f65736e27742065786973744163636f756e74436f6e74726f6c6c65723a2063616e6e6f7420736574206163636f756e7420726567697374727920746f20307830496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a65724163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f2030783047617465776179526563697069656e743a20696e76616c6964206d73672e646174614163636f756e74436f6e74726f6c6c65723a206163636f756e7420616c7265616479207570677261646564506572736f6e616c4163636f756e7452656769737472793a2063616e6e6f742072656d6f76652073656c66477561726465643a2074782e6f726967696e206973206e6f742074686520677561726469616e506572736f6e616c4163636f756e7452656769737472793a204552433230546f6b656e207472616e736665722072657665727465644163636f756e74436f6e74726f6c6c65723a2063616e6e6f742073656e6420746f20636f6e74726f6c6c6572506572736f6e616c4163636f756e7452656769737472793a206f776e657220616c726561647920657869737473506572736f6e616c4163636f756e7452656769737472793a2063616e6e6f742061646420307830206f776e6572a164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class PersonalAccountRegistry__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.PersonalAccountRegistry__factory = PersonalAccountRegistry__factory; +PersonalAccountRegistry__factory.bytecode = _bytecode; +PersonalAccountRegistry__factory.abi = _abi; diff --git a/dist/typings/factories/SignatureValidator__factory.d.ts b/dist/typings/factories/SignatureValidator__factory.d.ts new file mode 100644 index 00000000..ec061c51 --- /dev/null +++ b/dist/typings/factories/SignatureValidator__factory.d.ts @@ -0,0 +1,22 @@ +import { Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { SignatureValidator, SignatureValidatorInterface } from "../SignatureValidator"; +export declare class SignatureValidator__factory { + static readonly abi: { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + }[]; + static createInterface(): SignatureValidatorInterface; + static connect(address: string, signerOrProvider: Signer | Provider): SignatureValidator; +} diff --git a/dist/typings/factories/SignatureValidator__factory.js b/dist/typings/factories/SignatureValidator__factory.js new file mode 100644 index 00000000..6bfcef54 --- /dev/null +++ b/dist/typings/factories/SignatureValidator__factory.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SignatureValidator__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [ + { + internalType: "bytes8", + name: "c__1b54acf3", + type: "bytes8", + }, + ], + name: "c_1b54acf3", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__1b54acf3", + type: "bytes8", + }, + ], + name: "c_false1b54acf3", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__1b54acf3", + type: "bytes8", + }, + ], + name: "c_true1b54acf3", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "chainId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; +class SignatureValidator__factory { + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.SignatureValidator__factory = SignatureValidator__factory; +SignatureValidator__factory.abi = _abi; diff --git a/dist/typings/factories/WrappedWeiToken__factory.d.ts b/dist/typings/factories/WrappedWeiToken__factory.d.ts new file mode 100644 index 00000000..ff2be271 --- /dev/null +++ b/dist/typings/factories/WrappedWeiToken__factory.d.ts @@ -0,0 +1,61 @@ +import { Signer, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { WrappedWeiToken, WrappedWeiTokenInterface } from "../WrappedWeiToken"; +declare type WrappedWeiTokenConstructorParams = [signer?: Signer] | ConstructorParameters; +export declare class WrappedWeiToken__factory extends ContractFactory { + constructor(...args: WrappedWeiTokenConstructorParams); + deploy(overrides?: Overrides & { + from?: string | Promise; + }): Promise; + getDeployTransaction(overrides?: Overrides & { + from?: string | Promise; + }): TransactionRequest; + attach(address: string): WrappedWeiToken; + connect(signer: Signer): WrappedWeiToken__factory; + static readonly bytecode = "0x60806040523480156200001157600080fd5b506200002e675e592fe27197979c60c01b620001b860201b60201c565b6200004a67eca2e4778f3efef360c01b620001b860201b60201c565b326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000a6677bcdc149a707125c60c01b620001bb60201b60201c565b620000c267db84cf13641fc64d60c01b620001be60201b60201c565b620000de672748a7360ce120dd60c01b620001c160201b60201c565b620000fa6765865efbcc8c502260c01b620001c160201b60201c565b6040518060400160405280600b81526020017f57726170706564205765690000000000000000000000000000000000000000008152506001908051906020019062000147929190620001c4565b506200016467880b3010673e19bc60c01b620001c160201b60201c565b6040518060400160405280600481526020017f575745490000000000000000000000000000000000000000000000000000000081525060029080519060200190620001b1929190620001c4565b506200026a565b50565b50565b50565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200020757805160ff191683800117855562000238565b8280016001018555821562000238579182015b82811115620002375782518255916020019190600101906200021a565b5b5090506200024791906200024b565b5090565b5b80821115620002665760008160009055506001016200024c565b5090565b6137fe806200027a6000396000f3fe6080604052600436106101e75760003560e01c8063462d0b2e11610102578063b760faf911610095578063d4aae83411610064578063d4aae83414610c33578063dd62ed3e14610c89578063ee2c757e14610d0e578063f55647e014610d7a57610213565b8063b760faf914610adc578063c369d5fe14610b20578063ca9add8f14610b8c578063ca9b3ac414610bdd57610213565b8063853828b6116100d1578063853828b61461095857806385ad59e31461096f57806395d89b41146109db578063a9059cbb14610a6b57610213565b8063462d0b2e146107cf57806356a3b64b1461087557806370a082311461088c578063834ff739146108f157610213565b8063205c28781161017a5780632e1a7d4d116101495780632e1a7d4d146106cd5780632e6afd6e14610708578063313ce56714610774578063392e53cd146107a257610213565b8063205c28781461050957806321a5f5da1461056457806323b872dd146105d057806326a9683f1461066157610213565b80631262ed1c116101b65780631262ed1c146103b0578063181216461461041c57806318160ddd146104725780631bb5c2981461049d57610213565b806306fdde0314610218578063095ea7b3146102a85780630c4b1a1714610319578063116191b61461036f57610213565b3661021357610200675239b4c82df61e2960c01b610d91565b61021161020b610d94565b34610ddf565b005b600080fd5b34801561022457600080fd5b5061022d6110f9565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561026d578082015181840152602081019050610252565b50505050905090810190601f16801561029a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102b457600080fd5b50610301600480360360408110156102cb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611197565b60405180821515815260200191505060405180910390f35b34801561032557600080fd5b5061036d6004803603602081101561033c57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611219565b005b34801561037b57600080fd5b5061038461121c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103bc57600080fd5b50610404600480360360208110156103d357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611242565b60405180821515815260200191505060405180910390f35b34801561042857600080fd5b506104706004803603602081101561043f57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061124d565b005b34801561047e57600080fd5b50610487611250565b6040518082815260200191505060405180910390f35b3480156104a957600080fd5b506104f1600480360360208110156104c057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611256565b60405180821515815260200191505060405180910390f35b34801561051557600080fd5b506105626004803603604081101561052c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611261565b005b34801561057057600080fd5b506105b86004803603602081101561058757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506112b3565b60405180821515815260200191505060405180910390f35b3480156105dc57600080fd5b50610649600480360360608110156105f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506112be565b60405180821515815260200191505060405180910390f35b34801561066d57600080fd5b506106b56004803603602081101561068457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611430565b60405180821515815260200191505060405180910390f35b3480156106d957600080fd5b50610706600480360360208110156106f057600080fd5b8101908080359060200190929190505050611437565b005b34801561071457600080fd5b5061075c6004803603602081101561072b57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061148f565b60405180821515815260200191505060405180910390f35b34801561078057600080fd5b50610789611496565b604051808260ff16815260200191505060405180910390f35b3480156107ae57600080fd5b506107b76114a9565b60405180821515815260200191505060405180910390f35b3480156107db57600080fd5b50610873600480360360408110156107f257600080fd5b810190808035906020019064010000000081111561080f57600080fd5b82018360208201111561082157600080fd5b8035906020019184602083028401116401000000008311171561084357600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061153c565b005b34801561088157600080fd5b5061088a6118c0565b005b34801561089857600080fd5b506108db600480360360208110156108af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061190e565b6040518082815260200191505060405180910390f35b3480156108fd57600080fd5b506109406004803603602081101561091457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611993565b60405180821515815260200191505060405180910390f35b34801561096457600080fd5b5061096d611a25565b005b34801561097b57600080fd5b506109c36004803603602081101561099257600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611ae2565b60405180821515815260200191505060405180910390f35b3480156109e757600080fd5b506109f0611aed565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a30578082015181840152602081019050610a15565b50505050905090810190601f168015610a5d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610a7757600080fd5b50610ac460048036036040811015610a8e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611b8b565b60405180821515815260200191505060405180910390f35b610b1e60048036036020811015610af257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c0d565b005b348015610b2c57600080fd5b50610b7460048036036020811015610b4357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611c56565b60405180821515815260200191505060405180910390f35b348015610b9857600080fd5b50610bdb60048036036020811015610baf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c5d565b005b348015610be957600080fd5b50610c3160048036036020811015610c0057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611d1b565b005b348015610c3f57600080fd5b50610c8760048036036020811015610c5657600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610d91565b005b348015610c9557600080fd5b50610cf860048036036040811015610cac57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d1e565b6040518082815260200191505060405180910390f35b348015610d1a57600080fd5b50610d6260048036036020811015610d3157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611de1565b60405180821515815260200191505060405180910390f35b348015610d8657600080fd5b50610d8f611de8565b005b50565b6000610daa67e6d4a5fd77e6ffb760c01b610d91565b610dbe67794b5e9c3104e13b60c01b610d91565b610dd267a64cbecc1895040f60c01b610d91565b610dda612006565b905090565b610df3678b40f65b9f52bed260c01b611d1b565b610e07675539eb664662780760c01b611d1b565b610e1b67751894f1ff56728460c01b611d1b565b610e2f671386aceb091e4a7b60c01b611d1b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610eb5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806137046026913960400191505060405180910390fd5b610ec967e4f181ee5678b65e60c01b611d1b565b610edd67b95349941d5819a660c01b611d1b565b610ef167308a84875c2f8fcc60c01b611d1b565b610f0567c1385feddce7f40b60c01b611d1b565b60008111610f7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4552433230546f6b656e3a2063616e6e6f74206d696e7420302076616c75650081525060200191505060405180910390fd5b610f8f6755c7106a04dfb5dc60c01b611d1b565b610fa367354036ead116c20c60c01b611d1b565b610ff581600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461205390919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061104c676e54754e99ba96ba60c01b611d1b565b6110618160045461205390919063ffffffff16565b60048190555061107b67c129908edd37058760c01b611d1b565b61108f6795d9dc07ef74661c60c01b611d1b565b8173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561118f5780601f106111645761010080835404028352916020019161118f565b820191906000526020600020905b81548152906001019060200180831161117257829003601f168201915b505050505081565b60006111ad6716c7994ce2963b9560c01b611d1b565b6111c1670db71104231ddd1760c01b611d1b565b6111d567ebc28f0b33236df060c01b611d1b565b6111e76111e0610d94565b8484612190565b6111fb67aa49da918aee6d8a60c01b611d1b565b61120f67788e6cd03eb368e660c01b611d1b565b6001905092915050565b50565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b50565b60045481565b600060019050919050565b61127567a62d0f3881e623cb60c01b610d91565b61128967fe02b6f5adce666c60c01b610d91565b61129d67358f7d5d1733939b60c01b610d91565b6112af6112a8610d94565b8383612477565b5050565b600060019050919050565b60006112d4676b8bf02b5baf919c60c01b611d1b565b6112e86732f60aace714d92760c01b611d1b565b6112fc677a66edda9f42015560c01b611d1b565b6000611306610d94565b905061131c6778f656dfd913a5dd60c01b611d1b565b611330672a4e24b8b558a54b60c01b611d1b565b61133b85858561259c565b61134f672588e49425764ced60c01b611d1b565b61136367c937a0700bcc984060c01b611d1b565b6113fc85826113f786600660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126c390919063ffffffff16565b612190565b61141067398b3849bc30852360c01b611d1b565b61142467daf5ad9d09af319860c01b611d1b565b60019150509392505050565b6000919050565b61144b674ef26944b734d54d60c01b610d91565b61145f67f2907e0d06c3393060c01b610d91565b61147367b980667497ed0cd360c01b610d91565b61148c61147e610d94565b611486610d94565b83612477565b50565b6000919050565b600360009054906101000a900460ff1681565b60006114bf6726ed6cc6ca12515c60c01b61124d565b6114d367f3fc49482028cbb860c01b61124d565b6114e76740317a79cae6a3ff60c01b61124d565b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b611550677ecb82f9b15830c660c01b610d91565b61156467b2266613e068a5ae60c01b61124d565b611578676a66a63870f964f960c01b61124d565b61158c6772f22eca890742ba60c01b61124d565b6115a067c8ab57d60023f99860c01b61124d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611644576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180613616602f913960400191505060405180910390fd5b61165867d31dec9098d614f660c01b61124d565b61166c67a184879381a9c67460c01b61124d565b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506116c1675e44e6e1c885710560c01b61124d565b6116d567ec71016ca4160e4960c01b610d91565b6116e96774ff4e3cd391e3cd60c01b610d91565b6116fd67c043cb580727c9ef60c01b610d91565b61171167fa61dd16021aae9460c01b610d91565b600083839050146118005761173067a325c68e080afe0660c01b610d91565b61174467c2ccb82fa1e9bcc960c01b610d91565b611758673ff86f60ef23635e60c01b610d91565b600083839050905061177467bcb8921f33557c8a60c01b610d91565b611788678d54aad9f4b0620160c01b610d91565b60005b818110156117f9576117a767211028319f743e5660c01b610d91565b6117bb676e4300f20fe3e35e60c01b610d91565b6117ec8585838181106117ca57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1661272c565b808060010191505061178b565b5050611815565b6118146773614affa4dbab7b60c01b610d91565b5b61182967358e5dc5b3181c4d60c01b610d91565b61183d67205e3a20147cbc8e60c01b610d91565b61184681612917565b61185a6732ca1833e9907bb960c01b61124d565b61186e672942130a5b94b82160c01b61124d565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1505050565b6118d467cba1284eb7ffa09360c01b610d91565b6118e867decb423bf455f92660c01b610d91565b6118fc6733cb9d6682fea53e60c01b610d91565b61190c611907610d94565b61272c565b565b600061192467b0119dbfe84d854760c01b611d1b565b6119386766b84161ec9c0de360c01b611d1b565b61194c671e3111d613d98fb560c01b611d1b565b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006119a967669b4edd44aefa3a60c01b610d91565b6119bd6789d88eeaa8dc5a5960c01b610d91565b6119d1677c57fb81952d832960c01b610d91565b600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b611a3967bc5f390a1fa4f97460c01b610d91565b611a4d672319c4834ca1d85b60c01b610d91565b611a616792006a5a414b06d460c01b610d91565b6000611a6b610d94565b9050611a816769b89547e17a7df160c01b610d91565b611a9567cf35488c7f7ea66a60c01b610d91565b611adf8182600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612477565b50565b600060019050919050565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b835780601f10611b5857610100808354040283529160200191611b83565b820191906000526020600020905b815481529060010190602001808311611b6657829003601f168201915b505050505081565b6000611ba1676387db9a7f4190f260c01b611d1b565b611bb567253782937c01735d60c01b611d1b565b611bc967253005ba8f5d5f7460c01b611d1b565b611bdb611bd4610d94565b848461259c565b611bef67d0d25dd2c047f65660c01b611d1b565b611c0367097f0f39ae6b09be60c01b611d1b565b6001905092915050565b611c21672972288bb009cec360c01b610d91565b611c3567ed460392c5985e6760c01b610d91565b611c4967bc7bd5fe3ee3d7bb60c01b610d91565b611c538134610ddf565b50565b6000919050565b611c71675b9125bfb6475b3c60c01b610d91565b611c8567a11c2457a5783a4660c01b610d91565b611c9967981c7f64eb9302e960c01b610d91565b6000611ca3610d94565b9050611cb96735e63844ba2f77f360c01b610d91565b611ccd675fb6b4cbb96397e160c01b610d91565b611d178183600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612477565b5050565b50565b6000611d34673721c11b68526ab860c01b611d1b565b611d486717de7ea47001931f60c01b611d1b565b611d5c6760a5708b19f5caa660c01b611d1b565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000919050565b611dfc67d924c4a7f1bbb95d60c01b610d91565b611e10671959e54dfb1d443160c01b610d91565b611e246761c4e87d1c8437a360c01b610d91565b6000611e2e610d94565b9050611e44671cf49e015f0c28ec60c01b610d91565b611e58670cdd207309de33d060c01b610d91565b611e6c6713f2d88a3f0faff360c01b610d91565b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611f0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806137546027913960400191505060405180910390fd5b611f22679cebbe7d53966c3460c01b610d91565b611f36671e21fc95c44edbd660c01b610d91565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611fa267ab717dc2a99cd0fb60c01b610d91565b611fb667d2e18bf82fb7902d60c01b610d91565b7fe3f5ed5f263f1f01764a96edfc7d025f511ec5f7d180e8816908b78bcf74f09881604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600061201c67cfc35b626608c6f260c01b611219565b612030677e4f9863b1e00bcc60c01b611219565b61204467e01fbdbc1b0ec7df60c01b611219565b61204e6028612983565b905090565b600061206967c86b29cadf0259cc60c01b612b19565b61207d671cf2fd19ce80bc6460c01b612b19565b61209167084e3d10c702b08960c01b612b19565b600082840190506120ac678715f5819eec045d60c01b612b19565b6120c067389bd6f3088f8ddc60c01b612b19565b6120d467395edfe58ce67c0160c01b612b19565b8381101561214a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174684c69623a206164646974696f6e206f766572666c6f77000081525060200191505060405180910390fd5b61215e67112f71c9280eda0a60c01b612b19565b612172673364fede1fdbaa8a60c01b612b19565b6121866709a89731fdc49fbb60c01b612b19565b8091505092915050565b6121a46761994af2b12cdb1560c01b611d1b565b6121b8679900686b334e73c160c01b611d1b565b6121cc670403b2a3f5d5c81c60c01b611d1b565b6121e067e58b7aa3e8d65ef360c01b611d1b565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612266576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806136d9602b913960400191505060405180910390fd5b61227a6771150f396036240260c01b611d1b565b61228e67b5e45238d6b5003f60c01b611d1b565b6122a267a9c14e37e660d1c660c01b611d1b565b6122b667dabecd8c93a1052f60c01b611d1b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561233c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061368f6029913960400191505060405180910390fd5b612350670eae3d791e6ebcc860c01b611d1b565b6123646734e0310f6a941e8a60c01b611d1b565b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123f967faa6dd21164df70a60c01b611d1b565b61240d67c0276cdf1e17b04b60c01b611d1b565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b61248b6779f4d7cd542fc16460c01b610d91565b61249f671ac92621f87a038b60c01b610d91565b6124b367ccf4cceddb450bb760c01b610d91565b6124bd8382612b1c565b6124d167d88b7d4493e5ca2a60c01b610d91565b6124e567b41665c4cb24e95160c01b610d91565b6124f967216a0cbc89175cdd60c01b610d91565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050612583576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061377b6025913960400191505060405180910390fd5b61259767bae36f70d1a3852d60c01b610d91565b505050565b6125b067c7cb7919542f6d2660c01b610d91565b6125c46721c6f75e9bdfb94460c01b610d91565b6125d86786b7180e697345d060c01b610d91565b600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156126765761263e67d0950f8d8f2af6d860c01b610d91565b61265267a16a40f8d23af44960c01b610d91565b61266667293f3eb6cb44265d60c01b610d91565b612671838383612477565b6126be565b61268a67af8554918b369dd760c01b610d91565b61269e671ce26d76299e1fa460c01b610d91565b6126b2679d1356345d91e1ae60c01b610d91565b6126bd838383612d8a565b5b505050565b60006126d967014583c13352eba860c01b612b19565b6126ed677eb719b38b6a5c0560c01b612b19565b612701676b8cf5cee081f8c560c01b612b19565b61272483836040518060600160405280602181526020016136b86021913961312e565b905092915050565b61274067dddff6936cb1c8c060c01b610d91565b612754677f6cc31d343c910060c01b610d91565b61276867d365f91e13f57f3860c01b610d91565b61277c6718deb3d99595050b60c01b610d91565b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561281f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806136456028913960400191505060405180910390fd5b61283367c76453a66e187f5560c01b610d91565b6128476779b2fb70687e8ba460c01b610d91565b6001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506128b367ed39df550867914e60c01b610d91565b6128c7677673d553fc802daf60c01b610d91565b7f28b26e7a3d20aedbc5f8f2ebf7da671c0491723a2b78f47a097b0e46dee0714281604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b61292b67b69be6bf736d8c1a60c01b611219565b61293f67e18b25fd36211d0160c01b611219565b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600061299967ef0225287ba17ba060c01b611219565b6129ad6795958667c898951b60c01b611219565b6129c167ec06b0be9f42607760c01b611219565b60006129d767b7cd17d69da836b660c01b611219565b6129eb671b7ac62a98e22a5460c01b611219565b6129f3613274565b15612abc57612a0c674b9fe2d527bba60760c01b611219565b612a206737f58d18ef197c9060c01b611219565b612a34679e0c2e494127333d60c01b611219565b6000836000369050039050612a53678767fa9e72b3efac60c01b611219565b612ab460003683906014850192612a6c939291906135ba565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050613455565b915050612ae8565b612ad067531fb14624ef4c0060c01b611219565b612ae467365aa35b4857b9d560c01b611219565b3390505b612afc67bb664b7abb1efcc160c01b611219565b612b1067c66db900ff1468ad60c01b611219565b80915050919050565b50565b612b3067d2d8c53540b0a53f60c01b611d1b565b612b4467ee43d98297ff470e60c01b611d1b565b612b5867c2cd276c165b4f6960c01b611d1b565b612b6c67f78356e7e2e6359760c01b611d1b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612bf2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806135ee6028913960400191505060405180910390fd5b612c0667e014bc59731c672260c01b611d1b565b612c1a67ef984c2ef553e59d60c01b611d1b565b612c86816040518060600160405280602681526020016137a060269139600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461312e9092919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612cdd673a3428cdadeddde360c01b611d1b565b612cf2816004546126c390919063ffffffff16565b600481905550612d0c6796773df5d14ccdd160c01b611d1b565b612d206763afc056658af75560c01b611d1b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b612d9e677d77ff0703cb10f060c01b611d1b565b612db267384ce6741f8887d660c01b611d1b565b612dc6672c09b2a14c1039f660c01b611d1b565b612dda67523a52ed5d5258d060c01b611d1b565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612e60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806137c6602c913960400191505060405180910390fd5b612e7467dee387b35b76a1d660c01b611d1b565b612e88676b748a48a129806060c01b611d1b565b612e9c6762146ceb9aba01d560c01b611d1b565b612eb0673571064e6802142460c01b611d1b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612f36576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061372a602a913960400191505060405180910390fd5b612f4a6702c88af6aac3634860c01b611d1b565b612f5e679ebb3cda6092916760c01b611d1b565b612fb081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126c390919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061300767d7f00b72fd59a55660c01b611d1b565b61305981600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461205390919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506130b06721d30409fd994c1660c01b611d1b565b6130c46784eed3752cef455f60c01b611d1b565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600061314467661b3e046c6cd30d60c01b612b19565b61315867e38f22ae7186b57a60c01b612b19565b61316c67907af1471e9eea1460c01b612b19565b613180670ee1dc39f0f8880f60c01b612b19565b83831115829061322b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156131f05780820151818401526020810190506131d5565b50505050905090810190601f16801561321d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5061324067722ed1e49049e2b960c01b612b19565b61325467542b492b55f417a760c01b612b19565b61326867d0fc59f528f581e460c01b612b19565b82840390509392505050565b600061328a6718d82ab5ae60310f60c01b611219565b61329e67b1091fd4002007a760c01b611219565b6132b267e754ffc9cc3865c960c01b611219565b60006132c8677ed152cd4162d4dd60c01b611219565b6132dc67d897cf3d19cf81cd60c01b611219565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561341157613346677fe0037509e467e160c01b611219565b61335a67d0b1c04b10d8098a60c01b611219565b61336e670b92e025f4debba760c01b611219565b6133826739792e98f7fbfdea60c01b611219565b602c600036905010156133e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061366d6022913960400191505060405180910390fd5b6133f46755c879b00c45b69f60c01b611219565b613408679a100b07747e893d60c01b611219565b60019050613426565b6134256757b90b57dc0a6a0160c01b611219565b5b61343a67cc41edf636370ef460c01b611219565b61344e67ff5a153bde944b0360c01b611219565b8091505090565b600061346b67e937c30ee854c6f460c01b6135b7565b61347f67ae40a839349e539460c01b6135b7565b6134936779ff25ce2e3aef5860c01b6135b7565b60006134a967471a531a4d41d03a60c01b6135b7565b6134bd67dbf5cb870bd2bda760c01b6135b7565b6134d16715ee1c447c585eff60c01b6135b7565b6014835114613548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f42797465734c69623a20696e76616c69642064617461206c656e67746800000081525060200191505060405180910390fd5b61355c67595b08e56ca2004360c01b6135b7565b61357067658f3d9a047d9b2b60c01b6135b7565b6c01000000000000000000000000602084015104905061359a670a7d36500000fb3860c01b6135b7565b6135ae678f46d49d645b8e7560c01b6135b7565b80915050919050565b50565b600080858511156135ca57600080fd5b838611156135d757600080fd5b600185028301915084860390509450949250505056fe4552433230546f6b656e3a2063616e6e6f74206275726e2066726f6d203078302061646472657373496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a657257726170706564576569546f6b656e3a20636f6e73756d657220616c72656164792065786973747347617465776179526563697069656e743a20696e76616c6964206d73672e646174614552433230546f6b656e3a2063616e6e6f7420617070726f766520746f203078302061646472657373536166654d6174684c69623a207375627472616374696f6e206f766572666c6f774552433230546f6b656e3a2063616e6e6f7420617070726f76652066726f6d2030783020616464726573734552433230546f6b656e3a2063616e6e6f74206d696e7420746f2030783020616464726573734552433230546f6b656e3a2063616e6e6f74207472616e7366657220746f20307830206164647265737357726170706564576569546f6b656e3a20636f6e73756d657220646f65736e277420657869737457726170706564576569546f6b656e3a207472616e73616374696f6e2072657665727465644552433230546f6b656e3a206275726e2076616c756520657863656564732062616c616e63654552433230546f6b656e3a2063616e6e6f74207472616e736665722066726f6d203078302061646472657373a164736f6c634300060c000a"; + static readonly abi: ({ + inputs: any[]; + stateMutability: string; + type: string; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + } | { + anonymous: boolean; + inputs: { + indexed: boolean; + internalType: string; + name: string; + type: string; + }[]; + name: string; + type: string; + stateMutability?: undefined; + outputs?: undefined; + } | { + inputs: { + internalType: string; + name: string; + type: string; + }[]; + name: string; + outputs: { + internalType: string; + name: string; + type: string; + }[]; + stateMutability: string; + type: string; + anonymous?: undefined; + } | { + stateMutability: string; + type: string; + inputs?: undefined; + anonymous?: undefined; + name?: undefined; + outputs?: undefined; + })[]; + static createInterface(): WrappedWeiTokenInterface; + static connect(address: string, signerOrProvider: Signer | Provider): WrappedWeiToken; +} +export {}; diff --git a/dist/typings/factories/WrappedWeiToken__factory.js b/dist/typings/factories/WrappedWeiToken__factory.js new file mode 100644 index 00000000..f1a85a84 --- /dev/null +++ b/dist/typings/factories/WrappedWeiToken__factory.js @@ -0,0 +1,654 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WrappedWeiToken__factory = void 0; +const ethers_1 = require("ethers"); +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "consumer", + type: "address", + }, + ], + name: "ConsumerAdded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "consumer", + type: "address", + }, + ], + name: "ConsumerRemoved", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "initializer", + type: "address", + }, + ], + name: "Initialized", + 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", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__230891fc", + type: "bytes8", + }, + ], + name: "c_230891fc", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__5838cc23", + type: "bytes8", + }, + ], + name: "c_5838cc23", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_c0828b70", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_d5c463c2", + outputs: [], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__230891fc", + type: "bytes8", + }, + ], + name: "c_false230891fc", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__5838cc23", + type: "bytes8", + }, + ], + name: "c_false5838cc23", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_falsec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_falsed5c463c2", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__230891fc", + type: "bytes8", + }, + ], + name: "c_true230891fc", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__5838cc23", + type: "bytes8", + }, + ], + name: "c_true5838cc23", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__c0828b70", + type: "bytes8", + }, + ], + name: "c_truec0828b70", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes8", + name: "c__d5c463c2", + type: "bytes8", + }, + ], + name: "c_trued5c463c2", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "depositTo", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "gateway", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "consumers_", + type: "address[]", + }, + { + internalType: "address", + name: "gateway_", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "consumer", + type: "address", + }, + ], + name: "isConsumer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "isInitialized", + 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: "startConsuming", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "stopConsuming", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "withdrawAll", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + ], + name: "withdrawAllTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "withdrawTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +]; +const _bytecode = "0x60806040523480156200001157600080fd5b506200002e675e592fe27197979c60c01b620001b860201b60201c565b6200004a67eca2e4778f3efef360c01b620001b860201b60201c565b326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000a6677bcdc149a707125c60c01b620001bb60201b60201c565b620000c267db84cf13641fc64d60c01b620001be60201b60201c565b620000de672748a7360ce120dd60c01b620001c160201b60201c565b620000fa6765865efbcc8c502260c01b620001c160201b60201c565b6040518060400160405280600b81526020017f57726170706564205765690000000000000000000000000000000000000000008152506001908051906020019062000147929190620001c4565b506200016467880b3010673e19bc60c01b620001c160201b60201c565b6040518060400160405280600481526020017f575745490000000000000000000000000000000000000000000000000000000081525060029080519060200190620001b1929190620001c4565b506200026a565b50565b50565b50565b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200020757805160ff191683800117855562000238565b8280016001018555821562000238579182015b82811115620002375782518255916020019190600101906200021a565b5b5090506200024791906200024b565b5090565b5b80821115620002665760008160009055506001016200024c565b5090565b6137fe806200027a6000396000f3fe6080604052600436106101e75760003560e01c8063462d0b2e11610102578063b760faf911610095578063d4aae83411610064578063d4aae83414610c33578063dd62ed3e14610c89578063ee2c757e14610d0e578063f55647e014610d7a57610213565b8063b760faf914610adc578063c369d5fe14610b20578063ca9add8f14610b8c578063ca9b3ac414610bdd57610213565b8063853828b6116100d1578063853828b61461095857806385ad59e31461096f57806395d89b41146109db578063a9059cbb14610a6b57610213565b8063462d0b2e146107cf57806356a3b64b1461087557806370a082311461088c578063834ff739146108f157610213565b8063205c28781161017a5780632e1a7d4d116101495780632e1a7d4d146106cd5780632e6afd6e14610708578063313ce56714610774578063392e53cd146107a257610213565b8063205c28781461050957806321a5f5da1461056457806323b872dd146105d057806326a9683f1461066157610213565b80631262ed1c116101b65780631262ed1c146103b0578063181216461461041c57806318160ddd146104725780631bb5c2981461049d57610213565b806306fdde0314610218578063095ea7b3146102a85780630c4b1a1714610319578063116191b61461036f57610213565b3661021357610200675239b4c82df61e2960c01b610d91565b61021161020b610d94565b34610ddf565b005b600080fd5b34801561022457600080fd5b5061022d6110f9565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561026d578082015181840152602081019050610252565b50505050905090810190601f16801561029a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102b457600080fd5b50610301600480360360408110156102cb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611197565b60405180821515815260200191505060405180910390f35b34801561032557600080fd5b5061036d6004803603602081101561033c57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611219565b005b34801561037b57600080fd5b5061038461121c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103bc57600080fd5b50610404600480360360208110156103d357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611242565b60405180821515815260200191505060405180910390f35b34801561042857600080fd5b506104706004803603602081101561043f57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061124d565b005b34801561047e57600080fd5b50610487611250565b6040518082815260200191505060405180910390f35b3480156104a957600080fd5b506104f1600480360360208110156104c057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611256565b60405180821515815260200191505060405180910390f35b34801561051557600080fd5b506105626004803603604081101561052c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611261565b005b34801561057057600080fd5b506105b86004803603602081101561058757600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506112b3565b60405180821515815260200191505060405180910390f35b3480156105dc57600080fd5b50610649600480360360608110156105f357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506112be565b60405180821515815260200191505060405180910390f35b34801561066d57600080fd5b506106b56004803603602081101561068457600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611430565b60405180821515815260200191505060405180910390f35b3480156106d957600080fd5b50610706600480360360208110156106f057600080fd5b8101908080359060200190929190505050611437565b005b34801561071457600080fd5b5061075c6004803603602081101561072b57600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff1916906020019092919050505061148f565b60405180821515815260200191505060405180910390f35b34801561078057600080fd5b50610789611496565b604051808260ff16815260200191505060405180910390f35b3480156107ae57600080fd5b506107b76114a9565b60405180821515815260200191505060405180910390f35b3480156107db57600080fd5b50610873600480360360408110156107f257600080fd5b810190808035906020019064010000000081111561080f57600080fd5b82018360208201111561082157600080fd5b8035906020019184602083028401116401000000008311171561084357600080fd5b9091929391929390803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061153c565b005b34801561088157600080fd5b5061088a6118c0565b005b34801561089857600080fd5b506108db600480360360208110156108af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061190e565b6040518082815260200191505060405180910390f35b3480156108fd57600080fd5b506109406004803603602081101561091457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611993565b60405180821515815260200191505060405180910390f35b34801561096457600080fd5b5061096d611a25565b005b34801561097b57600080fd5b506109c36004803603602081101561099257600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611ae2565b60405180821515815260200191505060405180910390f35b3480156109e757600080fd5b506109f0611aed565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a30578082015181840152602081019050610a15565b50505050905090810190601f168015610a5d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b348015610a7757600080fd5b50610ac460048036036040811015610a8e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611b8b565b60405180821515815260200191505060405180910390f35b610b1e60048036036020811015610af257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c0d565b005b348015610b2c57600080fd5b50610b7460048036036020811015610b4357600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611c56565b60405180821515815260200191505060405180910390f35b348015610b9857600080fd5b50610bdb60048036036020811015610baf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c5d565b005b348015610be957600080fd5b50610c3160048036036020811015610c0057600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611d1b565b005b348015610c3f57600080fd5b50610c8760048036036020811015610c5657600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610d91565b005b348015610c9557600080fd5b50610cf860048036036040811015610cac57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d1e565b6040518082815260200191505060405180910390f35b348015610d1a57600080fd5b50610d6260048036036020811015610d3157600080fd5b81019080803577ffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611de1565b60405180821515815260200191505060405180910390f35b348015610d8657600080fd5b50610d8f611de8565b005b50565b6000610daa67e6d4a5fd77e6ffb760c01b610d91565b610dbe67794b5e9c3104e13b60c01b610d91565b610dd267a64cbecc1895040f60c01b610d91565b610dda612006565b905090565b610df3678b40f65b9f52bed260c01b611d1b565b610e07675539eb664662780760c01b611d1b565b610e1b67751894f1ff56728460c01b611d1b565b610e2f671386aceb091e4a7b60c01b611d1b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610eb5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806137046026913960400191505060405180910390fd5b610ec967e4f181ee5678b65e60c01b611d1b565b610edd67b95349941d5819a660c01b611d1b565b610ef167308a84875c2f8fcc60c01b611d1b565b610f0567c1385feddce7f40b60c01b611d1b565b60008111610f7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f4552433230546f6b656e3a2063616e6e6f74206d696e7420302076616c75650081525060200191505060405180910390fd5b610f8f6755c7106a04dfb5dc60c01b611d1b565b610fa367354036ead116c20c60c01b611d1b565b610ff581600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461205390919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061104c676e54754e99ba96ba60c01b611d1b565b6110618160045461205390919063ffffffff16565b60048190555061107b67c129908edd37058760c01b611d1b565b61108f6795d9dc07ef74661c60c01b611d1b565b8173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561118f5780601f106111645761010080835404028352916020019161118f565b820191906000526020600020905b81548152906001019060200180831161117257829003601f168201915b505050505081565b60006111ad6716c7994ce2963b9560c01b611d1b565b6111c1670db71104231ddd1760c01b611d1b565b6111d567ebc28f0b33236df060c01b611d1b565b6111e76111e0610d94565b8484612190565b6111fb67aa49da918aee6d8a60c01b611d1b565b61120f67788e6cd03eb368e660c01b611d1b565b6001905092915050565b50565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019050919050565b50565b60045481565b600060019050919050565b61127567a62d0f3881e623cb60c01b610d91565b61128967fe02b6f5adce666c60c01b610d91565b61129d67358f7d5d1733939b60c01b610d91565b6112af6112a8610d94565b8383612477565b5050565b600060019050919050565b60006112d4676b8bf02b5baf919c60c01b611d1b565b6112e86732f60aace714d92760c01b611d1b565b6112fc677a66edda9f42015560c01b611d1b565b6000611306610d94565b905061131c6778f656dfd913a5dd60c01b611d1b565b611330672a4e24b8b558a54b60c01b611d1b565b61133b85858561259c565b61134f672588e49425764ced60c01b611d1b565b61136367c937a0700bcc984060c01b611d1b565b6113fc85826113f786600660008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126c390919063ffffffff16565b612190565b61141067398b3849bc30852360c01b611d1b565b61142467daf5ad9d09af319860c01b611d1b565b60019150509392505050565b6000919050565b61144b674ef26944b734d54d60c01b610d91565b61145f67f2907e0d06c3393060c01b610d91565b61147367b980667497ed0cd360c01b610d91565b61148c61147e610d94565b611486610d94565b83612477565b50565b6000919050565b600360009054906101000a900460ff1681565b60006114bf6726ed6cc6ca12515c60c01b61124d565b6114d367f3fc49482028cbb860c01b61124d565b6114e76740317a79cae6a3ff60c01b61124d565b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905090565b611550677ecb82f9b15830c660c01b610d91565b61156467b2266613e068a5ae60c01b61124d565b611578676a66a63870f964f960c01b61124d565b61158c6772f22eca890742ba60c01b61124d565b6115a067c8ab57d60023f99860c01b61124d565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff1614611644576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180613616602f913960400191505060405180910390fd5b61165867d31dec9098d614f660c01b61124d565b61166c67a184879381a9c67460c01b61124d565b60008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506116c1675e44e6e1c885710560c01b61124d565b6116d567ec71016ca4160e4960c01b610d91565b6116e96774ff4e3cd391e3cd60c01b610d91565b6116fd67c043cb580727c9ef60c01b610d91565b61171167fa61dd16021aae9460c01b610d91565b600083839050146118005761173067a325c68e080afe0660c01b610d91565b61174467c2ccb82fa1e9bcc960c01b610d91565b611758673ff86f60ef23635e60c01b610d91565b600083839050905061177467bcb8921f33557c8a60c01b610d91565b611788678d54aad9f4b0620160c01b610d91565b60005b818110156117f9576117a767211028319f743e5660c01b610d91565b6117bb676e4300f20fe3e35e60c01b610d91565b6117ec8585838181106117ca57fe5b9050602002013573ffffffffffffffffffffffffffffffffffffffff1661272c565b808060010191505061178b565b5050611815565b6118146773614affa4dbab7b60c01b610d91565b5b61182967358e5dc5b3181c4d60c01b610d91565b61183d67205e3a20147cbc8e60c01b610d91565b61184681612917565b61185a6732ca1833e9907bb960c01b61124d565b61186e672942130a5b94b82160c01b61124d565b7f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e632604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1505050565b6118d467cba1284eb7ffa09360c01b610d91565b6118e867decb423bf455f92660c01b610d91565b6118fc6733cb9d6682fea53e60c01b610d91565b61190c611907610d94565b61272c565b565b600061192467b0119dbfe84d854760c01b611d1b565b6119386766b84161ec9c0de360c01b611d1b565b61194c671e3111d613d98fb560c01b611d1b565b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006119a967669b4edd44aefa3a60c01b610d91565b6119bd6789d88eeaa8dc5a5960c01b610d91565b6119d1677c57fb81952d832960c01b610d91565b600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b611a3967bc5f390a1fa4f97460c01b610d91565b611a4d672319c4834ca1d85b60c01b610d91565b611a616792006a5a414b06d460c01b610d91565b6000611a6b610d94565b9050611a816769b89547e17a7df160c01b610d91565b611a9567cf35488c7f7ea66a60c01b610d91565b611adf8182600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612477565b50565b600060019050919050565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b835780601f10611b5857610100808354040283529160200191611b83565b820191906000526020600020905b815481529060010190602001808311611b6657829003601f168201915b505050505081565b6000611ba1676387db9a7f4190f260c01b611d1b565b611bb567253782937c01735d60c01b611d1b565b611bc967253005ba8f5d5f7460c01b611d1b565b611bdb611bd4610d94565b848461259c565b611bef67d0d25dd2c047f65660c01b611d1b565b611c0367097f0f39ae6b09be60c01b611d1b565b6001905092915050565b611c21672972288bb009cec360c01b610d91565b611c3567ed460392c5985e6760c01b610d91565b611c4967bc7bd5fe3ee3d7bb60c01b610d91565b611c538134610ddf565b50565b6000919050565b611c71675b9125bfb6475b3c60c01b610d91565b611c8567a11c2457a5783a4660c01b610d91565b611c9967981c7f64eb9302e960c01b610d91565b6000611ca3610d94565b9050611cb96735e63844ba2f77f360c01b610d91565b611ccd675fb6b4cbb96397e160c01b610d91565b611d178183600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612477565b5050565b50565b6000611d34673721c11b68526ab860c01b611d1b565b611d486717de7ea47001931f60c01b611d1b565b611d5c6760a5708b19f5caa660c01b611d1b565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000919050565b611dfc67d924c4a7f1bbb95d60c01b610d91565b611e10671959e54dfb1d443160c01b610d91565b611e246761c4e87d1c8437a360c01b610d91565b6000611e2e610d94565b9050611e44671cf49e015f0c28ec60c01b610d91565b611e58670cdd207309de33d060c01b610d91565b611e6c6713f2d88a3f0faff360c01b610d91565b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611f0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001806137546027913960400191505060405180910390fd5b611f22679cebbe7d53966c3460c01b610d91565b611f36671e21fc95c44edbd660c01b610d91565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611fa267ab717dc2a99cd0fb60c01b610d91565b611fb667d2e18bf82fb7902d60c01b610d91565b7fe3f5ed5f263f1f01764a96edfc7d025f511ec5f7d180e8816908b78bcf74f09881604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600061201c67cfc35b626608c6f260c01b611219565b612030677e4f9863b1e00bcc60c01b611219565b61204467e01fbdbc1b0ec7df60c01b611219565b61204e6028612983565b905090565b600061206967c86b29cadf0259cc60c01b612b19565b61207d671cf2fd19ce80bc6460c01b612b19565b61209167084e3d10c702b08960c01b612b19565b600082840190506120ac678715f5819eec045d60c01b612b19565b6120c067389bd6f3088f8ddc60c01b612b19565b6120d467395edfe58ce67c0160c01b612b19565b8381101561214a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174684c69623a206164646974696f6e206f766572666c6f77000081525060200191505060405180910390fd5b61215e67112f71c9280eda0a60c01b612b19565b612172673364fede1fdbaa8a60c01b612b19565b6121866709a89731fdc49fbb60c01b612b19565b8091505092915050565b6121a46761994af2b12cdb1560c01b611d1b565b6121b8679900686b334e73c160c01b611d1b565b6121cc670403b2a3f5d5c81c60c01b611d1b565b6121e067e58b7aa3e8d65ef360c01b611d1b565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612266576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806136d9602b913960400191505060405180910390fd5b61227a6771150f396036240260c01b611d1b565b61228e67b5e45238d6b5003f60c01b611d1b565b6122a267a9c14e37e660d1c660c01b611d1b565b6122b667dabecd8c93a1052f60c01b611d1b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561233c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602981526020018061368f6029913960400191505060405180910390fd5b612350670eae3d791e6ebcc860c01b611d1b565b6123646734e0310f6a941e8a60c01b611d1b565b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123f967faa6dd21164df70a60c01b611d1b565b61240d67c0276cdf1e17b04b60c01b611d1b565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b61248b6779f4d7cd542fc16460c01b610d91565b61249f671ac92621f87a038b60c01b610d91565b6124b367ccf4cceddb450bb760c01b610d91565b6124bd8382612b1c565b6124d167d88b7d4493e5ca2a60c01b610d91565b6124e567b41665c4cb24e95160c01b610d91565b6124f967216a0cbc89175cdd60c01b610d91565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050612583576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061377b6025913960400191505060405180910390fd5b61259767bae36f70d1a3852d60c01b610d91565b505050565b6125b067c7cb7919542f6d2660c01b610d91565b6125c46721c6f75e9bdfb94460c01b610d91565b6125d86786b7180e697345d060c01b610d91565b600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156126765761263e67d0950f8d8f2af6d860c01b610d91565b61265267a16a40f8d23af44960c01b610d91565b61266667293f3eb6cb44265d60c01b610d91565b612671838383612477565b6126be565b61268a67af8554918b369dd760c01b610d91565b61269e671ce26d76299e1fa460c01b610d91565b6126b2679d1356345d91e1ae60c01b610d91565b6126bd838383612d8a565b5b505050565b60006126d967014583c13352eba860c01b612b19565b6126ed677eb719b38b6a5c0560c01b612b19565b612701676b8cf5cee081f8c560c01b612b19565b61272483836040518060600160405280602181526020016136b86021913961312e565b905092915050565b61274067dddff6936cb1c8c060c01b610d91565b612754677f6cc31d343c910060c01b610d91565b61276867d365f91e13f57f3860c01b610d91565b61277c6718deb3d99595050b60c01b610d91565b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561281f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806136456028913960400191505060405180910390fd5b61283367c76453a66e187f5560c01b610d91565b6128476779b2fb70687e8ba460c01b610d91565b6001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506128b367ed39df550867914e60c01b610d91565b6128c7677673d553fc802daf60c01b610d91565b7f28b26e7a3d20aedbc5f8f2ebf7da671c0491723a2b78f47a097b0e46dee0714281604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b61292b67b69be6bf736d8c1a60c01b611219565b61293f67e18b25fd36211d0160c01b611219565b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600061299967ef0225287ba17ba060c01b611219565b6129ad6795958667c898951b60c01b611219565b6129c167ec06b0be9f42607760c01b611219565b60006129d767b7cd17d69da836b660c01b611219565b6129eb671b7ac62a98e22a5460c01b611219565b6129f3613274565b15612abc57612a0c674b9fe2d527bba60760c01b611219565b612a206737f58d18ef197c9060c01b611219565b612a34679e0c2e494127333d60c01b611219565b6000836000369050039050612a53678767fa9e72b3efac60c01b611219565b612ab460003683906014850192612a6c939291906135ba565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050613455565b915050612ae8565b612ad067531fb14624ef4c0060c01b611219565b612ae467365aa35b4857b9d560c01b611219565b3390505b612afc67bb664b7abb1efcc160c01b611219565b612b1067c66db900ff1468ad60c01b611219565b80915050919050565b50565b612b3067d2d8c53540b0a53f60c01b611d1b565b612b4467ee43d98297ff470e60c01b611d1b565b612b5867c2cd276c165b4f6960c01b611d1b565b612b6c67f78356e7e2e6359760c01b611d1b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612bf2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806135ee6028913960400191505060405180910390fd5b612c0667e014bc59731c672260c01b611d1b565b612c1a67ef984c2ef553e59d60c01b611d1b565b612c86816040518060600160405280602681526020016137a060269139600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461312e9092919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612cdd673a3428cdadeddde360c01b611d1b565b612cf2816004546126c390919063ffffffff16565b600481905550612d0c6796773df5d14ccdd160c01b611d1b565b612d206763afc056658af75560c01b611d1b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b612d9e677d77ff0703cb10f060c01b611d1b565b612db267384ce6741f8887d660c01b611d1b565b612dc6672c09b2a14c1039f660c01b611d1b565b612dda67523a52ed5d5258d060c01b611d1b565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612e60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c8152602001806137c6602c913960400191505060405180910390fd5b612e7467dee387b35b76a1d660c01b611d1b565b612e88676b748a48a129806060c01b611d1b565b612e9c6762146ceb9aba01d560c01b611d1b565b612eb0673571064e6802142460c01b611d1b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612f36576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061372a602a913960400191505060405180910390fd5b612f4a6702c88af6aac3634860c01b611d1b565b612f5e679ebb3cda6092916760c01b611d1b565b612fb081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126c390919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061300767d7f00b72fd59a55660c01b611d1b565b61305981600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461205390919063ffffffff16565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506130b06721d30409fd994c1660c01b611d1b565b6130c46784eed3752cef455f60c01b611d1b565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600061314467661b3e046c6cd30d60c01b612b19565b61315867e38f22ae7186b57a60c01b612b19565b61316c67907af1471e9eea1460c01b612b19565b613180670ee1dc39f0f8880f60c01b612b19565b83831115829061322b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156131f05780820151818401526020810190506131d5565b50505050905090810190601f16801561321d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5061324067722ed1e49049e2b960c01b612b19565b61325467542b492b55f417a760c01b612b19565b61326867d0fc59f528f581e460c01b612b19565b82840390509392505050565b600061328a6718d82ab5ae60310f60c01b611219565b61329e67b1091fd4002007a760c01b611219565b6132b267e754ffc9cc3865c960c01b611219565b60006132c8677ed152cd4162d4dd60c01b611219565b6132dc67d897cf3d19cf81cd60c01b611219565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561341157613346677fe0037509e467e160c01b611219565b61335a67d0b1c04b10d8098a60c01b611219565b61336e670b92e025f4debba760c01b611219565b6133826739792e98f7fbfdea60c01b611219565b602c600036905010156133e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061366d6022913960400191505060405180910390fd5b6133f46755c879b00c45b69f60c01b611219565b613408679a100b07747e893d60c01b611219565b60019050613426565b6134256757b90b57dc0a6a0160c01b611219565b5b61343a67cc41edf636370ef460c01b611219565b61344e67ff5a153bde944b0360c01b611219565b8091505090565b600061346b67e937c30ee854c6f460c01b6135b7565b61347f67ae40a839349e539460c01b6135b7565b6134936779ff25ce2e3aef5860c01b6135b7565b60006134a967471a531a4d41d03a60c01b6135b7565b6134bd67dbf5cb870bd2bda760c01b6135b7565b6134d16715ee1c447c585eff60c01b6135b7565b6014835114613548576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f42797465734c69623a20696e76616c69642064617461206c656e67746800000081525060200191505060405180910390fd5b61355c67595b08e56ca2004360c01b6135b7565b61357067658f3d9a047d9b2b60c01b6135b7565b6c01000000000000000000000000602084015104905061359a670a7d36500000fb3860c01b6135b7565b6135ae678f46d49d645b8e7560c01b6135b7565b80915050919050565b50565b600080858511156135ca57600080fd5b838611156135d757600080fd5b600185028301915084860390509450949250505056fe4552433230546f6b656e3a2063616e6e6f74206275726e2066726f6d203078302061646472657373496e697469616c697a61626c653a2074782e6f726967696e206973206e6f742074686520696e697469616c697a657257726170706564576569546f6b656e3a20636f6e73756d657220616c72656164792065786973747347617465776179526563697069656e743a20696e76616c6964206d73672e646174614552433230546f6b656e3a2063616e6e6f7420617070726f766520746f203078302061646472657373536166654d6174684c69623a207375627472616374696f6e206f766572666c6f774552433230546f6b656e3a2063616e6e6f7420617070726f76652066726f6d2030783020616464726573734552433230546f6b656e3a2063616e6e6f74206d696e7420746f2030783020616464726573734552433230546f6b656e3a2063616e6e6f74207472616e7366657220746f20307830206164647265737357726170706564576569546f6b656e3a20636f6e73756d657220646f65736e277420657869737457726170706564576569546f6b656e3a207472616e73616374696f6e2072657665727465644552433230546f6b656e3a206275726e2076616c756520657863656564732062616c616e63654552433230546f6b656e3a2063616e6e6f74207472616e736665722066726f6d203078302061646472657373a164736f6c634300060c000a"; +const isSuperArgs = (xs) => xs.length > 1; +class WrappedWeiToken__factory extends ethers_1.ContractFactory { + constructor(...args) { + if (isSuperArgs(args)) { + super(...args); + } + else { + super(_abi, _bytecode, args[0]); + } + } + deploy(overrides) { + return super.deploy(overrides || {}); + } + getDeployTransaction(overrides) { + return super.getDeployTransaction(overrides || {}); + } + attach(address) { + return super.attach(address); + } + connect(signer) { + return super.connect(signer); + } + static createInterface() { + return new ethers_1.utils.Interface(_abi); + } + static connect(address, signerOrProvider) { + return new ethers_1.Contract(address, _abi, signerOrProvider); + } +} +exports.WrappedWeiToken__factory = WrappedWeiToken__factory; +WrappedWeiToken__factory.bytecode = _bytecode; +WrappedWeiToken__factory.abi = _abi; diff --git a/dist/typings/index.d.ts b/dist/typings/index.d.ts new file mode 100644 index 00000000..3484645f --- /dev/null +++ b/dist/typings/index.d.ts @@ -0,0 +1,72 @@ +export type { IERC20 } from "./IERC20"; +export type { ISuperAgreement } from "./ISuperAgreement"; +export type { ISuperfluidToken } from "./ISuperfluidToken"; +export type { Controlled } from "./Controlled"; +export type { Guarded } from "./Guarded"; +export type { GuardedMock } from "./GuardedMock"; +export type { Account } from "./Account"; +export type { AccountBase } from "./AccountBase"; +export type { AccountController } from "./AccountController"; +export type { AccountImplementationV1 } from "./AccountImplementationV1"; +export type { AccountRegistry } from "./AccountRegistry"; +export type { AccountControllerMock } from "./AccountControllerMock"; +export type { AccountImplementationV1Mock } from "./AccountImplementationV1Mock"; +export type { AccountRegistryMock } from "./AccountRegistryMock"; +export type { BalancesHelper } from "./BalancesHelper"; +export type { BalancesHelperV2 } from "./BalancesHelperV2"; +export type { Initializable } from "./Initializable"; +export type { SignatureValidator } from "./SignatureValidator"; +export type { ERC20Token } from "./ERC20Token"; +export type { ENSController } from "./ENSController"; +export type { ENSHelper } from "./ENSHelper"; +export type { ENSRegistry } from "./ENSRegistry"; +export type { ENSReverseRegistrar } from "./ENSReverseRegistrar"; +export type { ENSAddressResolver } from "./ENSAddressResolver"; +export type { ENSNameResolver } from "./ENSNameResolver"; +export type { ENSPubKeyResolver } from "./ENSPubKeyResolver"; +export type { ENSTextResolver } from "./ENSTextResolver"; +export type { ExternalAccountRegistry } from "./ExternalAccountRegistry"; +export type { Gateway } from "./Gateway"; +export type { GatewayRecipient } from "./GatewayRecipient"; +export type { GatewayRecipientMock } from "./GatewayRecipientMock"; +export type { PaymentDepositAccount } from "./PaymentDepositAccount"; +export type { PaymentRegistry } from "./PaymentRegistry"; +export type { PersonalAccountImplementationV1 } from "./PersonalAccountImplementationV1"; +export type { PersonalAccountRegistry } from "./PersonalAccountRegistry"; +export type { WrappedWeiToken } from "./WrappedWeiToken"; +export { IERC20__factory } from "./factories/IERC20__factory"; +export { ISuperAgreement__factory } from "./factories/ISuperAgreement__factory"; +export { ISuperfluidToken__factory } from "./factories/ISuperfluidToken__factory"; +export { Controlled__factory } from "./factories/Controlled__factory"; +export { Guarded__factory } from "./factories/Guarded__factory"; +export { GuardedMock__factory } from "./factories/GuardedMock__factory"; +export { Account__factory } from "./factories/Account__factory"; +export { AccountBase__factory } from "./factories/AccountBase__factory"; +export { AccountController__factory } from "./factories/AccountController__factory"; +export { AccountImplementationV1__factory } from "./factories/AccountImplementationV1__factory"; +export { AccountRegistry__factory } from "./factories/AccountRegistry__factory"; +export { AccountControllerMock__factory } from "./factories/AccountControllerMock__factory"; +export { AccountImplementationV1Mock__factory } from "./factories/AccountImplementationV1Mock__factory"; +export { AccountRegistryMock__factory } from "./factories/AccountRegistryMock__factory"; +export { BalancesHelper__factory } from "./factories/BalancesHelper__factory"; +export { BalancesHelperV2__factory } from "./factories/BalancesHelperV2__factory"; +export { Initializable__factory } from "./factories/Initializable__factory"; +export { SignatureValidator__factory } from "./factories/SignatureValidator__factory"; +export { ERC20Token__factory } from "./factories/ERC20Token__factory"; +export { ENSController__factory } from "./factories/ENSController__factory"; +export { ENSHelper__factory } from "./factories/ENSHelper__factory"; +export { ENSRegistry__factory } from "./factories/ENSRegistry__factory"; +export { ENSReverseRegistrar__factory } from "./factories/ENSReverseRegistrar__factory"; +export { ENSAddressResolver__factory } from "./factories/ENSAddressResolver__factory"; +export { ENSNameResolver__factory } from "./factories/ENSNameResolver__factory"; +export { ENSPubKeyResolver__factory } from "./factories/ENSPubKeyResolver__factory"; +export { ENSTextResolver__factory } from "./factories/ENSTextResolver__factory"; +export { ExternalAccountRegistry__factory } from "./factories/ExternalAccountRegistry__factory"; +export { Gateway__factory } from "./factories/Gateway__factory"; +export { GatewayRecipient__factory } from "./factories/GatewayRecipient__factory"; +export { GatewayRecipientMock__factory } from "./factories/GatewayRecipientMock__factory"; +export { PaymentDepositAccount__factory } from "./factories/PaymentDepositAccount__factory"; +export { PaymentRegistry__factory } from "./factories/PaymentRegistry__factory"; +export { PersonalAccountImplementationV1__factory } from "./factories/PersonalAccountImplementationV1__factory"; +export { PersonalAccountRegistry__factory } from "./factories/PersonalAccountRegistry__factory"; +export { WrappedWeiToken__factory } from "./factories/WrappedWeiToken__factory"; diff --git a/dist/typings/index.js b/dist/typings/index.js new file mode 100644 index 00000000..c54d1592 --- /dev/null +++ b/dist/typings/index.js @@ -0,0 +1,75 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.WrappedWeiToken__factory = exports.PersonalAccountRegistry__factory = exports.PersonalAccountImplementationV1__factory = exports.PaymentRegistry__factory = exports.PaymentDepositAccount__factory = exports.GatewayRecipientMock__factory = exports.GatewayRecipient__factory = exports.Gateway__factory = exports.ExternalAccountRegistry__factory = exports.ENSTextResolver__factory = exports.ENSPubKeyResolver__factory = exports.ENSNameResolver__factory = exports.ENSAddressResolver__factory = exports.ENSReverseRegistrar__factory = exports.ENSRegistry__factory = exports.ENSHelper__factory = exports.ENSController__factory = exports.ERC20Token__factory = exports.SignatureValidator__factory = exports.Initializable__factory = exports.BalancesHelperV2__factory = exports.BalancesHelper__factory = exports.AccountRegistryMock__factory = exports.AccountImplementationV1Mock__factory = exports.AccountControllerMock__factory = exports.AccountRegistry__factory = exports.AccountImplementationV1__factory = exports.AccountController__factory = exports.AccountBase__factory = exports.Account__factory = exports.GuardedMock__factory = exports.Guarded__factory = exports.Controlled__factory = exports.ISuperfluidToken__factory = exports.ISuperAgreement__factory = exports.IERC20__factory = void 0; +var IERC20__factory_1 = require("./factories/IERC20__factory"); +Object.defineProperty(exports, "IERC20__factory", { enumerable: true, get: function () { return IERC20__factory_1.IERC20__factory; } }); +var ISuperAgreement__factory_1 = require("./factories/ISuperAgreement__factory"); +Object.defineProperty(exports, "ISuperAgreement__factory", { enumerable: true, get: function () { return ISuperAgreement__factory_1.ISuperAgreement__factory; } }); +var ISuperfluidToken__factory_1 = require("./factories/ISuperfluidToken__factory"); +Object.defineProperty(exports, "ISuperfluidToken__factory", { enumerable: true, get: function () { return ISuperfluidToken__factory_1.ISuperfluidToken__factory; } }); +var Controlled__factory_1 = require("./factories/Controlled__factory"); +Object.defineProperty(exports, "Controlled__factory", { enumerable: true, get: function () { return Controlled__factory_1.Controlled__factory; } }); +var Guarded__factory_1 = require("./factories/Guarded__factory"); +Object.defineProperty(exports, "Guarded__factory", { enumerable: true, get: function () { return Guarded__factory_1.Guarded__factory; } }); +var GuardedMock__factory_1 = require("./factories/GuardedMock__factory"); +Object.defineProperty(exports, "GuardedMock__factory", { enumerable: true, get: function () { return GuardedMock__factory_1.GuardedMock__factory; } }); +var Account__factory_1 = require("./factories/Account__factory"); +Object.defineProperty(exports, "Account__factory", { enumerable: true, get: function () { return Account__factory_1.Account__factory; } }); +var AccountBase__factory_1 = require("./factories/AccountBase__factory"); +Object.defineProperty(exports, "AccountBase__factory", { enumerable: true, get: function () { return AccountBase__factory_1.AccountBase__factory; } }); +var AccountController__factory_1 = require("./factories/AccountController__factory"); +Object.defineProperty(exports, "AccountController__factory", { enumerable: true, get: function () { return AccountController__factory_1.AccountController__factory; } }); +var AccountImplementationV1__factory_1 = require("./factories/AccountImplementationV1__factory"); +Object.defineProperty(exports, "AccountImplementationV1__factory", { enumerable: true, get: function () { return AccountImplementationV1__factory_1.AccountImplementationV1__factory; } }); +var AccountRegistry__factory_1 = require("./factories/AccountRegistry__factory"); +Object.defineProperty(exports, "AccountRegistry__factory", { enumerable: true, get: function () { return AccountRegistry__factory_1.AccountRegistry__factory; } }); +var AccountControllerMock__factory_1 = require("./factories/AccountControllerMock__factory"); +Object.defineProperty(exports, "AccountControllerMock__factory", { enumerable: true, get: function () { return AccountControllerMock__factory_1.AccountControllerMock__factory; } }); +var AccountImplementationV1Mock__factory_1 = require("./factories/AccountImplementationV1Mock__factory"); +Object.defineProperty(exports, "AccountImplementationV1Mock__factory", { enumerable: true, get: function () { return AccountImplementationV1Mock__factory_1.AccountImplementationV1Mock__factory; } }); +var AccountRegistryMock__factory_1 = require("./factories/AccountRegistryMock__factory"); +Object.defineProperty(exports, "AccountRegistryMock__factory", { enumerable: true, get: function () { return AccountRegistryMock__factory_1.AccountRegistryMock__factory; } }); +var BalancesHelper__factory_1 = require("./factories/BalancesHelper__factory"); +Object.defineProperty(exports, "BalancesHelper__factory", { enumerable: true, get: function () { return BalancesHelper__factory_1.BalancesHelper__factory; } }); +var BalancesHelperV2__factory_1 = require("./factories/BalancesHelperV2__factory"); +Object.defineProperty(exports, "BalancesHelperV2__factory", { enumerable: true, get: function () { return BalancesHelperV2__factory_1.BalancesHelperV2__factory; } }); +var Initializable__factory_1 = require("./factories/Initializable__factory"); +Object.defineProperty(exports, "Initializable__factory", { enumerable: true, get: function () { return Initializable__factory_1.Initializable__factory; } }); +var SignatureValidator__factory_1 = require("./factories/SignatureValidator__factory"); +Object.defineProperty(exports, "SignatureValidator__factory", { enumerable: true, get: function () { return SignatureValidator__factory_1.SignatureValidator__factory; } }); +var ERC20Token__factory_1 = require("./factories/ERC20Token__factory"); +Object.defineProperty(exports, "ERC20Token__factory", { enumerable: true, get: function () { return ERC20Token__factory_1.ERC20Token__factory; } }); +var ENSController__factory_1 = require("./factories/ENSController__factory"); +Object.defineProperty(exports, "ENSController__factory", { enumerable: true, get: function () { return ENSController__factory_1.ENSController__factory; } }); +var ENSHelper__factory_1 = require("./factories/ENSHelper__factory"); +Object.defineProperty(exports, "ENSHelper__factory", { enumerable: true, get: function () { return ENSHelper__factory_1.ENSHelper__factory; } }); +var ENSRegistry__factory_1 = require("./factories/ENSRegistry__factory"); +Object.defineProperty(exports, "ENSRegistry__factory", { enumerable: true, get: function () { return ENSRegistry__factory_1.ENSRegistry__factory; } }); +var ENSReverseRegistrar__factory_1 = require("./factories/ENSReverseRegistrar__factory"); +Object.defineProperty(exports, "ENSReverseRegistrar__factory", { enumerable: true, get: function () { return ENSReverseRegistrar__factory_1.ENSReverseRegistrar__factory; } }); +var ENSAddressResolver__factory_1 = require("./factories/ENSAddressResolver__factory"); +Object.defineProperty(exports, "ENSAddressResolver__factory", { enumerable: true, get: function () { return ENSAddressResolver__factory_1.ENSAddressResolver__factory; } }); +var ENSNameResolver__factory_1 = require("./factories/ENSNameResolver__factory"); +Object.defineProperty(exports, "ENSNameResolver__factory", { enumerable: true, get: function () { return ENSNameResolver__factory_1.ENSNameResolver__factory; } }); +var ENSPubKeyResolver__factory_1 = require("./factories/ENSPubKeyResolver__factory"); +Object.defineProperty(exports, "ENSPubKeyResolver__factory", { enumerable: true, get: function () { return ENSPubKeyResolver__factory_1.ENSPubKeyResolver__factory; } }); +var ENSTextResolver__factory_1 = require("./factories/ENSTextResolver__factory"); +Object.defineProperty(exports, "ENSTextResolver__factory", { enumerable: true, get: function () { return ENSTextResolver__factory_1.ENSTextResolver__factory; } }); +var ExternalAccountRegistry__factory_1 = require("./factories/ExternalAccountRegistry__factory"); +Object.defineProperty(exports, "ExternalAccountRegistry__factory", { enumerable: true, get: function () { return ExternalAccountRegistry__factory_1.ExternalAccountRegistry__factory; } }); +var Gateway__factory_1 = require("./factories/Gateway__factory"); +Object.defineProperty(exports, "Gateway__factory", { enumerable: true, get: function () { return Gateway__factory_1.Gateway__factory; } }); +var GatewayRecipient__factory_1 = require("./factories/GatewayRecipient__factory"); +Object.defineProperty(exports, "GatewayRecipient__factory", { enumerable: true, get: function () { return GatewayRecipient__factory_1.GatewayRecipient__factory; } }); +var GatewayRecipientMock__factory_1 = require("./factories/GatewayRecipientMock__factory"); +Object.defineProperty(exports, "GatewayRecipientMock__factory", { enumerable: true, get: function () { return GatewayRecipientMock__factory_1.GatewayRecipientMock__factory; } }); +var PaymentDepositAccount__factory_1 = require("./factories/PaymentDepositAccount__factory"); +Object.defineProperty(exports, "PaymentDepositAccount__factory", { enumerable: true, get: function () { return PaymentDepositAccount__factory_1.PaymentDepositAccount__factory; } }); +var PaymentRegistry__factory_1 = require("./factories/PaymentRegistry__factory"); +Object.defineProperty(exports, "PaymentRegistry__factory", { enumerable: true, get: function () { return PaymentRegistry__factory_1.PaymentRegistry__factory; } }); +var PersonalAccountImplementationV1__factory_1 = require("./factories/PersonalAccountImplementationV1__factory"); +Object.defineProperty(exports, "PersonalAccountImplementationV1__factory", { enumerable: true, get: function () { return PersonalAccountImplementationV1__factory_1.PersonalAccountImplementationV1__factory; } }); +var PersonalAccountRegistry__factory_1 = require("./factories/PersonalAccountRegistry__factory"); +Object.defineProperty(exports, "PersonalAccountRegistry__factory", { enumerable: true, get: function () { return PersonalAccountRegistry__factory_1.PersonalAccountRegistry__factory; } }); +var WrappedWeiToken__factory_1 = require("./factories/WrappedWeiToken__factory"); +Object.defineProperty(exports, "WrappedWeiToken__factory", { enumerable: true, get: function () { return WrappedWeiToken__factory_1.WrappedWeiToken__factory; } }); diff --git a/dist/utils/diamond.d.ts b/dist/utils/diamond.d.ts new file mode 100644 index 00000000..a38059bb --- /dev/null +++ b/dist/utils/diamond.d.ts @@ -0,0 +1,11 @@ +import { Contract } from 'ethers'; +export declare function getSelectors(contract: Contract): string[]; +export declare const FacetCutAction: { + Add: number; + Replace: number; + Remove: number; +}; +export declare function addOrReplaceFacets(facets: Contract[], diamondAddress: string, initContract?: string, initData?: string): Promise; +export declare function addFacets(facets: Contract[], diamondAddress: string, initContract?: string, initData?: string): Promise; +export declare function removeFacet(selectors: string[], diamondAddress: string): Promise; +export declare function replaceFacet(facet: Contract, diamondAddress: string, initContract?: string, initData?: string): Promise; diff --git a/dist/utils/diamond.js b/dist/utils/diamond.js new file mode 100644 index 00000000..094557e9 --- /dev/null +++ b/dist/utils/diamond.js @@ -0,0 +1,135 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.replaceFacet = exports.removeFacet = exports.addFacets = exports.addOrReplaceFacets = exports.FacetCutAction = exports.getSelectors = void 0; +const ethers_1 = require("ethers"); +const hardhat_1 = require("hardhat"); +function getSelectors(contract) { + const selectors = contract.interface.fragments.reduce((acc, val) => { + if (val.type === 'function') { + const sig = contract.interface.getSighash(val); + acc.push(sig); + return acc; + } + else { + return acc; + } + }, []); + return selectors; +} +exports.getSelectors = getSelectors; +exports.FacetCutAction = { + Add: 0, + Replace: 1, + Remove: 2, +}; +async function addOrReplaceFacets(facets, diamondAddress, initContract = ethers_1.constants.AddressZero, initData = '0x') { + const loupe = (await hardhat_1.ethers.getContractAt('IDiamondLoupe', diamondAddress)); + const cut = []; + for (const f of facets) { + const replaceSelectors = []; + const addSelectors = []; + const selectors = getSelectors(f); + for (const s of selectors) { + const addr = await loupe.facetAddress(s); + if (addr === ethers_1.constants.AddressZero) { + addSelectors.push(s); + continue; + } + if (addr.toLowerCase() !== f.address.toLowerCase()) { + replaceSelectors.push(s); + } + } + if (replaceSelectors.length) { + cut.push({ + facetAddress: f.address, + action: exports.FacetCutAction.Replace, + functionSelectors: replaceSelectors, + }); + } + if (addSelectors.length) { + cut.push({ + facetAddress: f.address, + action: exports.FacetCutAction.Add, + functionSelectors: addSelectors, + }); + } + } + if (!cut.length) { + console.log('No facets to add or replace.'); + return; + } + const cutter = (await hardhat_1.ethers.getContractAt('IDiamondCut', diamondAddress)); + console.log('Adding/Replacing facets...'); + const tx = await cutter.diamondCut(cut, initContract, initData, {}); + console.log('Diamond cut tx: ', tx.hash); + const receipt = await tx.wait(); + if (!receipt.status) { + throw Error(`Diamond upgrade failed: ${tx.hash}`); + } + console.log('Done.'); +} +exports.addOrReplaceFacets = addOrReplaceFacets; +async function addFacets(facets, diamondAddress, initContract = ethers_1.constants.AddressZero, initData = '0x') { + const cut = []; + for (const f of facets) { + const selectors = getSelectors(f); + cut.push({ + facetAddress: f.address, + action: exports.FacetCutAction.Add, + functionSelectors: selectors, + }); + } + if (!cut.length) { + console.log('No facets to add or replace.'); + return; + } + const cutter = (await hardhat_1.ethers.getContractAt('IDiamondCut', diamondAddress)); + console.log('Adding facets...'); + const tx = await cutter.diamondCut(cut, initContract, initData, {}); + console.log('Diamond cut tx: ', tx.hash); + const receipt = await tx.wait(); + if (!receipt.status) { + throw Error(`Diamond upgrade failed: ${tx.hash}`); + } + console.log('Done.'); +} +exports.addFacets = addFacets; +async function removeFacet(selectors, diamondAddress) { + const cut = [ + { + facetAddress: ethers_1.constants.AddressZero, + action: exports.FacetCutAction.Remove, + functionSelectors: selectors, + }, + ]; + const cutter = (await hardhat_1.ethers.getContractAt('IDiamondCut', diamondAddress)); + console.log('Removing facet...'); + const tx = await cutter.diamondCut(cut, ethers_1.constants.AddressZero, '0x', {}); + console.log('Diamond cut tx: ', tx.hash); + const receipt = await tx.wait(); + if (!receipt.status) { + throw Error(`Diamond upgrade failed: ${tx.hash}`); + } + console.log('Done.'); +} +exports.removeFacet = removeFacet; +async function replaceFacet(facet, diamondAddress, initContract = ethers_1.constants.AddressZero, initData = '0x') { + const selectors = getSelectors(facet); + const cut = [ + { + facetAddress: facet.address, + action: exports.FacetCutAction.Replace, + functionSelectors: selectors, + }, + ]; + const cutter = (await hardhat_1.ethers.getContractAt('IDiamondCut', diamondAddress)); + console.log('Replacing facet...'); + const tx = await cutter.diamondCut(cut, initContract, initData, {}); + console.log('Diamond cut tx: ', tx.hash); + const receipt = await tx.wait(); + if (!receipt.status) { + throw Error(`Diamond upgrade failed: ${tx.hash}`); + } + console.log('Done.'); +} +exports.replaceFacet = replaceFacet; diff --git a/extensions/constants.ts b/extensions/constants.ts index 62e39542..55d97c00 100644 --- a/extensions/constants.ts +++ b/extensions/constants.ts @@ -22,6 +22,8 @@ export enum NetworkNames { OptimismKovan = "optimismKovan", Moonbeam = "moonbeam", Moonbase = "moonbase", + Fuse = 'fuse', + FuseSparknet = 'fuseSparknet', Celo = "celo", CeloTest = "celoTest", Etherspot = 'etherspot', @@ -183,6 +185,16 @@ export const NETWORK_CONFIGS: { defaultProviderUrl: 'https://alfajores-forno.celo-testnet.org', defaultGasPrice: 1, }, + [NetworkNames.Fuse]: { + chainId: 122, + defaultProviderUrl: 'https://rpc.fuse.io', + defaultGasPrice: 1, + }, + [NetworkNames.FuseSparknet]: { + chainId: 123, + defaultProviderUrl : 'https://rpc.fusespark.io', + defaultGasPrice: 1, + }, [NetworkNames.Etherspot]: { chainId: 4386, defaultProviderUrl: 'https://qa-etherspot-testnet.pillarproject.io', diff --git a/package-lock.json b/package-lock.json index 561ba1a1..467ba8c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@etherspot/contracts", - "version": "1.7.0", + "version": "1.8.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@etherspot/contracts", - "version": "1.7.0", + "version": "1.8.0", "license": "MIT", "devDependencies": { "@nomiclabs/hardhat-etherscan": "2.1.7", diff --git a/package.json b/package.json index 89081d27..3ba2e431 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@etherspot/contracts", - "version": "1.7.0", + "version": "1.8.0", "description": "Etherspot Solidity contracts", "keywords": [ "ether", @@ -50,6 +50,8 @@ "deploy:moonbase": "hardhat deploy --network moonbase", "deploy:celo": "hardhat deploy --network celo", "deploy:celoTest": "hardhat deploy --network celoTest", + "deploy:fuse": "hardhat deploy --network fuse", + "deploy:fuseSparknet": "hardhat deploy --network fuseSparknet", "deploy:etherspot": "hardhat deploy --network etherspot", "deploy:localA": "hardhat deploy --network localA", "deploy:localB": "hardhat deploy --network localB", diff --git a/src/bridges/Diamond.sol b/src/bridges/Diamond.sol new file mode 100644 index 00000000..3c2e50ec --- /dev/null +++ b/src/bridges/Diamond.sol @@ -0,0 +1,63 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.4; + +import {LibDiamond} from "./libs/LibDiamond.sol"; +import {IDiamondCut} from "./interfaces/IDiamondCut.sol"; + +contract Diamond { + constructor(address _contractOwner, address _diamondCutFacet) payable { + LibDiamond.setContractOwner(_contractOwner); + + // Add the diamondCut external function from the diamondCutFacet + IDiamondCut.FacetCut[] memory cut = new IDiamondCut.FacetCut[](1); + bytes4[] memory functionSelectors = new bytes4[](1); + functionSelectors[0] = IDiamondCut.diamondCut.selector; + cut[0] = IDiamondCut.FacetCut({ + facetAddress: _diamondCutFacet, + action: IDiamondCut.FacetCutAction.Add, + functionSelectors: functionSelectors + }); + LibDiamond.diamondCut(cut, address(0), ""); + } + + // Find facet for function that is called and execute the + // function if a facet is found and return any value. + // solhint-disable-next-line no-complex-fallback + fallback() external payable { + LibDiamond.DiamondStorage storage ds; + bytes32 position = LibDiamond.DIAMOND_STORAGE_POSITION; + + // get diamond storage + // solhint-disable-next-line no-inline-assembly + assembly { + ds.slot := position + } + + // get facet from function selector + address facet = ds.selectorToFacetAndPosition[msg.sig].facetAddress; + require(facet != address(0), "Diamond: Function does not exist"); + + // Execute external function from facet using delegatecall and return any value. + // solhint-disable-next-line no-inline-assembly + assembly { + // copy function selector and any arguments + calldatacopy(0, 0, calldatasize()) + // execute function call using the facet + let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0) + // get any return value + returndatacopy(0, 0, returndatasize()) + // return any return value or error back to the caller + switch result + case 0 { + revert(0, returndatasize()) + } + default { + return(0, returndatasize()) + } + } + } + + // Able to receive ether + // solhint-disable-next-line no-empty-blocks + receive() external payable {} +} diff --git a/src/bridges/README.md b/src/bridges/README.md new file mode 100644 index 00000000..edc9831a --- /dev/null +++ b/src/bridges/README.md @@ -0,0 +1,3 @@ +# Diamond Standard + +This repo is based on this implementation of [the diamond standard](https://github.com/ethereum/EIPs/issues/2535) - https://github.com/mudgen/diamond-3-hardhat/ diff --git a/src/bridges/facets/DiamondCutFacet.sol b/src/bridges/facets/DiamondCutFacet.sol new file mode 100644 index 00000000..1bfe5916 --- /dev/null +++ b/src/bridges/facets/DiamondCutFacet.sol @@ -0,0 +1,22 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.4; + +import { IDiamondCut } from "../interfaces/IDiamondCut.sol"; +import { LibDiamond } from "../libs/LibDiamond.sol"; + +contract DiamondCutFacet is IDiamondCut { + /// @notice Add/replace/remove any number of functions and optionally execute + /// a function with delegatecall + /// @param _diamondCut Contains the facet addresses and function selectors + /// @param _init The address of the contract or facet to execute _calldata + /// @param _calldata A function call, including function selector and arguments + /// _calldata is executed with delegatecall on _init + function diamondCut( + FacetCut[] calldata _diamondCut, + address _init, + bytes calldata _calldata + ) external override { + LibDiamond.enforceIsContractOwner(); + LibDiamond.diamondCut(_diamondCut, _init, _calldata); + } +} diff --git a/src/bridges/facets/DiamondLoupeFacet.sol b/src/bridges/facets/DiamondLoupeFacet.sol new file mode 100644 index 00000000..67e06ab5 --- /dev/null +++ b/src/bridges/facets/DiamondLoupeFacet.sol @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.4; + +import { LibDiamond } from "../libs/LibDiamond.sol"; +import { IDiamondLoupe } from "../interfaces/IDiamondLoupe.sol"; +import { IERC165 } from "../interfaces/IERC165.sol"; + +contract DiamondLoupeFacet is IDiamondLoupe, IERC165 { + // Diamond Loupe Functions + //////////////////////////////////////////////////////////////////// + /// These functions are expected to be called frequently by tools. + // + // struct Facet { + // address facetAddress; + // bytes4[] functionSelectors; + // } + + /// @notice Gets all facets and their selectors. + /// @return facets_ Facet + function facets() external view override returns (Facet[] memory facets_) { + LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); + uint256 numFacets = ds.facetAddresses.length; + facets_ = new Facet[](numFacets); + for (uint256 i = 0; i < numFacets; i++) { + address facetAddress_ = ds.facetAddresses[i]; + facets_[i].facetAddress = facetAddress_; + facets_[i].functionSelectors = ds.facetFunctionSelectors[facetAddress_].functionSelectors; + } + } + + /// @notice Gets all the function selectors provided by a facet. + /// @param _facet The facet address. + /// @return facetFunctionSelectors_ + function facetFunctionSelectors(address _facet) + external + view + override + returns (bytes4[] memory facetFunctionSelectors_) + { + LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); + facetFunctionSelectors_ = ds.facetFunctionSelectors[_facet].functionSelectors; + } + + /// @notice Get all the facet addresses used by a diamond. + /// @return facetAddresses_ + function facetAddresses() external view override returns (address[] memory facetAddresses_) { + LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); + facetAddresses_ = ds.facetAddresses; + } + + /// @notice Gets the facet that supports the given selector. + /// @dev If facet is not found return address(0). + /// @param _functionSelector The function selector. + /// @return facetAddress_ The facet address. + function facetAddress(bytes4 _functionSelector) external view override returns (address facetAddress_) { + LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); + facetAddress_ = ds.selectorToFacetAndPosition[_functionSelector].facetAddress; + } + + // This implements ERC-165. + function supportsInterface(bytes4 _interfaceId) external view override returns (bool) { + LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage(); + return ds.supportedInterfaces[_interfaceId]; + } +} diff --git a/src/bridges/facets/OwnershipFacet.sol b/src/bridges/facets/OwnershipFacet.sol new file mode 100644 index 00000000..291c8ea0 --- /dev/null +++ b/src/bridges/facets/OwnershipFacet.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.4; + +import { LibDiamond } from "../libs/LibDiamond.sol"; +import { IERC173 } from "../interfaces/IERC173.sol"; + +contract OwnershipFacet is IERC173 { + function transferOwnership(address _newOwner) external override { + LibDiamond.enforceIsContractOwner(); + LibDiamond.setContractOwner(_newOwner); + } + + function owner() external view override returns (address owner_) { + owner_ = LibDiamond.contractOwner(); + } +} \ No newline at end of file diff --git a/src/bridges/interfaces/IDiamondCut.sol b/src/bridges/interfaces/IDiamondCut.sol new file mode 100644 index 00000000..85b5d47d --- /dev/null +++ b/src/bridges/interfaces/IDiamondCut.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.4; + +interface IDiamondCut { + enum FacetCutAction { + Add, + Replace, + Remove + } + // Add=0, Replace=1, Remove=2 + + struct FacetCut { + address facetAddress; + FacetCutAction action; + bytes4[] functionSelectors; + } + + /// @notice Add/replace/remove any number of functions and optionally execute + /// a function with delegatecall + /// @param _diamondCut Contains the facet addresses and function selectors + /// @param _init The address of the contract or facet to execute _calldata + /// @param _calldata A function call, including function selector and arguments + /// _calldata is executed with delegatecall on _init + function diamondCut( + FacetCut[] calldata _diamondCut, + address _init, + bytes calldata _calldata + ) external; + + event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata); +} diff --git a/src/bridges/interfaces/IDiamondLoupe.sol b/src/bridges/interfaces/IDiamondLoupe.sol new file mode 100644 index 00000000..d9bb479e --- /dev/null +++ b/src/bridges/interfaces/IDiamondLoupe.sol @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.4; + +// A loupe is a small magnifying glass used to look at diamonds. +// These functions look at diamonds +interface IDiamondLoupe { + /// These functions are expected to be called frequently + /// by tools. + + struct Facet { + address facetAddress; + bytes4[] functionSelectors; + } + + /// @notice Gets all facet addresses and their four byte function selectors. + /// @return facets_ Facet + function facets() external view returns (Facet[] memory facets_); + + /// @notice Gets all the function selectors supported by a specific facet. + /// @param _facet The facet address. + /// @return facetFunctionSelectors_ + function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_); + + /// @notice Get all the facet addresses used by a diamond. + /// @return facetAddresses_ + function facetAddresses() external view returns (address[] memory facetAddresses_); + + /// @notice Gets the facet that supports the given selector. + /// @dev If facet is not found return address(0). + /// @param _functionSelector The function selector. + /// @return facetAddress_ The facet address. + function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_); +} diff --git a/src/bridges/interfaces/IERC165.sol b/src/bridges/interfaces/IERC165.sol new file mode 100644 index 00000000..68b3b16f --- /dev/null +++ b/src/bridges/interfaces/IERC165.sol @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.4; + +interface IERC165 { + /// @notice Query if a contract implements an interface + /// @param interfaceId The interface identifier, as specified in ERC-165 + /// @dev Interface identification is specified in ERC-165. This function + /// uses less than 30,000 gas. + /// @return `true` if the contract implements `interfaceID` and + /// `interfaceID` is not 0xffffffff, `false` otherwise + function supportsInterface(bytes4 interfaceId) external view returns (bool); +} \ No newline at end of file diff --git a/src/bridges/interfaces/IERC173.sol b/src/bridges/interfaces/IERC173.sol new file mode 100644 index 00000000..466ad051 --- /dev/null +++ b/src/bridges/interfaces/IERC173.sol @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.4; + +/// @title ERC-173 Contract Ownership Standard +/// Note: the ERC-165 identifier for this interface is 0x7f5828d0 +/* is ERC165 */ +interface IERC173 { + /// @notice Get the address of the owner + /// @return owner_ The address of the owner. + function owner() external view returns (address owner_); + + /// @notice Set the address of the new owner of the contract + /// @dev Set _newOwner to address(0) to renounce any ownership. + /// @param _newOwner The address of the new owner of the contract + function transferOwnership(address _newOwner) external; +} diff --git a/src/bridges/libs/LibDiamond.sol b/src/bridges/libs/LibDiamond.sol new file mode 100644 index 00000000..1b57eca2 --- /dev/null +++ b/src/bridges/libs/LibDiamond.sol @@ -0,0 +1,214 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.4; + +import { IDiamondCut } from "../interfaces/IDiamondCut.sol"; + +library LibDiamond { + bytes32 internal constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage"); + + struct FacetAddressAndPosition { + address facetAddress; + uint96 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array + } + + struct FacetFunctionSelectors { + bytes4[] functionSelectors; + uint256 facetAddressPosition; // position of facetAddress in facetAddresses array + } + + struct DiamondStorage { + // maps function selector to the facet address and + // the position of the selector in the facetFunctionSelectors.selectors array + mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition; + // maps facet addresses to function selectors + mapping(address => FacetFunctionSelectors) facetFunctionSelectors; + // facet addresses + address[] facetAddresses; + // Used to query if a contract implements an interface. + // Used to implement ERC-165. + mapping(bytes4 => bool) supportedInterfaces; + // owner of the contract + address contractOwner; + } + + function diamondStorage() internal pure returns (DiamondStorage storage ds) { + bytes32 position = DIAMOND_STORAGE_POSITION; + // solhint-disable-next-line no-inline-assembly + assembly { + ds.slot := position + } + } + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + function setContractOwner(address _newOwner) internal { + DiamondStorage storage ds = diamondStorage(); + address previousOwner = ds.contractOwner; + ds.contractOwner = _newOwner; + emit OwnershipTransferred(previousOwner, _newOwner); + } + + function contractOwner() internal view returns (address contractOwner_) { + contractOwner_ = diamondStorage().contractOwner; + } + + function enforceIsContractOwner() internal view { + require(msg.sender == diamondStorage().contractOwner, "LibDiamond: Must be contract owner"); + } + + event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata); + + // Internal function version of diamondCut + function diamondCut( + IDiamondCut.FacetCut[] memory _diamondCut, + address _init, + bytes memory _calldata + ) internal { + for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) { + IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action; + if (action == IDiamondCut.FacetCutAction.Add) { + addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors); + } else if (action == IDiamondCut.FacetCutAction.Replace) { + replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors); + } else if (action == IDiamondCut.FacetCutAction.Remove) { + removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors); + } else { + revert("LibDiamondCut: Incorrect FacetCutAction"); + } + } + emit DiamondCut(_diamondCut, _init, _calldata); + initializeDiamondCut(_init, _calldata); + } + + function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal { + require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut"); + DiamondStorage storage ds = diamondStorage(); + require(_facetAddress != address(0), "LibDiamondCut: Add facet can't be address(0)"); + uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length); + // add new facet address if it does not exist + if (selectorPosition == 0) { + addFacet(ds, _facetAddress); + } + for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) { + bytes4 selector = _functionSelectors[selectorIndex]; + address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress; + require(oldFacetAddress == address(0), "LibDiamondCut: Can't add function that already exists"); + addFunction(ds, selector, selectorPosition, _facetAddress); + selectorPosition++; + } + } + + function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal { + require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut"); + DiamondStorage storage ds = diamondStorage(); + require(_facetAddress != address(0), "LibDiamondCut: Add facet can't be address(0)"); + uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length); + // add new facet address if it does not exist + if (selectorPosition == 0) { + addFacet(ds, _facetAddress); + } + for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) { + bytes4 selector = _functionSelectors[selectorIndex]; + address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress; + require(oldFacetAddress != _facetAddress, "LibDiamondCut: Can't replace function with same function"); + removeFunction(ds, oldFacetAddress, selector); + addFunction(ds, selector, selectorPosition, _facetAddress); + selectorPosition++; + } + } + + function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal { + require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut"); + DiamondStorage storage ds = diamondStorage(); + // if function does not exist then do nothing and return + require(_facetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)"); + for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) { + bytes4 selector = _functionSelectors[selectorIndex]; + address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress; + removeFunction(ds, oldFacetAddress, selector); + } + } + + function addFacet(DiamondStorage storage ds, address _facetAddress) internal { + enforceHasContractCode(_facetAddress, "LibDiamondCut: New facet has no code"); + ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length; + ds.facetAddresses.push(_facetAddress); + } + + function addFunction( + DiamondStorage storage ds, + bytes4 _selector, + uint96 _selectorPosition, + address _facetAddress + ) internal { + ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition; + ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector); + ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress; + } + + function removeFunction( + DiamondStorage storage ds, + address _facetAddress, + bytes4 _selector + ) internal { + require(_facetAddress != address(0), "LibDiamondCut: Can't remove function that doesn't exist"); + // an immutable function is a function defined directly in a diamond + require(_facetAddress != address(this), "LibDiamondCut: Can't remove immutable function"); + // replace selector with last selector, then delete last selector + uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition; + uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1; + // if not the same then replace _selector with lastSelector + if (selectorPosition != lastSelectorPosition) { + bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition]; + ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector; + ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint96(selectorPosition); + } + // delete the last selector + ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop(); + delete ds.selectorToFacetAndPosition[_selector]; + + // if no more selectors for facet address then delete the facet address + if (lastSelectorPosition == 0) { + // replace facet address with last facet address and delete last facet address + uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1; + uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition; + if (facetAddressPosition != lastFacetAddressPosition) { + address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition]; + ds.facetAddresses[facetAddressPosition] = lastFacetAddress; + ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = facetAddressPosition; + } + ds.facetAddresses.pop(); + delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition; + } + } + + function initializeDiamondCut(address _init, bytes memory _calldata) internal { + if (_init == address(0)) { + require(_calldata.length == 0, "LibDiamondCut: _init is address(0) but_calldata is not empty"); + } else { + require(_calldata.length > 0, "LibDiamondCut: _calldata is empty but _init is not address(0)"); + if (_init != address(this)) { + enforceHasContractCode(_init, "LibDiamondCut: _init address has no code"); + } + // solhint-disable-next-line avoid-low-level-calls + (bool success, bytes memory error) = _init.delegatecall(_calldata); + if (!success) { + if (error.length > 0) { + // bubble up the error + revert(string(error)); + } else { + revert("LibDiamondCut: _init function reverted"); + } + } + } + } + + function enforceHasContractCode(address _contract, string memory _errorMessage) internal view { + uint256 contractSize; + // solhint-disable-next-line no-inline-assembly + assembly { + contractSize := extcodesize(_contract) + } + require(contractSize > 0, _errorMessage); + } +} diff --git a/test/bridges/Diamond.ts b/test/bridges/Diamond.ts new file mode 100644 index 00000000..56450a3d --- /dev/null +++ b/test/bridges/Diamond.ts @@ -0,0 +1,48 @@ +import { ethers } from 'hardhat'; +import { addFacets, getSelectors } from '../../utils/diamond'; +import { Diamond, DiamondCutFacet, DiamondLoupeFacet } from '../../typings'; +import { + SignerWithAddress, + deployContract, +} from '../shared'; + +const { getSigners } = ethers; + +describe('Diamond', () => { + let signers: SignerWithAddress[]; + let diamond: Diamond; + let diamondCutFacet: DiamondCutFacet; + + before(async () => { + signers = await getSigners(); + + diamondCutFacet = await deployContract('DiamondCutFacet'); + diamond = await deployContract( + 'Diamond', + [signers[0].address, diamondCutFacet.address] + ); + }); + + it('should add facets', async () => { + const facetsToAdd = [ + 'DiamondLoupeFacet', + 'OwnershipFacet' + ]; + const cut = { + [diamondCutFacet.address]: getSelectors(diamondCutFacet), + }; + + for (const facet of facetsToAdd) { + const facetContract = await deployContract(facet); + cut[facetContract.address] = getSelectors(facetContract); + await addFacets([facetContract], diamond.address); + } + + const diamondLoupe: DiamondLoupeFacet = await ethers.getContractAt("DiamondLoupeFacet", diamond.address); + const facets = await diamondLoupe.facets(); + for (const facet of facets) { + expect(cut[facet.facetAddress]).toBeDefined(); + expect(facet.functionSelectors).toEqual(cut[facet.facetAddress]); + } + }); +}); diff --git a/typings/Diamond.ts b/typings/Diamond.ts new file mode 100644 index 00000000..cf73be69 --- /dev/null +++ b/typings/Diamond.ts @@ -0,0 +1,50 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { BaseContract, Signer, utils } from "ethers"; + +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; + +export interface DiamondInterface extends utils.Interface { + functions: {}; + + events: {}; +} + +export interface Diamond extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: DiamondInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/typings/DiamondCutFacet.ts b/typings/DiamondCutFacet.ts new file mode 100644 index 00000000..4535a609 --- /dev/null +++ b/typings/DiamondCutFacet.ts @@ -0,0 +1,139 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; + +export type FacetCutStruct = { + facetAddress: string; + action: BigNumberish; + functionSelectors: BytesLike[]; +}; + +export type FacetCutStructOutput = [string, number, string[]] & { + facetAddress: string; + action: number; + functionSelectors: string[]; +}; + +export interface DiamondCutFacetInterface extends utils.Interface { + functions: { + "diamondCut((address,uint8,bytes4[])[],address,bytes)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "diamondCut", + values: [FacetCutStruct[], string, BytesLike] + ): string; + + decodeFunctionResult(functionFragment: "diamondCut", data: BytesLike): Result; + + events: { + "DiamondCut(tuple[],address,bytes)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "DiamondCut"): EventFragment; +} + +export type DiamondCutEvent = TypedEvent< + [FacetCutStructOutput[], string, string], + { _diamondCut: FacetCutStructOutput[]; _init: string; _calldata: string } +>; + +export type DiamondCutEventFilter = TypedEventFilter; + +export interface DiamondCutFacet extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: DiamondCutFacetInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + diamondCut( + _diamondCut: FacetCutStruct[], + _init: string, + _calldata: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + diamondCut( + _diamondCut: FacetCutStruct[], + _init: string, + _calldata: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + diamondCut( + _diamondCut: FacetCutStruct[], + _init: string, + _calldata: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "DiamondCut(tuple[],address,bytes)"( + _diamondCut?: null, + _init?: null, + _calldata?: null + ): DiamondCutEventFilter; + DiamondCut( + _diamondCut?: null, + _init?: null, + _calldata?: null + ): DiamondCutEventFilter; + }; + + estimateGas: { + diamondCut( + _diamondCut: FacetCutStruct[], + _init: string, + _calldata: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + diamondCut( + _diamondCut: FacetCutStruct[], + _init: string, + _calldata: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/typings/DiamondLoupeFacet.ts b/typings/DiamondLoupeFacet.ts new file mode 100644 index 00000000..d41fe343 --- /dev/null +++ b/typings/DiamondLoupeFacet.ts @@ -0,0 +1,209 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; + +export type FacetStruct = { + facetAddress: string; + functionSelectors: BytesLike[]; +}; + +export type FacetStructOutput = [string, string[]] & { + facetAddress: string; + functionSelectors: string[]; +}; + +export interface DiamondLoupeFacetInterface extends utils.Interface { + functions: { + "facetAddress(bytes4)": FunctionFragment; + "facetAddresses()": FunctionFragment; + "facetFunctionSelectors(address)": FunctionFragment; + "facets()": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "facetAddress", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "facetAddresses", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "facetFunctionSelectors", + values: [string] + ): string; + encodeFunctionData(functionFragment: "facets", values?: undefined): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "facetAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "facetAddresses", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "facetFunctionSelectors", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "facets", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + + events: {}; +} + +export interface DiamondLoupeFacet extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: DiamondLoupeFacetInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + facetAddress( + _functionSelector: BytesLike, + overrides?: CallOverrides + ): Promise<[string] & { facetAddress_: string }>; + + facetAddresses( + overrides?: CallOverrides + ): Promise<[string[]] & { facetAddresses_: string[] }>; + + facetFunctionSelectors( + _facet: string, + overrides?: CallOverrides + ): Promise<[string[]] & { facetFunctionSelectors_: string[] }>; + + facets( + overrides?: CallOverrides + ): Promise<[FacetStructOutput[]] & { facets_: FacetStructOutput[] }>; + + supportsInterface( + _interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + }; + + facetAddress( + _functionSelector: BytesLike, + overrides?: CallOverrides + ): Promise; + + facetAddresses(overrides?: CallOverrides): Promise; + + facetFunctionSelectors( + _facet: string, + overrides?: CallOverrides + ): Promise; + + facets(overrides?: CallOverrides): Promise; + + supportsInterface( + _interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + callStatic: { + facetAddress( + _functionSelector: BytesLike, + overrides?: CallOverrides + ): Promise; + + facetAddresses(overrides?: CallOverrides): Promise; + + facetFunctionSelectors( + _facet: string, + overrides?: CallOverrides + ): Promise; + + facets(overrides?: CallOverrides): Promise; + + supportsInterface( + _interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + facetAddress( + _functionSelector: BytesLike, + overrides?: CallOverrides + ): Promise; + + facetAddresses(overrides?: CallOverrides): Promise; + + facetFunctionSelectors( + _facet: string, + overrides?: CallOverrides + ): Promise; + + facets(overrides?: CallOverrides): Promise; + + supportsInterface( + _interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + facetAddress( + _functionSelector: BytesLike, + overrides?: CallOverrides + ): Promise; + + facetAddresses(overrides?: CallOverrides): Promise; + + facetFunctionSelectors( + _facet: string, + overrides?: CallOverrides + ): Promise; + + facets(overrides?: CallOverrides): Promise; + + supportsInterface( + _interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/typings/IDiamondCut.ts b/typings/IDiamondCut.ts new file mode 100644 index 00000000..e67d2d4e --- /dev/null +++ b/typings/IDiamondCut.ts @@ -0,0 +1,139 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BaseContract, + BigNumber, + BigNumberish, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; + +export type FacetCutStruct = { + facetAddress: string; + action: BigNumberish; + functionSelectors: BytesLike[]; +}; + +export type FacetCutStructOutput = [string, number, string[]] & { + facetAddress: string; + action: number; + functionSelectors: string[]; +}; + +export interface IDiamondCutInterface extends utils.Interface { + functions: { + "diamondCut((address,uint8,bytes4[])[],address,bytes)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "diamondCut", + values: [FacetCutStruct[], string, BytesLike] + ): string; + + decodeFunctionResult(functionFragment: "diamondCut", data: BytesLike): Result; + + events: { + "DiamondCut(tuple[],address,bytes)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "DiamondCut"): EventFragment; +} + +export type DiamondCutEvent = TypedEvent< + [FacetCutStructOutput[], string, string], + { _diamondCut: FacetCutStructOutput[]; _init: string; _calldata: string } +>; + +export type DiamondCutEventFilter = TypedEventFilter; + +export interface IDiamondCut extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IDiamondCutInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + diamondCut( + _diamondCut: FacetCutStruct[], + _init: string, + _calldata: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + diamondCut( + _diamondCut: FacetCutStruct[], + _init: string, + _calldata: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + diamondCut( + _diamondCut: FacetCutStruct[], + _init: string, + _calldata: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + "DiamondCut(tuple[],address,bytes)"( + _diamondCut?: null, + _init?: null, + _calldata?: null + ): DiamondCutEventFilter; + DiamondCut( + _diamondCut?: null, + _init?: null, + _calldata?: null + ): DiamondCutEventFilter; + }; + + estimateGas: { + diamondCut( + _diamondCut: FacetCutStruct[], + _init: string, + _calldata: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + diamondCut( + _diamondCut: FacetCutStruct[], + _init: string, + _calldata: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/typings/IDiamondLoupe.ts b/typings/IDiamondLoupe.ts new file mode 100644 index 00000000..2205a320 --- /dev/null +++ b/typings/IDiamondLoupe.ts @@ -0,0 +1,175 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; + +export type FacetStruct = { + facetAddress: string; + functionSelectors: BytesLike[]; +}; + +export type FacetStructOutput = [string, string[]] & { + facetAddress: string; + functionSelectors: string[]; +}; + +export interface IDiamondLoupeInterface extends utils.Interface { + functions: { + "facetAddress(bytes4)": FunctionFragment; + "facetAddresses()": FunctionFragment; + "facetFunctionSelectors(address)": FunctionFragment; + "facets()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "facetAddress", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "facetAddresses", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "facetFunctionSelectors", + values: [string] + ): string; + encodeFunctionData(functionFragment: "facets", values?: undefined): string; + + decodeFunctionResult( + functionFragment: "facetAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "facetAddresses", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "facetFunctionSelectors", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "facets", data: BytesLike): Result; + + events: {}; +} + +export interface IDiamondLoupe extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IDiamondLoupeInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + facetAddress( + _functionSelector: BytesLike, + overrides?: CallOverrides + ): Promise<[string] & { facetAddress_: string }>; + + facetAddresses( + overrides?: CallOverrides + ): Promise<[string[]] & { facetAddresses_: string[] }>; + + facetFunctionSelectors( + _facet: string, + overrides?: CallOverrides + ): Promise<[string[]] & { facetFunctionSelectors_: string[] }>; + + facets( + overrides?: CallOverrides + ): Promise<[FacetStructOutput[]] & { facets_: FacetStructOutput[] }>; + }; + + facetAddress( + _functionSelector: BytesLike, + overrides?: CallOverrides + ): Promise; + + facetAddresses(overrides?: CallOverrides): Promise; + + facetFunctionSelectors( + _facet: string, + overrides?: CallOverrides + ): Promise; + + facets(overrides?: CallOverrides): Promise; + + callStatic: { + facetAddress( + _functionSelector: BytesLike, + overrides?: CallOverrides + ): Promise; + + facetAddresses(overrides?: CallOverrides): Promise; + + facetFunctionSelectors( + _facet: string, + overrides?: CallOverrides + ): Promise; + + facets(overrides?: CallOverrides): Promise; + }; + + filters: {}; + + estimateGas: { + facetAddress( + _functionSelector: BytesLike, + overrides?: CallOverrides + ): Promise; + + facetAddresses(overrides?: CallOverrides): Promise; + + facetFunctionSelectors( + _facet: string, + overrides?: CallOverrides + ): Promise; + + facets(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + facetAddress( + _functionSelector: BytesLike, + overrides?: CallOverrides + ): Promise; + + facetAddresses(overrides?: CallOverrides): Promise; + + facetFunctionSelectors( + _facet: string, + overrides?: CallOverrides + ): Promise; + + facets(overrides?: CallOverrides): Promise; + }; +} diff --git a/typings/IERC165.ts b/typings/IERC165.ts new file mode 100644 index 00000000..c9f6247c --- /dev/null +++ b/typings/IERC165.ts @@ -0,0 +1,95 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; + +export interface IERC165Interface extends utils.Interface { + functions: { + "supportsInterface(bytes4)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IERC165 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IERC165Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + }; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + callStatic: { + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/typings/IERC173.ts b/typings/IERC173.ts new file mode 100644 index 00000000..b1aaa2fa --- /dev/null +++ b/typings/IERC173.ts @@ -0,0 +1,110 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; + +export interface IERC173Interface extends utils.Interface { + functions: { + "owner()": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] + ): string; + + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + + events: {}; +} + +export interface IERC173 extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: IERC173Interface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + owner(overrides?: CallOverrides): Promise<[string] & { owner_: string }>; + + transferOwnership( + _newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + owner(overrides?: CallOverrides): Promise; + + transferOwnership( + _newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + owner(overrides?: CallOverrides): Promise; + + transferOwnership( + _newOwner: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + owner(overrides?: CallOverrides): Promise; + + transferOwnership( + _newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + owner(overrides?: CallOverrides): Promise; + + transferOwnership( + _newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/typings/LibDiamond.ts b/typings/LibDiamond.ts new file mode 100644 index 00000000..6a96e32d --- /dev/null +++ b/typings/LibDiamond.ts @@ -0,0 +1,103 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { BaseContract, BigNumberish, BytesLike, Signer, utils } from "ethers"; +import { EventFragment } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; + +export type FacetCutStruct = { + facetAddress: string; + action: BigNumberish; + functionSelectors: BytesLike[]; +}; + +export type FacetCutStructOutput = [string, number, string[]] & { + facetAddress: string; + action: number; + functionSelectors: string[]; +}; + +export interface LibDiamondInterface extends utils.Interface { + functions: {}; + + events: { + "DiamondCut(tuple[],address,bytes)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "DiamondCut"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; +} + +export type DiamondCutEvent = TypedEvent< + [FacetCutStructOutput[], string, string], + { _diamondCut: FacetCutStructOutput[]; _init: string; _calldata: string } +>; + +export type DiamondCutEventFilter = TypedEventFilter; + +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + { previousOwner: string; newOwner: string } +>; + +export type OwnershipTransferredEventFilter = + TypedEventFilter; + +export interface LibDiamond extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: LibDiamondInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: {}; + + callStatic: {}; + + filters: { + "DiamondCut(tuple[],address,bytes)"( + _diamondCut?: null, + _init?: null, + _calldata?: null + ): DiamondCutEventFilter; + DiamondCut( + _diamondCut?: null, + _init?: null, + _calldata?: null + ): DiamondCutEventFilter; + + "OwnershipTransferred(address,address)"( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter; + }; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/typings/OwnershipFacet.ts b/typings/OwnershipFacet.ts new file mode 100644 index 00000000..0920c0f4 --- /dev/null +++ b/typings/OwnershipFacet.ts @@ -0,0 +1,110 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + BaseContract, + BigNumber, + BytesLike, + CallOverrides, + ContractTransaction, + Overrides, + PopulatedTransaction, + Signer, + utils, +} from "ethers"; +import { FunctionFragment, Result } from "@ethersproject/abi"; +import { Listener, Provider } from "@ethersproject/providers"; +import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; + +export interface OwnershipFacetInterface extends utils.Interface { + functions: { + "owner()": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] + ): string; + + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + + events: {}; +} + +export interface OwnershipFacet extends BaseContract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + interface: OwnershipFacetInterface; + + queryFilter( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>; + + listeners( + eventFilter?: TypedEventFilter + ): Array>; + listeners(eventName?: string): Array; + removeAllListeners( + eventFilter: TypedEventFilter + ): this; + removeAllListeners(eventName?: string): this; + off: OnEvent; + on: OnEvent; + once: OnEvent; + removeListener: OnEvent; + + functions: { + owner(overrides?: CallOverrides): Promise<[string] & { owner_: string }>; + + transferOwnership( + _newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + owner(overrides?: CallOverrides): Promise; + + transferOwnership( + _newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + owner(overrides?: CallOverrides): Promise; + + transferOwnership( + _newOwner: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + owner(overrides?: CallOverrides): Promise; + + transferOwnership( + _newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + owner(overrides?: CallOverrides): Promise; + + transferOwnership( + _newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/typings/factories/DiamondCutFacet__factory.ts b/typings/factories/DiamondCutFacet__factory.ts new file mode 100644 index 00000000..20e74513 --- /dev/null +++ b/typings/factories/DiamondCutFacet__factory.ts @@ -0,0 +1,143 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + DiamondCutFacet, + DiamondCutFacetInterface, +} from "../DiamondCutFacet"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + components: [ + { + internalType: "address", + name: "facetAddress", + type: "address", + }, + { + internalType: "enum IDiamondCut.FacetCutAction", + name: "action", + type: "uint8", + }, + { + internalType: "bytes4[]", + name: "functionSelectors", + type: "bytes4[]", + }, + ], + indexed: false, + internalType: "struct IDiamondCut.FacetCut[]", + name: "_diamondCut", + type: "tuple[]", + }, + { + indexed: false, + internalType: "address", + name: "_init", + type: "address", + }, + { + indexed: false, + internalType: "bytes", + name: "_calldata", + type: "bytes", + }, + ], + name: "DiamondCut", + type: "event", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "facetAddress", + type: "address", + }, + { + internalType: "enum IDiamondCut.FacetCutAction", + name: "action", + type: "uint8", + }, + { + internalType: "bytes4[]", + name: "functionSelectors", + type: "bytes4[]", + }, + ], + internalType: "struct IDiamondCut.FacetCut[]", + name: "_diamondCut", + type: "tuple[]", + }, + { + internalType: "address", + name: "_init", + type: "address", + }, + { + internalType: "bytes", + name: "_calldata", + type: "bytes", + }, + ], + name: "diamondCut", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b5061298d806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80631f931c1c14610030575b600080fd5b61004a60048036038101906100459190611b35565b61004c565b005b6100546100b6565b6100af8585906100649190612387565b8484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050610151565b5050505050565b6100be610571565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461014f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101469061204e565b60405180910390fd5b565b60005b8351811015610526576000848281518110610198577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156101e0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610219577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156102b6576102b185838151811061025b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106102a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161059e565b610512565b600160028111156102f0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610329577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103c6576103c185838151811061036b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106103b0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161083d565b610511565b6002808111156103ff577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610438577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104d5576104d085838151811061047a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106104bf577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610ae7565b610510565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610507906120ae565b60405180910390fd5b5b5b50808061051e90612412565b915050610154565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161055a93929190611fa7565b60405180910390a161056c8282610c98565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116105e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d99061206e565b60405180910390fd5b60006105ec610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561065e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610655906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156106cc576106cb8285610eab565b5b60005b8351811015610836576000848281518110610713577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610807576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107fe9061212e565b60405180910390fd5b6108138583868a610f86565b838061081e9061245b565b9450505050808061082e90612412565b9150506106cf565b5050505050565b6000815111610881576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108789061206e565b60405180910390fd5b600061088b610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f4906120ce565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff16141561096b5761096a8285610eab565b5b60005b8351811015610ae05760008482815181106109b2577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9d9061214e565b60405180910390fd5b610ab1858284611133565b610abd8583868a610f86565b8380610ac89061245b565b94505050508080610ad890612412565b91505061096e565b5050505050565b6000815111610b2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b229061206e565b60405180910390fd5b6000610b35610571565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610ba6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9d9061216e565b60405180910390fd5b60005b8251811015610c92576000838281518110610bed577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610c7d848284611133565b50508080610c8a90612412565b915050610ba9565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d16576000815114610d11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d089061200e565b60405180910390fd5b610ea7565b6000815111610d5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d51906120ee565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610db057610daf826040518060600160405280602881526020016129356028913961187c565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610dd89190611f90565b600060405180830381855af49150503d8060008114610e13576040519150601f19603f3d011682016040523d82523d6000602084013e610e18565b606091505b509150915081610ea457600081511115610e6957806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e609190611fec565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9b9061202e565b60405180910390fd5b50505b5050565b610ecd8160405180606001604052806024815260200161295d6024913961187c565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161119a9061208e565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611212576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112099061210e565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506112e991906122c0565b90508082146114c95760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018281548110611370577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611412577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611543577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156118755760006001866002018054905061162e91906122c0565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146117bb5760008760020183815481106116be577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611728577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806117f5577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906118c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bf9190611fec565b60405180910390fd5b50505050565b60006118e16118dc846121b3565b61218e565b9050808382526020820190508285602086028201111561190057600080fd5b60005b8581101561193057816119168882611a49565b845260208401935060208301925050600181019050611903565b5050509392505050565b600061194d611948846121df565b61218e565b9050808382526020820190508285602086028201111561196c57600080fd5b60005b858110156119b657813567ffffffffffffffff81111561198e57600080fd5b80860161199b8982611abd565b8552602085019450602084019350505060018101905061196f565b5050509392505050565b6000813590506119cf816128f6565b92915050565b600082601f8301126119e657600080fd5b81356119f68482602086016118ce565b91505092915050565b60008083601f840112611a1157600080fd5b8235905067ffffffffffffffff811115611a2a57600080fd5b602083019150836020820283011115611a4257600080fd5b9250929050565b600081359050611a588161290d565b92915050565b60008083601f840112611a7057600080fd5b8235905067ffffffffffffffff811115611a8957600080fd5b602083019150836001820283011115611aa157600080fd5b9250929050565b600081359050611ab781612924565b92915050565b600060608284031215611acf57600080fd5b611ad9606061218e565b90506000611ae9848285016119c0565b6000830152506020611afd84828501611aa8565b602083015250604082013567ffffffffffffffff811115611b1d57600080fd5b611b29848285016119d5565b60408301525092915050565b600080600080600060608688031215611b4d57600080fd5b600086013567ffffffffffffffff811115611b6757600080fd5b611b73888289016119ff565b95509550506020611b86888289016119c0565b935050604086013567ffffffffffffffff811115611ba357600080fd5b611baf88828901611a5e565b92509250509295509295909350565b6000611bca8383611cdb565b60208301905092915050565b6000611be28383611f40565b905092915050565b611bf3816122f4565b82525050565b611c02816122f4565b82525050565b6000611c138261222b565b611c1d8185612271565b9350611c288361220b565b8060005b83811015611c59578151611c408882611bbe565b9750611c4b83612257565b925050600181019050611c2c565b5085935050505092915050565b6000611c7182612236565b611c7b8185612282565b935083602082028501611c8d8561221b565b8060005b85811015611cc95784840389528151611caa8582611bd6565b9450611cb583612264565b925060208a01995050600181019050611c91565b50829750879550505050505092915050565b611ce481612306565b82525050565b6000611cf582612241565b611cff8185612293565b9350611d0f8185602086016123ae565b611d188161251d565b840191505092915050565b6000611d2e82612241565b611d3881856122a4565b9350611d488185602086016123ae565b80840191505092915050565b611d5d8161239c565b82525050565b6000611d6e8261224c565b611d7881856122af565b9350611d888185602086016123ae565b611d918161251d565b840191505092915050565b6000611da9603c836122af565b9150611db48261252e565b604082019050919050565b6000611dcc6026836122af565b9150611dd78261257d565b604082019050919050565b6000611def6022836122af565b9150611dfa826125cc565b604082019050919050565b6000611e12602b836122af565b9150611e1d8261261b565b604082019050919050565b6000611e356037836122af565b9150611e408261266a565b604082019050919050565b6000611e586027836122af565b9150611e63826126b9565b604082019050919050565b6000611e7b602c836122af565b9150611e8682612708565b604082019050919050565b6000611e9e603d836122af565b9150611ea982612757565b604082019050919050565b6000611ec1602e836122af565b9150611ecc826127a6565b604082019050919050565b6000611ee46035836122af565b9150611eef826127f5565b604082019050919050565b6000611f076038836122af565b9150611f1282612844565b604082019050919050565b6000611f2a6036836122af565b9150611f3582612893565b604082019050919050565b6000606083016000830151611f586000860182611bea565b506020830151611f6b6020860182611d54565b5060408301518482036040860152611f838282611c08565b9150508091505092915050565b6000611f9c8284611d23565b915081905092915050565b60006060820190508181036000830152611fc18186611c66565b9050611fd06020830185611bf9565b8181036040830152611fe28184611cea565b9050949350505050565b600060208201905081810360008301526120068184611d63565b905092915050565b6000602082019050818103600083015261202781611d9c565b9050919050565b6000602082019050818103600083015261204781611dbf565b9050919050565b6000602082019050818103600083015261206781611de2565b9050919050565b6000602082019050818103600083015261208781611e05565b9050919050565b600060208201905081810360008301526120a781611e28565b9050919050565b600060208201905081810360008301526120c781611e4b565b9050919050565b600060208201905081810360008301526120e781611e6e565b9050919050565b6000602082019050818103600083015261210781611e91565b9050919050565b6000602082019050818103600083015261212781611eb4565b9050919050565b6000602082019050818103600083015261214781611ed7565b9050919050565b6000602082019050818103600083015261216781611efa565b9050919050565b6000602082019050818103600083015261218781611f1d565b9050919050565b60006121986121a9565b90506121a482826123e1565b919050565b6000604051905090565b600067ffffffffffffffff8211156121ce576121cd6124ee565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156121fa576121f96124ee565b5b602082029050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b60006122cb82612365565b91506122d683612365565b9250828210156122e9576122e8612490565b5b828203905092915050565b60006122ff82612345565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050612340826128e2565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b600061239436848461193a565b905092915050565b60006123a782612332565b9050919050565b60005b838110156123cc5780820151818401526020810190506123b1565b838111156123db576000848401525b50505050565b6123ea8261251d565b810181811067ffffffffffffffff82111715612409576124086124ee565b5b80604052505050565b600061241d82612365565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156124505761244f612490565b5b600182019050919050565b60006124668261236f565b91506bffffffffffffffffffffffff82141561248557612484612490565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106128f3576128f26124bf565b5b50565b6128ff816122f4565b811461290a57600080fd5b50565b61291681612306565b811461292157600080fd5b50565b6003811061293157600080fd5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a"; + +type DiamondCutFacetConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: DiamondCutFacetConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class DiamondCutFacet__factory extends ContractFactory { + constructor(...args: DiamondCutFacetConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): DiamondCutFacet { + return super.attach(address) as DiamondCutFacet; + } + connect(signer: Signer): DiamondCutFacet__factory { + return super.connect(signer) as DiamondCutFacet__factory; + } + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): DiamondCutFacetInterface { + return new utils.Interface(_abi) as DiamondCutFacetInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): DiamondCutFacet { + return new Contract(address, _abi, signerOrProvider) as DiamondCutFacet; + } +} diff --git a/typings/factories/DiamondLoupeFacet__factory.ts b/typings/factories/DiamondLoupeFacet__factory.ts new file mode 100644 index 00000000..b9498d80 --- /dev/null +++ b/typings/factories/DiamondLoupeFacet__factory.ts @@ -0,0 +1,156 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + DiamondLoupeFacet, + DiamondLoupeFacetInterface, +} from "../DiamondLoupeFacet"; + +const _abi = [ + { + inputs: [ + { + internalType: "bytes4", + name: "_functionSelector", + type: "bytes4", + }, + ], + name: "facetAddress", + outputs: [ + { + internalType: "address", + name: "facetAddress_", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "facetAddresses", + outputs: [ + { + internalType: "address[]", + name: "facetAddresses_", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_facet", + type: "address", + }, + ], + name: "facetFunctionSelectors", + outputs: [ + { + internalType: "bytes4[]", + name: "facetFunctionSelectors_", + type: "bytes4[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "facets", + outputs: [ + { + components: [ + { + internalType: "address", + name: "facetAddress", + type: "address", + }, + { + internalType: "bytes4[]", + name: "functionSelectors", + type: "bytes4[]", + }, + ], + internalType: "struct IDiamondLoupe.Facet[]", + name: "facets_", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "_interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50610c11806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c57806352ef6b2c1461008c5780637a0ed627146100aa578063adfca15e146100c8578063cdffacc6146100f8575b600080fd5b6100766004803603810190610071919061071d565b610128565b6040516100839190610a13565b60405180910390f35b61009461019e565b6040516100a191906109ad565b60405180910390f35b6100b261023b565b6040516100bf91906109f1565b60405180910390f35b6100e260048036038101906100dd91906106f4565b6104f6565b6040516100ef91906109cf565b60405180910390f35b610112600480360381019061010d919061071d565b6105e1565b60405161011f9190610992565b60405180910390f35b60008061013361066d565b9050806003016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff16915050919050565b606060006101aa61066d565b90508060020180548060200260200160405190810160405280929190818152602001828054801561023057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116101e6575b505050505091505090565b6060600061024761066d565b90506000816002018054905090508067ffffffffffffffff811115610295577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156102ce57816020015b6102bb61069a565b8152602001906001900390816102b35790505b50925060005b818110156104f057600083600201828154811061031a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080858381518110610381577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180548060200260200160405190810160405280929190818152602001828054801561048f57602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001906004019060208260030104928301926001038202915080841161043c5790505b50505050508583815181106104cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001819052505080806104e890610b5e565b9150506102d4565b50505090565b6060600061050261066d565b90508060010160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806020026020016040519081016040528092919081815260200182805480156105d457602002820191906000526020600020906000905b82829054906101000a900460e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190600401906020826003010492830192600103820291508084116105815790505b5050505050915050919050565b6000806105ec61066d565b9050806000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b6000813590506106d981610bd6565b92915050565b6000813590506106ee81610bed565b92915050565b60006020828403121561070657600080fd5b6000610714848285016106ca565b91505092915050565b60006020828403121561072f57600080fd5b600061073d848285016106df565b91505092915050565b6000610752838361078a565b60208301905092915050565b600061076a8383610946565b60208301905092915050565b60006107828383610955565b905092915050565b61079381610aea565b82525050565b6107a281610aea565b82525050565b60006107b382610a5e565b6107bd8185610aa6565b93506107c883610a2e565b8060005b838110156107f95781516107e08882610746565b97506107eb83610a7f565b9250506001810190506107cc565b5085935050505092915050565b600061081182610a69565b61081b8185610ab7565b935061082683610a3e565b8060005b8381101561085757815161083e888261075e565b975061084983610a8c565b92505060018101905061082a565b5085935050505092915050565b600061086f82610a69565b6108798185610ac8565b935061088483610a3e565b8060005b838110156108b557815161089c888261075e565b97506108a783610a8c565b925050600181019050610888565b5085935050505092915050565b60006108cd82610a74565b6108d78185610ad9565b9350836020820285016108e985610a4e565b8060005b8581101561092557848403895281516109068582610776565b945061091183610a99565b925060208a019950506001810190506108ed565b50829750879550505050505092915050565b61094081610afc565b82525050565b61094f81610b08565b82525050565b600060408301600083015161096d600086018261078a565b50602083015184820360208601526109858282610806565b9150508091505092915050565b60006020820190506109a76000830184610799565b92915050565b600060208201905081810360008301526109c781846107a8565b905092915050565b600060208201905081810360008301526109e98184610864565b905092915050565b60006020820190508181036000830152610a0b81846108c2565b905092915050565b6000602082019050610a286000830184610937565b92915050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610af582610b34565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610b6982610b54565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610b9c57610b9b610ba7565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b610bdf81610aea565b8114610bea57600080fd5b50565b610bf681610b08565b8114610c0157600080fd5b5056fea164736f6c6343000804000a"; + +type DiamondLoupeFacetConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: DiamondLoupeFacetConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class DiamondLoupeFacet__factory extends ContractFactory { + constructor(...args: DiamondLoupeFacetConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): DiamondLoupeFacet { + return super.attach(address) as DiamondLoupeFacet; + } + connect(signer: Signer): DiamondLoupeFacet__factory { + return super.connect(signer) as DiamondLoupeFacet__factory; + } + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): DiamondLoupeFacetInterface { + return new utils.Interface(_abi) as DiamondLoupeFacetInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): DiamondLoupeFacet { + return new Contract(address, _abi, signerOrProvider) as DiamondLoupeFacet; + } +} diff --git a/typings/factories/Diamond__factory.ts b/typings/factories/Diamond__factory.ts new file mode 100644 index 00000000..c753d8cd --- /dev/null +++ b/typings/factories/Diamond__factory.ts @@ -0,0 +1,100 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { + Signer, + utils, + Contract, + ContractFactory, + PayableOverrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { Diamond, DiamondInterface } from "../Diamond"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_contractOwner", + type: "address", + }, + { + internalType: "address", + name: "_diamondCutFacet", + type: "address", + }, + ], + stateMutability: "payable", + type: "constructor", + }, + { + stateMutability: "payable", + type: "fallback", + }, + { + stateMutability: "payable", + type: "receive", + }, +]; + +const _bytecode = + "0x608060405260405162004fc238038062004fc2833981810160405281019062000029919062001c79565b6200003f82620002ab60201b620001681760201c565b6000600167ffffffffffffffff81111562000083577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015620000c057816020015b620000ac62001bf2565b815260200190600190039081620000a25790505b5090506000600167ffffffffffffffff81111562000107577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015620001365781602001602082028036833780820191505090505b509050631f931c1c60e01b816000815181106200017c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152505060405180606001604052808473ffffffffffffffffffffffffffffffffffffffff168152602001600060028111156200022a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b815260200182815250826000815181106200026e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010181905250620002a1826000604051806020016040528060008152506200038a60201b6200023f1760201c565b5050505062002931565b6000620002bd620007e560201b60201c565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60005b835181101562000790576000848281518110620003d3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156200041c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000456577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b1415620004ff57620004f98583815181106200049b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160000151868481518110620004e1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151604001516200081260201b60201c565b62000779565b600160028111156200053a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000574577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156200061d5762000617858381518110620005b9577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160000151868481518110620005ff577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015162000ada60201b60201c565b62000778565b60028081111562000657577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b81600281111562000691577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156200073a5762000734858381518110620006d6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106200071c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015162000db560201b60201c565b62000777565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200076e90620021e5565b60405180910390fd5b5b5b5080806200078790620024a4565b9150506200038d565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673838383604051620007c693929190620020ee565b60405180910390a1620007e0828262000f8160201b60201c565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b600081511162000859576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200085090620021a1565b60405180910390fd5b60006200086b620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415620008e0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620008d79062002207565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156200095757620009568285620011b060201b60201c565b5b60005b835181101562000ad3576000848281518110620009a0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161462000a97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000a8e906200226d565b60405180910390fd5b62000aab8583868a6200129460201b60201c565b838062000ab890620024f2565b9450505050808062000aca90620024a4565b9150506200095a565b5050505050565b600081511162000b21576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000b1890620021a1565b60405180910390fd5b600062000b33620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141562000ba8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000b9f9062002207565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff16141562000c1f5762000c1e8285620011b060201b60201c565b5b60005b835181101562000dae57600084828151811062000c68577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141562000d5f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000d56906200228f565b60405180910390fd5b62000d728582846200144160201b60201c565b62000d868583868a6200129460201b60201c565b838062000d9390620024f2565b9450505050808062000da590620024a4565b91505062000c22565b5050505050565b600081511162000dfc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000df390620021a1565b60405180910390fd5b600062000e0e620007e560201b60201c565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161462000e82576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000e7990620022b1565b60405180910390fd5b60005b825181101562000f7b57600083828151811062000ecb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905062000f638482846200144160201b60201c565b5050808062000f7290620024a4565b91505062000e85565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156200100457600081511462000ffe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000ff5906200215d565b60405180910390fd5b620011ac565b60008151116200104b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620010429062002229565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614620010ab57620010aa8260405180606001604052806028815260200162004f766028913962001b9d60201b60201c565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051620010d59190620020d5565b600060405180830381855af49150503d806000811462001112576040519150601f19603f3d011682016040523d82523d6000602084013e62001117565b606091505b509150915081620011a9576000815111156200116c57806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162001163919062002139565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620011a0906200217f565b60405180910390fd5b50505b5050565b620011db8160405180606001604052806024815260200162004f9e6024913962001b9d60201b60201c565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620014b4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620014ab90620021c3565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562001526576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200151d906200224b565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000180549050620015ff919062002388565b9050808214620017e25760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001828154811062001688577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000184815481106200172b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054806200185d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff02191690555050600081141562001b96576000600186600201805490506200194b919062002388565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154905081811462001adb576000876002018381548110620019dd577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508088600201838154811062001a48577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b8660020180548062001b16577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b905060008111829062001bec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162001be3919062002139565b60405180910390fd5b50505050565b6040518060600160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000600281111562001c55577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b8152602001606081525090565b60008151905062001c738162002917565b92915050565b6000806040838503121562001c8d57600080fd5b600062001c9d8582860162001c62565b925050602062001cb08582860162001c62565b9150509250929050565b600062001cc8838362001df7565b60208301905092915050565b600062001ce283836200207f565b905092915050565b62001cf581620023c3565b82525050565b62001d0681620023c3565b82525050565b600062001d1982620022f3565b62001d25818562002339565b935062001d3283620022d3565b8060005b8381101562001d6957815162001d4d888262001cba565b975062001d5a836200231f565b92505060018101905062001d36565b5085935050505092915050565b600062001d8382620022fe565b62001d8f81856200234a565b93508360208202850162001da385620022e3565b8060005b8581101562001de5578484038952815162001dc3858262001cd4565b945062001dd0836200232c565b925060208a0199505060018101905062001da7565b50829750879550505050505092915050565b62001e0281620023d7565b82525050565b600062001e158262002309565b62001e2181856200235b565b935062001e338185602086016200246e565b62001e3e816200258a565b840191505092915050565b600062001e568262002309565b62001e6281856200236c565b935062001e748185602086016200246e565b80840191505092915050565b62001e8b816200245a565b82525050565b600062001e9e8262002314565b62001eaa818562002377565b935062001ebc8185602086016200246e565b62001ec7816200258a565b840191505092915050565b600062001ee1603c8362002377565b915062001eee826200259b565b604082019050919050565b600062001f0860268362002377565b915062001f1582620025ea565b604082019050919050565b600062001f2f602b8362002377565b915062001f3c8262002639565b604082019050919050565b600062001f5660378362002377565b915062001f638262002688565b604082019050919050565b600062001f7d60278362002377565b915062001f8a82620026d7565b604082019050919050565b600062001fa4602c8362002377565b915062001fb18262002726565b604082019050919050565b600062001fcb603d8362002377565b915062001fd88262002775565b604082019050919050565b600062001ff2602e8362002377565b915062001fff82620027c4565b604082019050919050565b60006200201960358362002377565b9150620020268262002813565b604082019050919050565b60006200204060388362002377565b91506200204d8262002862565b604082019050919050565b60006200206760368362002377565b91506200207482620028b1565b604082019050919050565b600060608301600083015162002099600086018262001cea565b506020830151620020ae602086018262001e80565b5060408301518482036040860152620020c8828262001d0c565b9150508091505092915050565b6000620020e3828462001e49565b915081905092915050565b600060608201905081810360008301526200210a818662001d76565b90506200211b602083018562001cfb565b81810360408301526200212f818462001e08565b9050949350505050565b6000602082019050818103600083015262002155818462001e91565b905092915050565b60006020820190508181036000830152620021788162001ed2565b9050919050565b600060208201905081810360008301526200219a8162001ef9565b9050919050565b60006020820190508181036000830152620021bc8162001f20565b9050919050565b60006020820190508181036000830152620021de8162001f47565b9050919050565b60006020820190508181036000830152620022008162001f6e565b9050919050565b60006020820190508181036000830152620022228162001f95565b9050919050565b60006020820190508181036000830152620022448162001fbc565b9050919050565b60006020820190508181036000830152620022668162001fe3565b9050919050565b6000602082019050818103600083015262002288816200200a565b9050919050565b60006020820190508181036000830152620022aa8162002031565b9050919050565b60006020820190508181036000830152620022cc8162002058565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000620023958262002438565b9150620023a28362002438565b925082821015620023b857620023b76200252c565b5b828203905092915050565b6000620023d08262002418565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050620024138262002900565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b6000620024678262002403565b9050919050565b60005b838110156200248e57808201518184015260208101905062002471565b838111156200249e576000848401525b50505050565b6000620024b18262002438565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415620024e757620024e66200252c565b5b600182019050919050565b6000620024ff8262002442565b91506bffffffffffffffffffffffff8214156200252157620025206200252c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106200291457620029136200255b565b5b50565b6200292281620023c3565b81146200292e57600080fd5b50565b61263580620029416000396000f3fe60806040523661000b57005b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9050809150600082600001600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610142576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013990611ecc565b60405180910390fd5b3660008037600080366000845af43d6000803e8060008114610163573d6000f35b3d6000fd5b600061017261065f565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60005b8351811015610614576000848281518110610286577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151602001519050600060028111156102ce577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610307577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156103a45761039f858381518110610349577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061038e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161068c565b610600565b600160028111156103de577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610417577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156104b4576104af858381518110610459577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516000015186848151811061049e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516040015161092b565b6105ff565b6002808111156104ed577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b816002811115610526577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156105c3576105be858381518110610568577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151600001518684815181106105ad577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015160400151610bd5565b6105fe565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f590611e8c565b60405180910390fd5b5b5b50808061060c9061214d565b915050610242565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161064893929190611da5565b60405180910390a161065a8282610d86565b505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b60008151116106d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c790611e4c565b60405180910390fd5b60006106da61065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561074c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074390611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff1614156107ba576107b98285610f99565b5b60005b8351811015610924576000848281518110610801577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146108f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ec90611f2c565b60405180910390fd5b6109018583868a611074565b838061090c90612196565b9450505050808061091c9061214d565b9150506107bd565b5050505050565b600081511161096f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096690611e4c565b60405180910390fd5b600061097961065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109e290611eac565b60405180910390fd5b60008160010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018054905090506000816bffffffffffffffffffffffff161415610a5957610a588285610f99565b5b60005b8351811015610bce576000848281518110610aa0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8b90611f4c565b60405180910390fd5b610b9f858284611221565b610bab8583868a611074565b8380610bb690612196565b94505050508080610bc69061214d565b915050610a5c565b5050505050565b6000815111610c19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1090611e4c565b60405180910390fd5b6000610c2361065f565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8b90611f6c565b60405180910390fd5b60005b8251811015610d80576000838281518110610cdb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610d6b848284611221565b50508080610d789061214d565b915050610c97565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e04576000815114610dff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df690611e0c565b60405180910390fd5b610f95565b6000815111610e48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3f90611eec565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610e9e57610e9d826040518060600160405280602881526020016125dd6028913961196a565b5b6000808373ffffffffffffffffffffffffffffffffffffffff1683604051610ec69190611d8e565b600060405180830381855af49150503d8060008114610f01576040519150601f19603f3d011682016040523d82523d6000602084013e610f06565b606091505b509150915081610f9257600081511115610f5757806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4e9190611dea565b60405180910390fd5b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8990611e2c565b60405180910390fd5b50505b5050565b610fbb816040518060600160405280602481526020016126056024913961196a565b81600201805490508260010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555081600201819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b81846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508360010160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018390806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c021790555080846000016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611291576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128890611e6c565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611300576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f790611f0c565b60405180910390fd5b6000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050600060018560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805490506113d79190612041565b90508082146115b75760008560010160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001828154811061145e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050808660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000018481548110611500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c021790555082866000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550505b8460010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001805480611631577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff02191690559055846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff0219169055505060008114156119635760006001866002018054905061171c9190612041565b905060008660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015490508181146118a95760008760020183815481106117ac577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080886002018381548110611816577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818860010160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550505b866002018054806118e3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590558660010160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000905550505b5050505050565b6000823b90506000811182906119b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119ad9190611dea565b60405180910390fd5b50505050565b60006119c88383611ad9565b60208301905092915050565b60006119e08383611d3e565b905092915050565b6119f181612075565b82525050565b611a0081612075565b82525050565b6000611a1182611fac565b611a1b8185611ff2565b9350611a2683611f8c565b8060005b83811015611a57578151611a3e88826119bc565b9750611a4983611fd8565b925050600181019050611a2a565b5085935050505092915050565b6000611a6f82611fb7565b611a798185612003565b935083602082028501611a8b85611f9c565b8060005b85811015611ac75784840389528151611aa885826119d4565b9450611ab383611fe5565b925060208a01995050600181019050611a8f565b50829750879550505050505092915050565b611ae281612087565b82525050565b6000611af382611fc2565b611afd8185612014565b9350611b0d81856020860161211a565b611b1681612229565b840191505092915050565b6000611b2c82611fc2565b611b368185612025565b9350611b4681856020860161211a565b80840191505092915050565b611b5b81612108565b82525050565b6000611b6c82611fcd565b611b768185612030565b9350611b8681856020860161211a565b611b8f81612229565b840191505092915050565b6000611ba7603c83612030565b9150611bb28261223a565b604082019050919050565b6000611bca602683612030565b9150611bd582612289565b604082019050919050565b6000611bed602b83612030565b9150611bf8826122d8565b604082019050919050565b6000611c10603783612030565b9150611c1b82612327565b604082019050919050565b6000611c33602783612030565b9150611c3e82612376565b604082019050919050565b6000611c56602c83612030565b9150611c61826123c5565b604082019050919050565b6000611c79602083612030565b9150611c8482612414565b602082019050919050565b6000611c9c603d83612030565b9150611ca78261243d565b604082019050919050565b6000611cbf602e83612030565b9150611cca8261248c565b604082019050919050565b6000611ce2603583612030565b9150611ced826124db565b604082019050919050565b6000611d05603883612030565b9150611d108261252a565b604082019050919050565b6000611d28603683612030565b9150611d3382612579565b604082019050919050565b6000606083016000830151611d5660008601826119e8565b506020830151611d696020860182611b52565b5060408301518482036040860152611d818282611a06565b9150508091505092915050565b6000611d9a8284611b21565b915081905092915050565b60006060820190508181036000830152611dbf8186611a64565b9050611dce60208301856119f7565b8181036040830152611de08184611ae8565b9050949350505050565b60006020820190508181036000830152611e048184611b61565b905092915050565b60006020820190508181036000830152611e2581611b9a565b9050919050565b60006020820190508181036000830152611e4581611bbd565b9050919050565b60006020820190508181036000830152611e6581611be0565b9050919050565b60006020820190508181036000830152611e8581611c03565b9050919050565b60006020820190508181036000830152611ea581611c26565b9050919050565b60006020820190508181036000830152611ec581611c49565b9050919050565b60006020820190508181036000830152611ee581611c6c565b9050919050565b60006020820190508181036000830152611f0581611c8f565b9050919050565b60006020820190508181036000830152611f2581611cb2565b9050919050565b60006020820190508181036000830152611f4581611cd5565b9050919050565b60006020820190508181036000830152611f6581611cf8565b9050919050565b60006020820190508181036000830152611f8581611d1b565b9050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b600061204c826120e6565b9150612057836120e6565b92508282101561206a576120696121cb565b5b828203905092915050565b6000612080826120c6565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60008190506120c1826125c8565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b6000612113826120b3565b9050919050565b60005b8381101561213857808201518184015260208101905061211d565b83811115612147576000848401525b50505050565b6000612158826120e6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561218b5761218a6121cb565b5b600182019050919050565b60006121a1826120f0565b91506bffffffffffffffffffffffff8214156121c0576121bf6121cb565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6000601f19601f8301169050919050565b7f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860008201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000602082015250565b7f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560008201527f7665727465640000000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660008201527f6163657420746f20637574000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360008201527f74696f6e207468617420646f65736e2774206578697374000000000000000000602082015250565b7f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560008201527f74416374696f6e00000000000000000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260008201527f6520616464726573732830290000000000000000000000000000000000000000602082015250565b7f4469616d6f6e643a2046756e6374696f6e20646f6573206e6f74206578697374600082015250565b7f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460008201527f7920627574205f696e6974206973206e6f742061646472657373283029000000602082015250565b7f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560008201527f7461626c652066756e6374696f6e000000000000000000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60008201527f6e207468617420616c7265616479206578697374730000000000000000000000602082015250565b7f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60008201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000602082015250565b7f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260008201527f657373206d757374206265206164647265737328302900000000000000000000602082015250565b600381106125d9576125d86121fa565b5b5056fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a164736f6c6343000804000a4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465"; + +type DiamondConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: DiamondConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class Diamond__factory extends ContractFactory { + constructor(...args: DiamondConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + deploy( + _contractOwner: string, + _diamondCutFacet: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise { + return super.deploy( + _contractOwner, + _diamondCutFacet, + overrides || {} + ) as Promise; + } + getDeployTransaction( + _contractOwner: string, + _diamondCutFacet: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + _contractOwner, + _diamondCutFacet, + overrides || {} + ); + } + attach(address: string): Diamond { + return super.attach(address) as Diamond; + } + connect(signer: Signer): Diamond__factory { + return super.connect(signer) as Diamond__factory; + } + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): DiamondInterface { + return new utils.Interface(_abi) as DiamondInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Diamond { + return new Contract(address, _abi, signerOrProvider) as Diamond; + } +} diff --git a/typings/factories/IDiamondCut__factory.ts b/typings/factories/IDiamondCut__factory.ts new file mode 100644 index 00000000..03343356 --- /dev/null +++ b/typings/factories/IDiamondCut__factory.ts @@ -0,0 +1,105 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { IDiamondCut, IDiamondCutInterface } from "../IDiamondCut"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + components: [ + { + internalType: "address", + name: "facetAddress", + type: "address", + }, + { + internalType: "enum IDiamondCut.FacetCutAction", + name: "action", + type: "uint8", + }, + { + internalType: "bytes4[]", + name: "functionSelectors", + type: "bytes4[]", + }, + ], + indexed: false, + internalType: "struct IDiamondCut.FacetCut[]", + name: "_diamondCut", + type: "tuple[]", + }, + { + indexed: false, + internalType: "address", + name: "_init", + type: "address", + }, + { + indexed: false, + internalType: "bytes", + name: "_calldata", + type: "bytes", + }, + ], + name: "DiamondCut", + type: "event", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "facetAddress", + type: "address", + }, + { + internalType: "enum IDiamondCut.FacetCutAction", + name: "action", + type: "uint8", + }, + { + internalType: "bytes4[]", + name: "functionSelectors", + type: "bytes4[]", + }, + ], + internalType: "struct IDiamondCut.FacetCut[]", + name: "_diamondCut", + type: "tuple[]", + }, + { + internalType: "address", + name: "_init", + type: "address", + }, + { + internalType: "bytes", + name: "_calldata", + type: "bytes", + }, + ], + name: "diamondCut", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class IDiamondCut__factory { + static readonly abi = _abi; + static createInterface(): IDiamondCutInterface { + return new utils.Interface(_abi) as IDiamondCutInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IDiamondCut { + return new Contract(address, _abi, signerOrProvider) as IDiamondCut; + } +} diff --git a/typings/factories/IDiamondLoupe__factory.ts b/typings/factories/IDiamondLoupe__factory.ts new file mode 100644 index 00000000..7c978b30 --- /dev/null +++ b/typings/factories/IDiamondLoupe__factory.ts @@ -0,0 +1,99 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { IDiamondLoupe, IDiamondLoupeInterface } from "../IDiamondLoupe"; + +const _abi = [ + { + inputs: [ + { + internalType: "bytes4", + name: "_functionSelector", + type: "bytes4", + }, + ], + name: "facetAddress", + outputs: [ + { + internalType: "address", + name: "facetAddress_", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "facetAddresses", + outputs: [ + { + internalType: "address[]", + name: "facetAddresses_", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_facet", + type: "address", + }, + ], + name: "facetFunctionSelectors", + outputs: [ + { + internalType: "bytes4[]", + name: "facetFunctionSelectors_", + type: "bytes4[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "facets", + outputs: [ + { + components: [ + { + internalType: "address", + name: "facetAddress", + type: "address", + }, + { + internalType: "bytes4[]", + name: "functionSelectors", + type: "bytes4[]", + }, + ], + internalType: "struct IDiamondLoupe.Facet[]", + name: "facets_", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +export class IDiamondLoupe__factory { + static readonly abi = _abi; + static createInterface(): IDiamondLoupeInterface { + return new utils.Interface(_abi) as IDiamondLoupeInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IDiamondLoupe { + return new Contract(address, _abi, signerOrProvider) as IDiamondLoupe; + } +} diff --git a/typings/factories/IERC165__factory.ts b/typings/factories/IERC165__factory.ts new file mode 100644 index 00000000..4024177e --- /dev/null +++ b/typings/factories/IERC165__factory.ts @@ -0,0 +1,42 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { IERC165, IERC165Interface } from "../IERC165"; + +const _abi = [ + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +export class IERC165__factory { + static readonly abi = _abi; + static createInterface(): IERC165Interface { + return new utils.Interface(_abi) as IERC165Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC165 { + return new Contract(address, _abi, signerOrProvider) as IERC165; + } +} diff --git a/typings/factories/IERC173__factory.ts b/typings/factories/IERC173__factory.ts new file mode 100644 index 00000000..008d5118 --- /dev/null +++ b/typings/factories/IERC173__factory.ts @@ -0,0 +1,49 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer, utils } from "ethers"; +import { Provider } from "@ethersproject/providers"; +import type { IERC173, IERC173Interface } from "../IERC173"; + +const _abi = [ + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "owner_", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +export class IERC173__factory { + static readonly abi = _abi; + static createInterface(): IERC173Interface { + return new utils.Interface(_abi) as IERC173Interface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC173 { + return new Contract(address, _abi, signerOrProvider) as IERC173; + } +} diff --git a/typings/factories/LibDiamond__factory.ts b/typings/factories/LibDiamond__factory.ts new file mode 100644 index 00000000..e6cff7c5 --- /dev/null +++ b/typings/factories/LibDiamond__factory.ts @@ -0,0 +1,119 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { LibDiamond, LibDiamondInterface } from "../LibDiamond"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + components: [ + { + internalType: "address", + name: "facetAddress", + type: "address", + }, + { + internalType: "enum IDiamondCut.FacetCutAction", + name: "action", + type: "uint8", + }, + { + internalType: "bytes4[]", + name: "functionSelectors", + type: "bytes4[]", + }, + ], + indexed: false, + internalType: "struct IDiamondCut.FacetCut[]", + name: "_diamondCut", + type: "tuple[]", + }, + { + indexed: false, + internalType: "address", + name: "_init", + type: "address", + }, + { + indexed: false, + internalType: "bytes", + name: "_calldata", + type: "bytes", + }, + ], + name: "DiamondCut", + 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", + }, +]; + +const _bytecode = + "0x602d6050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000804000a"; + +type LibDiamondConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: LibDiamondConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class LibDiamond__factory extends ContractFactory { + constructor(...args: LibDiamondConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): LibDiamond { + return super.attach(address) as LibDiamond; + } + connect(signer: Signer): LibDiamond__factory { + return super.connect(signer) as LibDiamond__factory; + } + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): LibDiamondInterface { + return new utils.Interface(_abi) as LibDiamondInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): LibDiamond { + return new Contract(address, _abi, signerOrProvider) as LibDiamond; + } +} diff --git a/typings/factories/OwnershipFacet__factory.ts b/typings/factories/OwnershipFacet__factory.ts new file mode 100644 index 00000000..9d21551c --- /dev/null +++ b/typings/factories/OwnershipFacet__factory.ts @@ -0,0 +1,87 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; +import type { + OwnershipFacet, + OwnershipFacetInterface, +} from "../OwnershipFacet"; + +const _abi = [ + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "owner_", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b506103cb806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80638da5cb5b1461003b578063f2fde38b14610059575b600080fd5b610043610075565b60405161005091906102da565b60405180910390f35b610073600480360381019061006e919061027f565b610084565b005b600061007f610098565b905090565b61008c6100cb565b61009581610166565b50565b60006100a261023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6100d361023d565b60040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610164576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015b906102f5565b60405180910390fd5b565b600061017061023d565b905060008160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b600081359050610279816103a7565b92915050565b60006020828403121561029157600080fd5b600061029f8482850161026a565b91505092915050565b6102b181610326565b82525050565b60006102c4602283610315565b91506102cf82610358565b604082019050919050565b60006020820190506102ef60008301846102a8565b92915050565b6000602082019050818103600083015261030e816102b7565b9050919050565b600082825260208201905092915050565b600061033182610338565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b7f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60008201527f6572000000000000000000000000000000000000000000000000000000000000602082015250565b6103b081610326565b81146103bb57600080fd5b5056fea164736f6c6343000804000a"; + +type OwnershipFacetConstructorParams = + | [signer?: Signer] + | ConstructorParameters; + +const isSuperArgs = ( + xs: OwnershipFacetConstructorParams +): xs is ConstructorParameters => xs.length > 1; + +export class OwnershipFacet__factory extends ContractFactory { + constructor(...args: OwnershipFacetConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): OwnershipFacet { + return super.attach(address) as OwnershipFacet; + } + connect(signer: Signer): OwnershipFacet__factory { + return super.connect(signer) as OwnershipFacet__factory; + } + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): OwnershipFacetInterface { + return new utils.Interface(_abi) as OwnershipFacetInterface; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): OwnershipFacet { + return new Contract(address, _abi, signerOrProvider) as OwnershipFacet; + } +} diff --git a/typings/index.ts b/typings/index.ts index 6abfc748..62e629bf 100644 --- a/typings/index.ts +++ b/typings/index.ts @@ -4,6 +4,15 @@ export type { IERC20 } from "./IERC20"; export type { ISuperAgreement } from "./ISuperAgreement"; export type { ISuperfluidToken } from "./ISuperfluidToken"; +export type { Diamond } from "./Diamond"; +export type { DiamondCutFacet } from "./DiamondCutFacet"; +export type { DiamondLoupeFacet } from "./DiamondLoupeFacet"; +export type { OwnershipFacet } from "./OwnershipFacet"; +export type { IDiamondCut } from "./IDiamondCut"; +export type { IDiamondLoupe } from "./IDiamondLoupe"; +export type { IERC165 } from "./IERC165"; +export type { IERC173 } from "./IERC173"; +export type { LibDiamond } from "./LibDiamond"; export type { Controlled } from "./Controlled"; export type { Guarded } from "./Guarded"; export type { GuardedMock } from "./GuardedMock"; @@ -41,6 +50,15 @@ export type { WrappedWeiToken } from "./WrappedWeiToken"; export { IERC20__factory } from "./factories/IERC20__factory"; export { ISuperAgreement__factory } from "./factories/ISuperAgreement__factory"; export { ISuperfluidToken__factory } from "./factories/ISuperfluidToken__factory"; +export { Diamond__factory } from "./factories/Diamond__factory"; +export { DiamondCutFacet__factory } from "./factories/DiamondCutFacet__factory"; +export { DiamondLoupeFacet__factory } from "./factories/DiamondLoupeFacet__factory"; +export { OwnershipFacet__factory } from "./factories/OwnershipFacet__factory"; +export { IDiamondCut__factory } from "./factories/IDiamondCut__factory"; +export { IDiamondLoupe__factory } from "./factories/IDiamondLoupe__factory"; +export { IERC165__factory } from "./factories/IERC165__factory"; +export { IERC173__factory } from "./factories/IERC173__factory"; +export { LibDiamond__factory } from "./factories/LibDiamond__factory"; export { Controlled__factory } from "./factories/Controlled__factory"; export { Guarded__factory } from "./factories/Guarded__factory"; export { GuardedMock__factory } from "./factories/GuardedMock__factory"; diff --git a/utils/diamond.ts b/utils/diamond.ts new file mode 100644 index 00000000..0ff41358 --- /dev/null +++ b/utils/diamond.ts @@ -0,0 +1,191 @@ +import { constants, Contract } from 'ethers' +import { Fragment, FunctionFragment } from 'ethers/lib/utils' +import { ethers } from 'hardhat' +import { IDiamondCut, IDiamondLoupe } from '../typings' + +export function getSelectors(contract: Contract): string[] { + const selectors = contract.interface.fragments.reduce( + (acc: string[], val: Fragment) => { + if (val.type === 'function') { + const sig = contract.interface.getSighash(val as FunctionFragment) + acc.push(sig) + return acc + } else { + return acc + } + }, + [] + ) + return selectors +} + +export const FacetCutAction = { + Add: 0, + Replace: 1, + Remove: 2, +} + +export async function addOrReplaceFacets( + facets: Contract[], + diamondAddress: string, + initContract: string = constants.AddressZero, + initData = '0x' +): Promise { + const loupe = ( + await ethers.getContractAt('IDiamondLoupe', diamondAddress) + ) + + const cut = [] + for (const f of facets) { + const replaceSelectors = [] + const addSelectors = [] + + const selectors = getSelectors(f) + + for (const s of selectors) { + const addr = await loupe.facetAddress(s) + + if (addr === constants.AddressZero) { + addSelectors.push(s) + continue + } + + if (addr.toLowerCase() !== f.address.toLowerCase()) { + replaceSelectors.push(s) + } + } + + if (replaceSelectors.length) { + cut.push({ + facetAddress: f.address, + action: FacetCutAction.Replace, + functionSelectors: replaceSelectors, + }) + } + if (addSelectors.length) { + cut.push({ + facetAddress: f.address, + action: FacetCutAction.Add, + functionSelectors: addSelectors, + }) + } + } + + if (!cut.length) { + console.log('No facets to add or replace.') + return + } + + const cutter = ( + await ethers.getContractAt('IDiamondCut', diamondAddress) + ) + + console.log('Adding/Replacing facets...') + const tx = await cutter.diamondCut(cut, initContract, initData, { + // gasLimit: 800000, + }) + console.log('Diamond cut tx: ', tx.hash) + const receipt = await tx.wait() + if (!receipt.status) { + throw Error(`Diamond upgrade failed: ${tx.hash}`) + } + console.log('Done.') +} + +export async function addFacets( + facets: Contract[], + diamondAddress: string, + initContract: string = constants.AddressZero, + initData = '0x' +): Promise { + const cut = [] + for (const f of facets) { + const selectors = getSelectors(f) + + cut.push({ + facetAddress: f.address, + action: FacetCutAction.Add, + functionSelectors: selectors, + }) + } + + if (!cut.length) { + console.log('No facets to add or replace.') + return + } + + const cutter = ( + await ethers.getContractAt('IDiamondCut', diamondAddress) + ) + + console.log('Adding facets...') + const tx = await cutter.diamondCut(cut, initContract, initData, { + // gasLimit: 800000, + }) + console.log('Diamond cut tx: ', tx.hash) + const receipt = await tx.wait() + if (!receipt.status) { + throw Error(`Diamond upgrade failed: ${tx.hash}`) + } + console.log('Done.') +} + +export async function removeFacet( + selectors: string[], + diamondAddress: string +): Promise { + const cut = [ + { + facetAddress: constants.AddressZero, + action: FacetCutAction.Remove, + functionSelectors: selectors, + }, + ] + + const cutter = ( + await ethers.getContractAt('IDiamondCut', diamondAddress) + ) + + console.log('Removing facet...') + const tx = await cutter.diamondCut(cut, constants.AddressZero, '0x', { + // gasLimit: 800000, + }) + console.log('Diamond cut tx: ', tx.hash) + const receipt = await tx.wait() + if (!receipt.status) { + throw Error(`Diamond upgrade failed: ${tx.hash}`) + } + console.log('Done.') +} + +export async function replaceFacet( + facet: Contract, + diamondAddress: string, + initContract: string = constants.AddressZero, + initData = '0x' +): Promise { + const selectors = getSelectors(facet) + + const cut = [ + { + facetAddress: facet.address, + action: FacetCutAction.Replace, + functionSelectors: selectors, + }, + ] + + const cutter = ( + await ethers.getContractAt('IDiamondCut', diamondAddress) + ) + + console.log('Replacing facet...') + const tx = await cutter.diamondCut(cut, initContract, initData, { + // gasLimit: 800000, + }) + console.log('Diamond cut tx: ', tx.hash) + const receipt = await tx.wait() + if (!receipt.status) { + throw Error(`Diamond upgrade failed: ${tx.hash}`) + } + console.log('Done.') +}