Skip to main content

Module PythResolver

Module PythResolver 

Source
Expand description

Generated by the following Solidity interface…

interface PythResolver {
    error ReentrancyGuardReentrantCall();

    event ResolutionChallenged(uint256 indexed factoryMarketId, int64 newPrice, uint256 newPublishTime, address indexed challenger);
    event ResolutionFinalized(uint256 indexed factoryMarketId, int64 price, bool outcomeYes, address indexed finalizer);
    event ResolutionSubmitted(uint256 indexed factoryMarketId, int64 price, uint256 publishTime, address indexed resolver);

    constructor(address _pyth, address _factory);

    function CANCEL_DEADLINE() external view returns (uint256);
    function FALLBACK_WINDOW() external view returns (uint256);
    function FINALITY_PERIOD() external view returns (uint256);
    function MAX_FALLBACK_WINDOWS() external view returns (uint256);
    function acceptAdmin() external;
    function admin() external view returns (address);
    function confThresholdBps() external view returns (uint256);
    function factory() external view returns (address);
    function finalizeResolution(uint256 factoryMarketId) external;
    function getPythUpdateFee(bytes[] memory priceUpdateData) external view returns (uint256);
    function pendingAdmin() external view returns (address);
    function pendingResolutions(uint256) external view returns (int64 price, uint256 publishTime, uint256 resolvedAtTimestamp, address resolver, bool finalized);
    function pyth() external view returns (address);
    function resolveMarket(uint256 factoryMarketId, bytes[] memory priceUpdateData) external payable;
    function setConfThreshold(uint256 newBps) external;
    function setPendingAdmin(address _pendingAdmin) external;
}

…which was generated by the following JSON ABI:

