[SDK] Allow overriding estimateGas Transaction signature #81
-
EnvironmentTestnet Acknowledgement
Issue DescriptionThe JS Expected Behavior
Code Exampleprovider.estimateGas({
...
type: EIP712_TX_TYPE,
customData: {
customSignature: '0x...'
},
}), Repo Link (Optional)No response |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 2 replies
-
Hmm, that's interesting 🤔. Thanks for pointing it out! I'll need some time to investigate this behaviour🕵️♂️. I'll post back here with any insights as to why that might be or if we should |
Beta Was this translation helpful? Give feedback.
-
Hi @hbriese 👋 ! The way that zkSync Era estimates gas is via a Binary Search algorithm that modifies the Because of this, the signature will never match as expected, and this also leads to things like needing to update the nonce of the transaction while it runs inside of a Sandbox. As you can see in the underlying contract, the signature is never fully verified as the underlying data (e.g. |
Beta Was this translation helpful? Give feedback.
-
@MexicanAce thanks for your answer. The expected behaviour is for the |
Beta Was this translation helpful? Give feedback.
Hi @hbriese 👋 !
The way that zkSync Era estimates gas is via a Binary Search algorithm that modifies the
gas_limit
of the Transaction (See here for code).Because of this, the signature will never match as expected, and this also leads to things like needing to update the nonce of the transaction while it runs inside of a Sandbox. As you can see in the underlying contract, the signature is never fully verified as the underlying data (e.g.
gas_limit
) has been modified.