chore: pass env variables when setting up GOAT and update GOAT readme #898
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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?
plugin-goat
Detailed testing steps
EVM_PRIVATE_KEY
andEVM_PROVIDER_URL
for Base setevmPlugin
insrc/agent.ts
0x18Bead774f927Af586F86F6d054C269416E163DD
0x18Bead774f927Af586F86F6d054C269416E163DD
To test actions on Base Sepolia simply:
plugin-goat/src/wallet.ts
and changeto
EVM_PROVIDER_URL
works for SepoliaDiscord username
aguspunk