token_bound_accounts 0.2.1
A port of ERC6551 to Starknet
This repository contains the reference implementation of ERC-6551 on Starknet.
NB: This project is under active development and may undergo changes until SNIP-72 is finalized.
This proposal defines a system which assigns contract accounts to Non-fungible tokens (ERC-721s).
These accounts are referred to as token bound accounts and they allow NFTs to own assets and interact with applications, without requiring changes to existing smart contracts or infrastructure.
For more information, you could reference the original EIP proposed by Jayden Windle, Benny Giang and a few others.
This Repository contains reference implementation of:
The registry serves as a single entry point for all token bound account address queries. It has three functions:
implementation_hash
, public_key
, token_contract
, token_id
and salt
.
implementation_hash
, public_key
, token_contract
, token_id
and salt
.
The Account Contract provides a minimal reference implementation for a TBA. Thanks to native account abstraction on Starknet, it can be easily tweaked to contain as much use case as needed.
All token bound accounts must at least implement all functions contained within the reference account.
You will need to have Scarb and Starknet Foundry installed on your system. Refer to the documentations below:
To use this repository, first clone it:
git clone git@github.com:Starknet-Africa-Edu/TBA.git
cd TBA
To build the contracts, run the command:
scarb build
To run the tests contained within the tests
folder, run the command:
snforge test
For more information on writing and running tests, refer to the Starknet-Foundry documentation
Version 0.2.1
Uploaded 2 months ago
Size 103.6 KB
Run the following command in your project dir
scarb add token_bound_accounts@0.2.1
Or add the following line to your Scarb.toml
token_bound_accounts = "0.2.1"
Homepage www.tbaexplorer.com/
Repository github.com/horuslabsio/TBA/blob/main/Scarb.toml
Documentation github.com/horuslabsio/TBA-SDK