🤖Core
Overview
The Core smart contract is the central component of a decentralized application (DApp) ecosystem that manages tariffs, partners, games, stakings, and betting activities. It provides functionalities for creating and managing tariffs, partners, games, and stakings, as well as facilitating betting and staking operations within the ecosystem.
Contract Address
The contract is deployed at: 0xBf87898C4e609598a393cCD765482BeF80000000
Contract Structure
The contract is structured into different sections corresponding to the management of tariffs, partners, games, stakings, and betting operations.
Tariffs
addTariff
: Allows the addition of new tariffs with specified pricing, profit, and stake profit parameters.
removeTariff
: Allows the removal of existing tariffs.
getTariffs
: Retrieves a list of all tariffs.
Partners
addPartner
Enables partners to register with the system by linking to existing tariffs and making payments.
getPartners
Retrieves a list of all registered partners.
Games
addGame
: Permits the addition of new games with version validation.
getGames
: Retrieves a list of all registered games.
isGame
: Checks if a given address corresponds to a registered game.
removeGame
: Allows the removal of existing games.
Stakings
addStaking
: Allows the addition of new stakings with address validation.
getStakings
: Retrieves a list of all registered stakings.
isStaking
: Checks if a given address corresponds to a registered staking.
removeStaking
: Allows the removal of existing stakings.
Betting Operations
placeBet
: Enables partners to place bets on behalf of players, with fee calculations and bet creation.
stake
: Enables partners to stake tokens on behalf of players, with profit distribution.
Error Codes
The contract defines various error codes to indicate specific error conditions encountered during contract execution. These error codes are documented within the contract code and serve as a reference for developers integrating with the contract.
Roles
The contract utilizes AccessControl from OpenZeppelin for role-based access control. The roles defined include PARTNER
and TIMELOCK
. These roles control access to critical functions within the contract.
Last updated