Skip to content
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

*** boa.contracts.base_evm_contract.BoaError: <exception str() failed> #349

Open
PatrickAlphaC opened this issue Nov 24, 2024 · 6 comments

Comments

@PatrickAlphaC
Copy link
Contributor

I'm attempting to call a function with titanoboa with a function that takes the following inputs:

address
uint256
address

However, I'm getting an issue:

(Pdb) pool_contract.withdraw(string_usdc, amount_in, eoa)
*** boa.contracts.base_evm_contract.BoaError: <exception str() failed>

It looks like the string_usdc is the issue, but it looks like a fine string:

(Pdb) string_usdc
'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
(Pdb) eoa
'0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'

The reason I think it's the string_usdc, is because when I pass in a different address for string_usdc it works fine:

# This works
(Pdb) pool_contract.withdraw(eoa, amount_in, eoa)
@PatrickAlphaC
Copy link
Contributor Author

It's somehow just this string. This string works:

0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB47

so does this one:

0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB49

But not this:

0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48

@PatrickAlphaC
Copy link
Contributor Author

PatrickAlphaC commented Nov 24, 2024

I have more information on the boa error!

(Pdb) error
BoaError(call_trace=TraceFrame(computation=<abc.TitanoboaComputation object at 0x1211c1130>, source=ABI pool.withdraw(address,uint256,address) -> ['uint256'], depth=0, children=[TraceFrame(computation=<abc.TitanoboaComputation object at 0x121d756d0>, source=None, depth=1, children=[TraceFrame(computation=<abc.TitanoboaComputation object at 0x121d760f0>, source=ABI aavev3_pool_address_provider.getPriceOracle() -> ['address'], depth=2, children=[]), TraceFrame(computation=<abc.TitanoboaComputation object at 0x121d74950>, source=None, depth=2, children=[TraceFrame(computation=<abc.TitanoboaComputation object at 0x105987770>, source=None, depth=3, children=[TraceFrame(computation=<abc.TitanoboaComputation object at 0x121f98710>, source=None, depth=4, children=[])]), TraceFrame(computation=<abc.TitanoboaComputation object at 0x121f98a70>, source=vyper.ast.nodes.Str:
     336     ownable._check_owner()
---> 337     assert minter != empty(address), "erc20: minter is the zero address"
----------------------------------------------^
     338     # We ensured in the previous step `ownable._check_owner`, depth=3, children=[TraceFrame(computation=<abc.TitanoboaComputation object at 0x121f98dd0>, source=None, depth=4, children=[])])])])]), stack_trace=['   <Unknown contract 0x2b22e425c1322fba0dbf17bb1da25d71811ee7ba>', '   <Unknown contract 0xef434e4573b90b6ecd4a00f4888381e4d0cc5ccd>', "  b'\\x08\\xc3y\\xa0\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00 \\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x0232\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'(<pool interface at 0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2>.withdraw(address,uint256,address) -> ['uint256'])"])

It seems that for some reason it's calling set_minteron the ERC20 address?

@PatrickAlphaC
Copy link
Contributor Author

For some reason, I think it's calling functions on the mock contract I have, enough though it should be ignoring that and just using the ABI perhaps...

@charles-cooper
Copy link
Member

what's the type of string_usdc?

@PatrickAlphaC
Copy link
Contributor Author

str

@charles-cooper
Copy link
Member

I think you should make sure it is an Address

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