👮‍♂️
Guardian Smart Wallet Contracts
  • 👋Welcome
  • 🔭Overview
    • ✨Our Features
      • Smart Wallets
      • Social Account Locking
      • Social Account Recovery
    • 🚀Getting Started
    • 💡Architecture
  • 📗Guides
    • 💰Smart Account (Account Factory)
    • 👮‍♂️Guardian Contract
    • 🤝Account Guardian
    • 🔒Account Lock
    • 🔐Account Recovery
Powered by GitBook
On this page
  • Install
  • Deploy
  • Usage

Was this helpful?

  1. Overview

Getting Started

PreviousSocial Account RecoveryNextArchitecture

Last updated 1 year ago

Was this helpful?

Install

forge install alfheimrShiven/guardian-smart-wallet-contracts

Add @guardian-wallet/contracts=lib/guardian-smart-wallet-contracts/contracts/prebuilts/accountin the remappings.txt or remappings list of your foundry.toml file.

Deploy

On Anvil (Locally):

Please make sure that the Anvil chain is running locally on your system. Run anvil in your terminal to run the Anvil chain.

make deploy_smart_wallet_factory

Deploying AccountFactory.sol will auto-deploy the following contracts along with it to enable the default features of the Guardian Smart wallet:

  1. AccountFactory.sol

  2. Guardian.sol

  3. AccountGuardian.sol

  4. AccountLock.sol

  5. AccountRecovery.sol

You can capture the deployed contract addresses from the console logs or the events emitted.

To know more about the util contracts deployed by the factory and their scope, visit the

Usage

On the client side:

Use the AccountFactory address directly on the client side to interact with the deployed factory contract.

In smart-contract projects

import {AccountFactory} from "@guardian-wallet/contracts/non-upgradeable/AccountFactory.sol;
import {Guardian} from "@guardian-wallet/contracts/utils/Guardian.sol;
import {AccountGuardian} from "@guardian-wallet/contracts/utils/AccountGuardian.sol;
import {AccountLock} from "@guardian-wallet/contracts/utils/AccountLock.sol;
import {AccountRecovery} from "@guardian-wallet/contracts/utils/AccountRecovery.sol;
🔭
🚀
Architecture page.