Skip to content

Commit 3424904

Browse files
committed
PR comments
1 parent 4f3938e commit 3424904

File tree

3 files changed

+33
-32
lines changed

3 files changed

+33
-32
lines changed

target_chains/ethereum/contracts/contracts/entropy/Entropy.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ abstract contract Entropy is IEntropy, EntropyState {
598598
req.sequenceNumber,
599599
randomNumber,
600600
false,
601-
bytes(""),
601+
ret,
602602
bytes("")
603603
);
604604
clearRequest(provider, sequenceNumber);

target_chains/ethereum/entropy_sdk/solidity/EntropyEventsV2.sol

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ interface EntropyEventsV2 {
1414
/**
1515
* @notice Emitted when a new provider registers with the Entropy system
1616
* @param provider The address of the registered provider
17-
* @param dummy Additional data field (unused)
17+
* @param extraArgs A field for extra data for forward compatibility.
1818
*/
19-
event Registered(address indexed provider, bytes dummy);
19+
event Registered(address indexed provider, bytes extraArgs);
2020

2121
/**
2222
* @notice Emitted when a user requests a random number from a provider
2323
* @param provider The address of the provider handling the request
2424
* @param caller The address of the user requesting the random number
2525
* @param sequenceNumber A unique identifier for this request
2626
* @param userRandomNumber A random number provided by the user for additional entropy
27-
* @param dummy Additional data field (unused)
27+
* @param extraArgs A field for extra data for forward compatibility.
2828
*/
2929
event Requested(
3030
address indexed provider,
3131
address indexed caller,
3232
uint64 indexed sequenceNumber,
3333
bytes32 userRandomNumber,
34-
bytes dummy
34+
bytes extraArgs
3535
);
3636

3737
/**
@@ -41,101 +41,102 @@ interface EntropyEventsV2 {
4141
* @param sequenceNumber The unique identifier of the request
4242
* @param randomNumber The generated random number
4343
* @param callbackFailed Whether the callback to the caller failed
44-
* @param callbackErrorCode If the callback failed, the error code from the callback. Note
45-
* that "" often indicates an out-of-gas error.
46-
* @param dummy Additional data field (unused)
44+
* @param callbackReturnValue Return value from the callback. If the callback failed, this field contains
45+
* the error code and any additional returned data. Note that "" often indicates an out-of-gas error.
46+
* If the callback returns more than 256 bytes, only the first 256 bytes of the callback return value are included.
47+
* @param extraArgs A field for extra data for forward compatibility.
4748
*/
4849
event Revealed(
4950
address indexed provider,
5051
address indexed caller,
5152
uint64 indexed sequenceNumber,
5253
bytes32 randomNumber,
5354
bool callbackFailed,
54-
bytes callbackErrorCode,
55-
bytes dummy
55+
bytes callbackReturnValue,
56+
bytes extraArgs
5657
);
5758

5859
/**
5960
* @notice Emitted when a provider updates their fee
6061
* @param provider The address of the provider updating their fee
6162
* @param oldFee The previous fee amount
6263
* @param newFee The new fee amount
63-
* @param dummy Additional data field (unused)
64+
* @param extraArgs A field for extra data for forward compatibility.
6465
*/
6566
event ProviderFeeUpdated(
6667
address indexed provider,
6768
uint128 oldFee,
6869
uint128 newFee,
69-
bytes dummy
70+
bytes extraArgs
7071
);
7172

7273
/**
7374
* @notice Emitted when a provider updates their default gas limit
7475
* @param provider The address of the provider updating their gas limit
7576
* @param oldDefaultGasLimit The previous default gas limit
7677
* @param newDefaultGasLimit The new default gas limit
77-
* @param dummy Additional data field (unused)
78+
* @param extraArgs A field for extra data for forward compatibility.
7879
*/
7980
event ProviderDefaultGasLimitUpdated(
8081
address indexed provider,
8182
uint32 oldDefaultGasLimit,
8283
uint32 newDefaultGasLimit,
83-
bytes dummy
84+
bytes extraArgs
8485
);
8586

8687
/**
8788
* @notice Emitted when a provider updates their URI
8889
* @param provider The address of the provider updating their URI
8990
* @param oldUri The previous URI
9091
* @param newUri The new URI
91-
* @param dummy Additional data field (unused)
92+
* @param extraArgs A field for extra data for forward compatibility.
9293
*/
9394
event ProviderUriUpdated(
9495
address indexed provider,
9596
bytes oldUri,
9697
bytes newUri,
97-
bytes dummy
98+
bytes extraArgs
9899
);
99100

100101
/**
101102
* @notice Emitted when a provider updates their fee manager address
102103
* @param provider The address of the provider updating their fee manager
103104
* @param oldFeeManager The previous fee manager address
104105
* @param newFeeManager The new fee manager address
105-
* @param dummy Additional data field (unused)
106+
* @param extraArgs A field for extra data for forward compatibility.
106107
*/
107108
event ProviderFeeManagerUpdated(
108109
address indexed provider,
109110
address oldFeeManager,
110111
address newFeeManager,
111-
bytes dummy
112+
bytes extraArgs
112113
);
113114

114115
/**
115116
* @notice Emitted when a provider updates their maximum number of hashes that can be advanced
116117
* @param provider The address of the provider updating their max hashes
117118
* @param oldMaxNumHashes The previous maximum number of hashes
118119
* @param newMaxNumHashes The new maximum number of hashes
119-
* @param dummy Additional data field (unused)
120+
* @param extraArgs A field for extra data for forward compatibility.
120121
*/
121122
event ProviderMaxNumHashesAdvanced(
122123
address indexed provider,
123124
uint32 oldMaxNumHashes,
124125
uint32 newMaxNumHashes,
125-
bytes dummy
126+
bytes extraArgs
126127
);
127128

128129
/**
129130
* @notice Emitted when a provider withdraws their accumulated fees
130131
* @param provider The address of the provider withdrawing fees
131132
* @param recipient The address receiving the withdrawn fees
132133
* @param withdrawnAmount The amount of fees withdrawn
133-
* @param dummy Additional data field (unused)
134+
* @param extraArgs A field for extra data for forward compatibility.
134135
*/
135136
event Withdrawal(
136137
address indexed provider,
137138
address indexed recipient,
138139
uint128 withdrawnAmount,
139-
bytes dummy
140+
bytes extraArgs
140141
);
141142
}

