8000 Actions in EVM-plugins cannot be initiated when use twitter as client · Issue #85 · elizaOS/eliza-starter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Actions in EVM-plugins cannot be initiated when use twitter as client #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
QingyangKong opened this issue Jan 16, 2025 · 4 comments

Comments

@QingyangKong
Copy link
QingyangKong commented Jan 16, 2025

I created an agent based on eliza-starter and want to allow Twitter users to send transactions to EVM chains(specifically avalanche fuji). The workflow is that the user reply "please transfer 1 avax to address 0x1243 on avalanche fuji" under the account and the transfer transaction will be triggered on avalanche fuji.

If I use the direct client, the workflow runs perfectly. However, the transfer action cannot be triggered when I choose Twitter as client for my agent.

Can you help to check why the input from twitter client is ignored when action in evm-plugin is supposed to be triggered?

How to reproduce the issue:

  1. Install evm plugin: pnpm install @elizaos/plugin-evm.
  2. Make sure the agent is sending tx on avalanche fuji by adding chains: { "evm": ["avalancheFuji"] } to the character.ts under settings.
  3. Make sure the agent uses twitter as client by adding clients: [Clients.TWITTER], to the chracter.ts.
  4. Fill in the twitter and EVM credentials as below:
EVM_PRIVATE_KEY=0xabc
ETHEREUM_PROVIDER_AVALANCHEFUJI=https://avax-rpc

TWITTER_DRY_RUN=false
TWITTER_USERNAME=username # Account username
TWITTER_PASSWORD=password # Account password
TWITTER_EMAIL=email_addr # Account email
TWITTER_COOKIES= # Account cookies
TWITTER_POLL_INTERVAL=120
  1. run wtih pnpm start
  2. input "please transfer 1 avax to address 0x1243 on avalanche fuji" under the twitter account.
  3. Transfer transaction is NOT initiated.

I can see the message received by checking the log but the action is not triggered, but the action can be initiated and AVAX is transferred successfully to the direct client. By saying direct client, I mean skip step 3, twitter is not used and everything works.

@wtfsayo
Copy link
Member
wtfsayo commented Jan 16, 2025

checkout this if it solves- #68

@wtfsayo wtfsayo closed this as completed Jan 16, 2025
@wtfsayo wtfsayo reopened this Jan 16, 2025
@QingyangKong
Copy link
Author

Hi @wtfsayo, thanks for the reply. It does not resolve my issue.

@wtfsayo
Copy link
Member
wtfsayo commented Jan 16, 2025

Hi @wtfsayo, thanks for the reply. It does not resolve my issue.

seem like testnet we have not defined for evm

try with @elizaos/plugin-avalanche search on main repo for more;

@QingyangKong
Copy link
Author
QingyangKong commented Jan 16, 2025

Hi @wtfsayo, thanks for the reply. It does not resolve my issue.

seem like testnet we have not defined for evm

try with @elizaos/plugin-avalanche search on main repo for more;

viem/chains is used in the plugin and avalancheFuji is included in viem chains, so I guess this is not the reason.

After some research on the source codes, I think I found the reason.

In the Twitter client, every time the agent is about to reply to the twitter mentions, input has to go through "shouldRespond" check, the process will be stopped if shouldRespond is marked as STOP(the return value is <"RESPOND" | "IGNORE" | "STOP" | null>). The codes are here https://github.com/elizaOS/eliza/blob/6cfbd1848143461511b17ffb711045c4705622c6/packages/client-twitter/src/interactions.ts#L432.

For some reason, message including blockchain address info will ALWAYS be marked as "STOP", so the action cannot be initiated. If I use direct client, there is no such limitation, so there is no problem. I think the reason of feature in twitter client might be the Twitter message is for the public.

But here is the problem, if I want to collect users' address info in twitter client and take any action like checking balance, there is no way doing it because any info including address info is considered "STOP".

Do you have any suggestions on that? There might be a way to switch off this check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0