Source Code
Overview
S Balance
S Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Update Whitelist | 57419321 | 47 days ago | IN | 0 S | 0.00259253 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xAAa87DD5...2608E1EbA The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
RugletteSync
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 1000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;
/// @title RugletteSync
/// @author Stinky
/// @notice Contract for synchronizing ruglette events across chains
/// @dev Emits events that can be indexed by off-chain services
contract RugletteSync {
/// @notice Mapping of whitelisted contract addresses
mapping (address => bool) public contractWhitelist;
// Custom Errors
/// @notice Thrown when caller is not whitelisted
error NotWhitelistedAddress();
// Events
/// @notice Emitted when a user enters a lobby
/// @param pool The address of the pool
/// @param minter The address of the user entering
event LobbyEntry(address indexed pool, address indexed minter);
/// @notice Emitted when a new lobby is created
/// @param pool The address of the pool
/// @param id The ID of the lobby
/// @param token The address of the token
/// @param creator The address of the creator
event NewLobby(address indexed pool, uint256 indexed id, address token, address indexed creator);
/// @notice Emitted when entry fees are paid
/// @param pool The address of the pool
/// @param protocolFee The fee paid to the protocol
event EntryFees(address indexed pool, uint256 indexed protocolFee);
/// @notice Emitted when results are generated
/// @param pool The address of the pool
/// @param rugger The addresses of the losers
/// @param prizeShare The share of the prize per winner
event Results(address indexed pool, address[] indexed rugger, uint256 prizeShare);
/// @notice Emitted when fees are updated
/// @param creationFee The fee for creating a lobby
/// @param protocolFee The fee paid to the protocol
event UpdatedFees(uint256 indexed creationFee, uint256 indexed protocolFee);
/// @notice Emitted when ranges are updated
/// @param minEntry The minimum entries
/// @param maxEntry The maximum entries
/// @param minLosers The minimum losers
/// @param maxLosers The maximum losers
event UpdatedRanges(uint16 minEntry, uint16 maxEntry, uint16 minLosers, uint16 maxLosers);
// Modifiers
/// @notice Restricts function to whitelisted addresses only
modifier onlyWhitelisted {
if(!contractWhitelist[msg.sender]) { revert NotWhitelistedAddress(); }
_;
}
/// @notice Constructor that whitelists the deployer
constructor() {
contractWhitelist[msg.sender] = true;
}
/// @notice Emit event when a user enters a lobby
/// @param pool The address of the pool
/// @param minter The address of the user entering
function lobbyEntry(address pool, address minter) external onlyWhitelisted {
emit LobbyEntry(pool, minter);
}
/// @notice Emit event when a new lobby is created
/// @param pool The address of the pool
/// @param id The ID of the lobby
/// @param token The address of the token
/// @param creator The address of the creator
function newLobby(address pool, uint256 id, address token, address creator) external onlyWhitelisted {
emit NewLobby(pool, id, token, creator);
}
/// @notice Emit event when entry fees are paid
/// @param pool The address of the pool
/// @param protocolFee The fee paid to the protocol
function entryFees(address pool, uint256 protocolFee) external onlyWhitelisted {
emit EntryFees(pool, protocolFee);
}
/// @notice Emit event when results are generated
/// @param pool The address of the pool
/// @param losers The addresses of the losers
/// @param prizeShare The share of the prize per winner
function results(address pool, address[] calldata losers, uint256 prizeShare) external onlyWhitelisted {
emit Results(pool, losers, prizeShare);
}
/// @notice Emit event when fees are updated
/// @param creationFee The fee for creating a lobby
/// @param protocolFee The fee paid to the protocol
function updatedFees(uint256 creationFee, uint256 protocolFee) external onlyWhitelisted {
emit UpdatedFees(creationFee, protocolFee);
}
/// @notice Emit event when ranges are updated
/// @param entries The minimum and maximum entries
/// @param losers The minimum and maximum losers
function updatedRanges(uint16[2] calldata entries, uint16[2] calldata losers) external onlyWhitelisted {
emit UpdatedRanges(entries[0], entries[1], losers[0], losers[1]);
}
/// @notice Update what address can/can't call this Sync
/// @param addressList List of addresses to modify
/// @param action The action to set the addresses (true to whitelist, false to remove)
function updateWhitelist(address[] calldata addressList, bool action) external onlyWhitelisted {
uint256 length = addressList.length;
for (uint256 i; i < length;) {
contractWhitelist[addressList[i]] = action;
unchecked { ++i; }
}
}
}{
"evmVersion": "paris",
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 1000
},
"remappings": [],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NotWhitelistedAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":true,"internalType":"uint256","name":"protocolFee","type":"uint256"}],"name":"EntryFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":true,"internalType":"address","name":"minter","type":"address"}],"name":"LobbyEntry","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"creator","type":"address"}],"name":"NewLobby","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":true,"internalType":"address[]","name":"rugger","type":"address[]"},{"indexed":false,"internalType":"uint256","name":"prizeShare","type":"uint256"}],"name":"Results","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"creationFee","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"protocolFee","type":"uint256"}],"name":"UpdatedFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"minEntry","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"maxEntry","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"minLosers","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"maxLosers","type":"uint16"}],"name":"UpdatedRanges","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"contractWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"protocolFee","type":"uint256"}],"name":"entryFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"minter","type":"address"}],"name":"lobbyEntry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"creator","type":"address"}],"name":"newLobby","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"address[]","name":"losers","type":"address[]"},{"internalType":"uint256","name":"prizeShare","type":"uint256"}],"name":"results","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addressList","type":"address[]"},{"internalType":"bool","name":"action","type":"bool"}],"name":"updateWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"creationFee","type":"uint256"},{"internalType":"uint256","name":"protocolFee","type":"uint256"}],"name":"updatedFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16[2]","name":"entries","type":"uint16[2]"},{"internalType":"uint16[2]","name":"losers","type":"uint16[2]"}],"name":"updatedRanges","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x608060405234801561001057600080fd5b50336000908152602081905260409020805460ff1916600117905561080a8061003a6000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063728155321161005b57806372815532146100ff5780638fbce55a14610112578063aff177ca14610125578063b6219aa11461013857600080fd5b806318a6f6ae1461008d5780634c999f5e146100a257806357b8f187146100d95780636904db72146100ec575b600080fd5b6100a061009b36600461055a565b61014b565b005b6100c56100b03660046105b4565b60006020819052908152604090205460ff1681565b604051901515815260200160405180910390f35b6100a06100e73660046105d6565b6101dc565b6100a06100fa366004610609565b610250565b6100a061010d366004610642565b6102b1565b6100a061012036600461066e565b61036e565b6100a06101333660046106bb565b6103ea565b6100a0610146366004610717565b610488565b3360009081526020819052604090205460ff1661017b576040516306663d4360e41b815260040160405180910390fd5b828260405161018b929190610741565b6040518091039020846001600160a01b03167f0b2ff27967cae0b68afab62314706be397f53804542d9c989a98fb59828d9a4a836040516101ce91815260200190565b60405180910390a350505050565b3360009081526020819052604090205460ff1661020c576040516306663d4360e41b815260040160405180910390fd5b806001600160a01b0316826001600160a01b03167f0a01fe8572f752b986d06dfbb98a13bb545664880b8bbb5c8bc073e490d02eb960405160405180910390a35050565b3360009081526020819052604090205460ff16610280576040516306663d4360e41b815260040160405180910390fd5b604051819083907f4d32f38862d5eb71edfefb7955873bd55920dc98159b6f53f8be62fbf0bebb4b90600090a35050565b3360009081526020819052604090205460ff166102e1576040516306663d4360e41b815260040160405180910390fd5b7fa16249828f309c5770ac5b6c8c9ed006922e0854258f0107d60791509c23d44661030f60208401846107b0565b61031f60408501602086016107b0565b61032c60208501856107b0565b61033c60408601602087016107b0565b6040805161ffff9586168152938516602085015291841683830152909216606082015290519081900360800190a15050565b3360009081526020819052604090205460ff1661039e576040516306663d4360e41b815260040160405180910390fd5b6040516001600160a01b0383811682528083169185918716907f8ce9c4b074062508c731c41f778cbd7cc0b55911be632440651b0514b6ab7a2b9060200160405180910390a450505050565b3360009081526020819052604090205460ff1661041a576040516306663d4360e41b815260040160405180910390fd5b8160005b81811015610481578260008087878581811061043c5761043c610781565b905060200201602081019061045191906105b4565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905560010161041e565b5050505050565b3360009081526020819052604090205460ff166104b8576040516306663d4360e41b815260040160405180910390fd5b60405181906001600160a01b038416907ffc178b8ec3ec8e0d1804581d6b1a54c4476e96efd489237c555c0c1fdb07232190600090a35050565b80356001600160a01b038116811461050957600080fd5b919050565b60008083601f84011261052057600080fd5b50813567ffffffffffffffff81111561053857600080fd5b6020830191508360208260051b850101111561055357600080fd5b9250929050565b6000806000806060858703121561057057600080fd5b610579856104f2565b9350602085013567ffffffffffffffff81111561059557600080fd5b6105a18782880161050e565b9598909750949560400135949350505050565b6000602082840312156105c657600080fd5b6105cf826104f2565b9392505050565b600080604083850312156105e957600080fd5b6105f2836104f2565b9150610600602084016104f2565b90509250929050565b6000806040838503121561061c57600080fd5b50508035926020909101359150565b806040810183101561063c57600080fd5b92915050565b6000806080838503121561065557600080fd5b61065f848461062b565b9150610600846040850161062b565b6000806000806080858703121561068457600080fd5b61068d856104f2565b9350602085013592506106a2604086016104f2565b91506106b0606086016104f2565b905092959194509250565b6000806000604084860312156106d057600080fd5b833567ffffffffffffffff8111156106e757600080fd5b6106f38682870161050e565b9094509250506020840135801515811461070c57600080fd5b809150509250925092565b6000806040838503121561072a57600080fd5b610733836104f2565b946020939093013593505050565b60008184825b85811015610776576001600160a01b03610760836104f2565b1683526020928301929190910190600101610747565b509095945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156107c257600080fd5b813561ffff811681146105cf57600080fdfea264697066735822122042ae8e7f6286de0c97c9b016d1514e68536a52ec7a368f0fcbf83cbe20a9b94664736f6c63430008180033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063728155321161005b57806372815532146100ff5780638fbce55a14610112578063aff177ca14610125578063b6219aa11461013857600080fd5b806318a6f6ae1461008d5780634c999f5e146100a257806357b8f187146100d95780636904db72146100ec575b600080fd5b6100a061009b36600461055a565b61014b565b005b6100c56100b03660046105b4565b60006020819052908152604090205460ff1681565b604051901515815260200160405180910390f35b6100a06100e73660046105d6565b6101dc565b6100a06100fa366004610609565b610250565b6100a061010d366004610642565b6102b1565b6100a061012036600461066e565b61036e565b6100a06101333660046106bb565b6103ea565b6100a0610146366004610717565b610488565b3360009081526020819052604090205460ff1661017b576040516306663d4360e41b815260040160405180910390fd5b828260405161018b929190610741565b6040518091039020846001600160a01b03167f0b2ff27967cae0b68afab62314706be397f53804542d9c989a98fb59828d9a4a836040516101ce91815260200190565b60405180910390a350505050565b3360009081526020819052604090205460ff1661020c576040516306663d4360e41b815260040160405180910390fd5b806001600160a01b0316826001600160a01b03167f0a01fe8572f752b986d06dfbb98a13bb545664880b8bbb5c8bc073e490d02eb960405160405180910390a35050565b3360009081526020819052604090205460ff16610280576040516306663d4360e41b815260040160405180910390fd5b604051819083907f4d32f38862d5eb71edfefb7955873bd55920dc98159b6f53f8be62fbf0bebb4b90600090a35050565b3360009081526020819052604090205460ff166102e1576040516306663d4360e41b815260040160405180910390fd5b7fa16249828f309c5770ac5b6c8c9ed006922e0854258f0107d60791509c23d44661030f60208401846107b0565b61031f60408501602086016107b0565b61032c60208501856107b0565b61033c60408601602087016107b0565b6040805161ffff9586168152938516602085015291841683830152909216606082015290519081900360800190a15050565b3360009081526020819052604090205460ff1661039e576040516306663d4360e41b815260040160405180910390fd5b6040516001600160a01b0383811682528083169185918716907f8ce9c4b074062508c731c41f778cbd7cc0b55911be632440651b0514b6ab7a2b9060200160405180910390a450505050565b3360009081526020819052604090205460ff1661041a576040516306663d4360e41b815260040160405180910390fd5b8160005b81811015610481578260008087878581811061043c5761043c610781565b905060200201602081019061045191906105b4565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905560010161041e565b5050505050565b3360009081526020819052604090205460ff166104b8576040516306663d4360e41b815260040160405180910390fd5b60405181906001600160a01b038416907ffc178b8ec3ec8e0d1804581d6b1a54c4476e96efd489237c555c0c1fdb07232190600090a35050565b80356001600160a01b038116811461050957600080fd5b919050565b60008083601f84011261052057600080fd5b50813567ffffffffffffffff81111561053857600080fd5b6020830191508360208260051b850101111561055357600080fd5b9250929050565b6000806000806060858703121561057057600080fd5b610579856104f2565b9350602085013567ffffffffffffffff81111561059557600080fd5b6105a18782880161050e565b9598909750949560400135949350505050565b6000602082840312156105c657600080fd5b6105cf826104f2565b9392505050565b600080604083850312156105e957600080fd5b6105f2836104f2565b9150610600602084016104f2565b90509250929050565b6000806040838503121561061c57600080fd5b50508035926020909101359150565b806040810183101561063c57600080fd5b92915050565b6000806080838503121561065557600080fd5b61065f848461062b565b9150610600846040850161062b565b6000806000806080858703121561068457600080fd5b61068d856104f2565b9350602085013592506106a2604086016104f2565b91506106b0606086016104f2565b905092959194509250565b6000806000604084860312156106d057600080fd5b833567ffffffffffffffff8111156106e757600080fd5b6106f38682870161050e565b9094509250506020840135801515811461070c57600080fd5b809150509250925092565b6000806040838503121561072a57600080fd5b610733836104f2565b946020939093013593505050565b60008184825b85811015610776576001600160a01b03610760836104f2565b1683526020928301929190910190600101610747565b509095945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000602082840312156107c257600080fd5b813561ffff811681146105cf57600080fdfea264697066735822122042ae8e7f6286de0c97c9b016d1514e68536a52ec7a368f0fcbf83cbe20a9b94664736f6c63430008180033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in S
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.