@pythnetwork/entropy-sdk-solidity
Advanced tools
Comparing version 1.1.0 to 1.1.2
@@ -6,2 +6,52 @@ [ | ||
{ | ||
"indexed": false, | ||
"internalType": "address", | ||
"name": "provider", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint128", | ||
"name": "oldFee", | ||
"type": "uint128" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint128", | ||
"name": "newFee", | ||
"type": "uint128" | ||
} | ||
], | ||
"name": "ProviderFeeUpdated", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": false, | ||
"internalType": "address", | ||
"name": "provider", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes", | ||
"name": "oldUri", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes", | ||
"name": "newUri", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "ProviderUriUpdated", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
@@ -8,0 +58,0 @@ { |
@@ -6,2 +6,52 @@ [ | ||
{ | ||
"indexed": false, | ||
"internalType": "address", | ||
"name": "provider", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint128", | ||
"name": "oldFee", | ||
"type": "uint128" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "uint128", | ||
"name": "newFee", | ||
"type": "uint128" | ||
} | ||
], | ||
"name": "ProviderFeeUpdated", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": false, | ||
"internalType": "address", | ||
"name": "provider", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes", | ||
"name": "oldUri", | ||
"type": "bytes" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes", | ||
"name": "newUri", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "ProviderUriUpdated", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
@@ -517,2 +567,28 @@ { | ||
"internalType": "uint128", | ||
"name": "newFeeInWei", | ||
"type": "uint128" | ||
} | ||
], | ||
"name": "setProviderFee", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes", | ||
"name": "newUri", | ||
"type": "bytes" | ||
} | ||
], | ||
"name": "setProviderUri", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "uint128", | ||
"name": "amount", | ||
@@ -519,0 +595,0 @@ "type": "uint128" |
{ | ||
"name": "@pythnetwork/entropy-sdk-solidity", | ||
"version": "1.1.0", | ||
"version": "1.1.2", | ||
"description": "Generate secure random numbers with Pyth Entropy", | ||
@@ -34,3 +34,3 @@ "repository": { | ||
}, | ||
"gitHead": "7cf742020307445174ec910904912881da97a0cc" | ||
"gitHead": "00e2a024aa9fa030248f76047acfa8792c6ee212" | ||
} |
@@ -7,11 +7,28 @@ # Pyth Entropy Solidity SDK | ||
**WARNING**: The Entropy protocol is currently in testnet. It is **NOT INTENDED** for use in production applications. | ||
Use this protocol at your own risk. | ||
## Install | ||
```shell | ||
####Truffle/Hardhat | ||
If you are using Truffle or Hardhat, simply install the NPM package: | ||
```bash | ||
npm install @pythnetwork/entropy-sdk-solidity | ||
``` | ||
####Foundry | ||
If you are using Foundry, you will need to create an NPM project if you don't already have one. | ||
From the root directory of your project, run: | ||
```bash | ||
npm init -y | ||
npm install @pythnetwork/entropy-sdk-solidity | ||
``` | ||
Then add the following line to your `remappings.txt` file: | ||
```text | ||
@pythnetwork/entropy-sdk-solidity/=node_modules/@pythnetwork/entropy-sdk-solidity | ||
``` | ||
## Setup | ||
@@ -59,7 +76,7 @@ | ||
Fetch the provider's random number from them. | ||
For the provider `0x6CC14824Ea2918f5De5C2f75A9Da968ad4BD6344` you can query the webservice at https://fortuna-staging.pyth.network : | ||
For the provider `0x6CC14824Ea2918f5De5C2f75A9Da968ad4BD6344` you can query the webservice at https://fortuna-staging.dourolabs.app : | ||
```typescript | ||
await axios.get( | ||
`https://fortuna-staging.pyth.network/v1/chains/${chainName}/revelations/${sequenceNumber}` | ||
`https://fortuna-staging.dourolabs.app/v1/chains/${chainName}/revelations/${sequenceNumber}` | ||
); | ||
@@ -66,0 +83,0 @@ ``` |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
34213
940
104
0