Frisky Fox - Defi Kingdoms
Core contract for Heroes.
Holds the base structs, events, and data.
function BRIDGE_ROLE() external view returns (bytes32)
Name |
Type |
Description |
_0 |
bytes32 |
undefined |
function DEFAULT_ADMIN_ROLE() external view returns (bytes32)
Name |
Type |
Description |
_0 |
bytes32 |
undefined |
function HERO_MODERATOR_ROLE() external view returns (bytes32)
Name |
Type |
Description |
_0 |
bytes32 |
undefined |
function MINTER_ROLE() external view returns (bytes32)
Name |
Type |
Description |
_0 |
bytes32 |
undefined |
function MODERATOR_ROLE() external view returns (bytes32)
ROLES ///
Name |
Type |
Description |
_0 |
bytes32 |
undefined |
function approve(address to, uint256 tokenId) external nonpayable
See {IERC721-approve}.
Name |
Type |
Description |
to |
address |
undefined |
tokenId |
uint256 |
undefined |
function balanceOf(address owner) external view returns (uint256)
See {IERC721-balanceOf}.
Name |
Type |
Description |
owner |
address |
undefined |
Name |
Type |
Description |
_0 |
uint256 |
undefined |
function bridgeMint(uint256 _id, address _to) external nonpayable
Name |
Type |
Description |
_id |
uint256 |
undefined |
_to |
address |
undefined |
function createHero(uint256 _statGenes, uint256 _visualGenes, enum Rarity _rarity, bool _shiny, HeroCrystal _crystal, uint256 _crystalId) external nonpayable returns (uint256)
Name |
Type |
Description |
_statGenes |
uint256 |
undefined |
_visualGenes |
uint256 |
undefined |
_rarity |
enum Rarity |
undefined |
_shiny |
bool |
undefined |
_crystal |
HeroCrystal |
undefined |
_crystalId |
uint256 |
undefined |
Name |
Type |
Description |
_0 |
uint256 |
undefined |
function getApproved(uint256 tokenId) external view returns (address)
See {IERC721-getApproved}.
Name |
Type |
Description |
tokenId |
uint256 |
undefined |
Name |
Type |
Description |
_0 |
address |
undefined |
function getHero(uint256 _id) external view returns (struct Hero)
Gets a hero object.
Name |
Type |
Description |
_id |
uint256 |
The hero id. |
Name |
Type |
Description |
_0 |
Hero |
undefined |
function getRoleAdmin(bytes32 role) external view returns (bytes32)
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Name |
Type |
Description |
role |
bytes32 |
undefined |
Name |
Type |
Description |
_0 |
bytes32 |
undefined |
function getUserHeroes(address _address) external view returns (struct Hero[])
Name |
Type |
Description |
_address |
address |
undefined |
Name |
Type |
Description |
_0 |
Hero[] |
undefined |
function grantRole(bytes32 role, address account) external nonpayable
Grants role
to account
. If account
had not been already granted role
, emits a {RoleGranted} event. Requirements: - the caller must have role
's admin role.
Name |
Type |
Description |
role |
bytes32 |
undefined |
account |
address |
undefined |
function hasRole(bytes32 role, address account) external view returns (bool)
Returns true
if account
has been granted role
.
Name |
Type |
Description |
role |
bytes32 |
undefined |
account |
address |
undefined |
Name |
Type |
Description |
_0 |
bool |
undefined |
function heroes(uint256) external view returns (uint256 id, struct SummoningInfo summoningInfo, struct HeroInfo info, struct HeroState state, struct HeroStats stats, struct HeroStatGrowth primaryStatGrowth, struct HeroStatGrowth secondaryStatGrowth, struct HeroProfessions professions)
Name |
Type |
Description |
_0 |
uint256 |
undefined |
Name |
Type |
Description |
id |
uint256 |
undefined |
summoningInfo |
SummoningInfo |
undefined |
info |
HeroInfo |
undefined |
state |
HeroState |
undefined |
stats |
HeroStats |
undefined |
primaryStatGrowth |
HeroStatGrowth |
undefined |
secondaryStatGrowth |
HeroStatGrowth |
undefined |
professions |
HeroProfessions |
undefined |
function initialize(string _name, string _symbol, address _statScience) external nonpayable
The initialize function is the constructor for upgradeable contracts.
Name |
Type |
Description |
_name |
string |
undefined |
_symbol |
string |
undefined |
_statScience |
address |
undefined |
function isApprovedForAll(address owner, address operator) external view returns (bool)
See {IERC721-isApprovedForAll}.
Name |
Type |
Description |
owner |
address |
undefined |
operator |
address |
undefined |
Name |
Type |
Description |
_0 |
bool |
undefined |
function name() external view returns (string)
See {IERC721Metadata-name}.
Name |
Type |
Description |
_0 |
string |
undefined |
function nextHeroId() external view returns (uint256)
Name |
Type |
Description |
_0 |
uint256 |
undefined |
function ownerOf(uint256 tokenId) external view returns (address)
See {IERC721-ownerOf}.
Name |
Type |
Description |
tokenId |
uint256 |
undefined |
Name |
Type |
Description |
_0 |
address |
undefined |
function pause() external nonpayable
ADMIN FUNCTION ///
function paused() external view returns (bool)
Returns true if the contract is paused, and false otherwise.
Name |
Type |
Description |
_0 |
bool |
undefined |
function renounceRole(bytes32 role, address account) external nonpayable
Revokes role
from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked role
, emits a {RoleRevoked} event. Requirements: - the caller must be account
.
Name |
Type |
Description |
role |
bytes32 |
undefined |
account |
address |
undefined |
function revokeRole(bytes32 role, address account) external nonpayable
Revokes role
from account
. If account
had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must have role
's admin role.
Name |
Type |
Description |
role |
bytes32 |
undefined |
account |
address |
undefined |
function safeTransferFrom(address from, address to, uint256 tokenId) external nonpayable
See {IERC721-safeTransferFrom}.
Name |
Type |
Description |
from |
address |
undefined |
to |
address |
undefined |
tokenId |
uint256 |
undefined |
function safeTransferFrom(address from, address to, uint256 tokenId, bytes _data) external nonpayable
See {IERC721-safeTransferFrom}.
Name |
Type |
Description |
from |
address |
undefined |
to |
address |
undefined |
tokenId |
uint256 |
undefined |
_data |
bytes |
undefined |
function setApprovalForAll(address operator, bool approved) external nonpayable
See {IERC721-setApprovalForAll}.
Name |
Type |
Description |
operator |
address |
undefined |
approved |
bool |
undefined |
function supportsInterface(bytes4 interfaceId) external view returns (bool)
Name |
Type |
Description |
interfaceId |
bytes4 |
undefined |
Name |
Type |
Description |
_0 |
bool |
undefined |
function symbol() external view returns (string)
See {IERC721Metadata-symbol}.
Name |
Type |
Description |
_0 |
string |
undefined |
function tokenByIndex(uint256 index) external view returns (uint256)
See {IERC721Enumerable-tokenByIndex}.
Name |
Type |
Description |
index |
uint256 |
undefined |
Name |
Type |
Description |
_0 |
uint256 |
undefined |
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256)
See {IERC721Enumerable-tokenOfOwnerByIndex}.
Name |
Type |
Description |
owner |
address |
undefined |
index |
uint256 |
undefined |
Name |
Type |
Description |
_0 |
uint256 |
undefined |
function tokenURI(uint256 tokenId) external view returns (string)
See {IERC721Metadata-tokenURI}.
Name |
Type |
Description |
tokenId |
uint256 |
undefined |
Name |
Type |
Description |
_0 |
string |
undefined |
function totalSupply() external view returns (uint256)
See {IERC721Enumerable-totalSupply}.
Name |
Type |
Description |
_0 |
uint256 |
undefined |
function transferFrom(address from, address to, uint256 tokenId) external nonpayable
See {IERC721-transferFrom}.
Name |
Type |
Description |
from |
address |
undefined |
to |
address |
undefined |
tokenId |
uint256 |
undefined |
function unpause() external nonpayable
function updateHero(Hero _hero) external nonpayable
Name |
Type |
Description |
_hero |
Hero |
undefined |
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId)
Name |
Type |
Description |
owner indexed |
address |
undefined |
approved indexed |
address |
undefined |
tokenId indexed |
uint256 |
undefined |
event ApprovalForAll(address indexed owner, address indexed operator, bool approved)
Name |
Type |
Description |
owner indexed |
address |
undefined |
operator indexed |
address |
undefined |
approved |
bool |
undefined |
event HeroSummoned(address indexed owner, uint256 heroId, uint256 summonerId, uint256 assistantId, uint256 statGenes, uint256 visualGenes)
EVENTS ///
The HeroSummoned event is fired whenever a new hero is created.
Name |
Type |
Description |
owner indexed |
address |
undefined |
heroId |
uint256 |
undefined |
summonerId |
uint256 |
undefined |
assistantId |
uint256 |
undefined |
statGenes |
uint256 |
undefined |
visualGenes |
uint256 |
undefined |
event HeroUpdated(address indexed owner, uint256 heroId, Hero hero)
The HeroUpdated event is fired whenever a hero is updated.
Name |
Type |
Description |
owner indexed |
address |
undefined |
heroId |
uint256 |
undefined |
hero |
Hero |
undefined |
event Paused(address account)
Name |
Type |
Description |
account |
address |
undefined |
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)
Name |
Type |
Description |
role indexed |
bytes32 |
undefined |
previousAdminRole indexed |
bytes32 |
undefined |
newAdminRole indexed |
bytes32 |
undefined |
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)
Name |
Type |
Description |
role indexed |
bytes32 |
undefined |
account indexed |
address |
undefined |
sender indexed |
address |
undefined |
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)
Name |
Type |
Description |
role indexed |
bytes32 |
undefined |
account indexed |
address |
undefined |
sender indexed |
address |
undefined |
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId)
Name |
Type |
Description |
from indexed |
address |
undefined |
to indexed |
address |
undefined |
tokenId indexed |
uint256 |
undefined |
event Unpaused(address account)
Name |
Type |
Description |
account |
address |
undefined |