Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Block OP stack System type (0x7E) transactions/receipts #8

Merged
merged 5 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ jobs:
- name: Test with Jest
run: |
export PROVIDER_URI=${{ secrets.PROVIDER_URI }}
export PROVIDER_URI_GOERLI=${{ secrets.PROVIDER_URI_GOERLI }}
export PROVIDER_URI_SEPOLIA=${{ secrets.PROVIDER_URI_SEPOLIA }}
export PROVIDER_URI_10=${{ secrets.PROVIDER_URI_10 }}
export PROVIDER_URI_8453=${{ secrets.PROVIDER_URI_8453 }}
export PINATA_JWT=${{ secrets.PINATA_JWT }}
export QUICKNODE_API_KEY=${{ secrets.QUICKNODE_API_KEY }}
export QUICKNODE_IPFS_URL=${{ secrets.QUICKNODE_IPFS_URL }}
Expand Down
9 changes: 5 additions & 4 deletions src/codec/v2/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,9 @@ export enum ReceiptField {
}

export enum TxType {
Legacy,
Eip2930,
Eip1559,
Eip4844,
Legacy = 0,
Eip2930 = 1,
Eip1559 = 2,
Eip4844 = 3,
OpSystem = 126, // 0x7E
}
6 changes: 6 additions & 0 deletions src/rpc/subqueryField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,9 @@ export async function getTxFieldValue(
if (type === TxType.Eip4844) {
logger.error(`EIP-4844 transactions are not yet supported`);
return null;
} else if (type === TxType.OpSystem) {
logger.error(`OP stack System transactions are not yet supported`);
return null;
}
const value = getValue(tx, type);

Expand Down Expand Up @@ -487,6 +490,9 @@ export async function getReceiptFieldValue(
if (Number(receipt?.type) === TxType.Eip4844) {
logger.error(`EIP-4844 transaction receipts are not yet supported`);
return null;
} else if (Number(receipt?.type) === TxType.OpSystem) {
logger.error(`OP stack System transaction receipts are not yet supported`);
return null;
}

const value = getValue(receipt);
Expand Down
6 changes: 3 additions & 3 deletions test/ipfs/scenarios.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe("Additional IPFS scenarios to test", () => {
};
}
}
}, 30000);
}, 50000);

test(`Read all pinned data`, async () => {
for await (const client of ipfsClients) {
Expand All @@ -64,7 +64,7 @@ describe("Additional IPFS scenarios to test", () => {
}
}
}
}, 30000);
}, 50000);

test(`Unpin all data`, async () => {
for await (const client of ipfsClients) {
Expand All @@ -73,5 +73,5 @@ describe("Additional IPFS scenarios to test", () => {
expect(unpin.value as boolean).toEqual(true);
}
}
}, 30000);
}, 50000);
});
282 changes: 0 additions & 282 deletions test/rpc/chainDataGoerli.test.ts

This file was deleted.

Loading
Loading