πŸ“’Registering your Smart Contract

To be eligible for calling the NFT Checkout APIs, merchant need to first register a pre-deployed smart contract with Nivapay. Below information is required to register a smart contract function which can be invoked later within an NFT Checkout order. Once you fill this form you will receive a unique smartContractFunctionId which you need to pass at the time of order creation.

Field
Description
Example

network

Name of the blockchain your smart contract is deployed on

Ethereum

evmChainId

Chain id of this EVM compatible chain. Refer to: https://chainlist.org/

1

smartContactAddress

The blockchain address on which this smart contract is deployed

0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D

smartContactName

Human readable name to identify this registry entry

BAYC NFT 2024

smartContractFunctionDefinition

Smart contract function’s signature

function batchMintingByPassingTokenIds(uint256 numberOfNFTs, uint256[] memory tokenIds, address to_addr) external payable returns (bool)

smartContractFunctionABI

The ABI for this smart contract function as a JSON string

{"inputs":[{"internalType":"uint256","name":"numberOfNFTs","type":"uint256"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"address","name":"to_addr","type":"address"}],"name":"batchMintingByPassingTokenIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"}

Objective of the function

One of these values

- Mint NFT

- Buy NFT

- Issue tokens

- Swap tokens

- Others

Mint NFT

requires_payment

Whether the function requires funds in native currency / tokens to execute

yes

function_is_payable

Whether the function has payable modifier added. This is required if function receives funds in native currency.

yes

payableCryptoSymbol

Symbol of the currency which will be used to transfer the value

ETH

payableCryptoContractAddress

Contact address if this is an fungible token, else null

n/a

defaultGasLimit

Gas limit which will be used during contract execution. Appropriate gas price in native currency will be chosen by Nivapay.

This parameter can be overridden during the NFT checkout order creation.

100000

Token name displayed (if applicable)

If a token is being issued by this contract method, then provide name of that token to display to the user.

BoredApeYachtClub

Token symbol displayed (if applicable)

Symbol of the token if issued by this contract method

BAYC

Smart contract audit report

URL provided by the auditor

https://github.com/Quillhash/QuillAudit_Reports/blob/master/Kresus%20NFT%20Smart%20Contract%20Audit%20Report%20-%20QuillAudits.pdf

Other Requirements

  • The registered function should be public and be callable by any wallet address. Nivapay cannot guarantee that it will use a particular wallet address each time, as it may expose us to various risks.

  • This function should not explicitly send any funds back to the signing wallet. Nivapay can neither guarantee taking cognizance of such funds nor can it divert those funds later to anyone.

  • Payment using tokens is not supported right now. Only native currency can be paid to the contract function and hence payable modifier will be required if the function needs funds to execute successfully.

  • Merchant needs to first deploy the same / similar smart contract on the testnet. Nivapay will do the setup and merchant must conduct one successful transaction. Only after that, mainnet access will be enabled.

  • A merchant can register multiple functions by repeating the above process. Same applies for registering testnet contracts.

Last updated

Was this helpful?