Skip to content

isERC721Deposit

Checks if a request is a ERC-721 deposit coming from the ERC721Portal smart contract.

Usage

import { createApp } from "@deroll/app";
import { isERC721Deposit, parseERC721Deposit } from "@deroll/wallet";
 
// create app
const app = createApp({ url: "http://127.0.0.1:5004" });
 
app.addAdvanceHandler(async (data) => {
    if (isERC721Deposit(data)) { 
        const deposit = parseERC721Deposit(data.payload);
        deposit.
sender
token
tokenId
} return "accept"; });

Returns

Type: boolean

True if request is a ERC-721 deposit from the ERC721Portal smart contract.

Parameters

Type: AdvanceRequestData