Skip to content
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 Solidity SDK & usage example #1124

Merged
merged 9 commits into from
Oct 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ok
  • Loading branch information
jayantk committed Oct 24, 2023
commit dea60db6846f6933213a3e747ea3c0c9d6f970c9
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ contract CoinFlip {
event FlipResult(bool isHeads);

IEntropy private entropy;
address entropyProvider;
address private entropyProvider;
mapping(uint64 => address) private requestedFlips;

constructor(address _entropy, address _entropyProvider) {
Expand Down Expand Up @@ -59,16 +59,9 @@ contract CoinFlip {

// Reinitialize the parameters of this contract.
// (This function is for demo purposes only. You wouldn't include this on a real contract.)
function reinitialize(
bytes32 _baseTokenPriceId,
bytes32 _quoteTokenPriceId,
address _baseToken,
address _quoteToken
) external {
baseTokenPriceId = _baseTokenPriceId;
quoteTokenPriceId = _quoteTokenPriceId;
baseToken = ERC20(_baseToken);
quoteToken = ERC20(_quoteToken);
function reinitialize(address _entropy, address _entropyProvider) {
entropy = IEntropy(_entropy);
entropyProvider = _entropyProvider;
}

receive() external payable {}
Expand Down