Closed n8maninger closed 3 weeks ago
EventV2ContractResolution is missing the resolution type. Embeds V2FileContractResolution to get the custom json encoding that includes the extra type field.
EventV2ContractResolution
V2FileContractResolution
type
{ "id": "h:0000000000000000000000000000000000000000000000000000000000000000", "index": { "height": 0, "id": "bid:0000000000000000000000000000000000000000000000000000000000000000" }, "timestamp": "0001-01-01T00:00:00Z", "maturityHeight": 0, "type": "v2ContractResolution", "data": { "parent": { "id": "h:0000000000000000000000000000000000000000000000000000000000000000", "leafIndex": 0, "merkleProof": null, "v2FileContract": { "filesize": 0, "fileMerkleRoot": "h:0000000000000000000000000000000000000000000000000000000000000000", "proofHeight": 0, "expirationHeight": 0, "renterOutput": { "value": "0", "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69" }, "hostOutput": { "value": "0", "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69" }, "missedHostValue": "0", "totalCollateral": "0", "renterPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000", "hostPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000", "revisionNumber": 0, "renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" } }, "type": "expiration", "resolution": {} } }
{ "id": "h:0000000000000000000000000000000000000000000000000000000000000000", "index": { "height": 0, "id": "bid:0000000000000000000000000000000000000000000000000000000000000000" }, "timestamp": "0001-01-01T00:00:00Z", "maturityHeight": 0, "type": "v2ContractResolution", "data": { "parent": { "id": "h:0000000000000000000000000000000000000000000000000000000000000000", "leafIndex": 0, "merkleProof": null, "v2FileContract": { "filesize": 0, "fileMerkleRoot": "h:0000000000000000000000000000000000000000000000000000000000000000", "proofHeight": 0, "expirationHeight": 0, "renterOutput": { "value": "0", "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69" }, "hostOutput": { "value": "0", "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69" }, "missedHostValue": "0", "totalCollateral": "0", "renterPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000", "hostPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000", "revisionNumber": 0, "renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" } }, "type": "finalization", "resolution": { "filesize": 0, "fileMerkleRoot": "h:0000000000000000000000000000000000000000000000000000000000000000", "proofHeight": 0, "expirationHeight": 0, "renterOutput": { "value": "0", "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69" }, "hostOutput": { "value": "0", "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69" }, "missedHostValue": "0", "totalCollateral": "0", "renterPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000", "hostPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000", "revisionNumber": 0, "renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" } } }
{ "id": "h:0000000000000000000000000000000000000000000000000000000000000000", "index": { "height": 0, "id": "bid:0000000000000000000000000000000000000000000000000000000000000000" }, "timestamp": "0001-01-01T00:00:00Z", "maturityHeight": 0, "type": "v2ContractResolution", "data": { "parent": { "id": "h:0000000000000000000000000000000000000000000000000000000000000000", "leafIndex": 0, "merkleProof": null, "v2FileContract": { "filesize": 0, "fileMerkleRoot": "h:0000000000000000000000000000000000000000000000000000000000000000", "proofHeight": 0, "expirationHeight": 0, "renterOutput": { "value": "0", "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69" }, "hostOutput": { "value": "0", "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69" }, "missedHostValue": "0", "totalCollateral": "0", "renterPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000", "hostPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000", "revisionNumber": 0, "renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" } }, "type": "renewal", "resolution": { "finalRevision": { "filesize": 0, "fileMerkleRoot": "h:0000000000000000000000000000000000000000000000000000000000000000", "proofHeight": 0, "expirationHeight": 0, "renterOutput": { "value": "0", "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69" }, "hostOutput": { "value": "0", "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69" }, "missedHostValue": "0", "totalCollateral": "0", "renterPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000", "hostPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000", "revisionNumber": 0, "renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, "newContract": { "filesize": 0, "fileMerkleRoot": "h:0000000000000000000000000000000000000000000000000000000000000000", "proofHeight": 0, "expirationHeight": 0, "renterOutput": { "value": "0", "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69" }, "hostOutput": { "value": "0", "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69" }, "missedHostValue": "0", "totalCollateral": "0", "renterPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000", "hostPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000", "revisionNumber": 0, "renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" }, "renterRollover": "0", "hostRollover": "0", "renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" } } }
{ "id": "h:0000000000000000000000000000000000000000000000000000000000000000", "index": { "height": 0, "id": "bid:0000000000000000000000000000000000000000000000000000000000000000" }, "timestamp": "0001-01-01T00:00:00Z", "maturityHeight": 0, "type": "v2ContractResolution", "data": { "parent": { "id": "h:0000000000000000000000000000000000000000000000000000000000000000", "leafIndex": 0, "merkleProof": null, "v2FileContract": { "filesize": 0, "fileMerkleRoot": "h:0000000000000000000000000000000000000000000000000000000000000000", "proofHeight": 0, "expirationHeight": 0, "renterOutput": { "value": "0", "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69" }, "hostOutput": { "value": "0", "address": "addr:000000000000000000000000000000000000000000000000000000000000000089eb0d6a8a69" }, "missedHostValue": "0", "totalCollateral": "0", "renterPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000", "hostPublicKey": "ed25519:0000000000000000000000000000000000000000000000000000000000000000", "revisionNumber": 0, "renterSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "hostSignature": "sig:00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" } }, "type": "storage proof", "resolution": { "proofIndex": { "id": "h:0000000000000000000000000000000000000000000000000000000000000000", "leafIndex": 0, "merkleProof": null, "chainIndex": { "height": 0, "id": "bid:0000000000000000000000000000000000000000000000000000000000000000" } }, "leaf": "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "proof": null } } }
EventV2ContractResolution
is missing the resolution type. EmbedsV2FileContractResolution
to get the custom json encoding that includes the extratype
field.