trip-wallet
Version:
Trip wallet SDK for JavaScript
1,235 lines (1,234 loc) • 17.6 kB
JavaScript
let tripioRoomNightABI =[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "from",
"type": "address"
},
{
"indexed": true,
"name": "to",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"constant": false,
"inputs": [],
"name": "acceptOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_contract",
"type": "address"
}
],
"name": "addToken",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_vendor",
"type": "address"
},
{
"name": "_name",
"type": "string"
}
],
"name": "addVendor",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_rnid",
"type": "uint256"
},
{
"name": "_isRefund",
"type": "bool"
}
],
"name": "applyRefund",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_approved",
"type": "address"
},
{
"name": "_tokenId",
"type": "uint256"
}
],
"name": "approve",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_vendor",
"type": "address"
},
{
"name": "_rpid",
"type": "uint256"
},
{
"name": "_date",
"type": "uint32"
},
{
"name": "_token",
"type": "uint256"
}
],
"name": "buy",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_name",
"type": "string"
},
{
"name": "_ipfs",
"type": "bytes32"
}
],
"name": "createRatePlan",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_rpid",
"type": "uint256"
},
{
"name": "_name",
"type": "string"
},
{
"name": "_ipfs",
"type": "bytes32"
}
],
"name": "modifyRatePlan",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_rnid",
"type": "uint256"
}
],
"name": "refund",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_rpid",
"type": "uint256"
}
],
"name": "removeRatePlan",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_index",
"type": "uint256"
}
],
"name": "removeToken",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_vendor",
"type": "address"
}
],
"name": "removeVendor",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_tokenId",
"type": "uint256"
}
],
"name": "safeTransferFrom",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"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": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_tokenId",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_uri",
"type": "string"
}
],
"name": "updateBaseTokenURI",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_rpid",
"type": "uint256"
},
{
"name": "_dates",
"type": "uint32[]"
},
{
"name": "_inventory",
"type": "uint16"
},
{
"name": "_tokens",
"type": "uint256[]"
},
{
"name": "_prices",
"type": "uint256[]"
}
],
"name": "updatePrices",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_vendor",
"type": "address"
},
{
"indexed": false,
"name": "_name",
"type": "string"
}
],
"name": "VendorAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_rpid",
"type": "uint256"
}
],
"name": "RatePlanPriceChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_vendor",
"type": "address"
},
{
"indexed": false,
"name": "_name",
"type": "string"
},
{
"indexed": true,
"name": "_ipfs",
"type": "bytes32"
}
],
"name": "RatePlanCreated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "_vendor",
"type": "address"
},
{
"indexed": false,
"name": "_rnid",
"type": "uint256"
}
],
"name": "Refund",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "_customer",
"type": "address"
},
{
"indexed": true,
"name": "_rnid",
"type": "uint256"
},
{
"indexed": false,
"name": "_isRefund",
"type": "bool"
}
],
"name": "ApplyRefund",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "_index",
"type": "uint256"
}
],
"name": "TokenRemoved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_customer",
"type": "address"
},
{
"indexed": true,
"name": "_vendor",
"type": "address"
},
{
"indexed": true,
"name": "_rpid",
"type": "uint256"
},
{
"indexed": false,
"name": "_date",
"type": "uint32"
},
{
"indexed": false,
"name": "_token",
"type": "uint256"
}
],
"name": "Buy",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "_uri",
"type": "string"
}
],
"name": "TokenBaseURIChanged",
"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"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_token",
"type": "address"
}
],
"name": "TokenAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_vendor",
"type": "address"
},
{
"indexed": true,
"name": "_rpid",
"type": "uint256"
}
],
"name": "RatePlanRemoved",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_vendor",
"type": "address"
},
{
"indexed": true,
"name": "_rpid",
"type": "uint256"
},
{
"indexed": false,
"name": "name",
"type": "string"
},
{
"indexed": false,
"name": "_ipfs",
"type": "bytes32"
}
],
"name": "RatePlanModified",
"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": "_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": "_vendor",
"type": "address"
}
],
"name": "VendorRemoved",
"type": "event"
},
{
"constant": false,
"inputs": [
{
"name": "_operator",
"type": "address"
},
{
"name": "_approved",
"type": "bool"
}
],
"name": "setApprovalForAll",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"constant": false,
"inputs": [],
"name": "withdrawBalance",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_token",
"type": "uint256"
}
],
"name": "withdrawToken",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"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": "_tokenId",
"type": "uint256"
}
],
"name": "getApproved",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_vendor",
"type": "address"
},
{
"name": "_rpid",
"type": "uint256"
},
{
"name": "_dates",
"type": "uint32[]"
}
],
"name": "inventoriesOfDate",
"outputs": [
{
"name": "",
"type": "uint16[]"
}
],
"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"
},
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "_name",
"type": "string"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "newOwner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"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": "_vendor",
"type": "address"
},
{
"name": "_rpid",
"type": "uint256"
},
{
"name": "_date",
"type": "uint32"
},
{
"name": "_token",
"type": "uint256"
}
],
"name": "priceOfDate",
"outputs": [
{
"name": "",
"type": "uint16"
},
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
},
{
"name": "",
"type": "uint256"
},
{
"name": "",
"type": "uint32"
}
],
"name": "prices",
"outputs": [
{
"name": "inventory",
"type": "uint16"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_vendor",
"type": "address"
},
{
"name": "_rpid",
"type": "uint256"
},
{
"name": "_dates",
"type": "uint32[]"
},
{
"name": "_token",
"type": "uint256"
}
],
"name": "pricesOfDate",
"outputs": [
{
"name": "",
"type": "uint256[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
},
{
"name": "",
"type": "uint256"
}
],
"name": "ratePlans",
"outputs": [
{
"name": "name",
"type": "string"
},
{
"name": "timestamp",
"type": "uint256"
},
{
"name": "ipfs",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_vendor",
"type": "address"
}
],
"name": "ratePlansOfVendor",
"outputs": [
{
"name": "",
"type": "uint256[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "address"
},
{
"name": "",
"type": "uint256"
}
],
"name": "refundApplications",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "roomnights",
"outputs": [
{
"name": "vendor",
"type": "address"
},
{
"name": "rpid",
"type": "uint256"
},
{
"name": "ipfs",
"type": "bytes32"
},
{
"name": "date",
"type": "uint32"
},
{
"name": "token",
"type": "uint256"
},
{
"name": "price",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_isBegin",
"type": "bool"
},
{
"name": "_limit",
"type": "uint256"
},
{
"name": "_next",
"type": "uint256"
},
{
"name": "_isVendor",
"type": "bool"
}
],
"name": "roomNightsOfOwner",
"outputs": [
{
"name": "",
"type": "uint256[]"
},
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "supportedTokens",
"outputs": [
{
"name": "",
"type": "uint256[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "interfaceID",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "symbol",
"outputs": [
{
"name": "_symbol",
"type": "string"
}
],
"payable": false,
"stateMutability": "pure",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "tokenIndexToAddress",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"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": "",
"type": "address"
}
],
"name": "vendors",
"outputs": [
{
"name": "name",
"type": "string"
},
{
"name": "timestamp",
"type": "uint256"
},
{
"name": "totalRP",
"type": "uint256"
},
{
"name": "indexRP",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
}
];
export default tripioRoomNightABI;