Search…
⌃K

DFK Duel

Contracts

Addresses

DFK Chain

Name
Mainnet
Testnet
DFK Duel (S3)
0x26E47585e93f354864Ad2644fcAc348e3db5a7F3
0x290Ae855d535aA515426341B24605f7a8E4B5cA1
Duel Rank Claim
0x89789a580fdE00319493BdCdB6C65959DAB1e517
0x14dB6602b620Ad4B781164C7BADB288b675e18eb

Klaytn

Name
Mainnet
Testnet
DFK Duel (S3)
0x780AB5bdD18eD8cBB45267e53B11EE72EbF65A21
0x856ac3B199Cd778996c19EF5ED92c2166eECf152
Duel Rank Claim
0xb0f423BCB1F4396781e21ad9E0BC151d29Ac020C
0x4818D6cFCCBCbe1a11B26d381fd6Af8321d42A16

Interfaces

interface IDFKDuelS3 {
event DuelCompleted(uint256 indexed duelId, address indexed player1, address indexed player2, tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange) duel);
event DuelCreated(uint256 indexed duelId, address indexed player1, address indexed player2, tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange) duel);
event DuelEntryCreated(uint256 id, address indexed player, uint256[] heroIds);
event DuelEntryMatched(uint256 indexed duelId, uint256 indexed duelEntryId, address indexed player1, address player2);
event DuelMatchReshuffle(uint256 indexed duelEntryId, uint256 indexed duelType);
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 HeroLockedToWallet(uint256 heroId, address indexed lastHeroDuelOwner, uint256 indexed lastHeroDuelTime);
event PassiveEntryRemoved(uint256 indexed duelEntryId, uint256 indexed duelType);
event PlayerScoreChanged(uint256 indexed duelId, address indexed player, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) playerScoreChange);
event TurnOutcome(uint256 indexed duelId, uint256 indexed player1HeroId, uint256 indexed player2HeroId, tuple(uint16 turn, uint256 player1HeroId, uint256 player2HeroId, uint8 stat, uint8 background, tuple(uint8 roll, uint16 elementBonus, uint16 statValue, uint16 backgroundBonus, uint16 classBonus, uint16 subclassBonus, uint16 total) hero1Score, tuple(uint8 roll, uint16 elementBonus, uint16 statValue, uint16 backgroundBonus, uint16 classBonus, uint16 subclassBonus, uint16 total) hero2Score, uint256 winnerHeroId, address winnerPlayer) turnResult);
event UpdatedCrossChainData(uint256 indexed _heroId, address indexed _address, uint256 indexed time);
function acceptChallenge(uint256 _duelId, uint256[] _heroIds, uint8 _background, uint8 _stat);
function cancelPrivateDuel(uint256 _duelId);
function completeDuel(uint256 _duelId);
function completeDuels(uint256 _numToComplete);
function enterDuelLobby(uint256 _type, uint256[] _heroIds, uint256 _tokenFee, uint8 _background, uint8 _stat, uint8 _entries);
function enterDuelLobbyWithLocked(uint256 _type, uint256[] _heroIds, uint256 _tokenFee, uint8 _background, uint8 _stat, uint8 _entries);
function getActiveDuels(address _address) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange)[]);
function getChallenges(address _profile) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange)[]);
function getCurrentClassBonuses() view returns (uint8[6][2]);
function getCurrentHeroScoreDuelId(uint256 _heroId) view returns (uint256);
function getDuel(uint256 _id) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange));
function getDuelEntries(uint256 _start, uint256 _end) view returns (tuple(uint256 id, address player, uint256[] heroes, uint256 startBlock, uint256 heroPower, uint256 score, uint256 scoreAfter, uint256 tokenFee, uint256 duelId, uint256 custom1, uint256 custom2, uint8 duelType, uint8 status, uint64 winStreak, uint64 loseStreak, bool useLockedTokens, uint8 numEntries, uint8 matched)[]);
function getDuelEntry(uint256 _id) view returns (tuple(uint256 id, address player, uint256[] heroes, uint256 startBlock, uint256 heroPower, uint256 score, uint256 scoreAfter, uint256 tokenFee, uint256 duelId, uint256 custom1, uint256 custom2, uint8 duelType, uint8 status, uint64 winStreak, uint64 loseStreak, bool useLockedTokens, uint8 numEntries, uint8 matched));
function getDuelHistory(address _profile) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange)[100]);
function getDuelIndexP1(uint256 _duelId) view returns (uint256);
function getDuelRewards(uint256 _id) view returns (tuple(address item, address recipient, uint256 qty)[]);
function getDuelTurns(uint256 _id) view returns (tuple(uint16 turn, uint256 player1HeroId, uint256 player2HeroId, uint8 stat, uint8 background, tuple(uint8 roll, uint16 elementBonus, uint16 statValue, uint16 backgroundBonus, uint16 classBonus, uint16 subclassBonus, uint16 total) hero1Score, tuple(uint8 roll, uint16 elementBonus, uint16 statValue, uint16 backgroundBonus, uint16 classBonus, uint16 subclassBonus, uint16 total) hero2Score, uint256 winnerHeroId, address winnerPlayer)[]);
function getDuels(uint256 _start, uint256 _end) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange)[]);
function getHeroAddress(uint256[] _heroIds) view returns (address[]);
function getHeroDuel(uint256 _heroId) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange));
function getHeroDuelCountForDay(uint256[] _heroIds, uint256 _duelType) view returns (uint256[]);
function getHeroDuelEntry(uint256 _heroId) view returns (tuple(uint256 id, address player, uint256[] heroes, uint256 startBlock, uint256 heroPower, uint256 score, uint256 scoreAfter, uint256 tokenFee, uint256 duelId, uint256 custom1, uint256 custom2, uint8 duelType, uint8 status, uint64 winStreak, uint64 loseStreak, bool useLockedTokens, uint8 numEntries, uint8 matched));
function getHeroLastTimePlayed(uint256 _heroId) view returns (uint256);
function getHighestScore(uint256 _type) view returns (uint64);
function getLeaderboard(uint256 _type, uint256 _start, uint256 _end) view returns (address[] _addresses, uint256[] _scores, uint256[] _totalDuels, uint256[] _totalWins);
function getLeaderboardRank(uint64 _score, uint256 _type) view returns (uint256);
function getNumRanks(uint256 _type) pure returns (uint256);
function getPlayerDuelEntries(address _profile) view returns (tuple(uint256 id, address player, uint256[] heroes, uint256 startBlock, uint256 heroPower, uint256 score, uint256 scoreAfter, uint256 tokenFee, uint256 duelId, uint256 custom1, uint256 custom2, uint8 duelType, uint8 status, uint64 winStreak, uint64 loseStreak, bool useLockedTokens, uint8 numEntries, uint8 matched)[]);
function getPlayerInfo(address _profile) view returns (uint64[] _scores, uint256[] _ranks, uint64[] _totalWins, uint32[] _winStreaks, uint64[] _totalDuels, uint256[] _lbRanks);
function getPlayerRank(address _profile, uint256 _type) view returns (uint256);
function getPlayerScore(address _profile, uint256 _type) view returns (uint64);
function getPracticeEntry(uint256 _type, uint8 _rank) view returns (tuple(uint256 id, address player, uint256[] heroes, uint256 startBlock, uint256 heroPower, uint256 score, uint256 scoreAfter, uint256 tokenFee, uint256 duelId, uint256 custom1, uint256 custom2, uint8 duelType, uint8 status, uint64 winStreak, uint64 loseStreak, bool useLockedTokens, uint8 numEntries, uint8 matched));
function getRankLevels(uint256 _type) pure returns (uint16[]);
function getSeasonInfo() view returns (uint256, uint256);
function getTotalDuelEntries() view returns (uint256);
function getTotalDuels() view returns (uint256);
function getTotalOpenDuelEntries(uint256 _lobby) view returns (uint256);
function getTotalPlayerDuels(address _profile, uint256 _type) view returns (uint64);
function getTotalPlayerWins(address _profile, uint256 _type) view returns (uint64);
function getWinStreaks(address _player, uint256 _type) view returns (uint256);
function matchMake(uint256 _lobby);
function startPracticeDuel(uint256 _type, uint256[] _heroIds, uint8 _rank, uint8 _background, uint8 _stat);
function startPrivateDuel(uint256 _type, uint256[] _heroIds, address _opponent, uint8 _background, uint8 _stat);
}
interface IDuelRankClaim {
event Claimed(uint256 indexed rankId, address indexed recipient, address token, uint256 amount, uint256 timestamp);
event SetReward(uint256 season, uint256 duelType, uint256 rank, uint256 rankId, address token, uint256 amount);
function _calculateRankId(uint256 _season, uint256 _duelType, uint256 _rank) pure returns (uint256);
function claimReward(uint256 _season, uint256 _duelType, uint256 _rank);
function getClaimedRanks(uint256 _season, uint256 _duelType, address _user) view returns (uint256[]);
function getRewards(uint256 _season, uint256 _duelType, uint256 _rank) view returns (tuple(address tokenAddress, uint256 amount)[]);
function getRewardsForSeasonAndDuelType(uint256 _season, uint256 _duelType) view returns (tuple(address tokenAddress, uint256 amount)[][]);
function getSeasonInfo(address _player, uint256 _season, uint256 _duelType) view returns (uint64 score, uint256 rank, uint16[] ranks, uint256[] claimedRanks, tuple(address tokenAddress, uint256 amount)[][] rewards, uint256 startTime, uint256 duration);
function getSeasonRankRequirements(uint256 _season, uint256 _duelType) view returns (uint16[]);
function paused() view returns (bool);
function rankRewards(uint256, uint256) view returns (address tokenAddress, uint256 amount);
function userRankClaims(uint256, address) view returns (uint256);
}

