Giter Site home page Giter Site logo

huffbound's Introduction

Huffbound • ci license solidity

A Soulbound token implementation using Huff.

What?

In a nutshell, Soulbound tokens are non-transferrable NFTs. According to Vitalik, A soulbound item, once picked up, cannot be transferred or sold to another account.While transferable NFTs have their place and can be really valuable on their own for supporting artists and charities, there is also a large and underexplored design space of what non-transferable NFTs could become.

How does it work?

Simple. During the deployment (scripts soon, wip) the name, symbol, tokenURI and the owner address are passed. So the token is now bound to the owner wallet. The owner cannot transfer or approve this token. It will be tied to the owner wallet forever.

Getting Started

Requirements

The following will need to be installed in order to use this repo. Please follow the links and instructions.

  • Git
    • You'll know you've done it right if you can run git --version
  • Foundry / Foundryup
    • This will install forge, cast, and anvil
    • You can test you've installed them right by running forge --version and get an output like: forge 0.2.0 (f016135 2022-07-04T00:15:02.930499Z)
    • To get the latest of each, just run foundryup
  • Huff Compiler
    • You'll know you've done it right if you can run huffc --version and get an output like: huffc 0.2.0

Quickstart

  1. Clone this repo:
git clone https://github.com/PraneshASP/huffbound
cd huffbound
  1. Install dependencies

Once you've cloned and entered into your repository, you need to install the necessary dependencies. In order to do so, simply run:

forge install
  1. Build & Test

To build and test your contracts, you can run:

forge build
forge test
  1. Deployment

Create a .env file and copy the contents of .env.examples to it. Update the fields with relanvant values.

To proceed with the deployment, run the following command...

source .env

forge script scripts/Deploy.s.sol:Deploy --fork-url $INFURA_URL --private-key $PRIVATE_KEY --broadcast

For more information on how to use Foundry, check out the Foundry Github Repository and the foundry-huff library repository.

Blueprint

lib
├─ forge-std — https://github.com/foundry-rs/forge-std
├─ foundry-huff — https://github.com/huff-language/foundry-huff
scripts
├─ Deploy.s.sol — Deployment Script
src
├─interfaces
    └─ IHuffbound.sol - The Huffbound interface for tests
└─ Soulbound.huff — The Huffbound contract
test
└─ Soulbound.t.sol — Unit tests and Fuzz tests for the contract

License

The Unlicense

Acknowledgements

TODO

  • Deploy script
  • Implement supportsInterface()
  • Fix token_uri storage
  • Integrate ENS

Disclaimer

These smart contracts are being provided as is. No guarantee, representation or warranty is being made, express or implied, as to the safety or correctness of the user interface or the smart contracts. They have not been audited and as such there can be no assurance they will work as intended, and users may experience delays, failures, errors, omissions, loss of transmitted information or loss of funds. The creators are not liable for any of the foregoing. Users should proceed with caution and use at their own risk.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.