FusionFi Protocol Docs
English
English
  • Overview
  • Basic Concepts
  • Architecture
    • Architectural Design
  • Architectural Roles
    • User
    • Agent
      • Agent Core Functions
      • Agent Application Scenarios
      • Agent Types
      • Conclusion
    • Note
      • Note Schema
      • Note Functions
      • Note Lifecycle
      • Note Application Scenarios
      • Conclusion
    • Settlement
      • Settlement Functions
      • Settlement Types
      • Conclusion
  • Development
    • Agent Blueprints
      • Basic Blueprint
        • Zero-Capital Arbitrage Agent
      • OrderBook Blueprint
      • AMM Blueprint
        • Custom Market-Making Algorithm
    • Use Case
      • Prepare
      • Basic Agent
      • OrderBook Agent
      • AMM Agent
    • JS-SDK
      • Basic Blueprint
      • OrderBook Blueprint
      • AMM Blueprint
  • resource
    • Links
Powered by GitBook
On this page
  • Create
  • Deposit Token into Agent

Was this helpful?

  1. Development
  2. Use Case

Basic Agent

The Agent is the core entity that performs operations on FFP. A Basic Agent (such as a personal account or business account) can be created with simple commands, and it supports depositing tokens for subsequent transactions or other operations.

Create

Execute the following command to create two basic Agents:

node ./basic/create.js

Example output:

wBn7-31aDtChhLfUk_eXNG9Nbafa_ghT29XRxk7osiM create agent: <YourAgent1>  
ORHaLUrAiknTAq2Wszoyl6buJrd3MqDKLTF_2CggLtw create agent: <YourAgent2>

Configure AGENT1 and AGENT2 in the .env.local file and load:

export $(cat .env.local | xargs)

Deposit Token into Agent

Use the following command to deposit tokens into the Agent:

node ./basic/deposit.js --walletN=1 --agentId=$AGENT1
node ./basic/deposit.js --walletN=2 --agentId=$AGENT2

Check the Agent’s balance:

node ./balance.js --address=$AGENT1
node ./balance.js --address=$AGENT2
PreviousPrepareNextOrderBook Agent

Last updated 5 months ago

Was this helpful?