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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
BERTCLUBCOIN | BERTCLUBCOIN.sol | 0x1a057180e7d092427289d9dd22bc6afb2188a9b8 | Solidity | BERTCLUBCOIN | contract BERTCLUBCOIN is ERC223, Ownable {
using SafeMath for uint256;
string public name = "BERT CLUB COIN";
string public symbol = "BCC";
uint8 public decimals = 18;
uint256 public totalSupply = 8e9 * 1e18;
uint256 public distributeAmount = 0;
bool public mintingFinished = false;
... | /**
* @title BERT CLUB COIN
*/ | NatSpecMultiLine | collectTokens | function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) {
require(addresses.length > 0
&& addresses.length == amounts.length);
uint256 totalAmount = 0;
for (uint j = 0; j < addresses.length; j++) {
require(amounts[j] > 0
... | /**
* @dev Function to collect tokens from the list of addresses
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d | {
"func_code_index": [
11257,
12194
]
} | 6,800 | |
BERTCLUBCOIN | BERTCLUBCOIN.sol | 0x1a057180e7d092427289d9dd22bc6afb2188a9b8 | Solidity | BERTCLUBCOIN | contract BERTCLUBCOIN is ERC223, Ownable {
using SafeMath for uint256;
string public name = "BERT CLUB COIN";
string public symbol = "BCC";
uint8 public decimals = 18;
uint256 public totalSupply = 8e9 * 1e18;
uint256 public distributeAmount = 0;
bool public mintingFinished = false;
... | /**
* @title BERT CLUB COIN
*/ | NatSpecMultiLine | autoDistribute | function autoDistribute() payable public {
require(distributeAmount > 0
&& balanceOf[owner] >= distributeAmount
&& frozenAccount[msg.sender] == false
&& now > unlockUnixTime[msg.sender]);
if(msg.value > 0) owner.transfer(msg.value);
balanceOf[owner] = bala... | /**
* @dev Function to distribute tokens to the msg.sender automatically
* If distributeAmount is 0, this function doesn't work
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d | {
"func_code_index": [
12484,
13009
]
} | 6,801 | |
BERTCLUBCOIN | BERTCLUBCOIN.sol | 0x1a057180e7d092427289d9dd22bc6afb2188a9b8 | Solidity | BERTCLUBCOIN | contract BERTCLUBCOIN is ERC223, Ownable {
using SafeMath for uint256;
string public name = "BERT CLUB COIN";
string public symbol = "BCC";
uint8 public decimals = 18;
uint256 public totalSupply = 8e9 * 1e18;
uint256 public distributeAmount = 0;
bool public mintingFinished = false;
... | /**
* @title BERT CLUB COIN
*/ | NatSpecMultiLine | function() payable public {
autoDistribute();
}
| /**
* @dev fallback function
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://3810fb7fe1099a429d2e6879ac66a7c25d82d2ca919bc3dd11f523fa6d8db39d | {
"func_code_index": [
13061,
13128
]
} | 6,802 | ||
PaymentSplitter | contracts/paymentSplitterOld/PaymentSplitter.sol | 0x5d4aa08db128a9960364e1ff270af6ab676d38ee | Solidity | PaymentSplitter | contract PaymentSplitter {
using SafeMath for uint256;
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => ui... | /**
* @title PaymentSplitter
* @dev This contract can be used when payments need to be received by a group
* of people and split proportionately to some number of shares they own.
*/ | NatSpecMultiLine | function () external payable {
emit PaymentReceived(msg.sender, msg.value);
}
| /**
* @dev payable fallback
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | MIT | bzzr://1e43c12540b099c68623de39788454e39d4369bc03e2afbe91008790d59188f3 | {
"func_code_index": [
760,
848
]
} | 6,803 | |
PaymentSplitter | contracts/paymentSplitterOld/PaymentSplitter.sol | 0x5d4aa08db128a9960364e1ff270af6ab676d38ee | Solidity | PaymentSplitter | contract PaymentSplitter {
using SafeMath for uint256;
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => ui... | /**
* @title PaymentSplitter
* @dev This contract can be used when payments need to be received by a group
* of people and split proportionately to some number of shares they own.
*/ | NatSpecMultiLine | totalShares | function totalShares() public view returns(uint256) {
return _totalShares;
}
| /**
* @return the total shares of the contract.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | MIT | bzzr://1e43c12540b099c68623de39788454e39d4369bc03e2afbe91008790d59188f3 | {
"func_code_index": [
913,
1000
]
} | 6,804 |
PaymentSplitter | contracts/paymentSplitterOld/PaymentSplitter.sol | 0x5d4aa08db128a9960364e1ff270af6ab676d38ee | Solidity | PaymentSplitter | contract PaymentSplitter {
using SafeMath for uint256;
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => ui... | /**
* @title PaymentSplitter
* @dev This contract can be used when payments need to be received by a group
* of people and split proportionately to some number of shares they own.
*/ | NatSpecMultiLine | totalReleased | function totalReleased() public view returns(uint256) {
return _totalReleased;
}
| /**
* @return the total amount already released.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | MIT | bzzr://1e43c12540b099c68623de39788454e39d4369bc03e2afbe91008790d59188f3 | {
"func_code_index": [
1066,
1157
]
} | 6,805 |
PaymentSplitter | contracts/paymentSplitterOld/PaymentSplitter.sol | 0x5d4aa08db128a9960364e1ff270af6ab676d38ee | Solidity | PaymentSplitter | contract PaymentSplitter {
using SafeMath for uint256;
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => ui... | /**
* @title PaymentSplitter
* @dev This contract can be used when payments need to be received by a group
* of people and split proportionately to some number of shares they own.
*/ | NatSpecMultiLine | shares | function shares(address account) public view returns(uint256) {
return _shares[account];
}
| /**
* @return the shares of an account.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | MIT | bzzr://1e43c12540b099c68623de39788454e39d4369bc03e2afbe91008790d59188f3 | {
"func_code_index": [
1214,
1315
]
} | 6,806 |
PaymentSplitter | contracts/paymentSplitterOld/PaymentSplitter.sol | 0x5d4aa08db128a9960364e1ff270af6ab676d38ee | Solidity | PaymentSplitter | contract PaymentSplitter {
using SafeMath for uint256;
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => ui... | /**
* @title PaymentSplitter
* @dev This contract can be used when payments need to be received by a group
* of people and split proportionately to some number of shares they own.
*/ | NatSpecMultiLine | released | function released(address account) public view returns(uint256) {
return _released[account];
}
| /**
* @return the amount already released to an account.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | MIT | bzzr://1e43c12540b099c68623de39788454e39d4369bc03e2afbe91008790d59188f3 | {
"func_code_index": [
1389,
1494
]
} | 6,807 |
PaymentSplitter | contracts/paymentSplitterOld/PaymentSplitter.sol | 0x5d4aa08db128a9960364e1ff270af6ab676d38ee | Solidity | PaymentSplitter | contract PaymentSplitter {
using SafeMath for uint256;
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => ui... | /**
* @title PaymentSplitter
* @dev This contract can be used when payments need to be received by a group
* of people and split proportionately to some number of shares they own.
*/ | NatSpecMultiLine | payee | function payee(uint256 index) public view returns(address) {
return _payees[index];
}
| /**
* @return the address of a payee.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | MIT | bzzr://1e43c12540b099c68623de39788454e39d4369bc03e2afbe91008790d59188f3 | {
"func_code_index": [
1549,
1645
]
} | 6,808 |
PaymentSplitter | contracts/paymentSplitterOld/PaymentSplitter.sol | 0x5d4aa08db128a9960364e1ff270af6ab676d38ee | Solidity | PaymentSplitter | contract PaymentSplitter {
using SafeMath for uint256;
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => ui... | /**
* @title PaymentSplitter
* @dev This contract can be used when payments need to be received by a group
* of people and split proportionately to some number of shares they own.
*/ | NatSpecMultiLine | release | function release(address account) public {
require(_shares[account] > 0);
uint256 totalReceived = address(this).balance.add(_totalReleased);
uint256 payment = totalReceived.mul(
_shares[account]).div(
_totalShares).sub(
_released[account]
);
require(payment != 0);
_released[... | /**
* @dev Release one of the payee's proportional payment.
* @param account Whose payments will be released.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | MIT | bzzr://1e43c12540b099c68623de39788454e39d4369bc03e2afbe91008790d59188f3 | {
"func_code_index": [
1776,
2295
]
} | 6,809 |
PaymentSplitter | contracts/paymentSplitterOld/PaymentSplitter.sol | 0x5d4aa08db128a9960364e1ff270af6ab676d38ee | Solidity | PaymentSplitter | contract PaymentSplitter {
using SafeMath for uint256;
event PayeeAdded(address account, uint256 shares);
event PaymentReleased(address to, uint256 amount);
event PaymentReceived(address from, uint256 amount);
uint256 private _totalShares;
uint256 private _totalReleased;
mapping(address => ui... | /**
* @title PaymentSplitter
* @dev This contract can be used when payments need to be received by a group
* of people and split proportionately to some number of shares they own.
*/ | NatSpecMultiLine | _addPayee | function _addPayee(address account, uint256 shares_) private {
require(account != address(0));
require(shares_ > 0);
require(_shares[account] == 0);
_payees.push(account);
_shares[account] = shares_;
_totalShares = _totalShares.add(shares_);
emit PayeeAdded(account, shares_);
}
| /**
* @dev Add a new payee to the contract.
* @param account The address of the payee to add.
* @param shares_ The number of shares owned by the payee.
*/ | NatSpecMultiLine | v0.4.24+commit.e67f0147 | MIT | bzzr://1e43c12540b099c68623de39788454e39d4369bc03e2afbe91008790d59188f3 | {
"func_code_index": [
2472,
2793
]
} | 6,810 |
PicklePunk | contracts/PicklePunk.sol | 0x7c2e0aa2ba79e9b2c4ce5008caffa9478d63480a | Solidity | PicklePunk | contract PicklePunk is ERC721Enumerable, Ownable {
using Strings for uint256;
string private baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public preSaleCost = 0.1 ether;
uint256 public cost = 0.2 ether;
uint256 public maxSupply = 9999;
uint256 public preS... | _baseURI | function _baseURI() internal view virtual override returns (string memory) {
return baseURI;
}
| // INTERNAL | LineComment | v0.8.0+commit.c7dfd78e | GNU GPLv3 | ipfs://fc42fcdc1e3bc89de01921f9c464117471ddff145e27880c65273d728be0bd44 | {
"func_code_index": [
1385,
1490
]
} | 6,811 | ||
PicklePunk | contracts/PicklePunk.sol | 0x7c2e0aa2ba79e9b2c4ce5008caffa9478d63480a | Solidity | PicklePunk | contract PicklePunk is ERC721Enumerable, Ownable {
using Strings for uint256;
string private baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public preSaleCost = 0.1 ether;
uint256 public cost = 0.2 ether;
uint256 public maxSupply = 9999;
uint256 public preS... | mint | function mint(uint256 _mintAmount)
public
payable
notPaused
saleStarted
minimumMintAmount(_mintAmount)
{
uint256 supply = totalSupply();
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
//Do some validations depending on which step of the sale we are in
block.timestamp < public... | //MINT | LineComment | v0.8.0+commit.c7dfd78e | GNU GPLv3 | ipfs://fc42fcdc1e3bc89de01921f9c464117471ddff145e27880c65273d728be0bd44 | {
"func_code_index": [
2682,
3389
]
} | 6,812 | ||
PicklePunk | contracts/PicklePunk.sol | 0x7c2e0aa2ba79e9b2c4ce5008caffa9478d63480a | Solidity | PicklePunk | contract PicklePunk is ERC721Enumerable, Ownable {
using Strings for uint256;
string private baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public preSaleCost = 0.1 ether;
uint256 public cost = 0.2 ether;
uint256 public maxSupply = 9999;
uint256 public preS... | isWhitelisted | function isWhitelisted(address _user) public view returns (bool) {
return whitelistedAddresses[_user];
}
| //PUBLIC VIEWS | LineComment | v0.8.0+commit.c7dfd78e | GNU GPLv3 | ipfs://fc42fcdc1e3bc89de01921f9c464117471ddff145e27880c65273d728be0bd44 | {
"func_code_index": [
3815,
3930
]
} | 6,813 | ||
PicklePunk | contracts/PicklePunk.sol | 0x7c2e0aa2ba79e9b2c4ce5008caffa9478d63480a | Solidity | PicklePunk | contract PicklePunk is ERC721Enumerable, Ownable {
using Strings for uint256;
string private baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public preSaleCost = 0.1 ether;
uint256 public cost = 0.2 ether;
uint256 public maxSupply = 9999;
uint256 public preS... | getBaseURI | function getBaseURI() public view onlyOwner returns (string memory) {
return baseURI;
}
| //ONLY OWNER VIEWS | LineComment | v0.8.0+commit.c7dfd78e | GNU GPLv3 | ipfs://fc42fcdc1e3bc89de01921f9c464117471ddff145e27880c65273d728be0bd44 | {
"func_code_index": [
5035,
5133
]
} | 6,814 | ||
PicklePunk | contracts/PicklePunk.sol | 0x7c2e0aa2ba79e9b2c4ce5008caffa9478d63480a | Solidity | PicklePunk | contract PicklePunk is ERC721Enumerable, Ownable {
using Strings for uint256;
string private baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
uint256 public preSaleCost = 0.1 ether;
uint256 public cost = 0.2 ether;
uint256 public maxSupply = 9999;
uint256 public preS... | reveal | function reveal() public onlyOwner {
revealed = true;
}
| //ONLY OWNER SETTERS | LineComment | v0.8.0+commit.c7dfd78e | GNU GPLv3 | ipfs://fc42fcdc1e3bc89de01921f9c464117471ddff145e27880c65273d728be0bd44 | {
"func_code_index": [
5277,
5343
]
} | 6,815 | ||
TXT | TXT.sol | 0xb12907dcd65e09871bbd6f1659436f3be310af65 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
// use SafeMath to avoid uint256 overflow
using SafeMath for uint256;
// balances of every address
mapping(address => uint256) balances;
// total number of token
uint256 totalSupply_;
// return total number of token
function totalSupply() public v... | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| // return total number of token | LineComment | v0.4.23+commit.124ca40d | bzzr://3f249f30d149bd8c75e0f9c30c809c04214fd0d6912be1b60b99451d76827413 | {
"func_code_index": [
288,
372
]
} | 6,816 | |||
TXT | TXT.sol | 0xb12907dcd65e09871bbd6f1659436f3be310af65 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
// use SafeMath to avoid uint256 overflow
using SafeMath for uint256;
// balances of every address
mapping(address => uint256) balances;
// total number of token
uint256 totalSupply_;
// return total number of token
function totalSupply() public v... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
// if you want to destroy tokens, use burn replace transfer to address 0
require(_to != address(0));
// can not transfer to self
require(_to != msg.sender);
require(_value <= balances[msg.sender]);
// SafeMath.sub will throw if ther... | // transfer _value tokens to _to from msg.sender | LineComment | v0.4.23+commit.124ca40d | bzzr://3f249f30d149bd8c75e0f9c30c809c04214fd0d6912be1b60b99451d76827413 | {
"func_code_index": [
426,
947
]
} | 6,817 | |||
TXT | TXT.sol | 0xb12907dcd65e09871bbd6f1659436f3be310af65 | Solidity | BasicToken | contract BasicToken is ERC20Basic {
// use SafeMath to avoid uint256 overflow
using SafeMath for uint256;
// balances of every address
mapping(address => uint256) balances;
// total number of token
uint256 totalSupply_;
// return total number of token
function totalSupply() public v... | balanceOf | function balanceOf(address _owner) public view returns (uint256 balance) {
return balances[_owner];
}
| // return _owner how many tokens | LineComment | v0.4.23+commit.124ca40d | bzzr://3f249f30d149bd8c75e0f9c30c809c04214fd0d6912be1b60b99451d76827413 | {
"func_code_index": [
985,
1093
]
} | 6,818 | |||
TXT | TXT.sol | 0xb12907dcd65e09871bbd6f1659436f3be310af65 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_from != _to);
require(_value <= balances[_from]);
require(_... | // refer: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol | LineComment | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 | LineComment | v0.4.23+commit.124ca40d | bzzr://3f249f30d149bd8c75e0f9c30c809c04214fd0d6912be1b60b99451d76827413 | {
"func_code_index": [
660,
847
]
} | 6,819 | |
TXT | TXT.sol | 0xb12907dcd65e09871bbd6f1659436f3be310af65 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_from != _to);
require(_value <= balances[_from]);
require(_... | // refer: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol | LineComment | allowance | function allowance(address _owner, address _spender) public view returns (uint256) {
return allowed[_owner][_spender];
}
| // return how many tokens _owner approve to _spender | LineComment | v0.4.23+commit.124ca40d | bzzr://3f249f30d149bd8c75e0f9c30c809c04214fd0d6912be1b60b99451d76827413 | {
"func_code_index": [
908,
1035
]
} | 6,820 | |
TXT | TXT.sol | 0xb12907dcd65e09871bbd6f1659436f3be310af65 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_from != _to);
require(_value <= balances[_from]);
require(_... | // refer: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol | LineComment | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| // increase approval to _spender | LineComment | v0.4.23+commit.124ca40d | bzzr://3f249f30d149bd8c75e0f9c30c809c04214fd0d6912be1b60b99451d76827413 | {
"func_code_index": [
1076,
1337
]
} | 6,821 | |
TXT | TXT.sol | 0xb12907dcd65e09871bbd6f1659436f3be310af65 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_from != _to);
require(_value <= balances[_from]);
require(_... | // refer: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol | LineComment | decreaseApproval | function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}
emit Approval(msg.sen... | // decrease approval to _spender | LineComment | v0.4.23+commit.124ca40d | bzzr://3f249f30d149bd8c75e0f9c30c809c04214fd0d6912be1b60b99451d76827413 | {
"func_code_index": [
1378,
1773
]
} | 6,822 | |
TXT | TXT.sol | 0xb12907dcd65e09871bbd6f1659436f3be310af65 | Solidity | TXT | contract TXT is PausableToken {
using SafeMath for uint256;
string public constant name = 'TXT';
string public constant symbol = 'TXT';
uint public constant decimals = 4;
uint public constant INITIAL_SUPPLY = 50*10**12;
constructor() public {
totalSupply_ = INITIAL_SUPPLY;
balances[owner] = to... | function () public {
revert();
}
| // revert error pay | LineComment | v0.4.23+commit.124ca40d | bzzr://3f249f30d149bd8c75e0f9c30c809c04214fd0d6912be1b60b99451d76827413 | {
"func_code_index": [
1734,
1785
]
} | 6,823 | ||||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://githu... | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
if (a == 0) {
return 0;
}
c = a... | /**
* @dev Multiplies two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
89,
476
]
} | 6,824 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://githu... | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
// assert(b > 0); // Solidity automatically throws when dividing by 0
// uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return a / b;
}
| /**
* @dev Integer division of two numbers, truncating the quotient.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
560,
840
]
} | 6,825 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://githu... | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
assert(b <= a);
return a - b;
}
| /**
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
954,
1070
]
} | 6,826 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | SafeMath | library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://githu... | add | function add(uint256 a, uint256 b) internal pure returns (uint256 c) {
c = a + b;
assert(c >= a);
return c;
}
| /**
* @dev Adds two numbers, throws on overflow.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
1134,
1264
]
} | 6,827 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | renounceOwnership | function renounceOwnership() public onlyOwner {
emit OwnershipRenounced(owner);
owner = address(0);
}
| /**
* @dev Allows the current owner to relinquish control of the contract.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
638,
755
]
} | 6,828 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | transferOwnership | function transferOwnership(address _newOwner) public onlyOwner {
_transferOwnership(_newOwner);
}
| /**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
920,
1028
]
} | 6,829 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | Ownable | contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* a... | _transferOwnership | function _transferOwnership(address _newOwner) internal {
require(_newOwner != address(0));
emit OwnershipTransferred(owner, _newOwner);
owner = _newOwner;
}
| /**
* @dev Transfers control of the contract to a newOwner.
* @param _newOwner The address to transfer ownership to.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
1166,
1344
]
} | 6,830 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | Pausable | contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function ... | pause | function pause() onlyOwner whenNotPaused public {
paused = true;
emit Pause();
}
| /**
* @dev called by the owner to pause, triggers stopped state
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
513,
609
]
} | 6,831 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | Pausable | contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function ... | unpause | function unpause() onlyOwner whenPaused public {
paused = false;
emit Unpause();
}
| /**
* @dev called by the owner to unpause, returns to normal state
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
693,
791
]
} | 6,832 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | totalSupply | function totalSupply() public view returns (uint256) {
return totalSupply_;
}
| /**
* @dev total number of tokens in existence
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
199,
287
]
} | 6,833 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | transfer | function transfer(address _to, uint256 _value) public returns (bool) {
require(_to != address(0));
require(_value <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender].sub(_value);
balances[_to] = balances[_to].add(_value);
emit Transfer(msg.sender, _to, _value);
return true;
}
| /**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
445,
777
]
} | 6,834 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | BasicToken | contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
return totalSupply_;
}
/**
* @dev transfer token... | balanceOf | function balanceOf(address _owner) public view returns (uint256) {
return balances[_owner];
}
| /**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
983,
1087
]
} | 6,835 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | 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(_v... | /**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/ | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
401,
891
]
} | 6,836 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | approve | function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
| /**
* @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.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
1523,
1718
]
} | 6,837 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | 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.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
2042,
2207
]
} | 6,838 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | increaseApproval | function increaseApproval(
address _spender,
uint _addedValue
)
public
returns (bool)
{
allowed[msg.sender][_spender] = (
allowed[msg.sender][_spender].add(_addedValue));
emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
2673,
2980
]
} | 6,839 | ||
APCCToken | APCCToken.sol | 0x3b6c9f641d4d2d1429d59420c723e6a29fc6b9ff | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transf... | decreaseApproval | function decreaseApproval(
address _spender,
uint _subtractedValue
)
public
returns (bool)
{
uint oldValue = allowed[msg.sender][_spender];
if (_subtractedValue > oldValue) {
allowed[msg.sender][_spender] = 0;
} else {
allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
}... | /**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spend... | NatSpecMultiLine | v0.4.26+commit.4563c3fc | None | bzzr://93b89bf3073b7480da5963cd786b8ecc24338b44cac583f1ae7101558f4eb503 | {
"func_code_index": [
3451,
3894
]
} | 6,840 | ||
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | 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 function... | /**
* @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.6.12+commit.27d51765 | MIT | {
"func_code_index": [
365,
445
]
} | 6,841 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address owner) external view returns (uint256 balance);
| /**
* @dev Returns the number of tokens in ``owner``'s account.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
700,
778
]
} | 6,842 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | ownerOf | function ownerOf(uint256 tokenId) external view returns (address owner);
| /**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
916,
992
]
} | 6,843 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(address from, address to, uint256 tokenId) external;
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
1689,
1771
]
} | 6,844 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | transferFrom | function transferFrom(address from, address to, uint256 tokenId) external;
| /**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller i... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
2282,
2360
]
} | 6,845 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | approve | function approve(address to, uint256 tokenId) external;
| /**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be a... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
2819,
2878
]
} | 6,846 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | getApproved | function getApproved(uint256 tokenId) external view returns (address operator);
| /**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3024,
3107
]
} | 6,847 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address operator, bool _approved) external;
| /**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3423,
3497
]
} | 6,848 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address owner, address operator) external view returns (bool);
| /**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3642,
3734
]
} | 6,849 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721 | interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event... | /**
* @dev Required interface of an ERC721 compliant contract.
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
| /**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
4307,
4410
]
} | 6,850 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721Metadata | interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns th... | /**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | name | function name() external view returns (string memory);
| /**
* @dev Returns the token collection name.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
103,
161
]
} | 6,851 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721Metadata | interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns th... | /**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | symbol | function symbol() external view returns (string memory);
| /**
* @dev Returns the token collection symbol.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
228,
288
]
} | 6,852 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721Metadata | interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns th... | /**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenURI | function tokenURI(uint256 tokenId) external view returns (string memory);
| /**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
385,
462
]
} | 6,853 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721Enumerable | interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to... | /**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | totalSupply | function totalSupply() external view returns (uint256);
| /**
* @dev Returns the total amount of tokens stored by the contract.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
129,
188
]
} | 6,854 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721Enumerable | interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to... | /**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenOfOwnerByIndex | function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
| /**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
366,
469
]
} | 6,855 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721Enumerable | interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to... | /**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/ | NatSpecMultiLine | tokenByIndex | function tokenByIndex(uint256 index) external view returns (uint256);
| /**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
640,
713
]
} | 6,856 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | IERC721Receiver | interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is r... | /**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/ | NatSpecMultiLine | onERC721Received | function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4);
| /**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the r... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
518,
644
]
} | 6,857 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC165 | abstract contract ERC165 is IERC165 {
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
/**
* @dev Mapping of interface ids to whether or not it's supported.
*/
mapping(bytes4 => bool) private _supportedIn... | /**
* @dev Implementation of the {IERC165} interface.
*
* Contracts may inherit from this and call {_registerInterface} to declare
* their support of an interface.
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) public view override returns (bool) {
return _supportedInterfaces[interfaceId];
}
| /**
* @dev See {IERC165-supportsInterface}.
*
* Time complexity O(1), guaranteed to always use less than 30 000 gas.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
698,
842
]
} | 6,858 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | ERC165 | abstract contract ERC165 is IERC165 {
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
/**
* @dev Mapping of interface ids to whether or not it's supported.
*/
mapping(bytes4 => bool) private _supportedIn... | /**
* @dev Implementation of the {IERC165} interface.
*
* Contracts may inherit from this and call {_registerInterface} to declare
* their support of an interface.
*/ | NatSpecMultiLine | _registerInterface | function _registerInterface(bytes4 interfaceId) internal virtual {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
| /**
* @dev Registers the contract as an implementer of the interface defined by
* `interfaceId`. Support of the actual ERC165 interface is automatic and
* registering its interface id is not required.
*
* See {IERC165-supportsInterface}.
*
* Requirements:
*
* - `interfaceId` cannot be the ERC165 invalid interf... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
1232,
1434
]
} | 6,859 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | add | function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
| /**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
248,
428
]
} | 6,860 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
| /**
* @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.6.12+commit.27d51765 | MIT | {
"func_code_index": [
695,
833
]
} | 6,861 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | sub | function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
| /**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
1120,
1311
]
} | 6,862 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | mul | function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// 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
if (a == 0) {
return 0;
}
... | /**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
1554,
2017
]
} | 6,863 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | div | function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts 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 invalid opcode to revert (co... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
2475,
2609
]
} | 6,864 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | div | function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
| /**
* @dev Returns the integer division of two unsigned integers. Reverts 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 invalid ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3087,
3363
]
} | 6,865 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts 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 (consuming all... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3810,
3942
]
} | 6,866 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | SafeMath | library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {... | /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming language... | NatSpecMultiLine | mod | function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
| /**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message 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 r... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
4409,
4576
]
} | 6,867 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
ass... | /**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
588,
1005
]
} | 6,868 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | sendValue | function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: una... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
1918,
2313
]
} | 6,869 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
| /**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3050,
3225
]
} | 6,870 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCall | function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3443,
3640
]
} | 6,871 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3998,
4226
]
} | 6,872 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionCallWithValue | function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
// solhint-disable-... | /**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
4470,
4997
]
} | 6,873 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionStaticCall | function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
| /**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
5170,
5371
]
} | 6,874 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return fa... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | functionStaticCall | function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticca... | /**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
5551,
5971
]
} | 6,875 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | _add | function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true... | /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
883,
1291
]
} | 6,876 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | _remove | function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element from t... | /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
1455,
2971
]
} | 6,877 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | _contains | function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3048,
3179
]
} | 6,878 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | _length | function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3256,
3367
]
} | 6,879 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | _at | function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3695,
3900
]
} | 6,880 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | add | function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
4136,
4263
]
} | 6,881 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | remove | function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
4427,
4560
]
} | 6,882 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | contains | function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
4637,
4779
]
} | 6,883 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | length | function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values in the set. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
4856,
4975
]
} | 6,884 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | at | function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
5303,
5436
]
} | 6,885 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | add | function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
5672,
5817
]
} | 6,886 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | remove | function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
5981,
6132
]
} | 6,887 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | contains | function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(value)));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
6209,
6369
]
} | 6,888 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | length | function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values in the set. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
6446,
6565
]
} | 6,889 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | at | function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint256(_at(set._inner, index)));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
6893,
7044
]
} | 6,890 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | add | function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
| /**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
7275,
7408
]
} | 6,891 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | remove | function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
| /**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
7572,
7711
]
} | 6,892 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | contains | function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
| /**
* @dev Returns true if the value is in the set. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
7788,
7936
]
} | 6,893 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | length | function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
| /**
* @dev Returns the number of values on the set. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
8013,
8129
]
} | 6,894 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableSet | library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just... | /**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the... | NatSpecMultiLine | at | function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
| /**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
8457,
8596
]
} | 6,895 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint256ToAd... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enumerated i... | NatSpecMultiLine | _set | function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {
// We read and store the key's index to prevent multiple reads from the same storage slot
uint256 keyIndex = map._indexes[key];
if (keyIndex == 0) { // Equivalent to !contains(map, key)
map._entries.push(MapEntry({ ... | /**
* @dev Adds a key-value pair to a map, or updates the value for an existing
* key. O(1).
*
* Returns true if the key was added to the map, that is if it was not
* already present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
1060,
1742
]
} | 6,896 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint256ToAd... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enumerated i... | NatSpecMultiLine | _remove | function _remove(Map storage map, bytes32 key) private returns (bool) {
// We read and store the key's index to prevent multiple reads from the same storage slot
uint256 keyIndex = map._indexes[key];
if (keyIndex != 0) { // Equivalent to contains(map, key)
// To delete a key-value pair from the _en... | /**
* @dev Removes a key-value pair from a map. O(1).
*
* Returns true if the key was removed from the map, that is if it was present.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
1906,
3427
]
} | 6,897 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint256ToAd... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enumerated i... | NatSpecMultiLine | _contains | function _contains(Map storage map, bytes32 key) private view returns (bool) {
return map._indexes[key] != 0;
}
| /**
* @dev Returns true if the key is in the map. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3502,
3629
]
} | 6,898 | |
TradeSquads | TradeSquads.sol | 0x58874d2951524f7f851bbbe240f0c3cf0b992d79 | Solidity | EnumerableMap | library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint256ToAd... | /**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enumerated i... | NatSpecMultiLine | _length | function _length(Map storage map) private view returns (uint256) {
return map._entries.length;
}
| /**
* @dev Returns the number of key-value pairs in the map. O(1).
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | {
"func_code_index": [
3715,
3827
]
} | 6,899 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.