Skip to content

OffBlocks/offblocks-modules

Repository files navigation

OffBlocks Modules

This project experiments with ERC-7579 modular smart accounts and various payments use-cases from OffBlocks. The main modules at the moment are:

  • DelayedExecution: A module delaying the execution of a transaction and converting it into a two-step process. This is useful for cases where we don't want to execute a transaction immediately, but rather after a certain period of time guaranteeing that we can prioritise whitelisted transactions in the meantime.
  • FiatPayment: A module that facilitates crypto-to-fiat payments, such as card payments, by converting the payment into a two-step process. The first step is to reserve the funds in the user's account, and the second step is to execute the payment after the payment network has confirmed the status of the payment and is ready to settle. This module also introduces auxillary SpendLimit contract managing the user's spend limits for specified tokens on a daily and monthly basis.

Deployments

Base Sepolia:

Development

Compiling the contracts:

npx hardhat compile

Running the tests:

npx hardhat test
REPORT_GAS=true npx hardhat test

Deploying the contracts:

npx hardhat ignition deploy ignition/modules/DelayedExecution.ts --network baseSepolia --strategy create2 --parameters ignition/baseSepolia.json --verify
npx hardhat ignition deploy ignition/modules/FiatPayment.ts --network baseSepolia --strategy create2 --parameters ignition/baseSepolia.json --verify

Running the playground:

npx hardhat run scripts/playground.ts

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published