Questions tagged [eip712]
The eip712 tag has no usage guidance.
44
questions
1
vote
1
answer
49
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://...
1
vote
1
answer
53
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 ...
4
votes
1
answer
149
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"
...
1
vote
1
answer
428
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
0
answers
306
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 ...
0
votes
1
answer
46
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('...
0
votes
1
answer
310
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
0
answers
83
views
Opensea seaport protocol works with Eip712 offline signatures only through permit method of tokens?
I try understand how offline signatures work with seaport protocol for example.
Seaport use offline sign to make operations in token contract behalf signer of offline signature (eip712). But token ...
0
votes
1
answer
228
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
40
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
0
answers
37
views
Why is EIP-712 necessary for readable transaction signing (MetaMask)?
I am implementing the EIP-712 for metatransactions and I was wondering, why is it necessary to implement such protocol in order to have a transparent signing method for the user?
Since MetaMask has ...
0
votes
0
answers
99
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 ...
0
votes
1
answer
157
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 ...
1
vote
2
answers
76
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 ...
0
votes
1
answer
79
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
2
answers
249
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
437
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 ...
1
vote
2
answers
818
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
305
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 ...
1
vote
0
answers
176
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 ...
0
votes
1
answer
407
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(...
1
vote
2
answers
795
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 ...
0
votes
1
answer
684
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
65
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
140
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
844
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
...
0
votes
2
answers
311
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: "...
2
votes
1
answer
1k
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 ...
2
votes
1
answer
144
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 ...
1
vote
0
answers
145
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 ...
2
votes
1
answer
490
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 =...
0
votes
1
answer
371
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 ...
1
vote
0
answers
116
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('...
7
votes
2
answers
3k
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?
4
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
617
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 ...
2
votes
1
answer
1k
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:
...
3
votes
1
answer
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 ...
0
votes
0
answers
566
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
606
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
107
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 ...
0
votes
1
answer
487
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....
3
votes
0
answers
305
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 ...
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 ...