Module PaymentVaultImplementation

Module PaymentVaultImplementation 

Source
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§

AddressEmptyCode
Custom error with signature AddressEmptyCode(address) and selector 0x9996b315.
AddressInsufficientBalance
Custom error with signature AddressInsufficientBalance(address) and selector 0xcd786059.
AntTokenNull
Custom error with signature AntTokenNull() and selector 0xb418582c.
BatchLimitExceeded
Custom error with signature BatchLimitExceeded() and selector 0x359fd044.
DataPaymentMade
Event with signature DataPaymentMade(address,uint256,bytes32) and selector 0xf998960b1c6f0e0e89b7bbe6b6fbf3e03e6f08eee5b8430877d8adb8e149d580.
FailedInnerCall
Custom error with signature FailedInnerCall() and selector 0x1425ea42.
InvalidInputLength
Custom error with signature InvalidInputLength() and selector 0x7db491eb.
PaymentVaultImplementationInstance
A PaymentVaultImplementation instance.
SafeERC20FailedOperation
Custom error with signature SafeERC20FailedOperation(address) and selector 0x5274afe7.
antTokenCall
Function with signature antToken() and selector 0x4ec42e8e.
antTokenReturn
Container type for the return parameters of the antToken() function.
batchLimitCall
Function with signature batchLimit() and selector 0x474740b1.
batchLimitReturn
Container type for the return parameters of the batchLimit() function.
completedPaymentsCall
Function with signature completedPayments(bytes32) and selector 0xfe3c806e.
completedPaymentsReturn
Container type for the return parameters of the completedPayments(bytes32) function.
constructorCall
Constructor`.
getQuoteCall
Function with signature getQuote((uint8,uint256,uint256,(uint8,uint256)[],uint256,uint256,uint256,uint256,uint256)[]) and selector 0x3ffbb252.
getQuoteReturn
Container type for the return parameters of the getQuote((uint8,uint256,uint256,(uint8,uint256)[],uint256,uint256,uint256,uint256,uint256)[]) function.
payForQuotesCall
Function with signature payForQuotes((address,uint256,bytes32)[]) and selector 0xb6c2141b.
payForQuotesReturn
Container type for the return parameters of the payForQuotes((address,uint256,bytes32)[]) function.
requiredPaymentVerificationLengthCall
Function with signature requiredPaymentVerificationLength() and selector 0xc7170bb6.
requiredPaymentVerificationLengthReturn
Container type for the return parameters of the requiredPaymentVerificationLength() function.
verifyPaymentCall
Function with signature verifyPayment(((uint8,uint256,uint256,(uint8,uint256)[],uint256,uint256,uint256,uint256,uint256),address,bytes32)[]) and selector 0x38f03e75.
verifyPaymentReturn
Container type for the return parameters of the verifyPayment(((uint8,uint256,uint256,(uint8,uint256)[],uint256,uint256,uint256,uint256,uint256),address,bytes32)[]) function.

Enums§

PaymentVaultImplementationCalls
Container for all the PaymentVaultImplementation function calls.
PaymentVaultImplementationErrors
Container for all the PaymentVaultImplementation custom errors.
PaymentVaultImplementationEvents
Container for all the PaymentVaultImplementation events.

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 provider and constructor arguments, if any.
deploy_builder
Creates a RawCallBuilder for deploying this contract using the given provider and constructor arguments, if any.
new
Creates a new wrapper around an on-chain PaymentVaultImplementation contract instance.