@requestnetwork/smart-contracts 0.28.1-next.1686 → 0.28.1-next.1691
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -4
- package/dist/hardhat.config.d.ts +7 -0
- package/dist/hardhat.config.d.ts.map +1 -1
- package/dist/hardhat.config.js +52 -4
- package/dist/hardhat.config.js.map +1 -1
- package/dist/scripts/conversion-proxy.d.ts.map +1 -1
- package/dist/scripts/conversion-proxy.js +6 -1
- package/dist/scripts/conversion-proxy.js.map +1 -1
- package/dist/scripts/deploy-payments.d.ts +2 -2
- package/dist/scripts/deploy-payments.d.ts.map +1 -1
- package/dist/scripts/deploy-payments.js +71 -52
- package/dist/scripts/deploy-payments.js.map +1 -1
- package/dist/scripts/utils.d.ts.map +1 -1
- package/dist/scripts/utils.js +7 -5
- package/dist/scripts/utils.js.map +1 -1
- package/dist/scripts-create2/check-deployer.d.ts +3 -0
- package/dist/scripts-create2/check-deployer.d.ts.map +1 -0
- package/dist/scripts-create2/check-deployer.js +33 -0
- package/dist/scripts-create2/check-deployer.js.map +1 -0
- package/dist/scripts-create2/compute-one-address.d.ts +4 -0
- package/dist/scripts-create2/compute-one-address.d.ts.map +1 -0
- package/dist/scripts-create2/compute-one-address.js +59 -0
- package/dist/scripts-create2/compute-one-address.js.map +1 -0
- package/dist/scripts-create2/constructor-args.d.ts +2 -0
- package/dist/scripts-create2/constructor-args.d.ts.map +1 -0
- package/dist/scripts-create2/constructor-args.js +21 -0
- package/dist/scripts-create2/constructor-args.js.map +1 -0
- package/dist/scripts-create2/deploy-one.d.ts +5 -0
- package/dist/scripts-create2/deploy-one.d.ts.map +1 -0
- package/dist/scripts-create2/deploy-one.js +56 -0
- package/dist/scripts-create2/deploy-one.js.map +1 -0
- package/dist/scripts-create2/deploy-request-deployer.d.ts +3 -0
- package/dist/scripts-create2/deploy-request-deployer.d.ts.map +1 -0
- package/dist/scripts-create2/deploy-request-deployer.js +28 -0
- package/dist/scripts-create2/deploy-request-deployer.js.map +1 -0
- package/dist/scripts-create2/types.d.ts +25 -0
- package/dist/scripts-create2/types.d.ts.map +1 -0
- package/dist/scripts-create2/types.js +3 -0
- package/dist/scripts-create2/types.js.map +1 -0
- package/dist/scripts-create2/utils.d.ts +20 -0
- package/dist/scripts-create2/utils.d.ts.map +1 -0
- package/dist/scripts-create2/utils.js +59 -0
- package/dist/scripts-create2/utils.js.map +1 -0
- package/dist/scripts-create2/verify-one.d.ts +5 -0
- package/dist/scripts-create2/verify-one.d.ts.map +1 -0
- package/dist/scripts-create2/verify-one.js +46 -0
- package/dist/scripts-create2/verify-one.js.map +1 -0
- package/dist/scripts-create2/xdeployer.d.ts +3 -0
- package/dist/scripts-create2/xdeployer.d.ts.map +1 -0
- package/dist/scripts-create2/xdeployer.js +77 -0
- package/dist/scripts-create2/xdeployer.js.map +1 -0
- package/dist/src/lib/artifacts/ChainlinkConversionPath/index.d.ts.map +1 -1
- package/dist/src/lib/artifacts/ChainlinkConversionPath/index.js +9 -0
- package/dist/src/lib/artifacts/ChainlinkConversionPath/index.js.map +1 -1
- package/dist/src/lib/artifacts/Erc20ConversionProxy/0.1.2.json +257 -0
- package/dist/src/lib/artifacts/Erc20ConversionProxy/index.d.ts.map +1 -1
- package/dist/src/lib/artifacts/Erc20ConversionProxy/index.js +33 -4
- package/dist/src/lib/artifacts/Erc20ConversionProxy/index.js.map +1 -1
- package/dist/src/lib/artifacts/EthConversionProxy/index.d.ts.map +1 -1
- package/dist/src/lib/artifacts/EthConversionProxy/index.js +4 -5
- package/dist/src/lib/artifacts/EthConversionProxy/index.js.map +1 -1
- package/dist/src/lib/artifacts/EthereumFeeProxy/index.d.ts.map +1 -1
- package/dist/src/lib/artifacts/EthereumFeeProxy/index.js +50 -1
- package/dist/src/lib/artifacts/EthereumFeeProxy/index.js.map +1 -1
- package/dist/src/lib/artifacts/EthereumProxy/index.d.ts.map +1 -1
- package/dist/src/lib/artifacts/EthereumProxy/index.js +50 -1
- package/dist/src/lib/artifacts/EthereumProxy/index.js.map +1 -1
- package/dist/src/lib/artifacts/RequestDeployer/0.1.0.json +220 -0
- package/dist/src/lib/artifacts/RequestDeployer/index.d.ts +4 -0
- package/dist/src/lib/artifacts/RequestDeployer/index.d.ts.map +1 -0
- package/dist/src/lib/artifacts/RequestDeployer/index.js +61 -0
- package/dist/src/lib/artifacts/RequestDeployer/index.js.map +1 -0
- package/dist/src/lib/artifacts/index.d.ts +1 -0
- package/dist/src/lib/artifacts/index.d.ts.map +1 -1
- package/dist/src/lib/artifacts/index.js +1 -0
- package/dist/src/lib/artifacts/index.js.map +1 -1
- package/dist/src/types/ERC1820Implementer.d.ts +121 -0
- package/dist/src/types/IERC1820Implementer.d.ts +121 -0
- package/dist/src/types/Pausable.d.ts +7 -134
- package/dist/src/types/RequestDeployer.d.ts +429 -0
- package/dist/src/types/factories/AggregatorMock__factory.d.ts +1 -1
- package/dist/src/types/factories/AggregatorMock__factory.d.ts.map +1 -1
- package/dist/src/types/factories/AggregatorMock__factory.js +1 -1
- package/dist/src/types/factories/AggregatorMock__factory.js.map +1 -1
- package/dist/src/types/factories/BadERC20__factory.d.ts +1 -1
- package/dist/src/types/factories/BadERC20__factory.d.ts.map +1 -1
- package/dist/src/types/factories/BadERC20__factory.js +1 -1
- package/dist/src/types/factories/BadERC20__factory.js.map +1 -1
- package/dist/src/types/factories/BytesUtilsMock__factory.d.ts +1 -1
- package/dist/src/types/factories/BytesUtilsMock__factory.d.ts.map +1 -1
- package/dist/src/types/factories/BytesUtilsMock__factory.js +1 -1
- package/dist/src/types/factories/BytesUtilsMock__factory.js.map +1 -1
- package/dist/src/types/factories/ChainlinkConversionPath__factory.d.ts +1 -1
- package/dist/src/types/factories/ChainlinkConversionPath__factory.d.ts.map +1 -1
- package/dist/src/types/factories/ChainlinkConversionPath__factory.js +1 -1
- package/dist/src/types/factories/ChainlinkConversionPath__factory.js.map +1 -1
- package/dist/src/types/factories/ERC1820Implementer__factory.d.ts +33 -0
- package/dist/src/types/factories/ERC1820Implementer__factory.d.ts.map +1 -0
- package/dist/src/types/factories/ERC1820Implementer__factory.js +61 -0
- package/dist/src/types/factories/ERC1820Implementer__factory.js.map +1 -0
- package/dist/src/types/factories/ERC20Alpha__factory.d.ts +1 -1
- package/dist/src/types/factories/ERC20Alpha__factory.d.ts.map +1 -1
- package/dist/src/types/factories/ERC20Alpha__factory.js +1 -1
- package/dist/src/types/factories/ERC20Alpha__factory.js.map +1 -1
- package/dist/src/types/factories/ERC20EscrowToPay__factory.d.ts +1 -1
- package/dist/src/types/factories/ERC20EscrowToPay__factory.d.ts.map +1 -1
- package/dist/src/types/factories/ERC20EscrowToPay__factory.js +1 -1
- package/dist/src/types/factories/ERC20EscrowToPay__factory.js.map +1 -1
- package/dist/src/types/factories/ERC20False__factory.d.ts +1 -1
- package/dist/src/types/factories/ERC20False__factory.d.ts.map +1 -1
- package/dist/src/types/factories/ERC20False__factory.js +1 -1
- package/dist/src/types/factories/ERC20False__factory.js.map +1 -1
- package/dist/src/types/factories/ERC20FeeProxy__factory.d.ts +1 -1
- package/dist/src/types/factories/ERC20FeeProxy__factory.d.ts.map +1 -1
- package/dist/src/types/factories/ERC20FeeProxy__factory.js +1 -1
- package/dist/src/types/factories/ERC20FeeProxy__factory.js.map +1 -1
- package/dist/src/types/factories/ERC20NoReturn__factory.d.ts +1 -1
- package/dist/src/types/factories/ERC20NoReturn__factory.d.ts.map +1 -1
- package/dist/src/types/factories/ERC20NoReturn__factory.js +1 -1
- package/dist/src/types/factories/ERC20NoReturn__factory.js.map +1 -1
- package/dist/src/types/factories/ERC20Proxy__factory.d.ts +1 -1
- package/dist/src/types/factories/ERC20Proxy__factory.d.ts.map +1 -1
- package/dist/src/types/factories/ERC20Proxy__factory.js +1 -1
- package/dist/src/types/factories/ERC20Proxy__factory.js.map +1 -1
- package/dist/src/types/factories/ERC20Revert__factory.d.ts +1 -1
- package/dist/src/types/factories/ERC20Revert__factory.d.ts.map +1 -1
- package/dist/src/types/factories/ERC20Revert__factory.js +1 -1
- package/dist/src/types/factories/ERC20Revert__factory.js.map +1 -1
- package/dist/src/types/factories/ERC20SwapToConversion__factory.d.ts +1 -1
- package/dist/src/types/factories/ERC20SwapToConversion__factory.d.ts.map +1 -1
- package/dist/src/types/factories/ERC20SwapToConversion__factory.js +1 -1
- package/dist/src/types/factories/ERC20SwapToConversion__factory.js.map +1 -1
- package/dist/src/types/factories/ERC20SwapToPay__factory.d.ts +1 -1
- package/dist/src/types/factories/ERC20SwapToPay__factory.d.ts.map +1 -1
- package/dist/src/types/factories/ERC20SwapToPay__factory.js +1 -1
- package/dist/src/types/factories/ERC20SwapToPay__factory.js.map +1 -1
- package/dist/src/types/factories/ERC20True__factory.d.ts +1 -1
- package/dist/src/types/factories/ERC20True__factory.d.ts.map +1 -1
- package/dist/src/types/factories/ERC20True__factory.js +1 -1
- package/dist/src/types/factories/ERC20True__factory.js.map +1 -1
- package/dist/src/types/factories/Erc20ConversionProxy__factory.d.ts +3 -3
- package/dist/src/types/factories/Erc20ConversionProxy__factory.d.ts.map +1 -1
- package/dist/src/types/factories/Erc20ConversionProxy__factory.js +10 -5
- package/dist/src/types/factories/Erc20ConversionProxy__factory.js.map +1 -1
- package/dist/src/types/factories/EthConversionProxy__factory.d.ts +1 -1
- package/dist/src/types/factories/EthConversionProxy__factory.d.ts.map +1 -1
- package/dist/src/types/factories/EthConversionProxy__factory.js +1 -1
- package/dist/src/types/factories/EthConversionProxy__factory.js.map +1 -1
- package/dist/src/types/factories/EtherPaymentFallback__factory.d.ts +1 -1
- package/dist/src/types/factories/EtherPaymentFallback__factory.js +1 -1
- package/dist/src/types/factories/EthereumFeeProxy__factory.d.ts +1 -1
- package/dist/src/types/factories/EthereumFeeProxy__factory.d.ts.map +1 -1
- package/dist/src/types/factories/EthereumFeeProxy__factory.js +1 -1
- package/dist/src/types/factories/EthereumFeeProxy__factory.js.map +1 -1
- package/dist/src/types/factories/EthereumProxy__factory.d.ts +1 -1
- package/dist/src/types/factories/EthereumProxy__factory.d.ts.map +1 -1
- package/dist/src/types/factories/EthereumProxy__factory.js +1 -1
- package/dist/src/types/factories/EthereumProxy__factory.js.map +1 -1
- package/dist/src/types/factories/FakeSwapRouter__factory.d.ts +1 -1
- package/dist/src/types/factories/FakeSwapRouter__factory.d.ts.map +1 -1
- package/dist/src/types/factories/FakeSwapRouter__factory.js +1 -1
- package/dist/src/types/factories/FakeSwapRouter__factory.js.map +1 -1
- package/dist/src/types/factories/GnosisSafeProxy__factory.d.ts +1 -1
- package/dist/src/types/factories/GnosisSafeProxy__factory.d.ts.map +1 -1
- package/dist/src/types/factories/GnosisSafeProxy__factory.js +1 -1
- package/dist/src/types/factories/GnosisSafeProxy__factory.js.map +1 -1
- package/dist/src/types/factories/IERC1820Implementer__factory.d.ts +23 -0
- package/dist/src/types/factories/IERC1820Implementer__factory.d.ts.map +1 -0
- package/dist/src/types/factories/IERC1820Implementer__factory.js +44 -0
- package/dist/src/types/factories/IERC1820Implementer__factory.js.map +1 -0
- package/dist/src/types/factories/Migrations__factory.d.ts +1 -1
- package/dist/src/types/factories/Migrations__factory.d.ts.map +1 -1
- package/dist/src/types/factories/Migrations__factory.js +1 -1
- package/dist/src/types/factories/Migrations__factory.js.map +1 -1
- package/dist/src/types/factories/Pausable__factory.d.ts +3 -24
- package/dist/src/types/factories/Pausable__factory.d.ts.map +1 -1
- package/dist/src/types/factories/Pausable__factory.js +9 -78
- package/dist/src/types/factories/Pausable__factory.js.map +1 -1
- package/dist/src/types/factories/RequestDeployer__factory.d.ts +53 -0
- package/dist/src/types/factories/RequestDeployer__factory.d.ts.map +1 -0
- package/dist/src/types/factories/RequestDeployer__factory.js +253 -0
- package/dist/src/types/factories/RequestDeployer__factory.js.map +1 -0
- package/dist/src/types/factories/RequestHashStorage__factory.d.ts +1 -1
- package/dist/src/types/factories/RequestHashStorage__factory.d.ts.map +1 -1
- package/dist/src/types/factories/RequestHashStorage__factory.js +1 -1
- package/dist/src/types/factories/RequestHashStorage__factory.js.map +1 -1
- package/dist/src/types/factories/RequestOpenHashSubmitter__factory.d.ts +1 -1
- package/dist/src/types/factories/RequestOpenHashSubmitter__factory.d.ts.map +1 -1
- package/dist/src/types/factories/RequestOpenHashSubmitter__factory.js +1 -1
- package/dist/src/types/factories/RequestOpenHashSubmitter__factory.js.map +1 -1
- package/dist/src/types/factories/StorageFeeCollector__factory.d.ts +1 -1
- package/dist/src/types/factories/StorageFeeCollector__factory.d.ts.map +1 -1
- package/dist/src/types/factories/StorageFeeCollector__factory.js +1 -1
- package/dist/src/types/factories/StorageFeeCollector__factory.js.map +1 -1
- package/dist/src/types/factories/TestERC20__factory.d.ts +1 -1
- package/dist/src/types/factories/TestERC20__factory.d.ts.map +1 -1
- package/dist/src/types/factories/TestERC20__factory.js +1 -1
- package/dist/src/types/factories/TestERC20__factory.js.map +1 -1
- package/dist/src/types/factories/UsdtFake__factory.d.ts +1 -1
- package/dist/src/types/factories/UsdtFake__factory.js +1 -1
- package/dist/src/types/hardhat.d.ts +16 -0
- package/dist/src/types/index.d.ts +8 -2
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/index.js +9 -3
- package/dist/src/types/index.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/types/ERC1820Implementer.d.ts +121 -0
- package/types/IERC1820Implementer.d.ts +121 -0
- package/types/Pausable.d.ts +7 -134
- package/types/RequestDeployer.d.ts +429 -0
- package/types/factories/AggregatorMock__factory.d.ts +1 -1
- package/types/factories/AggregatorMock__factory.d.ts.map +1 -1
- package/types/factories/AggregatorMock__factory.js +1 -1
- package/types/factories/AggregatorMock__factory.js.map +1 -1
- package/types/factories/BadERC20__factory.d.ts +1 -1
- package/types/factories/BadERC20__factory.d.ts.map +1 -1
- package/types/factories/BadERC20__factory.js +1 -1
- package/types/factories/BadERC20__factory.js.map +1 -1
- package/types/factories/BytesUtilsMock__factory.d.ts +1 -1
- package/types/factories/BytesUtilsMock__factory.d.ts.map +1 -1
- package/types/factories/BytesUtilsMock__factory.js +1 -1
- package/types/factories/BytesUtilsMock__factory.js.map +1 -1
- package/types/factories/ChainlinkConversionPath__factory.d.ts +1 -1
- package/types/factories/ChainlinkConversionPath__factory.d.ts.map +1 -1
- package/types/factories/ChainlinkConversionPath__factory.js +1 -1
- package/types/factories/ChainlinkConversionPath__factory.js.map +1 -1
- package/types/factories/ERC1820Implementer__factory.d.ts +33 -0
- package/types/factories/ERC1820Implementer__factory.d.ts.map +1 -0
- package/types/factories/ERC1820Implementer__factory.js +61 -0
- package/types/factories/ERC1820Implementer__factory.js.map +1 -0
- package/types/factories/ERC20Alpha__factory.d.ts +1 -1
- package/types/factories/ERC20Alpha__factory.d.ts.map +1 -1
- package/types/factories/ERC20Alpha__factory.js +1 -1
- package/types/factories/ERC20Alpha__factory.js.map +1 -1
- package/types/factories/ERC20EscrowToPay__factory.d.ts +1 -1
- package/types/factories/ERC20EscrowToPay__factory.d.ts.map +1 -1
- package/types/factories/ERC20EscrowToPay__factory.js +1 -1
- package/types/factories/ERC20EscrowToPay__factory.js.map +1 -1
- package/types/factories/ERC20False__factory.d.ts +1 -1
- package/types/factories/ERC20False__factory.d.ts.map +1 -1
- package/types/factories/ERC20False__factory.js +1 -1
- package/types/factories/ERC20False__factory.js.map +1 -1
- package/types/factories/ERC20FeeProxy__factory.d.ts +1 -1
- package/types/factories/ERC20FeeProxy__factory.d.ts.map +1 -1
- package/types/factories/ERC20FeeProxy__factory.js +1 -1
- package/types/factories/ERC20FeeProxy__factory.js.map +1 -1
- package/types/factories/ERC20NoReturn__factory.d.ts +1 -1
- package/types/factories/ERC20NoReturn__factory.d.ts.map +1 -1
- package/types/factories/ERC20NoReturn__factory.js +1 -1
- package/types/factories/ERC20NoReturn__factory.js.map +1 -1
- package/types/factories/ERC20Proxy__factory.d.ts +1 -1
- package/types/factories/ERC20Proxy__factory.d.ts.map +1 -1
- package/types/factories/ERC20Proxy__factory.js +1 -1
- package/types/factories/ERC20Proxy__factory.js.map +1 -1
- package/types/factories/ERC20Revert__factory.d.ts +1 -1
- package/types/factories/ERC20Revert__factory.d.ts.map +1 -1
- package/types/factories/ERC20Revert__factory.js +1 -1
- package/types/factories/ERC20Revert__factory.js.map +1 -1
- package/types/factories/ERC20SwapToConversion__factory.d.ts +1 -1
- package/types/factories/ERC20SwapToConversion__factory.d.ts.map +1 -1
- package/types/factories/ERC20SwapToConversion__factory.js +1 -1
- package/types/factories/ERC20SwapToConversion__factory.js.map +1 -1
- package/types/factories/ERC20SwapToPay__factory.d.ts +1 -1
- package/types/factories/ERC20SwapToPay__factory.d.ts.map +1 -1
- package/types/factories/ERC20SwapToPay__factory.js +1 -1
- package/types/factories/ERC20SwapToPay__factory.js.map +1 -1
- package/types/factories/ERC20True__factory.d.ts +1 -1
- package/types/factories/ERC20True__factory.d.ts.map +1 -1
- package/types/factories/ERC20True__factory.js +1 -1
- package/types/factories/ERC20True__factory.js.map +1 -1
- package/types/factories/Erc20ConversionProxy__factory.d.ts +3 -3
- package/types/factories/Erc20ConversionProxy__factory.d.ts.map +1 -1
- package/types/factories/Erc20ConversionProxy__factory.js +10 -5
- package/types/factories/Erc20ConversionProxy__factory.js.map +1 -1
- package/types/factories/EthConversionProxy__factory.d.ts +1 -1
- package/types/factories/EthConversionProxy__factory.d.ts.map +1 -1
- package/types/factories/EthConversionProxy__factory.js +1 -1
- package/types/factories/EthConversionProxy__factory.js.map +1 -1
- package/types/factories/EtherPaymentFallback__factory.d.ts +1 -1
- package/types/factories/EtherPaymentFallback__factory.js +1 -1
- package/types/factories/EthereumFeeProxy__factory.d.ts +1 -1
- package/types/factories/EthereumFeeProxy__factory.d.ts.map +1 -1
- package/types/factories/EthereumFeeProxy__factory.js +1 -1
- package/types/factories/EthereumFeeProxy__factory.js.map +1 -1
- package/types/factories/EthereumProxy__factory.d.ts +1 -1
- package/types/factories/EthereumProxy__factory.d.ts.map +1 -1
- package/types/factories/EthereumProxy__factory.js +1 -1
- package/types/factories/EthereumProxy__factory.js.map +1 -1
- package/types/factories/FakeSwapRouter__factory.d.ts +1 -1
- package/types/factories/FakeSwapRouter__factory.d.ts.map +1 -1
- package/types/factories/FakeSwapRouter__factory.js +1 -1
- package/types/factories/FakeSwapRouter__factory.js.map +1 -1
- package/types/factories/GnosisSafeProxy__factory.d.ts +1 -1
- package/types/factories/GnosisSafeProxy__factory.d.ts.map +1 -1
- package/types/factories/GnosisSafeProxy__factory.js +1 -1
- package/types/factories/GnosisSafeProxy__factory.js.map +1 -1
- package/types/factories/IERC1820Implementer__factory.d.ts +23 -0
- package/types/factories/IERC1820Implementer__factory.d.ts.map +1 -0
- package/types/factories/IERC1820Implementer__factory.js +44 -0
- package/types/factories/IERC1820Implementer__factory.js.map +1 -0
- package/types/factories/Migrations__factory.d.ts +1 -1
- package/types/factories/Migrations__factory.d.ts.map +1 -1
- package/types/factories/Migrations__factory.js +1 -1
- package/types/factories/Migrations__factory.js.map +1 -1
- package/types/factories/Pausable__factory.d.ts +3 -24
- package/types/factories/Pausable__factory.d.ts.map +1 -1
- package/types/factories/Pausable__factory.js +9 -78
- package/types/factories/Pausable__factory.js.map +1 -1
- package/types/factories/RequestDeployer__factory.d.ts +53 -0
- package/types/factories/RequestDeployer__factory.d.ts.map +1 -0
- package/types/factories/RequestDeployer__factory.js +253 -0
- package/types/factories/RequestDeployer__factory.js.map +1 -0
- package/types/factories/RequestHashStorage__factory.d.ts +1 -1
- package/types/factories/RequestHashStorage__factory.d.ts.map +1 -1
- package/types/factories/RequestHashStorage__factory.js +1 -1
- package/types/factories/RequestHashStorage__factory.js.map +1 -1
- package/types/factories/RequestOpenHashSubmitter__factory.d.ts +1 -1
- package/types/factories/RequestOpenHashSubmitter__factory.d.ts.map +1 -1
- package/types/factories/RequestOpenHashSubmitter__factory.js +1 -1
- package/types/factories/RequestOpenHashSubmitter__factory.js.map +1 -1
- package/types/factories/StorageFeeCollector__factory.d.ts +1 -1
- package/types/factories/StorageFeeCollector__factory.d.ts.map +1 -1
- package/types/factories/StorageFeeCollector__factory.js +1 -1
- package/types/factories/StorageFeeCollector__factory.js.map +1 -1
- package/types/factories/TestERC20__factory.d.ts +1 -1
- package/types/factories/TestERC20__factory.d.ts.map +1 -1
- package/types/factories/TestERC20__factory.js +1 -1
- package/types/factories/TestERC20__factory.js.map +1 -1
- package/types/factories/UsdtFake__factory.d.ts +1 -1
- package/types/factories/UsdtFake__factory.js +1 -1
- package/types/hardhat.d.ts +16 -0
- package/types/index.d.ts +8 -2
- package/types/index.d.ts.map +1 -1
- package/types/index.js +9 -3
- package/types/index.js.map +1 -1
package/README.md
CHANGED
|
@@ -18,8 +18,13 @@ WEB3_PROVIDER_URL=... # Mandatory to interact with live blockchains
|
|
|
18
18
|
ETHERSCAN_API_KEY=... # Only used to verify smart contracts code on live blockchains, even for other explorers, except:
|
|
19
19
|
BSCSCAN_API_KEY=... # ... for BSCScan
|
|
20
20
|
POLYGONSCAN_API_KEY=... # ... for PolygonScan
|
|
21
|
-
FTMSCAN_API_KEY=... #
|
|
21
|
+
FTMSCAN_API_KEY=... # ... for FTMScan
|
|
22
|
+
SNOWTRACE_API_KEY=... # ... for Snowtrace
|
|
23
|
+
ARBISCAN_API_KEY=... # ... for Arbiscan
|
|
22
24
|
ADMIN_WALLET_ADDRESS=... # Mandatory to deploy contracts with admin tasks (e.g. ChainlinkConversionPath)
|
|
25
|
+
DEPLOYER_MASTER_KEY=... # Mandatory to deploy the request deployer smart contract on live blockchains
|
|
26
|
+
REQUEST_DEPLOYER_LIVE=... # Must be true to deploy contracts through the request deployer on live blockchains.
|
|
27
|
+
NETWORK=... # List of network to deploy contracts on with the request deployer. If not set default to all supported chain.
|
|
23
28
|
```
|
|
24
29
|
|
|
25
30
|
## Usage
|
|
@@ -53,6 +58,10 @@ const erc20FeeProxyInstance = erc20FeeProxyArtifact.connect(
|
|
|
53
58
|
|
|
54
59
|
The package stores the following smart contracts:
|
|
55
60
|
|
|
61
|
+
**Smart contracts for request deployment**
|
|
62
|
+
|
|
63
|
+
- `RequestDeployer` smart contract to which we delegate our deployment through the function `deploy(value, salt, bytecode)`. It enables to deploy contract with the `CREATE2` opcode to easily manage our contract deployment addresses.
|
|
64
|
+
|
|
56
65
|
**Smart contracts for ethereum-storage package**
|
|
57
66
|
|
|
58
67
|
- `RequestHashStorage` allows to declare a hash `NewHash(hash, submitter, feesParameters)`. Only a whitelisted contract can declare hashes.
|
|
@@ -117,16 +126,63 @@ yarn hardhat deploy-live-payments --network private --force
|
|
|
117
126
|
yarn hardhat deploy-live-payments --network private --force --dry-run
|
|
118
127
|
```
|
|
119
128
|
|
|
120
|
-
###
|
|
129
|
+
### Deployment through request deployer
|
|
130
|
+
|
|
131
|
+
The request deployer enables multichain deployment of several smart contracts at predefined address. It is based on https://github.com/pcaversaccio/xdeployer
|
|
132
|
+
|
|
133
|
+
The deployer contract should be deployed at `0xE99Ab70a5FAE59551544FA326fA048f7B95A24B2` on live chains.
|
|
134
|
+
|
|
135
|
+
Be sure to run `yarn build:sol` before deploying the deployer or a contract.
|
|
136
|
+
|
|
137
|
+
The contracts implemented are listed in the array `create2ContractDeploymentList` in [Utils](./scripts-create2/utils.ts).
|
|
138
|
+
|
|
139
|
+
#### Deploy the request deployer
|
|
140
|
+
|
|
141
|
+
Environment variables needed: `DEPLOYER_MASTER_KEY`
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
yarn hardhat deploy-deployer-contract --network <NETWORK>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
#### Compute the contract addresses
|
|
148
|
+
|
|
149
|
+
Run:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
yarn hardhat compute-contract-addresses
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
It will compute the addresses of the contracts to be deployed via the request deployer.
|
|
121
156
|
|
|
122
|
-
|
|
157
|
+
#### Deploy the contracts
|
|
123
158
|
|
|
159
|
+
Depending on the xdeployer config, this script will deploy the smart contracts on several chain simultaneously
|
|
124
160
|
Environment variables needed: `ADMIN_PRIVATE_KEY`
|
|
161
|
+
You will need the request deployer to be deployed.
|
|
162
|
+
Then run:
|
|
125
163
|
|
|
126
164
|
```bash
|
|
127
|
-
yarn hardhat
|
|
165
|
+
yarn hardhat deploy-contracts-through-deployer
|
|
128
166
|
```
|
|
129
167
|
|
|
168
|
+
To deploy on live chains set `REQUEST_DEPLOYER_LIVE` to true
|
|
169
|
+
|
|
170
|
+
This command will output details about each contract deployment on each chain:
|
|
171
|
+
|
|
172
|
+
- If successfull: the network, the contract address and block number
|
|
173
|
+
- If already deployed: the network, and the contract address
|
|
174
|
+
- If and error occured: the said error
|
|
175
|
+
|
|
176
|
+
#### Verify the contracts
|
|
177
|
+
|
|
178
|
+
For each network the contract were deployed to run:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
yarn hardhat verify-contract-from-deployer --network <NETWORK>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
The associated `EXPLORER_API_KEY` is mandatory.
|
|
185
|
+
|
|
130
186
|
### Tests
|
|
131
187
|
|
|
132
188
|
After a local deployment:
|
package/dist/hardhat.config.d.ts
CHANGED
|
@@ -101,6 +101,13 @@ declare const _default: {
|
|
|
101
101
|
mocha: {
|
|
102
102
|
timeout: number;
|
|
103
103
|
};
|
|
104
|
+
xdeploy: {
|
|
105
|
+
salt: string;
|
|
106
|
+
signer: string | undefined;
|
|
107
|
+
networks: string[];
|
|
108
|
+
gasLimit: undefined;
|
|
109
|
+
deployerAddress: string;
|
|
110
|
+
};
|
|
104
111
|
};
|
|
105
112
|
export default _default;
|
|
106
113
|
//# sourceMappingURL=hardhat.config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardhat.config.d.ts","sourceRoot":"","sources":["../hardhat.config.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,2BAA2B,CAAC;AACnC,OAAO,4BAA4B,CAAC;AACpC,OAAO,8BAA8B,CAAC;AACtC,OAAO,2BAA2B,CAAC
|
|
1
|
+
{"version":3,"file":"hardhat.config.d.ts","sourceRoot":"","sources":["../hardhat.config.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,2BAA2B,CAAC;AACnC,OAAO,4BAA4B,CAAC;AACpC,OAAO,8BAA8B,CAAC;AACtC,OAAO,2BAA2B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CnC,wBAkHE"}
|
package/dist/hardhat.config.js
CHANGED
|
@@ -11,17 +11,34 @@ const dotenv_1 = require("dotenv");
|
|
|
11
11
|
const _5_deploy_all_1 = require("./scripts/5_deploy-all");
|
|
12
12
|
const deploy_payments_1 = require("./scripts/deploy-payments");
|
|
13
13
|
const prepare_payments_1 = require("./scripts/prepare-payments");
|
|
14
|
+
const check_deployer_1 = require("./scripts-create2/check-deployer");
|
|
15
|
+
const deploy_request_deployer_1 = require("./scripts-create2/deploy-request-deployer");
|
|
16
|
+
const compute_one_address_1 = require("./scripts-create2/compute-one-address");
|
|
17
|
+
const verify_one_1 = require("./scripts-create2/verify-one");
|
|
18
|
+
const deploy_one_1 = require("./scripts-create2/deploy-one");
|
|
14
19
|
(0, dotenv_1.config)();
|
|
15
20
|
const accounts = process.env.DEPLOYMENT_PRIVATE_KEY
|
|
16
21
|
? [process.env.DEPLOYMENT_PRIVATE_KEY]
|
|
17
|
-
: process.env.
|
|
18
|
-
? [process.env.
|
|
19
|
-
:
|
|
22
|
+
: process.env.DEPLOYER_MASTER_KEY
|
|
23
|
+
? [process.env.DEPLOYER_MASTER_KEY]
|
|
24
|
+
: process.env.ADMIN_PRIVATE_KEY
|
|
25
|
+
? [process.env.ADMIN_PRIVATE_KEY]
|
|
26
|
+
: undefined;
|
|
20
27
|
if (accounts && process.env.ADMIN_PRIVATE_KEY) {
|
|
21
28
|
accounts.push(process.env.ADMIN_PRIVATE_KEY);
|
|
22
29
|
}
|
|
30
|
+
const DEPLOYER_KEY_GUARD = 'DEPLOYER_KEY_GUARD';
|
|
31
|
+
// Request deployer address on local blockchain
|
|
32
|
+
const LOCAL_DEPLOYER_ADDRESS = '0x8CdaF0CD259887258Bc13a92C0a6dA92698644C0';
|
|
33
|
+
// Request deployer address on live blockchains
|
|
34
|
+
const LIVE_DEPLOYER_ADDRESS = '0xE99Ab70a5FAE59551544FA326fA048f7B95A24B2';
|
|
35
|
+
// Arbitrary data used to deploy our contracts at predefined addresses
|
|
36
|
+
const REQUEST_SALT = '0x0679724da7211bc62502a39f41cbf818fc7132c266e7c819fc2b06fad9593655';
|
|
37
|
+
const requestDeployer = process.env.REQUEST_DEPLOYER_LIVE
|
|
38
|
+
? LIVE_DEPLOYER_ADDRESS
|
|
39
|
+
: LOCAL_DEPLOYER_ADDRESS;
|
|
23
40
|
exports.default = {
|
|
24
|
-
solidity: '0.8.
|
|
41
|
+
solidity: '0.8.9',
|
|
25
42
|
paths: {
|
|
26
43
|
sources: 'src/contracts',
|
|
27
44
|
tests: 'test/contracts',
|
|
@@ -125,10 +142,20 @@ exports.default = {
|
|
|
125
142
|
mocha: {
|
|
126
143
|
timeout: 60000, // Usefull on test networks
|
|
127
144
|
},
|
|
145
|
+
xdeploy: {
|
|
146
|
+
salt: REQUEST_SALT,
|
|
147
|
+
signer: process.env.ADMIN_PRIVATE_KEY,
|
|
148
|
+
networks: process.env.NETWORK
|
|
149
|
+
? [process.env.NETWORK]
|
|
150
|
+
: ['mainnet', 'matic', 'bsc', 'celo', 'xdai', 'fuse', 'arbitrum-one', 'fantom', 'avalanche'],
|
|
151
|
+
gasLimit: undefined,
|
|
152
|
+
deployerAddress: requestDeployer,
|
|
153
|
+
},
|
|
128
154
|
};
|
|
129
155
|
// FIXME: use deployAllPaymentContracts instead to test with the same deployments
|
|
130
156
|
(0, config_1.task)('deploy-local-env', 'Deploy a local environment').setAction((args, hre) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
131
157
|
args.force = true;
|
|
158
|
+
yield hre.run(DEPLOYER_KEY_GUARD);
|
|
132
159
|
yield (0, _5_deploy_all_1.default)(args, hre);
|
|
133
160
|
console.log('All contracts (re)deployed locally');
|
|
134
161
|
}));
|
|
@@ -140,9 +167,30 @@ exports.default = {
|
|
|
140
167
|
args.force = (_a = args.force) !== null && _a !== void 0 ? _a : false;
|
|
141
168
|
args.dryRun = (_b = args.dryRun) !== null && _b !== void 0 ? _b : false;
|
|
142
169
|
args.simulate = args.dryRun;
|
|
170
|
+
yield hre.run(DEPLOYER_KEY_GUARD);
|
|
143
171
|
yield (0, deploy_payments_1.deployAllPaymentContracts)(args, hre);
|
|
144
172
|
}));
|
|
145
173
|
(0, config_1.task)('prepare-live-payments', 'Run ERC20 approval transactions for Swap Conversion, with the second signer (FIXME with missing tasks).').setAction((_args, hre) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
174
|
+
yield hre.run(DEPLOYER_KEY_GUARD);
|
|
146
175
|
yield (0, prepare_payments_1.preparePayments)(hre);
|
|
147
176
|
}));
|
|
177
|
+
// Tasks inherent to the CREATE2 deployment scheme
|
|
178
|
+
(0, config_1.task)('deploy-deployer-contract', 'Deploy request deployer contract on the specified network').setAction((_args, hre) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
179
|
+
yield (0, deploy_request_deployer_1.deployDeployer)(hre);
|
|
180
|
+
}));
|
|
181
|
+
(0, config_1.task)('compute-contract-addresses', 'Compute the contract addresses from the Create2DeploymentList using the create2 scheme').setAction((_args, hre) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
182
|
+
yield (0, compute_one_address_1.computeCreate2DeploymentAddressesFromList)(hre);
|
|
183
|
+
}));
|
|
184
|
+
(0, config_1.task)('deploy-contracts-through-deployer', 'Deploy the contracts from the Create2DeploymentList using the create2 scheme').setAction((_args, hre) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
185
|
+
yield (0, check_deployer_1.checkCreate2Deployer)(hre);
|
|
186
|
+
yield (0, deploy_one_1.deployWithCreate2FromList)(hre);
|
|
187
|
+
}));
|
|
188
|
+
(0, config_1.task)('verify-contract-from-deployer', 'Verify the contracts from the Create2DeploymentList for a specific network').setAction((_args, hre) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
189
|
+
yield (0, verify_one_1.VerifyCreate2FromList)(hre);
|
|
190
|
+
}));
|
|
191
|
+
(0, config_1.subtask)(DEPLOYER_KEY_GUARD, 'prevent usage of the deployer master key').setAction(() => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
192
|
+
if (accounts && accounts[0] === process.env.DEPLOYER_MASTER_KEY) {
|
|
193
|
+
throw new Error('The deployer master key should not be used for this action');
|
|
194
|
+
}
|
|
195
|
+
}));
|
|
148
196
|
//# sourceMappingURL=hardhat.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hardhat.config.js","sourceRoot":"","sources":["../hardhat.config.ts"],"names":[],"mappings":";;;AAAA,8BAA4B;AAC5B,qCAAmC;AACnC,sCAAoC;AACpC,wCAAsC;AACtC,qCAAmC;AACnC,
|
|
1
|
+
{"version":3,"file":"hardhat.config.js","sourceRoot":"","sources":["../hardhat.config.ts"],"names":[],"mappings":";;;AAAA,8BAA4B;AAC5B,qCAAmC;AACnC,sCAAoC;AACpC,wCAAsC;AACtC,qCAAmC;AACnC,2CAA+C;AAC/C,mCAAgC;AAChC,0DAAwD;AACxD,+DAAsE;AACtE,iEAA6D;AAC7D,qEAAwE;AACxE,uFAA2E;AAE3E,+EAAkG;AAClG,6DAAqE;AACrE,6DAAyE;AAEzE,IAAA,eAAM,GAAE,CAAC;AAET,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB;IACjD,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;IACt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AmC,CAAC;AASzE,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE;IACJ,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,EACD,GAAG,EAAE,yBAAyB,
|
|
1
|
+
{"version":3,"file":"conversion-proxy.d.ts","sourceRoot":"","sources":["../../scripts/conversion-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAG1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AASzE,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE;IACJ,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,EACD,GAAG,EAAE,yBAAyB,sFA2B/B;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE;IACJ,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,EACD,GAAG,EAAE,yBAAyB,2FAwC/B"}
|
|
@@ -7,6 +7,7 @@ const deploy_one_1 = require("./deploy-one");
|
|
|
7
7
|
const currency_1 = require("@requestnetwork/currency");
|
|
8
8
|
const types_1 = require("@requestnetwork/types");
|
|
9
9
|
function deployERC20ConversionProxy(args, hre) {
|
|
10
|
+
var _a;
|
|
10
11
|
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
11
12
|
const contractName = 'Erc20ConversionProxy';
|
|
12
13
|
if (!args.chainlinkConversionPathAddress) {
|
|
@@ -20,7 +21,11 @@ function deployERC20ConversionProxy(args, hre) {
|
|
|
20
21
|
return undefined;
|
|
21
22
|
}
|
|
22
23
|
return (0, deploy_one_1.deployOne)(args, hre, contractName, {
|
|
23
|
-
constructorArguments: [
|
|
24
|
+
constructorArguments: [
|
|
25
|
+
args.erc20FeeProxyAddress,
|
|
26
|
+
args.chainlinkConversionPathAddress,
|
|
27
|
+
(_a = process.env.ADMIN_WALLET_ADDRESS) !== null && _a !== void 0 ? _a : (yield (yield hre.ethers.getSigners())[0].getAddress()),
|
|
28
|
+
],
|
|
24
29
|
artifact: lib_1.erc20ConversionProxy,
|
|
25
30
|
nonceCondition: args.nonceCondition,
|
|
26
31
|
version: '0.1.1',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversion-proxy.js","sourceRoot":"","sources":["../../scripts/conversion-proxy.ts"],"names":[],"mappings":";;;;AAIA,oCAGoB;AACpB,6CAAyC;AACzC,uDAA2D;AAC3D,iDAA0D;AAE1D,SAAsB,0BAA0B,CAC9C,IAIC,EACD,GAA8B
|
|
1
|
+
{"version":3,"file":"conversion-proxy.js","sourceRoot":"","sources":["../../scripts/conversion-proxy.ts"],"names":[],"mappings":";;;;AAIA,oCAGoB;AACpB,6CAAyC;AACzC,uDAA2D;AAC3D,iDAA0D;AAE1D,SAAsB,0BAA0B,CAC9C,IAIC,EACD,GAA8B;;;QAE9B,MAAM,YAAY,GAAG,sBAAsB,CAAC;QAE5C,IAAI,CAAC,IAAI,CAAC,8BAA8B,EAAE;YACxC,mEAAmE;YACnE,OAAO,CAAC,KAAK,CACX,sCAAsC,GAAG,CAAC,OAAO,CAAC,IAAI,mBAAmB,YAAY,GAAG,CACzF,CAAC;YACF,OAAO,SAAS,CAAC;SAClB;QACD,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;YAC9B,mEAAmE;YACnE,OAAO,CAAC,KAAK,CAAC,4BAA4B,GAAG,CAAC,OAAO,CAAC,IAAI,mBAAmB,YAAY,GAAG,CAAC,CAAC;YAC9F,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,IAAA,sBAAS,EAAuB,IAAI,EAAE,GAAG,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C,IAAI,mBAAmB,YAAY,GAAG,CACxF,CAAC;YACF,OAAO;SACR;QAED,OAAO,IAAA,sBAAS,EAAC,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE;YACxC,oBAAoB,EAAE;gBACpB,IAAI,CAAC,kBAAkB;gBACvB,IAAI,CAAC,8BAA8B;gBACnC,eAAe;aAChB;YACD,QAAQ,EAAE,2BAAqB;YAC/B,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;;CACJ;AA/CD,4DA+CC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@nomiclabs/hardhat-ethers';
|
|
2
|
-
import {
|
|
2
|
+
import { HardhatRuntimeEnvironmentExtended } from '../scripts-create2/types';
|
|
3
3
|
/**
|
|
4
4
|
* Script ensuring all payment contracts are deployed and usable on a live chain.
|
|
5
5
|
*
|
|
@@ -14,5 +14,5 @@ import { HardhatRuntimeEnvironment } from 'hardhat/types';
|
|
|
14
14
|
* `args.simulate = true` to prevent deployments and contract verification
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
|
-
export declare function deployAllPaymentContracts(args: any, hre:
|
|
17
|
+
export declare function deployAllPaymentContracts(args: any, hre: HardhatRuntimeEnvironmentExtended): Promise<void>;
|
|
18
18
|
//# sourceMappingURL=deploy-payments.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-payments.d.ts","sourceRoot":"","sources":["../../scripts/deploy-payments.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy-payments.d.ts","sourceRoot":"","sources":["../../scripts/deploy-payments.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAuBnC,OAAO,EAAE,iCAAiC,EAAE,MAAM,0BAA0B,CAAC;AAG7E;;;;;;;;;;;;;GAaG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,GAAG,EACT,GAAG,EAAE,iCAAiC,GACrC,OAAO,CAAC,IAAI,CAAC,CAsZf"}
|
|
@@ -10,6 +10,7 @@ const deploy_one_1 = require("./deploy-one");
|
|
|
10
10
|
const utils_1 = require("./utils");
|
|
11
11
|
const currency_1 = require("@requestnetwork/currency");
|
|
12
12
|
const types_1 = require("@requestnetwork/types");
|
|
13
|
+
const compute_one_address_1 = require("../scripts-create2/compute-one-address");
|
|
13
14
|
/**
|
|
14
15
|
* Script ensuring all payment contracts are deployed and usable on a live chain.
|
|
15
16
|
*
|
|
@@ -75,6 +76,18 @@ function deployAllPaymentContracts(args, hre) {
|
|
|
75
76
|
simulationSuccess = simulationSuccess !== null && simulationSuccess !== void 0 ? simulationSuccess : true;
|
|
76
77
|
}
|
|
77
78
|
};
|
|
79
|
+
/* Returns true if the nonce is <= targetNonce, and switches to simulation if != targetNonce */
|
|
80
|
+
const nonceReady = (targetNonce) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
81
|
+
const currentNonce = yield deployer.getTransactionCount();
|
|
82
|
+
if (currentNonce !== targetNonce && currentNonce > 17) {
|
|
83
|
+
console.warn(`Warning: got nonce ${currentNonce} instead of ${targetNonce}`);
|
|
84
|
+
switchToSimulation();
|
|
85
|
+
}
|
|
86
|
+
if (currentNonce === targetNonce) {
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
return false;
|
|
90
|
+
});
|
|
78
91
|
// #endregion
|
|
79
92
|
// #region BATCH DEFINITIONS
|
|
80
93
|
/*
|
|
@@ -125,7 +138,8 @@ function deployAllPaymentContracts(args, hre) {
|
|
|
125
138
|
throw new Error('Chainlink was deployed but no ADMIN_WALLET_ADDRESS was provided, cannot addWhitelistAdmin.');
|
|
126
139
|
}
|
|
127
140
|
if (args.simulate === false) {
|
|
128
|
-
yield chainlinkInstance.addWhitelistAdmin(process.env.ADMIN_WALLET_ADDRESS);
|
|
141
|
+
const tx = yield chainlinkInstance.addWhitelistAdmin(process.env.ADMIN_WALLET_ADDRESS);
|
|
142
|
+
yield tx.wait(1);
|
|
129
143
|
}
|
|
130
144
|
else {
|
|
131
145
|
console.log('[i] Simulating addWhitelistAdmin to chainlinkInstance');
|
|
@@ -141,7 +155,7 @@ function deployAllPaymentContracts(args, hre) {
|
|
|
141
155
|
switchToSimulation();
|
|
142
156
|
}
|
|
143
157
|
}
|
|
144
|
-
return chainlinkInstance;
|
|
158
|
+
return { chainlinkInstance, ethConversionResult };
|
|
145
159
|
});
|
|
146
160
|
/*
|
|
147
161
|
* Batch 5
|
|
@@ -149,8 +163,8 @@ function deployAllPaymentContracts(args, hre) {
|
|
|
149
163
|
* - 5.b ERC20ConversionProxy.transferOwnership
|
|
150
164
|
* - 5.c ERC20SwapConversion.setPaymentProxy
|
|
151
165
|
*/
|
|
152
|
-
const runDeploymentBatch_5 = (chainlinkInstance, erc20FeeProxyAddress, erc20SwapConversionInstance) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
153
|
-
const NONCE_BATCH_5 =
|
|
166
|
+
const runDeploymentBatch_5 = (chainlinkInstance, erc20FeeProxyAddress, erc20SwapConversionInstance, ethConversionResultInstance) => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
|
|
167
|
+
const NONCE_BATCH_5 = 15;
|
|
154
168
|
yield (0, utils_1.jumpToNonce)(args, hre, NONCE_BATCH_5);
|
|
155
169
|
let chainlinkConversionPathAddress = chainlinkInstance === null || chainlinkInstance === void 0 ? void 0 : chainlinkInstance.address;
|
|
156
170
|
if (!chainlinkConversionPathAddress) {
|
|
@@ -162,59 +176,71 @@ function deployAllPaymentContracts(args, hre) {
|
|
|
162
176
|
erc20FeeProxyAddress, nonceCondition: NONCE_BATCH_5 }), hre);
|
|
163
177
|
addToResult(erc20ConversionResult);
|
|
164
178
|
// 5.b ERC20ConversionProxy.transferOwnership
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
179
|
+
if (yield nonceReady(NONCE_BATCH_5 + 1)) {
|
|
180
|
+
if (erc20ConversionResult) {
|
|
181
|
+
if (!process.env.ADMIN_WALLET_ADDRESS) {
|
|
182
|
+
throw new Error('ADMIN_WALLET_ADDRESS missing for: ERC20ConversionProxy.transferOwnership');
|
|
183
|
+
}
|
|
184
|
+
if (args.simulate === false) {
|
|
185
|
+
yield erc20ConversionResult.instance.transferOwnership(process.env.ADMIN_WALLET_ADDRESS);
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
console.log('[i] Simulating transferOwnership to ERC20ConversionProxy');
|
|
189
|
+
}
|
|
173
190
|
}
|
|
174
191
|
else {
|
|
175
|
-
console.log('[i] Simulating transferOwnership to ERC20ConversionProxy');
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
if (currentNonce < erc20ConversionAdminNonce) {
|
|
180
|
-
console.warn(`Warning: got nonce ${currentNonce} instead of ${erc20ConversionAdminNonce}`);
|
|
181
|
-
switchToSimulation();
|
|
182
|
-
}
|
|
183
|
-
else if (!erc20ConversionResult) {
|
|
184
192
|
console.warn(`Warning: the ERC20ConversionProxy contract instance is not ready, consider retrying.`);
|
|
185
193
|
switchToSimulation();
|
|
186
194
|
}
|
|
187
195
|
}
|
|
188
196
|
// 5.c ERC20SwapConversion.setPaymentProxy
|
|
189
|
-
|
|
190
|
-
const
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
+
// Ignore if the ERC20 conversion proxy is already live and used, until it gets deprecated
|
|
198
|
+
const IGNORE_SET_PAYMENT_PROXY = true;
|
|
199
|
+
console.warn(`DOUBLE-CHECK: ${IGNORE_SET_PAYMENT_PROXY ? '' : 'not '}ignoring erc20SwapConversionInstance.setPaymentProxy on ${erc20SwapConversionInstance.address}`);
|
|
200
|
+
if (!IGNORE_SET_PAYMENT_PROXY) {
|
|
201
|
+
if (yield nonceReady(NONCE_BATCH_5 + 2)) {
|
|
202
|
+
if (erc20ConversionResult) {
|
|
203
|
+
if (args.simulate === false) {
|
|
204
|
+
yield erc20SwapConversionInstance.setPaymentProxy(erc20ConversionResult === null || erc20ConversionResult === void 0 ? void 0 : erc20ConversionResult.address);
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
console.log('[i] Simulating setPaymentProxy to ERC20SwapConversion');
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
console.warn(`Warning: the ERC20ConversionProxy contract instance is not ready for ERC20SwapConversion update, consider retrying.`);
|
|
212
|
+
switchToSimulation();
|
|
213
|
+
}
|
|
197
214
|
}
|
|
198
215
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
216
|
+
const ethConversionAdminNonce = NONCE_BATCH_5 + 3;
|
|
217
|
+
yield (0, utils_1.jumpToNonce)(args, hre, ethConversionAdminNonce);
|
|
218
|
+
// 5.d ETHConversion.transferOwnership
|
|
219
|
+
if (yield nonceReady(ethConversionAdminNonce)) {
|
|
220
|
+
if (ethConversionResultInstance) {
|
|
221
|
+
if (!process.env.ADMIN_WALLET_ADDRESS) {
|
|
222
|
+
throw new Error('ADMIN_WALLET_ADDRESS missing, cannot addWhitelistAdmin on ETHConversion.');
|
|
223
|
+
}
|
|
224
|
+
if (args.simulate === false) {
|
|
225
|
+
const tx = yield ethConversionResultInstance.addWhitelistAdmin(process.env.ADMIN_WALLET_ADDRESS);
|
|
226
|
+
yield tx.wait(1);
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
console.log(`[i] Simulating addWhitelistAdmin to ETHConversion at ${ethConversionResultInstance.address}`);
|
|
230
|
+
}
|
|
203
231
|
}
|
|
204
|
-
else
|
|
205
|
-
|
|
206
|
-
|
|
232
|
+
else {
|
|
233
|
+
if (!ethConversionResultInstance) {
|
|
234
|
+
console.warn(`Warning: the ETHConversion contract instance is not ready for ETHConversion update, consider retrying.`);
|
|
235
|
+
switchToSimulation();
|
|
236
|
+
}
|
|
207
237
|
}
|
|
208
238
|
}
|
|
209
239
|
});
|
|
210
240
|
// #endregion
|
|
211
241
|
// #region MAIN - Deployments
|
|
212
242
|
// Batch 1
|
|
213
|
-
yield
|
|
214
|
-
contractName: 'EthereumProxy',
|
|
215
|
-
artifact: lib_1.ethereumProxyArtifact,
|
|
216
|
-
nonceCondition: 0,
|
|
217
|
-
});
|
|
243
|
+
yield (0, utils_1.jumpToNonce)(args, hre, 1);
|
|
218
244
|
const { address: erc20FeeProxyAddress } = yield runEasyDeployment({
|
|
219
245
|
contractName: 'ERC20FeeProxy',
|
|
220
246
|
artifact: lib_1.erc20FeeProxyArtifact,
|
|
@@ -223,7 +249,6 @@ function deployAllPaymentContracts(args, hre) {
|
|
|
223
249
|
// Batch 2
|
|
224
250
|
yield runDeploymentBatch_2(erc20FeeProxyAddress);
|
|
225
251
|
// Batch 3
|
|
226
|
-
const NONCE_BATCH_3 = 6;
|
|
227
252
|
// SwapToConversion
|
|
228
253
|
let swapRouterAddress = utils_1.uniswapV2RouterAddresses[hre.network.name];
|
|
229
254
|
if (!swapRouterAddress) {
|
|
@@ -232,16 +257,12 @@ function deployAllPaymentContracts(args, hre) {
|
|
|
232
257
|
}
|
|
233
258
|
const swapConversionResult = yield (0, erc20_swap_to_conversion_1.deploySwapConversion)(Object.assign(Object.assign({}, args), { conversionProxyAddress: '0x0000000000000000000000000000000000000000', chainlinkConversionPathAddress: '0x0000000000000000000000000000000000000000', swapProxyAddress: swapRouterAddress, nonceCondition: 6 }), hre);
|
|
234
259
|
addToResult(swapConversionResult);
|
|
235
|
-
// EthereumFeeProxy
|
|
236
|
-
const
|
|
237
|
-
contractName: 'EthereumFeeProxy',
|
|
238
|
-
artifact: lib_1.ethereumFeeProxyArtifact,
|
|
239
|
-
nonceCondition: NONCE_BATCH_3 + 1,
|
|
240
|
-
});
|
|
260
|
+
// Compute EthereumFeeProxy address (CREATE2)
|
|
261
|
+
const ethFeeProxyAddress = yield (0, compute_one_address_1.computeCreate2DeploymentAddress)({ contract: 'EthereumFeeProxy' }, hre);
|
|
241
262
|
// Batch 4
|
|
242
|
-
const chainlinkInstance = yield runDeploymentBatch_4(ethFeeProxyAddress);
|
|
263
|
+
const { chainlinkInstance, ethConversionResult } = yield runDeploymentBatch_4(ethFeeProxyAddress);
|
|
243
264
|
// Batch 5
|
|
244
|
-
yield runDeploymentBatch_5(chainlinkInstance, erc20FeeProxyAddress, swapConversionResult.instance);
|
|
265
|
+
yield runDeploymentBatch_5(chainlinkInstance, erc20FeeProxyAddress, swapConversionResult.instance, ethConversionResult === null || ethConversionResult === void 0 ? void 0 : ethConversionResult.instance);
|
|
245
266
|
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
246
267
|
// Add future batches above this line
|
|
247
268
|
console.log('Done deploying.');
|
|
@@ -268,8 +289,6 @@ function deployAllPaymentContracts(args, hre) {
|
|
|
268
289
|
`* CRITICAL: update src/lib/artifacts files, and push changes NOW !`,
|
|
269
290
|
`* IMPORTANT: execute updateAggregatorsList() on conversionPaths`,
|
|
270
291
|
`* : then update the lib with chainlinkPath util in toolbox and push changes`,
|
|
271
|
-
`* OTHER: run \`yarn hardhat prepare-live-payments --network ${hre.network.name}\``,
|
|
272
|
-
`* OTHER: execute administration tasks: approveRouterToSpend(), approvePaymentProxyToSpend() on swaps`,
|
|
273
292
|
`* OTHER: deploy subgraphes where needed`,
|
|
274
293
|
].join('\r\n'));
|
|
275
294
|
if (verificationPromises.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-payments.js","sourceRoot":"","sources":["../../scripts/deploy-payments.ts"],"names":[],"mappings":";;;;AAAA,qCAAmC;
|
|
1
|
+
{"version":3,"file":"deploy-payments.js","sourceRoot":"","sources":["../../scripts/deploy-payments.ts"],"names":[],"mappings":";;;;AAAA,qCAAmC;AACnC,oCAKoB;AACpB,yEAAkE;AAClE,yDAA0F;A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CAAC;gBACF,OAAO,CAAC,GAAG,CAAC,GAAG,yBAAyB,2BAA2B,CAAC,CAAC;gBACrE,IAAI,yBAAyB,GAAG,aAAa,EAAE;oBAC7C,OAAO,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAC;iBAC5E;aACF;SACF;aAAM;YACL,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;SAChD;QACD,IAAI,iBAAiB,KAAK,KAAK,EAAE;YAC/B,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;SACvC;;CAEF;AAzZD,8DAyZC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../scripts/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkB3D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,SAAgB,GAAG,OAAO,yBAAyB,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../scripts/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE1D;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkB3D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW,SAAgB,GAAG,OAAO,yBAAyB,SAAS,MAAM,kBAezF,CAAC"}
|
package/dist/scripts/utils.js
CHANGED
|
@@ -31,16 +31,18 @@ exports.uniswapV2RouterAddresses = {
|
|
|
31
31
|
*/
|
|
32
32
|
const jumpToNonce = (args, hre, nonce) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
33
33
|
const [deployer] = yield hre.ethers.getSigners();
|
|
34
|
+
let nextNonce = yield deployer.getTransactionCount();
|
|
34
35
|
if (args.simulate) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
console.log(`Simulating a jump to nonce ${nonce} (current: ${currentNonce})`);
|
|
36
|
+
if (nextNonce < nonce) {
|
|
37
|
+
console.log(`Simulating a jump to nonce ${nonce} (current: ${nextNonce})`);
|
|
38
38
|
}
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
while (
|
|
41
|
+
while (nextNonce < nonce) {
|
|
42
42
|
// Atificially increase nonce if needed
|
|
43
|
-
yield deployer.sendTransaction({ to: deployer.address });
|
|
43
|
+
const tx = yield deployer.sendTransaction({ to: deployer.address, nonce: nextNonce });
|
|
44
|
+
yield tx.wait(1);
|
|
45
|
+
nextNonce = yield deployer.getTransactionCount();
|
|
44
46
|
}
|
|
45
47
|
});
|
|
46
48
|
exports.jumpToNonce = jumpToNonce;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../scripts/utils.ts"],"names":[],"mappings":";;;;AAEA;;;GAGG;AACU,QAAA,wBAAwB,GAA2B;IAC9D,OAAO,EAAE,4CAA4C;IACrD,OAAO,EAAE,4CAA4C;IACrD,OAAO,EAAE,4CAA4C;IACrD,KAAK,EAAE,4CAA4C;IACnD,OAAO,EAAE,4CAA4C;IACrD,OAAO,EAAE,4CAA4C;IACrD,IAAI,EAAE,4CAA4C;IAClD,kDAAkD;IAClD,MAAM,EAAE,4CAA4C;IACpD,8CAA8C;IAC9C,KAAK,EAAE,4CAA4C;IACnD,iCAAiC;IACjC,IAAI,EAAE,4CAA4C;IAClD,mBAAmB;IACnB,kBAAkB,EAAE,4CAA4C;IAChE,cAAc,EAAE,4CAA4C;IAC5D,SAAS,EAAE,4CAA4C;CACxD,CAAC;AAEF;;;GAGG;AACI,MAAM,WAAW,GAAG,CAAO,IAAS,EAAE,GAA8B,EAAE,KAAa,EAAE,EAAE;IAC5F,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,GAAG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AC;QACjB,SAAS,GAAG,MAAM,QAAQ,CAAC,mBAAmB,EAAE,CAAC;KAClD;AACH,CAAC,CAAA,CAAC;AAfW,QAAA,WAAW,eAetB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-deployer.d.ts","sourceRoot":"","sources":["../../scripts-create2/check-deployer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAC;AAE5D,eAAO,MAAM,oBAAoB,QAC1B,iCAAiC,KACrC,QAAQ,IAAI,CAkCd,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkCreate2Deployer = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const ethers_1 = require("ethers");
|
|
6
|
+
const utils_1 = require("@requestnetwork/utils");
|
|
7
|
+
const checkCreate2Deployer = (hre) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
8
|
+
if (!hre.config.xdeploy.networks || hre.config.xdeploy.networks.length === 0) {
|
|
9
|
+
throw new Error('Invalid network configuration');
|
|
10
|
+
}
|
|
11
|
+
if (!hre.config.xdeploy.deployerAddress) {
|
|
12
|
+
throw new Error('Deployer contract address missing');
|
|
13
|
+
}
|
|
14
|
+
yield Promise.all(hre.config.xdeploy.networks.map((network) => (0, tslib_1.__awaiter)(void 0, void 0, void 0, function* () {
|
|
15
|
+
let provider;
|
|
16
|
+
if (network === 'celo') {
|
|
17
|
+
provider = new ethers_1.providers.JsonRpcProvider('https://forno.celo.org');
|
|
18
|
+
const originalBlockFormatter = provider.formatter._block;
|
|
19
|
+
provider.formatter._block = (value, format) => {
|
|
20
|
+
return originalBlockFormatter(Object.assign({ gasLimit: ethers_1.constants.Zero }, value), format);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
provider = utils_1.default.getDefaultProvider(network);
|
|
25
|
+
}
|
|
26
|
+
const code = yield provider.getCode(hre.config.xdeploy.deployerAddress);
|
|
27
|
+
if (code === '0x') {
|
|
28
|
+
throw new Error(`There is no deployer contract for network ${network} at address ${hre.config.xdeploy.deployerAddress}`);
|
|
29
|
+
}
|
|
30
|
+
})));
|
|
31
|
+
});
|
|
32
|
+
exports.checkCreate2Deployer = checkCreate2Deployer;
|
|
33
|
+
//# sourceMappingURL=check-deployer.js.map
|