ABIs

DFKDuelS3.json
103KB
Code
DuelRankClaim.json
14KB
Code

Historical Contracts

These contracts have been deprecated and should not be used. They are listed here for data analysis and tracking purposes only.

Addresses

DFK Chain

Name
Mainnet
Testnet
DFK Duel (S2)
0x9EEaBBcf42F0c4900d302544Cce599811C2De2b9
0x586b789E6aAFBc9E11FA58E3f721bf7c97C6d832
DFK Duel (S1)
0xf724FE22b45D519D149477aA2eC5348Cee08Cae3
0x1c6225F77A875a6217150595A3437EfA55046197

Klaytn

Name
Mainnet
Testnet
DFK Duel (S2)
0xF719C12a5A7C0f13F3c1B71074960A25E2f9Aa9e
0x20f10ef23Cdc11Fa55E6B3703d88f19A7B345D15

Harmony

Name
Mainnet
Testnet
DFK Duel (Pre-Season)
0xE97196f4011dc9DA0829dd8E151EcFc0f37EE3c7
0x3b1114AF654E022bBDeE927b5dFa5F183b717b0B

Interfaces

interface IDFKDuelS2 {
event DuelCompleted(uint256 indexed duelId, address indexed player1, address indexed player2, tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange) duel);
event DuelCreated(uint256 indexed duelId, address indexed player1, address indexed player2, tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange) duel);
event DuelEntryCreated(uint256 id, address indexed player, uint256[] heroIds);
event DuelEntryMatched(uint256 indexed duelId, uint256 indexed duelEntryId, address indexed player1, address player2);
event DuelMatchReshuffle(uint256 indexed duelEntryId, uint256 indexed duelType);
event HeroLockedToWallet(uint256 heroId, address indexed lastHeroDuelOwner, uint256 indexed lastHeroDuelTime);
event PassiveEntryRemoved(uint256 indexed duelEntryId, uint256 indexed duelType);
event PlayerScoreChanged(uint256 indexed duelId, address indexed player, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) playerScoreChange);
event TurnOutcome(uint256 indexed duelId, uint256 indexed player1HeroId, uint256 indexed player2HeroId, tuple(uint16 turn, uint256 player1HeroId, uint256 player2HeroId, uint8 stat, uint8 background, tuple(uint8 roll, uint16 elementBonus, uint16 statValue, uint16 backgroundBonus, uint16 classBonus, uint16 subclassBonus, uint16 total) hero1Score, tuple(uint8 roll, uint16 elementBonus, uint16 statValue, uint16 backgroundBonus, uint16 classBonus, uint16 subclassBonus, uint16 total) hero2Score, uint256 winnerHeroId, address winnerPlayer) turnResult);
event UpdatedCrossChainData(uint256 indexed _heroId, address indexed _address, uint256 indexed time);
function acceptChallenge(uint256 _duelId, uint256[] _heroIds, uint8 _background, uint8 _stat);
function completeDuel(uint256 _duelId);
function enterDuelLobby(uint256 _type, uint256[] _heroIds, uint256 _tokenFee, uint8 _background, uint8 _stat);
function getActiveDuels(address _address) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange)[]);
function getChallenges(address _profile) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange)[]);
function getCurrentClassBonuses() view returns (uint8[6][2]);
function getCurrentHeroScoreDuelId(uint256 _heroId) view returns (uint256);
function getDuel(uint256 _id) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange));
function getDuelEntries(uint256 _start, uint256 _end) view returns (tuple(uint256 id, address player, uint256[] heroes, uint256 startBlock, uint256 heroPower, uint256 score, uint256 scoreAfter, uint256 tokenFee, uint256 duelId, uint256 custom1, uint256 custom2, uint8 duelType, uint8 status, uint64 winStreak, uint64 loseStreak)[]);
function getDuelEntry(uint256 _id) view returns (tuple(uint256 id, address player, uint256[] heroes, uint256 startBlock, uint256 heroPower, uint256 score, uint256 scoreAfter, uint256 tokenFee, uint256 duelId, uint256 custom1, uint256 custom2, uint8 duelType, uint8 status, uint64 winStreak, uint64 loseStreak));
function getDuelHistory(address _profile) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange)[100]);
function getDuelIndexP1(uint256 _duelId) view returns (uint256);
function getDuelRewards(uint256 _id) view returns (tuple(address item, address recipient, uint256 qty)[]);
function getDuelTurns(uint256 _id) view returns (tuple(uint16 turn, uint256 player1HeroId, uint256 player2HeroId, uint8 stat, uint8 background, tuple(uint8 roll, uint16 elementBonus, uint16 statValue, uint16 backgroundBonus, uint16 classBonus, uint16 subclassBonus, uint16 total) hero1Score, tuple(uint8 roll, uint16 elementBonus, uint16 statValue, uint16 backgroundBonus, uint16 classBonus, uint16 subclassBonus, uint16 total) hero2Score, uint256 winnerHeroId, address winnerPlayer)[]);
function getDuels(uint256 _start, uint256 _end) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange)[]);
function getHeroAddress(uint256[] _heroIds) view returns (address[]);
function getHeroDuel(uint256 _heroId) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange));
function getHeroDuelCountForDay(uint256[] _heroIds, uint256 _duelType) view returns (uint256[]);
function getHeroDuelEntry(uint256 _heroId) view returns (tuple(uint256 id, address player, uint256[] heroes, uint256 startBlock, uint256 heroPower, uint256 score, uint256 scoreAfter, uint256 tokenFee, uint256 duelId, uint256 custom1, uint256 custom2, uint8 duelType, uint8 status, uint64 winStreak, uint64 loseStreak));
function getHeroLastTimePlayed(uint256 _heroId) view returns (uint256);
function getHighestScore(uint256 _type) view returns (uint64);
function getNumRanks(uint256 _type) pure returns (uint256);
function getPlayerDuelEntries(address _profile) view returns (tuple(uint256 id, address player, uint256[] heroes, uint256 startBlock, uint256 heroPower, uint256 score, uint256 scoreAfter, uint256 tokenFee, uint256 duelId, uint256 custom1, uint256 custom2, uint8 duelType, uint8 status, uint64 winStreak, uint64 loseStreak)[]);
function getPlayerRank(address _profile, uint256 _type) view returns (uint256);
function getPlayerScore(address _profile, uint256 _type) view returns (uint64);
function getPracticeEntry(uint256 _type, uint8 _rank) view returns (tuple(uint256 id, address player, uint256[] heroes, uint256 startBlock, uint256 heroPower, uint256 score, uint256 scoreAfter, uint256 tokenFee, uint256 duelId, uint256 custom1, uint256 custom2, uint8 duelType, uint8 status, uint64 winStreak, uint64 loseStreak));
function getRankLevels(uint256 _type) view returns (uint16[]);
function getSeasonInfo() view returns (uint256, uint256);
function getTotalDuelEntries() view returns (uint256);
function getTotalDuels() view returns (uint256);
function getTotalOpenDuelEntries(uint256 _lobby) view returns (uint256);
function getTotalPlayerDuels(address _profile, uint256 _type) view returns (uint64);
function getTotalPlayerWins(address _profile, uint256 _type) view returns (uint64);
function getWinStreaks(address _player, uint256 _type) view returns (uint256);
function matchMake(uint256 _lobby);
function startPracticeDuel(uint256 _type, uint256[] _heroIds, uint8 _rank, uint8 _background, uint8 _stat);
function startPrivateDuel(uint256 _type, uint256[] _heroIds, address _opponent, uint8 _background, uint8 _stat);
}
interface IDFKDuelS1 {
event DuelCompleted(uint256 indexed duelId, address indexed player1, address indexed player2, tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange) duel);
event DuelCreated(uint256 indexed duelId, address indexed player1, address indexed player2, tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange) duel);
event DuelEntryCreated(uint256 id, address indexed player, uint256[] heroIds);
event DuelEntryMatched(uint256 indexed duelId, uint256 indexed duelEntryId, address indexed player1, address player2);
event PlayerScoreChanged(uint256 indexed duelId, address indexed player, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter));
event TurnOutcome(uint256 indexed duelId, uint256 indexed player1HeroId, uint256 indexed player2HeroId, tuple(uint16 turn, uint256 player1HeroId, uint256 player2HeroId, uint8 stat, uint8 background, tuple(uint8 roll, uint16 elementBonus, uint16 statValue, uint16 backgroundBonus, uint16 total) hero1Score, tuple(uint8 roll, uint16 elementBonus, uint16 statValue, uint16 backgroundBonus, uint16 total) hero2Score, uint256 winnerHeroId, address winnerPlayer) turnResult);
function acceptChallenge(uint256 _duelId, uint256[] _heroIds, uint8 _background, uint8 _stat);
function completeDuel(uint256 _duelId);
function enterDuelLobby(uint256 _type, uint256[] _heroIds, uint256 _tokenFee, uint8 _background, uint8 _stat);
function getActiveDuels(address _address) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange)[]);
function getChallenges(address _profile) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange)[]);
function getCurrentHeroScoreDuelId(uint256 _heroId) view returns (uint256);
function getDuel(uint256 _id) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange));
function getDuelEntry(uint256 _id) view returns (tuple(uint256 id, address player, uint256[] heroes, uint256 startBlock, uint256 heroPower, uint256 score, uint256 scoreAfter, uint256 tokenFee, uint256 duelId, uint256 custom1, uint256 custom2, uint8 duelType, uint8 status, uint64 winStreak, uint64 loseStreak));
function getDuelHistory(address _profile) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange)[100]);
function getDuelIndexP1(uint256 _duelId) view returns (uint256);
function getDuelRewards(uint256 _id) view returns (tuple(address item, address recipient, uint256 qty)[]);
function getDuelTurns(uint256 _id) view returns (tuple(uint16 turn, uint256 player1HeroId, uint256 player2HeroId, uint8 stat, uint8 background, tuple(uint8 roll, uint16 elementBonus, uint16 statValue, uint16 backgroundBonus, uint16 total) hero1Score, tuple(uint8 roll, uint16 elementBonus, uint16 statValue, uint16 backgroundBonus, uint16 total) hero2Score, uint256 winnerHeroId, address winnerPlayer)[]);
function getHeroDuel(uint256 _heroId) view returns (tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status, tuple(uint256 duelId, uint16 base, uint32 streakBonus, uint16 miscBonus, uint32 diffBonus, uint64 scoreBefore, uint64 scoreAfter) player1ScoreChange));
function getHeroDuelEntry(uint256 _heroId) view returns (tuple(uint256 id, address player, uint256[] heroes, uint256 startBlock, uint256 heroPower, uint256 score, uint256 scoreAfter, uint256 tokenFee, uint256 duelId, uint256 custom1, uint256 custom2, uint8 duelType, uint8 status, uint64 winStreak, uint64 loseStreak));
function getHighestScore(uint256 _type) view returns (uint64);
function getPlayerDuelEntries(address _profile) view returns (tuple(uint256 id, address player, uint256[] heroes, uint256 startBlock, uint256 heroPower, uint256 score, uint256 scoreAfter, uint256 tokenFee, uint256 duelId, uint256 custom1, uint256 custom2, uint8 duelType, uint8 status, uint64 winStreak, uint64 loseStreak)[]);
function getPlayerScore(address _profile, uint256 _type) view returns (uint64);
function getPracticeEntry(uint256 _type, uint8 _rank) view returns (tuple(uint256 id, address player, uint256[] heroes, uint256 startBlock, uint256 heroPower, uint256 score, uint256 scoreAfter, uint256 tokenFee, uint256 duelId, uint256 custom1, uint256 custom2, uint8 duelType, uint8 status, uint64 winStreak, uint64 loseStreak));
function getTotalDuelEntries() view returns (uint256);
function getTotalDuels() view returns (uint256);
function getTotalOpenDuelEntries(uint256 _lobby) view returns (uint256);
function getTotalPlayerDuels(address _profile, uint256 _type) view returns (uint64);
function getTotalPlayerWins(address _profile, uint256 _type) view returns (uint64);
function getWinStreaks(address _player, uint256 _type) view returns (uint256);
function matchMake(uint256 _lobby);
function startPracticeDuel(uint256 _type, uint256[] _heroIds, uint8 _rank, uint8 _background, uint8 _stat);
function startPrivateDuel(uint256 _type, uint256[] _heroIds, address _opponent, uint8 _background, uint8 _stat);
}
interface IDFKDuel {
event DuelCompleted(uint256 indexed duelId, address indexed player1, address indexed player2, tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status) duel);
event DuelCreated(uint256 indexed duelId, address indexed player1, address indexed player2, tuple(uint256 id, address player1, address player2, uint256 player1DuelEntry, uint256 player2DuelEntry, address winner, uint256[] player1Heroes, uint256[] player2Heroes, uint256 startBlock, uint8 duelType, uint8 status) duel);
event DuelEntryCreated(uint256 id, address indexed player, uint256[] heroIds);
event DuelEntryMatched(uint256 indexed duelId, uint256 indexed duelEntryId, address indexed player1, address player2);
event TurnOutcome(uint256 indexed duelId, uint256 indexed player1HeroId, uint256 indexed player2HeroId, tuple(uint16 turn, uint256 player1HeroId, uint256 player2HeroId, uint8 stat, uint8 background, tuple(uint8 roll, uint16 elementBonus, uint16 statValue, uint16 backgroundBonus, uint16 total) hero1Score, tuple(uint8 roll, uint16 elementBonus, uint16 statValue, uint16 backgroundBonus, uint16 total) hero2Score, uint256 winnerHeroId, address winnerPlayer) turnResult);
function completeDuel(uint256 _duelId);
function enterDuelLobby