Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pythnetwork/entropy-sdk-solidity

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pythnetwork/entropy-sdk-solidity - npm Package Compare versions

Comparing version 0.1.1 to 1.0.0

4

package.json
{
"name": "@pythnetwork/entropy-sdk-solidity",
"version": "0.1.1",
"version": "1.0.0",
"description": "Generate secure random numbers with Pyth Entropy",

@@ -32,3 +32,3 @@ "repository": {

},
"gitHead": "8c35091831b946a0c666345d29aa8506b06cb99c"
"gitHead": "1be8a02b94d2a09e5284da72e57eb0eb3943d3ae"
}

@@ -27,2 +27,3 @@ # Pyth Entropy Solidity SDK

| eos-evm-testnet | 0xD42c7a708E74AD19401D907a14146F006c851Ee3 | 0x6CC14824Ea2918f5De5C2f75A9Da968ad4BD6344 |
| arbitrum-goerli | 0xd9eAcfFB8e80b7193042499485EF8369b08E85B6 | 0x6CC14824Ea2918f5De5C2f75A9Da968ad4BD6344 |
```

@@ -52,6 +53,9 @@

Invoke the `request` method of the `IEntropy` contract:
Invoke the `request` method of the `IEntropy` contract.
The `request` method requires paying a fee in native gas tokens which is configured per-provider.
Use the `getFee` method to calculate the fee and send it as the value of the `request` call:
```solidity
uint64 sequenceNumber = entropy.request(provider, commitment, true)
uint fee = entropy.getFee(provider);
uint64 sequenceNumber = entropy.request{value: fee}(provider, commitment, true);
```

@@ -89,1 +93,6 @@

This method will combine the user and provider's random numbers, along with the blockhash, to construct the final secure random number.
## Example Application
The [Coin Flip](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/examples/coin_flip) example demonstrates how to build a smart contract that
interacts with Pyth Entropy as well as a typescript client for that application.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc