-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
check is not a function - Error when using Uniswap quoter #6384
Comments
Thanks for sharing details. It seems due to recently one of lib change, 4.1.1 is using zod lib. We will investigate and fix it. |
might be related to #6378 |
This might be caused by the 'fee' parameter having a 'uint24' type which is not a power of 2 so custom validator is set to undefined during conversion to Zod. #6434 should solve this. |
I'm also getting this error using web3 v4.0.3. The method I'm getting the error is defined as NAME : createFlow
METHOD: {
inputs: [
{
internalType: 'contract ISuperfluidToken',
name: 'token',
type: 'address'
},
{ internalType: 'address', name: 'receiver', type: 'address' },
{ internalType: 'int96', name: 'flowRate', type: 'int96' },
{ internalType: 'bytes', name: 'ctx', type: 'bytes' }
],
name: 'createFlow',
outputs: [ { internalType: 'bytes', name: 'newCtx', type: 'bytes' } ],
stateMutability: 'nonpayable',
type: 'function',
signature: '0x62fc305e',
constant: false,
payable: false
}
PARAMS: [
'0xbc08d67BFB5e8D1C83796EA85cdEEc3145c07Df9',
'0x8005EF80C3FB177198C19c9fdB6CA8E6D6468706',
'100000000000',
'0x'
] From what I understand from the comments is about non power of 2 uint/int. Any workaround until is fixed? |
@ngmachado hey there, gonna merge it in today and i can give you a dev branch so that theres a usuable branch fixed before release. we are planning to start the release tomorrow and should be officially out soon. |
dev branch with the fix [email protected] you can use this until release |
@ngmachado |
@luu-alex I'm testing now with the dev branch, will check the new release :) Quick one: I'm getting a error also when doing a simple transfer (other contracts interactions are ok) // local ganache running @ port 8545
const httpProvider = new Web3.providers.HttpProvider("http://127.0.0.1:8545");
const web3 = new Web3(httpProvider);
// accounts array have the correct addresses, checks not included in this example
const transaction = {
from: accounts[0],
to: accounts[1],
value: web3.utils.toWei("100", "ether")
}
// fail with "TransactionRevertInstructionError: Transaction has been reverted by the EVM"
await web3.eth.sendTransaction(transaction);
// if i ignoreGasPrice no EVM tx simulation. This works!
await web3.eth.sendTransaction(transaction, undefined, { ignoreGasPricing: true }); If unrelated I can open a new issue. |
@ngmachado i believe this is happening due to the version update. the newest version uses transaction types 0x2, and ganache only accepts transaction types 0x0.
Thanks for bringing this up! if theres anything else feel free to join the discord and report it. |
When updating to the latest version 4.1.1 it gives me this error, when using the Uniswap Quoter (previously with web3 4.0.3 using old dependencies it used to work)
In order to test this code can be used:
The text was updated successfully, but these errors were encountered: