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
Copy file name to clipboardExpand all lines: apps/developer-hub/content/docs/entropy/contract-addresses.mdx
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Contract Addresses
2
+
title: Contract & Provider Addresses
3
3
description: Pyth Entropy contract addresses on EVM networks
4
4
---
5
5
@@ -16,7 +16,8 @@ The Entropy contract is deployed on the following mainnet chains:
16
16
The default provider on mainnet has a reveal delay to avoid changes on the outcome of the Entropy request because of block reorgs.
17
17
The reveal delay shows how many blocks should be produced after the block including the request transaction in order to reveal and submit a callback transaction.
18
18
19
-
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.
19
+
The default provider fulfills the request by sending a transaction with a gas limit as mentioned in above table or as set by the user in the request.
20
+
Entropy callbacks the consumer as part of this transaction.
// Store the sequence number to identify the callback request
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
-
}
105
+
IEntropyV2 entropy;
106
+
107
+
// @param entropyAddress The address of the entropy contract.
// Store the sequence number to identify the callback request
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) {
0 commit comments