UNPKG

@azuro-org/abis

Version:
1,392 lines (1,391 loc) 26.3 kB
[ { "inputs": [], "name": "BetNotAllowed", "type": "error" }, { "inputs": [], "name": "BigDifference", "type": "error" }, { "inputs": [], "name": "CantAcceptBet", "type": "error" }, { "inputs": [], "name": "CantChangeFlag", "type": "error" }, { "inputs": [], "name": "ConditionAlreadyCreated", "type": "error" }, { "inputs": [], "name": "ConditionAlreadyResolved", "type": "error" }, { "inputs": [], "name": "ConditionNotExists", "type": "error" }, { "inputs": [], "name": "ConditionNotStarted", "type": "error" }, { "inputs": [], "name": "ConditionStarted", "type": "error" }, { "inputs": [], "name": "FlagAlreadySet", "type": "error" }, { "inputs": [], "name": "IncorrectTimestamp", "type": "error" }, { "inputs": [], "name": "NotEnoughLiquidity", "type": "error" }, { "inputs": [], "name": "OnlyLp", "type": "error" }, { "inputs": [], "name": "OnlyMaintainer", "type": "error" }, { "inputs": [], "name": "OnlyOracle", "type": "error" }, { "inputs": [ { "internalType": "uint64", "name": "waitTime", "type": "uint64" } ], "name": "ResolveTooEarly", "type": "error" }, { "inputs": [], "name": "SameOutcomes", "type": "error" }, { "inputs": [], "name": "SmallBet", "type": "error" }, { "inputs": [], "name": "SmallOdds", "type": "error" }, { "inputs": [], "name": "WrongDataFormat", "type": "error" }, { "inputs": [], "name": "WrongOutcome", "type": "error" }, { "inputs": [], "name": "ZeroOdds", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bool", "name": "flag", "type": "bool" } ], "name": "AllConditionsStopped", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "oracleConditionId", "type": "uint256" }, { "indexed": true, "internalType": "uint256", "name": "conditionId", "type": "uint256" }, { "indexed": false, "internalType": "uint64", "name": "timestamp", "type": "uint64" } ], "name": "ConditionCreated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "oracleConditionId", "type": "uint256" }, { "indexed": true, "internalType": "uint256", "name": "conditionId", "type": "uint256" }, { "indexed": false, "internalType": "uint64", "name": "outcomeWin", "type": "uint64" }, { "indexed": false, "internalType": "uint8", "name": "state", "type": "uint8" }, { "indexed": false, "internalType": "uint256", "name": "amountForLp", "type": "uint256" } ], "name": "ConditionResolved", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "oracleCondId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "conditionId", "type": "uint256" }, { "indexed": false, "internalType": "uint64", "name": "newTimestamp", "type": "uint64" } ], "name": "ConditionShifted", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "conditionId", "type": "uint256" }, { "indexed": false, "internalType": "bool", "name": "flag", "type": "bool" } ], "name": "ConditionStopped", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" } ], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "newLp", "type": "address" } ], "name": "LpChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "maintainer", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "active", "type": "bool" } ], "name": "MaintainerUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint64", "name": "newRatio", "type": "uint64" } ], "name": "MaxBanksRatioChanged", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "newOracle", "type": "address" } ], "name": "OracleAdded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "oracle", "type": "address" } ], "name": "OracleRenounced", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "inputs": [], "name": "LP", "outputs": [ { "internalType": "contract ILP", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "activeConditions", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "maintainer", "type": "address" }, { "internalType": "bool", "name": "active", "type": "bool" } ], "name": "addMaintainer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "allConditionsStopped", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "bets", "outputs": [ { "internalType": "uint256", "name": "conditionId", "type": "uint256" }, { "internalType": "uint128", "name": "amount", "type": "uint128" }, { "internalType": "uint64", "name": "outcome", "type": "uint64" }, { "internalType": "uint64", "name": "createdAt", "type": "uint64" }, { "internalType": "uint64", "name": "odds", "type": "uint64" }, { "internalType": "bool", "name": "payed", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "conditionId", "type": "uint256" }, { "internalType": "uint128", "name": "amount", "type": "uint128" }, { "internalType": "uint64", "name": "outcome", "type": "uint64" } ], "name": "calculateOdds", "outputs": [ { "internalType": "uint64", "name": "odds", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "conditionId", "type": "uint256" } ], "name": "cancelByMaintainer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "oracleCondId", "type": "uint256" } ], "name": "cancelByOracle", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "a", "type": "uint256" }, { "internalType": "uint256", "name": "m", "type": "uint256" } ], "name": "ceil", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "uint128", "name": "margin", "type": "uint128" } ], "name": "changeDefaultMargin", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint128", "name": "reinforcement", "type": "uint128" } ], "name": "changeDefaultReinforcement", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "newRatio", "type": "uint64" } ], "name": "changeMaxBanksRatio", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "claimOracleReward", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "conditions", "outputs": [ { "internalType": "uint128", "name": "reinforcement", "type": "uint128" }, { "internalType": "uint128", "name": "margin", "type": "uint128" }, { "internalType": "bytes32", "name": "ipfsHash", "type": "bytes32" }, { "internalType": "uint128", "name": "scopeId", "type": "uint128" }, { "internalType": "uint64", "name": "outcomeWin", "type": "uint64" }, { "internalType": "uint64", "name": "timestamp", "type": "uint64" }, { "internalType": "enum ICore.ConditionState", "name": "state", "type": "uint8" }, { "internalType": "uint48", "name": "leaf", "type": "uint48" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "oracleCondId", "type": "uint256" }, { "internalType": "uint128", "name": "scopeId", "type": "uint128" }, { "internalType": "uint64[2]", "name": "odds", "type": "uint64[2]" }, { "internalType": "uint64[2]", "name": "outcomes", "type": "uint64[2]" }, { "internalType": "uint64", "name": "timestamp", "type": "uint64" }, { "internalType": "bytes32", "name": "ipfsHash", "type": "bytes32" } ], "name": "createCondition", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "defaultMargin", "outputs": [ { "internalType": "uint128", "name": "", "type": "uint128" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "defaultReinforcement", "outputs": [ { "internalType": "uint128", "name": "", "type": "uint128" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "betId", "type": "uint256" } ], "name": "getBetInfo", "outputs": [ { "internalType": "uint128", "name": "amount", "type": "uint128" }, { "internalType": "uint64", "name": "odds", "type": "uint64" }, { "internalType": "uint64", "name": "createdAt", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "conditionId", "type": "uint256" } ], "name": "getCondition", "outputs": [ { "components": [ { "internalType": "uint128[2]", "name": "fundBank", "type": "uint128[2]" }, { "internalType": "uint128[2]", "name": "payouts", "type": "uint128[2]" }, { "internalType": "uint128[2]", "name": "totalNetBets", "type": "uint128[2]" }, { "internalType": "uint128", "name": "reinforcement", "type": "uint128" }, { "internalType": "uint128", "name": "margin", "type": "uint128" }, { "internalType": "bytes32", "name": "ipfsHash", "type": "bytes32" }, { "internalType": "uint64[2]", "name": "outcomes", "type": "uint64[2]" }, { "internalType": "uint128", "name": "scopeId", "type": "uint128" }, { "internalType": "uint64", "name": "outcomeWin", "type": "uint64" }, { "internalType": "uint64", "name": "timestamp", "type": "uint64" }, { "internalType": "enum ICore.ConditionState", "name": "state", "type": "uint8" }, { "internalType": "uint48", "name": "leaf", "type": "uint48" } ], "internalType": "struct ICore.Condition", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "conditionId", "type": "uint256" } ], "name": "getConditionFunds", "outputs": [ { "internalType": "uint128[2]", "name": "fundBank", "type": "uint128[2]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "conditionId", "type": "uint256" } ], "name": "getConditionReinforcement", "outputs": [ { "internalType": "uint128", "name": "reinforcement", "type": "uint128" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "outcomeId", "type": "uint64" } ], "name": "getMargin", "outputs": [ { "internalType": "uint128", "name": "", "type": "uint128" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "fund1Bank", "type": "uint256" }, { "internalType": "uint256", "name": "fund2Bank", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "outcomeIndex", "type": "uint256" }, { "internalType": "uint256", "name": "margin", "type": "uint256" }, { "internalType": "uint256", "name": "multiplier", "type": "uint256" } ], "name": "getOddsFromBanks", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "uint64", "name": "outcomeId", "type": "uint64" } ], "name": "getReinforcement", "outputs": [ { "internalType": "uint128", "name": "", "type": "uint128" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint128", "name": "reinforcement", "type": "uint128" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint128", "name": "margin", "type": "uint128" } ], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "oracle", "type": "address" } ], "name": "isOracle", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "conditionId", "type": "uint256" }, { "internalType": "uint256", "name": "outcome", "type": "uint256" } ], "name": "isOutComeCorrect", "outputs": [ { "internalType": "bool", "name": "correct", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastConditionId", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "maintainers", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "odds", "type": "uint256" }, { "internalType": "uint256", "name": "marginality", "type": "uint256" }, { "internalType": "uint256", "name": "multiplier", "type": "uint256" } ], "name": "marginAdjustedOdds", "outputs": [ { "internalType": "uint256", "name": "newOdds", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "maxBanksRatio", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "multiplier", "outputs": [ { "internalType": "uint128", "name": "", "type": "uint128" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "oracleConditionIds", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "oracles", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "conditionId", "type": "uint256" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "uint128", "name": "amount", "type": "uint128" }, { "internalType": "uint64", "name": "outcome", "type": "uint64" }, { "internalType": "uint64", "name": "minOdds", "type": "uint64" } ], "name": "putBet", "outputs": [ { "internalType": "uint64", "name": "", "type": "uint64" }, { "internalType": "uint128", "name": "", "type": "uint128" }, { "internalType": "uint128", "name": "", "type": "uint128" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "oracle", "type": "address" } ], "name": "renounceOracle", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "oracleCondId", "type": "uint256" }, { "internalType": "uint64", "name": "outcomeWin", "type": "uint64" } ], "name": "resolveCondition", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "resolvePayout", "outputs": [ { "internalType": "bool", "name": "success", "type": "bool" }, { "internalType": "uint128", "name": "amount", "type": "uint128" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "lp", "type": "address" } ], "name": "setLp", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "oracle", "type": "address" } ], "name": "setOracle", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "oracleCondId", "type": "uint256" }, { "internalType": "uint64", "name": "newTimestamp", "type": "uint64" } ], "name": "shift", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "x", "type": "uint256" } ], "name": "sqrt", "outputs": [ { "internalType": "uint256", "name": "y", "type": "uint256" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "bool", "name": "flag", "type": "bool" } ], "name": "stopAllConditions", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "conditionId", "type": "uint256" }, { "internalType": "bool", "name": "flag", "type": "bool" } ], "name": "stopCondition", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint128[]", "name": "data", "type": "uint128[]" } ], "name": "updateMargins", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint128[]", "name": "data", "type": "uint128[]" } ], "name": "updateReinforcements", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "viewPayout", "outputs": [ { "internalType": "bool", "name": "success", "type": "bool" }, { "internalType": "uint128", "name": "amount", "type": "uint128" } ], "stateMutability": "view", "type": "function" } ]