ocean-subgraph/abis/FactoryRouter.json

790 lines
65 KiB
JSON
Raw Normal View History

2021-11-04 16:00:43 +01:00
{
"_format": "hh-sol-artifact-1",
"contractName": "FactoryRouter",
"sourceName": "contracts/pools/FactoryRouter.sol",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_routerOwner",
"type": "address"
},
{
"internalType": "address",
"name": "_oceanToken",
"type": "address"
},
{
"internalType": "address",
"name": "_bpoolTemplate",
"type": "address"
},
{
"internalType": "address",
"name": "_opfCollector",
"type": "address"
},
{
"internalType": "address[]",
"name": "_preCreatedPools",
"type": "address[]"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "newBPoolAddress",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "registeredBy",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "datatokenAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "basetokenAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "bpoolTemplateAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "ssAddress",
"type": "address"
}
],
"name": "BPoolCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "instance",
"type": "address"
}
],
"name": "InstanceDeployed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "poolAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "isOcean",
"type": "bool"
}
],
"name": "NewPool",
"type": "event"
},
{
"inputs": [],
"name": "BONE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "BPOW_PRECISION",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "EXIT_FEE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "INIT_POOL_SUPPLY",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_BOUND_TOKENS",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_BPOW_BASE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_FEE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_IN_RATIO",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_OUT_RATIO",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_TOTAL_WEIGHT",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MAX_WEIGHT",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_BALANCE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_BOUND_TOKENS",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_BPOW_BASE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_FEE",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "MIN_WEIGHT",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_dispenser",
"type": "address"
}
],
"name": "addDispenserContract",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_factory",
"type": "address"
}
],
"name": "addFactory",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_fixedRate",
"type": "address"
}
],
"name": "addFixedRateContract",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "oceanTokenAddress",
"type": "address"
}
],
"name": "addOceanToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "poolTemplate",
"type": "address"
}
],
"name": "addPoolTemplate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_ssContract",
"type": "address"
}
],
"name": "addSSContract",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "bytes32",
"name": "exchangeIds",
"type": "bytes32"
},
{
"internalType": "address",
"name": "source",
"type": "address"
},
{
"internalType": "enum FactoryRouter.operationType",
"name": "operation",
"type": "uint8"
},
{
"internalType": "address",
"name": "tokenIn",
"type": "address"
},
{
"internalType": "uint256",
"name": "amountsIn",
"type": "uint256"
},
{
"internalType": "address",
"name": "tokenOut",
"type": "address"
},
{
"internalType": "uint256",
"name": "amountsOut",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxPrice",
"type": "uint256"
}
],
"internalType": "struct FactoryRouter.Operations[]",
"name": "_operations",
"type": "tuple[]"
}
],
"name": "buyDTBatch",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_routerOwner",
"type": "address"
}
],
"name": "changeRouterOwner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_dispenser",
"type": "address"
},
{
"internalType": "address",
"name": "datatoken",
"type": "address"
},
{
"internalType": "uint256",
"name": "maxTokens",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxBalance",
"type": "uint256"
},
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "allowedSwapper",
"type": "address"
}
],
"name": "deployDispenser",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "fixedPriceAddress",
"type": "address"
},
{
"internalType": "address[]",
"name": "addresses",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "uints",
"type": "uint256[]"
}
],
"name": "deployFixedRate",
"outputs": [
{
"internalType": "bytes32",
"name": "exchangeId",
"type": "bytes32"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[2]",
"name": "tokens",
"type": "address[2]"
},
{
"internalType": "uint256[]",
"name": "ssParams",
"type": "uint256[]"
},
{
"internalType": "uint256[]",
"name": "swapFees",
"type": "uint256[]"
},
{
"internalType": "address[]",
"name": "addresses",
"type": "address[]"
}
],
"name": "deployPool",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "dispenser",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "factory",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "fixedPrice",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "fixedRate",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "baseToken",
"type": "address"
}
],
"name": "getOPFFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "poolTemplate",
"type": "address"
}
],
"name": "isPoolTemplate",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "oceanTokens",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "opfCollector",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "oceanTokenAddress",
"type": "address"
}
],
"name": "removeOceanToken",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "poolTemplate",
"type": "address"
}
],
"name": "removePoolTemplate",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "routerOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "ssContracts",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "swapOceanFee",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_newSwapOceanFee",
"type": "uint256"
}
],
"name": "updateOPFFee",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x608060405266038d7ea4c680006005553480156200001c57600080fd5b50604051620030c4380380620030c48339810160408190526200003f9162000273565b8282826001600160a01b038316620000b45760405162461bcd60e51b815260206004820152602d60248201527f42466163746f72793a20696e76616c69642062706f6f6c2074656d706c61746560448201526c207a65726f206164647265737360981b60648201526084015b60405180910390fd5b6001600160a01b0382166200010c5760405162461bcd60e51b815260206004820152601660248201527f42466163746f72793a207a65726f2061646472657373000000000000000000006044820152606401620000ab565b600080546001600160a01b0319166001600160a01b03841617905562000153836001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b805115620002025760005b8151811015620002005760006001600160a01b0316336001600160a01b0316838381518110620001925762000192620003c4565b602090810291909101810151604080516000808252938101849052908101929092526001600160a01b0316907fbb6121447d29a04cc37bfd93cdf6a9dd08229f2d941116c1528f04698c4e790e9060600160405180910390a480620001f7816200039a565b9150506200015e565b505b5050600280546001600160a01b03199081166001600160a01b0398891617909155600080549091169387169390931783555050919092168152600660205260409020805460ff1916600117905550620003f0565b80516001600160a01b03811681146200026e57600080fd5b919050565b600080600080600060a086880312156200028c57600080fd5b620002978662000256565b94506020620002a881880162000256565b9450620002b86040880162000256565b9350620002c86060880162000256565b60808801519093506001600160401b0380821115620002e657600080fd5b818901915089601f830112620002fb57600080fd5b815181811115620003105762000310620003da565b8060051b604051601f19603f83011681018181108582111715620003385762000338620003da565b604052828152858101935084860182860187018e10156200035857600080fd5b600095505b838610156200038657620003718162000256565b8552600195909501949386019386016200035d565b508096505050505050509295509295909350565b6000600019821415620003bd57634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b612cc480620004006000396000f3fe608060405234801561001057600080fd5b50600436106102535760003560e01c8063b7b800a411610146578063d86850cc116100c3578063e525f99c11610087578063e525f99c146104b7578063ec093021146104ca578063ee3bc635146104d2578063ee661f67146104e5578063f4d9e1e414610508578063f8154aee1461051b57600080fd5b8063d86850cc14610465578063de9a95a714610488578063e183fb3f1461049b578063e193faad146104a4578063e4a28a521461026d57600080fd5b8063c1c436a51161010a578063c1c436a514610424578063c36596a6146102a3578063c45a015514610437578063c6580d121461044a578063d629a00a1461045257600080fd5b8063b7b800a4146103c5578063ba019dab146103e0578063bc063e1a146103e8578063bc694ea2146103f0578063c07c00fe146103f857600080fd5b806382449375116101d45780639cdfa6ad116101985780639cdfa6ad1461037c5780639f587d4d1461038f578063a28f78f1146103b2578063b0e0d136146103c5578063b19aaac6146103cd57600080fd5b8063824493751461033e5780638552730a14610351578063867378c5146103645780639381cd2b1461036c578063992e2a921461037457600080fd5b806329ce1ec51161021b57806329ce1ec5146102b25780636c9fb612146102c557806376c7a3c7146102d857806379463a0e146102e0578063802d14221461031357600080fd5b80630318ad661461025857806309a3bbe41461026d57806316d9cb3d14610288578063189d00ca1461029b578063218b5382146102a3575b600080fd5b61026b6102663660046125ac565b61052e565b005b610275610585565b6040519081526020015b60405180910390f35b61026b6102963660046125ac565b61059b565b6102756105e9565b610275670de0b6b3a764000081565b61026b6102c03660046125ac565b610600565b61026b6102d33660046125ac565b61069b565b6102756106e9565b6103036102ee3660046125ac565b60066020526000908152604090205460ff1681565b604051901515815260200161027f565b600454610326906001600160a01b031681565b6040516001600160a01b03909116815260200161027f565b61027561034c3660046126f4565b6106fe565b600254610326906001600160a01b031681565b6102756108ab565b6102756108c2565b6102756108d5565b61026b61038a3660046125ac565b6108f3565b61030361039d3660046125ac565b60086020526000908152604090205460ff1681565b600054610326906001600160a01b031681565b610275600281565b61026b6103db3660046125ac565b61093e565b610275600181565b610275610996565b6102756109
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102535760003560e01c8063b7b800a411610146578063d86850cc116100c3578063e525f99c11610087578063e525f99c146104b7578063ec093021146104ca578063ee3bc635146104d2578063ee661f67146104e5578063f4d9e1e414610508578063f8154aee1461051b57600080fd5b8063d86850cc14610465578063de9a95a714610488578063e183fb3f1461049b578063e193faad146104a4578063e4a28a521461026d57600080fd5b8063c1c436a51161010a578063c1c436a514610424578063c36596a6146102a3578063c45a015514610437578063c6580d121461044a578063d629a00a1461045257600080fd5b8063b7b800a4146103c5578063ba019dab146103e0578063bc063e1a146103e8578063bc694ea2146103f0578063c07c00fe146103f857600080fd5b806382449375116101d45780639cdfa6ad116101985780639cdfa6ad1461037c5780639f587d4d1461038f578063a28f78f1146103b2578063b0e0d136146103c5578063b19aaac6146103cd57600080fd5b8063824493751461033e5780638552730a14610351578063867378c5146103645780639381cd2b1461036c578063992e2a921461037457600080fd5b806329ce1ec51161021b57806329ce1ec5146102b25780636c9fb612146102c557806376c7a3c7146102d857806379463a0e146102e0578063802d14221461031357600080fd5b80630318ad661461025857806309a3bbe41461026d57806316d9cb3d14610288578063189d00ca1461029b578063218b5382146102a3575b600080fd5b61026b6102663660046125ac565b61052e565b005b610275610585565b6040519081526020015b60405180910390f35b61026b6102963660046125ac565b61059b565b6102756105e9565b610275670de0b6b3a764000081565b61026b6102c03660046125ac565b610600565b61026b6102d33660046125ac565b61069b565b6102756106e9565b6103036102ee3660046125ac565b60066020526000908152604090205460ff1681565b604051901515815260200161027f565b600454610326906001600160a01b031681565b6040516001600160a01b03909116815260200161027f565b61027561034c3660046126f4565b6106fe565b600254610326906001600160a01b031681565b6102756108ab565b6102756108c2565b6102756108d5565b61026b61038a3660046125ac565b6108f3565b61030361039d3660046125ac565b60086020526000908152604090205460ff1681565b600054610326906001600160a01b031681565b610275600281565b61026b6103db3660046125ac565b61093e565b610275600181565b610275610996565b6102756109a9565b6103036104063660046125ac565b6001600160a01b031660009081526001602052604090205460ff1690565b61026b6104323660046128f1565b6109c8565b600354610326906001600160a01b031681565b610275600081565b61026b610460366004612684565b6109f7565b6103036104733660046125ac565b60096020526000908152604090205460ff1681565b61026b6104963660046125ac565b610b93565b61027560055481565b61026b6104b23660046125ac565b610be1565b61026b6104c53660046125ac565b610c30565b610275610cd2565b6103266104e0366004612777565b610ce5565b6103036104f33660046125ac565b60076020526000908152604090205460ff1681565b61026b610516366004612827565b611189565b6102756105293660046125ac565b612157565b6002546001600160a01b031633146105615760405162461bcd60e51b815260040161055890612b7c565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19166001179055565b610598670de0b6b3a76400006032612be6565b81565b6002546001600160a01b031633146105c55760405162461bcd60e51b815260040161055890612b7c565b6001600160a01b03166000908152600860205260409020805460ff19166001179055565b6105986402540be400670de0b6b3a7640000612bc4565b6002546001600160a01b0316331461062a5760405162461bcd60e51b815260040161055890612b7c565b6003546001600160a01b0316156106795760405162461bcd60e51b8152602060048201526013602482015272119050d513d49648105314915051164814d155606a1b6044820152606401610558565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6002546001600160a01b031633146106c55760405162461bcd60e51b815260040161055890612b7c565b6001600160a01b03166000908152600760205260409020805460ff19166001179055565b610598620f4240670de0b6b3a7640000612bc4565b60035460405163226e761560e01b81523360048201526000916001600160a01b03169063226e76159060240160206040518083038186803b15801561074257600080fd5b505afa158015610756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077a919061289c565b151560011461079b5760405162461bcd60e51b815260040161055890612b31565b6001600160a01b03861660009081526008602052604090205460ff16151560011461081b5760405162461bcd60e51b815260206004820152602a60248201527f464143544f525920524f555445523a20496e76616c69
"linkReferences": {},
"deployedLinkReferences": {}
}