Influence System
The Influence System is part of the PVP Diamond contract, and is combined with the HeroV4 facet, sharing a contract address.
Contracts
Addresses
Metis
Name | Mainnet | Testnet |
---|---|---|
PVPDiamond |
|
|
Colosseum Fund |
|
|
Interfaces
interface IPVPDiamond {
// Events
event BattleRewardsCollected(address indexed player, tuple(address tokenAddress, bool isGasToken)[] rewardTokens, uint256[] totalAmounts, uint256[] rewardCounts);
event DailyInfluenceRewardCollected(address tokenAddress, uint256 amount, bool isGasToken, uint256 accTokensPerShare, uint256 globalInfluence);
event FeeAddressAdded(address indexed feeAddress, uint256 indexed feePercent);
event FeeDeferred(address indexed source, address indexed from, address indexed to, address token, uint256 amount, uint64 timestamp);
event FeeDisbursed(address indexed source, address indexed from, address indexed to, address token, uint256 amount, uint64 timestamp);
event FeeLockedBurned(address indexed source, address indexed from, address indexed to, address token, uint256 amount, uint64 timestamp);
event HeroInfluenceDataSet(uint256 indexed heroId, tuple(uint256 lockExpirationDay, uint256 daysLocked, uint256 influence, uint256 lastXpClaimDay) heroInfluenceData);
event HeroPledgeRemoved(uint256 indexed heroId, uint256 fee);
event HeroXpClaimed(uint256 indexed heroId, uint256 xpClaimed);
event InfluenceRewardCollected(address indexed player, address tokenAddress, uint256 amount, bool isGasToken);
event PlayerInfluenceDataUpdated(address indexed player, tuple(uint256 totalInfluence, uint256 availableInfluence, uint256 resetWeekNumber, uint256 spectatingBattleId) playerInfluenceData);
// State-Changing Functions
function breakPledge(uint256 _heroId);
function claimBattleRewards();
function claimHeroXp(uint256 _heroId);
function claimInfluenceRewards();
function earlyBreakPledge(uint256 _heroId);
function multiBreakPledge(uint256[] _heroIds);
function multiClaimHeroXp(uint256[] _heroIds);
function multiEarlyBreakPledge(uint256[] _heroIds);
function multiPledgeHero(uint256[] _heroIds, uint256[] _lockDurations);
function pledgeHero(uint256 _heroId, uint256 _lockDuration);
function updateRewards();
// View Functions
function MAX_DAYS_LOCKED() view returns (uint256);
function MIN_DAYS_LOCKED() view returns (uint256);
function getAllPlayerRewards(address _player) view returns (tuple(address tokenAddress, uint256 dayAdded, bool isGasToken)[], uint256[], tuple(tuple(address tokenAddress, bool isGasToken) token, tuple(uint256 rewardAmount, uint256 timeReceived, uint256 battleId, uint8 reason)[] rewardInfo)[]);
function getCurrentRewards(address _player) view returns (tuple(address tokenAddress, uint256 dayAdded, bool isGasToken)[], uint256[]);
function getCurrentSpectatorRewards(address _player) view returns (tuple(tuple(address tokenAddress, bool isGasToken) token, tuple(uint256 rewardAmount, uint256 timeReceived, uint256 battleId, uint8 reason)[] rewardInfo)[]);
function getGlobalInfluence() view returns (uint256);
function getHeroInfluence(uint256 _heroId, uint256 _lockDuration) view returns (uint256);
function getHeroInfluenceData(uint256 _heroId) view returns (tuple(uint256 lockExpirationDay, uint256 daysLocked, uint256 influence, uint256 lastXpClaimDay));
function getHeroScore(uint256 _heroId) view returns (uint256);
function getPlayerInfluenceData(address _player) view returns (tuple(uint256 totalInfluence, uint256 availableInfluence, uint256 resetWeekNumber, uint256 spectatingBattleId));
function getPlayerPledgedHeroes(address _player) view returns (uint256[]);
function getPlayerPledgedHeroesWithIndex(address _player, uint256 _index, uint256 _count) view returns (uint256[]);
function getWithdrawalFee(uint256 _heroId) view returns (uint256);
}
ABIs
Last updated