Inspiration
Coming from Ethereum development, wrapping my head around SPL token accounts at first was confusing. Associated token accounts were tricky to calculate and hard to keep track of. Also to send transactions of SOL as well SPL tokens is complex and takes many lines of code. Converting between decimal numbers is another step to think of and prone to error.
What it does
EasySPL makes tokens on Solana a breeze! It's a layer of abstraction over web3 transactions so that you can send around tokens and check balances with one-liners. You don't have to keep track of associated token accounts or mint decimals! Just send the number of tokens you want to the root address of a users acount. Alternatively, drop down into the details a bit more and easily structure transactions or even transaction instructions.
How we built it
I've been developing Solana-related code for SolStar (https://solstar.finance/). While developing, I made a bunch of functions to simplify these interfaces. I pulled all of those functions out of our codebase, refined them, gave better interfaces, and added stateful Mint & Wallet classes.
Challenges we ran into
Associated token accounts and big int versions of token amounts have their place. And it can be misleading or dangerous to abstract over them too heavily. Figuring out the right places for the real underlying values to poke through and correctly sign-posting them to prevent developer error.
Accomplishments that we're proud of
Sending SPL tokens in browser with a one-liner was the best feeling in the world
const txId = await wallet.transferToken(tokenInfo.address, target, amount)
What we learned
Blockchain & crypto is complex. But there are ways to simplify it. Sometimes that comes at a cost, but sometimes the proper abstractions can make a complex thing very simple to use.
What's next for EasySPL
Support for more Mint functions & multisig support!
Built With
- javascript
- web3
Log in or sign up for Devpost to join the conversation.