Skip to content

Commit

Permalink
Add spl-token documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
seanyoung committed May 26, 2022
1 parent 7b42556 commit 6562d74
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/targets/solana.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,17 @@ The contract can be used via the `@solana/solidity <https://www.npmjs.com/packag
package has `documentation <https://solana-labs.github.io/solana-solidity.js/>`_ and there
are `some examples <https://solana-labs.github.io/solana-solidity.js/>`_. There is also
`solang's integration tests <https://github.com/hyperledger-labs/solang/tree/main/integration/solana>`_.

Using spl-token
---------------

`spl-token <https://spl.solana.com/token>`_ is the solana native way of creating tokens, minting, burning, transfering
and swapping tokens. We have created example of how to use spl-token from Solidity. This files should be imported, and
then added as a base contract to your contract.

.. include:: ../../examples/spl_token.sol
:code: solidity

There is an example in our integration tests of how this should be used, specified
`token.sol <https://github.com/hyperledger-labs/solang/blob/main/integration/solana/token.sol>`_ and
`token.spec.ts <https://github.com/hyperledger-labs/solang/blob/main/integration/solana/token.spec.ts>`_.

0 comments on commit 6562d74

Please sign in to comment.