SDK
crossbell.js
Contract API
Link/Mint Module
Set Module

Set Module

You can:

  • attach a link module to a character, a note, an address, an ERC721 token, a linklist, or any uri.
  • attach a mint module to a note.

setLinkModuleForAddress

Set the link module for an address.

setLinkModuleForAddress(address: string, linkModule: MintOrLinkModuleConfig, overrides?: Overrides): Promise<Result<undefined, true>>

Usage

contract.setLinkModuleForAddress(
  '0x1234567890123456789012345678901234567890',
  {
    address: '0x1234567890123456789012345678901234567890',
    data: [1, 2, 3],
  }
)

Parameters

address

  • Type: string

The address to set the link module for.

linkModule

linkModule.address
  • Type: string

The address of the link module.

linkModule.data
  • Type: any[]

The init data to pass to the link module.

Returns

interface Returns {
  transactionHash: string
}

setLinkModuleForLinklist

Set the link module for a linklist.

setLinkModuleForLinklist(linklistId: BigNumberish, linkModule: MintOrLinkModuleConfig, overrides?: Overrides): Promise<Result<undefined, true>>

Usage

contract.setLinkModuleForLinklist(
  1,
  {
    address: '0x1234567890123456789012345678901234567890',
    data: [1, 2, 3],
  }
)

Parameters

linklistId

  • Type: BigNumberish

The linklist to set the link module for.

linkModule

linkModule.address
  • Type: string

The address of the link module.

linkModule.data
  • Type: any[]

The init data to pass to the link module.

Returns

interface Returns {
  transactionHash: string
}

setMintModuleForNote

Set the mint module for a note.

setMintModuleForNote(characterId: BigNumberish, noteId: BigNumberish, mintModule: MintOrLinkModuleConfig, overrides?: Overrides): Promise<Result<undefined, true>>

Usage

contract.setMintModuleForNote(
  42,
  5,
  {
    address: '0x1234567890123456789012345678901234567890',
    data: [1, 2, 3],
  }
)

Parameters

characterId

  • Type: BigNumberish

The character who owns the note.

noteId

  • Type: BigNumberish

The note to set the mint module for.

mintModule

mintModule.address
  • Type: string

The address of the mint module.

mintModule.data
  • Type: any[]

The init data to pass to the mint module.

Returns

interface Returns {
  transactionHash: string
}