From ec2b5ccb8426cab7514437dd48d90dfdd572b294 Mon Sep 17 00:00:00 2001 From: Denis Date: Tue, 8 Oct 2024 16:01:14 +0100 Subject: [PATCH 1/3] Simplify deploy script --- deploy/deploy-SafeOrderBuilder.js | 75 +++++++++++++++---------------- package.json | 2 +- yarn.lock | 8 ++-- 3 files changed, 42 insertions(+), 43 deletions(-) diff --git a/deploy/deploy-SafeOrderBuilder.js b/deploy/deploy-SafeOrderBuilder.js index 9d7fb461..d2d60b55 100644 --- a/deploy/deploy-SafeOrderBuilder.js +++ b/deploy/deploy-SafeOrderBuilder.js @@ -1,14 +1,14 @@ const hre = require('hardhat'); -const { ethers } = hre; -const { getChainId } = hre; +const { ethers, getChainId } = hre; +const { saveContractWithCreate3Deployment, deployAndGetContractWithCreate3, deployAndGetContract } = require('@1inch/solidity-utils'); +const { getNetwork } = require('@1inch/solidity-utils/hardhat-setup'); const ROUTER_V6_ADDR = '0x111111125421ca6dc452d289314280a0f8842a65'; +const ROUTER_V6_ADDR_ZKSYNC = '0x6fd4383cb451173d5f9304f041c7bcbf27d561ff'; const ORDER_REGISTRATOR_SALT = ethers.keccak256(ethers.toUtf8Bytes('OrderRegistrator')); const SAFE_ORDER_BUILDER_SALT = ethers.keccak256(ethers.toUtf8Bytes('SafeOrderBuilder')); -const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); - module.exports = async ({ deployments }) => { const networkName = hre.network.name; console.log(`running ${networkName} deploy script`); @@ -23,41 +23,40 @@ module.exports = async ({ deployments }) => { return; } - const create3Deployer = await ethers.getContractAt('ICreate3Deployer', (await deployments.get('Create3Deployer')).address); - - const OrderRegistratorFactory = await ethers.getContractFactory('OrderRegistrator'); - - const deployData = (await OrderRegistratorFactory.getDeployTransaction(ROUTER_V6_ADDR)).data; - - const txn = create3Deployer.deploy(ORDER_REGISTRATOR_SALT, deployData, { gasLimit: 5000000 }); - await (await txn).wait(); - - const orderRegistratorAddr = await create3Deployer.addressOf(ORDER_REGISTRATOR_SALT); - - console.log('OrderRegistrator deployed to:', orderRegistratorAddr); - - const SafeOrderBuilderFactory = await ethers.getContractFactory('SafeOrderBuilder'); - - const deployData2 = (await SafeOrderBuilderFactory.getDeployTransaction(ROUTER_V6_ADDR, orderRegistratorAddr)).data; - - const txn2 = create3Deployer.deploy(SAFE_ORDER_BUILDER_SALT, deployData2, { gasLimit: 5000000 }); - await (await txn2).wait(); - - const safeOrderBuilderAddr = await create3Deployer.addressOf(SAFE_ORDER_BUILDER_SALT); - - console.log('SafeOrderBuilder deployed to:', safeOrderBuilderAddr); - - await sleep(5000); // wait for etherscan to index contract - - if (chainId !== '31337') { - await hre.run('verify:verify', { - address: orderRegistratorAddr, - constructorArguments: [ROUTER_V6_ADDR], + if (getNetwork().indexOf('zksync') !== -1) { + // ZkSync deploy without create3 + const orderRegistrator = await deployAndGetContract({ + contractName: 'OrderRegistrator', + constructorArgs: [ROUTER_V6_ADDR_ZKSYNC], + deploymentName: 'OrderRegistrator', + deployments, + deployer, }); - - await hre.run('verify:verify', { - address: safeOrderBuilderAddr, - constructorArguments: [ROUTER_V6_ADDR, orderRegistratorAddr], + await deployAndGetContract({ + contractName: 'SafeOrderBuilder', + constructorArgs: [ROUTER_V6_ADDR_ZKSYNC, await orderRegistrator.getAddress()], + deploymentName: 'SafeOrderBuilder', + deployments, + deployer, + }); + } else { + const create3Deployer = await ethers.getContractAt('ICreate3Deployer', (await deployments.get('Create3Deployer')).address); + + const orderRegistrator = await deployAndGetContractWithCreate3({ + contractName: 'OrderRegistrator', + constructorArgs: [ROUTER_V6_ADDR], + deploymentName: 'OrderRegistrator', + create3Deployer: create3Deployer, + salt: ORDER_REGISTRATOR_SALT, + deployments, + }); + await deployAndGetContractWithCreate3({ + contractName: 'SafeOrderBuilder', + constructorArgs: [ROUTER_V6_ADDR, await orderRegistrator.getAddress()], + deploymentName: 'SafeOrderBuilder', + create3Deployer: create3Deployer, + salt: SAFE_ORDER_BUILDER_SALT, + deployments, }); } }; diff --git a/package.json b/package.json index c65118bd..416675c5 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "test/helpers" ], "dependencies": { - "@1inch/solidity-utils": "4.2.1", + "@1inch/solidity-utils": "5.3.0", "@chainlink/contracts": "0.8.0", "@gnosis.pm/safe-contracts": "1.3.0", "@openzeppelin/contracts": "5.0.2" diff --git a/yarn.lock b/yarn.lock index 6ce26a77..ec324627 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@1inch/solidity-utils@4.2.1": - version "4.2.1" - resolved "https://registry.yarnpkg.com/@1inch/solidity-utils/-/solidity-utils-4.2.1.tgz#1feb6887ebc6ecc9ec2c1a1cde4963a2704cdc06" - integrity sha512-Xx7KXzBRAxVukNHIcki0yQkbY+dK9vZRnxSTfA/SLwH+zotMArqOohtmbRsuBxZQQ1c9XNqBOuDhufOVoyZYew== +"@1inch/solidity-utils@5.3.0": + version "5.3.0" + resolved "https://registry.yarnpkg.com/@1inch/solidity-utils/-/solidity-utils-5.3.0.tgz#8e9bb1a507fdc56f90f79f2011a75325a1dce928" + integrity sha512-Se6jXEug2U2hyqg8L7mxh3kc0oN90FIx2N0ExisF0Hs4+ZyfIeTQD5HNI6pPCBNJLe+XCEig3qnUU1iyq9Qe6g== dependencies: "@metamask/eth-sig-util" "7.0.1" "@nomicfoundation/hardhat-ethers" "3.0.5" From c9bb19a868b0be88a204298001c633c41a4bfc9d Mon Sep 17 00:00:00 2001 From: Denis Date: Tue, 8 Oct 2024 16:01:36 +0100 Subject: [PATCH 2/3] Deploy on all networks except zksync --- deployments/arbitrum/OrderRegistrator.json | 174 +++++++++++++++++ deployments/arbitrum/SafeOrderBuilder.json | 157 +++++++++++++++ deployments/aurora/OrderRegistrator.json | 174 +++++++++++++++++ deployments/aurora/SafeOrderBuilder.json | 157 +++++++++++++++ deployments/avax/OrderRegistrator.json | 174 +++++++++++++++++ deployments/avax/SafeOrderBuilder.json | 157 +++++++++++++++ deployments/base/OrderRegistrator.json | 174 +++++++++++++++++ deployments/base/SafeOrderBuilder.json | 157 +++++++++++++++ deployments/bsc/OrderRegistrator.json | 174 +++++++++++++++++ deployments/bsc/SafeOrderBuilder.json | 157 +++++++++++++++ deployments/fantom/OrderRegistrator.json | 174 +++++++++++++++++ deployments/fantom/SafeOrderBuilder.json | 157 +++++++++++++++ deployments/klaytn/OrderRegistrator.json | 174 +++++++++++++++++ deployments/klaytn/SafeOrderBuilder.json | 157 +++++++++++++++ deployments/mainnet/OrderRegistrator.json | 174 +++++++++++++++++ deployments/mainnet/SafeOrderBuilder.json | 157 +++++++++++++++ deployments/matic/OrderRegistrator.json | 191 +++++++++++++++++++ deployments/matic/SafeOrderBuilder.json | 174 +++++++++++++++++ deployments/optimistic/OrderRegistrator.json | 174 +++++++++++++++++ deployments/optimistic/SafeOrderBuilder.json | 157 +++++++++++++++ deployments/xdai/OrderRegistrator.json | 174 +++++++++++++++++ deployments/xdai/SafeOrderBuilder.json | 157 +++++++++++++++ 22 files changed, 3675 insertions(+) create mode 100644 deployments/arbitrum/OrderRegistrator.json create mode 100644 deployments/arbitrum/SafeOrderBuilder.json create mode 100644 deployments/aurora/OrderRegistrator.json create mode 100644 deployments/aurora/SafeOrderBuilder.json create mode 100644 deployments/avax/OrderRegistrator.json create mode 100644 deployments/avax/SafeOrderBuilder.json create mode 100644 deployments/base/OrderRegistrator.json create mode 100644 deployments/base/SafeOrderBuilder.json create mode 100644 deployments/bsc/OrderRegistrator.json create mode 100644 deployments/bsc/SafeOrderBuilder.json create mode 100644 deployments/fantom/OrderRegistrator.json create mode 100644 deployments/fantom/SafeOrderBuilder.json create mode 100644 deployments/klaytn/OrderRegistrator.json create mode 100644 deployments/klaytn/SafeOrderBuilder.json create mode 100644 deployments/mainnet/OrderRegistrator.json create mode 100644 deployments/mainnet/SafeOrderBuilder.json create mode 100644 deployments/matic/OrderRegistrator.json create mode 100644 deployments/matic/SafeOrderBuilder.json create mode 100644 deployments/optimistic/OrderRegistrator.json create mode 100644 deployments/optimistic/SafeOrderBuilder.json create mode 100644 deployments/xdai/OrderRegistrator.json create mode 100644 deployments/xdai/SafeOrderBuilder.json diff --git a/deployments/arbitrum/OrderRegistrator.json b/deployments/arbitrum/OrderRegistrator.json new file mode 100644 index 00000000..76a9af6a --- /dev/null +++ b/deployments/arbitrum/OrderRegistrator.json @@ -0,0 +1,174 @@ +{ + "address": "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BadSignature", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "OrderRegistered", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "registerOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xd39a201fd0428da93d5753063e9762832758f37a4a517d26b53f85838588daa3", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 3, + "gasUsed": "2029430", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xf72a5724c1ff7f177b6eed91a207a36bc7be9fc79655c1ab7d682add2af90d98", + "transactionHash": "0xd39a201fd0428da93d5753063e9762832758f37a4a517d26b53f85838588daa3", + "logs": [], + "blockNumber": 261690271, + "cumulativeGasUsed": "2363099", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65" + ], + "numDeployments": 1, + "bytecode": "0x60a03461006a57601f6106e738819003918201601f19168301916001600160401b0383118484101761006e5780849260209460405283398101031261006a57516001600160a01b038116810361006a57608052604051610664908161008382396080518161013a0152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033", + "deployedBytecode": "0x6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/arbitrum/SafeOrderBuilder.json b/deployments/arbitrum/SafeOrderBuilder.json new file mode 100644 index 00000000..a93bef00 --- /dev/null +++ b/deployments/arbitrum/SafeOrderBuilder.json @@ -0,0 +1,157 @@ +{ + "address": "0x370De82413251A9d204DCEAB50dB2d7ec3Bd1769", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + }, + { + "internalType": "contract IOrderRegistrator", + "name": "orderRegistrator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + }, + { + "inputs": [], + "name": "StaleOraclePrice", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "makerAssetOracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "takerAssetOracleParams", + "type": "tuple" + } + ], + "name": "buildAndSignOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xc9c259984ef09f741e073b6866245b3985ca4ad6ad1bec82b953774074a9229d", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 2, + "gasUsed": "2602705", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x92324619ca4e9168c2ae157cbf508e53ab95394e4bf57c6f80eed4b8d7bf869e", + "transactionHash": "0xc9c259984ef09f741e073b6866245b3985ca4ad6ad1bec82b953774074a9229d", + "logs": [], + "blockNumber": 261690332, + "cumulativeGasUsed": "2851165", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65", + "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE" + ], + "numDeployments": 1, + "bytecode": "0x60c03461008557601f6109d738819003918201601f19168301916001600160401b038311848410176100895780849260409485528339810103126100855780516001600160a01b03918282168203610085576020015191821682036100855760805260a052604051610939908161009e8239608051816102ac015260a051816104100152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033", + "deployedBytecode": "0x608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/aurora/OrderRegistrator.json b/deployments/aurora/OrderRegistrator.json new file mode 100644 index 00000000..3b1d3844 --- /dev/null +++ b/deployments/aurora/OrderRegistrator.json @@ -0,0 +1,174 @@ +{ + "address": "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BadSignature", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "OrderRegistered", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "registerOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xc88b78b2c5cb741755d17fd672914443ef42710bfa2d05444fdb6f7f7c66323d", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "453380", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xbfc734b666524d9f96b1806e9250479373a7007da531be5b2f18cc9e43882ee4", + "transactionHash": "0xc88b78b2c5cb741755d17fd672914443ef42710bfa2d05444fdb6f7f7c66323d", + "logs": [], + "blockNumber": 129861770, + "cumulativeGasUsed": "0", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65" + ], + "numDeployments": 1, + "bytecode": "0x60a03461006a57601f6106e738819003918201601f19168301916001600160401b0383118484101761006e5780849260209460405283398101031261006a57516001600160a01b038116810361006a57608052604051610664908161008382396080518161013a0152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033", + "deployedBytecode": "0x6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/aurora/SafeOrderBuilder.json b/deployments/aurora/SafeOrderBuilder.json new file mode 100644 index 00000000..4b0ccbb8 --- /dev/null +++ b/deployments/aurora/SafeOrderBuilder.json @@ -0,0 +1,157 @@ +{ + "address": "0x370De82413251A9d204DCEAB50dB2d7ec3Bd1769", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + }, + { + "internalType": "contract IOrderRegistrator", + "name": "orderRegistrator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + }, + { + "inputs": [], + "name": "StaleOraclePrice", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "makerAssetOracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "takerAssetOracleParams", + "type": "tuple" + } + ], + "name": "buildAndSignOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xda03b36575d6da08bce9500407b3d5b6a2f8c4975e88a922783e449c5bdb6c3d", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "608224", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xb43515982e3185c48c9d001d36e7aa812f234a64343cfdc671e50a977fb537ac", + "transactionHash": "0xda03b36575d6da08bce9500407b3d5b6a2f8c4975e88a922783e449c5bdb6c3d", + "logs": [], + "blockNumber": 129861793, + "cumulativeGasUsed": "0", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65", + "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE" + ], + "numDeployments": 1, + "bytecode": "0x60c03461008557601f6109d738819003918201601f19168301916001600160401b038311848410176100895780849260409485528339810103126100855780516001600160a01b03918282168203610085576020015191821682036100855760805260a052604051610939908161009e8239608051816102ac015260a051816104100152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033", + "deployedBytecode": "0x608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/avax/OrderRegistrator.json b/deployments/avax/OrderRegistrator.json new file mode 100644 index 00000000..db77798b --- /dev/null +++ b/deployments/avax/OrderRegistrator.json @@ -0,0 +1,174 @@ +{ + "address": "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BadSignature", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "OrderRegistered", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "registerOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xcf82ce9ff3b124d7d7d3d2eeb64a7c7db600ebd61539a318c39c73343e441d05", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 6, + "gasUsed": "462052", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x203e6eb5f6a7b348e8e61846dab209ac1e9a5f3a5cd45e6e79e3580383120ce0", + "transactionHash": "0xcf82ce9ff3b124d7d7d3d2eeb64a7c7db600ebd61539a318c39c73343e441d05", + "logs": [], + "blockNumber": 51521047, + "cumulativeGasUsed": "1023725", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65" + ], + "numDeployments": 2, + "bytecode": "0x60a03461006a57601f61071338819003918201601f19168301916001600160401b0383118484101761006f5780849260209460405283398101031261006a57516001600160a01b038116810361006a5760805260405161068d908161008682396080518161013f0152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608060405260048036101561001357600080fd5b6000803560e01c63dfcb3e341461002957600080fd5b346102a057610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261029c5761010080911261029c576101049367ffffffffffffffff85358181116102985761008890369084016102a3565b909161012435908111610294576100a290369085016102a3565b9390976100af8385610385565b901561028e575073ffffffffffffffffffffffffffffffffffffffff90602060405180927f802b2ef100000000000000000000000000000000000000000000000000000000825261013b8683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9081156102835786918b918b91610245575b5061018193602435166104c6565b1561021d5750916102087f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc996979261021794876040519889986101fd8a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b890152870191610346565b91848303610120860152610346565b0390a180f35b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020813d60201161027b575b81610262602093836102d6565b81010312610277575185908a90610181610173565b8880fd5b3d9150610255565b6040513d8b823e3d90fd5b88525086fd5b8680fd5b8580fd5b8280fd5b80fd5b9181601f840112156102d15782359167ffffffffffffffff83116102d157602083818601950101116102d157565b600080fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761031757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b9060e4357f0200000000000000000000000000000000000000000000000000000000000000161561049857801561046f5767ffffffffffffffff811161031757604051906103fb60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102d6565b808252602082019236828201116102d1578160009260209286378301015273ffffffffffffffffffffffffffffffffffffffff91829151902016906004351603610448575b600190600090565b6000907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50506000907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610440576000907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561064c57604093848414918215610641575b8261056f575b5050610565576020928260009384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610557575090565b600051143d60201416919050565b5050505050600190565b909150600085518580604114610629576040146105e4575080805b610599575b50161438806104fd565b817f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060830151106105cc575b5061058f565b6080828a6020945282805260015afa505138816105c6565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b85013716606082015261058a565b5086890135821a602082015280878a8183013761058a565b6041851492506104f7565b50505050505060009056fea2646970667358221220b94b95af8db6f1e598624eeabc26783936763a52e45bc427668242757e7eb8a264736f6c63430008170033", + "deployedBytecode": "0x608060405260048036101561001357600080fd5b6000803560e01c63dfcb3e341461002957600080fd5b346102a057610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261029c5761010080911261029c576101049367ffffffffffffffff85358181116102985761008890369084016102a3565b909161012435908111610294576100a290369085016102a3565b9390976100af8385610385565b901561028e575073ffffffffffffffffffffffffffffffffffffffff90602060405180927f802b2ef100000000000000000000000000000000000000000000000000000000825261013b8683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9081156102835786918b918b91610245575b5061018193602435166104c6565b1561021d5750916102087f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc996979261021794876040519889986101fd8a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b890152870191610346565b91848303610120860152610346565b0390a180f35b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020813d60201161027b575b81610262602093836102d6565b81010312610277575185908a90610181610173565b8880fd5b3d9150610255565b6040513d8b823e3d90fd5b88525086fd5b8680fd5b8580fd5b8280fd5b80fd5b9181601f840112156102d15782359167ffffffffffffffff83116102d157602083818601950101116102d157565b600080fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761031757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b9060e4357f0200000000000000000000000000000000000000000000000000000000000000161561049857801561046f5767ffffffffffffffff811161031757604051906103fb60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102d6565b808252602082019236828201116102d1578160009260209286378301015273ffffffffffffffffffffffffffffffffffffffff91829151902016906004351603610448575b600190600090565b6000907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50506000907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610440576000907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561064c57604093848414918215610641575b8261056f575b5050610565576020928260009384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610557575090565b600051143d60201416919050565b5050505050600190565b909150600085518580604114610629576040146105e4575080805b610599575b50161438806104fd565b817f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060830151106105cc575b5061058f565b6080828a6020945282805260015afa505138816105c6565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b85013716606082015261058a565b5086890135821a602082015280878a8183013761058a565b6041851492506104f7565b50505050505060009056fea2646970667358221220b94b95af8db6f1e598624eeabc26783936763a52e45bc427668242757e7eb8a264736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/avax/SafeOrderBuilder.json b/deployments/avax/SafeOrderBuilder.json new file mode 100644 index 00000000..887b288e --- /dev/null +++ b/deployments/avax/SafeOrderBuilder.json @@ -0,0 +1,157 @@ +{ + "address": "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + }, + { + "internalType": "contract IOrderRegistrator", + "name": "orderRegistrator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + }, + { + "inputs": [], + "name": "StaleOraclePrice", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "makerAssetOracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "takerAssetOracleParams", + "type": "tuple" + } + ], + "name": "buildAndSignOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xd097f6e5b0bc903a0f01e5ae68dda1bb7188dea654a95d0acb42d57d8ebd9151", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 3, + "gasUsed": "620250", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0ce6f66294474d805d57f082081c8f245cb3f40655c2bff6eecd8f9add394015", + "transactionHash": "0xd097f6e5b0bc903a0f01e5ae68dda1bb7188dea654a95d0acb42d57d8ebd9151", + "logs": [], + "blockNumber": 51521361, + "cumulativeGasUsed": "952788", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65", + "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE" + ], + "numDeployments": 1, + "bytecode": "0x60c03461008557601f610a0f38819003918201601f19168301916001600160401b0383118484101761008a5780849260409485528339810103126100855780516001600160a01b03918282168203610085576020015191821682036100855760805260a05260405161096e90816100a18239608051816102bf015260a051816104620152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe600436101561000d57600080fd5b6000803560e01c6371db20381461002357600080fd5b3461073d577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e0811261073957610100809112610739576080016080811067ffffffffffffffff82111761058f5760405260043560805260243560a05260443560c05260643560e0526084356101005260a4356101205260c43561014090815260e435610160526101049067ffffffffffffffff8235116106945736602383350112156106945767ffffffffffffffff823560040135116106945736602483356004013584350101116106945760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126106945760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c360112610694576101243573ffffffffffffffffffffffffffffffffffffffff81168091036105c75760405160a0816004817ffeaf968c00000000000000000000000000000000000000000000000000000000958682525afa801561072e5785918691610704575b506101b8906101643590610801565b42116106a05782516101ce91610144359161083d565b8252610184359073ffffffffffffffffffffffffffffffffffffffff82168092036107005760a09060046040518094819382525afa801561063257849185916106ca575b5061022242916101c43590610801565b106106a0576102379082516101a4359061083d565b90526040517f802b2ef1000000000000000000000000000000000000000000000000000000008152608051600482015260a051602482015260c051604482015260e05160648201526101005160848201526101205160a48201526101405160c48201526101605160e4820152602081838173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156105bc57839161066a575b506040519060208201526020815280604081011067ffffffffffffffff60408301111761063d576040818101808252825160208401207f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca6060850152608084015290815267ffffffffffffffff60a0830190811191111761063d5760a08101604081815282015160608301207ff698da2500000000000000000000000000000000000000000000000000000000825290602090600481305afa9182156106325784926105f8575b506040519060208201927f190000000000000000000000000000000000000000000000000000000000000084527f010000000000000000000000000000000000000000000000000000000000000060218401526022830152604282015260428152608081019267ffffffffffffffff84119282851084176105cb57908592918560405282519020835260076020526001604084205573ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b156105c7577fdfcb3e34000000000000000000000000000000000000000000000000000000008652608051608484015260a05160a484015260c05160c484015260e05160e484015261010051610104840152610120516101248401526101405161014484015261016051610164840152859283918591610184918390610140848401528035600401356101c48401527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6101e492803560040135602482350185880137848482356004013588010152356004013501168301838103936101a46101608601910152015201925af180156105bc57610582578280f35b61058f5760405238808280f35b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6040513d85823e3d90fd5b8380fd5b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b9091506020813d60201161062a575b8161061760209360a08401610740565b810103126105c75760a0015190386103b6565b3d9150610607565b6040513d86823e3d90fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b90506020813d602011610698575b8161068560209383610740565b810103126106945751386102ef565b8280fd5b3d9150610678565b60046040517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b90506106ee915060a03d60a0116106f9575b6106e68183610740565b8101906107cc565b509250509038610212565b503d6106dc565b8480fd5b6101b89250610722915060a03d60a0116106f9576106e68183610740565b509392505091906101a9565b6040513d87823e3d90fd5b5080fd5b80fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761078157604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b519069ffffffffffffffffffff821682036107c757565b600080fd5b908160a09103126107c7576107e0816107b0565b916020820151916040810151916107fe6080606084015193016107b0565b90565b9190820180921161080e57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108fb57848311156108d15782910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b505080925015610909570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea264697066735822122042f0077f32eb6326df0ef3dfa7c5e9bc1a9936d60a970762762ad2c7e34f14eb64736f6c63430008170033", + "deployedBytecode": "0x600436101561000d57600080fd5b6000803560e01c6371db20381461002357600080fd5b3461073d577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e0811261073957610100809112610739576080016080811067ffffffffffffffff82111761058f5760405260043560805260243560a05260443560c05260643560e0526084356101005260a4356101205260c43561014090815260e435610160526101049067ffffffffffffffff8235116106945736602383350112156106945767ffffffffffffffff823560040135116106945736602483356004013584350101116106945760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126106945760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c360112610694576101243573ffffffffffffffffffffffffffffffffffffffff81168091036105c75760405160a0816004817ffeaf968c00000000000000000000000000000000000000000000000000000000958682525afa801561072e5785918691610704575b506101b8906101643590610801565b42116106a05782516101ce91610144359161083d565b8252610184359073ffffffffffffffffffffffffffffffffffffffff82168092036107005760a09060046040518094819382525afa801561063257849185916106ca575b5061022242916101c43590610801565b106106a0576102379082516101a4359061083d565b90526040517f802b2ef1000000000000000000000000000000000000000000000000000000008152608051600482015260a051602482015260c051604482015260e05160648201526101005160848201526101205160a48201526101405160c48201526101605160e4820152602081838173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156105bc57839161066a575b506040519060208201526020815280604081011067ffffffffffffffff60408301111761063d576040818101808252825160208401207f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca6060850152608084015290815267ffffffffffffffff60a0830190811191111761063d5760a08101604081815282015160608301207ff698da2500000000000000000000000000000000000000000000000000000000825290602090600481305afa9182156106325784926105f8575b506040519060208201927f190000000000000000000000000000000000000000000000000000000000000084527f010000000000000000000000000000000000000000000000000000000000000060218401526022830152604282015260428152608081019267ffffffffffffffff84119282851084176105cb57908592918560405282519020835260076020526001604084205573ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b156105c7577fdfcb3e34000000000000000000000000000000000000000000000000000000008652608051608484015260a05160a484015260c05160c484015260e05160e484015261010051610104840152610120516101248401526101405161014484015261016051610164840152859283918591610184918390610140848401528035600401356101c48401527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6101e492803560040135602482350185880137848482356004013588010152356004013501168301838103936101a46101608601910152015201925af180156105bc57610582578280f35b61058f5760405238808280f35b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6040513d85823e3d90fd5b8380fd5b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b9091506020813d60201161062a575b8161061760209360a08401610740565b810103126105c75760a0015190386103b6565b3d9150610607565b6040513d86823e3d90fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b90506020813d602011610698575b8161068560209383610740565b810103126106945751386102ef565b8280fd5b3d9150610678565b60046040517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b90506106ee915060a03d60a0116106f9575b6106e68183610740565b8101906107cc565b509250509038610212565b503d6106dc565b8480fd5b6101b89250610722915060a03d60a0116106f9576106e68183610740565b509392505091906101a9565b6040513d87823e3d90fd5b5080fd5b80fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761078157604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b519069ffffffffffffffffffff821682036107c757565b600080fd5b908160a09103126107c7576107e0816107b0565b916020820151916040810151916107fe6080606084015193016107b0565b90565b9190820180921161080e57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108fb57848311156108d15782910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b505080925015610909570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea264697066735822122042f0077f32eb6326df0ef3dfa7c5e9bc1a9936d60a970762762ad2c7e34f14eb64736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/base/OrderRegistrator.json b/deployments/base/OrderRegistrator.json new file mode 100644 index 00000000..7dfa2d9e --- /dev/null +++ b/deployments/base/OrderRegistrator.json @@ -0,0 +1,174 @@ +{ + "address": "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BadSignature", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "OrderRegistered", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "registerOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x335a3c606f7b06306c618a52a6ce5f6e81cc324b07a571056ab964ca603874b3", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 174, + "gasUsed": "453380", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x1d3bc07a7b810a3ea3fcba2cf69096064f438e396aab7604f7bbc4fe2c9c4f7d", + "transactionHash": "0x335a3c606f7b06306c618a52a6ce5f6e81cc324b07a571056ab964ca603874b3", + "logs": [], + "blockNumber": 20804877, + "cumulativeGasUsed": "29371155", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65" + ], + "numDeployments": 1, + "bytecode": "0x60a03461006a57601f6106e738819003918201601f19168301916001600160401b0383118484101761006e5780849260209460405283398101031261006a57516001600160a01b038116810361006a57608052604051610664908161008382396080518161013a0152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033", + "deployedBytecode": "0x6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/base/SafeOrderBuilder.json b/deployments/base/SafeOrderBuilder.json new file mode 100644 index 00000000..fbdbeed4 --- /dev/null +++ b/deployments/base/SafeOrderBuilder.json @@ -0,0 +1,157 @@ +{ + "address": "0x370De82413251A9d204DCEAB50dB2d7ec3Bd1769", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + }, + { + "internalType": "contract IOrderRegistrator", + "name": "orderRegistrator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + }, + { + "inputs": [], + "name": "StaleOraclePrice", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "makerAssetOracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "takerAssetOracleParams", + "type": "tuple" + } + ], + "name": "buildAndSignOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x30afeb0906bf4a03217ae305440d8b2c547c4fc1d635058b97d32df9c0214d44", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 58, + "gasUsed": "608224", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x91696fd5f231802ff268652917fbcdb422d0ba9586c57e483c5c5d6754bbf15a", + "transactionHash": "0x30afeb0906bf4a03217ae305440d8b2c547c4fc1d635058b97d32df9c0214d44", + "logs": [], + "blockNumber": 20804891, + "cumulativeGasUsed": "10990812", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65", + "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE" + ], + "numDeployments": 1, + "bytecode": "0x60c03461008557601f6109d738819003918201601f19168301916001600160401b038311848410176100895780849260409485528339810103126100855780516001600160a01b03918282168203610085576020015191821682036100855760805260a052604051610939908161009e8239608051816102ac015260a051816104100152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033", + "deployedBytecode": "0x608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/bsc/OrderRegistrator.json b/deployments/bsc/OrderRegistrator.json new file mode 100644 index 00000000..5fe92979 --- /dev/null +++ b/deployments/bsc/OrderRegistrator.json @@ -0,0 +1,174 @@ +{ + "address": "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BadSignature", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "OrderRegistered", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "registerOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x32fa70d861393629948109134b5b543b97b86756b257ac94572978f3ef256468", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 76, + "gasUsed": "453380", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0ac6284bea2ce84741416e7bd2d06d23407b7b76e5cb9756f218a11c6c566615", + "transactionHash": "0x32fa70d861393629948109134b5b543b97b86756b257ac94572978f3ef256468", + "logs": [], + "blockNumber": 42939314, + "cumulativeGasUsed": "9001522", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65" + ], + "numDeployments": 1, + "bytecode": "0x60a03461006a57601f6106e738819003918201601f19168301916001600160401b0383118484101761006e5780849260209460405283398101031261006a57516001600160a01b038116810361006a57608052604051610664908161008382396080518161013a0152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033", + "deployedBytecode": "0x6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/bsc/SafeOrderBuilder.json b/deployments/bsc/SafeOrderBuilder.json new file mode 100644 index 00000000..fc2f8aee --- /dev/null +++ b/deployments/bsc/SafeOrderBuilder.json @@ -0,0 +1,157 @@ +{ + "address": "0x370De82413251A9d204DCEAB50dB2d7ec3Bd1769", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + }, + { + "internalType": "contract IOrderRegistrator", + "name": "orderRegistrator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + }, + { + "inputs": [], + "name": "StaleOraclePrice", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "makerAssetOracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "takerAssetOracleParams", + "type": "tuple" + } + ], + "name": "buildAndSignOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x572cb6aefc168d18ee4aee0c0376f51b79bca88b7e41a34935a3c46a4e94da05", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 95, + "gasUsed": "608224", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x55da484bf0be7400752c4cac7615c498eee13ad5a35271cdc5ffc90b6c9df627", + "transactionHash": "0x572cb6aefc168d18ee4aee0c0376f51b79bca88b7e41a34935a3c46a4e94da05", + "logs": [], + "blockNumber": 42939327, + "cumulativeGasUsed": "8353127", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65", + "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE" + ], + "numDeployments": 1, + "bytecode": "0x60c03461008557601f6109d738819003918201601f19168301916001600160401b038311848410176100895780849260409485528339810103126100855780516001600160a01b03918282168203610085576020015191821682036100855760805260a052604051610939908161009e8239608051816102ac015260a051816104100152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033", + "deployedBytecode": "0x608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/fantom/OrderRegistrator.json b/deployments/fantom/OrderRegistrator.json new file mode 100644 index 00000000..103b096e --- /dev/null +++ b/deployments/fantom/OrderRegistrator.json @@ -0,0 +1,174 @@ +{ + "address": "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BadSignature", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "OrderRegistered", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "registerOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x67883bb8ef4a0e7b6a628fee38e7b4416ec67855439948234440c20c0624b5db", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 2, + "gasUsed": "462532", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0004ba7c000010462ca0cbf5d90719584312067b6ccb2459928ec14bd1b2ea44", + "transactionHash": "0x67883bb8ef4a0e7b6a628fee38e7b4416ec67855439948234440c20c0624b5db", + "logs": [], + "blockNumber": 93992178, + "cumulativeGasUsed": "2262205", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65" + ], + "numDeployments": 1, + "bytecode": "0x60a03461006a57601f61071338819003918201601f19168301916001600160401b0383118484101761006f5780849260209460405283398101031261006a57516001600160a01b038116810361006a5760805260405161068d908161008682396080518161013f0152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608060405260048036101561001357600080fd5b6000803560e01c63dfcb3e341461002957600080fd5b346102a057610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261029c5761010080911261029c576101049367ffffffffffffffff85358181116102985761008890369084016102a3565b909161012435908111610294576100a290369085016102a3565b9390976100af8385610385565b901561028e575073ffffffffffffffffffffffffffffffffffffffff90602060405180927f802b2ef100000000000000000000000000000000000000000000000000000000825261013b8683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9081156102835786918b918b91610245575b5061018193602435166104c6565b1561021d5750916102087f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc996979261021794876040519889986101fd8a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b890152870191610346565b91848303610120860152610346565b0390a180f35b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020813d60201161027b575b81610262602093836102d6565b81010312610277575185908a90610181610173565b8880fd5b3d9150610255565b6040513d8b823e3d90fd5b88525086fd5b8680fd5b8580fd5b8280fd5b80fd5b9181601f840112156102d15782359167ffffffffffffffff83116102d157602083818601950101116102d157565b600080fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761031757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b9060e4357f0200000000000000000000000000000000000000000000000000000000000000161561049857801561046f5767ffffffffffffffff811161031757604051906103fb60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102d6565b808252602082019236828201116102d1578160009260209286378301015273ffffffffffffffffffffffffffffffffffffffff91829151902016906004351603610448575b600190600090565b6000907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50506000907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610440576000907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561064c57604093848414918215610641575b8261056f575b5050610565576020928260009384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610557575090565b600051143d60201416919050565b5050505050600190565b909150600085518580604114610629576040146105e4575080805b610599575b50161438806104fd565b817f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060830151106105cc575b5061058f565b6080828a6020945282805260015afa505138816105c6565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b85013716606082015261058a565b5086890135821a602082015280878a8183013761058a565b6041851492506104f7565b50505050505060009056fea2646970667358221220b94b95af8db6f1e598624eeabc26783936763a52e45bc427668242757e7eb8a264736f6c63430008170033", + "deployedBytecode": "0x608060405260048036101561001357600080fd5b6000803560e01c63dfcb3e341461002957600080fd5b346102a057610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261029c5761010080911261029c576101049367ffffffffffffffff85358181116102985761008890369084016102a3565b909161012435908111610294576100a290369085016102a3565b9390976100af8385610385565b901561028e575073ffffffffffffffffffffffffffffffffffffffff90602060405180927f802b2ef100000000000000000000000000000000000000000000000000000000825261013b8683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9081156102835786918b918b91610245575b5061018193602435166104c6565b1561021d5750916102087f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc996979261021794876040519889986101fd8a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b890152870191610346565b91848303610120860152610346565b0390a180f35b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020813d60201161027b575b81610262602093836102d6565b81010312610277575185908a90610181610173565b8880fd5b3d9150610255565b6040513d8b823e3d90fd5b88525086fd5b8680fd5b8580fd5b8280fd5b80fd5b9181601f840112156102d15782359167ffffffffffffffff83116102d157602083818601950101116102d157565b600080fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761031757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b9060e4357f0200000000000000000000000000000000000000000000000000000000000000161561049857801561046f5767ffffffffffffffff811161031757604051906103fb60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102d6565b808252602082019236828201116102d1578160009260209286378301015273ffffffffffffffffffffffffffffffffffffffff91829151902016906004351603610448575b600190600090565b6000907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50506000907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610440576000907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561064c57604093848414918215610641575b8261056f575b5050610565576020928260009384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610557575090565b600051143d60201416919050565b5050505050600190565b909150600085518580604114610629576040146105e4575080805b610599575b50161438806104fd565b817f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060830151106105cc575b5061058f565b6080828a6020945282805260015afa505138816105c6565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b85013716606082015261058a565b5086890135821a602082015280878a8183013761058a565b6041851492506104f7565b50505050505060009056fea2646970667358221220b94b95af8db6f1e598624eeabc26783936763a52e45bc427668242757e7eb8a264736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/fantom/SafeOrderBuilder.json b/deployments/fantom/SafeOrderBuilder.json new file mode 100644 index 00000000..0f8c7c6e --- /dev/null +++ b/deployments/fantom/SafeOrderBuilder.json @@ -0,0 +1,157 @@ +{ + "address": "0x370De82413251A9d204DCEAB50dB2d7ec3Bd1769", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + }, + { + "internalType": "contract IOrderRegistrator", + "name": "orderRegistrator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + }, + { + "inputs": [], + "name": "StaleOraclePrice", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "makerAssetOracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "takerAssetOracleParams", + "type": "tuple" + } + ], + "name": "buildAndSignOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x75a8b1b89875c8457a3ffab33b3713e1b032843acd2e67067f48870c6a4d1ec5", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "621153", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x0004ba7c000011c6d4585845a139d4a30076a072b3997043e4979baf4428c19d", + "transactionHash": "0x75a8b1b89875c8457a3ffab33b3713e1b032843acd2e67067f48870c6a4d1ec5", + "logs": [], + "blockNumber": 93992202, + "cumulativeGasUsed": "621153", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65", + "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE" + ], + "numDeployments": 1, + "bytecode": "0x60c03461008557601f610a0f38819003918201601f19168301916001600160401b0383118484101761008a5780849260409485528339810103126100855780516001600160a01b03918282168203610085576020015191821682036100855760805260a05260405161096e90816100a18239608051816102bf015260a051816104620152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe600436101561000d57600080fd5b6000803560e01c6371db20381461002357600080fd5b3461073d577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e0811261073957610100809112610739576080016080811067ffffffffffffffff82111761058f5760405260043560805260243560a05260443560c05260643560e0526084356101005260a4356101205260c43561014090815260e435610160526101049067ffffffffffffffff8235116106945736602383350112156106945767ffffffffffffffff823560040135116106945736602483356004013584350101116106945760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126106945760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c360112610694576101243573ffffffffffffffffffffffffffffffffffffffff81168091036105c75760405160a0816004817ffeaf968c00000000000000000000000000000000000000000000000000000000958682525afa801561072e5785918691610704575b506101b8906101643590610801565b42116106a05782516101ce91610144359161083d565b8252610184359073ffffffffffffffffffffffffffffffffffffffff82168092036107005760a09060046040518094819382525afa801561063257849185916106ca575b5061022242916101c43590610801565b106106a0576102379082516101a4359061083d565b90526040517f802b2ef1000000000000000000000000000000000000000000000000000000008152608051600482015260a051602482015260c051604482015260e05160648201526101005160848201526101205160a48201526101405160c48201526101605160e4820152602081838173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156105bc57839161066a575b506040519060208201526020815280604081011067ffffffffffffffff60408301111761063d576040818101808252825160208401207f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca6060850152608084015290815267ffffffffffffffff60a0830190811191111761063d5760a08101604081815282015160608301207ff698da2500000000000000000000000000000000000000000000000000000000825290602090600481305afa9182156106325784926105f8575b506040519060208201927f190000000000000000000000000000000000000000000000000000000000000084527f010000000000000000000000000000000000000000000000000000000000000060218401526022830152604282015260428152608081019267ffffffffffffffff84119282851084176105cb57908592918560405282519020835260076020526001604084205573ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b156105c7577fdfcb3e34000000000000000000000000000000000000000000000000000000008652608051608484015260a05160a484015260c05160c484015260e05160e484015261010051610104840152610120516101248401526101405161014484015261016051610164840152859283918591610184918390610140848401528035600401356101c48401527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6101e492803560040135602482350185880137848482356004013588010152356004013501168301838103936101a46101608601910152015201925af180156105bc57610582578280f35b61058f5760405238808280f35b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6040513d85823e3d90fd5b8380fd5b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b9091506020813d60201161062a575b8161061760209360a08401610740565b810103126105c75760a0015190386103b6565b3d9150610607565b6040513d86823e3d90fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b90506020813d602011610698575b8161068560209383610740565b810103126106945751386102ef565b8280fd5b3d9150610678565b60046040517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b90506106ee915060a03d60a0116106f9575b6106e68183610740565b8101906107cc565b509250509038610212565b503d6106dc565b8480fd5b6101b89250610722915060a03d60a0116106f9576106e68183610740565b509392505091906101a9565b6040513d87823e3d90fd5b5080fd5b80fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761078157604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b519069ffffffffffffffffffff821682036107c757565b600080fd5b908160a09103126107c7576107e0816107b0565b916020820151916040810151916107fe6080606084015193016107b0565b90565b9190820180921161080e57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108fb57848311156108d15782910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b505080925015610909570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea264697066735822122042f0077f32eb6326df0ef3dfa7c5e9bc1a9936d60a970762762ad2c7e34f14eb64736f6c63430008170033", + "deployedBytecode": "0x600436101561000d57600080fd5b6000803560e01c6371db20381461002357600080fd5b3461073d577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e0811261073957610100809112610739576080016080811067ffffffffffffffff82111761058f5760405260043560805260243560a05260443560c05260643560e0526084356101005260a4356101205260c43561014090815260e435610160526101049067ffffffffffffffff8235116106945736602383350112156106945767ffffffffffffffff823560040135116106945736602483356004013584350101116106945760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126106945760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c360112610694576101243573ffffffffffffffffffffffffffffffffffffffff81168091036105c75760405160a0816004817ffeaf968c00000000000000000000000000000000000000000000000000000000958682525afa801561072e5785918691610704575b506101b8906101643590610801565b42116106a05782516101ce91610144359161083d565b8252610184359073ffffffffffffffffffffffffffffffffffffffff82168092036107005760a09060046040518094819382525afa801561063257849185916106ca575b5061022242916101c43590610801565b106106a0576102379082516101a4359061083d565b90526040517f802b2ef1000000000000000000000000000000000000000000000000000000008152608051600482015260a051602482015260c051604482015260e05160648201526101005160848201526101205160a48201526101405160c48201526101605160e4820152602081838173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156105bc57839161066a575b506040519060208201526020815280604081011067ffffffffffffffff60408301111761063d576040818101808252825160208401207f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca6060850152608084015290815267ffffffffffffffff60a0830190811191111761063d5760a08101604081815282015160608301207ff698da2500000000000000000000000000000000000000000000000000000000825290602090600481305afa9182156106325784926105f8575b506040519060208201927f190000000000000000000000000000000000000000000000000000000000000084527f010000000000000000000000000000000000000000000000000000000000000060218401526022830152604282015260428152608081019267ffffffffffffffff84119282851084176105cb57908592918560405282519020835260076020526001604084205573ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b156105c7577fdfcb3e34000000000000000000000000000000000000000000000000000000008652608051608484015260a05160a484015260c05160c484015260e05160e484015261010051610104840152610120516101248401526101405161014484015261016051610164840152859283918591610184918390610140848401528035600401356101c48401527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6101e492803560040135602482350185880137848482356004013588010152356004013501168301838103936101a46101608601910152015201925af180156105bc57610582578280f35b61058f5760405238808280f35b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6040513d85823e3d90fd5b8380fd5b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b9091506020813d60201161062a575b8161061760209360a08401610740565b810103126105c75760a0015190386103b6565b3d9150610607565b6040513d86823e3d90fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b90506020813d602011610698575b8161068560209383610740565b810103126106945751386102ef565b8280fd5b3d9150610678565b60046040517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b90506106ee915060a03d60a0116106f9575b6106e68183610740565b8101906107cc565b509250509038610212565b503d6106dc565b8480fd5b6101b89250610722915060a03d60a0116106f9576106e68183610740565b509392505091906101a9565b6040513d87823e3d90fd5b5080fd5b80fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761078157604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b519069ffffffffffffffffffff821682036107c757565b600080fd5b908160a09103126107c7576107e0816107b0565b916020820151916040810151916107fe6080606084015193016107b0565b90565b9190820180921161080e57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108fb57848311156108d15782910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b505080925015610909570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea264697066735822122042f0077f32eb6326df0ef3dfa7c5e9bc1a9936d60a970762762ad2c7e34f14eb64736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/klaytn/OrderRegistrator.json b/deployments/klaytn/OrderRegistrator.json new file mode 100644 index 00000000..81e33bc1 --- /dev/null +++ b/deployments/klaytn/OrderRegistrator.json @@ -0,0 +1,174 @@ +{ + "address": "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BadSignature", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "OrderRegistered", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "registerOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x9dc7caff70cb43afe5ca876647eab2e763141435f27b23c3196f0dcb99863733", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "630892", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xee19781c13bd72c0d955e7215a282cd0ba1ae5a6738fed9473815dbf75347676", + "transactionHash": "0x9dc7caff70cb43afe5ca876647eab2e763141435f27b23c3196f0dcb99863733", + "logs": [], + "blockNumber": 166394264, + "cumulativeGasUsed": "630892", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65" + ], + "numDeployments": 1, + "bytecode": "0x60a03461006a57601f61071338819003918201601f19168301916001600160401b0383118484101761006f5780849260209460405283398101031261006a57516001600160a01b038116810361006a5760805260405161068d908161008682396080518161013f0152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608060405260048036101561001357600080fd5b6000803560e01c63dfcb3e341461002957600080fd5b346102a057610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261029c5761010080911261029c576101049367ffffffffffffffff85358181116102985761008890369084016102a3565b909161012435908111610294576100a290369085016102a3565b9390976100af8385610385565b901561028e575073ffffffffffffffffffffffffffffffffffffffff90602060405180927f802b2ef100000000000000000000000000000000000000000000000000000000825261013b8683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9081156102835786918b918b91610245575b5061018193602435166104c6565b1561021d5750916102087f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc996979261021794876040519889986101fd8a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b890152870191610346565b91848303610120860152610346565b0390a180f35b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020813d60201161027b575b81610262602093836102d6565b81010312610277575185908a90610181610173565b8880fd5b3d9150610255565b6040513d8b823e3d90fd5b88525086fd5b8680fd5b8580fd5b8280fd5b80fd5b9181601f840112156102d15782359167ffffffffffffffff83116102d157602083818601950101116102d157565b600080fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761031757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b9060e4357f0200000000000000000000000000000000000000000000000000000000000000161561049857801561046f5767ffffffffffffffff811161031757604051906103fb60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102d6565b808252602082019236828201116102d1578160009260209286378301015273ffffffffffffffffffffffffffffffffffffffff91829151902016906004351603610448575b600190600090565b6000907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50506000907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610440576000907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561064c57604093848414918215610641575b8261056f575b5050610565576020928260009384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610557575090565b600051143d60201416919050565b5050505050600190565b909150600085518580604114610629576040146105e4575080805b610599575b50161438806104fd565b817f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060830151106105cc575b5061058f565b6080828a6020945282805260015afa505138816105c6565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b85013716606082015261058a565b5086890135821a602082015280878a8183013761058a565b6041851492506104f7565b50505050505060009056fea2646970667358221220b94b95af8db6f1e598624eeabc26783936763a52e45bc427668242757e7eb8a264736f6c63430008170033", + "deployedBytecode": "0x608060405260048036101561001357600080fd5b6000803560e01c63dfcb3e341461002957600080fd5b346102a057610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261029c5761010080911261029c576101049367ffffffffffffffff85358181116102985761008890369084016102a3565b909161012435908111610294576100a290369085016102a3565b9390976100af8385610385565b901561028e575073ffffffffffffffffffffffffffffffffffffffff90602060405180927f802b2ef100000000000000000000000000000000000000000000000000000000825261013b8683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9081156102835786918b918b91610245575b5061018193602435166104c6565b1561021d5750916102087f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc996979261021794876040519889986101fd8a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b890152870191610346565b91848303610120860152610346565b0390a180f35b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020813d60201161027b575b81610262602093836102d6565b81010312610277575185908a90610181610173565b8880fd5b3d9150610255565b6040513d8b823e3d90fd5b88525086fd5b8680fd5b8580fd5b8280fd5b80fd5b9181601f840112156102d15782359167ffffffffffffffff83116102d157602083818601950101116102d157565b600080fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761031757604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b9060e4357f0200000000000000000000000000000000000000000000000000000000000000161561049857801561046f5767ffffffffffffffff811161031757604051906103fb60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102d6565b808252602082019236828201116102d1578160009260209286378301015273ffffffffffffffffffffffffffffffffffffffff91829151902016906004351603610448575b600190600090565b6000907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50506000907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610440576000907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561064c57604093848414918215610641575b8261056f575b5050610565576020928260009384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610557575090565b600051143d60201416919050565b5050505050600190565b909150600085518580604114610629576040146105e4575080805b610599575b50161438806104fd565b817f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060830151106105cc575b5061058f565b6080828a6020945282805260015afa505138816105c6565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b85013716606082015261058a565b5086890135821a602082015280878a8183013761058a565b6041851492506104f7565b50505050505060009056fea2646970667358221220b94b95af8db6f1e598624eeabc26783936763a52e45bc427668242757e7eb8a264736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/klaytn/SafeOrderBuilder.json b/deployments/klaytn/SafeOrderBuilder.json new file mode 100644 index 00000000..6c3e463b --- /dev/null +++ b/deployments/klaytn/SafeOrderBuilder.json @@ -0,0 +1,157 @@ +{ + "address": "0x370De82413251A9d204DCEAB50dB2d7ec3Bd1769", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + }, + { + "internalType": "contract IOrderRegistrator", + "name": "orderRegistrator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + }, + { + "inputs": [], + "name": "StaleOraclePrice", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "makerAssetOracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "takerAssetOracleParams", + "type": "tuple" + } + ], + "name": "buildAndSignOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xe81b5f00f881bca7795000037924cd2c06b16934cd0a0df47db4eabfb1b97218", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "858882", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xdeadbf10fd1ff779c435b9784654d191c9713ca0bdb9d93ff9d0284a3341f0d9", + "transactionHash": "0xe81b5f00f881bca7795000037924cd2c06b16934cd0a0df47db4eabfb1b97218", + "logs": [], + "blockNumber": 166394338, + "cumulativeGasUsed": "858882", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65", + "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE" + ], + "numDeployments": 1, + "bytecode": "0x60c03461008557601f610a0f38819003918201601f19168301916001600160401b0383118484101761008a5780849260409485528339810103126100855780516001600160a01b03918282168203610085576020015191821682036100855760805260a05260405161096e90816100a18239608051816102bf015260a051816104620152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe600436101561000d57600080fd5b6000803560e01c6371db20381461002357600080fd5b3461073d577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e0811261073957610100809112610739576080016080811067ffffffffffffffff82111761058f5760405260043560805260243560a05260443560c05260643560e0526084356101005260a4356101205260c43561014090815260e435610160526101049067ffffffffffffffff8235116106945736602383350112156106945767ffffffffffffffff823560040135116106945736602483356004013584350101116106945760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126106945760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c360112610694576101243573ffffffffffffffffffffffffffffffffffffffff81168091036105c75760405160a0816004817ffeaf968c00000000000000000000000000000000000000000000000000000000958682525afa801561072e5785918691610704575b506101b8906101643590610801565b42116106a05782516101ce91610144359161083d565b8252610184359073ffffffffffffffffffffffffffffffffffffffff82168092036107005760a09060046040518094819382525afa801561063257849185916106ca575b5061022242916101c43590610801565b106106a0576102379082516101a4359061083d565b90526040517f802b2ef1000000000000000000000000000000000000000000000000000000008152608051600482015260a051602482015260c051604482015260e05160648201526101005160848201526101205160a48201526101405160c48201526101605160e4820152602081838173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156105bc57839161066a575b506040519060208201526020815280604081011067ffffffffffffffff60408301111761063d576040818101808252825160208401207f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca6060850152608084015290815267ffffffffffffffff60a0830190811191111761063d5760a08101604081815282015160608301207ff698da2500000000000000000000000000000000000000000000000000000000825290602090600481305afa9182156106325784926105f8575b506040519060208201927f190000000000000000000000000000000000000000000000000000000000000084527f010000000000000000000000000000000000000000000000000000000000000060218401526022830152604282015260428152608081019267ffffffffffffffff84119282851084176105cb57908592918560405282519020835260076020526001604084205573ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b156105c7577fdfcb3e34000000000000000000000000000000000000000000000000000000008652608051608484015260a05160a484015260c05160c484015260e05160e484015261010051610104840152610120516101248401526101405161014484015261016051610164840152859283918591610184918390610140848401528035600401356101c48401527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6101e492803560040135602482350185880137848482356004013588010152356004013501168301838103936101a46101608601910152015201925af180156105bc57610582578280f35b61058f5760405238808280f35b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6040513d85823e3d90fd5b8380fd5b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b9091506020813d60201161062a575b8161061760209360a08401610740565b810103126105c75760a0015190386103b6565b3d9150610607565b6040513d86823e3d90fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b90506020813d602011610698575b8161068560209383610740565b810103126106945751386102ef565b8280fd5b3d9150610678565b60046040517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b90506106ee915060a03d60a0116106f9575b6106e68183610740565b8101906107cc565b509250509038610212565b503d6106dc565b8480fd5b6101b89250610722915060a03d60a0116106f9576106e68183610740565b509392505091906101a9565b6040513d87823e3d90fd5b5080fd5b80fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761078157604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b519069ffffffffffffffffffff821682036107c757565b600080fd5b908160a09103126107c7576107e0816107b0565b916020820151916040810151916107fe6080606084015193016107b0565b90565b9190820180921161080e57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108fb57848311156108d15782910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b505080925015610909570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea264697066735822122042f0077f32eb6326df0ef3dfa7c5e9bc1a9936d60a970762762ad2c7e34f14eb64736f6c63430008170033", + "deployedBytecode": "0x600436101561000d57600080fd5b6000803560e01c6371db20381461002357600080fd5b3461073d577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e0811261073957610100809112610739576080016080811067ffffffffffffffff82111761058f5760405260043560805260243560a05260443560c05260643560e0526084356101005260a4356101205260c43561014090815260e435610160526101049067ffffffffffffffff8235116106945736602383350112156106945767ffffffffffffffff823560040135116106945736602483356004013584350101116106945760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126106945760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c360112610694576101243573ffffffffffffffffffffffffffffffffffffffff81168091036105c75760405160a0816004817ffeaf968c00000000000000000000000000000000000000000000000000000000958682525afa801561072e5785918691610704575b506101b8906101643590610801565b42116106a05782516101ce91610144359161083d565b8252610184359073ffffffffffffffffffffffffffffffffffffffff82168092036107005760a09060046040518094819382525afa801561063257849185916106ca575b5061022242916101c43590610801565b106106a0576102379082516101a4359061083d565b90526040517f802b2ef1000000000000000000000000000000000000000000000000000000008152608051600482015260a051602482015260c051604482015260e05160648201526101005160848201526101205160a48201526101405160c48201526101605160e4820152602081838173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa9081156105bc57839161066a575b506040519060208201526020815280604081011067ffffffffffffffff60408301111761063d576040818101808252825160208401207f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca6060850152608084015290815267ffffffffffffffff60a0830190811191111761063d5760a08101604081815282015160608301207ff698da2500000000000000000000000000000000000000000000000000000000825290602090600481305afa9182156106325784926105f8575b506040519060208201927f190000000000000000000000000000000000000000000000000000000000000084527f010000000000000000000000000000000000000000000000000000000000000060218401526022830152604282015260428152608081019267ffffffffffffffff84119282851084176105cb57908592918560405282519020835260076020526001604084205573ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690813b156105c7577fdfcb3e34000000000000000000000000000000000000000000000000000000008652608051608484015260a05160a484015260c05160c484015260e05160e484015261010051610104840152610120516101248401526101405161014484015261016051610164840152859283918591610184918390610140848401528035600401356101c48401527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f6101e492803560040135602482350185880137848482356004013588010152356004013501168301838103936101a46101608601910152015201925af180156105bc57610582578280f35b61058f5760405238808280f35b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6040513d85823e3d90fd5b8380fd5b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b9091506020813d60201161062a575b8161061760209360a08401610740565b810103126105c75760a0015190386103b6565b3d9150610607565b6040513d86823e3d90fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b90506020813d602011610698575b8161068560209383610740565b810103126106945751386102ef565b8280fd5b3d9150610678565b60046040517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b90506106ee915060a03d60a0116106f9575b6106e68183610740565b8101906107cc565b509250509038610212565b503d6106dc565b8480fd5b6101b89250610722915060a03d60a0116106f9576106e68183610740565b509392505091906101a9565b6040513d87823e3d90fd5b5080fd5b80fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761078157604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b519069ffffffffffffffffffff821682036107c757565b600080fd5b908160a09103126107c7576107e0816107b0565b916020820151916040810151916107fe6080606084015193016107b0565b90565b9190820180921161080e57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108fb57848311156108d15782910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b505080925015610909570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea264697066735822122042f0077f32eb6326df0ef3dfa7c5e9bc1a9936d60a970762762ad2c7e34f14eb64736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/mainnet/OrderRegistrator.json b/deployments/mainnet/OrderRegistrator.json new file mode 100644 index 00000000..976bae2e --- /dev/null +++ b/deployments/mainnet/OrderRegistrator.json @@ -0,0 +1,174 @@ +{ + "address": "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BadSignature", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "OrderRegistered", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "registerOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x36ccf87547b5e9da562cd5a0d7b85709a54f4069fd44db6d54d2dfd0a3883415", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 26, + "gasUsed": "453380", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xfb1b84df9c965ff964cffdd25b54596f1282d673985cd222d8e91f4c660aac68", + "transactionHash": "0x36ccf87547b5e9da562cd5a0d7b85709a54f4069fd44db6d54d2dfd0a3883415", + "logs": [], + "blockNumber": 20921492, + "cumulativeGasUsed": "4357388", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65" + ], + "numDeployments": 1, + "bytecode": "0x60a03461006a57601f6106e738819003918201601f19168301916001600160401b0383118484101761006e5780849260209460405283398101031261006a57516001600160a01b038116810361006a57608052604051610664908161008382396080518161013a0152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033", + "deployedBytecode": "0x6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/mainnet/SafeOrderBuilder.json b/deployments/mainnet/SafeOrderBuilder.json new file mode 100644 index 00000000..bf188e3a --- /dev/null +++ b/deployments/mainnet/SafeOrderBuilder.json @@ -0,0 +1,157 @@ +{ + "address": "0x370De82413251A9d204DCEAB50dB2d7ec3Bd1769", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + }, + { + "internalType": "contract IOrderRegistrator", + "name": "orderRegistrator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + }, + { + "inputs": [], + "name": "StaleOraclePrice", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "makerAssetOracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "takerAssetOracleParams", + "type": "tuple" + } + ], + "name": "buildAndSignOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x6a3b3f829f5532c8adc0cf0696bb9cf2e879f1166950f914976b4cd6ea450502", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 59, + "gasUsed": "608224", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x7e159bb07f88134d63c53ffa7ec0b5fc993ffde5e91223a04d960091f9829c5e", + "transactionHash": "0x6a3b3f829f5532c8adc0cf0696bb9cf2e879f1166950f914976b4cd6ea450502", + "logs": [], + "blockNumber": 20921499, + "cumulativeGasUsed": "7832253", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65", + "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE" + ], + "numDeployments": 1, + "bytecode": "0x60c03461008557601f6109d738819003918201601f19168301916001600160401b038311848410176100895780849260409485528339810103126100855780516001600160a01b03918282168203610085576020015191821682036100855760805260a052604051610939908161009e8239608051816102ac015260a051816104100152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033", + "deployedBytecode": "0x608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/matic/OrderRegistrator.json b/deployments/matic/OrderRegistrator.json new file mode 100644 index 00000000..db56d1bd --- /dev/null +++ b/deployments/matic/OrderRegistrator.json @@ -0,0 +1,191 @@ +{ + "address": "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BadSignature", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "OrderRegistered", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "registerOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x95027dc5fba1a256e197e8d7eeb421d410fbd6f216894137c8f8595ad0a3c806", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 21, + "gasUsed": "453380", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000008000008000000000000000000000000000000000008000000000000000800000000000000000000100000000000000000000000000000000000000000000000000000800100080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000002000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x3ff6f96478c42d1693f19ad26b986bdff3b98c9132e7d7510832fc8131587bac", + "transactionHash": "0x95027dc5fba1a256e197e8d7eeb421d410fbd6f216894137c8f8595ad0a3c806", + "logs": [ + { + "_type": "log", + "address": "0x0000000000000000000000000000000000001010", + "blockHash": "0x3ff6f96478c42d1693f19ad26b986bdff3b98c9132e7d7510832fc8131587bac", + "blockNumber": 62787690, + "data": "0x0000000000000000000000000000000000000000000000000050893f6049cbd000000000000000000000000000000000000000000000000710408d2faf55f66a000000000000000000000000000000000000000000000b67b2af0e8781dd851e0000000000000000000000000000000000000000000000070ff003f04f0c2a9a000000000000000000000000000000000000000000000b67b2ff97c6e22750ee", + "index": 123, + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x00000000000000000000000056e44874f624ebde6efcc783efd685f0fbdc6dcf", + "0x00000000000000000000000083d69448f88bf9c701c1b93f43e1f753d39b2632" + ], + "transactionHash": "0x95027dc5fba1a256e197e8d7eeb421d410fbd6f216894137c8f8595ad0a3c806", + "transactionIndex": 21 + } + ], + "blockNumber": 62787690, + "cumulativeGasUsed": "4580480", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65" + ], + "numDeployments": 1, + "bytecode": "0x60a03461006a57601f6106e738819003918201601f19168301916001600160401b0383118484101761006e5780849260209460405283398101031261006a57516001600160a01b038116810361006a57608052604051610664908161008382396080518161013a0152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033", + "deployedBytecode": "0x6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/matic/SafeOrderBuilder.json b/deployments/matic/SafeOrderBuilder.json new file mode 100644 index 00000000..344774c1 --- /dev/null +++ b/deployments/matic/SafeOrderBuilder.json @@ -0,0 +1,174 @@ +{ + "address": "0x370De82413251A9d204DCEAB50dB2d7ec3Bd1769", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + }, + { + "internalType": "contract IOrderRegistrator", + "name": "orderRegistrator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + }, + { + "inputs": [], + "name": "StaleOraclePrice", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "makerAssetOracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "takerAssetOracleParams", + "type": "tuple" + } + ], + "name": "buildAndSignOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x450e76a310efa6354dccc9b0a04bbeec3d979502bb86f2dd2684076ec05e9e42", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 51, + "gasUsed": "608224", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000004000000008000008000000000000000000000000000000000000000000000000000800000000000400000000100000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000200000000002000000000000000000000000000000000000000000000000004000000000000000000001000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000100000", + "blockHash": "0x4ecf9c52a1ce9e1df6b4bfafca0227a868a7708453a87f5563f12b9be9c28ed9", + "transactionHash": "0x450e76a310efa6354dccc9b0a04bbeec3d979502bb86f2dd2684076ec05e9e42", + "logs": [ + { + "_type": "log", + "address": "0x0000000000000000000000000000000000001010", + "blockHash": "0x4ecf9c52a1ce9e1df6b4bfafca0227a868a7708453a87f5563f12b9be9c28ed9", + "blockNumber": 62787705, + "data": "0x000000000000000000000000000000000000000000000000004dca5aacb300000000000000000000000000000000000000000000000000070ff003d8b0038f3600000000000000000000000000000000000000000003384e3fe71e22be0ba6bf0000000000000000000000000000000000000000000000070fa2397e03508f3600000000000000000000000000000000000000000003384e4034e87d6abea6bf", + "index": 269, + "topics": [ + "0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63", + "0x0000000000000000000000000000000000000000000000000000000000001010", + "0x00000000000000000000000056e44874f624ebde6efcc783efd685f0fbdc6dcf", + "0x0000000000000000000000007c7379531b2aee82e4ca06d4175d13b9cbeafd49" + ], + "transactionHash": "0x450e76a310efa6354dccc9b0a04bbeec3d979502bb86f2dd2684076ec05e9e42", + "transactionIndex": 51 + } + ], + "blockNumber": 62787705, + "cumulativeGasUsed": "9378852", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65", + "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE" + ], + "numDeployments": 1, + "bytecode": "0x60c03461008557601f6109d738819003918201601f19168301916001600160401b038311848410176100895780849260409485528339810103126100855780516001600160a01b03918282168203610085576020015191821682036100855760805260a052604051610939908161009e8239608051816102ac015260a051816104100152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033", + "deployedBytecode": "0x608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/optimistic/OrderRegistrator.json b/deployments/optimistic/OrderRegistrator.json new file mode 100644 index 00000000..101e3569 --- /dev/null +++ b/deployments/optimistic/OrderRegistrator.json @@ -0,0 +1,174 @@ +{ + "address": "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BadSignature", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "OrderRegistered", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "registerOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x3c1c938fc67882a7a5bf635632405bfc0d5bf2f8e41eeeb9f7d137b105463a10", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 44, + "gasUsed": "453380", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x992385636d4cd1dfd20a1ed4e6d5f835b99f87ce033ca36aedae1101bf0b27ec", + "transactionHash": "0x3c1c938fc67882a7a5bf635632405bfc0d5bf2f8e41eeeb9f7d137b105463a10", + "logs": [], + "blockNumber": 126398771, + "cumulativeGasUsed": "9599411", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65" + ], + "numDeployments": 1, + "bytecode": "0x60a03461006a57601f6106e738819003918201601f19168301916001600160401b0383118484101761006e5780849260209460405283398101031261006a57516001600160a01b038116810361006a57608052604051610664908161008382396080518161013a0152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033", + "deployedBytecode": "0x6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/optimistic/SafeOrderBuilder.json b/deployments/optimistic/SafeOrderBuilder.json new file mode 100644 index 00000000..bfc776a6 --- /dev/null +++ b/deployments/optimistic/SafeOrderBuilder.json @@ -0,0 +1,157 @@ +{ + "address": "0x370De82413251A9d204DCEAB50dB2d7ec3Bd1769", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + }, + { + "internalType": "contract IOrderRegistrator", + "name": "orderRegistrator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + }, + { + "inputs": [], + "name": "StaleOraclePrice", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "makerAssetOracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "takerAssetOracleParams", + "type": "tuple" + } + ], + "name": "buildAndSignOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xd0aaac1c8c33c9af4fab1b8a322098e12538fc22d4dc785231dd415fd0dded52", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 22, + "gasUsed": "608224", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xc801094e6e99fb07d7f770be21bea2c7675254b19037facd75b78d162d04598c", + "transactionHash": "0xd0aaac1c8c33c9af4fab1b8a322098e12538fc22d4dc785231dd415fd0dded52", + "logs": [], + "blockNumber": 126398785, + "cumulativeGasUsed": "5245984", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65", + "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE" + ], + "numDeployments": 1, + "bytecode": "0x60c03461008557601f6109d738819003918201601f19168301916001600160401b038311848410176100895780849260409485528339810103126100855780516001600160a01b03918282168203610085576020015191821682036100855760805260a052604051610939908161009e8239608051816102ac015260a051816104100152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033", + "deployedBytecode": "0x608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/xdai/OrderRegistrator.json b/deployments/xdai/OrderRegistrator.json new file mode 100644 index 00000000..b3bc7c77 --- /dev/null +++ b/deployments/xdai/OrderRegistrator.json @@ -0,0 +1,174 @@ +{ + "address": "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BadSignature", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "indexed": false, + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "OrderRegistered", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "registerOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x8945191af8f94f829d15649e2cfa805d8cb97be2ecef674013edb29afed3eafb", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 3, + "gasUsed": "453380", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe2671abe285d0504846f2b6c3667382a0a818fcc70aa3cbd5552de398a9b0603", + "transactionHash": "0x8945191af8f94f829d15649e2cfa805d8cb97be2ecef674013edb29afed3eafb", + "logs": [], + "blockNumber": 36401621, + "cumulativeGasUsed": "821547", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65" + ], + "numDeployments": 1, + "bytecode": "0x60a03461006a57601f6106e738819003918201601f19168301916001600160401b0383118484101761006e5780849260209460405283398101031261006a57516001600160a01b038116810361006a57608052604051610664908161008382396080518161013a0152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033", + "deployedBytecode": "0x6080604052600480361015610012575f80fd5b5f3560e01c63dfcb3e3414610025575f80fd5b3461027157610140367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0181811261027157610100809112610271576101049267ffffffffffffffff843581811161027157610084903690840161028f565b9091610124359081116102715761009e903690850161028f565b9390966100ab8385610369565b9015610288575073ffffffffffffffffffffffffffffffffffffffff602060405180937f802b2ef10000000000000000000000000000000000000000000000000000000082526101368683016004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b81847f0000000000000000000000000000000000000000000000000000000000000000165afa90811561027d5786918a915f9161023e575b61017c9450602435166104a5565b156102165750916102027f1e8610b3a2275f01a103e27257e911d890537b0c70578537ea077ec0a27b5bc9969261021194876040519889986101f78a6004358152602435602082015260443560408201526064356060820152608435608082015260a43560a082015260c43560c082015260e060e435910152565b89015287019161032b565b9184830361012086015261032b565b0390a1005b6040517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b925050506020823d602011610275575b8161025b602093836102bd565b810103126102715788869161017c93519061016e565b5f80fd5b3d915061024e565b6040513d5f823e3d90fd5b90505f525ffd5b9181601f840112156102715782359167ffffffffffffffff8311610271576020838186019501011161027157565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176102fe57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b9060e4357f020000000000000000000000000000000000000000000000000000000000000016156104785780156104505767ffffffffffffffff81116102fe57604051906103df60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836102bd565b8082526020820192368282011161027157815f9260209286378301015273ffffffffffffffffffffffffffffffffffffffff9182915190201690600435160361042a575b6001905f90565b5f907fdc11ee6b0000000000000000000000000000000000000000000000000000000090565b50505f907fb2d25e490000000000000000000000000000000000000000000000000000000090565b905015610423575f907f74896a7b0000000000000000000000000000000000000000000000000000000090565b90919273ffffffffffffffffffffffffffffffffffffffff9182811692831561062457604093848414918215610619575b8261054c575b505061054257602092825f9384978351937f1626ba7e0000000000000000000000000000000000000000000000000000000098898652600486015260248501528160448501526064840137606401915afa610535575090565b5f51143d60201416919050565b5050505050600190565b9091505f85518580604114610601576040146105bc57505f805b610575575b5016145f806104dc565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a16060820151101561056b5760209150608081895f935282805260015afa505f515f61056b565b807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60208b01358060ff1c601b01602084015260208c8b850137166060820152610566565b50868901355f1a602082015280878a81830137610566565b6041851492506104d6565b5050505050505f9056fea264697066735822122053480125ebf0a0c8c85a365d146577b5c860059ec723d24fd2ed9500b61730e164736f6c63430008170033" +} \ No newline at end of file diff --git a/deployments/xdai/SafeOrderBuilder.json b/deployments/xdai/SafeOrderBuilder.json new file mode 100644 index 00000000..9ff5ccf7 --- /dev/null +++ b/deployments/xdai/SafeOrderBuilder.json @@ -0,0 +1,157 @@ +{ + "address": "0x370De82413251A9d204DCEAB50dB2d7ec3Bd1769", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IOrderMixin", + "name": "limitOrderProtocol", + "type": "address" + }, + { + "internalType": "contract IOrderRegistrator", + "name": "orderRegistrator", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + }, + { + "inputs": [], + "name": "StaleOraclePrice", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "salt", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "maker", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "receiver", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "makerAsset", + "type": "uint256" + }, + { + "internalType": "Address", + "name": "takerAsset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "makingAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "takingAmount", + "type": "uint256" + }, + { + "internalType": "MakerTraits", + "name": "makerTraits", + "type": "uint256" + } + ], + "internalType": "struct IOrderMixin.Order", + "name": "order", + "type": "tuple" + }, + { + "internalType": "bytes", + "name": "extension", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "makerAssetOracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "contract AggregatorV3Interface", + "name": "oracle", + "type": "address" + }, + { + "internalType": "uint256", + "name": "originalAnswer", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ttl", + "type": "uint256" + } + ], + "internalType": "struct SafeOrderBuilder.OracleQueryParams", + "name": "takerAssetOracleParams", + "type": "tuple" + } + ], + "name": "buildAndSignOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x6ce69ec0d62cc591528bbe65e656fa36dadc10e4bd8f78b76c41e7a6e4aa59fb", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "608224", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xff563e9014b5baf9feb25018e035395471680877aedd57d4b7a0e326e2e94d89", + "transactionHash": "0x6ce69ec0d62cc591528bbe65e656fa36dadc10e4bd8f78b76c41e7a6e4aa59fb", + "logs": [], + "blockNumber": 36401630, + "cumulativeGasUsed": "608224", + "status": 1 + }, + "args": [ + "0x111111125421ca6dc452d289314280a0f8842a65", + "0x2339f78e2Ec15C47Cf042F2460C532C0D7ff1CCE" + ], + "numDeployments": 1, + "bytecode": "0x60c03461008557601f6109d738819003918201601f19168301916001600160401b038311848410176100895780849260409485528339810103126100855780516001600160a01b03918282168203610085576020015191821682036100855760805260a052604051610939908161009e8239608051816102ac015260a051816104100152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033", + "deployedBytecode": "0x608060049081361015610010575f80fd5b5f915f3560e01c6371db203814610025575f80fd5b34610563577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36016101e081126105635761010080911261056357820167ffffffffffffffff91838210838311176106ec57604091825280358452602490602093823585870152604435848701526064356060870152608435608087015260a09560a4358782015260c0810160c435815260e43560e083015261010496873592848411610563573660238501121561056357838601359285841161056357368885870101116105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffedc3601126105635760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7c36011261056357610124359273ffffffffffffffffffffffffffffffffffffffff90818516809503610563578a518d818b817ffeaf968c00000000000000000000000000000000000000000000000000000000998a82525afa90811561063057908e915f925f926106c4575b50506101b79061016435906107d2565b421161069c5783516101cd91610144359161080c565b835261018492833595838716809703610563578e908b8e518099819382525afa95861561063057908e9392915f945f98610662575b50506101c49661021542918935906107d2565b1061063a5761022c8151946101a49586359061080c565b9052808c51809e7f802b2ef10000000000000000000000000000000000000000000000000000000082526102a88d83018960e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b81857f0000000000000000000000000000000000000000000000000000000000000000165afa9c8d15610630575f9d6105f7575b508b9c9d8c98999a9b9c519e8f99838b01918252838b528a01998a108c8b11176105cc57908f8f928b8452815190209260608201937f60b3cbf8b4a223d68d641b3b6ddf9a298e7f33710cf3d3a9d1146b5a6150fbca855260808301528b520198808a108c8b11176105cc57898f52519020977ff698da2500000000000000000000000000000000000000000000000000000000815281818d81305afa9e8f156105c2575f9f610592575b50508c519d8e98828a01917f190000000000000000000000000000000000000000000000000000000000000083527f010000000000000000000000000000000000000000000000000000000000000060218c015260228b015260428a015260428952608089019e8f9b8c119b108b1761056757906007918f8f52895190205f525260018c5f20557f00000000000000000000000000000000000000000000000000000000000000001694853b15610563575f978d977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f848f958d9996818e9c6104e18d9a8f7fdfcb3e3400000000000000000000000000000000000000000000000000000000905260848a019060e08091805184526020810151602085015260408101516040850152606081015160608501526080810151608085015260a081015160a085015260c081015160c08501520151910152565b6101408c8901528701526101e4960186860137858582860101520116810190808203946101608601910152015201925af1801561055957610520578580f35b90919293945061052f57505052005b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b84513d5f823e3d90fd5b5f80fd5b8c60418d7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b829f508291923d83116105bb575b6105aa8185610718565b8101031261056357519c5f80610387565b503d6105a0565b8e513d5f823e3d90fd5b8d60418e7f4e487b71000000000000000000000000000000000000000000000000000000005f52525ffd5b9798999a9b9c508088813d8311610629575b6106138183610718565b81010312610563578c97519c9b9a9998976102dc565b503d610609565b8c513d5f823e3d90fd5b8a8d517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b8091929850610687939550903d10610695575b61067f8183610718565b81019061079d565b509492505092955f8f610202565b503d610675565b898c517fa887f2d8000000000000000000000000000000000000000000000000000000008152fd5b6101b793506106df9250803d106106955761067f8183610718565b509392505091908f6101a7565b6041907f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761075957604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b519069ffffffffffffffffffff8216820361056357565b908160a0910312610563576107b181610786565b916020820151916040810151916107cf608060608401519301610786565b90565b919082018092116107df57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff848209938380861095039480860395146108c8578483111561089e57829109815f038216809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050809250156108d6570490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffdfea264697066735822122038777de989b7a42c28bbd0884282b535c3965b1c22962a51d77dce47ca52061f64736f6c63430008170033" +} \ No newline at end of file From 866019ede889ecc55cff12806b3eb4b73f1c86cb Mon Sep 17 00:00:00 2001 From: Denis Date: Tue, 8 Oct 2024 16:11:19 +0100 Subject: [PATCH 3/3] Fix linter --- deploy/deploy-SafeOrderBuilder.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/deploy/deploy-SafeOrderBuilder.js b/deploy/deploy-SafeOrderBuilder.js index d2d60b55..b34f8e6b 100644 --- a/deploy/deploy-SafeOrderBuilder.js +++ b/deploy/deploy-SafeOrderBuilder.js @@ -1,6 +1,6 @@ const hre = require('hardhat'); -const { ethers, getChainId } = hre; -const { saveContractWithCreate3Deployment, deployAndGetContractWithCreate3, deployAndGetContract } = require('@1inch/solidity-utils'); +const { ethers, getChainId, getNamedAccounts } = hre; +const { deployAndGetContractWithCreate3, deployAndGetContract } = require('@1inch/solidity-utils'); const { getNetwork } = require('@1inch/solidity-utils/hardhat-setup'); const ROUTER_V6_ADDR = '0x111111125421ca6dc452d289314280a0f8842a65'; @@ -23,6 +23,8 @@ module.exports = async ({ deployments }) => { return; } + const { deployer } = await getNamedAccounts(); + if (getNetwork().indexOf('zksync') !== -1) { // ZkSync deploy without create3 const orderRegistrator = await deployAndGetContract({ @@ -46,7 +48,7 @@ module.exports = async ({ deployments }) => { contractName: 'OrderRegistrator', constructorArgs: [ROUTER_V6_ADDR], deploymentName: 'OrderRegistrator', - create3Deployer: create3Deployer, + create3Deployer, salt: ORDER_REGISTRATOR_SALT, deployments, }); @@ -54,7 +56,7 @@ module.exports = async ({ deployments }) => { contractName: 'SafeOrderBuilder', constructorArgs: [ROUTER_V6_ADDR, await orderRegistrator.getAddress()], deploymentName: 'SafeOrderBuilder', - create3Deployer: create3Deployer, + create3Deployer, salt: SAFE_ORDER_BUILDER_SALT, deployments, });