Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tokenbound/contracts

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tokenbound/contracts

Test TokenBound implementation

  • 0.3.1-beta.0
  • unpublished
  • beta
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

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.3.1 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

Foundry

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.

Hardhat

npm install @tokenbound/contracts

and use, for example, as

import "@tokenbound/contracts/AccountV3.sol";

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.

FAQs

Package last updated on 25 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc