@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": "Payment",
|
|
3
|
-
"fullComment": " @custom:name Payment\n @custom:id 0x01\n @custom:supported BTC, DOGE, XRP, testBTC, testDOGE, testXRP\n @author Flare\n @notice
|
|
4
|
-
"description": "
|
|
3
|
+
"fullComment": " @custom:name Payment\n @custom:id 0x01\n @custom:supported BTC, DOGE, XRP, testBTC, testDOGE, testXRP\n @author Flare\n @notice A relay of a transaction on an external chain that is considered a payment in a native currency.\n Various blockchains support different types of native payments. For each blockchain, it is specified how a payment\n transaction should be formed to be provable by this attestation type.\n The provable payments emulate traditional banking payments from entity A to entity B in native currency with an optional payment reference.\n @custom:verification The transaction with `transactionId` is fetched from the API of the 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 [payment summary](/specs/attestations/external-chains/transactions.md#payment-summary) is computed according to the rules for the source chain.\n If the summary is successfully calculated, the response is assembled from the summary.\n `blockNumber` and `blockTimestamp` are retrieved from the block if they are not included in the transaction data.\n For Bitcoin and Dogecoin, `blockTimestamp` is mediantime of the block.\n For XRPL, `blockTimestamp` is close time of the ledger converted to UNIX time.\n If the summary is not successfully calculated, the attestation request is rejected.\n @custom:lut `blockTimestamp`",
|
|
4
|
+
"description": "A relay of a transaction on an external chain that is considered a payment in a native currency.\n Various blockchains support different types of native payments. For each blockchain, it is specified how a payment\n transaction should be formed to be provable by this attestation type.\n The provable payments emulate traditional banking payments from entity A to entity B in native currency with an optional payment reference.",
|
|
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": "The transaction with `transactionId` is fetched from the API of the 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 [payment summary](/specs/attestations/external-chains/transactions.md#payment-summary) is computed according to the rules for the source chain.\n If the summary is successfully calculated, the response is assembled from the summary.\n `blockNumber` and `blockTimestamp` are retrieved from the block if they are not included in the transaction data.\n For Bitcoin and Dogecoin, `blockTimestamp` is mediantime of the block.\n For XRPL, `blockTimestamp` is close time of the ledger converted to UNIX time.\n If the summary is not successfully calculated, the attestation request is rejected.\n ",
|
|
14
14
|
"lut": "`blockTimestamp`",
|
|
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,25 +116,25 @@
|
|
|
116
116
|
"description": "Request body for Payment attestation type",
|
|
117
117
|
"above": "",
|
|
118
118
|
"below": "",
|
|
119
|
-
"fullComment": " @notice Request body for Payment attestation type\n @param transactionId
|
|
119
|
+
"fullComment": " @notice Request body for Payment attestation type\n @param transactionId ID of the payment transaction.\n @param inUtxo For UTXO chains, this is the index of the transaction input with source address. Always 0 for the non-utxo chains.\n @param utxo For UTXO chains, this is the index of the transaction output with receiving address. Always 0 for the non-utxo chains.",
|
|
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": "inUtxo",
|
|
129
129
|
"type": "uint256",
|
|
130
130
|
"typeSimple": "uint256",
|
|
131
|
-
"comment": "For UTXO, this is the index of the transaction input with source address. Always 0 for the non-utxo chains."
|
|
131
|
+
"comment": "For UTXO chains, this is the index of the transaction input with source address. Always 0 for the non-utxo chains."
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
"name": "utxo",
|
|
135
135
|
"type": "uint256",
|
|
136
136
|
"typeSimple": "uint256",
|
|
137
|
-
"comment": "For UTXO, this is the index of the transaction output with receiving address. Always 0 for the non-utxo chains."
|
|
137
|
+
"comment": "For UTXO chains, this is the index of the transaction output with receiving address. Always 0 for the non-utxo chains."
|
|
138
138
|
}
|
|
139
139
|
]
|
|
140
140
|
},
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
"description": "Response body for Payment attestation type",
|
|
144
144
|
"above": "",
|
|
145
145
|
"below": "",
|
|
146
|
-
"fullComment": " @notice Response body for Payment attestation type\n @param blockNumber Number of the block in which the transaction is included.\n @param blockTimestamp The
|
|
146
|
+
"fullComment": " @notice Response body for Payment attestation type\n @param blockNumber 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 source address.\n @param receivingAddressHash Standard address hash of the receiving address. The zero 32-byte string if there is no receivingAddress (if `status` is not success).\n @param intendedReceivingAddressHash Standard address hash of the intended receiving address. Relevant if the transaction is unsuccessful.\n @param spentAmount Amount in minimal units spent by the source address.\n @param intendedSpentAmount Amount in minimal units to be spent by the source address. Relevant if the transaction status is unsuccessful.\n @param receivedAmount Amount in minimal units received by the receiving address.\n @param intendedReceivedAmount Amount in minimal units intended to be received by the receiving address. Relevant if the transaction is unsuccessful.\n @param standardPaymentReference [Standard payment reference](/specs/attestations/external-chains/standardPaymentReference.md) of the transaction.\n @param oneToOne Indicator whether only one source and one receiver are involved in the transaction.\n @param status [Succes status](/specs/attestations/external-chains/transactions.md#transaction-success-status) of the transaction: 0 - success, 1 - failed by sender's fault,x 2 - failed by receiver's fault.",
|
|
147
147
|
"params": [
|
|
148
148
|
{
|
|
149
149
|
"name": "blockNumber",
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"name": "blockTimestamp",
|
|
156
156
|
"type": "uint64",
|
|
157
157
|
"typeSimple": "uint64",
|
|
158
|
-
"comment": "The
|
|
158
|
+
"comment": "The timestamp of the block in which the transaction is included."
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
161
|
"name": "sourceAddressHash",
|
|
@@ -167,13 +167,13 @@
|
|
|
167
167
|
"name": "receivingAddressHash",
|
|
168
168
|
"type": "bytes32",
|
|
169
169
|
"typeSimple": "bytes32",
|
|
170
|
-
"comment": "Standard address hash of the receiving address.
|
|
170
|
+
"comment": "Standard address hash of the receiving address. The zero 32-byte string if there is no receivingAddress (if `status` is not success)."
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
"name": "intendedReceivingAddressHash",
|
|
174
174
|
"type": "bytes32",
|
|
175
175
|
"typeSimple": "bytes32",
|
|
176
|
-
"comment": "Standard address hash of the intended receiving address. Relevant if the transaction
|
|
176
|
+
"comment": "Standard address hash of the intended receiving address. Relevant if the transaction is unsuccessful."
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
179
|
"name": "spentAmount",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"name": "intendedSpentAmount",
|
|
186
186
|
"type": "int256",
|
|
187
187
|
"typeSimple": "int256",
|
|
188
|
-
"comment": "Amount in minimal units to be spent by the source address. Relevant if the transaction status is
|
|
188
|
+
"comment": "Amount in minimal units to be spent by the source address. Relevant if the transaction status is unsuccessful."
|
|
189
189
|
},
|
|
190
190
|
{
|
|
191
191
|
"name": "receivedAmount",
|
|
@@ -197,13 +197,13 @@
|
|
|
197
197
|
"name": "intendedReceivedAmount",
|
|
198
198
|
"type": "int256",
|
|
199
199
|
"typeSimple": "int256",
|
|
200
|
-
"comment": "Amount in minimal units intended to be received by the receiving address. Relevant if the transaction
|
|
200
|
+
"comment": "Amount in minimal units intended to be received by the receiving address. Relevant if the transaction is unsuccessful."
|
|
201
201
|
},
|
|
202
202
|
{
|
|
203
203
|
"name": "standardPaymentReference",
|
|
204
204
|
"type": "bytes32",
|
|
205
205
|
"typeSimple": "bytes32",
|
|
206
|
-
"comment": "
|
|
206
|
+
"comment": "[Standard payment reference](/specs/attestations/external-chains/standardPaymentReference.md) of the transaction."
|
|
207
207
|
},
|
|
208
208
|
{
|
|
209
209
|
"name": "oneToOne",
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
"name": "status",
|
|
216
216
|
"type": "uint8",
|
|
217
217
|
"typeSimple": "uint8",
|
|
218
|
-
"comment": "
|
|
218
|
+
"comment": "[Succes status](/specs/attestations/external-chains/transactions.md#transaction-success-status) of the transaction: 0 - success, 1 - failed by sender's fault,x 2 - failed by receiver's fault."
|
|
219
219
|
}
|
|
220
220
|
]
|
|
221
221
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ReferencedPaymentNonexistence",
|
|
3
|
-
"fullComment": " @custom:name ReferencedPaymentNonexistence\n @custom:id 0x04\n @custom:supported BTC, DOGE, XRP, testBTC, testDOGE, testXRP\n @author Flare\n @notice
|
|
4
|
-
"description": "
|
|
3
|
+
"fullComment": " @custom:name ReferencedPaymentNonexistence\n @custom:id 0x04\n @custom:supported BTC, DOGE, XRP, testBTC, testDOGE, testXRP\n @author Flare\n @notice Assertion that an agreed-upon payment has not been made by a certain deadline.\n A confirmed request shows that a transaction meeting certain criteria (address, amount, reference) did not appear in the specified block range.\n \n \n This type of attestation can be used to e.g. provide grounds to liquidate funds locked by a smart contract on Flare when a payment is missed. \n @custom:verification If `firstOverflowBlock` cannot be determined or does not have a sufficient [number of confirmations](/specs/attestations/configs.md#finalityconfirmation), the attestation request is rejected.\n If `firstOverflowBlockNumber` is higher or equal to `minimalBlockNumber`, the request is rejected.\n The search range are blocks between heights including `minimalBlockNumber` and excluding `firstOverflowBlockNumber`.\n If the verifier does not have a view of all blocks from `minimalBlockNumber` to `firstOverflowBlockNumber`, the attestation request is rejected.\n The request is confirmed if no transaction meeting the specified criteria is found in the search range.\n The criteria and timestamp are chain specific.\n ### UTXO (Bitcoin and Dogecoin)\n Criteria for the transaction:\n - It is not coinbase transaction.\n - The transaction has the specified [standardPaymentReference](/specs/attestations/external-chains/standardPaymentReference.md#btc-and-doge-blockchains).\n - The sum of values of all outputs with the specified address minus the sum of values of all inputs with the specified address is greater than `amount` (in practice the sum of all values of the inputs with the specified address is zero).\n \n Timestamp is `mediantime`.\n ### XRPL\n Criteria for the transaction:\n - The transaction is of type payment.\n - The transaction has the specified [standardPaymentReference](/specs/attestations/external-chains/standardPaymentReference.md#xrp),\n - One of the following is true:\n - Transaction status is `SUCCESS` and the amount received by the specified destination address is greater than the specified `value`.\n - Transaction status is `RECEIVER_FAILURE` and the specified destination address would receive an amount greater than the specified `value` had the transaction been successful.\n \n Timestamp is `close_time` converted to UNIX time.\n @custom:lut `minimalBlockTimestamp`",
|
|
4
|
+
"description": "Assertion that an agreed-upon payment has not been made by a certain deadline.\n A confirmed request shows that a transaction meeting certain criteria (address, amount, reference) did not appear in the specified block range.\n \n \n This type of attestation can be used to e.g. provide grounds to liquidate funds locked by a smart contract on Flare when a payment is missed.",
|
|
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": "If `firstOverflowBlock` cannot be determined or does not have a sufficient [number of confirmations](/specs/attestations/configs.md#finalityconfirmation), the attestation request is rejected.\n If `firstOverflowBlockNumber` is higher or equal to `minimalBlockNumber`, the request is rejected.\n The search range are blocks between heights including `minimalBlockNumber` and excluding `firstOverflowBlockNumber`.\n If the verifier does not have a view of all blocks from `minimalBlockNumber` to `firstOverflowBlockNumber`, the attestation request is rejected.\n The request is confirmed if no transaction meeting the specified criteria is found in the search range.\n The criteria and timestamp are chain specific.\n ### UTXO (Bitcoin and Dogecoin)\n Criteria for the transaction:\n - It is not coinbase transaction.\n - The transaction has the specified [standardPaymentReference](/specs/attestations/external-chains/standardPaymentReference.md#btc-and-doge-blockchains).\n - The sum of values of all outputs with the specified address minus the sum of values of all inputs with the specified address is greater than `amount` (in practice the sum of all values of the inputs with the specified address is zero).\n \n Timestamp is `mediantime`.\n ### XRPL\n Criteria for the transaction:\n - The transaction is of type payment.\n - The transaction has the specified [standardPaymentReference](/specs/attestations/external-chains/standardPaymentReference.md#xrp),\n - One of the following is true:\n - Transaction status is `SUCCESS` and the amount received by the specified destination address is greater than the specified `value`.\n - Transaction status is `RECEIVER_FAILURE` and the specified destination address would receive an amount greater than the specified `value` had the transaction been successful.\n \n Timestamp is `close_time` converted to UNIX time.\n ",
|
|
14
14
|
"lut": "`minimalBlockTimestamp`",
|
|
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",
|
|
@@ -115,8 +115,8 @@
|
|
|
115
115
|
"name": "RequestBody",
|
|
116
116
|
"description": "Request body for ReferencePaymentNonexistence attestation type",
|
|
117
117
|
"above": "",
|
|
118
|
-
"below": "The `standardPaymentReference` should not be zero (as 32-byte sequence).",
|
|
119
|
-
"fullComment": " @notice Request body for ReferencePaymentNonexistence attestation type\n @param minimalBlockNumber The start block of the search range.\n @param deadlineBlockNumber The blockNumber to be included in the search range.\n @param deadlineTimestamp The timestamp to be included in the search range.\n @param destinationAddressHash The standard address hash of the address to which the payment had to be done.\n @param amount The requested amount in minimal units that had to be payed.\n @param standardPaymentReference The requested standard payment reference.\n @custom:below The `standardPaymentReference` should not be zero (as 32-byte sequence).",
|
|
118
|
+
"below": "The `standardPaymentReference` should not be zero (as a 32-byte sequence).",
|
|
119
|
+
"fullComment": " @notice Request body for ReferencePaymentNonexistence attestation type\n @param minimalBlockNumber The start block of the search range.\n @param deadlineBlockNumber The blockNumber to be included in the search range.\n @param deadlineTimestamp The timestamp to be included in the search range.\n @param destinationAddressHash The standard address hash of the address to which the payment had to be done.\n @param amount The requested amount in minimal units that had to be payed.\n @param standardPaymentReference The requested standard payment reference.\n @custom:below The `standardPaymentReference` should not be zero (as a 32-byte sequence).",
|
|
120
120
|
"params": [
|
|
121
121
|
{
|
|
122
122
|
"name": "minimalBlockNumber",
|
|
@@ -160,8 +160,8 @@
|
|
|
160
160
|
"name": "ResponseBody",
|
|
161
161
|
"description": "Response body for ReferencePaymentNonexistence attestation type.",
|
|
162
162
|
"above": "",
|
|
163
|
-
"below": "`firstOverflowBlock` is the first block that has block number higher than `deadlineBlockNumber` and timestamp later than `deadlineTimestamp`.\n The specified search range are blocks between heights
|
|
164
|
-
"fullComment": " @notice Response body for ReferencePaymentNonexistence attestation type.\n @param minimalBlockTimestamp The timestamp of the minimalBlock.\n @param firstOverflowBlockNumber The height of the firstOverflowBlock.\n @param firstOverflowBlockTimestamp The timestamp of the firstOverflowBlock.\n @custom:below `firstOverflowBlock` is the first block that has block number higher than `deadlineBlockNumber` and timestamp later than `deadlineTimestamp`.\n The specified search range are blocks between heights
|
|
163
|
+
"below": "`firstOverflowBlock` is the first block that has block number higher than `deadlineBlockNumber` and timestamp later than `deadlineTimestamp`.\n The specified search range are blocks between heights including `minimalBlockNumber` and excluding `firstOverflowBlockNumber`.",
|
|
164
|
+
"fullComment": " @notice Response body for ReferencePaymentNonexistence attestation type.\n @param minimalBlockTimestamp The timestamp of the minimalBlock.\n @param firstOverflowBlockNumber The height of the firstOverflowBlock.\n @param firstOverflowBlockTimestamp The timestamp of the firstOverflowBlock.\n @custom:below `firstOverflowBlock` is the first block that has block number higher than `deadlineBlockNumber` and timestamp later than `deadlineTimestamp`.\n The specified search range are blocks between heights including `minimalBlockNumber` and excluding `firstOverflowBlockNumber`.",
|
|
165
165
|
"params": [
|
|
166
166
|
{
|
|
167
167
|
"name": "minimalBlockTimestamp",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"supported": [
|
|
6
6
|
"BTC"
|
|
7
7
|
],
|
|
8
|
-
"verification": "<general verification rules
|
|
8
|
+
"verification": "<general verification rules>\n ",
|
|
9
9
|
"lut": "<lowestUsedTimestamp>",
|
|
10
10
|
"proof": {
|
|
11
11
|
"name": "Proof",
|
|
@@ -33,25 +33,25 @@
|
|
|
33
33
|
"description": "Toplevel request",
|
|
34
34
|
"above": "",
|
|
35
35
|
"below": "",
|
|
36
|
-
"fullComment": " @notice Toplevel request\n @param attestationType
|
|
36
|
+
"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`.",
|
|
37
37
|
"params": [
|
|
38
38
|
{
|
|
39
39
|
"name": "attestationType",
|
|
40
40
|
"type": "bytes32",
|
|
41
41
|
"typeSimple": "bytes32",
|
|
42
|
-
"comment": "
|
|
42
|
+
"comment": "ID of the attestation type."
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
"name": "sourceId",
|
|
46
46
|
"type": "bytes32",
|
|
47
47
|
"typeSimple": "bytes32",
|
|
48
|
-
"comment": "
|
|
48
|
+
"comment": "ID of the data source."
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"name": "messageIntegrityCode",
|
|
52
52
|
"type": "bytes32",
|
|
53
53
|
"typeSimple": "bytes32",
|
|
54
|
-
"comment": "`MessageIntegrityCode` that is derived from the expected response
|
|
54
|
+
"comment": "`MessageIntegrityCode` that is derived from the expected response."
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
"name": "requestBody",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"description": "Toplevel response",
|
|
67
67
|
"above": "",
|
|
68
68
|
"below": "",
|
|
69
|
-
"fullComment": " @notice Toplevel response\n @param attestationType Extracted from the request.\n @param sourceId Extracted from the request.\n @param votingRound The
|
|
69
|
+
"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`.",
|
|
70
70
|
"params": [
|
|
71
71
|
{
|
|
72
72
|
"name": "attestationType",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"name": "votingRound",
|
|
85
85
|
"type": "uint64",
|
|
86
86
|
"typeSimple": "uint64",
|
|
87
|
-
"comment": "The
|
|
87
|
+
"comment": "The ID of the State Connector round in which the request was considered."
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
"name": "lowestUsedTimestamp",
|
package/coston/artifacts/contracts/StateConnector/interface/AddressValidity.sol/AddressValidity.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "AddressValidity",
|
|
4
|
+
"sourceName": "contracts/StateConnector/interface/AddressValidity.sol",
|
|
5
|
+
"abi": [],
|
|
6
|
+
"bytecode": "0x",
|
|
7
|
+
"deployedBytecode": "0x",
|
|
8
|
+
"linkReferences": {},
|
|
9
|
+
"deployedLinkReferences": {}
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "BalanceDecreasingTransaction",
|
|
4
|
+
"sourceName": "contracts/StateConnector/interface/BalanceDecreasingTransaction.sol",
|
|
5
|
+
"abi": [],
|
|
6
|
+
"bytecode": "0x",
|
|
7
|
+
"deployedBytecode": "0x",
|
|
8
|
+
"linkReferences": {},
|
|
9
|
+
"deployedLinkReferences": {}
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "ConfirmedBlockHeightExists",
|
|
4
|
+
"sourceName": "contracts/StateConnector/interface/ConfirmedBlockHeightExists.sol",
|
|
5
|
+
"abi": [],
|
|
6
|
+
"bytecode": "0x",
|
|
7
|
+
"deployedBytecode": "0x",
|
|
8
|
+
"linkReferences": {},
|
|
9
|
+
"deployedLinkReferences": {}
|
|
10
|
+
}
|
package/coston/artifacts/contracts/StateConnector/interface/EVMTransaction.sol/EVMTransaction.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "EVMTransaction",
|
|
4
|
+
"sourceName": "contracts/StateConnector/interface/EVMTransaction.sol",
|
|
5
|
+
"abi": [],
|
|
6
|
+
"bytecode": "0x",
|
|
7
|
+
"deployedBytecode": "0x",
|
|
8
|
+
"linkReferences": {},
|
|
9
|
+
"deployedLinkReferences": {}
|
|
10
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "IAddressValidityVerification",
|
|
4
|
+
"sourceName": "contracts/StateConnector/interface/IAddressValidityVerification.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"components": [
|
|
10
|
+
{
|
|
11
|
+
"internalType": "bytes32[]",
|
|
12
|
+
"name": "merkleProof",
|
|
13
|
+
"type": "bytes32[]"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"components": [
|
|
17
|
+
{
|
|
18
|
+
"internalType": "bytes32",
|
|
19
|
+
"name": "attestationType",
|
|
20
|
+
"type": "bytes32"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"internalType": "bytes32",
|
|
24
|
+
"name": "sourceId",
|
|
25
|
+
"type": "bytes32"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"internalType": "uint64",
|
|
29
|
+
"name": "votingRound",
|
|
30
|
+
"type": "uint64"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"internalType": "uint64",
|
|
34
|
+
"name": "lowestUsedTimestamp",
|
|
35
|
+
"type": "uint64"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"components": [
|
|
39
|
+
{
|
|
40
|
+
"internalType": "string",
|
|
41
|
+
"name": "addressStr",
|
|
42
|
+
"type": "string"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"internalType": "struct AddressValidity.RequestBody",
|
|
46
|
+
"name": "requestBody",
|
|
47
|
+
"type": "tuple"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"components": [
|
|
51
|
+
{
|
|
52
|
+
"internalType": "bool",
|
|
53
|
+
"name": "isValid",
|
|
54
|
+
"type": "bool"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"internalType": "string",
|
|
58
|
+
"name": "standardAddress",
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"internalType": "bytes32",
|
|
63
|
+
"name": "standardAddressHash",
|
|
64
|
+
"type": "bytes32"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"internalType": "struct AddressValidity.ResponseBody",
|
|
68
|
+
"name": "responseBody",
|
|
69
|
+
"type": "tuple"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"internalType": "struct AddressValidity.Response",
|
|
73
|
+
"name": "data",
|
|
74
|
+
"type": "tuple"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"internalType": "struct AddressValidity.Proof",
|
|
78
|
+
"name": "_proof",
|
|
79
|
+
"type": "tuple"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"name": "verifyAddressValidity",
|
|
83
|
+
"outputs": [
|
|
84
|
+
{
|
|
85
|
+
"internalType": "bool",
|
|
86
|
+
"name": "_proved",
|
|
87
|
+
"type": "bool"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"stateMutability": "view",
|
|
91
|
+
"type": "function"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"bytecode": "0x",
|
|
95
|
+
"deployedBytecode": "0x",
|
|
96
|
+
"linkReferences": {},
|
|
97
|
+
"deployedLinkReferences": {}
|
|
98
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_format": "hh-sol-artifact-1",
|
|
3
|
+
"contractName": "IBalanceDecreasingTransactionVerification",
|
|
4
|
+
"sourceName": "contracts/StateConnector/interface/IBalanceDecreasingTransactionVerification.sol",
|
|
5
|
+
"abi": [
|
|
6
|
+
{
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"components": [
|
|
10
|
+
{
|
|
11
|
+
"internalType": "bytes32[]",
|
|
12
|
+
"name": "merkleProof",
|
|
13
|
+
"type": "bytes32[]"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"components": [
|
|
17
|
+
{
|
|
18
|
+
"internalType": "bytes32",
|
|
19
|
+
"name": "attestationType",
|
|
20
|
+
"type": "bytes32"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"internalType": "bytes32",
|
|
24
|
+
"name": "sourceId",
|
|
25
|
+
"type": "bytes32"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"internalType": "uint64",
|
|
29
|
+
"name": "votingRound",
|
|
30
|
+
"type": "uint64"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"internalType": "uint64",
|
|
34
|
+
"name": "lowestUsedTimestamp",
|
|
35
|
+
"type": "uint64"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"components": [
|
|
39
|
+
{
|
|
40
|
+
"internalType": "bytes32",
|
|
41
|
+
"name": "transactionId",
|
|
42
|
+
"type": "bytes32"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"internalType": "bytes32",
|
|
46
|
+
"name": "sourceAddressIndicator",
|
|
47
|
+
"type": "bytes32"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"internalType": "struct BalanceDecreasingTransaction.RequestBody",
|
|
51
|
+
"name": "requestBody",
|
|
52
|
+
"type": "tuple"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"components": [
|
|
56
|
+
{
|
|
57
|
+
"internalType": "uint64",
|
|
58
|
+
"name": "blockNumber",
|
|
59
|
+
"type": "uint64"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"internalType": "uint64",
|
|
63
|
+
"name": "blockTimestamp",
|
|
64
|
+
"type": "uint64"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"internalType": "bytes32",
|
|
68
|
+
"name": "sourceAddressHash",
|
|
69
|
+
"type": "bytes32"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"internalType": "int256",
|
|
73
|
+
"name": "spentAmount",
|
|
74
|
+
"type": "int256"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"internalType": "bytes32",
|
|
78
|
+
"name": "standardPaymentReference",
|
|
79
|
+
"type": "bytes32"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"internalType": "struct BalanceDecreasingTransaction.ResponseBody",
|
|
83
|
+
"name": "responseBody",
|
|
84
|
+
"type": "tuple"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"internalType": "struct BalanceDecreasingTransaction.Response",
|
|
88
|
+
"name": "data",
|
|
89
|
+
"type": "tuple"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"internalType": "struct BalanceDecreasingTransaction.Proof",
|
|
93
|
+
"name": "_proof",
|
|
94
|
+
"type": "tuple"
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
"name": "verifyBalanceDecreasingTransaction",
|
|
98
|
+
"outputs": [
|
|
99
|
+
{
|
|
100
|
+
"internalType": "bool",
|
|
101
|
+
"name": "_proved",
|
|
102
|
+
"type": "bool"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"stateMutability": "view",
|
|
106
|
+
"type": "function"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"bytecode": "0x",
|
|
110
|
+
"deployedBytecode": "0x",
|
|
111
|
+
"linkReferences": {},
|
|
112
|
+
"deployedLinkReferences": {}
|
|
113
|
+
}
|