@pythnetwork/entropy-sdk-solidity
Advanced tools
Comparing version 1.1.3 to 1.2.0
@@ -24,2 +24,7 @@ [ | ||
"inputs": [], | ||
"name": "InvalidRevealCall", | ||
"type": "error" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "InvalidUpgradeMagic", | ||
@@ -26,0 +31,0 @@ "type": "error" |
@@ -156,2 +156,7 @@ [ | ||
"type": "bool" | ||
}, | ||
{ | ||
"internalType": "bool", | ||
"name": "isRequestWithCallback", | ||
"type": "bool" | ||
} | ||
@@ -172,2 +177,26 @@ ], | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "provider", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "requestor", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "uint64", | ||
"name": "sequenceNumber", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes32", | ||
"name": "userRandomNumber", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"components": [ | ||
@@ -208,2 +237,7 @@ { | ||
"type": "bool" | ||
}, | ||
{ | ||
"internalType": "bool", | ||
"name": "isRequestWithCallback", | ||
"type": "bool" | ||
} | ||
@@ -215,2 +249,57 @@ ], | ||
"type": "tuple" | ||
} | ||
], | ||
"name": "RequestedWithCallback", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "address", | ||
"name": "provider", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "sequenceNumber", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"internalType": "uint32", | ||
"name": "numHashes", | ||
"type": "uint32" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "commitment", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "blockNumber", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "requester", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "bool", | ||
"name": "useBlockhash", | ||
"type": "bool" | ||
}, | ||
{ | ||
"internalType": "bool", | ||
"name": "isRequestWithCallback", | ||
"type": "bool" | ||
} | ||
], | ||
"indexed": false, | ||
"internalType": "struct EntropyStructs.Request", | ||
"name": "request", | ||
"type": "tuple" | ||
}, | ||
@@ -244,3 +333,76 @@ { | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "address", | ||
"name": "provider", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "sequenceNumber", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"internalType": "uint32", | ||
"name": "numHashes", | ||
"type": "uint32" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "commitment", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "blockNumber", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "requester", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "bool", | ||
"name": "useBlockhash", | ||
"type": "bool" | ||
}, | ||
{ | ||
"internalType": "bool", | ||
"name": "isRequestWithCallback", | ||
"type": "bool" | ||
} | ||
], | ||
"indexed": false, | ||
"internalType": "struct EntropyStructs.Request", | ||
"name": "request", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes32", | ||
"name": "userRandomNumber", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes32", | ||
"name": "providerRevelation", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes32", | ||
"name": "randomNumber", | ||
"type": "bytes32" | ||
} | ||
], | ||
"name": "RevealedWithCallback", | ||
"type": "event" | ||
} | ||
] |
@@ -156,2 +156,7 @@ [ | ||
"type": "bool" | ||
}, | ||
{ | ||
"internalType": "bool", | ||
"name": "isRequestWithCallback", | ||
"type": "bool" | ||
} | ||
@@ -172,2 +177,26 @@ ], | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "provider", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "requestor", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "uint64", | ||
"name": "sequenceNumber", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes32", | ||
"name": "userRandomNumber", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"components": [ | ||
@@ -208,2 +237,7 @@ { | ||
"type": "bool" | ||
}, | ||
{ | ||
"internalType": "bool", | ||
"name": "isRequestWithCallback", | ||
"type": "bool" | ||
} | ||
@@ -215,2 +249,57 @@ ], | ||
"type": "tuple" | ||
} | ||
], | ||
"name": "RequestedWithCallback", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "address", | ||
"name": "provider", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "sequenceNumber", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"internalType": "uint32", | ||
"name": "numHashes", | ||
"type": "uint32" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "commitment", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "blockNumber", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "requester", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "bool", | ||
"name": "useBlockhash", | ||
"type": "bool" | ||
}, | ||
{ | ||
"internalType": "bool", | ||
"name": "isRequestWithCallback", | ||
"type": "bool" | ||
} | ||
], | ||
"indexed": false, | ||
"internalType": "struct EntropyStructs.Request", | ||
"name": "request", | ||
"type": "tuple" | ||
}, | ||
@@ -246,5 +335,78 @@ { | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"components": [ | ||
{ | ||
"internalType": "address", | ||
"name": "provider", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "sequenceNumber", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"internalType": "uint32", | ||
"name": "numHashes", | ||
"type": "uint32" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "commitment", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "blockNumber", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "requester", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "bool", | ||
"name": "useBlockhash", | ||
"type": "bool" | ||
}, | ||
{ | ||
"internalType": "bool", | ||
"name": "isRequestWithCallback", | ||
"type": "bool" | ||
} | ||
], | ||
"indexed": false, | ||
"internalType": "struct EntropyStructs.Request", | ||
"name": "request", | ||
"type": "tuple" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes32", | ||
"name": "userRandomNumber", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes32", | ||
"name": "providerRevelation", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"indexed": false, | ||
"internalType": "bytes32", | ||
"name": "randomNumber", | ||
"type": "bytes32" | ||
} | ||
], | ||
"name": "RevealedWithCallback", | ||
"type": "event" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "bytes32", | ||
"name": "userRandomness", | ||
@@ -461,2 +623,7 @@ "type": "bytes32" | ||
"type": "bool" | ||
}, | ||
{ | ||
"internalType": "bool", | ||
"name": "isRequestWithCallback", | ||
"type": "bool" | ||
} | ||
@@ -542,3 +709,27 @@ ], | ||
{ | ||
"internalType": "bytes32", | ||
"name": "userRandomNumber", | ||
"type": "bytes32" | ||
} | ||
], | ||
"name": "requestWithCallback", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint64", | ||
"name": "assignedSequenceNumber", | ||
"type": "uint64" | ||
} | ||
], | ||
"stateMutability": "payable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "provider", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "sequenceNumber", | ||
@@ -549,3 +740,3 @@ "type": "uint64" | ||
"internalType": "bytes32", | ||
"name": "userRandomness", | ||
"name": "userRevelation", | ||
"type": "bytes32" | ||
@@ -573,2 +764,30 @@ }, | ||
{ | ||
"internalType": "address", | ||
"name": "provider", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint64", | ||
"name": "sequenceNumber", | ||
"type": "uint64" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "userRandomNumber", | ||
"type": "bytes32" | ||
}, | ||
{ | ||
"internalType": "bytes32", | ||
"name": "providerRevelation", | ||
"type": "bytes32" | ||
} | ||
], | ||
"name": "revealWithCallback", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "uint128", | ||
@@ -575,0 +794,0 @@ "name": "newFeeInWei", |
{ | ||
"name": "@pythnetwork/entropy-sdk-solidity", | ||
"version": "1.1.3", | ||
"version": "1.2.0", | ||
"description": "Generate secure random numbers with Pyth Entropy", | ||
@@ -15,3 +15,3 @@ "repository": { | ||
"format": "npx prettier --write .", | ||
"generate-abi": "node scripts/generateAbi.js", | ||
"generate-abi": "npx generate-abis IEntropy IEntropyConsumer EntropyErrors EntropyEvents EntropyStructs", | ||
"check-abi": "git diff --exit-code abis" | ||
@@ -31,7 +31,7 @@ }, | ||
"devDependencies": { | ||
"abi_generator": "*", | ||
"prettier": "^2.7.1", | ||
"prettier-plugin-solidity": "^1.0.0-rc.1", | ||
"solc": "^0.8.15" | ||
"prettier-plugin-solidity": "^1.0.0-rc.1" | ||
}, | ||
"gitHead": "0d49986eb1cd77c969059bcb72857e90ba8ae4f8" | ||
"gitHead": "f14dd35d1abe0dc5e35752db4a77f4781d0a5c83" | ||
} |
@@ -102,3 +102,3 @@ # Pyth Entropy Solidity SDK | ||
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 | ||
The [Coin Flip](/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
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
46349
13
1301
0