Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Commit

Permalink
PP 137: Unnecessary domain separator (#21)
Browse files Browse the repository at this point in the history
* Deletes the domainSeparator from the request relay in the EIP712 protocol

* Eliminates the domainSeparator as part of the relayRequest and deployRequest

* Aply some final changes related to the task of eliminate the use of the domain separator

* Update the dist folder

* Remove dist

Co-authored-by: Andres Quijano <[email protected]>
  • Loading branch information
antomor and AndresQuijano authored Jun 28, 2022
1 parent 1e4f5ba commit a160de8
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions src/ContractInteractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,6 @@ export default class ContractInteractor {
async walletFactoryDeployEstimateGasForInternalCall(
request: DeployRequest,
factory: string,
domainHash: string,
suffixData: string,
signature: string,
testCall = false
Expand All @@ -772,7 +771,6 @@ export default class ContractInteractor {

const method = pFactory.contract.methods.relayedUserSmartWalletCreation(
request.request,
domainHash,
suffixData,
signature
);
Expand Down
3 changes: 0 additions & 3 deletions src/EIP712/RelayData.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { PrefixedHexString } from 'ethereumjs-tx';

export default interface RelayData {
gasPrice: string;
domainSeparator: PrefixedHexString;
relayWorker: string;
callForwarder: string;
callVerifier: string;
Expand Down
3 changes: 1 addition & 2 deletions src/EIP712/TypedRequestData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const EIP712DomainType = [

const RelayDataType = [
{ name: 'gasPrice', type: 'uint256' },
{ name: 'domainSeparator', type: 'bytes32' },
{ name: 'relayWorker', type: 'address' },
{ name: 'callForwarder', type: 'address' },
{ name: 'callVerifier', type: 'address' }
Expand Down Expand Up @@ -163,5 +162,5 @@ export const DEPLOY_PARAMS =
export const RequestType = {
typeName: 'RelayRequest',
typeSuffix:
'RelayData relayData)RelayData(uint256 gasPrice,bytes32 domainSeparator,address relayWorker,address callForwarder,address callVerifier)'
'RelayData relayData)RelayData(uint256 gasPrice,address relayWorker,address callForwarder,address callVerifier)'
};
2 changes: 0 additions & 2 deletions src/types/RelayTransactionRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export const DeployTransactionRequestShape = {
},
relayData: {
gasPrice: ow.string,
domainSeparator: ow.string,
relayWorker: ow.string,
callForwarder: ow.string,
callVerifier: ow.string
Expand Down Expand Up @@ -63,7 +62,6 @@ export const RelayTransactionRequestShape = {
},
relayData: {
gasPrice: ow.string,
domainSeparator: ow.string,
relayWorker: ow.string,
callForwarder: ow.string,
callVerifier: ow.string
Expand Down

0 comments on commit a160de8

Please sign in to comment.