@infy-protocol/sdk
Version:
Lend and rent any ERC721s and ERC1155s on supported mainnet and testnet.
904 lines (903 loc) • 16.8 kB
text/typescript
export const TimeBasedNFTRentalsAbi = [
{
inputs: [
{
internalType: 'address',
name: '_paymentOptionProvider',
type: 'address',
},
{
internalType: 'address payable',
name: '_treasury',
type: 'address',
},
{
internalType: 'address',
name: '_admin',
type: 'address',
},
],
stateMutability: 'nonpayable',
type: 'constructor',
},
{
inputs: [
{
internalType: 'uint256',
name: 'lendAmount',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'availableAmount',
type: 'uint256',
},
],
name: 'ActiveRenting',
type: 'error',
},
{
inputs: [],
name: 'ClaimIsNotAllowedYet',
type: 'error',
},
{
inputs: [],
name: 'CollateralPriceIsZero',
type: 'error',
},
{
inputs: [],
name: 'DistributeClaimError',
type: 'error',
},
{
inputs: [
{
internalType: 'uint8',
name: 'code',
type: 'uint8',
},
],
name: 'DistributePaymentError',
type: 'error',
},
{
inputs: [],
name: 'ExceedMaxRentFee',
type: 'error',
},
{
inputs: [],
name: 'LendingEmpty',
type: 'error',
},
{
inputs: [],
name: 'LendingNotEmpty',
type: 'error',
},
{
inputs: [],
name: 'NoDataPassed',
type: 'error',
},
{
inputs: [],
name: 'NotAllowedToRent',
type: 'error',
},
{
inputs: [
{
internalType: 'address',
name: 'caller',
type: 'address',
},
],
name: 'NotAnAdmin',
type: 'error',
},
{
inputs: [
{
internalType: 'uint8',
name: 'errorCode',
type: 'uint8',
},
],
name: 'NotLendable',
type: 'error',
},
{
inputs: [
{
internalType: 'uint8',
name: 'errorCode',
type: 'uint8',
},
],
name: 'NotRentable',
type: 'error',
},
{
inputs: [],
name: 'Paused',
type: 'error',
},
{
inputs: [
{
internalType: 'uint256',
name: 'rentAmount',
type: 'uint256',
},
{
internalType: 'uint256',
name: 'availableAmount',
type: 'uint256',
},
],
name: 'RentAmountExceedsAvailableAmount',
type: 'error',
},
{
inputs: [
{
internalType: 'uint32',
name: 'rentDuration',
type: 'uint32',
},
{
internalType: 'uint32',
name: 'minRentDuration',
type: 'uint32',
},
],
name: 'RentDurationBelowMinRentDuration',
type: 'error',
},
{
inputs: [
{
internalType: 'uint32',
name: 'rentDuration',
type: 'uint32',
},
{
internalType: 'uint32',
name: 'maxRentDuration',
type: 'uint32',
},
],
name: 'RentDurationExceedsMaxRentDuration',
type: 'error',
},
{
inputs: [],
name: 'RentPriceIsZero',
type: 'error',
},
{
inputs: [],
name: 'RentingEmpty',
type: 'error',
},
{
inputs: [],
name: 'RentingNotEmpty',
type: 'error',
},
{
inputs: [],
name: 'ReturnIsPastDuration',
type: 'error',
},
{
inputs: [],
name: 'ReturningNotAllowed',
type: 'error',
},
{
inputs: [
{
internalType: 'address',
name: 'lender',
type: 'address',
},
{
internalType: 'address',
name: 'msgSender',
type: 'address',
},
],
name: 'StopperNotLender',
type: 'error',
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'bool',
name: 'isERC721',
type: 'bool',
},
{
indexed: true,
internalType: 'address',
name: 'lenderAddress',
type: 'address',
},
{
indexed: true,
internalType: 'address',
name: 'nftAddress',
type: 'address',
},
{
indexed: true,
internalType: 'uint256',
name: 'tokenId',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint256',
name: 'lendingId',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint32',
name: 'maxRentDuration',
type: 'uint32',
},
{
indexed: false,
internalType: 'uint32',
name: 'minRentDuration',
type: 'uint32',
},
{
indexed: false,
internalType: 'uint256',
name: 'dailyRentPrice',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint256',
name: 'lendAmount',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint256',
name: 'collateral',
type: 'uint256',
},
{
indexed: false,
internalType: 'address[]',
name: 'allowedRenters',
type: 'address[]',
},
{
indexed: false,
internalType: 'uint8',
name: 'paymentOption',
type: 'uint8',
},
],
name: 'Lend',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'renterAddress',
type: 'address',
},
{
indexed: true,
internalType: 'uint256',
name: 'lendingId',
type: 'uint256',
},
{
indexed: true,
internalType: 'uint256',
name: 'rentingId',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint256',
name: 'rentAmount',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint32',
name: 'rentDuration',
type: 'uint32',
},
{
indexed: false,
internalType: 'uint32',
name: 'rentedAt',
type: 'uint32',
},
],
name: 'Rent',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'uint256',
name: 'rentingId',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint32',
name: 'claimedAt',
type: 'uint32',
},
{
indexed: false,
internalType: 'bool',
name: 'isCollateralFree',
type: 'bool',
},
],
name: 'RentOrCollateralClaimed',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'uint256',
name: 'lendingId',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint32',
name: 'stoppedAt',
type: 'uint32',
},
],
name: 'StopLend',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'uint256',
name: 'rentingId',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint32',
name: 'stoppedAt',
type: 'uint32',
},
],
name: 'StopRent',
type: 'event',
},
{
inputs: [
{
internalType: 'enum NFTStandard[]',
name: '_nftStandards',
type: 'uint8[]',
},
{
internalType: 'address[]',
name: '_nfts',
type: 'address[]',
},
{
internalType: 'uint256[]',
name: '_tokenIds',
type: 'uint256[]',
},
{
internalType: 'uint256[]',
name: '_lendingIds',
type: 'uint256[]',
},
{
internalType: 'uint256[]',
name: '_rentingIds',
type: 'uint256[]',
},
],
name: 'claimRentOrCollateral',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: '_nfts',
type: 'address',
},
{
internalType: 'uint256',
name: '_tokenIds',
type: 'uint256',
},
{
internalType: 'uint256',
name: '_lendingIds',
type: 'uint256',
},
],
name: 'getLendingInfo',
outputs: [
{
internalType: 'uint8',
name: '',
type: 'uint8',
},
{
internalType: 'address',
name: '',
type: 'address',
},
{
internalType: 'uint32',
name: '',
type: 'uint32',
},
{
internalType: 'uint32',
name: '',
type: 'uint32',
},
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
{
internalType: 'uint8',
name: '',
type: 'uint8',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: '_nfts',
type: 'address',
},
{
internalType: 'uint256',
name: '_tokenIds',
type: 'uint256',
},
{
internalType: 'uint256',
name: '_rentingIds',
type: 'uint256',
},
],
name: 'getRentingInfo',
outputs: [
{
internalType: 'address',
name: '',
type: 'address',
},
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
{
internalType: 'uint32',
name: '',
type: 'uint32',
},
{
internalType: 'uint32',
name: '',
type: 'uint32',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'enum NFTStandard[]',
name: '_nftStandards',
type: 'uint8[]',
},
{
internalType: 'address[]',
name: '_nfts',
type: 'address[]',
},
{
internalType: 'uint256[]',
name: '_tokenIds',
type: 'uint256[]',
},
{
internalType: 'uint256[]',
name: '_lendAmounts',
type: 'uint256[]',
},
{
internalType: 'uint32[]',
name: '_maxRentDurations',
type: 'uint32[]',
},
{
internalType: 'uint32[]',
name: '_minRentDurations',
type: 'uint32[]',
},
{
internalType: 'uint256[]',
name: '_dailyRentPrices',
type: 'uint256[]',
},
{
internalType: 'uint8[]',
name: '_paymentOptions',
type: 'uint8[]',
},
{
internalType: 'uint256[]',
name: '_collateralPrices',
type: 'uint256[]',
},
{
components: [
{
internalType: 'address[]',
name: 'allowedRenters',
type: 'address[]',
},
],
internalType: 'struct ITimeBasedNFTRentals.AllowedRenters[]',
name: '_allowedRenters',
type: 'tuple[]',
},
],
name: 'lend',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: '',
type: 'address',
},
{
internalType: 'address',
name: '',
type: 'address',
},
{
internalType: 'uint256[]',
name: '',
type: 'uint256[]',
},
{
internalType: 'uint256[]',
name: '',
type: 'uint256[]',
},
{
internalType: 'bytes',
name: '',
type: 'bytes',
},
],
name: 'onERC1155BatchReceived',
outputs: [
{
internalType: 'bytes4',
name: '',
type: 'bytes4',
},
],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: '',
type: 'address',
},
{
internalType: 'address',
name: '',
type: 'address',
},
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
{
internalType: 'bytes',
name: '',
type: 'bytes',
},
],
name: 'onERC1155Received',
outputs: [
{
internalType: 'bytes4',
name: '',
type: 'bytes4',
},
],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address',
name: '',
type: 'address',
},
{
internalType: 'address',
name: '',
type: 'address',
},
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
{
internalType: 'bytes',
name: '',
type: 'bytes',
},
],
name: 'onERC721Received',
outputs: [
{
internalType: 'bytes4',
name: '',
type: 'bytes4',
},
],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [],
name: 'paused',
outputs: [
{
internalType: 'bool',
name: '',
type: 'bool',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'enum NFTStandard[]',
name: '_nftStandards',
type: 'uint8[]',
},
{
internalType: 'address[]',
name: '_nfts',
type: 'address[]',
},
{
internalType: 'uint256[]',
name: '_tokenIds',
type: 'uint256[]',
},
{
internalType: 'uint256[]',
name: '_lendingIds',
type: 'uint256[]',
},
{
internalType: 'uint32[]',
name: '_rentDurations',
type: 'uint32[]',
},
{
internalType: 'uint256[]',
name: '_rentAmounts',
type: 'uint256[]',
},
],
name: 'rent',
outputs: [],
stateMutability: 'payable',
type: 'function',
},
{
inputs: [],
name: 'rentFee',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'bool',
name: '_paused',
type: 'bool',
},
],
name: 'setPaused',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'uint256',
name: '_rentFee',
type: 'uint256',
},
],
name: 'setRentFee',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'address payable',
name: '_treasury',
type: 'address',
},
],
name: 'setTreasury',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'enum NFTStandard[]',
name: '_nftStandards',
type: 'uint8[]',
},
{
internalType: 'address[]',
name: '_nfts',
type: 'address[]',
},
{
internalType: 'uint256[]',
name: '_tokenIds',
type: 'uint256[]',
},
{
internalType: 'uint256[]',
name: '_lendingIds',
type: 'uint256[]',
},
],
name: 'stopLending',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'enum NFTStandard[]',
name: '_nftStandards',
type: 'uint8[]',
},
{
internalType: 'address[]',
name: '_nfts',
type: 'address[]',
},
{
internalType: 'uint256[]',
name: '_tokenIds',
type: 'uint256[]',
},
{
internalType: 'uint256[]',
name: '_lendingIds',
type: 'uint256[]',
},
{
internalType: 'uint256[]',
name: '_rentingIds',
type: 'uint256[]',
},
],
name: 'stopRenting',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{
internalType: 'bytes4',
name: 'interfaceId',
type: 'bytes4',
},
],
name: 'supportsInterface',
outputs: [
{
internalType: 'bool',
name: '',
type: 'bool',
},
],
stateMutability: 'view',
type: 'function',
},
];