Skip to main content

Questions tagged [eip712]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
468 views

How can i verify more params with _hashTypedDataV4 from openzeppelin?

i'm trying to implement a 712 typed signature with openzeppelin: The contract has two functions: struct ProofData { address user; } bytes32 constant TYPE_HASH_EASY = keccak256("ProofData(...
0 votes
1 answer
465 views

I am prepared permit EIP712, but tx "Reverted", function selector 'Reverted 0x08c379a

I'm trying to send a permit for a transaction, but I get a function call mismatch return if I call through the smartcontract token function. If I call via encodeABI and add the same arguments, I don't ...
0 votes
1 answer
604 views

How to get v,r,s value for permit() signed token approval for a gnosis-safe as the owner?

I have a gnosis-safe and an ERC-20 contract with permit(owner, spender, value, deadline, v, r, s) method that requires v,r,s of the owner as the argument. I have calculated the required v,r,s value ...
3 votes
2 answers
167 views

What's type hash's usecase in EIP-712?

Assume I'm implementing EIP-712 signatures in solidity. contract Nice { bytes32 private constant BID_TYPE_HASH = keccak256("Bid(uint256 num1,uint256 num2)"); struct Bid { uint256 ...
1 vote
1 answer
111 views

Invalid Permit Signature - Same Signature Generated by Different Address?

Our dApp uses Permit for gasless token approvals. We are generating a signature request with signTypedData, and it works except for a few strange occurrences where I am getting back an invalid ...
0 votes
2 answers
359 views

0x API: Invalid Signature

