eliza
eliza copied to clipboard
chore: pass env variables when setting up GOAT and update GOAT readme
Risks
Low
Background
What does this PR do?
This PR aims to easily pass secrets to the GOAT plugin as well as improve its readme.
Problem: Currenlty secrets can only be used by plugins when calling an action or a provider. If a plugin requires an initial setup such as setting up a wallet or a GOAT plugin (e.g adding Polymarket or Uniswap plugins) there is no way to achieve this.
Solution:
Update the GOAT plugin to get passed a getSecrets
function for the specific character it is adding actions to. This allows GOAT to check the secrets/env variables and configure its plugins accordingly when being initialized.
What kind of change is this?
Improvements: This change allows developers to install GOAT plugins easily such as Polymarket, Uniswap and Coingecko. It also makes it easier to update the plugin to support multi-chain.
Documentation changes needed?
My changes do not require a change to the project documentation.
Testing
Where should a reviewer start?
- Go to
plugin-goat
Detailed testing steps
- Make sure you have an
EVM_PRIVATE_KEY
andEVM_PROVIDER_URL
for Base set - Comment out
evmPlugin
insrc/agent.ts
- Run the agent and prompt it with: What's the USDC balance of
0x18Bead774f927Af586F86F6d054C269416E163DD
- Should give you the balance of
0x18Bead774f927Af586F86F6d054C269416E163DD
To test actions on Base Sepolia simply:
- Go to
plugin-goat/src/wallet.ts
and change
const chain = base
to
const chain = sepolia
- Make sure
EVM_PROVIDER_URL
works for Sepolia - Run the agent!
Discord username
aguspunk