Skip to content

Commit

Permalink
feat: 🎸 enable reconciliation of struct data by default
Browse files Browse the repository at this point in the history
This changes the default behavior to attempt to reconcile the shape of
structs from tuples in ABI information by default. If names are not
provided in the ABI definition for tuple components, then reconciliation
will fail gracfully.

BREAKING CHANGE: Output of decoded transactions and events may look
different with the change of the default behavior. Set
`reconcileStructShapeFromTuples` to false in ethlogger.yaml to restore
the behavior of previous versions.
  • Loading branch information
ziegfried committed Mar 30, 2021
1 parent 8c3ce65 commit 90e57e0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion defaults.ethlogger.yaml
Expand Up @@ -65,7 +65,7 @@ abi:
fingerprintContracts: true
requireContractMatch: true
decodeAnonymous: true
reconcileStructShapeFromTuples: false
reconcileStructShapeFromTuples: true
contractInfo:
maxCacheEntries: 25000
blockWatcher:
Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Expand Up @@ -785,7 +785,7 @@ export async function loadEthloggerConfig(flags: CliFlags, dryRun: boolean = fal
fingerprintContracts: defaults.abi?.fingerprintContracts ?? true,
requireContractMatch: defaults.abi?.requireContractMatch ?? true,
decodeAnonymous: defaults.abi?.decodeAnonymous ?? true,
reconcileStructShapeFromTuples: defaults.abi?.reconcileStructShapeFromTuples ?? false,
reconcileStructShapeFromTuples: defaults.abi?.reconcileStructShapeFromTuples ?? true,
},
blockWatcher: {
enabled:
Expand Down
2 changes: 1 addition & 1 deletion test/config.test.ts
Expand Up @@ -15,7 +15,7 @@ test('defaults', async () => {
"decodeAnonymous": true,
"directory": undefined,
"fingerprintContracts": true,
"reconcileStructShapeFromTuples": false,
"reconcileStructShapeFromTuples": true,
"requireContractMatch": true,
},
"blockWatcher": Object {
Expand Down

0 comments on commit 90e57e0

Please sign in to comment.