lightninglabs / lightninglabs/taproot-assets
rpc: work out mapping for ERC-20 like interface bridge
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 525
- Forks
- 150
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
In conversations with potential integrators, it was brought up that the idea way for them to integrate the system into their environment would be the an API they consume to mirror the ERC-20 interface as closely as possible.
The interface has several variants, but looks mostly like:
```
totalSupply()
balanceOf(account)
transfer(recipient, amount)
allowance(owner, spender)
approve(spender, amount)
transferFrom(sender, recipient, amount)
```
The only one that doesn't map very cleanly is `balanceOf(account)` given it's based on the global account model, and there is no true global state in the taro system. Instead, assuming they're running a Multiverse to be able to serve state in an explorer-like UI, then they can rely on that to be able to find the USDC balance rooted at a given unspent output.
Ultimately, I don't think we should craft our _actual_ API based on the above, instead crafting something based on first principles that more explicitly defines our new application model.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposed ERC-20-like methods and the discussion of Multiverse state and unspent outputs. Done means agreeing on a first-principles application model and documenting how, if at all, it maps to the listed interface, including the balanceOf limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100