Marketplace
[# Masa SDK
- v3.34.1](/docs/developers/sdk/) / Exports / Marketplace
Class: Marketplace
Hierarchy
MasaContractModuleBase
↳
Marketplace
Table of contents
Constructors
Properties
Methods
- checkOrGiveAllowance
- createOverrides
- estimateGasWithSlippage
- formatPrice
- getNetworkFeeInformation
- getPaymentAddress
- verify
- addSlippage
Constructors
constructor
• new Marketplace(masa
, instances
): Marketplace
Parameters
Name | Type |
---|---|
masa | MasaInterface |
instances | IIdentityContracts |
Returns
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
Name | Type |
---|---|
paymentAddress | string |
paymentMethod | PaymentMethod |
spenderAddress | string |
price | BigNumber |
Returns
Promise
\<undefined
| ContractReceipt
>
Inherited from
MasaContractModuleBase.checkOrGiveAllowance
createOverrides
▸ createOverrides(value?
): Promise
\<PayableOverrides
>
Parameters
Name | Type |
---|---|
value? | BigNumber |
Returns
Promise
\<PayableOverrides
>
Inherited from
MasaContractModuleBase.createOverrides
estimateGasWithSlippage
▸ estimateGasWithSlippage(estimateGas
, args?
, overrides?
): Promise
\<BigNumber
>
Parameters
Name | Type |
---|---|
estimateGas | (...estimateGasArgAndOverrides : never []) => Promise \<BigNumber > |
args? | unknown [] |
overrides? | PayableOverrides |
Returns
Promise
\<BigNumber
>
Inherited from
MasaContractModuleBase.estimateGasWithSlippage
formatPrice
▸ formatPrice(paymentAddress
, price
): Promise
\<string
>
Parameters
Name | Type |
---|---|
paymentAddress | string |
price | BigNumber |
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
Name | Type |
---|---|
paymentMethod | PaymentMethod |
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
Name | Type |
---|---|
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
▸ addSlippage(price
, slippage
): BigNumber
adds a percentage to the price as slippage
Parameters
Name | Type |
---|---|
price | BigNumber |
slippage | number |
Returns
BigNumber
Inherited from
MasaContractModuleBase.addSlippage