Skip to content

Latest commit

 

History

History
227 lines (117 loc) · 4.01 KB

File metadata and controls

227 lines (117 loc) · 4.01 KB

Masa SDK v4.2.0Docs


Masa SDK v4.2.0 / MasaSBTModuleBase

Class: abstract MasaSBTModuleBase

Extends

  • MasaContractModuleBase

Extended by

Constructors

new MasaSBTModuleBase()

new MasaSBTModuleBase(masa, instances): MasaSBTModuleBase

Parameters

masa: MasaInterface

instances: IIdentityContracts

Returns

MasaSBTModuleBase

Inherited from

MasaContractModuleBase.constructor

Properties

instances

protected instances: IIdentityContracts

Inherited from

MasaContractModuleBase.instances


masa

protected readonly masa: MasaInterface

Inherited from

MasaContractModuleBase.masa

Methods

createOverrides()

protected createOverrides(value?): Promise<PayableOverrides>

Parameters

value?: BigNumber

Returns

Promise<PayableOverrides>

Inherited from

MasaContractModuleBase.createOverrides


estimateGasWithSlippage()

protected estimateGasWithSlippage(estimateGas, args?, overrides?): Promise<BigNumber>

Parameters

estimateGas

args?: unknown[]

overrides?: PayableOverrides

Returns

Promise<BigNumber>

Inherited from

MasaContractModuleBase.estimateGasWithSlippage


formatPrice()

protected formatPrice(paymentAddress, price): Promise<string>

Parameters

paymentAddress: string

price: BigNumber

Returns

Promise<string>

Inherited from

MasaContractModuleBase.formatPrice


getMintPrice()

protected getMintPrice(paymentMethod, contract, slippage): Promise<PriceInformation>

Parameters

paymentMethod: PaymentMethod

contract: MasaSBT

slippage: undefined | number = 250

Returns

Promise<PriceInformation>


getNetworkFeeInformation()

protected getNetworkFeeInformation(): Promise<undefined | FeeData>

Returns

Promise<undefined | FeeData>

Inherited from

MasaContractModuleBase.getNetworkFeeInformation


loadSBTContract()

protected loadSBTContract<Contract>(address, factory): Promise<Contract>

Type Parameters

Contract extends MasaSBT

Parameters

address: string

factory: ContractFactory

Returns

Promise<Contract>


verify()

protected verify(errorMessage, contract, domain, types, value, signature, authorityAddress): Promise<void>

verify a signature created during one of the SBT signing flows

Parameters

errorMessage: string

contract: SoulLinker | SoulStore | MasaSBT | MasaSBTSelfSovereign | MasaSBTAuthority

domain: TypedDataDomain

types: Record<string, TypedDataField[]>

value: Record<string, string | number | boolean | BigNumber>

signature: string

authorityAddress: string

Returns

Promise<void>

Inherited from

MasaContractModuleBase.verify


addSlippage()

protected static addSlippage(price, slippage): BigNumber

adds a percentage to the price as slippage

Parameters

price: BigNumber

slippage: number

Returns

BigNumber

Inherited from

MasaContractModuleBase.addSlippage