Expand description
Generated by the following Solidity interface…
library IPaymentVault {
type DataType is uint8;
struct DataPayment {
address rewardsAddress;
uint256 amount;
bytes32 quoteHash;
}
struct PaymentVerification {
QuotingMetrics metrics;
address rewardsAddress;
bytes32 quoteHash;
}
struct PaymentVerificationResult {
bytes32 quoteHash;
uint256 amountPaid;
bool isValid;
}
struct QuotingMetrics {
DataType dataType;
uint256 dataSize;
uint256 closeRecordsStored;
Record[] recordsPerType;
uint256 maxRecords;
uint256 receivedPaymentCount;
uint256 liveTime;
uint256 networkDensity;
uint256 networkSize;
}
struct Record {
DataType dataType;
uint256 records;
}
}
interface PaymentVaultImplementation {
error AddressEmptyCode(address target);
error AddressInsufficientBalance(address account);
error AntTokenNull();
error BatchLimitExceeded();
error FailedInnerCall();
error InvalidInputLength();
error SafeERC20FailedOperation(address token);
event DataPaymentMade(address indexed rewardsAddress, uint256 indexed amount, bytes32 indexed quoteHash);
constructor(address _antToken);
function antToken() external view returns (address);
function batchLimit() external view returns (uint256);
function completedPayments(bytes32) external view returns (bytes16 rewardsAddress, uint128 amount);
function getQuote(IPaymentVault.QuotingMetrics[] memory _metrics) external pure returns (uint256[] memory prices);
function payForQuotes(IPaymentVault.DataPayment[] memory _payments) external;
function requiredPaymentVerificationLength() external view returns (uint256);
function verifyPayment(IPaymentVault.PaymentVerification[] memory _payments) external view returns (IPaymentVault.PaymentVerificationResult[3] memory verificationResults);
}…which was generated by the following JSON ABI:
[
{
"type": "constructor",
"inputs": [
{
"name": "_antToken",
"type": "address",
"internalType": "contract IERC20"
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "antToken",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IERC20"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "batchLimit",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "completedPayments",
"inputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "rewardsAddress",
"type": "bytes16",
"internalType": "bytes16"
},
{
"name": "amount",
"type": "uint128",
"internalType": "uint128"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getQuote",
"inputs": [
{
"name": "_metrics",
"type": "tuple[]",
"internalType": "struct IPaymentVault.QuotingMetrics[]",
"components": [
{
"name": "dataType",
"type": "uint8",
"internalType": "enum IPaymentVault.DataType"
},
{
"name": "dataSize",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "closeRecordsStored",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "recordsPerType",
"type": "tuple[]",
"internalType": "struct IPaymentVault.Record[]",
"components": [
{
"name": "dataType",
"type": "uint8",
"internalType": "enum IPaymentVault.DataType"
},
{
"name": "records",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"name": "maxRecords",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "receivedPaymentCount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "liveTime",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "networkDensity",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "networkSize",
"type": "uint256",
"internalType": "uint256"
}
]
}
],
"outputs": [
{
"name": "prices",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "payForQuotes",
"inputs": [
{
"name": "_payments",
"type": "tuple[]",
"internalType": "struct IPaymentVault.DataPayment[]",
"components": [
{
"name": "rewardsAddress",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "quoteHash",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "requiredPaymentVerificationLength",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "verifyPayment",
"inputs": [
{
"name": "_payments",
"type": "tuple[]",
"internalType": "struct IPaymentVault.PaymentVerification[]",
"components": [
{
"name": "metrics",
"type": "tuple",
"internalType": "struct IPaymentVault.QuotingMetrics",
"components": [
{
"name": "dataType",
"type": "uint8",
"internalType": "enum IPaymentVault.DataType"
},
{
"name": "dataSize",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "closeRecordsStored",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "recordsPerType",
"type": "tuple[]",
"internalType": "struct IPaymentVault.Record[]",
"components": [
{
"name": "dataType",
"type": "uint8",
"internalType": "enum IPaymentVault.DataType"
},
{
"name": "records",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"name": "maxRecords",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "receivedPaymentCount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "liveTime",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "networkDensity",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "networkSize",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"name": "rewardsAddress",
"type": "address",
"internalType": "address"
},
{
"name": "quoteHash",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
],
"outputs": [
{
"name": "verificationResults",
"type": "tuple[3]",
"internalType": "struct IPaymentVault.PaymentVerificationResult[3]",
"components": [
{
"name": "quoteHash",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "amountPaid",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "isValid",
"type": "bool",
"internalType": "bool"
}
]
}
],
"stateMutability": "view"
},
{
"type": "event",
"name": "DataPaymentMade",
"inputs": [
{
"name": "rewardsAddress",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "quoteHash",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"type": "error",
"name": "AddressEmptyCode",
"inputs": [
{
"name": "target",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "AddressInsufficientBalance",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "AntTokenNull",
"inputs": []
},
{
"type": "error",
"name": "BatchLimitExceeded",
"inputs": []
},
{
"type": "error",
"name": "FailedInnerCall",
"inputs": []
},
{
"type": "error",
"name": "InvalidInputLength",
"inputs": []
},
{
"type": "error",
"name": "SafeERC20FailedOperation",
"inputs": [
{
"name": "token",
"type": "address",
"internalType": "address"
}
]
}
]Structs§
- Address
Empty Code - Custom error with signature
AddressEmptyCode(address)and selector0x9996b315. - Address
Insufficient Balance - Custom error with signature
AddressInsufficientBalance(address)and selector0xcd786059. - AntToken
Null - Custom error with signature
AntTokenNull()and selector0xb418582c. - Batch
Limit Exceeded - Custom error with signature
BatchLimitExceeded()and selector0x359fd044. - Data
Payment Made - Event with signature
DataPaymentMade(address,uint256,bytes32)and selector0xf998960b1c6f0e0e89b7bbe6b6fbf3e03e6f08eee5b8430877d8adb8e149d580. - Failed
Inner Call - Custom error with signature
FailedInnerCall()and selector0x1425ea42. - Invalid
Input Length - Custom error with signature
InvalidInputLength()and selector0x7db491eb. - Payment
Vault Implementation Instance - A
PaymentVaultImplementationinstance. - SafeER
C20Failed Operation - Custom error with signature
SafeERC20FailedOperation(address)and selector0x5274afe7. - antToken
Call - Function with signature
antToken()and selector0x4ec42e8e. - antToken
Return - Container type for the return parameters of the
antToken()function. - batch
Limit Call - Function with signature
batchLimit()and selector0x474740b1. - batch
Limit Return - Container type for the return parameters of the
batchLimit()function. - completed
Payments Call - Function with signature
completedPayments(bytes32)and selector0xfe3c806e. - completed
Payments Return - Container type for the return parameters of the
completedPayments(bytes32)function. - constructor
Call - Constructor`.
- getQuote
Call - Function with signature
getQuote((uint8,uint256,uint256,(uint8,uint256)[],uint256,uint256,uint256,uint256,uint256)[])and selector0x3ffbb252. - getQuote
Return - Container type for the return parameters of the
getQuote((uint8,uint256,uint256,(uint8,uint256)[],uint256,uint256,uint256,uint256,uint256)[])function. - payFor
Quotes Call - Function with signature
payForQuotes((address,uint256,bytes32)[])and selector0xb6c2141b. - payFor
Quotes Return - Container type for the return parameters of the
payForQuotes((address,uint256,bytes32)[])function. - required
Payment Verification Length Call - Function with signature
requiredPaymentVerificationLength()and selector0xc7170bb6. - required
Payment Verification Length Return - Container type for the return parameters of the
requiredPaymentVerificationLength()function. - verify
Payment Call - Function with signature
verifyPayment(((uint8,uint256,uint256,(uint8,uint256)[],uint256,uint256,uint256,uint256,uint256),address,bytes32)[])and selector0x38f03e75. - verify
Payment Return - Container type for the return parameters of the
verifyPayment(((uint8,uint256,uint256,(uint8,uint256)[],uint256,uint256,uint256,uint256,uint256),address,bytes32)[])function.
Enums§
- Payment
Vault Implementation Calls - Container for all the
PaymentVaultImplementationfunction calls. - Payment
Vault Implementation Errors - Container for all the
PaymentVaultImplementationcustom errors. - Payment
Vault Implementation Events - Container for all the
PaymentVaultImplementationevents.
Statics§
- BYTECODE
- The creation / init bytecode of the contract.
- DEPLOYED_
BYTECODE - The runtime bytecode of the contract, as deployed on the network.
Functions§
- deploy
- Deploys this contract using the given
providerand constructor arguments, if any. - deploy_
builder - Creates a
RawCallBuilderfor deploying this contract using the givenproviderand constructor arguments, if any. - new
- Creates a new wrapper around an on-chain
PaymentVaultImplementationcontract instance.