Skip to content

Commit

Permalink
Prevent CCIP-read flags being passed to EtherscanProvider (ethers-io#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo authored and Woodpile37 committed Jan 14, 2024
1 parent 74d96ca commit 818bf18
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 818bf18

Please sign in to comment.