Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tba 212 fix inconsistencies in erc20 for spl documentation #201

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 14 additions & 37 deletions docs/developing/deploy_facilities/interacting_with_spl_tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Depending on the method called and the arguments passed to this contract, two va
The [ERC-20-for-SPL variant](https://github.com/neonlabsorg/neon-evm/blob/4bcae0f476721e5396916c43396ec85e465f878f/evm_loader/solidity/erc20_for_spl_factory.sol#L17) works with a precompiled contract within Neon EVM which can call the SPL token program. This enables you to utilize existing SPL tokens e.g. SOL or NEON, as wSOL or wNEON, respectively, via the ERC-20 interface, i.e. this contract assigns the to the token.
OlehSyzonov marked this conversation as resolved.
Show resolved Hide resolved

:::info
Note that before setting up the ERC-20 Factory Contract to construct an ERC-20-for-SPL, you must register the token's existing [Metaplex metadata](https://docs.metaplex.com/programs/token-metadata/overview).
Note that before setting up the ERC-20 Factory Contract to construct an ERC-20-for-SPL, you must register the token's existing [Metaplex metadata](https://developers.metaplex.com/token-metadata).
:::

### ERC-20-for-SPL-Mintable
OlehSyzonov marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -70,49 +70,26 @@ How you set up the ERC-20 Factory Contract will determine the contract deployed
<TabItem value="Constructor non-mintable" label="ERC20-For-Spl Constructor" default>

```
constructor(
bytes32 _tokenMint
)
Arguments:
_tokenMint – address of SPL token account
Constructor signature for Mintable token is:
constructor(
<!-- string memory _name,
string memory _symbol, Is this to be removed for non-mintable?? -->
uint8 _decimals,
address _mint_authority
)
Arguments:
_name – string representing full name of the token
_symbol – string representing shorten symbol of the token
_decimals – decimals of new token
_mint_authority – address of mint/freeze authority Neon account
/// @notice ERC20ForSpl constructor
/// @param _tokenMint The Solana-like address of the Token Mint on Solana in bytes32 format
constructor(bytes32 _tokenMint)
```
</TabItem>
<TabItem value="Constructor mintable" label="ERC20-For-Spl-Mintable Constructor">

```
/// @notice ERC20ForSplMintable constructor
/// @dev parameter _decimals cannot be bigger than 9, because of Solana's maximum value limit of uint64
/// @param _name The name of the SPLToken
/// @param _symbol The symbol of the SPLToken
/// @param _decimals The decimals of the SPLToken
/// @param _mint_authority The owner of the ERC20ForSPLMintable contract which has the permissions to mint new tokens
constructor(
string memory _name,
string memory _symbol,
bytes32 _tokenMint
)
Arguments:
_name – string representing full name of the token
_symbol – string representing shorten symbol of the token
_tokenMint – address of SPL token account
Constructor signature for mintable token is:
constructor(
string memory _name,
string memory _symbol,
uint8 _decimals,
address _mint_authority
string memory _name,
string memory _symbol,
uint8 _decimals,
address _mint_authority
)
Arguments:
_name – string representing full name of the token
_symbol – string representing shorten symbol of the token
_decimals – decimals of new token
_mint_authority – address of mint/freeze authority Neon account
```
</TabItem>
</Tabs>
Expand Down
Loading