Gelato-automations/deployments/mainnet/ConditionCompareUintsFromTwoSources.json

180 lines
44 KiB
JSON
Raw Normal View History

2020-11-16 16:55:04 +00:00
{
"address": "0xE5c15cb45485Dab0C9B39CFBe3Abfeb710e3A3FE",
2020-11-16 16:55:04 +00:00
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_sourceA",
"type": "address"
},
{
"internalType": "address",
"name": "_sourceB",
"type": "address"
},
{
"internalType": "bytes",
"name": "_sourceAData",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "_sourceBData",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "_minSpread",
"type": "uint256"
}
],
"name": "compare",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_sourceA",
"type": "address"
},
{
"internalType": "address",
"name": "_sourceB",
"type": "address"
},
{
"internalType": "bytes",
"name": "_sourceAData",
"type": "bytes"
},
{
"internalType": "bytes",
"name": "_sourceBData",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "_minSpread",
"type": "uint256"
}
],
"name": "getConditionData",
"outputs": [
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "_conditionData",
"type": "bytes"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "ok",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
],
"transactionHash": "0xa638a4693bbfad4904a63dc30de5bb7809ca321da9565d787fbf05fd85d550ef",
2020-11-16 16:55:04 +00:00
"receipt": {
"to": null,
"from": "0xe1F076849B781b1395Fd332dC1758Dbc129be6EC",
"contractAddress": "0xE5c15cb45485Dab0C9B39CFBe3Abfeb710e3A3FE",
"transactionIndex": 146,
"gasUsed": "648027",
2020-11-16 16:55:04 +00:00
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x3580fa7350e5ede7b07becec815133f5f365f03f7fa6711d56e557d29b00af36",
"transactionHash": "0xa638a4693bbfad4904a63dc30de5bb7809ca321da9565d787fbf05fd85d550ef",
2020-11-16 16:55:04 +00:00
"logs": [],
"blockNumber": 11273869,
"cumulativeGasUsed": "9016207",
"status": 1,
"byzantium": true
2020-11-16 16:55:04 +00:00
},
"args": [],
"solcInputHash": "d1d4184366927728b52537856ecb8f22",
"metadata": "{\"compiler\":{\"version\":\"0.7.4+commit.3f05b770\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sourceA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sourceB\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_sourceAData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_sourceBData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_minSpread\",\"type\":\"uint256\"}],\"name\":\"compare\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sourceA\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_sourceB\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_sourceAData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_sourceBData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"_minSpread\",\"type\":\"uint256\"}],\"name\":\"getConditionData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_conditionData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"ok\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"This contract only works if the refContracts fns returndata has a uint in the first 32-byte position.\",\"kind\":\"dev\",\"methods\":{\"compare(address,address,bytes,bytes,uint256)\":{\"details\":\"If you want to trigger when ContractA uint is greater than or equal to ContractB by _minSpread: (ContractA=_sourceA, ContractB=_sourceB) For the reverse (lower than/equal to): (ContractA=_sourceB, ContractB=_sourceA)\",\"params\":{\"_minSpread\":\"The minimum diff between sourceA and sourceB for the Condition to be relevant.\",\"_sourceA\":\"The first contract that returns a uint for comparison.\",\"_sourceAData\":\"Payload for retrieving the uint from _sourceA.\",\"_sourceB\":\"The second contract that returns a uint256 for comparison.\",\"_sourceBData\":\"Payload for retrieving the uint from _sourceB.\"},\"returns\":{\"_0\":\"OK if the Condition is fulfilled.\"}},\"ok(uint256,bytes,uint256)\":{\"details\":\"Every Gelato Condition must have this function selector as entry point.\",\"params\":{\"_conditionData\":\"The encoded data from getConditionData()\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"compare(address,address,bytes,bytes,uint256)\":{\"notice\":\"Compares 2 values from sourceA and sourceB to check if minSpread is there.\"},\"getConditionData(address,address,bytes,bytes,uint256)\":{\"notice\":\"Helper to encode the Condition.data field off-chain\"},\"ok(uint256,bytes,uint256)\":{\"notice\":\"Gelato Standard Condition function.\"}},\"notice\":\"A general contract for retrieving and comparing 2 uints from 2 contracts.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/contracts/gelato/conditions/ConditionCompareUintsFromTwoSources.sol\":\"ConditionCompareUintsFromTwoSources\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@gelatonetwork/core/contracts/conditions/GelatoConditionsStandard.sol\":{\"content\":\"// \\\"SPDX-License-Identifier: UNLICENSED\\\"\\npragma solidity >=0.6.10;\\n\\nimport \\\"./IGelatoCondition.sol\\\";\\n\\nabstract contract GelatoConditionsStandard is IGelatoCondition {\\n string internal constant OK = \\\"OK\\\";\\n}\\n\",\"keccak256\":\"0xa3d9ee5c4398914bbc0fe75fe54e57b73b8a4367caf9a40d9e5fd1ba9d4adb89\",\"license\":\"UNLICENSED\"},\"@gelatonetwork/core/contracts/conditions/IGelatoCondition.sol\":{\"content\":\"// \\\"SPDX-License-Identifier: UNLI
"bytecode": "0x608060405234801561001057600080fd5b50610ac2806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063237dcf571461004657806345cea5b314610192578063a99891c5146102d6575b600080fd5b61011d600480360360a081101561005c57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561008f57600080fd5b8201836020820111156100a157600080fd5b803590602001918460018302840111600160201b831117156100c257600080fd5b919390929091602081019035600160201b8111156100df57600080fd5b8201836020820111156100f157600080fd5b803590602001918460018302840111600160201b8311171561011257600080fd5b91935091503561034b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015757818101518382015260200161013f565b50505050905090810190601f1680156101845780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61011d600480360360a08110156101a857600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b8111156101db57600080fd5b8201836020820111156101ed57600080fd5b803590602001918460018302840111600160201b8311171561020e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561026057600080fd5b82018360208201111561027257600080fd5b803590602001918460018302840111600160201b8311171561029357600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506103fa915050565b61011d600480360360608110156102ec57600080fd5b81359190810190604081016020820135600160201b81111561030d57600080fd5b82018360208201111561031f57600080fd5b803590602001918460018302840111600160201b8311171561034057600080fd5b919350915035610662565b60608787878787878760405160200180886001600160a01b03168152602001876001600160a01b0316815260200180602001806020018481526020018381038352888882818152602001925080828437600083820152601f01601f19169091018481038352868152602001905086868082843760008382015260408051601f909201601f19908116909401828103909401825292909252509a5050505050505050505050979650505050505050565b606060006060876001600160a01b0316866040518082805190602001908083835b6020831061043a5780518252601f19909201916020918201910161041b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461049a576040519150601f19603f3d011682016040523d82523d6000602084013e61049f565b606091505b5091509150816104d5576104cc6040518060600160405280602a8152602001610a63602a913982906107cd565b92505050610659565b60008180602001905160208110156104ec57600080fd5b505160405187519192506001600160a01b038a1691889190819060208401908083835b6020831061052e5780518252601f19909201916020918201910161050f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461058e576040519150601f19603f3d011682016040523d82523d6000602084013e610593565b606091505b509093509150826105cb576105c16040518060600160405280602a8152602001610a39602a913983906107cd565b9350505050610659565b60008280602001905160208110156105e257600080fd5b505190506105f081876109d7565b821061061c57604051806040016040528060028152602001614f4b60f01b815250945050505050610659565b6040518060400160405280602081526020017f414e6f74477265617465724f72457175616c546f4262794d696e7370726561648152509450505050505b95945050505050565b60606000806060806000888860a081101561067c57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b8111156106af57600080fd5b8201836020820111156106c157600080fd5b803590602001918460018302840111600160201b831117156106e257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561073457600080fd5b82018360208201111561074657600080fd5b803590602001918460018302840111600160201b8311171561076757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250989d50969b5094995097503595506107bf9450899350889250879150869050856103fa565b9a9950505050505050505050565b606060208351816107
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063237dcf571461004657806345cea5b314610192578063a99891c5146102d6575b600080fd5b61011d600480360360a081101561005c57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561008f57600080fd5b8201836020820111156100a157600080fd5b803590602001918460018302840111600160201b831117156100c257600080fd5b919390929091602081019035600160201b8111156100df57600080fd5b8201836020820111156100f157600080fd5b803590602001918460018302840111600160201b8311171561011257600080fd5b91935091503561034b565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015757818101518382015260200161013f565b50505050905090810190601f1680156101845780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61011d600480360360a08110156101a857600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b8111156101db57600080fd5b8201836020820111156101ed57600080fd5b803590602001918460018302840111600160201b8311171561020e57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561026057600080fd5b82018360208201111561027257600080fd5b803590602001918460018302840111600160201b8311171561029357600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506103fa915050565b61011d600480360360608110156102ec57600080fd5b81359190810190604081016020820135600160201b81111561030d57600080fd5b82018360208201111561031f57600080fd5b803590602001918460018302840111600160201b8311171561034057600080fd5b919350915035610662565b60608787878787878760405160200180886001600160a01b03168152602001876001600160a01b0316815260200180602001806020018481526020018381038352888882818152602001925080828437600083820152601f01601f19169091018481038352868152602001905086868082843760008382015260408051601f909201601f19908116909401828103909401825292909252509a5050505050505050505050979650505050505050565b606060006060876001600160a01b0316866040518082805190602001908083835b6020831061043a5780518252601f19909201916020918201910161041b565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461049a576040519150601f19603f3d011682016040523d82523d6000602084013e61049f565b606091505b5091509150816104d5576104cc6040518060600160405280602a8152602001610a63602a913982906107cd565b92505050610659565b60008180602001905160208110156104ec57600080fd5b505160405187519192506001600160a01b038a1691889190819060208401908083835b6020831061052e5780518252601f19909201916020918201910161050f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d806000811461058e576040519150601f19603f3d011682016040523d82523d6000602084013e610593565b606091505b509093509150826105cb576105c16040518060600160405280602a8152602001610a39602a913983906107cd565b9350505050610659565b60008280602001905160208110156105e257600080fd5b505190506105f081876109d7565b821061061c57604051806040016040528060028152602001614f4b60f01b815250945050505050610659565b6040518060400160405280602081526020017f414e6f74477265617465724f72457175616c546f4262794d696e7370726561648152509450505050505b95945050505050565b60606000806060806000888860a081101561067c57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b8111156106af57600080fd5b8201836020820111156106c157600080fd5b803590602001918460018302840111600160201b831117156106e257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561073457600080fd5b82018360208201111561074657600080fd5b803590602001918460018302840111600160201b8311171561076757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250989d50969b5094995097503595506107bf9450899350889250879150869050856103fa565b9a9950505050505050505050565b606060208351816107da57fe5b066004141561094857602083015162461bcd60e51b600160
2020-11-16 16:55:04 +00:00
"devdoc": {
"details": "This contract only works if the refContracts fns returndata has a uint in the first 32-byte position.",
"kind": "dev",
"methods": {
"compare(address,address,bytes,bytes,uint256)": {
"details": "If you want to trigger when ContractA uint is greater than or equal to ContractB by _minSpread: (ContractA=_sourceA, ContractB=_sourceB) For the reverse (lower than/equal to): (ContractA=_sourceB, ContractB=_sourceA)",
"params": {
"_minSpread": "The minimum diff between sourceA and sourceB for the Condition to be relevant.",
"_sourceA": "The first contract that returns a uint for comparison.",
"_sourceAData": "Payload for retrieving the uint from _sourceA.",
"_sourceB": "The second contract that returns a uint256 for comparison.",
"_sourceBData": "Payload for retrieving the uint from _sourceB."
},
"returns": {
"_0": "OK if the Condition is fulfilled."
}
},
"ok(uint256,bytes,uint256)": {
"details": "Every Gelato Condition must have this function selector as entry point.",
"params": {
"_conditionData": "The encoded data from getConditionData()"
}
}
},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {
"compare(address,address,bytes,bytes,uint256)": {
"notice": "Compares 2 values from sourceA and sourceB to check if minSpread is there."
},
"getConditionData(address,address,bytes,bytes,uint256)": {
"notice": "Helper to encode the Condition.data field off-chain"
},
"ok(uint256,bytes,uint256)": {
"notice": "Gelato Standard Condition function."
}
},
"notice": "A general contract for retrieving and comparing 2 uints from 2 contracts.",
"version": 1
},
"storageLayout": {
"storage": [],
"types": null
}
}