target_chains/ethereum/entropy_sdk/solidity/abis/IEntropy.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
{
9898
"indexed": false,
9999
"internalType": "bytes",
100-
"name": "dummy",
100+
"name": "extraArgs",
101101
"type": "bytes"
102102
}
103103
],
@@ -153,7 +153,7 @@
153153
{
154154
"indexed": false,
155155
"internalType": "bytes",
156-
"name": "dummy",
156+
"name": "extraArgs",
157157
"type": "bytes"
158158
}
159159
],
@@ -209,7 +209,7 @@
209209
{
210210
"indexed": false,
211211
"internalType": "bytes",
212-
"name": "dummy",
212+
"name": "extraArgs",
213213
"type": "bytes"
214214
}
215215
],
@@ -265,7 +265,7 @@
265265
{
266266
"indexed": false,
267267
"internalType": "bytes",
268-
"name": "dummy",
268+
"name": "extraArgs",
269269
"type": "bytes"
270270
}
271271
],
@@ -321,7 +321,7 @@
321321
{
322322
"indexed": false,
323323
"internalType": "bytes",
324-
"name": "dummy",
324+
"name": "extraArgs",
325325
"type": "bytes"
326326
}
327327
],
@@ -415,7 +415,7 @@
415415
{
416416
"indexed": false,
417417
"internalType": "bytes",
418-
"name": "dummy",
418+
"name": "extraArgs",
419419
"type": "bytes"
420420
}
421421
],
@@ -507,7 +507,7 @@
507507
{
508508
"indexed": false,
509509
"internalType": "bytes",
510-
"name": "dummy",
510+
"name": "extraArgs",
511511
"type": "bytes"
512512
}
513513
],
@@ -708,13 +708,13 @@
708708
{
709709
"indexed": false,
710710
"internalType": "bytes",
711-
"name": "callbackErrorCode",
711+
"name": "callbackReturnValue",
712712
"type": "bytes"
713713
},
714714
{
715715
"indexed": false,
716716
"internalType": "bytes",
717-
"name": "dummy",
717+
"name": "extraArgs",
718718
"type": "bytes"
719719
}
720720
],
@@ -843,7 +843,7 @@
843843
{
844844
"indexed": false,
845845
"internalType": "bytes",
846-
"name": "dummy",
846+
"name": "extraArgs",
847847
"type": "bytes"
848848
}
849849
],

0 commit comments

Comments
 (0)