Class GenericMRC721BurnableRoyalty

Interface that represents a smart contract, which implements MRC721 and has a royalty up to 10%

Hierarchy (view full)

Implements

Constructors

Properties

abi: any[]
address: string
bytecode: undefined | string
provider: Provider

Methods

  • Gives permission to to to transfer tokenId token to another account. The approval is cleared when the token is transferred.

    Only a single account can be approved at a time, so approving the zero address clears previous approvals.

    Requirements:

    • The caller must own the token or be an approved operator.
    • tokenId must exist.

    Emits an Approval event.

    Parameters

    • to: string
    • tokenId: bigint

    Returns Promise<Transaction>

  • Perform calltocontract

    Parameters

    • method: string

      The contract method to call

    • args: any[]

      The arguments

    Returns Promise<undefined | Result>

    see Result

  • Safely transfers tokenId token from from to to, checking first that contract recipients are aware of the ERC721 protocol to prevent tokens from being forever locked.

    Requirements:

    • from cannot be the zero address.
    • to cannot be the zero address.
    • tokenId token must exist and be owned by from.
    • If the caller is not from, it must be have been allowed to move this token by either approve or setApprovalForAll.
    • If to refers to a smart contract, it must implement IERC721Receiver-onERC721Received, which is called upon a safe transfer.

    Emits a Transfer event.

    Parameters

    • from: string
    • to: string
    • tokenId: bigint

    Returns Promise<Transaction>

  • Perform sendtocontract

    Parameters

    • method: string

      The contract method to send to

    • args: any[]

      The arguments to use

    • value: undefined | string = '0'

      The amount to send to the contract

    • gasLimit: undefined | number = 250000

      The amount of gas units allowed

    • gasPrice: undefined | number = 5000

      The satoshi price per gas

    Returns Promise<{
        hash160: string;
        sender: string;
        txid: string;
    }>

    see Result