contract_name
stringlengths
1
61
file_path
stringlengths
5
50.4k
contract_address
stringlengths
42
42
language
stringclasses
1 value
class_name
stringlengths
1
61
class_code
stringlengths
4
330k
class_documentation
stringlengths
0
29.1k
class_documentation_type
stringclasses
6 values
func_name
stringlengths
0
62
func_code
stringlengths
1
303k
func_documentation
stringlengths
2
14.9k
func_documentation_type
stringclasses
4 values
compiler_version
stringlengths
15
42
license_type
stringclasses
14 values
swarm_source
stringlengths
0
71
meta
dict
__index_level_0__
int64
0
60.4k
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
ERC20
contract ERC20 { // modifiers // mitigate short address attack // thanks to https://github.com/numerai/contract/blob/c182465f82e50ced8dacb3977ec374a892f5fa8c/contracts/Safe.sol#L30-L34. // TODO: doublecheck implication of >= compared to == modifier onlyPayloadSize(uint numWords) { assert(msg.dat...
balanceOf
function balanceOf(address who) public view returns (uint256);
/* * Public functions */
Comment
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 452, 519 ] }
807
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
StandardToken
contract StandardToken is ERC20 { using SafeMath for uint256; mapping (address => mapping (address => uint256)) internal allowed; mapping(address => uint256) balances; /// @dev Returns number of tokens owned by given address /// @param _owner Address of token owner /// @return Balance of owner...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
balanceOf
function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; }
// it is recommended to define functions which can read the state of blockchain but cannot write in it as view instead of constant
LineComment
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 460, 572 ] }
808
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
StandardToken
contract StandardToken is ERC20 { using SafeMath for uint256; mapping (address => mapping (address => uint256)) internal allowed; mapping(address => uint256) balances; /// @dev Returns number of tokens owned by given address /// @param _owner Address of token owner /// @return Balance of owner...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public onlyPayloadSize(2) returns (bool success) { if (balances[msg.sender] >= _value && _value > 0 && balances[_to].add(_value) > balances[_to]) { balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); ...
/// @dev Transfers sender's tokens to a given address. Returns success /// @param _to Address of token receiver /// @param _value Number of tokens to transfer /// @return Was transfer successful?
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 785, 1285 ] }
809
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
StandardToken
contract StandardToken is ERC20 { using SafeMath for uint256; mapping (address => mapping (address => uint256)) internal allowed; mapping(address => uint256) balances; /// @dev Returns number of tokens owned by given address /// @param _owner Address of token owner /// @return Balance of owner...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); ...
/// @dev Allows allowed third party to transfer tokens from one address to another. Returns success /// @param _from Address from where tokens are withdrawn /// @param _to Address to where tokens are sent /// @param _value Number of tokens to transfer /// @return Was transfer successful?
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 1604, 2121 ] }
810
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
StandardToken
contract StandardToken is ERC20 { using SafeMath for uint256; mapping (address => mapping (address => uint256)) internal allowed; mapping(address => uint256) balances; /// @dev Returns number of tokens owned by given address /// @param _owner Address of token owner /// @return Balance of owner...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
approve
function approve(address _spender, uint256 _value) public onlyPayloadSize(2) returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://...
/** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * ...
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 2757, 3384 ] }
811
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
StandardToken
contract StandardToken is ERC20 { using SafeMath for uint256; mapping (address => mapping (address => uint256)) internal allowed; mapping(address => uint256) balances; /// @dev Returns number of tokens owned by given address /// @param _owner Address of token owner /// @return Balance of owner...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
allowance
function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; }
/** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 4070, 4209 ] }
812
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
StandardToken
contract StandardToken is ERC20 { using SafeMath for uint256; mapping (address => mapping (address => uint256)) internal allowed; mapping(address => uint256) balances; /// @dev Returns number of tokens owned by given address /// @param _owner Address of token owner /// @return Balance of owner...
/** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */
NatSpecMultiLine
burn
function burn(uint256 _value) public returns (bool burnSuccess) { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure ad...
/** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 4322, 4888 ] }
813
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
Synapse
contract Synapse is StandardToken, Owned, Pausable { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 public tokensForSale = 495000000 * 1 ether;//50% total of Supply for crowdsale uint256 public vestingTokens = 227700000 * 1 e...
/** * @title Synapse */
NatSpecMultiLine
transfer
function transfer(address _to, uint256 _value) public manageTransfer whenNotPaused onlyPayloadSize(2) returns (bool success) { require(_value>0); require(_to != address(0)); require(!frozenAccounts[msg.sender]); if(investorIsVested[msg.sender]==true ) { require(now >= icoFina...
/** * @dev Investor can Transfer token from this method * @param _to address of the reciever * @param _value amount of tokens to transfer */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 2704, 3265 ] }
814
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
Synapse
contract Synapse is StandardToken, Owned, Pausable { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 public tokensForSale = 495000000 * 1 ether;//50% total of Supply for crowdsale uint256 public vestingTokens = 227700000 * 1 e...
/** * @title Synapse */
NatSpecMultiLine
transferFrom
function transferFrom(address _from, address _to, uint256 _value) public manageTransfer whenNotPaused onlyPayloadSize(3) returns (bool) { require(_value>0); require(_to != address(0)); require(_from != address(0)); require(!frozenAccounts[_from]); if(investorIsVested[_from]==true ) { ...
/** * @dev Transfer from allow to trasfer token * @param _from address of sender * @param _to address of the reciever * @param _value amount of tokens to transfer */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 3471, 4099 ] }
815
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
Synapse
contract Synapse is StandardToken, Owned, Pausable { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 public tokensForSale = 495000000 * 1 ether;//50% total of Supply for crowdsale uint256 public vestingTokens = 227700000 * 1 e...
/** * @title Synapse */
NatSpecMultiLine
activateSaleContract
function activateSaleContract(address _saleContract) public whenNotPaused { require(msg.sender == crowdSaleOwner); require(_saleContract != address(0)); require(saleContract == address(0)); saleContract = _saleContract; icoStartTime = now; }
/** * activates the sale contract (i.e. transfers saleable contracts) * @param _saleContract ,address of crowdsale contract */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 4255, 4561 ] }
816
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
Synapse
contract Synapse is StandardToken, Owned, Pausable { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 public tokensForSale = 495000000 * 1 ether;//50% total of Supply for crowdsale uint256 public vestingTokens = 227700000 * 1 e...
/** * @title Synapse */
NatSpecMultiLine
activateVestingContract
function activateVestingContract(address _vestingContract) public whenNotPaused { require(msg.sender == vestingOwner); require(_vestingContract != address(0)); require(vestingContract == address(0)); vestingContract = _vestingContract; }
/** * activates the sale contract (i.e. transfers saleable contracts) * @param _vestingContract ,address of crowdsale contract */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 4719, 5021 ] }
817
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
Synapse
contract Synapse is StandardToken, Owned, Pausable { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 public tokensForSale = 495000000 * 1 ether;//50% total of Supply for crowdsale uint256 public vestingTokens = 227700000 * 1 e...
/** * @title Synapse */
NatSpecMultiLine
sendBounty
function sendBounty(address _to, uint256 _value) public whenNotPaused onlyOwner returns (bool) { require(_to != address(0)); require(_value > 0 ); require(bountyTokens >= _value); bountyTokens = bountyTokens.sub(_value); return super.transfer(_to, _value); }
/** * @dev this function will send the bounty tokens to given address * @param _to ,address of the bounty receiver. * @param _value , number of tokens to be sent. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 5219, 5552 ] }
818
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
Synapse
contract Synapse is StandardToken, Owned, Pausable { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 public tokensForSale = 495000000 * 1 ether;//50% total of Supply for crowdsale uint256 public vestingTokens = 227700000 * 1 e...
/** * @title Synapse */
NatSpecMultiLine
sendMarketingTokens
function sendMarketingTokens(address _to, uint256 _value) public whenNotPaused onlyOwner returns (bool) { require(_to != address(0)); require(_value > 0 ); require(marketingTokens >= _value); marketingTokens = marketingTokens.sub(_value); return super.transfer(_to, _value);
/** * @dev this function will send the Marketing tokens to given address * @param _to ,address of the bounty receiver. * @param _value , number of tokens to be sent. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 5749, 6095 ] }
819
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
Synapse
contract Synapse is StandardToken, Owned, Pausable { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 public tokensForSale = 495000000 * 1 ether;//50% total of Supply for crowdsale uint256 public vestingTokens = 227700000 * 1 e...
/** * @title Synapse */
NatSpecMultiLine
sendExpansionTokens
function sendExpansionTokens(address _to, uint256 _value) public whenNotPaused onlyOwner returns (bool) { require(_to != address(0)); require(_value > 0 ); require(expansionTokens >= _value); expansionTokens = expansionTokens.sub(_value); return super.transfer(_to, _value);
/** * @dev this function will send the expansion tokens to given address * @param _to ,address of the bounty receiver. * @param _value , number of tokens to be sent. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 6292, 6638 ] }
820
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
Synapse
contract Synapse is StandardToken, Owned, Pausable { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 public tokensForSale = 495000000 * 1 ether;//50% total of Supply for crowdsale uint256 public vestingTokens = 227700000 * 1 e...
/** * @title Synapse */
NatSpecMultiLine
sendAdvisorTokens
function sendAdvisorTokens(address _to, uint256 _value) public whenNotPaused onlyOwner returns (bool) { require(_to != address(0)); require(_value > 0 ); require(advisorTokens >= _value); advisorTokens = advisorTokens.sub(_value); return super.transfer(_to, _value);
/** * @dev this function will send the expansion tokens to given address * @param _to ,address of the bounty receiver. * @param _value , number of tokens to be sent. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 6835, 7173 ] }
821
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
Synapse
contract Synapse is StandardToken, Owned, Pausable { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 public tokensForSale = 495000000 * 1 ether;//50% total of Supply for crowdsale uint256 public vestingTokens = 227700000 * 1 e...
/** * @title Synapse */
NatSpecMultiLine
isContract
function isContract(address _address) private view returns (bool is_contract) { uint256 length; assembly { //retrieve the size of the code on target address, this needs assembly length := extcodesize(_address) } return (length > 0); }
/** * @dev function to check whether passed address is a contract address */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 7268, 7570 ] }
822
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
Synapse
contract Synapse is StandardToken, Owned, Pausable { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 public tokensForSale = 495000000 * 1 ether;//50% total of Supply for crowdsale uint256 public vestingTokens = 227700000 * 1 e...
/** * @title Synapse */
NatSpecMultiLine
saleTransfer
function saleTransfer(address _to, uint256 _value) external whenNotPaused returns (bool) { require(saleContract != address(0),'sale address is not activated'); require(msg.sender == saleContract,'caller is not crowdsale contract'); require(!frozenAccounts[_to],'account is freezed'); return super.tra...
/** * @dev this function can only be called by crowdsale contract to transfer tokens to investor * @param _to address The address of the investor. * @param _value uint256 The amount of tokens to be send */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 7808, 8208 ] }
823
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
Synapse
contract Synapse is StandardToken, Owned, Pausable { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 public tokensForSale = 495000000 * 1 ether;//50% total of Supply for crowdsale uint256 public vestingTokens = 227700000 * 1 e...
/** * @title Synapse */
NatSpecMultiLine
vestingTransfer
function vestingTransfer(address _to, uint256 _value) external whenNotPaused returns (bool) { require(icoFinalizedTime == 0,'ico is finalised'); require(vestingContract != address(0)); require(msg.sender == vestingContract,'caller is not a vesting contract'); investorIsVested[_to] = true; retur...
/** * @dev this function can only be called by contract to transfer tokens to vesting beneficiary * @param _to address The address of the beneficiary. * @param _value uint256 The amount of tokens to be send */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 8447, 8846 ] }
824
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
Synapse
contract Synapse is StandardToken, Owned, Pausable { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 public tokensForSale = 495000000 * 1 ether;//50% total of Supply for crowdsale uint256 public vestingTokens = 227700000 * 1 e...
/** * @title Synapse */
NatSpecMultiLine
finalize
function finalize() external whenNotPaused returns(bool){ require(fundraising != false); require(msg.sender == saleContract); fundraising = false; icoFinalizedTime = now; return true; }
/** * @dev this function will closes the sale ,after this anyone can transfer their tokens to others. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 8969, 9210 ] }
825
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
Synapse
contract Synapse is StandardToken, Owned, Pausable { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 public tokensForSale = 495000000 * 1 ether;//50% total of Supply for crowdsale uint256 public vestingTokens = 227700000 * 1 e...
/** * @title Synapse */
NatSpecMultiLine
freezeAccount
function freezeAccount (address target, bool freeze) public onlyOwner { require(target != 0x0); frozenAccounts[target] = freeze; emit FrozenFund(target, freeze); // solhint-disable-line }
/** * @dev this function will freeze the any account so that the frozen account will not able to participate in crowdsale. * @param target ,address of the target account * @param freeze ,boolean value to freeze or unfreeze the account ,true to freeze and false to unfreeze */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 9510, 9733 ] }
826
Synapse
Synapse.sol
0x5dcd2a3c8fdef5115cd11e9ae20b59d412189b9c
Solidity
Synapse
contract Synapse is StandardToken, Owned, Pausable { using SafeMath for uint256; string public symbol; string public name; uint8 public decimals; uint256 public tokensForSale = 495000000 * 1 ether;//50% total of Supply for crowdsale uint256 public vestingTokens = 227700000 * 1 e...
/** * @title Synapse */
NatSpecMultiLine
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public whenNotPaused onlyOwner returns (bool success) { require(tokenAddress != address(0)); require(isContract(tokenAddress)); return ERC20(tokenAddress).transfer(owner, tokens); }
/** * @dev Function to transfer any ERC20 token to owner address which gets accidentally transferred to this contract * @param tokenAddress The address of the ERC20 contract * @param tokens The amount of tokens to transfer. * @return A boolean that indicates if the operation was successful. */
NatSpecMultiLine
v0.4.24+commit.e67f0147
bzzr://aa5a3cdb91a4525f886bbaa60f0acb073913b5fbb9821431c4a6c7aebbfce38d
{ "func_code_index": [ 10062, 10346 ] }
827
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
supportsInterface
function supportsInterface(bytes4 _interfaceId) external view returns(bool) { // ERC165 || ERC721 || ERC165^ERC721 return (_interfaceId == 0x01ffc9a7 || _interfaceId == 0x80ac58cd || _interfaceId == 0x8153916a) && (_interfaceId != 0xffffffff); }
// ERC721
LineComment
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 3793, 4066 ] }
828
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
balanceOf
function balanceOf(address _owner) external view returns(uint256) { require(_owner != address(0)); return ownerToFashionArray[_owner].length; }
/// @dev Search for token quantity address /// @param _owner Address that needs to be searched /// @return Returns token quantity
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 4398, 4569 ] }
829
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
ownerOf
function ownerOf(uint256 _tokenId) external view /*isValidToken(_tokenId)*/ returns (address owner) { return fashionIdToOwner[_tokenId]; }
/// @dev Find the owner of an Race /// @param _tokenId The tokenId of Race /// @return Give The address of the owner of this Race
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 4717, 4874 ] }
830
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
safeTransferFrom
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external whenNotPaused { _safeTransferFrom(_from, _to, _tokenId, data); }
/// @dev Transfers the ownership of an Race from one address to another address /// @param _from The current owner of the Race /// @param _to The new owner /// @param _tokenId The Race to transfer /// @param data Additional data with no specified format, sent in call to `_to`
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 5179, 5379 ] }
831
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
safeTransferFrom
function safeTransferFrom(address _from, address _to, uint256 _tokenId) external whenNotPaused { _safeTransferFrom(_from, _to, _tokenId, ""); }
/// @dev Transfers the ownership of an Race from one address to another address /// @param _from The current owner of the Race /// @param _to The new owner /// @param _tokenId The Race to transfer
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 5599, 5785 ] }
832
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
transferFrom
function transferFrom(address _from, address _to, uint256 _tokenId) external whenNotPaused isValidToken(_tokenId) canTransfer(_tokenId) { address owner = fashionIdToOwner[_tokenId]; require(owner != address(0)); require(_to != address(0)); require(owner == _from); ...
/// @dev Transfer ownership of an Race, '_to' must be a vaild address, or the Race will lost /// @param _from The current owner of the Race /// @param _to The new owner /// @param _tokenId The Race to transfer
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 6018, 6423 ] }
833
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
approve
function approve(address _approved, uint256 _tokenId) external whenNotPaused { address owner = fashionIdToOwner[_tokenId]; require(owner != address(0)); require(msg.sender == owner || operatorToApprovals[owner][msg.sender]); fashionIdToApprovals[_tokenId] = _approved; Approval(owne...
/// @dev Set or reaffirm the approved address for an Race /// @param _approved The new approved Race controller /// @param _tokenId The Race to approve
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 6593, 6981 ] }
834
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
setApprovalForAll
function setApprovalForAll(address _operator, bool _approved) external whenNotPaused { operatorToApprovals[msg.sender][_operator] = _approved; ApprovalForAll(msg.sender, _operator, _approved); }
/// @dev Enable or disable approval for a third party ("operator") to manage all your asset. /// @param _operator Address to add to the set of authorized operators. /// @param _approved True if the operators is approved, false to revoke approval
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 7245, 7492 ] }
835
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
getApproved
function getApproved(uint256 _tokenId) external view isValidToken(_tokenId) returns (address) { return fashionIdToApprovals[_tokenId]; }
/// @dev Get the approved address for a single Race /// @param _tokenId The Race to find the approved address for /// @return The approved address for this Race, or the zero address if there is none
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 7709, 7864 ] }
836
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
isApprovedForAll
function isApprovedForAll(address _owner, address _operator) external view returns (bool) { return operatorToApprovals[_owner][_operator]; }
/// @dev Query if an address is an authorized operator for another address /// @param _owner The address that owns the Races /// @param _operator The address that acts on behalf of the owner /// @return True if `_operator` is an approved operator for `_owner`, false otherwise
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 8164, 8323 ] }
837
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
totalSupply
function totalSupply() external view returns (uint256) { return fashionArray.length - destroyFashionCount - 1; }
/// @dev Count Races tracked by this contract /// @return A count of valid Races tracked by this contract, where each one of /// them has an assigned and queryable owner not equal to the zero address
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 8542, 8673 ] }
838
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
_transfer
function _transfer(address _from, address _to, uint256 _tokenId) internal { if (_from != address(0)) { uint256 indexFrom = fashionIdToOwnerIndex[_tokenId]; uint256[] storage fsArray = ownerToFashionArray[_from]; require(fsArray[indexFrom] == _tokenId); // If the Race is not th...
/// @dev Do the real transfer with out any condition checking /// @param _from The old owner of this Race(If created: 0x0) /// @param _to The new owner of this Race /// @param _tokenId The tokenId of the Race
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 8906, 10048 ] }
839
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
_safeTransferFrom
function _safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) internal isValidToken(_tokenId) canTransfer(_tokenId) { address owner = fashionIdToOwner[_tokenId]; require(owner != address(0)); require(_to != address(0)); require(owner == _from); ...
/// @dev Actually perform the safeTransferFrom
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 10103, 10944 ] }
840
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
createFashion
function createFashion(address _owner, uint16[13] _attrs, uint16 _createType) external whenNotPaused returns(uint256) { require(actionContracts[msg.sender]); require(_owner != address(0)); uint256 newFashionId = fashionArray.length; require(newFashionId < 4294967296); fash...
/// @dev Equipment creation /// @param _owner Owner of the equipment created /// @param _attrs Attributes of the equipment created /// @return Token ID of the equipment created
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 11260, 12872 ] }
841
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
_changeAttrByIndex
function _changeAttrByIndex(Fashion storage _fs, uint16 _index, uint16 _val) internal { if (_index == 3) { _fs.production = _val; } else if(_index == 4) { _fs.attack = _val; } else if(_index == 5) { _fs.defense = _val; } else if(_index == 6) { _fs.plunder = _val; ...
/// @dev One specific attribute of the equipment modified
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 12938, 13695 ] }
842
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
changeFashionAttr
function changeFashionAttr(uint256 _tokenId, uint16[4] _idxArray, uint16[4] _params, uint16 _changeType) external whenNotPaused isValidToken(_tokenId) { require(actionContracts[msg.sender]); Fashion storage fs = fashionArray[_tokenId]; if (_idxArray[0] > 0) { _changeAttrByIn...
/// @dev Equiment attributes modified (max 4 stats modified) /// @param _tokenId Equipment Token ID /// @param _idxArray Stats order that must be modified /// @param _params Stat value that must be modified /// @param _changeType Modification type such as enhance, socket, etc.
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 14001, 14814 ] }
843
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
destroyFashion
function destroyFashion(uint256 _tokenId, uint16 _deleteType) external whenNotPaused isValidToken(_tokenId) { require(actionContracts[msg.sender]); address _from = fashionIdToOwner[_tokenId]; uint256 indexFrom = fashionIdToOwnerIndex[_tokenId]; uint256[] storage fsArray = ownerTo...
/// @dev Equipment destruction /// @param _tokenId Equipment Token ID /// @param _deleteType Destruction type, such as craft
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 14957, 15890 ] }
844
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
safeTransferByContract
function safeTransferByContract(uint256 _tokenId, address _to) external whenNotPaused { require(actionContracts[msg.sender]); require(_tokenId >= 1 && _tokenId <= fashionArray.length); address owner = fashionIdToOwner[_tokenId]; require(owner != address(0)); require(_to != address...
/// @dev Safe transfer by trust contracts
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 15940, 16385 ] }
845
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
getFashion
function getFashion(uint256 _tokenId) external view isValidToken(_tokenId) returns (uint16[13] datas) { Fashion storage fs = fashionArray[_tokenId]; datas[0] = fs.equipmentId; datas[1] = fs.quality; datas[2] = fs.pos; datas[3] = fs.production; datas[4] = fs.attack; datas[5] = fs.defen...
/// @dev Get fashion attrs by tokenId
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 16549, 17187 ] }
846
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
getOwnFashions
function getOwnFashions(address _owner) external view returns(uint256[] tokens, uint32[] flags) { require(_owner != address(0)); uint256[] storage fsArray = ownerToFashionArray[_owner]; uint256 length = fsArray.length; tokens = new uint256[](length); flags = new uint32[](length); for (uint...
/// @dev Get tokenIds and flags by owner
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 17238, 17831 ] }
847
RaceToken
RaceToken.sol
0x5ad89bb4f55a33320e076068636ed7314cd2922c
Solidity
RaceToken
contract RaceToken is ERC721, AccessAdmin { /// @dev The equipment info struct Fashion { uint16 equipmentId; // 0 Equipment ID uint16 quality; // 1 Rarity: 1 Coarse/2 Good/3 Rare/4 Epic/5 Legendary If car /1 T1 /2 T2 /3 T3 /4 T4 /5 T5 /6 T6 /7 free uint...
/* equipmentId /* 10001 T1 /* 10002 T2 /* 10003 T3 /* 10004 T4 /* 10005 T5 /* 10006 T6 /* 10007 freeCar /* ==================================================================== */
Comment
getFashionsAttrs
function getFashionsAttrs(uint256[] _tokens) external view returns(uint16[] attrs) { uint256 length = _tokens.length; require(length <= 64); attrs = new uint16[](length * 13); uint256 tokenId; uint256 index; for (uint256 i = 0; i < length; ++i) { tokenId = _tokens[i]; if ...
/// @dev Race token info returned based on Token ID transfered (64 at most)
NatSpecSingleLine
v0.4.24+commit.e67f0147
bzzr://f7b34676bca76b0201237770d21e20b4e00a74dd0fef65b0819874bf70a7e701
{ "func_code_index": [ 17917, 19108 ] }
848
StakingPool
StakingPool.sol
0x47cd7e91c3cbaaf266369fe8518345fc4fc12935
Solidity
StakingPool
contract StakingPool { // ERC20 stuff // Constants string public constant name = "Ambire Wallet Staking Token"; uint8 public constant decimals = 18; string public constant symbol = "xWALLET"; // Mutable variables uint public totalSupply; mapping(address => uint) private balances; mapping(address => ...
balanceOf
function balanceOf(address owner) external view returns (uint balance) { return balances[owner]; }
// ERC20 methods
LineComment
v0.8.7+commit.e28d00a7
None
ipfs://192b614c5e30cea5d75dfac12ba14851b6bd18631decd0a117c18f1520a9b22f
{ "func_code_index": [ 864, 969 ] }
849
StakingPool
StakingPool.sol
0x47cd7e91c3cbaaf266369fe8518345fc4fc12935
Solidity
StakingPool
contract StakingPool { // ERC20 stuff // Constants string public constant name = "Ambire Wallet Staking Token"; uint8 public constant decimals = 18; string public constant symbol = "xWALLET"; // Mutable variables uint public totalSupply; mapping(address => uint) private balances; mapping(address => ...
permit
function permit(address owner, address spender, uint amount, uint deadline, uint8 v, bytes32 r, bytes32 s) external { require(deadline >= block.timestamp, "DEADLINE_EXPIRED"); bytes32 digest = keccak256(abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR, keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, am...
// EIP 2612
LineComment
v0.8.7+commit.e28d00a7
None
ipfs://192b614c5e30cea5d75dfac12ba14851b6bd18631decd0a117c18f1520a9b22f
{ "func_code_index": [ 1912, 2514 ] }
850
StakingPool
StakingPool.sol
0x47cd7e91c3cbaaf266369fe8518345fc4fc12935
Solidity
StakingPool
contract StakingPool { // ERC20 stuff // Constants string public constant name = "Ambire Wallet Staking Token"; uint8 public constant decimals = 18; string public constant symbol = "xWALLET"; // Mutable variables uint public totalSupply; mapping(address => uint) private balances; mapping(address => ...
innerMint
function innerMint(address owner, uint amount) internal { totalSupply = totalSupply + amount; balances[owner] = balances[owner] + amount; // Because of https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md#transfer-1 emit Transfer(address(0), owner, amount); }
// Inner
LineComment
v0.8.7+commit.e28d00a7
None
ipfs://192b614c5e30cea5d75dfac12ba14851b6bd18631decd0a117c18f1520a9b22f
{ "func_code_index": [ 2528, 2810 ] }
851
StakingPool
StakingPool.sol
0x47cd7e91c3cbaaf266369fe8518345fc4fc12935
Solidity
StakingPool
contract StakingPool { // ERC20 stuff // Constants string public constant name = "Ambire Wallet Staking Token"; uint8 public constant decimals = 18; string public constant symbol = "xWALLET"; // Mutable variables uint public totalSupply; mapping(address => uint) private balances; mapping(address => ...
setGovernance
function setGovernance(address addr) external { require(governance == msg.sender, "NOT_GOVERNANCE"); governance = addr; }
// Governance functions
LineComment
v0.8.7+commit.e28d00a7
None
ipfs://192b614c5e30cea5d75dfac12ba14851b6bd18631decd0a117c18f1520a9b22f
{ "func_code_index": [ 4583, 4714 ] }
852
StakingPool
StakingPool.sol
0x47cd7e91c3cbaaf266369fe8518345fc4fc12935
Solidity
StakingPool
contract StakingPool { // ERC20 stuff // Constants string public constant name = "Ambire Wallet Staking Token"; uint8 public constant decimals = 18; string public constant symbol = "xWALLET"; // Mutable variables uint public totalSupply; mapping(address => uint) private balances; mapping(address => ...
shareValue
function shareValue() external view returns (uint) { if (totalSupply == 0) return 0; return ((WALLET.balanceOf(address(this)) + WALLET.supplyController().mintableVesting(address(this), vestingEnd, vestingAmountPerSec)) * 1e18) / totalSupply; }
// Pool stuff
LineComment
v0.8.7+commit.e28d00a7
None
ipfs://192b614c5e30cea5d75dfac12ba14851b6bd18631decd0a117c18f1520a9b22f
{ "func_code_index": [ 5367, 5628 ] }
853
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit Owne...
owner
function owner() public view returns (address) { return _owner; }
/** * @dev Returns the address of the current owner. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 445, 529 ] }
854
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit Owne...
renounceOwnership
function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); }
/** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 1085, 1230 ] }
855
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
Ownable
contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit Owne...
transferOwnership
function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; }
/** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 1380, 1621 ] }
856
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
totalSupply
function totalSupply() external view returns (uint256);
/** * @dev Returns the amount of tokens in existence. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 94, 154 ] }
857
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
balanceOf
function balanceOf(address account) external view returns (uint256);
/** * @dev Returns the amount of tokens owned by `account`. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 237, 310 ] }
858
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
transfer
function transfer(address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 534, 616 ] }
859
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
allowance
function allowance(address owner, address spender) external view returns (uint256);
/** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 895, 983 ] }
860
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
approve
function approve(address spender, uint256 amount) external returns (bool);
/** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate ...
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 1647, 1726 ] }
861
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
IERC20
interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /**...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 2039, 2141 ] }
862
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ con...
name
function name() public view returns (string memory) { return _name; }
/** * @dev Returns the name of the token. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 550, 638 ] }
863
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ con...
symbol
function symbol() public view returns (string memory) { return _symbol; }
/** * @dev Returns the symbol of the token, usually a shorter version of the * name. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 752, 844 ] }
864
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20Detailed
contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ con...
decimals
function decimals() public view returns (uint8) { return _decimals; }
/** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. * *...
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 1402, 1490 ] }
865
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pu...
totalSupply
function totalSupply() public view returns (uint256) { return _totalSupply; }
/** * @dev See {IERC20-totalSupply}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 291, 387 ] }
866
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pu...
balanceOf
function balanceOf(address account) public view returns (uint256) { return _balances[account]; }
/** * @dev See {IERC20-balanceOf}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 445, 560 ] }
867
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pu...
transfer
function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(msg.sender, recipient, amount); return true; }
/** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 768, 929 ] }
868
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pu...
allowance
function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; }
/** * @dev See {IERC20-allowance}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 987, 1126 ] }
869
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pu...
approve
function approve(address spender, uint256 value) public returns (bool) { _approve(msg.sender, spender, value); return true; }
/** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 1268, 1421 ] }
870
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pu...
transferFrom
function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount)); return true; }
/** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `valu...
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 1887, 2148 ] }
871
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pu...
increaseAllowance
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; }
/** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 2552, 2763 ] }
872
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pu...
decreaseAllowance
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); return true; }
/** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` c...
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 3261, 3482 ] }
873
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pu...
_transfer
function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] ...
/** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. *...
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 3967, 4401 ] }
874
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pu...
_mint
function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); }
/** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 4677, 4990 ] }
875
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pu...
_burn
function _burn(address account, uint256 value) internal { require(account != address(0), "ERC20: burn from the zero address"); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); }
/** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 5318, 5629 ] }
876
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pu...
_approve
function _approve(address owner, address spender, uint256 value) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); }
/** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero...
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 6064, 6404 ] }
877
Token8848
Token8848.sol
0x38d4cdc85656467e46337793a0dd53376f8b58e5
Solidity
ERC20
contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 internal _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() pu...
_burnFrom
function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); }
/** * @dev Destoys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See {_burn} and {_approve}. */
NatSpecMultiLine
v0.5.17+commit.d19bba13
MIT
bzzr://a4063894cf2d9850c904fd6b7970ba14389dcef975278759fcb7d1b37dcc5374
{ "func_code_index": [ 6584, 6777 ] }
878
DOSXToken
DOSXToken.sol
0x6a807ae567fd14d7bb7b9559416321cac07edd70
Solidity
DOSXToken
contract DOSXToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
DOSXToken
function DOSXToken() public { symbol = "DOSX"; name = "DOSXToken"; decimals = 18; _totalSupply = 12000000000000000000000000; balances[0xF58a749AB4929b462F33b8A07f1e3b568ed8eC43] = _totalSupply; Transfer(address(0), 0xF58a749AB4929b462F33b8A07f1e3b568ed8eC43, _totalSupply); }
// ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://e9598a9ef5a2c085656cfd07e6b2485d41937dd9348143fd5d4af0cf0637b9fa
{ "func_code_index": [ 456, 795 ] }
879
DOSXToken
DOSXToken.sol
0x6a807ae567fd14d7bb7b9559416321cac07edd70
Solidity
DOSXToken
contract DOSXToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
totalSupply
function totalSupply() public constant returns (uint) { return _totalSupply - balances[address(0)]; }
// ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://e9598a9ef5a2c085656cfd07e6b2485d41937dd9348143fd5d4af0cf0637b9fa
{ "func_code_index": [ 983, 1104 ] }
880
DOSXToken
DOSXToken.sol
0x6a807ae567fd14d7bb7b9559416321cac07edd70
Solidity
DOSXToken
contract DOSXToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
balanceOf
function balanceOf(address tokenOwner) public constant returns (uint balance) { return balances[tokenOwner]; }
// ------------------------------------------------------------------------ // Get the token balance for account tokenOwner // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://e9598a9ef5a2c085656cfd07e6b2485d41937dd9348143fd5d4af0cf0637b9fa
{ "func_code_index": [ 1324, 1453 ] }
881
DOSXToken
DOSXToken.sol
0x6a807ae567fd14d7bb7b9559416321cac07edd70
Solidity
DOSXToken
contract DOSXToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transfer
function transfer(address to, uint tokens) public returns (bool success) { balances[msg.sender] = safeSub(balances[msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(msg.sender, to, tokens); return true; }
// ------------------------------------------------------------------------ // Transfer the balance from token owner's account to to account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://e9598a9ef5a2c085656cfd07e6b2485d41937dd9348143fd5d4af0cf0637b9fa
{ "func_code_index": [ 1797, 2074 ] }
882
DOSXToken
DOSXToken.sol
0x6a807ae567fd14d7bb7b9559416321cac07edd70
Solidity
DOSXToken
contract DOSXToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approve
function approve(address spender, uint tokens) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double...
LineComment
v0.4.24+commit.e67f0147
bzzr://e9598a9ef5a2c085656cfd07e6b2485d41937dd9348143fd5d4af0cf0637b9fa
{ "func_code_index": [ 2582, 2790 ] }
883
DOSXToken
DOSXToken.sol
0x6a807ae567fd14d7bb7b9559416321cac07edd70
Solidity
DOSXToken
contract DOSXToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferFrom
function transferFrom(address from, address to, uint tokens) public returns (bool success) { balances[from] = safeSub(balances[from], tokens); allowed[from][msg.sender] = safeSub(allowed[from][msg.sender], tokens); balances[to] = safeAdd(balances[to], tokens); Transfer(from, to, tokens); return...
// ------------------------------------------------------------------------ // Transfer tokens from the from account to the to account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the from account and // - From account must have sufficient balance to transfer // - S...
LineComment
v0.4.24+commit.e67f0147
bzzr://e9598a9ef5a2c085656cfd07e6b2485d41937dd9348143fd5d4af0cf0637b9fa
{ "func_code_index": [ 3321, 3679 ] }
884
DOSXToken
DOSXToken.sol
0x6a807ae567fd14d7bb7b9559416321cac07edd70
Solidity
DOSXToken
contract DOSXToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
allowance
function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][spender]; }
// ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://e9598a9ef5a2c085656cfd07e6b2485d41937dd9348143fd5d4af0cf0637b9fa
{ "func_code_index": [ 3962, 4118 ] }
885
DOSXToken
DOSXToken.sol
0x6a807ae567fd14d7bb7b9559416321cac07edd70
Solidity
DOSXToken
contract DOSXToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
approveAndCall
function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { allowed[msg.sender][spender] = tokens; Approval(msg.sender, spender, tokens); ApproveAndCallFallBack(spender).receiveApproval(msg.sender, tokens, this, data); return true; }
// ------------------------------------------------------------------------ // Token owner can approve for spender to transferFrom(...) tokens // from the token owner's account. The spender contract function // receiveApproval(...) is then executed // --------------------------------------------------------------------...
LineComment
v0.4.24+commit.e67f0147
bzzr://e9598a9ef5a2c085656cfd07e6b2485d41937dd9348143fd5d4af0cf0637b9fa
{ "func_code_index": [ 4473, 4790 ] }
886
DOSXToken
DOSXToken.sol
0x6a807ae567fd14d7bb7b9559416321cac07edd70
Solidity
DOSXToken
contract DOSXToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
function () public payable { revert(); }
// ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://e9598a9ef5a2c085656cfd07e6b2485d41937dd9348143fd5d4af0cf0637b9fa
{ "func_code_index": [ 4982, 5041 ] }
887
DOSXToken
DOSXToken.sol
0x6a807ae567fd14d7bb7b9559416321cac07edd70
Solidity
DOSXToken
contract DOSXToken is ERC20Interface, Owned, SafeMath { string public symbol; string public name; uint8 public decimals; uint public _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; // ---------------------------------------...
// ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ----------------------------------------------------------------------------
LineComment
transferAnyERC20Token
function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return ERC20Interface(tokenAddress).transfer(owner, tokens); }
// ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------
LineComment
v0.4.24+commit.e67f0147
bzzr://e9598a9ef5a2c085656cfd07e6b2485d41937dd9348143fd5d4af0cf0637b9fa
{ "func_code_index": [ 5274, 5463 ] }
888
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
IERC165
interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This f...
/** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool);
/** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 374, 455 ] }
889
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
ERC165
abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
/** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interface...
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 103, 265 ] }
890
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
IERC1155Receiver
interface IERC1155Receiver is IERC165 { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(addre...
/** * @dev _Available since v3.1._ */
NatSpecMultiLine
onERC1155Received
function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4);
/** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own func...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 875, 1065 ] }
891
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
IERC1155Receiver
interface IERC1155Receiver is IERC165 { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(addre...
/** * @dev _Available since v3.1._ */
NatSpecMultiLine
onERC1155BatchReceived
function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4);
/** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc1...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 2063, 2282 ] }
892
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
ERC1155Receiver
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155Receiver).interfaceId || super.su...
/** * @dev _Available since v3.1._ */
NatSpecMultiLine
supportsInterface
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId); }
/** * @dev See {IERC165-supportsInterface}. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 129, 357 ] }
893
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryAdd
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } }
/** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 161, 388 ] }
894
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
trySub
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } }
/** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 536, 735 ] }
895
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMul
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 ...
/** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 885, 1393 ] }
896
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryDiv
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } }
/** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 1544, 1744 ] }
897
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
tryMod
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } }
/** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 1905, 2105 ] }
898
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
add
function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; }
/** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 2347, 2450 ] }
899
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; }
/** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 2728, 2831 ] }
900
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
mul
function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; }
/** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 3085, 3188 ] }
901
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; }
/** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 3484, 3587 ] }
902
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consu...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 4049, 4152 ] }
903
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
sub
function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } }
/** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterp...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 4626, 4871 ] }
904
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
div
function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } }
/** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 5364, 5608 ] }
905
DutchAuction
DutchAuction.sol
0x0ead3984384ba026feb5d2e1022b28abe2f11cb3
Solidity
SafeMath
library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) ...
/** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */
NatSpecMultiLine
mod
function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } }
/** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. ...
NatSpecMultiLine
v0.8.7+commit.e28d00a7
MIT
ipfs://0a6fd78671f82266286c87785c5f9c329dc6715c7ea1d5ebb50323b92528d1fa
{ "func_code_index": [ 6266, 6510 ] }
906