Restake
Developer Docs
Introduction

Using Tangle LST in your project

Tangle LST pallet precompile provides information about the current state of the Tangle network liquid staking functionality. A precompiled contract is native Substrate code that has an Ethereum-style address and can be called using the Ethereum API, like any other smart contract. The precompiles allow you to call the Substrate runtime directly which is not normally accessible from the Ethereum side of Tangle.

How to use the precompile

Precompile can be used like any other Solidity interface.

You can import the precompile in your Solidity project like this:

import "LSTPrecompile.sol";

To then deposit tokens into the precompile, you can use the deposit function:

function join(uint256 amount, uint256 poolId) external;

This function will deposit the specified amount of tokens into the precompile and assign the corresponding amount of tokens to the to address.

More information about the precompile can be found here.