Skip to content

Commit

Permalink
Prevent CCIP-read flags being passed to EtherscanProvider (#4043)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jun 23, 2023
1 parent 3df09fc commit 857aa8c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src.ts/providers/provider-etherscan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ export class EtherscanPlugin extends NetworkPlugin {
}
}

const skipKeys = [ "enableCcipRead" ];

let nextId = 1;

/**
Expand Down Expand Up @@ -308,6 +310,8 @@ export class EtherscanProvider extends AbstractProvider {
_getTransactionPostData(transaction: TransactionRequest): Record<string, string> {
const result: Record<string, string> = { };
for (let key in transaction) {
if (skipKeys.indexOf(key) >= 0) { continue; }

if ((<any>transaction)[key] == null) { continue; }
let value = (<any>transaction)[key];
if (key === "type" && value === 0) { continue; }
Expand Down

0 comments on commit 857aa8c

Please sign in to comment.