Skip to content

isERC1155SingleDeposit

Checks if a request is a ERC-1155 deposit coming from the ERC1155SinglePortal smart contract.

Usage

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

Returns

Type: boolean

True if request is a ERC-1155 deposit from the ERC1155SinglePortal smart contract.

Parameters

Type: AdvanceRequestData