Manta Pacific

Introduction

Manta Pacific's SLPx currently does not support inter-contract calls. However, if you are developing a wallet or frontend application, we welcome you to directly integrate the SLPx contract. If you have any technical questions, please feel free to contact our technical team:

Email:

Telegram

MantaPacificSlpx contract

Integration

Manta Pacific's SLPx currently does not support atomic contract calls. That means you can't integrate within your contract logic. The reason are as follows:

  • the minting process relies on msg.sender to be the receiver so this can have unintended effect on your contract logic

  • there is a wait time of about 8 to 10 minutes to receive the vMANTA token.

However, you can still interact with the contract directly from the frontend or use another contract but the call is structured at the end of the logic.

There are 3 main functions you use to integrate with MantaPacificSlpx:

minAmount (derived from the public variable minAmount)

estimateSendAndCallFee

create_order

You want to fetch the minAmount() function to check on the minimum amount of MANTA that you need to use to mint. Currently this value is 2000000000000000000 equal to 2 MANTA.

Next, you want to call the function estimateSendAndCallFee to get the mint fee in ETH. The input values are defined as follows:

Variable
Input value
Definition

address assetAddress

0x95CeF13441Be50d20cA4558CC0a27B601aC544E5

Address of MANTA token

uint256 amount

uint256

Amount of MANTA token be used to mint to vMANTA

uint32 channel_id

0

ID of the channel

uint64 dstGasForCall

4000000

Destination gas for call

bytes calldata adapterParams

["uint16", "uint256"], [1, 4200000]

Parameters to be encoded for the Adapter. Refer to the adapterParams encoding section below on how to call

adapterParams encoding

With Ethers.js v5, you can use solidityPack function

With Ethers.js v6

With Viem, you can use encodePacked function

Example Viem integration

minAmount

estimateSendAndCallFee

Last call returns a value of 83556372916216 equal to 0.000083556372916216 ETH.

Then, to mint vMANTA with MANTA, call approve on MANTA token contract to the MantaPacificSlpx contract, then call the create_order function with the same inputs as estimateSendAndCallFee.

Then wait for 8 to 10 minutes to receive the vMANTA token in the caller address.

Example Wagmi integration

minAmount

estimateSendAndCallFee

Last call returns a value of 83556372916216 equal to 0.000083556372916216 ETH.

Then, to mint vMANTA with MANTA, call approve on MANTA token contract to the MantaPacificSlpx contract, then call the create_order function with the same inputs as estimateSendAndCallFee.

Then wait for 8 to 10 minutes to receive the vMANTA token in the caller address.

Last updated

Was this helpful?