Aave.

Допис

Діліться своїми знаннями.

Aaveator.
Jan 29, 2023
Питання та відповіді експертів

Got an error when I didn't set deadline field inside signERC20Approval

I'm trying to call supplyWithPermit() inside my hardhat tests using ether.js. But I get an Permit: invalid signature error when sending the transaction. Here is the code https://github.com/1nchi/inchi-trade/blob/68c10e0316bff3c662331df2063d5dbba6db020c/packages/hardhat/test/myTest.js#L121

Could you say how I can fix it? I know that signature is right, because recoverTypedSignature_v4 of eth-sig-util lib returns the right public key.

Also I got an error when I didn't set deadline field inside signERC20Approval. Is it a required parameter?

  • Aave Protocol
  • Aave Pool
0
1
Поділитися
Коментарі
.

Відповіді

1
Aaveator.
Feb 2 2023, 16:52

Deadline is a required parameter and the block at which the tx is mined must have timestamp less than the deadline. I think that's the reason why your txn is failing try to set deadline couple minutes in future.

More info.

0
Коментарі
.

Ви знаєте відповідь?

Будь ласка, увійдіть та поділіться нею.

Aave is a decentralized non-custodial liquidity protocol where users can participate as depositors or borrowers.

213Пости230Відповіді
Sui.X.Peera.

Зароби свою частку з 1000 Sui

Заробляй бали репутації та отримуй винагороди за допомогу в розвитку спільноти Sui.