-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
too many values to unpack (expected 2)
on some ContractEvents subscriptions
#178
Comments
...
@bot.on_(contract_instance.Stake)
def handle_stake(log):
print("transfer") |
However, will leave this open since the error message should be easier to understand |
Sorry, copied the bot script in the latest state I left it. As I mentioned at the end of the issue, I did actually try several combinations for the handler params but still get the error. I just double checked now with @bot.on_(contract_instance.Stake)
def handle_stake(stake):
print("stake", stake) and got the exact same error I also tested other events from the same contract
Here the other event ABI {
"type": "event",
"name": "Exit",
"inputs": [
{
"name": "staker",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "exitedTokens",
"type": "uint128",
"indexed": false,
"internalType": "uint128"
},
{
"name": "exitDetails",
"type": "tuple[]",
"indexed": false,
"internalType": "struct PoolExitDetails[]",
"components": [
{
"name": "poolId",
"type": "uint128",
"internalType": "uint128"
},
{
"name": "exitedPoolShares",
"type": "uint128",
"internalType": "uint128"
}
]
}
],
"anonymous": false
} It does feel like there's an issue with |
Just tested again and it seems that the issue is still here with ape |
Taking a look at this bug now. I can replicate this error with what you've provided so working on a fix for this. |
Environment information
ape
and plugin versions:What went wrong?
I tested silverback by setting up a simple bot to poll on a
Stake
event on a contract. Some events (it seems the ones that have tuples and custom types in their ABIs) are crashingsilverback
at startup. Only having the handler with the decorator on the problematic event causes the crash, so it does happen right when silverback starts and not when an event is actually received.Here's the bot I have
And here's the output I get
And exits right after.
I also tried to see if the issue came from
ape
and made a small script to do the polling manually, but everything works witeape
.And it works as expected, I see logs when the events are found onchain.
Any idea on where the issue might be coming from ? I'm also unable to see any additional traces, and even with max verbosity I have no additional clues.
I can help and give more info / run local tests if needed !
Some of the things I tried, without success:
The text was updated successfully, but these errors were encountered: