You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**The default provider for above testnet chains is `0x6CC14824Ea2918f5De5C2f75A9Da968ad4BD6344`.**
44
28
45
29
The default provider on testnet has reveal delays identical to the corresponding mainnet chains to ensure consistent environment.
46
-
47
-
The default provider fulfills the request by sending a transaction with a gas limit as mentioned in above table. Entropy callbacks the consumer as part of this transaction.
// Store the sequence number to identify the callback request
117
-
}
118
-
119
-
// @param sequenceNumber The sequence number of the request.
120
-
// @param provider The address of the provider that generated the random number. If your app uses multiple providers, you can use this argument to distinguish which one is calling the app back.
121
-
// @param randomNumber The generated random number.
122
-
// This method is called by the entropy contract when a random number is generated.
123
-
// This method **must** be implemented on the same contract that requested the random number.
124
-
// This method should **never** return an error -- if it returns an error, then the keeper will not be able to invoke the callback.
125
-
// If you are having problems receiving the callback, the most likely cause is that the callback is erroring.
126
-
// See the callback debugging guide here to identify the error https://docs.pyth.network/entropy/debug-callback-failures
127
-
function entropyCallback(
128
-
uint64 sequenceNumber,
129
-
address provider,
130
-
bytes32 randomNumber
131
-
) internal override {
132
-
// Implement your callback logic here.
133
-
}
134
-
135
-
// This method is required by the IEntropyConsumer interface.
136
-
// It returns the address of the entropy contract which will call the callback.
137
-
function getEntropy() internal view override returns (address) {
138
-
return address(entropy);
139
-
}
119
+
120
+
}
121
+
122
+
// @param sequenceNumber The sequence number of the request.
123
+
// @param provider The address of the provider that generated the random number. If your app uses multiple providers, you can use this argument to distinguish which one is calling the app back.
124
+
// @param randomNumber The generated random number.
125
+
// This method is called by the entropy contract when a random number is generated.
126
+
// This method **must** be implemented on the same contract that requested the random number.
127
+
// This method should **never** return an error -- if it returns an error, then the keeper will not be able to invoke the callback.
128
+
// If you are having problems receiving the callback, the most likely cause is that the callback is erroring.
129
+
// See the callback debugging guide here to identify the error https://docs.pyth.network/entropy/debug-callback-failures
130
+
function entropyCallback(
131
+
uint64 sequenceNumber,
132
+
address provider,
133
+
bytes32 randomNumber
134
+
) internal override {
135
+
// Implement your callback logic here.
136
+
}
137
+
138
+
// This method is required by the IEntropyConsumer interface.
139
+
// It returns the address of the entropy contract which will call the callback.
140
+
function getEntropy() internal view override returns (address) {
141
+
return address(entropy);
142
+
}
140
143
}
141
144
`} />
142
145
@@ -180,6 +183,8 @@ a keeper service for fullfilling requests.
180
183
181
184
You can get the default provider's address by calling the [`getDefaultProvider`](https://github.com/pyth-network/pyth-crosschain/blob/f8ebeb6af31d98f94ce73edade6da2ebab7b2456/target_chains/ethereum/entropy_sdk/solidity/IEntropy.sol#L94) method:
0 commit comments