You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide a brief description of the functionality you're trying to implement.
I try to make simple DeFI protocol and strategy based on zkSync.
Lets call them Core and Strategy.
Strategy contract has an executeApprovals function that calls safeApprove to max uint on token address provided as a parameter.
Core contract has function addToken that must call executeApprovals on Strategy contract.
I try to test them on testnet.
What is the specific issue or error you're encountering?
So when i call executeApprovals directly on smart contract - everything works fine but when i try to use addToken - fails without error message.
Can you share the error messages or logs you're receiving, if any?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Environment
Testnet
Provide a brief description of the functionality you're trying to implement.
I try to make simple DeFI protocol and strategy based on zkSync.
Lets call them Core and Strategy.
Strategy contract has an
executeApprovals
function that callssafeApprove
to max uint on token address provided as a parameter.Core contract has function
addToken
that must callexecuteApprovals
on Strategy contract.I try to test them on testnet.
What is the specific issue or error you're encountering?
So when i call
executeApprovals
directly on smart contract - everything works fine but when i try to useaddToken
- fails without error message.Can you share the error messages or logs you're receiving, if any?
Here is the addToken transaction
And here is the executeApprovals transaction
Have you made any recent changes to the contract before encountering this issue?
No. This functionality worked normally on Ethereum and Arbitrum. This is common approval though
Are there any external libraries or contracts that your contract interacts with?
No. There is just Strategy that makes approvals and Core that calls Strategy.
Can you provide the relevant portions of your contract code where the issue is occurring?
So tehere is a function inside Strategy:
And another one inside Core:
and here is a code of the unit tests
Have you tried to isolate the problem, and if so, what were the results?
I tried different tokens but same result. I deleted all the modifiers to be sure it does not revert on restrictions. It does not
What steps have you already taken to try to resolve the issue?
I tried to fetch stack traces
curl -X POST -H "Content-Type: application/json"
--data '{"jsonrpc":"2.0", "id":2, "method": "debug_traceTransaction", "params": [ tx_hash ] }'
rpc
But i did not find anything useful. I tried to vrerify contract but it has not given a single answer
Repo Link (Optional)
No response
Additional Details
Here are the external addresses i use on Testnet
WETH=0x20b28b1e4665fff290650586ad76e977eab90c5d
USDC=0x0faF6df7054946141266420b43783387A78d82A9
ROUTER=0xB3b7fCbb8Db37bC6f572634299A58f51622A847e
I spent hours looking for the reason. Hope you coud help me. Tell me if i should provide any other info and thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions