Skip to main content

Marketplace

[# Masa SDK

  • v3.34.1](/docs/developers/sdk/) / Exports / Marketplace

Class: Marketplace

Hierarchy

  • MasaContractModuleBase

    Marketplace

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Marketplace(masa, instances): Marketplace

Parameters

NameType
masaMasaInterface
instancesIIdentityContracts

Returns

Marketplace

Inherited from

MasaContractModuleBase.constructor

Properties

instances

Protected instances: IIdentityContracts

Inherited from

MasaContractModuleBase.instances


masa

Protected Readonly masa: MasaInterface

Inherited from

MasaContractModuleBase.masa

Methods

checkOrGiveAllowance

checkOrGiveAllowance(paymentAddress, paymentMethod, spenderAddress, price): Promise\<undefined | ContractReceipt>

Checks or gives allowance on ERC20 tokens

Parameters

NameType
paymentAddressstring
paymentMethodPaymentMethod
spenderAddressstring
priceBigNumber

Returns

Promise\<undefined | ContractReceipt>

Inherited from

MasaContractModuleBase.checkOrGiveAllowance


createOverrides

createOverrides(value?): Promise\<PayableOverrides>

Parameters

NameType
value?BigNumber

Returns

Promise\<PayableOverrides>

Inherited from

MasaContractModuleBase.createOverrides


estimateGasWithSlippage

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

Parameters

NameType
estimateGas(...estimateGasArgAndOverrides: never[]) => Promise\<BigNumber>
args?unknown[]
overrides?PayableOverrides

Returns

Promise\<BigNumber>

Inherited from

MasaContractModuleBase.estimateGasWithSlippage


formatPrice

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

Parameters

NameType
paymentAddressstring
priceBigNumber

Returns

Promise\<string>

Inherited from

MasaContractModuleBase.formatPrice


getNetworkFeeInformation

getNetworkFeeInformation(): Promise\<undefined | FeeData>

Returns

Promise\<undefined | FeeData>

Inherited from

MasaContractModuleBase.getNetworkFeeInformation


getPaymentAddress

getPaymentAddress(paymentMethod): string

Gets the payment address for a given payment method

Parameters

NameType
paymentMethodPaymentMethod

Returns

string

Inherited from

MasaContractModuleBase.getPaymentAddress


verify

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

verify a signature created during one of the SBT signing flows

Parameters

NameType
errorMessagestring
contractSoulLinker | SoulStore | MasaSBT | MasaSBTSelfSovereign | MasaSBTAuthority
domainTypedDataDomain
typesRecord\<string, TypedDataField[]>
valueRecord\<string, string | number | boolean | BigNumber>
signaturestring
authorityAddressstring

Returns

Promise\<void>

Inherited from

MasaContractModuleBase.verify


addSlippage

addSlippage(price, slippage): BigNumber

adds a percentage to the price as slippage

Parameters

NameType
priceBigNumber
slippagenumber

Returns

BigNumber

Inherited from

MasaContractModuleBase.addSlippage