I found out how to sign an approval into Metamask,in conformity with EIP712: const domain = [ { name: "name", type: "string" }, { name: "version", type: "...
0 votes
0 answers
9 views

Does it make sense to include signer's address in a signed message hash?

Given that the recovered signer address of an EIP-712 signature tells who signed the message, are there any scenarios in which it also makes sense to add the same address in the message payload that's ...
0 votes
2 answers
653 views

How to sign a meta-transaction using ethers?

I am trying to sign a meta-transaction so I can execute a function from a smart contract with 1 account but pay for gas fees with another. This is the code I have (this works when using MetaMask in a ...
0 votes
1 answer
566 views

Using signature to send NFT

is it possible to use signatures (EIP-712) to execute transactions. For example Person A gives his signature to a Smart Contract, to transfer A's NFT. Now there is person B, which wants to buy the NFT....
1 vote
1 answer
100 views

signTypedData_v4

I'm using web3j library i want to sign a structured message butmy code return wrong signature (my code work for signTypedData_v3 and return currect signature) but how can i modify my code to can sign ...
1 vote
0 answers
19 views

How to create types for structs that have contract types instead of address?

The struct I want to sign using ether's v5.7 (or 6) is as following, struct Order { ... IERC20 token, uint256 tokenAmount, ... } Now if I change IERC20 to address in the struct and the ...
0 votes
1 answer
743 views

EIP712 checks chainID while EIP155 includes chainID info in the signature?

Many contracts implementing EIP712 include chainID info in the domain separators, while after EIP155, most signatures already contain chainID. Do the such domain separators mainly check that old ...
5 votes
1 answer
2k views

How can I sign EIP712 message from Python code

My goal is to sign a message according to EIP712 from python code using an imported private key. To construct the message to sign I am using: https://github.com/ConsenSys/py-eip712-structs After ...
0 votes
0 answers
53 views

EIP-712: practical usage of the verifyingContract in the eip712Domain structure

Is the verifyingContract field in the eip712Domain used anywhere practically, e.g. calling to verify the signature, etc. etc.? Or is it just another protection trick for signature replay attacks? ...
0 votes
1 answer
633 views

EIP712 TypedData Encoding With Nested Array of Structs Returning Wrong Signer

Grateful in advance for any help on this issue. I'm creating an EIP712 signature with TypedData that includes a nested array of structs, and it is returning the wrong signer when I do the encoding in ...
4 votes
2 answers
1k views

Integrating KMS with ethers _signTypedData (EIP712)

I am trying to integrate KMS (Amazon) with ethers for signing the typedData and verify the signer in the smart contract. Before : The private key was saved as environment variable. Since it could be a ...
3 votes
2 answers
190 views

Why isn't EIP3009 getting much use?

I am researching the use of the EIP3009 and am noticing that the proposal, though implemented in, say, USDC's smart contracts, is not actually getting used (the functions have never been called in ...
2 votes
1 answer
83 views

How to test a contract that implements EIP712 signatures?

While testing some functions that depend on EIP 712 signatures, in foundry. Do I need to create my own helper contract or helper function to generate digest etc as mentioned in this doc - https://book....
0 votes
0 answers
32 views

How to sign EIP712 hashed message on Keystone?

I want to create an app for hardware wallets like Ledger and Keystone. Currently, I have a problem with signing hashed EIP712 messages on Keystone. I can't create the correct bc-ur for Keystone. I use ...
1 vote
1 answer
342 views

How to generate a signature in foundry if Private key is a string?

I have been testing some contract that includes EIP712 signatures, with foundry. As per this doc we need to pass the private key which is being accepted as a uint256. (uint8 v, bytes32 r, bytes32 s) = ...
1 vote
1 answer
120 views

Metatransaction EIP-712 compliant reverted on Tether USDT Polygon contract

I have a problem with the execution of a metatransaction EIP-712 compliant, I show you the backend code with ethers.js and the link of the contract on mainnet :slight_smile: Contract : https://...
2 votes
2 answers
1k views

Need help on how EIP 712 works and where are signatures stored

Trying to understand EIP712 and signatures. Modeling my knowledge on uniswap v2/v3 which is using Permit function in their routers for swapping. So my question is the following, as some wallet is ...
4 votes
1 answer
281 views

How to sign message EIP-712 with whitespace in name?

I have a message need to sign like below message = { "types": { 'EIP712Domain': [{ 'name': "name", 'type': "string" ...
2 votes
1 answer
807 views

How to Resolve "ambiguous primary types or unused types" Error with _TypedDataEncoder.hash?

I am trying to compute the hash to be signed for EIP-712 typed data using the ethers.js(v5.7.2) library in TypeScript. I'm using _TypedDataEncoder.hash() to hash the typed data, but I am encountering ...
0 votes
1 answer
77 views

Error when sending a transaction to Open Zeppelin Defender

I am getting the following error from Open Zeppelin Defender: signature missing v and recoveryParam This is my code: const config = require("../config/config"); const ethers = require('...
2 votes
2 answers
360 views

USDC EIP-3009 Ethereum and Polygon code mismatches

We're implementing gasless transactions and we need eip3009 transfer With Authorisation call. We're interested in USDC. I see some mismatches in USDC code on ethereum and polygon. To be accurate in ...
0 votes
1 answer
434 views

Encoding ENUM data type in struct for EIP712

I have a struct. struct Order { uint256 price; uint256 quantity; OrderType orderType; } enum OrderType { BUY, SELL } Question is, how should I ...
0 votes
1 answer
44 views

Custom digital signature of a wallet

I would like to get a custom signature from a wallet. What I mean is, according to EIP-712 the signature algorithm used in Ethereum is kekkac256; I would like instead to use a custom signature ...
0 votes
1 answer
260 views

Hash batch of transactions using EIP712

Using Uniswap's Permit2 contract as a base, how do I hash a batch of transactions in Solidity using EIP712? This is the way for hashing a single transactions and it works without issues: return ...
0 votes
0 answers
115 views

why Seaport Opeansea testnets API return "null" for signature?

I am trying to retrieve offers detail using seaport API for a given asset contract for a given token ID but it returns null for the signature field. My understanding is that this signature is the ...
1 vote
2 answers
114 views

What is difference between this.transferFrom and transferFrom?

If only transferFrom is called, an insufficient allowance error occurs. However, if you call this.transferFrom using this keyword, it transfers without error (with the permit method). What difference ...
5 votes
1 answer
2k views

Signing an array whit `eth_signTypedData_v4`

I'm signing an array whit eth_signTypedData_v4 but when I try to ecrecover my signature I get the incorrect address Here is my javascript code for signing the message: web3.currentProvider.sendAsync({ ...
0 votes
1 answer
133 views

Python equivalent to signTypedData for MetaTransactions?

I have the following code in Node.js: const dataToSign = { types: { EIP712Domain: domainType, MetaTransaction: metaTransactionType, }, domain: domainData, primaryType: "...
2 votes
0 answers
351 views

Invalid signature when siging EIP-712 data

I am trying call transferWithAuthorization on the USDC contract (which implements EIP-3009). To do this I need to sign the transaction data and then execute the transaction, however I am getting the ...
2 votes
1 answer
2k views

encode SignTypedDataV4 using encode_structured_data in python

TL;DR I am trying to use web3.py and eth_account to encode and sign a EIP-712 message with arrays and I am running into an error: KeyError: 'address' So, how can I encode this message? Context: ...
7 votes
2 answers
4k views

What is DOMAIN_SEPARATOR in EIP712?

Can someone please explain to me (with a practical example) the use of DOMAIN_SEPARATOR in EIP712 and how it ensures different signatures for the same messages by the same user in two different Dapps?
2 votes
2 answers
952 views

Can't recover address from signature (implementing EIP712 with eth_signTypedData_v4 and using OpenZeppelin)

can someone help me to find out what is wrong with my solidity code? (I'm trying to implement usage of the signatures and EIP712) (ECDSA and _hashTypedDataV4 are from OpenZeppelin: https://github.com/...
1 vote
0 answers
203 views

EIP712 - Unable to verify signature return from js

I am trying to verify a signed message in my smart contract that I generated from javascript. I followed another example but for some reason can't figure out why the verify function keeps returning ...
1 vote
1 answer
1k views

Can you verify an EIP712 signature using ethers/web3?

Is it possible to verify EIP712 signature using ethersjs or web3js? or the standard will always be to verified it on-chain? Thanks!
1 vote
0 answers
76 views

Build and Sign a 0x Erc1155 order with python

I would like to use the 0x protocol to post orders through the backend of a protocol that uses 0x. The biggest challenge here for me is to correctly sign an order with python web3 library. order = { &...
0 votes
1 answer
176 views

Signature from array of tokenId's isn't verifying

The domain message is: struct Offer{ address from; address to; uint256 nonce; uint256[] tokenIds; uint256 duration; } bytes32 constant ...
0 votes
1 answer
979 views

Ethers-EIP712 wont work with strings

I tried to use eip-712 signature with my smart contract but I found out that it only work with fixed-size type. Does anyone know how I can use dynamically-Sized types like string, arrays and bytes ...
3 votes
1 answer
2k views

Get Signature for Tuple input for EIP712 [duplicate]

I'm using web3.js to try and sign a tuple and get the signature. I'm utilizing draft-EIP712Upgradeable.sol in order to hash and recover the input in solidity. I originally looked at the following link ...
1 vote
0 answers
190 views

Requesting code review for simple EIP712 validation scheme

Hello, I am working on a simple EIP712 whitelist member wallet registration/validation scheme. The nutshell goes (sign typed data -> pass to chain -> extract signing address -> compare to ...
3 votes
1 answer
535 views

overflow error when passing wei value to EIP712 _signTypedData

const domainSeparator = { chainId: 5 }; const TestInfo = [ { name: 'contractAddress', type: 'address' }, { name: 'fee', type: 'uint256' } ]; const data =...
1 vote
0 answers
119 views

Signed a lazy minting voucher .How can i list the nft in opensea

This is my voucher code : async function main() { const [admin, minter, relayer] = await ethers.getSigners(); console.log(`Sign authorization:`); const registry = (await attach('...
0 votes
0 answers
599 views

Metamask + Chrome: eth_signTypedData_v4 does not exists

I made a dapp that is running on Polygon. I have been using eth_signTypedData_v4 for EIP-712 signatures for few weeks. Everything has been running fine on every browser on desktop and mobile until a ...
1 vote
0 answers
621 views

How do I perform _hashTypedDataV4 on a struct containing an array of structs

I have signed a typed data, and I am trying to recover the address of the signer from my contract using ECDSA.recover(). But each time I try it, I get an address that is different from the address of ...
0 votes
1 answer
109 views

Can I store a "truly private" variable with EIP712?

I've come across EIP712 utilities in open zepplin. I also found a contract using a draft version here. I've modified their contract to something more akin to what I want to do. I was curious about ...
3 votes
0 answers
315 views

Signing a hash with EIP712

Is it possible to sign just a hash with the EIP712 standard (either within Solidity or Ethers.js)? If so, how? All that I'm finding online is the full EIP712 process of domain, types, values, signing ...