Skip to content

parseERC1155SingleDeposit

Parse a ERC-1155 deposit request 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: ERC1155SingleDeposit

Structure with deposit data.

Parameters

Type: Hex

Deposit payload.