Variables
Const API_BASE_MAINNET
API_BASE_MAINNET: "https://api.opensea.io" = "https://api.opensea.io"
Const API_BASE_RINKEBY
API_BASE_RINKEBY: "https://rinkeby-api.opensea.io" = "https://rinkeby-api.opensea.io"
Const API_PATH
API_PATH: string = `/api/v${ORDERBOOK_VERSION}`
Const API_VERSION
API_VERSION: number = 1
Const CanonicalWETH
CanonicalWETH
: PartialReadonlyContractAbi = [{'constant': true, 'inputs': [], 'name': 'name', 'outputs': [{'name': '', 'type': 'string'}], 'payable': false, 'stateMutability': 'view', 'type': 'function'}, {'constant': false, 'inputs': [{'name': 'guy', 'type': 'address'}, {'name': 'wad', 'type': 'uint256'}], 'name': 'approve', 'outputs': [{'name': '', 'type': 'bool'}], 'payable': false, 'stateMutability': 'nonpayable', 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'totalSupply', 'outputs': [{'name': '', 'type': 'uint256'}], 'payable': false, 'stateMutability': 'view', 'type': 'function'}, {'constant': false, 'inputs': [{'name': 'src', 'type': 'address'}, {'name': 'dst', 'type': 'address'}, {'name': 'wad', 'type': 'uint256'}], 'name': 'transferFrom', 'outputs': [{'name': '', 'type': 'bool'}], 'payable': false, 'stateMutability': 'nonpayable', 'type': 'function'}, {'constant': false, 'inputs': [{'name': 'wad', 'type': 'uint256'}], 'name': 'withdraw', 'outputs': [], 'payable': false, 'stateMutability': 'nonpayable', 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'decimals', 'outputs': [{'name': '', 'type': 'uint8'}], 'payable': false, 'stateMutability': 'view', 'type': 'function'}, {'constant': true, 'inputs': [{'name': '', 'type': 'address'}], 'name': 'balanceOf', 'outputs': [{'name': '', 'type': 'uint256'}], 'payable': false, 'stateMutability': 'view', 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'symbol', 'outputs': [{'name': '', 'type': 'string'}], 'payable': false, 'stateMutability': 'view', 'type': 'function'}, {'constant': false, 'inputs': [{'name': 'dst', 'type': 'address'}, {'name': 'wad', 'type': 'uint256'}], 'name': 'transfer', 'outputs': [{'name': '', 'type': 'bool'}], 'payable': false, 'stateMutability': 'nonpayable', 'type': 'function'}, {'constant': false, 'inputs': [], 'name': 'deposit', 'outputs': [], 'payable': true, 'stateMutability': 'payable', 'type': 'function'}, {'constant': true, 'inputs': [{'name': '', 'type': 'address'}, {'name': '', 'type': 'address'}], 'name': 'allowance', 'outputs': [{'name': '', 'type': 'uint256'}], 'payable': false, 'stateMutability': 'view', 'type': 'function'}, {'payable': true, 'stateMutability': 'payable', 'type': 'fallback'}, {'anonymous': false, 'inputs': [{'indexed': true, 'name': 'src', 'type': 'address'}, {'indexed': true, 'name': 'guy', 'type': 'address'}, {'indexed': false, 'name': 'wad', 'type': 'uint256'}], 'name': 'Approval', 'type': 'event'}, {'anonymous': false, 'inputs': [{'indexed': true, 'name': 'src', 'type': 'address'}, {'indexed': true, 'name': 'dst', 'type': 'address'}, {'indexed': false, 'name': 'wad', 'type': 'uint256'}], 'name': 'Transfer', 'type': 'event'}, {'anonymous': false, 'inputs': [{'indexed': true, 'name': 'dst', 'type': 'address'}, {'indexed': false, 'name': 'wad', 'type': 'uint256'}], 'name': 'Deposit', 'type': 'event'}, {'anonymous': false, 'inputs': [{'indexed': true, 'name': 'src', 'type': 'address'}, {'indexed': false, 'name': 'wad', 'type': 'uint256'}], 'name': 'Withdrawal', 'type': 'event'}]
Const DEFAULT_BUYER_FEE_BASIS_POINTS
DEFAULT_BUYER_FEE_BASIS_POINTS: 0 = 0
Const DEFAULT_MAX_BOUNTY
DEFAULT_MAX_BOUNTY: 250 = DEFAULT_SELLER_FEE_BASIS_POINTS
Const DEFAULT_SELLER_FEE_BASIS_POINTS
DEFAULT_SELLER_FEE_BASIS_POINTS: 250 = 250
Const DEP_INFURA_KEY
DEP_INFURA_KEY: "e8695bce67944848aa95459fac052f8e" = "e8695bce67944848aa95459fac052f8e"
Const ERC20
ERC20
: PartialReadonlyContractAbi = [{'constant': true, 'inputs': [], 'name': 'name', 'outputs': [{'name': '', 'type': 'string'}], 'payable': false, 'type': 'function'}, {'constant': false, 'inputs': [{'name': '_spender', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}], 'name': 'approve', 'outputs': [{'name': 'success', 'type': 'bool'}], 'payable': false, 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'totalSupply', 'outputs': [{'name': '', 'type': 'uint256'}], 'payable': false, 'type': 'function'}, {'constant': false, 'inputs': [{'name': '_from', 'type': 'address'}, {'name': '_to', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}], 'name': 'transferFrom', 'outputs': [{'name': 'success', 'type': 'bool'}], 'payable': false, 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'decimals', 'outputs': [{'name': '', 'type': 'uint8'}], 'payable': false, 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'version', 'outputs': [{'name': '', 'type': 'string'}], 'payable': false, 'type': 'function'}, {'constant': true, 'inputs': [{'name': '_owner', 'type': 'address'}], 'name': 'balanceOf', 'outputs': [{'name': 'balance', 'type': 'uint256'}], 'payable': false, 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'symbol', 'outputs': [{'name': '', 'type': 'string'}], 'payable': false, 'type': 'function'}, {'constant': false, 'inputs': [{'name': '_to', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}], 'name': 'transfer', 'outputs': [{'name': 'success', 'type': 'bool'}], 'payable': false, 'type': 'function'}, {'constant': false, 'inputs': [{'name': '_spender', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}, {'name': '_extraData', 'type': 'bytes'}], 'name': 'approveAndCall', 'outputs': [{'name': 'success', 'type': 'bool'}], 'payable': false, 'type': 'function'}, {'constant': true, 'inputs': [{'name': '_owner', 'type': 'address'}, {'name': '_spender', 'type': 'address'}], 'name': 'allowance', 'outputs': [{'name': 'remaining', 'type': 'uint256'}], 'payable': false, 'type': 'function'}, {'inputs': [{'name': '_initialAmount', 'type': 'uint256'}, {'name': '_tokenName', 'type': 'string'}, {'name': '_decimalUnits', 'type': 'uint8'}, {'name': '_tokenSymbol', 'type': 'string'}], 'type': 'constructor'}, {'payable': false, 'type': 'fallback'}, {'anonymous': false, 'inputs': [{'indexed': true, 'name': '_from', 'type': 'address'}, {'indexed': true, 'name': '_to', 'type': 'address'}, {'indexed': false, 'name': '_value', 'type': 'uint256'}], 'name': 'Transfer', 'type': 'event'}, {'anonymous': false, 'inputs': [{'indexed': true, 'name': '_owner', 'type': 'address'}, {'indexed': true, 'name': '_spender', 'type': 'address'}, {'indexed': false, 'name': '_value', 'type': 'uint256'}], 'name': 'Approval', 'type': 'event'}]
Const ERC721
ERC721
: PartialReadonlyContractAbi = [{'constant': true,'inputs': [],'name': 'name','outputs': [{'name': '','type': 'string',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [{'name': '','type': 'uint256',},],'name': 'kittyIndexToApproved','outputs': [{'name': '','type': 'address',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [{'name': '','type': 'address',},{'name': '','type': 'uint256',},],'name': 'allowed','outputs': [{'name': '','type': 'address',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [{'name': '_tokenId','type': 'uint256',},],'name': 'getApproved','outputs': [{'name': '','type': 'address',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': false,'inputs': [{'name': '_to','type': 'address',},{'name': '_tokenId','type': 'uint256',},],'name': 'approve','outputs': [],'payable': false,'stateMutability': 'nonpayable','type': 'function',},{'constant': true,'inputs': [],'name': 'totalSupply','outputs': [{'name': '','type': 'uint256',},],'payable': false,'stateMutability': 'view','type': 'function',},{"constant": false,"inputs": [{"name": "_to","type": "address"},{"name": "_tokenId","type": "uint256"}],"name": "transfer","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{'constant': false,'inputs': [{'name': '_from','type': 'address',},{'name': '_to','type': 'address',},{'name': '_tokenId','type': 'uint256',},],'name': 'transferFrom','outputs': [],'payable': false,'stateMutability': 'nonpayable','type': 'function',},{'constant': true,'inputs': [{'name': '_owner','type': 'address',},{'name': '_index','type': 'uint256',},],'name': 'tokenOfOwnerByIndex','outputs': [{'name': '','type': 'uint256',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': false,'inputs': [{'name': '_from','type': 'address',},{'name': '_to','type': 'address',},{'name': '_tokenId','type': 'uint256',},],'name': 'safeTransferFrom','outputs': [],'payable': false,'stateMutability': 'nonpayable','type': 'function',},{'constant': true,'inputs': [{'name': '_tokenId','type': 'uint256',},],'name': 'exists','outputs': [{'name': '','type': 'bool',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [{'name': '_index','type': 'uint256',},],'name': 'tokenByIndex','outputs': [{'name': '','type': 'uint256',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [{'name': '_tokenId','type': 'uint256',},],'name': 'ownerOf','outputs': [{'name': '','type': 'address',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [{'name': '_owner','type': 'address',},],'name': 'balanceOf','outputs': [{'name': '','type': 'uint256',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [],'name': 'symbol','outputs': [{'name': '','type': 'string',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': false,'inputs': [{'name': '_to','type': 'address',},{'name': '_approved','type': 'bool',},],'name': 'setApprovalForAll','outputs': [],'payable': false,'stateMutability': 'nonpayable','type': 'function',},{'constant': false,'inputs': [{'name': '_from','type': 'address',},{'name': '_to','type': 'address',},{'name': '_tokenId','type': 'uint256',},{'name': '_data','type': 'bytes',},],'name': 'safeTransferFrom','outputs': [],'payable': false,'stateMutability': 'nonpayable','type': 'function',},{'constant': true,'inputs': [{'name': '_tokenId','type': 'uint256',},],'name': 'tokenURI','outputs': [{'name': '','type': 'string',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [{'name': '_owner','type': 'address',},{'name': '_operator','type': 'address',},],'name': 'isApprovedForAll','outputs': [{'name': '','type': 'bool',},],'payable': false,'stateMutability': 'view','type': 'function',},{'inputs': [{'name': '_name','type': 'string',},{'name': '_symbol','type': 'string',},],'payable': false,'stateMutability': 'nonpayable','type': 'constructor',},{'anonymous': false,'inputs': [{'indexed': true,'name': '_from','type': 'address',},{'indexed': true,'name': '_to','type': 'address',},{'indexed': false,'name': '_tokenId','type': 'uint256',},],'name': 'Transfer','type': 'event',},{'anonymous': false,'inputs': [{'indexed': true,'name': '_owner','type': 'address',},{'indexed': true,'name': '_approved','type': 'address',},{'indexed': false,'name': '_tokenId','type': 'uint256',},],'name': 'Approval','type': 'event',},{'anonymous': false,'inputs': [{'indexed': true,'name': '_owner','type': 'address',},{'indexed': true,'name': '_operator','type': 'address',},{'indexed': false,'name': '_approved','type': 'bool',},],'name': 'ApprovalForAll','type': 'event',},]
Const INVERSE_BASIS_POINT
INVERSE_BASIS_POINT: 10000 = 10000
Const MAINNET_PROVIDER_URL
MAINNET_PROVIDER_URL: "https://eth-mainnet.alchemyapi.io/jsonrpc/y5dLONzfAJh-oCY02DCP3UWCT2pSEXMo" = "https://eth-mainnet.alchemyapi.io/jsonrpc/y5dLONzfAJh-oCY02DCP3UWCT2pSEXMo"
Const MAX_ERROR_LENGTH
MAX_ERROR_LENGTH: 120 = 120
Const MAX_UINT_256
MAX_UINT_256: any = WyvernProtocol.MAX_UINT_256
Const NULL_ADDRESS
NULL_ADDRESS: any = WyvernProtocol.NULL_ADDRESS
Const NULL_BLOCK_HASH
NULL_BLOCK_HASH: "0x0000000000000000000000000000000000000000000000000000000000000000" = "0x0000000000000000000000000000000000000000000000000000000000000000"
Const OPENSEA_FEE_RECIPIENT
OPENSEA_FEE_RECIPIENT: "0x5b3256965e7c3cf26e11fcaf296dfc8807c01073" = "0x5b3256965e7c3cf26e11fcaf296dfc8807c01073"
Const OPENSEA_SELLER_BOUNTY_BASIS_POINTS
OPENSEA_SELLER_BOUNTY_BASIS_POINTS: 100 = 100
Const ORDERBOOK_PATH
ORDERBOOK_PATH: string = `/wyvern/v${ORDERBOOK_VERSION}`
Const ORDERBOOK_VERSION
ORDERBOOK_VERSION: number = 1
Const RINKEBY_PROVIDER_URL
RINKEBY_PROVIDER_URL: "https://eth-rinkeby.alchemyapi.io/jsonrpc/-yDg7wmgGw5LdsP4p4kyxRYuDzCkXtoI" = "https://eth-rinkeby.alchemyapi.io/jsonrpc/-yDg7wmgGw5LdsP4p4kyxRYuDzCkXtoI"
Const SELL_ORDER_BATCH_SIZE
SELL_ORDER_BATCH_SIZE: 2 = 2
Const SITE_HOST_MAINNET
SITE_HOST_MAINNET: "https://opensea.io" = "https://opensea.io"
Const SITE_HOST_RINKEBY
SITE_HOST_RINKEBY: "https://rinkeby.opensea.io" = "https://rinkeby.opensea.io"
Const WYVERN_EXCHANGE_ADDRESS_MAINNET
WYVERN_EXCHANGE_ADDRESS_MAINNET: "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b" = "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b"
Const WYVERN_EXCHANGE_ADDRESS_RINKEBY
WYVERN_EXCHANGE_ADDRESS_RINKEBY: "0x5206e78b21ce315ce284fb24cf05e0585a93b1d9" = "0x5206e78b21ce315ce284fb24cf05e0585a93b1d9"
Const txCallbacks
txCallbacks: object
Assign an order and a new matching order to their buy/sell sides