-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[entropy] Minor updates to parameters / docs #1131
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,9 @@ To use the SDK, you need the address of an Entropy contract on your blockchain a | |
The following table lists the current deployments of entropy. | ||
|
||
| Chain | Entropy Address | Provider | | ||
| avalanche-fuji | 0xD42c7a708E74AD19401D907a14146F006c851Ee3 | 0x368397bDc956b4F23847bE244f350Bde4615F25E | ||
| optimism-goerli | 0x28F16Af4D87523910b843a801454AEde5F9B0459 | 0x368397bDc956b4F23847bE244f350Bde4615F25E | ||
| eos-evm-testnet | 0xD42c7a708E74AD19401D907a14146F006c851Ee3 | 0x368397bDc956b4F23847bE244f350Bde4615F25E | ||
| avalanche-fuji | 0xD42c7a708E74AD19401D907a14146F006c851Ee3 | 0x6CC14824Ea2918f5De5C2f75A9Da968ad4BD6344 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. update the provider key to the new fortuna-staging key |
||
| optimism-goerli | 0x28F16Af4D87523910b843a801454AEde5F9B0459 | 0x6CC14824Ea2918f5De5C2f75A9Da968ad4BD6344 | ||
| eos-evm-testnet | 0xD42c7a708E74AD19401D907a14146F006c851Ee3 | 0x6CC14824Ea2918f5De5C2f75A9Da968ad4BD6344 | ||
|
||
Choose one of these networks and instantiate an `IEntropy` contract in your solidity contract: | ||
|
||
|
@@ -55,7 +55,7 @@ If you are invoking this off-chain, the method also emits a `PythRandomEvents.Re | |
### 3. Fetch the provider's number | ||
|
||
Fetch the provider's random number from them. | ||
For the provider `0x368397bDc956b4F23847bE244f350Bde4615F25E` you can query the webservice at https://fortuna-staging.pyth.network : | ||
For the provider `0x6CC14824Ea2918f5De5C2f75A9Da968ad4BD6344` you can query the webservice at https://fortuna-staging.pyth.network : | ||
|
||
```typescript | ||
await axios.get( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,9 @@ Next, choose a network to run the example on. | |
The example has been deployed on the following networks: | ||
|
||
| Chain Name | Address | RPC | | ||
| optimism-goerli | 0x075A5160FF6462924B4124595F6f987187496476 | https://goerli.optimism.io | | ||
| optimism-goerli | 0x3bA217Cd7840Cc5B34FD5B7263Cebd8CD8665788 | https://goerli.optimism.io | | ||
| avalanche-fuji | 0xE7E52C85907d59C45b2C56EF32B78F514F8c547a | https://api.avax-test.network/ext/bc/C/rpc | | ||
| eos-evm-testnet | 0x413405Aee2db95cb028B60CBAd87FC0B932947f4 | https://api.testnet.evm.eosnetwork.com/ | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I deployed coinflip with the new provider address |
||
|
||
You will also need the private key of a wallet with some gas tokens for your chosen network. | ||
Then, from the `coin_flip/app` directory, run the following command: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,7 +106,7 @@ async function main() { | |
// Note that there is a potential race condition here: the server may not have observed the request ^ | ||
// before this HTTP response. Hence, we retry fetching the url a couple of times. | ||
const response = await fetchWithRetry(url, 3); | ||
const providerRandom = web3.utils.bytesToHex(response.value); | ||
const providerRandom = `0x${response.value.data}`; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. adjust example since this PR changed the API #1129 |
||
console.log(` number : ${providerRandom}`); | ||
|
||
console.log("4. Revealing the result of the coin flip..."); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update the default argument values to be more reasonable (and stop pointing to my test wallet)