Polygon Sponsored slots available. Book your slot here!
Overview
POL Balance
0 POL
POL Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 307 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Receive Unsealed... | 27787768 | 957 days ago | IN | 0 POL | 0.00343406 | ||||
Receive Sealed S... | 27787739 | 957 days ago | IN | 0 POL | 0.00356577 | ||||
Receive Unsealed... | 27751327 | 958 days ago | IN | 0 POL | 0.00342649 | ||||
Receive Sealed S... | 27751303 | 958 days ago | IN | 0 POL | 0.0035579 | ||||
Receive Sealed S... | 27656100 | 960 days ago | IN | 0 POL | 0.00361284 | ||||
Receive Unsealed... | 27646157 | 960 days ago | IN | 0 POL | 0.00343003 | ||||
Receive Sealed S... | 27646136 | 960 days ago | IN | 0 POL | 0.00356159 | ||||
Receive Unsealed... | 27609554 | 961 days ago | IN | 0 POL | 0.00365562 | ||||
Receive Sealed S... | 27609535 | 961 days ago | IN | 0 POL | 0.00377648 | ||||
Receive Unsealed... | 27586616 | 962 days ago | IN | 0 POL | 0.00353971 | ||||
Receive Sealed S... | 27586592 | 962 days ago | IN | 0 POL | 0.00367549 | ||||
Receive Unsealed... | 27576736 | 962 days ago | IN | 0 POL | 0.00365846 | ||||
Receive Sealed S... | 27576712 | 962 days ago | IN | 0 POL | 0.00383794 | ||||
Receive Unsealed... | 27563860 | 962 days ago | IN | 0 POL | 0.00379468 | ||||
Receive Sealed S... | 27563837 | 962 days ago | IN | 0 POL | 0.00398509 | ||||
Receive Unsealed... | 27554024 | 963 days ago | IN | 0 POL | 0.0128182 | ||||
Receive Sealed S... | 27553999 | 963 days ago | IN | 0 POL | 0.01547153 | ||||
Receive Unsealed... | 27534622 | 963 days ago | IN | 0 POL | 0.00399708 | ||||
Receive Sealed S... | 27534598 | 963 days ago | IN | 0 POL | 0.00383955 | ||||
Receive Unsealed... | 27531265 | 963 days ago | IN | 0 POL | 0.0034476 | ||||
Receive Sealed S... | 27531232 | 963 days ago | IN | 0 POL | 0.00367549 | ||||
Receive Unsealed... | 27524738 | 963 days ago | IN | 0 POL | 0.00342848 | ||||
Receive Sealed S... | 27524712 | 963 days ago | IN | 0 POL | 0.00355997 | ||||
Receive Unsealed... | 27515163 | 964 days ago | IN | 0 POL | 0.00349348 | ||||
Receive Sealed S... | 27515152 | 964 days ago | IN | 0 POL | 0.00356104 |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xB63663de...077199F32 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
SummitTrustedSeederRNGModule
Compiler Version
v0.8.2+commit.661d1103
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity 0.8.2; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/ISummitRNGModule.sol"; /* --------------------------------------------------------------------------------------------- -- S U M M I T . D E F I --------------------------------------------------------------------------------------------- Summit is highly experimental. It has been crafted to bring a new flavor to the defi world. We hope you enjoy the Summit.defi experience. If you find any bugs in these contracts, please claim the bounty (see docs) Created with love by Architect and the Summit team --------------------------------------------------------------------------------------------- -- C U S T O M V R F --------------------------------------------------------------------------------------------- It is also responsible for requesting and receiving the trusted seeds, as well as their decrypted versions after the future block is mined RANDOM NUMBER GENERATION . Webservice queries `nextSeedRoundAvailable` every 5 seconds . When true received . Webservice creates a random seed, seals it with the trustedSeeder address, and sends it to `receiveSealedSeed` . When the futureBlockNumber set in `receiveSealedSeed` is mined, `futureBlockMined` will return true . Webservice sends the original unsealed seed to `receiveUnsealedSeed` */ contract SummitTrustedSeederRNGModule is Ownable, ISummitRNGModule { // --------------------------------------- // -- V A R I A B L E S // --------------------------------------- address public cartographer; // Allows cartographer to act as secondary owner-ish address public trustedSeeder; // Submits trusted sealed seed when round locks 60 before round end address public elevationHelper; // ElevationHelper address uint256 constant baseRoundDuration = 3600; // Duration (seconds) of the smallest round chunk uint256 public seedRoundEndTimestamp; // Timestamp the first seed round ends uint256 constant seedRoundDurationMult = 1; uint256 public seedRound = 0; // The sealed seed is generated at the top of every hour mapping(uint256 => bytes32) sealedSeed; // Sealed seed for each seed round, provided by trusted seeder webservice mapping(uint256 => bytes32) unsealedSeed; // Sealed seed for each seed round, provided by trusted seeder webservice mapping(uint256 => uint256) futureBlockNumber; // Future block number for each seed round mapping(uint256 => bytes32) futureBlockHash; // Future block hash for each seed round event SetElevationHelper(address _elevationHelper); event SetTrustedSeederAdd(address _trustedSeeder); event SetSeedRoundEndTimestamp(uint256 _seedRoundEndTimestamp); // --------------------------------------- // -- M O D I F I E R S // --------------------------------------- modifier onlyCartographer() { require(msg.sender == cartographer, "Only cartographer"); _; } modifier onlyElevationHelper() { require(msg.sender != address(0), "ElevationHelper not defined"); require(msg.sender == elevationHelper, "Only elevationHelper"); _; } modifier onlyTrustedSeeder() { require(msg.sender == trustedSeeder, "Only trusted seeder"); _; } // --------------------------------------- // -- I N I T I A L I Z A T I O N // --------------------------------------- /// @dev Creates SummitRandomnessModule contract with cartographer as owner of certain functionality /// @param _cartographer Address of main Cartographer contract constructor(address _cartographer) { require(_cartographer != address(0), "Cartographer missing"); cartographer = _cartographer; } /// @dev Set elevationHelper /// @param _elevationHelper Address of ElevationHelper contract function setElevationHelper(address _elevationHelper) public onlyOwner { require(_elevationHelper != address(0), "ElevationHelper missing"); elevationHelper = _elevationHelper; emit SetElevationHelper(_elevationHelper); } /// @dev Update trusted seeder /// @param _trustedSeeder Address of trustedSeeder function setTrustedSeederAdd(address _trustedSeeder) public onlyOwner { require(_trustedSeeder != address(0), "Trusted seeder missing"); trustedSeeder = _trustedSeeder; emit SetTrustedSeederAdd(_trustedSeeder); } /// @dev Update seedRoundEndTimestamp /// @param _seedRoundEndTimestamp amount of seedRoundEndTimestamp function setSeedRoundEndTimestamp(uint256 _seedRoundEndTimestamp) public override onlyElevationHelper { seedRoundEndTimestamp = _seedRoundEndTimestamp; emit SetSeedRoundEndTimestamp(_seedRoundEndTimestamp); } // ------------------------------------------------------------------ // -- R A N D O M N E S S S E E D I N G // ------------------------------------------------------------------ // Flow of seeding: // Webservice queries `nextSeedRoundAvailable` every 5 seconds // When true received // Webservice creates a random seed, seals it with the trustedSeeder address, and sends it to `receiveSealedSeed` // When the futureBlockNumber set in `receiveSealedSeed` is mined, `futureBlockMined` will return true // Webservice sends the original unsealed seed to `receiveUnsealedSeed` /// @dev Whether the future block has been mined, allowing the unencrypted seed to be received function futureBlockMined() public view returns (bool) { return sealedSeed[seedRound] != "" && block.number > futureBlockNumber[seedRound] && unsealedSeed[seedRound] == ""; } /// @dev Seed round locked function nextSeedRoundAvailable() public view returns (bool) { return block.timestamp >= seedRoundEndTimestamp; } /// @dev Get random number 0-99 inclusive function getRandomNumber(uint8 elevation, uint256 roundNumber) public view override returns (uint256) { return uint256(keccak256(abi.encode(elevation, roundNumber, unsealedSeed[seedRound], futureBlockHash[seedRound]))) % 100; } /// @dev When an elevation reaches the lockout phase 60s before rollover, the sealedseed webserver will send a seed /// If the webserver goes down (99.99% uptime, 3 outages of 1H each over 3 years) the randomness is still secure, and is only vulnerable to a single round of withheld block attack /// @param _sealedSeed random.org backed sealed seed from the trusted address, run by an autonomous webserver function receiveSealedSeed(bytes32 _sealedSeed) public onlyTrustedSeeder { require(nextSeedRoundAvailable(), "Already sealed seeded"); // Increment seed round and set next seed round end timestamp seedRound += 1; seedRoundEndTimestamp += (baseRoundDuration * seedRoundDurationMult); // Store new sealed seed for next round of round rollovers sealedSeed[seedRound] = _sealedSeed; futureBlockNumber[seedRound] = block.number + 1; } /// @dev Receives the unencrypted seed after the future block has been mined /// @param _unsealedSeed Unencrypted seed function receiveUnsealedSeed(bytes32 _unsealedSeed) public onlyTrustedSeeder { require(unsealedSeed[seedRound] == "", "Already unsealed seeded"); require(futureBlockMined(), "Future block not reached"); require(keccak256(abi.encodePacked(_unsealedSeed, msg.sender)) == sealedSeed[seedRound], "Unsealed seed does not match"); unsealedSeed[seedRound] = _unsealedSeed; futureBlockHash[seedRound] = blockhash(futureBlockNumber[seedRound]); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
//SPDX-License-Identifier: MIT pragma solidity 0.8.2; interface ISummitRNGModule { function getRandomNumber(uint8 elevation, uint256 roundNumber) external view returns (uint256); function setSeedRoundEndTimestamp(uint256 _seedRoundEndTimestamp) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_cartographer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_elevationHelper","type":"address"}],"name":"SetElevationHelper","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_seedRoundEndTimestamp","type":"uint256"}],"name":"SetSeedRoundEndTimestamp","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_trustedSeeder","type":"address"}],"name":"SetTrustedSeederAdd","type":"event"},{"inputs":[],"name":"cartographer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"elevationHelper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"futureBlockMined","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"elevation","type":"uint8"},{"internalType":"uint256","name":"roundNumber","type":"uint256"}],"name":"getRandomNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextSeedRoundAvailable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_sealedSeed","type":"bytes32"}],"name":"receiveSealedSeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_unsealedSeed","type":"bytes32"}],"name":"receiveUnsealedSeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seedRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"seedRoundEndTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_elevationHelper","type":"address"}],"name":"setElevationHelper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_seedRoundEndTimestamp","type":"uint256"}],"name":"setSeedRoundEndTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_trustedSeeder","type":"address"}],"name":"setTrustedSeederAdd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"trustedSeeder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101005760003560e01c806395a2f00111610097578063d0d4f80211610066578063d0d4f802146101f8578063dd26047b14610201578063f2fde38b14610214578063ff8e60f41461022757610100565b806395a2f001146101b7578063a54777f1146101ca578063bb1569fd146101dd578063bea6e36c146101f057610100565b806370a59420116100d357806370a5942014610174578063715018a6146101875780638a2c32fa1461018f5780638da5cb5b146101a657610100565b806351d20ef1146101055780635ae08fd51461011a578063647aba30146101365780636d6c36e814610161575b600080fd5b610118610113366004610975565b61023a565b005b61012360055481565b6040519081526020015b60405180910390f35b600154610149906001600160a01b031681565b6040516001600160a01b03909116815260200161012d565b61011861016f36600461099c565b610311565b610118610182366004610975565b61041b565b6101186104e9565b6004544210155b604051901515815260200161012d565b6000546001600160a01b0316610149565b6101186101c536600461099c565b61051f565b6101236101d83660046109b4565b6106fd565b600354610149906001600160a01b031681565b610196610767565b61012360045481565b61011861020f36600461099c565b6107b7565b610118610222366004610975565b61088a565b600254610149906001600160a01b031681565b6000546001600160a01b0316331461026d5760405162461bcd60e51b8152600401610264906109e4565b60405180910390fd5b6001600160a01b0381166102bc5760405162461bcd60e51b81526020600482015260166024820152755472757374656420736565646572206d697373696e6760501b6044820152606401610264565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fe655ca10bfa0c8add6bf94a833754468e20c505658dedcb591a7a3da22850369906020015b60405180910390a150565b6002546001600160a01b031633146103615760405162461bcd60e51b815260206004820152601360248201527227b7363c903a393ab9ba32b21039b2b2b232b960691b6044820152606401610264565b6004544210156103ab5760405162461bcd60e51b8152602060048201526015602482015274105b1c9958591e481cd9585b1959081cd959591959605a1b6044820152606401610264565b6001600560008282546103be9190610a19565b909155506103d190506001610e10610a31565b600460008282546103e29190610a19565b90915550506005546000908152600660205260409020819055610406436001610a19565b60055460009081526008602052604090205550565b6000546001600160a01b031633146104455760405162461bcd60e51b8152600401610264906109e4565b6001600160a01b03811661049b5760405162461bcd60e51b815260206004820152601760248201527f456c65766174696f6e48656c706572206d697373696e670000000000000000006044820152606401610264565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527ffe2a5b74ebf7b94571eaf0ce34f49547205a22baec45785820c8ae65ec3b173190602001610306565b6000546001600160a01b031633146105135760405162461bcd60e51b8152600401610264906109e4565b61051d6000610925565b565b6002546001600160a01b0316331461056f5760405162461bcd60e51b815260206004820152601360248201527227b7363c903a393ab9ba32b21039b2b2b232b960691b6044820152606401610264565b600554600090815260076020526040902054156105ce5760405162461bcd60e51b815260206004820152601760248201527f416c726561647920756e7365616c6564207365656465640000000000000000006044820152606401610264565b6105d6610767565b6106225760405162461bcd60e51b815260206004820152601860248201527f46757475726520626c6f636b206e6f74207265616368656400000000000000006044820152606401610264565b60066000600554815260200190815260200160002054813360405160200161066692919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b60405160208183030381529060405280519060200120146106c95760405162461bcd60e51b815260206004820152601c60248201527f556e7365616c6564207365656420646f6573206e6f74206d61746368000000006044820152606401610264565b6005805460009081526007602090815260408083209490945591548152600882528281205460099092529190912090409055565b6005546000908152600760209081526040808320546009835281842054825160ff8816948101949094529183018590526060830152608082015260649060a0016040516020818303038152906040528051906020012060001c6107609190610a50565b9392505050565b60055460009081526006602052604081205415801590610797575060055460009081526008602052604090205443115b80156107b25750600554600090815260076020526040902054155b905090565b336108045760405162461bcd60e51b815260206004820152601b60248201527f456c65766174696f6e48656c706572206e6f7420646566696e656400000000006044820152606401610264565b6003546001600160a01b031633146108555760405162461bcd60e51b815260206004820152601460248201527327b7363c9032b632bb30ba34b7b72432b63832b960611b6044820152606401610264565b60048190556040518181527f51038222da0b115d905a8bcdf0e8e08ddad9a57d37cc90a03fcd33d55c10c4a290602001610306565b6000546001600160a01b031633146108b45760405162461bcd60e51b8152600401610264906109e4565b6001600160a01b0381166109195760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610264565b61092281610925565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215610986578081fd5b81356001600160a01b0381168114610760578182fd5b6000602082840312156109ad578081fd5b5035919050565b600080604083850312156109c6578081fd5b823560ff811681146109d6578182fd5b946020939093013593505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115610a2c57610a2c610a70565b500190565b6000816000190483118215151615610a4b57610a4b610a70565b500290565b600082610a6b57634e487b7160e01b81526012600452602481fd5b500690565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220f95f5a4a075b548ffb1db2ac92ff35ddb5f1a1e2e957147671cb5bc2673c306064736f6c63430008020033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.