GLIF Agent Website Tutorial Part II — Create your Agent
Create your Agent on the GLIF Website
Last updated
Create your Agent on the GLIF Website
Last updated
If you don’t yet understand the basics of GLIF Agents and the preparation steps to get started creating Agents on the GLIF website, we suggest you start by reading Part I of this tutorial.
Before creating your Agent on the website, it’s important to understand 2 “roles” within GLIF. As a brief refresher:
Agent — An Agent is a smart contract that borrows FIL from GLIF. You will deploy, own, and operate your Agent smart contract yourself (covered in Part II of the tutorial). In order to borrow FIL, your Agent needs collateral, which it gets by taking ownership of your Filecoin miner(s). A more detailed description of Agents can be found here.
Agent owner wallet — The Agent’s owner wallet is the wallet that controls your Agent. Whoever is in control of your Agent’s owner wallet can operate your Agent. It is very important to keep the Agent’s owner wallet secure, which GLIF will help you do automatically.
In this tutorial, you will:
Create your Agent Owner multisig wallet
Create your Agent smart contract
The Agent Creation Wizard on the GLIF website will walk you through these steps. Read on for a guided walkthrough.i
Step 1 — go to https://glif.io/agent and click the “Create new agent” button on the left hand panel:
Step 2 — Connect the “proposer” Filecoin Snap wallet you created in Part I of the tutorial.
Once you click the “Connect” button, you must approve GLIF to connect to your wallet. You may see this popup appear two times, you should approve both requests to connect.
Your FilSnap wallet needs some funds to perform the transactions required to create a new Agent.
If your wallet is empty, please make a deposit from another wallet using the 'Deposit' button, or send funds to the wallet's address from an exchange. If you encounter any issues with the deposit, check the tutorial here.
Step 3 — Enter your two additional wallet addresses (“approver”, “backup”) signers and create your Agent owner wallet. These are the two other FilSnap or Ledger wallet addresses you created in Part I of this tutorial.
If you want to use 2 signers only, open the owner settings, set 'Required approvals' to 2, and remove the "Signer 3".
Once you click “Create Owner”, you must approve the transaction in MetaMask:
Great work so far! Once you’ve approved this Agent Owner multisig creation transaction, you’re almost ready to create your Agent smart contract.
Step 4 — Wait for your Agent owner multisig creation transaction to complete.
In order to create your Agent, we must first wait for your Agent owner multisig wallet to exist on-chain.
If you see “Failed to load address information” under your “owner address”, this is because your Agent owner multisig wallet creation transaction is still pending.
Once your Agent owner multisig creation transaction has confirmed, you should be able to click the “Create Agent” button, and approve the transaction in MetaMask.
Once you click the “Create Agent” button, you must approve the transaction in MetaMask:
Step 5 — wait for your Agent creation transaction to confirm
Step 6 — Success! You can see we’ve created a new Agent.
A couple pieces of important information to note after creating your Agent:
Agent ID — The Agent ID is a number that GLIF uses internally in its smart contract infrastructure to identify your Agent. In this example, we’ve created Agent with ID 187
Agent f410 Address — The Agent f410 address is the smart contract address of your Agent, displayed in a Filecoin native format. In this example, our Agent has an f410 address of f410fxeyn3cygac4j3bbjagp5b6uxanibef3cbostrvq
Agent 0x Address — The Agent 0x address is another representation of the smart contract address of your Agent, dislayed in an Ethereum native format. An Agent’s f410 and 0x addresses are functionally equivalent to each other. In this example, our Agent has an 0x address of 0xb930dD8b0600b89d8429019fd0Fa970350121762
Agent Owner — The Agent Owner is the multisig wallet that owns your Agent smart contract, which we created at the beginning of this tutorial.
Agent Operator — the Agent Operator is written about in more detail in later part of this tutorial.
Congratulations! You just created your GLIF Agent. To recap, in Part II of this tutorial, you should have:
Created a new Agent Owner multisig wallet, using your FILSnap wallet and 2 Ledger wallets as signers
Created a new Agent smart contract
In Part III of this tutorial, we will show you how to add miners to your Agent.