Skip to content

WDCA/Solidity-SBT-Soul-Bound-Token

 
 

Repository files navigation

Soulbound Token Example (SBT in Solidity)

An experiment in Soulbound Tokens (SBT's)

Blog post and video about SBT's here: https://jamesbachini.com/souldbound-token/

Following on from Vitalik's co-authored whitepaper at: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4105763

Soulbound tokens have been proposed as a method of allocating non-transferable data to an ethereum address.

Where as an ERC20 or NFT token can be transferred between users SBT's are static and cannot be moved between accounts.

This opens up a wide range of applications because it lets developers map data to their users in much the same way we rely on user databases today.

There is no current ERC standard for SBT's so this is my interpretation.

It allows the contract to associate an address with a structured data set. It also allows 3rd parties to use the contract to create profile data sets with the same structure. Users have the ability to delete their data.

Unit tests are in tests/

Functions

function mint(address _soul, Soul memory _soulData) external; function burn(address _soul) external; function update(address _soul, Soul memory _soulData) external; function hasSoul(address _soul) external view returns (bool); function getSoul(address _soul) external view returns (Soul memory); function setProfile(address _soul, Soul memory _soulData) external; function getProfile(address _profiler, address _soul) external view returns (Soul memory); function listProfiles(address _soul) external view returns (address[] memory); function hasProfile(address _profiler, address _soul) external view returns (bool); function removeProfile(address _profiler, address _soul) external;

Events

event Mint(address _soul); event Burn(address _soul); event Update(address _soul); event SetProfile(address _profiler, address _soul); event RemoveProfile(address _profiler, address _soul);

About

An experiment in creating a soul bound token (SBT)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 58.2%
  • Solidity 41.8%