eth-permit
eth-permit copied to clipboard
Lightweight library for signing ERC-2612 permit signatures.
The library works great on all wallets except the trust wallet, it's even strange that I tested the trust on Android and on iPhone, but it only works on android,...
I noticed that there is a bug in [`splitSignatureToRSV`](https://github.com/dmihal/eth-permit/blob/34f3fb59f0e32d8c19933184f5a7121ee125d0a5/src/rpc.ts#L52) function when attempting to sign permits via a Ledger wallet and then trying to pass the resulting signature to an on-chain...
ethers version: 5.5.1 nodejs version: 16 `Error: processing response error (body="{\"jsonrpc\":\"2.0\",\"id\":49,\"error\":{\"code\":-32601,\"message\":\"the method eth_signTypedData_v4 does not exist/is not available\"}}", error={"code":-32601}, requestBody="{\"method\":\"eth_signTypedData_v4\",\"params\":[\"0xBaA081282D82602d79EF300Ba29EC3b2466D4723\",\"{\\\"types\\\":{\\\"EIP712Domain\\\":[{\\\"name\\\":\\\"name\\\",\\\"type\\\":\\\"string\\\"},{\\\"name\\\":\\\"version\\\",\\\"type\\\":\\\"string\\\"},{\\\"name\\\":\\\"chainId\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"name\\\":\\\"verifyingContract\\\",\\\"type\\\":\\\"address\\\"}],\\\"Permit\\\":[{\\\"name\\\":\\\"holder\\\",\\\"type\\\":\\\"address\\\"},{\\\"name\\\":\\\"spender\\\",\\\"type\\\":\\\"address\\\"},{\\\"name\\\":\\\"nonce\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"name\\\":\\\"expiry\\\",\\\"type\\\":\\\"uint256\\\"},{\\\"name\\\":\\\"allowed\\\",\\\"type\\\":\\\"bool\\\"}]},\\\"primaryType\\\":\\\"Permit\\\",\\\"domain\\\":{\\\"name\\\":\\\"Dai Stablecoin\\\",\\\"version\\\":\\\"1\\\",\\\"chainId\\\":\\\"0x1\\\",\\\"verifyingContract\\\":\\\"0x6b175474e89094c44da98b954eedeac495271d0f\\\"},\\\"message\\\":{\\\"holder\\\":\\\"0xBaA081282D82602d79EF300Ba29EC3b2466D4723\\\",\\\"spender\\\":\\\"0x5049bE34eE05627aD0C500f11B25d23c02F530b1\\\",\\\"nonce\\\":\\\"0x0000000000000000000000000000000000000000000000000000000000000000\\\",\\\"expiry\\\":\\\"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\\\",\\\"allowed\\\":true}}\"],\"id\":49,\"jsonrpc\":\"2.0\"}", requestMethod="POST", url="https://eth.llamarpc.com", code=SERVER_ERROR, version=web/5.7.1) at _Logger.makeError (index.ts:269:28) at _Logger.throwError...
I'm developing a dapp with a smart contract that can receive ERC20 tokens. What's the best way for a dapp (using `ethers` or `web3`) to check whether a token has...
Hello, I'm receiving 0 for the "v" value of the signature object. Hence, when passing this to the contract, the transaction is reverting with the msg error: “execution reverted: ECDSA:...
Hi! 👋 Firstly, thanks for your work on this project! 🙂 Today I used [patch-package](https://github.com/ds300/patch-package) to patch `[email protected]` for the project I'm working on. Please consider exporting the interface `ERC2612PermitMessage`....
Im using this exact demo code while using Hardhat on a forked Ethereum mainnet node. const result = await signDaiPermit(window.ethereum, tokenAddress, senderAddress, spender); await token.methods.permit(senderAddress, spender, result.nonce, result.expiry, true, result.v,...
Dai permits are hard-coded to `allow: true`. Consequently there is no way to set the allowance back to zero using the permitting API, once permitting should be disallowed. https://github.com/dmihal/eth-permit/blob/master/src/eth-permit.ts#L116
Hey, this looks like a really useful library as getting permit txs right can be confusing! It seems to me that the library is designed to be used on the...