ASBTContractWrapper
[# Masa SDK
- v3.34.1](/docs/developers/sdk/) / Exports / ASBTContractWrapper
Class: ASBTContractWrapper\<Contract>
Type parameters
Name | Type |
---|---|
Contract | extends ReferenceSBTAuthority |
Hierarchy
SBTContractWrapper
\<Contract
>↳
ASBTContractWrapper
Table of contents
Constructors
Properties
Methods
- bulkMint
- burn
- checkOrGiveAllowance
- createOverrides
- estimateGasWithSlippage
- formatPrice
- getMintPrice
- getNetworkFeeInformation
- getPaymentAddress
- getPrice
- loadSBTContract
- mint
- verify
- addSlippage
Constructors
constructor
• new ASBTContractWrapper\<Contract
>(masa
, instances
, contract
): ASBTContractWrapper
\<Contract
>
Type parameters
Name | Type |
---|---|
Contract | extends ReferenceSBTAuthority |
Parameters
Name | Type |
---|---|
masa | MasaInterface |
instances | IIdentityContracts |
contract | Contract |
Returns
ASBTContractWrapper
\<Contract
>
Inherited from
SBTContractWrapper.constructor
Properties
contract
• Readonly
contract: Contract
Inherited from
instances
• Protected
instances: IIdentityContracts
Inherited from
masa
• Protected
Readonly
masa: MasaInterface
Inherited from
Methods
bulkMint
▸ bulkMint(paymentMethod
, receivers
): Promise
\<BaseResult
[]>
Parameters
Name | Type |
---|---|
paymentMethod | PaymentMethod |
receivers | string [] |
Returns
Promise
\<BaseResult
[]>
burn
▸ burn(tokenId
): Promise
\<BaseResult
>
Parameters
Name | Type |
---|---|
tokenId | BigNumber |
Returns
Promise
\<BaseResult
>
Inherited from
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
SBTContractWrapper.checkOrGiveAllowance
createOverrides
▸ createOverrides(value?
): Promise
\<PayableOverrides
>
Parameters
Name | Type |
---|---|
value? | BigNumber |
Returns
Promise
\<PayableOverrides
>
Inherited from
SBTContractWrapper.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
SBTContractWrapper.estimateGasWithSlippage
formatPrice
▸ formatPrice(paymentAddress
, price
): Promise
\<string
>
Parameters
Name | Type |
---|---|
paymentAddress | string |
price | BigNumber |
Returns
Promise
\<string
>
Inherited from
SBTContractWrapper.formatPrice
getMintPrice
▸ getMintPrice(paymentMethod
, contract
, slippage?
): Promise
\<PriceInformation
>
Parameters
Name | Type | Default value |
---|---|---|
paymentMethod | PaymentMethod | undefined |
contract | MasaSBT | undefined |
slippage | undefined | number | 250 |
Returns
Promise
\<PriceInformation
>
Inherited from
SBTContractWrapper.getMintPrice
getNetworkFeeInformation
▸ getNetworkFeeInformation(): Promise
\<undefined
| FeeData
>
Returns
Promise
\<undefined
| FeeData
>
Inherited from
SBTContractWrapper.getNetworkFeeInformation
getPaymentAddress
▸ getPaymentAddress(paymentMethod
): string
Gets the payment address for a given payment method
Parameters
Name | Type |
---|---|
paymentMethod | PaymentMethod |
Returns
string
Inherited from
SBTContractWrapper.getPaymentAddress
getPrice
▸ getPrice(paymentMethod
, slippage?
): Promise
\<PriceInformation
>
Parameters
Name | Type | Default value |
---|---|---|
paymentMethod | PaymentMethod | undefined |
slippage | undefined | number | 250 |
Returns
Promise
\<PriceInformation
>
Inherited from
loadSBTContract
▸ loadSBTContract\<Contract
>(address
, factory
): Promise
\<Contract
>
Type parameters
Name | Type |
---|---|
Contract | extends MasaSBT |
Parameters
Name | Type |
---|---|
address | string |
factory | ContractFactory |
Returns
Promise
\<Contract
>
Inherited from
SBTContractWrapper.loadSBTContract
mint
▸ mint(paymentMethod
, receiver
): Promise
\<BaseResultWithTokenId
>
Parameters
Name | Type |
---|---|
paymentMethod | PaymentMethod |
receiver | string |
Returns
Promise
\<BaseResultWithTokenId
>
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
addSlippage
▸ addSlippage(price
, slippage
): BigNumber
adds a percentage to the price as slippage
Parameters
Name | Type |
---|---|
price | BigNumber |
slippage | number |
Returns
BigNumber