UNPKG

@opiumteam/opium-sdk-v2

Version:

one-stop-shop SDK to interact with the Opium-v2 protocol contracts, subgraphs and APIs

256 lines (255 loc) 7.76 kB
[ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "_changer", "type": "address" }, { "indexed": true, "internalType": "address", "name": "_newRegistryAddress", "type": "address" } ], "name": "LogRegistryChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "components": [ { "internalType": "uint256", "name": "margin", "type": "uint256" }, { "internalType": "uint256", "name": "endTime", "type": "uint256" }, { "internalType": "uint256[]", "name": "params", "type": "uint256[]" }, { "internalType": "address", "name": "oracleId", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "address", "name": "syntheticId", "type": "address" } ], "indexed": true, "internalType": "struct LibDerivative.Derivative", "name": "derivative", "type": "tuple" }, { "indexed": true, "internalType": "bytes32", "name": "derivativeHash", "type": "bytes32" } ], "name": "LogSyntheticInit", "type": "event" }, { "inputs": [ { "internalType": "bytes32", "name": "_derivativeHash", "type": "bytes32" }, { "components": [ { "internalType": "uint256", "name": "margin", "type": "uint256" }, { "internalType": "uint256", "name": "endTime", "type": "uint256" }, { "internalType": "uint256[]", "name": "params", "type": "uint256[]" }, { "internalType": "address", "name": "oracleId", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "address", "name": "syntheticId", "type": "address" } ], "internalType": "struct LibDerivative.Derivative", "name": "_derivative", "type": "tuple" } ], "name": "getOrCacheMargin", "outputs": [ { "internalType": "uint256", "name": "buyerMargin", "type": "uint256" }, { "internalType": "uint256", "name": "sellerMargin", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_derivativeHash", "type": "bytes32" }, { "components": [ { "internalType": "uint256", "name": "margin", "type": "uint256" }, { "internalType": "uint256", "name": "endTime", "type": "uint256" }, { "internalType": "uint256[]", "name": "params", "type": "uint256[]" }, { "internalType": "address", "name": "oracleId", "type": "address" }, { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "address", "name": "syntheticId", "type": "address" } ], "internalType": "struct LibDerivative.Derivative", "name": "_derivative", "type": "tuple" } ], "name": "getOrCacheSyntheticCache", "outputs": [ { "components": [ { "internalType": "uint256", "name": "buyerMargin", "type": "uint256" }, { "internalType": "uint256", "name": "sellerMargin", "type": "uint256" }, { "internalType": "uint256", "name": "authorCommission", "type": "uint256" }, { "internalType": "address", "name": "authorAddress", "type": "address" }, { "internalType": "bool", "name": "init", "type": "bool" } ], "internalType": "struct SyntheticAggregator.SyntheticCache", "name": "", "type": "tuple" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getRegistry", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_registry", "type": "address" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_registry", "type": "address" } ], "name": "setRegistry", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]