[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "_pyth",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_factory",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "CANCEL_DEADLINE",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "FALLBACK_WINDOW",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "FINALITY_PERIOD",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "MAX_FALLBACK_WINDOWS",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "acceptAdmin",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "admin",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "confThresholdBps",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "factory",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract MarketFactory"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "finalizeResolution",
    "inputs": [
      {
        "name": "factoryMarketId",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "getPythUpdateFee",
    "inputs": [
      {
        "name": "priceUpdateData",
        "type": "bytes[]",
        "internalType": "bytes[]"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "pendingAdmin",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "pendingResolutions",
    "inputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "price",
        "type": "int64",
        "internalType": "int64"
      },
      {
        "name": "publishTime",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "resolvedAtTimestamp",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "resolver",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "finalized",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "pyth",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract IPyth"
      }
    ],
    "stateMutability": "view"
  },
  {
    "type": "function",
    "name": "resolveMarket",
    "inputs": [
      {
        "name": "factoryMarketId",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "priceUpdateData",
        "type": "bytes[]",
        "internalType": "bytes[]"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "type": "function",
    "name": "setConfThreshold",
    "inputs": [
      {
        "name": "newBps",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "function",
    "name": "setPendingAdmin",
    "inputs": [
      {
        "name": "_pendingAdmin",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "type": "event",
    "name": "ResolutionChallenged",
    "inputs": [
      {
        "name": "factoryMarketId",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "newPrice",
        "type": "int64",
        "indexed": false,
        "internalType": "int64"
      },
      {
        "name": "newPublishTime",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "challenger",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ResolutionFinalized",
    "inputs": [
      {
        "name": "factoryMarketId",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "price",
        "type": "int64",
        "indexed": false,
        "internalType": "int64"
      },
      {
        "name": "outcomeYes",
        "type": "bool",
        "indexed": false,
        "internalType": "bool"
      },
      {
        "name": "finalizer",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "event",
    "name": "ResolutionSubmitted",
    "inputs": [
      {
        "name": "factoryMarketId",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "price",
        "type": "int64",
        "indexed": false,
        "internalType": "int64"
      },
      {
        "name": "publishTime",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "resolver",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "type": "error",
    "name": "ReentrancyGuardReentrantCall",
    "inputs": []
  }
]

Structs§

CANCEL_DEADLINECall
Function with signature CANCEL_DEADLINE() and selector 0x59cbd3e7.
CANCEL_DEADLINEReturn
Container type for the return parameters of the CANCEL_DEADLINE() function.
FALLBACK_WINDOWCall
Function with signature FALLBACK_WINDOW() and selector 0x8e4baee3.
FALLBACK_WINDOWReturn
Container type for the return parameters of the FALLBACK_WINDOW() function.
FINALITY_PERIODCall
Function with signature FINALITY_PERIOD() and selector 0x7c52fc1d.
FINALITY_PERIODReturn
Container type for the return parameters of the FINALITY_PERIOD() function.
MAX_FALLBACK_WINDOWSCall
Function with signature MAX_FALLBACK_WINDOWS() and selector 0x8f5d2ef0.
MAX_FALLBACK_WINDOWSReturn
Container type for the return parameters of the MAX_FALLBACK_WINDOWS() function.
PythResolverInstance
A PythResolver instance.
ReentrancyGuardReentrantCall
Custom error with signature ReentrancyGuardReentrantCall() and selector 0x3ee5aeb5.
ResolutionChallenged
Event with signature ResolutionChallenged(uint256,int64,uint256,address) and selector 0x63836dbc21d4e9311a697e36d9efa3ad9ddad172eeeec3543af50aa4e1a1b1a3.
ResolutionFinalized
Event with signature ResolutionFinalized(uint256,int64,bool,address) and selector 0xe8c2da02c101d47c2341851e2db03c6a7f66ea89e0cc1ede8951eb3937a1c459.
ResolutionSubmitted
Event with signature ResolutionSubmitted(uint256,int64,uint256,address) and selector 0x3f7bd2674fcce048c13e608341814279816fad40ccc5ee621cab2d05c55ecdae.
acceptAdminCall
Function with signature acceptAdmin() and selector 0x0e18b681.
acceptAdminReturn
Container type for the return parameters of the acceptAdmin() function.
adminCall
Function with signature admin() and selector 0xf851a440.
adminReturn
Container type for the return parameters of the admin() function.
confThresholdBpsCall
Function with signature confThresholdBps() and selector 0x80d432fa.
confThresholdBpsReturn
Container type for the return parameters of the confThresholdBps() function.
constructorCall
Constructor`.
factoryCall
Function with signature factory() and selector 0xc45a0155.
factoryReturn
Container type for the return parameters of the factory() function.
finalizeResolutionCall
Function with signature finalizeResolution(uint256) and selector 0xf5489b7e.
finalizeResolutionReturn
Container type for the return parameters of the finalizeResolution(uint256) function.
getPythUpdateFeeCall
Function with signature getPythUpdateFee(bytes[]) and selector 0xadcaec7b.
getPythUpdateFeeReturn
Container type for the return parameters of the getPythUpdateFee(bytes[]) function.
pendingAdminCall
Function with signature pendingAdmin() and selector 0x26782247.
pendingAdminReturn
Container type for the return parameters of the pendingAdmin() function.
pendingResolutionsCall
Function with signature pendingResolutions(uint256) and selector 0xfecc1021.
pendingResolutionsReturn
Container type for the return parameters of the pendingResolutions(uint256) function.
pythCall
Function with signature pyth() and selector 0xf98d06f0.
pythReturn
Container type for the return parameters of the pyth() function.
resolveMarketCall
Function with signature resolveMarket(uint256,bytes[]) and selector 0x92a8db3f.
resolveMarketReturn
Container type for the return parameters of the resolveMarket(uint256,bytes[]) function.
setConfThresholdCall
Function with signature setConfThreshold(uint256) and selector 0xa0a25b1c.
setConfThresholdReturn
Container type for the return parameters of the setConfThreshold(uint256) function.
setPendingAdminCall
Function with signature setPendingAdmin(address) and selector 0x4dd18bf5.
setPendingAdminReturn
Container type for the return parameters of the setPendingAdmin(address) function.

Enums§

PythResolverCalls
Container for all the PythResolver function calls.
PythResolverErrors
Container for all the PythResolver custom errors.
PythResolverEvents
Container for all the PythResolver events.

Functions§

new
Creates a new wrapper around an on-chain PythResolver contract instance.