Skip to content

Smartdevs17/envio-pilot-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Envio Pilot Smart Contracts

This repository contains the smart contracts for Envio Pilot, an AI-powered automation layer for DeFi trading using MetaMask Advanced Permissions and Envio indexing.

Overview

The EnvioPilot.sol contract serves as a tracking and event emission layer. It allows the frontend to emit high-level events that are indexed in real-time by Envio, enabling the AI Agent to stay synchronized with:

  • Permission grants (ERC-7715)
  • Trade executions
  • DCA order creation and management

Contract Details

  • Network: Sepolia Testnet
  • Address: 0xF6Ee0a3a8Ea1fE73D0DFfac8419bF676276D56cB
  • Functions:
    • grantPermission(string perm, uint256 amount): Emits a PermissionGranted event.
    • executeTrade(uint256 fromAmount, uint256 toAmount): Emits a TradeExecuted event.
    • Note: In a production environment, these would be integrated directly into your trading logic.

Installation & Setup

  1. Install dependencies:

    npm install
  2. Configure environment variables: Create a .env file with:

    PRIVATE_KEY=your_private_key
    ETHERSCAN_API_KEY=your_key
    

Deployment & Verification

Deploy

npx hardhat run scripts/deploy.js --network sepolia

Verify

npx hardhat verify --network sepolia 0xF6Ee0a3a8Ea1fE73D0DFfac8419bF676276D56cB

Scripts

  • scripts/deploy.js: Main deployment script.
  • scripts/emitEvents.js: Utility script to test Envio indexing by manually emitting events.
  • scripts/verify.js: Automated verification script.

Built for the MetaMask & Envio Hackathon. 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors