Coder Social home page Coder Social logo

contracts's Introduction

Tokenbound Account Contracts

This repository contains an opinionated ERC-6551 account implementation. The smart contracts are written in Solidity using the Foundry development framework.

This project is under active development and may undergo changes until ERC-6551 is finalized. For the most recently deployed version of these contracts, see the v0.2.0 release. We recommend this version for any production usage.

Contracts

The src/ directory contains the main contracts for the project:

  • Account.sol: This contract is the main ERC-6551 account implementation. It includes functionalities for executing a low-level call against an account if the caller is authorized to make calls, setting the implementation address for a given function call, granting a given caller execution permissions, locking the account until a certain timestamp, and more.

  • AccountGuardian.sol: This contract manages upgrade and cross-chain execution settings for accounts. It includes functionalities for setting trusted implementations and executors.

  • AccountProxy.sol: This contract is an ERC-1967 proxy which enables account upgradability. It includes functionalities for initializing and getting the implementation of the contract.

Using as a Dependency

If you want to use tokenbound/contracts as a dependency in another project, you can add it using forge install:

forge install tokenbound=tokenbound/contracts

This will add tokenbound/contracts as a git submodule in your project. For more information on managing dependencies, refer to the Foundry dependencies guide.

Development Setup

You will need to have Foundry installed on your system. Please refer to the Foundry installation guide for detailed instructions.

To use this repository, first clone it:

git clone https://github.com/tokenbound/contracts.git
cd contracts

Then, install the dependencies:

forge install

This will install the submodule dependencies that are in the project.

Running Tests

To run the tests, use the forge test command:

forge test

For more information on writing and running tests, refer to the Foundry testing guide.

Contributing

Contributions are welcome and appreciated! Please make sure to run the tests before submitting a pull request.

contracts's People

Contributors

jaydenwindle avatar

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.