Migrate all contract-related tooling and tests to accept a chain ID in domain separators.
This commit is contained in:
committed by
Amir Bandeali
parent
92fe720ac3
commit
2d28fde24d
@@ -8,9 +8,12 @@ export class TransactionFactory {
|
||||
private readonly _signerBuff: Buffer;
|
||||
private readonly _exchangeAddress: string;
|
||||
private readonly _privateKey: Buffer;
|
||||
constructor(privateKey: Buffer, exchangeAddress: string) {
|
||||
private readonly _chainId: number;
|
||||
|
||||
constructor(privateKey: Buffer, exchangeAddress: string, chainId: number) {
|
||||
this._privateKey = privateKey;
|
||||
this._exchangeAddress = exchangeAddress;
|
||||
this._chainId = chainId;
|
||||
this._signerBuff = ethUtil.privateToAddress(this._privateKey);
|
||||
}
|
||||
public newSignedTransaction(
|
||||
@@ -24,6 +27,7 @@ export class TransactionFactory {
|
||||
signerAddress,
|
||||
data,
|
||||
verifyingContractAddress: this._exchangeAddress,
|
||||
chainId: this._chainId,
|
||||
};
|
||||
|
||||
const transactionHashBuffer = transactionHashUtils.getTransactionHashBuffer(transaction);
|
||||
|
Reference in New Issue
Block a user