@flarenetwork/flare-periphery-contract-artifacts 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/coston/StateConnector/configs/AddressValidity.json +28 -12
- package/coston/StateConnector/configs/BalanceDecreasingTransaction.json +14 -14
- package/coston/StateConnector/configs/ConfirmedBlockHeightExists.json +13 -13
- package/coston/StateConnector/configs/EVMTransaction.json +19 -19
- package/coston/StateConnector/configs/Payment.json +21 -21
- package/coston/StateConnector/configs/ReferencedPaymentNonexistence.json +13 -13
- package/coston/StateConnector/configs/TypeTemplate.json +7 -7
- package/coston/artifacts/contracts/StateConnector/interface/AddressValidity.sol/AddressValidity.json +10 -0
- package/coston/artifacts/contracts/StateConnector/interface/BalanceDecreasingTransaction.sol/BalanceDecreasingTransaction.json +10 -0
- package/coston/artifacts/contracts/StateConnector/interface/ConfirmedBlockHeightExists.sol/ConfirmedBlockHeightExists.json +10 -0
- package/coston/artifacts/contracts/StateConnector/interface/EVMTransaction.sol/EVMTransaction.json +10 -0
- package/coston/artifacts/contracts/StateConnector/interface/IAddressValidityVerification.sol/IAddressValidityVerification.json +98 -0
- package/coston/artifacts/contracts/StateConnector/interface/IBalanceDecreasingTransactionVerification.sol/IBalanceDecreasingTransactionVerification.json +113 -0
- package/coston/artifacts/contracts/StateConnector/interface/IConfirmedBlockHeightExistsVerification.sol/IConfirmedBlockHeightExistsVerification.json +108 -0
- package/coston/artifacts/contracts/StateConnector/interface/IEVMTransactionVerification.sol/IEVMTransactionVerification.json +175 -0
- package/coston/artifacts/contracts/StateConnector/interface/IPaymentVerification.sol/IPaymentVerification.json +153 -0
- package/coston/artifacts/contracts/StateConnector/interface/IReferencedPaymentNonexistenceVerification.sol/IReferencedPaymentNonexistenceVerification.json +123 -0
- package/coston/artifacts/contracts/StateConnector/interface/IStateConnector.sol/IStateConnector.json +126 -0
- package/coston/artifacts/contracts/StateConnector/interface/ITypeTemplateVerification.sol/ITypeTemplateVerification.json +149 -0
- package/coston/artifacts/contracts/StateConnector/interface/Payment.sol/Payment.json +10 -0
- package/coston/artifacts/contracts/StateConnector/interface/ReferencedPaymentNonexistence.sol/ReferencedPaymentNonexistence.json +10 -0
- package/coston/artifacts/contracts/StateConnector/interface/TypeTemplate.sol/TypeTemplate.json +10 -0
- package/coston/deploys/contracts.json +31 -1
- package/dist/coston/StateConnector/typescript/AddressValidity.d.ts +9 -5
- package/dist/coston/StateConnector/typescript/AddressValidity.d.ts.map +1 -1
- package/dist/coston/StateConnector/typescript/AddressValidity.js.map +1 -1
- package/dist/coston/StateConnector/typescript/BalanceDecreasingTransaction.d.ts +6 -6
- package/dist/coston/StateConnector/typescript/ConfirmedBlockHeightExists.d.ts +6 -6
- package/dist/coston/StateConnector/typescript/EVMTransaction.d.ts +9 -9
- package/dist/coston/StateConnector/typescript/Payment.d.ts +14 -14
- package/dist/coston/StateConnector/typescript/ReferencedPaymentNonexistence.d.ts +4 -4
- package/dist/coston/StateConnector/typescript/TypeTemplate.d.ts +4 -4
- package/dist/coston/abis.d.ts.map +1 -1
- package/dist/coston/abis.js +30 -0
- package/dist/coston/abis.js.map +1 -1
- package/dist/coston/artifacts/contracts/StateConnector/interface/AddressValidity.sol/AddressValidity.json +10 -0
- package/dist/coston/artifacts/contracts/StateConnector/interface/BalanceDecreasingTransaction.sol/BalanceDecreasingTransaction.json +10 -0
- package/dist/coston/artifacts/contracts/StateConnector/interface/ConfirmedBlockHeightExists.sol/ConfirmedBlockHeightExists.json +10 -0
- package/dist/coston/artifacts/contracts/StateConnector/interface/EVMTransaction.sol/EVMTransaction.json +10 -0
- package/dist/coston/artifacts/contracts/StateConnector/interface/IAddressValidityVerification.sol/IAddressValidityVerification.json +98 -0
- package/dist/coston/artifacts/contracts/StateConnector/interface/IBalanceDecreasingTransactionVerification.sol/IBalanceDecreasingTransactionVerification.json +113 -0
- package/dist/coston/artifacts/contracts/StateConnector/interface/IConfirmedBlockHeightExistsVerification.sol/IConfirmedBlockHeightExistsVerification.json +108 -0
- package/dist/coston/artifacts/contracts/StateConnector/interface/IEVMTransactionVerification.sol/IEVMTransactionVerification.json +175 -0
- package/dist/coston/artifacts/contracts/StateConnector/interface/IPaymentVerification.sol/IPaymentVerification.json +153 -0
- package/dist/coston/artifacts/contracts/StateConnector/interface/IReferencedPaymentNonexistenceVerification.sol/IReferencedPaymentNonexistenceVerification.json +123 -0
- package/dist/coston/artifacts/contracts/StateConnector/interface/IStateConnector.sol/IStateConnector.json +126 -0
- package/dist/coston/artifacts/contracts/StateConnector/interface/ITypeTemplateVerification.sol/ITypeTemplateVerification.json +149 -0
- package/dist/coston/artifacts/contracts/StateConnector/interface/Payment.sol/Payment.json +10 -0
- package/dist/coston/artifacts/contracts/StateConnector/interface/ReferencedPaymentNonexistence.sol/ReferencedPaymentNonexistence.json +10 -0
- package/dist/coston/artifacts/contracts/StateConnector/interface/TypeTemplate.sol/TypeTemplate.json +10 -0
- package/dist/coston/deploys/contracts.json +31 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "AddressValidity",
|
|
3
|
-
"fullComment": " @custom:name AddressValidity\n @custom:id 0x05\n @custom:supported BTC, DOGE, XRP, testBTC, testDOGE, testXRP\n @author Flare\n @notice
|
|
4
|
-
"description": "
|
|
3
|
+
"fullComment": " @custom:name AddressValidity\n @custom:id 0x05\n @custom:supported BTC, DOGE, XRP, testBTC, testDOGE, testXRP\n @author Flare\n @notice An assertion whether a string represents a valid address on an external chain.\n @custom:verification The address is checked against all validity criteria of the chain with `sourceId`.\n Indicator of validity is provided.\n If the address is valid, its standard form and standard hash are computed.\n Validity criteria for each supported chain:\n - [BTC](/specs/attestations/external-chains/address-validity/BTC.md)\n - [DOGE](/specs/attestations/external-chains/address-validity/DOGE.md)\n - [XRPL](/specs/attestations/external-chains/address-validity/XRPL.md)\n @custom:lut `0xffffffffffffffff` ($2^{64}-1$ in hex)",
|
|
4
|
+
"description": "An assertion whether a string represents a valid address on an external chain.",
|
|
5
5
|
"supported": [
|
|
6
6
|
"BTC",
|
|
7
7
|
"DOGE",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"testDOGE",
|
|
11
11
|
"testXRP"
|
|
12
12
|
],
|
|
13
|
-
"verification": "The address is checked against all validity criteria of the chain with `sourceId`.\n Validity criteria for each supported chain:\n - [BTC](/specs/attestations/external-chains/address-validity/BTC.md)\n - [DOGE](/specs/attestations/external-chains/address-validity/DOGE.md)\n - [XRPL](/specs/attestations/external-chains/address-validity/XRPL.md)\n
|
|
14
|
-
"lut": "0xffffffffffffffff $
|
|
13
|
+
"verification": "The address is checked against all validity criteria of the chain with `sourceId`.\n Indicator of validity is provided.\n If the address is valid, its standard form and standard hash are computed.\n Validity criteria for each supported chain:\n - [BTC](/specs/attestations/external-chains/address-validity/BTC.md)\n - [DOGE](/specs/attestations/external-chains/address-validity/DOGE.md)\n - [XRPL](/specs/attestations/external-chains/address-validity/XRPL.md)\n ",
|
|
14
|
+
"lut": "`0xffffffffffffffff` ($2^{64}-1$ in hex)",
|
|
15
15
|
"proof": {
|
|
16
16
|
"name": "Proof",
|
|
17
17
|
"description": "Toplevel proof",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"description": "Toplevel request",
|
|
39
39
|
"above": "",
|
|
40
40
|
"below": "",
|
|
41
|
-
"fullComment": " @notice Toplevel request\n @param attestationType
|
|
41
|
+
"fullComment": " @notice Toplevel request\n @param attestationType ID of the attestation type.\n @param sourceId Id of the data source.\n @param messageIntegrityCode `MessageIntegrityCode` that is derived from the expected response.\n @param requestBody Data defining the request. Type (struct) and interpretation is determined by the `attestationType`.",
|
|
42
42
|
"params": [
|
|
43
43
|
{
|
|
44
44
|
"name": "attestationType",
|
|
45
45
|
"type": "bytes32",
|
|
46
46
|
"typeSimple": "bytes32",
|
|
47
|
-
"comment": "
|
|
47
|
+
"comment": "ID of the attestation type."
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
"name": "sourceId",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"name": "messageIntegrityCode",
|
|
57
57
|
"type": "bytes32",
|
|
58
58
|
"typeSimple": "bytes32",
|
|
59
|
-
"comment": "`MessageIntegrityCode` that is derived from the expected response
|
|
59
|
+
"comment": "`MessageIntegrityCode` that is derived from the expected response."
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"name": "requestBody",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"description": "Toplevel response",
|
|
72
72
|
"above": "",
|
|
73
73
|
"below": "",
|
|
74
|
-
"fullComment": " @notice Toplevel response\n @param attestationType Extracted from the request.\n @param sourceId Extracted from the request.\n @param votingRound The
|
|
74
|
+
"fullComment": " @notice Toplevel response\n @param attestationType Extracted from the request.\n @param sourceId Extracted from the request.\n @param votingRound The ID of the State Connector round in which the request was considered.\n @param lowestUsedTimestamp The lowest timestamp used to generate the response.\n @param requestBody Extracted from the request.\n @param responseBody Data defining the response. The verification rules for the construction of the response body and the type are defined per specific `attestationType`.",
|
|
75
75
|
"params": [
|
|
76
76
|
{
|
|
77
77
|
"name": "attestationType",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"name": "votingRound",
|
|
90
90
|
"type": "uint64",
|
|
91
91
|
"typeSimple": "uint64",
|
|
92
|
-
"comment": "The
|
|
92
|
+
"comment": "The ID of the State Connector round in which the request was considered."
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"name": "lowestUsedTimestamp",
|
|
@@ -131,19 +131,25 @@
|
|
|
131
131
|
"description": "Response body for AddressValidity attestation type",
|
|
132
132
|
"above": "",
|
|
133
133
|
"below": "",
|
|
134
|
-
"fullComment": " @notice Response body for AddressValidity attestation type\n @param standardAddress
|
|
134
|
+
"fullComment": " @notice Response body for AddressValidity attestation type\n @param isValid Boolean indicator of the address validity.\n @param standardAddress If `isValid`, standard form of the validated address. Otherwise an empty string.\n @param standardAddressHash If `isValid`, standard address hash of the validated address. Otherwise a zero bytes32 string.",
|
|
135
135
|
"params": [
|
|
136
|
+
{
|
|
137
|
+
"name": "isValid",
|
|
138
|
+
"type": "bool",
|
|
139
|
+
"typeSimple": "bool",
|
|
140
|
+
"comment": "Boolean indicator of the address validity."
|
|
141
|
+
},
|
|
136
142
|
{
|
|
137
143
|
"name": "standardAddress",
|
|
138
144
|
"type": "string",
|
|
139
145
|
"typeSimple": "string",
|
|
140
|
-
"comment": "
|
|
146
|
+
"comment": "If `isValid`, standard form of the validated address. Otherwise an empty string."
|
|
141
147
|
},
|
|
142
148
|
{
|
|
143
149
|
"name": "standardAddressHash",
|
|
144
150
|
"type": "bytes32",
|
|
145
151
|
"typeSimple": "bytes32",
|
|
146
|
-
"comment": "
|
|
152
|
+
"comment": "If `isValid`, standard address hash of the validated address. Otherwise a zero bytes32 string."
|
|
147
153
|
}
|
|
148
154
|
]
|
|
149
155
|
},
|
|
@@ -219,6 +225,11 @@
|
|
|
219
225
|
},
|
|
220
226
|
{
|
|
221
227
|
"components": [
|
|
228
|
+
{
|
|
229
|
+
"internalType": "bool",
|
|
230
|
+
"name": "isValid",
|
|
231
|
+
"type": "bool"
|
|
232
|
+
},
|
|
222
233
|
{
|
|
223
234
|
"internalType": "string",
|
|
224
235
|
"name": "standardAddress",
|
|
@@ -282,6 +293,11 @@
|
|
|
282
293
|
},
|
|
283
294
|
{
|
|
284
295
|
"components": [
|
|
296
|
+
{
|
|
297
|
+
"internalType": "bool",
|
|
298
|
+
"name": "isValid",
|
|
299
|
+
"type": "bool"
|
|
300
|
+
},
|
|
285
301
|
{
|
|
286
302
|
"internalType": "string",
|
|
287
303
|
"name": "standardAddress",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "BalanceDecreasingTransaction",
|
|
3
|
-
"fullComment": " @custom:name BalanceDecreasingTransaction\n @custom:id 0x02\n @custom:supported BTC, DOGE, XRP, testBTC, testDOGE, testXRP\n @author Flare\n @notice
|
|
4
|
-
"description": "
|
|
3
|
+
"fullComment": " @custom:name BalanceDecreasingTransaction\n @custom:id 0x02\n @custom:supported BTC, DOGE, XRP, testBTC, testDOGE, testXRP\n @author Flare\n @notice A detection of a transaction that either decreases the balance for some address or is signed by the source address.\n Such an attestation could prove a violation of an agreement and therefore provides grounds to liquidate some funds locked by a smart contract on Flare.\n A transaction is considered “balance decreasing” for the address, if the balance after the transaction is lower than before or the address is among the signers of the transaction (even if its balance is greater than before the transaction).\n @custom:verification The transaction with `transactionId` is fetched from the API of the source blockchain node or relevant indexer.\n If the transaction cannot be fetched or the transaction is in a block that does not have a sufficient [number of confirmations](/specs/attestations/configs.md#finalityconfirmation), the attestation request is rejected.\n Once the transaction is received, the response fields are extracted if the transaction is balance decreasing for the indicated address.\n Some of the request and response fields are chain specific as described below.\n The fields can be computed with the help of a [balance decreasing summary](/specs/attestations/external-chains/transactions.md#balance-decreasing-summary).\n ### UTXO (Bitcoin and Dogecoin)\n - `sourceAddressIndicator` is the the index of the transaction input in hex padded to a 0x prefixed 32-byte string.\n If the indicated input does not exist or the indicated input does not have the address, the attestation request is rejected.\n The `sourceAddress` is the address of the indicated transaction input.\n - `spentAmount` is the sum of values of all inputs with sourceAddress minus the sum of all outputs with `sourceAddress`.\n Can be negative.\n - `blockTimestamp` is the mediantime of a block.\n ### XRPL\n - `sourceAddressIndicator` is the [standard address hash](/specs/attestations/external-chains/standardAddress.md#standard-address-hash) of the address whose balance has been decreased.\n If the address indicated by `sourceAddressIndicator` is not among the signers of the transaction and the balance of the address was not lowered in the transaction, the attestation request is rejected.\n - `spentAmount` is the difference between the balance of the indicated address after and before the transaction.\n Can be negative.\n - `blockTimestamp` is the close_time of a ledger converted to unix time.\n @custom:lut `blockTimestamp`",
|
|
4
|
+
"description": "A detection of a transaction that either decreases the balance for some address or is signed by the source address.\n Such an attestation could prove a violation of an agreement and therefore provides grounds to liquidate some funds locked by a smart contract on Flare.\n A transaction is considered “balance decreasing” for the address, if the balance after the transaction is lower than before or the address is among the signers of the transaction (even if its balance is greater than before the transaction).",
|
|
5
5
|
"supported": [
|
|
6
6
|
"BTC",
|
|
7
7
|
"DOGE",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"testDOGE",
|
|
11
11
|
"testXRP"
|
|
12
12
|
],
|
|
13
|
-
"verification": "
|
|
14
|
-
"lut": "`blockTimestamp
|
|
13
|
+
"verification": "The transaction with `transactionId` is fetched from the API of the source blockchain node or relevant indexer.\n If the transaction cannot be fetched or the transaction is in a block that does not have a sufficient [number of confirmations](/specs/attestations/configs.md#finalityconfirmation), the attestation request is rejected.\n Once the transaction is received, the response fields are extracted if the transaction is balance decreasing for the indicated address.\n Some of the request and response fields are chain specific as described below.\n The fields can be computed with the help of a [balance decreasing summary](/specs/attestations/external-chains/transactions.md#balance-decreasing-summary).\n ### UTXO (Bitcoin and Dogecoin)\n - `sourceAddressIndicator` is the the index of the transaction input in hex padded to a 0x prefixed 32-byte string.\n If the indicated input does not exist or the indicated input does not have the address, the attestation request is rejected.\n The `sourceAddress` is the address of the indicated transaction input.\n - `spentAmount` is the sum of values of all inputs with sourceAddress minus the sum of all outputs with `sourceAddress`.\n Can be negative.\n - `blockTimestamp` is the mediantime of a block.\n ### XRPL\n - `sourceAddressIndicator` is the [standard address hash](/specs/attestations/external-chains/standardAddress.md#standard-address-hash) of the address whose balance has been decreased.\n If the address indicated by `sourceAddressIndicator` is not among the signers of the transaction and the balance of the address was not lowered in the transaction, the attestation request is rejected.\n - `spentAmount` is the difference between the balance of the indicated address after and before the transaction.\n Can be negative.\n - `blockTimestamp` is the close_time of a ledger converted to unix time.\n ",
|
|
14
|
+
"lut": "`blockTimestamp`",
|
|
15
15
|
"proof": {
|
|
16
16
|
"name": "Proof",
|
|
17
17
|
"description": "Toplevel proof",
|
|
@@ -38,25 +38,25 @@
|
|
|
38
38
|
"description": "Toplevel request",
|
|
39
39
|
"above": "",
|
|
40
40
|
"below": "",
|
|
41
|
-
"fullComment": " @notice Toplevel request\n @param attestationType
|
|
41
|
+
"fullComment": " @notice Toplevel request\n @param attestationType ID of the attestation type.\n @param sourceId ID of the data source.\n @param messageIntegrityCode `MessageIntegrityCode` that is derived from the expected response.\n @param requestBody Data defining the request. Type (struct) and interpretation is determined by the `attestationType`.",
|
|
42
42
|
"params": [
|
|
43
43
|
{
|
|
44
44
|
"name": "attestationType",
|
|
45
45
|
"type": "bytes32",
|
|
46
46
|
"typeSimple": "bytes32",
|
|
47
|
-
"comment": "
|
|
47
|
+
"comment": "ID of the attestation type."
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
"name": "sourceId",
|
|
51
51
|
"type": "bytes32",
|
|
52
52
|
"typeSimple": "bytes32",
|
|
53
|
-
"comment": "
|
|
53
|
+
"comment": "ID of the data source."
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"name": "messageIntegrityCode",
|
|
57
57
|
"type": "bytes32",
|
|
58
58
|
"typeSimple": "bytes32",
|
|
59
|
-
"comment": "`MessageIntegrityCode` that is derived from the expected response
|
|
59
|
+
"comment": "`MessageIntegrityCode` that is derived from the expected response."
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"name": "requestBody",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"description": "Toplevel response",
|
|
72
72
|
"above": "",
|
|
73
73
|
"below": "",
|
|
74
|
-
"fullComment": " @notice Toplevel response\n @param attestationType Extracted from the request.\n @param sourceId Extracted from the request.\n @param votingRound The
|
|
74
|
+
"fullComment": " @notice Toplevel response\n @param attestationType Extracted from the request.\n @param sourceId Extracted from the request.\n @param votingRound The ID of the State Connector round in which the request was considered. This is a security measure to prevent a collision of attestation hashes.\n @param lowestUsedTimestamp The lowest timestamp used to generate the response.\n @param requestBody Extracted from the request.\n @param responseBody Data defining the response. The verification rules for the construction of the response body and the type are defined per specific `attestationType`.",
|
|
75
75
|
"params": [
|
|
76
76
|
{
|
|
77
77
|
"name": "attestationType",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"name": "votingRound",
|
|
90
90
|
"type": "uint64",
|
|
91
91
|
"typeSimple": "uint64",
|
|
92
|
-
"comment": "The
|
|
92
|
+
"comment": "The ID of the State Connector round in which the request was considered. This is a security measure to prevent a collision of attestation hashes."
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"name": "lowestUsedTimestamp",
|
|
@@ -116,13 +116,13 @@
|
|
|
116
116
|
"description": "Request body for BalanceDecreasingTransaction attestation type",
|
|
117
117
|
"above": "",
|
|
118
118
|
"below": "",
|
|
119
|
-
"fullComment": " @notice Request body for BalanceDecreasingTransaction attestation type\n @param transactionId
|
|
119
|
+
"fullComment": " @notice Request body for BalanceDecreasingTransaction attestation type\n @param transactionId ID of the payment transaction.\n @param sourceAddressIndicator The indicator of the address whose balance has been decreased.",
|
|
120
120
|
"params": [
|
|
121
121
|
{
|
|
122
122
|
"name": "transactionId",
|
|
123
123
|
"type": "bytes32",
|
|
124
124
|
"typeSimple": "bytes32",
|
|
125
|
-
"comment": "
|
|
125
|
+
"comment": "ID of the payment transaction."
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
"name": "sourceAddressIndicator",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"description": "Response body for BalanceDecreasingTransaction attestation type.",
|
|
138
138
|
"above": "",
|
|
139
139
|
"below": "",
|
|
140
|
-
"fullComment": " @notice Response body for BalanceDecreasingTransaction attestation type.\n @param blockNumber The number of the block in which the transaction is included.\n @param blockTimestamp The
|
|
140
|
+
"fullComment": " @notice Response body for BalanceDecreasingTransaction attestation type.\n @param blockNumber The number of the block in which the transaction is included.\n @param blockTimestamp The timestamp of the block in which the transaction is included.\n @param sourceAddressHash Standard address hash of the address indicated by the `sourceAddressIndicator`.\n @param spentAmount Amount spent by the source address in minimal units.\n @param standardPaymentReference Standard payment reference of the transaction.",
|
|
141
141
|
"params": [
|
|
142
142
|
{
|
|
143
143
|
"name": "blockNumber",
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"name": "blockTimestamp",
|
|
150
150
|
"type": "uint64",
|
|
151
151
|
"typeSimple": "uint64",
|
|
152
|
-
"comment": "The
|
|
152
|
+
"comment": "The timestamp of the block in which the transaction is included."
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
"name": "sourceAddressHash",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ConfirmedBlockHeightExists",
|
|
3
|
-
"fullComment": " @custom:name ConfirmedBlockHeightExists\n @custom:id 0x02\n @custom:supported BTC, DOGE, XRP, testBTC, testDOGE, testXRP\n @author Flare\n @notice
|
|
4
|
-
"description": "
|
|
3
|
+
"fullComment": " @custom:name ConfirmedBlockHeightExists\n @custom:id 0x02\n @custom:supported BTC, DOGE, XRP, testBTC, testDOGE, testXRP\n @author Flare\n @notice An assertion that a block with `blockNumber` is confirmed.\n It also provides data to compute the block production rate in the given time range.\n @custom:verification It is checked that the block with `blockNumber` is confirmed by at least `numberOfConfirmations`.\n If it is not, the request is rejected. We note a block on the tip of the chain is confirmed by 1 block.\n Then `lowestQueryWindowBlock` is determined and its number and timestamp are extracted.\n Current confirmation heights consensus:\n | `Chain` | `chainId` | `numberOfConfirmations` | `timestamp ` |\n | ------- | --------- | ----------------------- | ------------ |\n | `BTC` | 0 | 6 | mediantime |\n | `DOGE` | 2 | 60 | mediantime |\n | `XRP` | 3 | 3 | close_time |\n @custom:lut `lowestQueryWindowBlockTimestamp`",
|
|
4
|
+
"description": "An assertion that a block with `blockNumber` is confirmed.\n It also provides data to compute the block production rate in the given time range.",
|
|
5
5
|
"supported": [
|
|
6
6
|
"BTC",
|
|
7
7
|
"DOGE",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"testDOGE",
|
|
11
11
|
"testXRP"
|
|
12
12
|
],
|
|
13
|
-
"verification": "
|
|
13
|
+
"verification": "It is checked that the block with `blockNumber` is confirmed by at least `numberOfConfirmations`.\n If it is not, the request is rejected. We note a block on the tip of the chain is confirmed by 1 block.\n Then `lowestQueryWindowBlock` is determined and its number and timestamp are extracted.\n Current confirmation heights consensus:\n | `Chain` | `chainId` | `numberOfConfirmations` | `timestamp ` |\n | ------- | --------- | ----------------------- | ------------ |\n | `BTC` | 0 | 6 | mediantime |\n | `DOGE` | 2 | 60 | mediantime |\n | `XRP` | 3 | 3 | close_time |\n ",
|
|
14
14
|
"lut": "`lowestQueryWindowBlockTimestamp`",
|
|
15
15
|
"proof": {
|
|
16
16
|
"name": "Proof",
|
|
@@ -38,25 +38,25 @@
|
|
|
38
38
|
"description": "Toplevel request",
|
|
39
39
|
"above": "",
|
|
40
40
|
"below": "",
|
|
41
|
-
"fullComment": " @notice Toplevel request\n @param attestationType
|
|
41
|
+
"fullComment": " @notice Toplevel request\n @param attestationType ID of the attestation type.\n @param sourceId ID of the data source.\n @param messageIntegrityCode `MessageIntegrityCode` that is derived from the expected response as defined.\n @param requestBody Data defining the request. Type (struct) and interpretation is determined by the `attestationType`.",
|
|
42
42
|
"params": [
|
|
43
43
|
{
|
|
44
44
|
"name": "attestationType",
|
|
45
45
|
"type": "bytes32",
|
|
46
46
|
"typeSimple": "bytes32",
|
|
47
|
-
"comment": "
|
|
47
|
+
"comment": "ID of the attestation type."
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
"name": "sourceId",
|
|
51
51
|
"type": "bytes32",
|
|
52
52
|
"typeSimple": "bytes32",
|
|
53
|
-
"comment": "
|
|
53
|
+
"comment": "ID of the data source."
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"name": "messageIntegrityCode",
|
|
57
57
|
"type": "bytes32",
|
|
58
58
|
"typeSimple": "bytes32",
|
|
59
|
-
"comment": "`MessageIntegrityCode` that is derived from the expected response as defined
|
|
59
|
+
"comment": "`MessageIntegrityCode` that is derived from the expected response as defined."
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"name": "requestBody",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"description": "Toplevel response",
|
|
72
72
|
"above": "",
|
|
73
73
|
"below": "",
|
|
74
|
-
"fullComment": " @notice Toplevel response\n @param attestationType Extracted from the request.\n @param sourceId Extracted from the request.\n @param votingRound The
|
|
74
|
+
"fullComment": " @notice Toplevel response\n @param attestationType Extracted from the request.\n @param sourceId Extracted from the request.\n @param votingRound The ID of the State Connector round in which the request was considered.\n @param lowestUsedTimestamp The lowest timestamp used to generate the response.\n @param requestBody Extracted from the request.\n @param responseBody Data defining the response. The verification rules for the construction of the response body and the type are defined per specific `attestationType`.",
|
|
75
75
|
"params": [
|
|
76
76
|
{
|
|
77
77
|
"name": "attestationType",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"name": "votingRound",
|
|
90
90
|
"type": "uint64",
|
|
91
91
|
"typeSimple": "uint64",
|
|
92
|
-
"comment": "The
|
|
92
|
+
"comment": "The ID of the State Connector round in which the request was considered."
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"name": "lowestUsedTimestamp",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"description": "Request body for ConfirmedBlockHeightExistsType attestation type",
|
|
117
117
|
"above": "",
|
|
118
118
|
"below": "",
|
|
119
|
-
"fullComment": " @notice Request body for ConfirmedBlockHeightExistsType attestation type\n @param blockNumber The number of the block the request wants a confirmation of.\n @param queryWindow The
|
|
119
|
+
"fullComment": " @notice Request body for ConfirmedBlockHeightExistsType attestation type\n @param blockNumber The number of the block the request wants a confirmation of.\n @param queryWindow The length of the period in which the block production rate is to be computed.",
|
|
120
120
|
"params": [
|
|
121
121
|
{
|
|
122
122
|
"name": "blockNumber",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"name": "queryWindow",
|
|
129
129
|
"type": "uint64",
|
|
130
130
|
"typeSimple": "uint64",
|
|
131
|
-
"comment": "The
|
|
131
|
+
"comment": "The length of the period in which the block production rate is to be computed."
|
|
132
132
|
}
|
|
133
133
|
]
|
|
134
134
|
},
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"description": "Response body for ConfirmedBlockHeightExistsType attestation type",
|
|
138
138
|
"above": "",
|
|
139
139
|
"below": "`blockNumber`, `lowestQueryWindowBlockNumber`, `blockTimestamp` and `lowestQueryWindowBlockTimestamp` can be used to compute the average block production time in the specified block range.",
|
|
140
|
-
"fullComment": " @notice Response body for ConfirmedBlockHeightExistsType attestation type\n @custom:below `blockNumber`, `lowestQueryWindowBlockNumber`, `blockTimestamp` and `lowestQueryWindowBlockTimestamp` can be used to compute the average block production time in the specified block range.\n @param blockTimestamp The timestamp of the block with `blockNumber`.\n @param numberOfConfirmations The depth at which a block is considered confirmed depending on the chain. All attestation
|
|
140
|
+
"fullComment": " @notice Response body for ConfirmedBlockHeightExistsType attestation type\n @custom:below `blockNumber`, `lowestQueryWindowBlockNumber`, `blockTimestamp` and `lowestQueryWindowBlockTimestamp` can be used to compute the average block production time in the specified block range.\n @param blockTimestamp The timestamp of the block with `blockNumber`.\n @param numberOfConfirmations The depth at which a block is considered confirmed depending on the chain. All attestation providers must agree on this number.\n @param lowestQueryWindowBlockNumber The block number of the latest block that has a timestamp strictly smaller than `blockTimestamp` - `queryWindow`.\n @param lowestQueryWindowBlockTimestamp The timestamp of the block at height `lowestQueryWindowBlockNumber`.",
|
|
141
141
|
"params": [
|
|
142
142
|
{
|
|
143
143
|
"name": "blockTimestamp",
|
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
"name": "numberOfConfirmations",
|
|
150
150
|
"type": "uint64",
|
|
151
151
|
"typeSimple": "uint64",
|
|
152
|
-
"comment": "The depth at which a block is considered confirmed depending on the chain. All attestation
|
|
152
|
+
"comment": "The depth at which a block is considered confirmed depending on the chain. All attestation providers must agree on this number."
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
"name": "lowestQueryWindowBlockNumber",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "EVMTransaction",
|
|
3
|
-
"fullComment": " @custom:name EVMTransaction\n @custom:id 0x06\n @custom:supported ETH, FLR, SGB, testETH, testFLR, testSGB\n @author Flare\n @notice
|
|
4
|
-
"description": "
|
|
3
|
+
"fullComment": " @custom:name EVMTransaction\n @custom:id 0x06\n @custom:supported ETH, FLR, SGB, testETH, testFLR, testSGB\n @author Flare\n @notice A relay of a transaction from an EVM chain.\n This type is only relevant for EVM-compatible chains.\n @custom:verification If a transaction with the `transactionId` is in a block on the main branch with at least `requiredConfirmations`, the specified data is relayed.\n If an indicated event does not exist, the request is rejected.\n @custom:lut `timestamp`",
|
|
4
|
+
"description": "A relay of a transaction from an EVM chain.\n This type is only relevant for EVM-compatible chains.",
|
|
5
5
|
"supported": [
|
|
6
6
|
"ETH",
|
|
7
7
|
"FLR",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"testFLR",
|
|
11
11
|
"testSGB"
|
|
12
12
|
],
|
|
13
|
-
"verification": "If transaction with `transactionId` is
|
|
13
|
+
"verification": "If a transaction with the `transactionId` is in a block on the main branch with at least `requiredConfirmations`, the specified data is relayed.\n If an indicated event does not exist, the request is rejected.\n ",
|
|
14
14
|
"lut": "`timestamp`",
|
|
15
15
|
"proof": {
|
|
16
16
|
"name": "Proof",
|
|
@@ -38,25 +38,25 @@
|
|
|
38
38
|
"description": "Toplevel request",
|
|
39
39
|
"above": "",
|
|
40
40
|
"below": "",
|
|
41
|
-
"fullComment": " @notice Toplevel request\n @param attestationType
|
|
41
|
+
"fullComment": " @notice Toplevel request\n @param attestationType ID of the attestation type.\n @param sourceId ID of the data source.\n @param messageIntegrityCode `MessageIntegrityCode` that is derived from the expected response.\n @param requestBody Data defining the request. Type (struct) and interpretation is determined by the `attestationType`.",
|
|
42
42
|
"params": [
|
|
43
43
|
{
|
|
44
44
|
"name": "attestationType",
|
|
45
45
|
"type": "bytes32",
|
|
46
46
|
"typeSimple": "bytes32",
|
|
47
|
-
"comment": "
|
|
47
|
+
"comment": "ID of the attestation type."
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
"name": "sourceId",
|
|
51
51
|
"type": "bytes32",
|
|
52
52
|
"typeSimple": "bytes32",
|
|
53
|
-
"comment": "
|
|
53
|
+
"comment": "ID of the data source."
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"name": "messageIntegrityCode",
|
|
57
57
|
"type": "bytes32",
|
|
58
58
|
"typeSimple": "bytes32",
|
|
59
|
-
"comment": "`MessageIntegrityCode` that is derived from the expected response
|
|
59
|
+
"comment": "`MessageIntegrityCode` that is derived from the expected response."
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"name": "requestBody",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"description": "Toplevel response",
|
|
72
72
|
"above": "",
|
|
73
73
|
"below": "",
|
|
74
|
-
"fullComment": " @notice Toplevel response\n @param attestationType Extracted from the request.\n @param sourceId Extracted from the request.\n @param votingRound The
|
|
74
|
+
"fullComment": " @notice Toplevel response\n @param attestationType Extracted from the request.\n @param sourceId Extracted from the request.\n @param votingRound The ID of the State Connector round in which the request was considered.\n @param lowestUsedTimestamp The lowest timestamp used to generate the response.\n @param requestBody Extracted from the request.\n @param responseBody Data defining the response. The verification rules for the construction of the response body and the type are defined per specific `attestationType`.",
|
|
75
75
|
"params": [
|
|
76
76
|
{
|
|
77
77
|
"name": "attestationType",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"name": "votingRound",
|
|
90
90
|
"type": "uint64",
|
|
91
91
|
"typeSimple": "uint64",
|
|
92
|
-
"comment": "The
|
|
92
|
+
"comment": "The ID of the State Connector round in which the request was considered."
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"name": "lowestUsedTimestamp",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"description": "Request body for EVM transaction attestation type",
|
|
117
117
|
"above": "",
|
|
118
118
|
"below": "Note that events (logs) are indexed in block not in each transaction. The contract that uses the attestation should specify the order of event logs as needed and the requestor should sort `logIndices`\n with respect to the set specifications. If possible, the contact should only require one `logIndex`.",
|
|
119
|
-
"fullComment": " @notice Request body for EVM transaction attestation type\n @custom:below Note that events (logs) are indexed in block not in each transaction. The contract that uses the attestation should specify the order of event logs as needed and the requestor should sort `logIndices`\n with respect to the set specifications. If possible, the contact should only require one `logIndex`.\n @param transactionHash Hash of the transaction(transactionHash).\n @param requiredConfirmations The height at which a block is considered confirmed by the requestor.\n @param provideInput If true, \"input\" field is included in the response.\n @param listEvents If true, events indicated by `logIndices` are included in the response. Otherwise, no events are included in the response.\n @param logIndices If listEvents is false
|
|
119
|
+
"fullComment": " @notice Request body for EVM transaction attestation type\n @custom:below Note that events (logs) are indexed in block not in each transaction. The contract that uses the attestation should specify the order of event logs as needed and the requestor should sort `logIndices`\n with respect to the set specifications. If possible, the contact should only require one `logIndex`.\n @param transactionHash Hash of the transaction(transactionHash).\n @param requiredConfirmations The height at which a block is considered confirmed by the requestor.\n @param provideInput If true, \"input\" field is included in the response.\n @param listEvents If true, events indicated by `logIndices` are included in the response. Otherwise, no events are included in the response.\n @param logIndices If `listEvents` is `false`, this should be an empty list, otherwise, the request is rejected. If `listEvents` is `true`, this is the list of indices (logIndex) of the events to be relayed (sorted by the requestor). The array should contain at most 50 indices. If empty, it indicates all events in order capped by 50.",
|
|
120
120
|
"params": [
|
|
121
121
|
{
|
|
122
122
|
"name": "transactionHash",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"name": "logIndices",
|
|
147
147
|
"type": "uint32[]",
|
|
148
148
|
"typeSimple": "uint32[]",
|
|
149
|
-
"comment": "If listEvents is false
|
|
149
|
+
"comment": "If `listEvents` is `false`, this should be an empty list, otherwise, the request is rejected. If `listEvents` is `true`, this is the list of indices (logIndex) of the events to be relayed (sorted by the requestor). The array should contain at most 50 indices. If empty, it indicates all events in order capped by 50."
|
|
150
150
|
}
|
|
151
151
|
]
|
|
152
152
|
},
|
|
@@ -154,8 +154,8 @@
|
|
|
154
154
|
"name": "ResponseBody",
|
|
155
155
|
"description": "Response body for EVM transaction attestation type",
|
|
156
156
|
"above": "",
|
|
157
|
-
"below": "
|
|
158
|
-
"fullComment": " @notice Response body for EVM transaction attestation type\n @custom:below
|
|
157
|
+
"below": "The fields are in line with [transaction](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash) provided by EVM node.",
|
|
158
|
+
"fullComment": " @notice Response body for EVM transaction attestation type\n @custom:below The fields are in line with [transaction](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_gettransactionbyhash) provided by EVM node.\n @param blockNumber Number of the block in which the transaction is included.\n @param timestamp Timestamp of the block in which the transaction is included.\n @param sourceAddress The address (from) that signed the transaction.\n @param isDeployment Indicate whether it is a contract creation transaction.\n @param receivingAddress The address (to) of the receiver of the initial transaction. Zero address if `isDeployment` is `true`.\n @param value The value transferred by the initial transaction in wei.\n @param input If `provideInput`, this is the data send along with the initial transaction. Otherwise it is the default value `0x00`.\n @param status Status of the transaction 1 - success, 0 - failure.\n @param events If `listEvents` is `true`, an array of the requested events. Sorted by the logIndex in the same order as `logIndices`. Otherwise, an empty array.",
|
|
159
159
|
"params": [
|
|
160
160
|
{
|
|
161
161
|
"name": "blockNumber",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"name": "receivingAddress",
|
|
186
186
|
"type": "address",
|
|
187
187
|
"typeSimple": "address",
|
|
188
|
-
"comment": "The address (to) of the receiver of the initial transaction. Zero address if `isDeployment` is true
|
|
188
|
+
"comment": "The address (to) of the receiver of the initial transaction. Zero address if `isDeployment` is `true`."
|
|
189
189
|
},
|
|
190
190
|
{
|
|
191
191
|
"name": "value",
|
|
@@ -209,7 +209,7 @@
|
|
|
209
209
|
"name": "events",
|
|
210
210
|
"type": "struct EVMTransaction.Event[]",
|
|
211
211
|
"typeSimple": "Event[]",
|
|
212
|
-
"comment": "If `listEvents` is true
|
|
212
|
+
"comment": "If `listEvents` is `true`, an array of the requested events. Sorted by the logIndex in the same order as `logIndices`. Otherwise, an empty array."
|
|
213
213
|
}
|
|
214
214
|
]
|
|
215
215
|
},
|
|
@@ -219,8 +219,8 @@
|
|
|
219
219
|
"name": "Event",
|
|
220
220
|
"description": "Event log record",
|
|
221
221
|
"above": "An `Event` is a struct with the following fields:",
|
|
222
|
-
"below": "
|
|
223
|
-
"fullComment": " @notice Event log record\n @custom:above An `Event` is a struct with the following fields:\n @custom:below
|
|
222
|
+
"below": "The fields are in line with [EVM event logs](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges).",
|
|
223
|
+
"fullComment": " @notice Event log record\n @custom:above An `Event` is a struct with the following fields:\n @custom:below The fields are in line with [EVM event logs](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getfilterchanges).\n @param logIndex The consecutive number of the event in block.\n @param emitterAddress The address of the contract that emitted the event.\n @param topics An array of up to four 32-byte strings of indexed log arguments.\n @param data Concatenated 32-byte strings of non-indexed log arguments. At least 32 bytes long.\n @param removed It is `true` if the log was removed due to a chain reorganization and `false` if it is a valid log.",
|
|
224
224
|
"params": [
|
|
225
225
|
{
|
|
226
226
|
"name": "logIndex",
|
|
@@ -238,7 +238,7 @@
|
|
|
238
238
|
"name": "topics",
|
|
239
239
|
"type": "bytes32[]",
|
|
240
240
|
"typeSimple": "bytes32[]",
|
|
241
|
-
"comment": "An array of up to
|
|
241
|
+
"comment": "An array of up to four 32-byte strings of indexed log arguments."
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
244
|
"name": "data",
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
"name": "removed",
|
|
251
251
|
"type": "bool",
|
|
252
252
|
"typeSimple": "bool",
|
|
253
|
-
"comment": "It is true if log was removed due to a chain reorganization and false if it is a valid log."
|
|
253
|
+
"comment": "It is `true` if the log was removed due to a chain reorganization and `false` if it is a valid log."
|
|
254
254
|
}
|
|
255
255
|
]
|
|
256
256
|
}
|