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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) 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 trans... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | allowance | function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
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.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
2189,
2342
]
} | 22,100 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | StandardToken | contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) 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 trans... | /**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/ | NatSpecMultiLine | increaseApproval | function increaseApproval(address _spender, uint _addedValue) public returns (bool success) {
allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
return true;
}
| /**
* 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
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
2599,
2887
]
} | 22,101 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | Ownable | contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the ow... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | Ownable | function Ownable() public {
owner = msg.sender;
}
| /**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/ | NatSpecMultiLine | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
179,
247
]
} | 22,102 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | Ownable | contract Ownable {
address public owner;
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() public {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the ow... | /**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/ | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) onlyOwner public {
require(newOwner != address(0));
owner = 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.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
592,
736
]
} | 22,103 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | ChargCoinContract | contract ChargCoinContract is StandardToken, Ownable {
string public standard = "CHG";
string public name = "Charg Coin";
string public symbol = "CHG";
uint public decimals = 18;
address public multisig = 0x482EFd447bE88748e7625e2b7c522c388970B790;
struct ChargingData {
addres... | /*
* ChargCoinContract
*
* Simple ERC20 Token example, with crowdsale token creation
*/ | Comment | checkCrowdsaleState | function checkCrowdsaleState() internal returns (bool) {
if (ethRaised >= maxCap && crowdsaleState != state.crowdsaleEnded) {// Check if max cap is reached
crowdsaleState = state.crowdsaleEnded;
CrowdsaleEnded(block.number);
// Raise event
return true;
}
if (now >= E... | //
// Check crowdsale state and calibrate it
// | LineComment | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
3119,
4078
]
} | 22,104 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | ChargCoinContract | contract ChargCoinContract is StandardToken, Ownable {
string public standard = "CHG";
string public name = "Charg Coin";
string public symbol = "CHG";
uint public decimals = 18;
address public multisig = 0x482EFd447bE88748e7625e2b7c522c388970B790;
struct ChargingData {
addres... | /*
* ChargCoinContract
*
* Simple ERC20 Token example, with crowdsale token creation
*/ | Comment | refundTransaction | function refundTransaction(bool _stateChanged) internal {
if (_stateChanged) {
msg.sender.transfer(msg.value);
}
else {
revert();
}
}
| //
// Decide if throw or only return ether
// | LineComment | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
4142,
4347
]
} | 22,105 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | ChargCoinContract | contract ChargCoinContract is StandardToken, Ownable {
string public standard = "CHG";
string public name = "Charg Coin";
string public symbol = "CHG";
uint public decimals = 18;
address public multisig = 0x482EFd447bE88748e7625e2b7c522c388970B790;
struct ChargingData {
addres... | /*
* ChargCoinContract
*
* Simple ERC20 Token example, with crowdsale token creation
*/ | Comment | getPrice | function getPrice() constant public returns (uint result) {
return PRICE;
}
| // replace this with any other price function | LineComment | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
7022,
7116
]
} | 22,106 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | ChargCoinContract | contract ChargCoinContract is StandardToken, Ownable {
string public standard = "CHG";
string public name = "Charg Coin";
string public symbol = "CHG";
uint public decimals = 18;
address public multisig = 0x482EFd447bE88748e7625e2b7c522c388970B790;
struct ChargingData {
addres... | /*
* ChargCoinContract
*
* Simple ERC20 Token example, with crowdsale token creation
*/ | Comment | batchReturnEthIfFailed | function batchReturnEthIfFailed(uint _numberOfReturns) onlyOwner public {
require(crowdsaleState != state.crowdsaleEnded);
// Check if crowdsale has ended
require(ethRaised < minCap);
// Check if crowdsale has failed
address currentParticipantAddress;
uint contribution;
for (uint cnt ... | //
// Owner can batch return contributors contributions(eth)
// | LineComment | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
7198,
8634
]
} | 22,107 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | ChargCoinContract | contract ChargCoinContract is StandardToken, Ownable {
string public standard = "CHG";
string public name = "Charg Coin";
string public symbol = "CHG";
uint public decimals = 18;
address public multisig = 0x482EFd447bE88748e7625e2b7c522c388970B790;
struct ChargingData {
addres... | /*
* ChargCoinContract
*
* Simple ERC20 Token example, with crowdsale token creation
*/ | Comment | setMultisigAddress | function setMultisigAddress(address _newAddress) onlyOwner public {
multisig = _newAddress;
}
| //
// Owner can set multisig address for crowdsale
// | LineComment | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
8706,
8818
]
} | 22,108 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | ChargCoinContract | contract ChargCoinContract is StandardToken, Ownable {
string public standard = "CHG";
string public name = "Charg Coin";
string public symbol = "CHG";
uint public decimals = 18;
address public multisig = 0x482EFd447bE88748e7625e2b7c522c388970B790;
struct ChargingData {
addres... | /*
* ChargCoinContract
*
* Simple ERC20 Token example, with crowdsale token creation
*/ | Comment | registerNode | function registerNode(uint256 chargingRate, uint256 parkingRate) public {
if (authorized[msg.sender] == 1) revert();
rateOfCharging[msg.sender] = chargingRate;
rateOfParking[msg.sender] = parkingRate;
authorized[msg.sender] = 1;
}
| //
// Registers node with rate
// | LineComment | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
8870,
9148
]
} | 22,109 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | ChargCoinContract | contract ChargCoinContract is StandardToken, Ownable {
string public standard = "CHG";
string public name = "Charg Coin";
string public symbol = "CHG";
uint public decimals = 18;
address public multisig = 0x482EFd447bE88748e7625e2b7c522c388970B790;
struct ChargingData {
addres... | /*
* ChargCoinContract
*
* Simple ERC20 Token example, with crowdsale token creation
*/ | Comment | blockNode | function blockNode (address node) onlyOwner public {
authorized[node] = 0;
}
| //
// Block node
// | LineComment | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
9187,
9282
]
} | 22,110 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | ChargCoinContract | contract ChargCoinContract is StandardToken, Ownable {
string public standard = "CHG";
string public name = "Charg Coin";
string public symbol = "CHG";
uint public decimals = 18;
address public multisig = 0x482EFd447bE88748e7625e2b7c522c388970B790;
struct ChargingData {
addres... | /*
* ChargCoinContract
*
* Simple ERC20 Token example, with crowdsale token creation
*/ | Comment | updateChargingRate | function updateChargingRate (uint256 rate) public {
rateOfCharging[msg.sender] = rate;
}
| //
// Updates node charging rate
// | LineComment | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
9337,
9444
]
} | 22,111 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | ChargCoinContract | contract ChargCoinContract is StandardToken, Ownable {
string public standard = "CHG";
string public name = "Charg Coin";
string public symbol = "CHG";
uint public decimals = 18;
address public multisig = 0x482EFd447bE88748e7625e2b7c522c388970B790;
struct ChargingData {
addres... | /*
* ChargCoinContract
*
* Simple ERC20 Token example, with crowdsale token creation
*/ | Comment | updateParkingRate | function updateParkingRate (uint256 rate) public {
rateOfCharging[msg.sender] = rate;
}
| //
// Updates node parking rate
// | LineComment | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
9498,
9604
]
} | 22,112 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | ChargCoinContract | contract ChargCoinContract is StandardToken, Ownable {
string public standard = "CHG";
string public name = "Charg Coin";
string public symbol = "CHG";
uint public decimals = 18;
address public multisig = 0x482EFd447bE88748e7625e2b7c522c388970B790;
struct ChargingData {
addres... | /*
* ChargCoinContract
*
* Simple ERC20 Token example, with crowdsale token creation
*/ | Comment | parkingOff | function parkingOff (address node) public {
if (!parkingSwitches[msg.sender].initialized) revert();
// Calculate the amount depending on rate
uint256 amount = (now - parkingSwitches[msg.sender].startTime) * parkingSwitches[msg.sender].fixedRate;
// Maximum can be predefinedAmount, if it less than ... | // Parking off | LineComment | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
12781,
14029
]
} | 22,113 | |
ChgUsdConverter | ChgUsdConverter.sol | 0x40e886aac0ba626b793c25015ed658af4ea92306 | Solidity | ChgUsdConverter | contract ChgUsdConverter is Ownable{
address public contractAddress = 0xC4A86561cb0b7EA1214904f26E6D50FD357C7986;
address public dashboardAddress = 0x482EFd447bE88748e7625e2b7c522c388970B790;
uint public ETHUSDPRICE = 810;
uint public CHGUSDPRICE = 4; // $0.4
function setETHUSDPrice(uint newP... | setETHUSDPrice | function setETHUSDPrice(uint newPrice) public {
if (msg.sender != dashboardAddress) revert();
ETHUSDPRICE = newPrice;
}
| // $0.4 | LineComment | v0.4.18+commit.9cf6e910 | bzzr://18e4f49aa7c510bb61778a23a6387e4c425ee9ae81e68ddeae3ccf620e23a1ad | {
"func_code_index": [
283,
440
]
} | 22,114 | |||
BondTellerErc20 | contracts/interface/IBondTellerErc20.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondTellerErc20 | interface IBondTellerErc20 is IBondTeller {
/**
* @notice Create a bond by depositing `amount` of `principal`.
* Principal will be transferred from `msg.sender` using `allowance`.
* @param amount Amount of principal to deposit.
* @param minAmountOut The minimum **SOLACE** or **xSOLACE** out.
... | /**
* @title IBondTellerErc20
* @author solace.fi
* @notice A bond teller that accepts an ERC20 as payment.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the... | NatSpecMultiLine | deposit | function deposit(
uint256 amount,
uint256 minAmountOut,
address depositor,
bool stake
) external returns (uint256 payout, uint256 bondID);
| /**
* @notice Create a bond by depositing `amount` of `principal`.
* Principal will be transferred from `msg.sender` using `allowance`.
* @param amount Amount of principal to deposit.
* @param minAmountOut The minimum **SOLACE** or **xSOLACE** out.
* @param depositor The bond recipient, default msg.sender.
* @par... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
568,
746
]
} | 22,115 | ||
BondTellerErc20 | contracts/interface/IBondTellerErc20.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondTellerErc20 | interface IBondTellerErc20 is IBondTeller {
/**
* @notice Create a bond by depositing `amount` of `principal`.
* Principal will be transferred from `msg.sender` using `allowance`.
* @param amount Amount of principal to deposit.
* @param minAmountOut The minimum **SOLACE** or **xSOLACE** out.
... | /**
* @title IBondTellerErc20
* @author solace.fi
* @notice A bond teller that accepts an ERC20 as payment.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the... | NatSpecMultiLine | depositSigned | function depositSigned(
uint256 amount,
uint256 minAmountOut,
address depositor,
bool stake,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 payout, uint256 bondID);
| /**
* @notice Create a bond by depositing `amount` of `principal`.
* Principal will be transferred from `depositor` using `permit`.
* Note that not all ERC20s have a permit function, in which case this function will revert.
* @param amount Amount of principal to deposit.
* @param minAmountOut The minimum **SOLACE*... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1540,
1805
]
} | 22,116 | ||
BIGBANGCOIN | contracts/token/BIGBANGCOIN.sol | 0x91bd140bf6656228583ce1bb7c04f32609625644 | Solidity | BIGBANGCOIN | contract BIGBANGCOIN is ERC20 {
using SafeMath for uint256;
address public admin;
string public constant name = "BIGBANGCOIN";
string public constant symbol = "BIGB";
uint8 public constant decimals = 18;
uint256 public totalSupply;
mapping(address => bool) internal blacklist... | blockTransfer | function blockTransfer(bool _block) external adminOnly {
checkTokenLock = _block;
}
| // _block
// True : Can not Transfer
// false : Can Transfer | LineComment | v0.4.18+commit.9cf6e910 | bzzr://4d8b46d0192511ae528da5944009d6be25e9ec00dfb64521fcdae315829e879f | {
"func_code_index": [
1081,
1183
]
} | 22,117 | |||
BIGBANGCOIN | contracts/token/BIGBANGCOIN.sol | 0x91bd140bf6656228583ce1bb7c04f32609625644 | Solidity | BIGBANGCOIN | contract BIGBANGCOIN is ERC20 {
using SafeMath for uint256;
address public admin;
string public constant name = "BIGBANGCOIN";
string public constant symbol = "BIGB";
uint8 public constant decimals = 18;
uint256 public totalSupply;
mapping(address => bool) internal blacklist... | updateBlackList | function updateBlackList(address _addr, bool _inBlackList) external adminOnly{
blacklist[_addr] = _inBlackList;
}
| // _inBlackList
// True : Can not Transfer
// false : Can Transfer | LineComment | v0.4.18+commit.9cf6e910 | bzzr://4d8b46d0192511ae528da5944009d6be25e9ec00dfb64521fcdae315829e879f | {
"func_code_index": [
1270,
1402
]
} | 22,118 | |||
APS3 | APS3.sol | 0x541993c6b5456f005470b54af1751ff84b308ca1 | Solidity | APS3 | contract APS3 is SafeMath{
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public owner;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (address => uint256) public freezeOf;
... | APS3 | function APS3(
uint256 initialSupply,
string tokenName,
uint8 decimalUnits,
string tokenSymbol
) {
balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens
totalSupply = initialSupply; // Update total supply
name = tokenNam... | /* Initializes contract with initial supply tokens to the creator of the contract */ | Comment | v0.4.12+commit.194ff033 | None | bzzr://26fbaeacddae373b1fc1315f0a2c4382dfc67305a20b1cc9773f7c81e3dd5d2b | {
"func_code_index": [
989,
1653
]
} | 22,119 | ||
APS3 | APS3.sol | 0x541993c6b5456f005470b54af1751ff84b308ca1 | Solidity | APS3 | contract APS3 is SafeMath{
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public owner;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (address => uint256) public freezeOf;
... | transfer | function transfer(address _to, uint256 _value) {
if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead
(_value <= 0) throw;
if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough
if (balanceOf[_to] + SafeMath.safeSub... | /* Send coins */ | Comment | v0.4.12+commit.194ff033 | None | bzzr://26fbaeacddae373b1fc1315f0a2c4382dfc67305a20b1cc9773f7c81e3dd5d2b | {
"func_code_index": [
1678,
2856
]
} | 22,120 | ||
APS3 | APS3.sol | 0x541993c6b5456f005470b54af1751ff84b308ca1 | Solidity | APS3 | contract APS3 is SafeMath{
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public owner;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (address => uint256) public freezeOf;
... | approve | function approve(address _spender, uint256 _value)
returns (bool success) {
(_value <= 0) throw;
allowance[msg.sender][_spender] = _value;
return true;
}
| /* Allow another contract to spend some tokens in your behalf */ | Comment | v0.4.12+commit.194ff033 | None | bzzr://26fbaeacddae373b1fc1315f0a2c4382dfc67305a20b1cc9773f7c81e3dd5d2b | {
"func_code_index": [
2927,
3124
]
} | 22,121 | ||
APS3 | APS3.sol | 0x541993c6b5456f005470b54af1751ff84b308ca1 | Solidity | APS3 | contract APS3 is SafeMath{
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public owner;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (address => uint256) public freezeOf;
... | transferFrom | function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
if (_to == 0x0) throw; // Prevent transfer to 0x0 address. Use burn() instead
(_value <= 0) throw;
if (balanceOf[_from] < _value) throw; // Check if the sender has enoug... | /* A contract attempts to get the coins */ | Comment | v0.4.12+commit.194ff033 | None | bzzr://26fbaeacddae373b1fc1315f0a2c4382dfc67305a20b1cc9773f7c81e3dd5d2b | {
"func_code_index": [
3184,
4109
]
} | 22,122 | ||
APS3 | APS3.sol | 0x541993c6b5456f005470b54af1751ff84b308ca1 | Solidity | APS3 | contract APS3 is SafeMath{
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public owner;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (address => uint256) public freezeOf;
... | withdrawEther | function withdrawEther(uint256 amount) {
if(msg.sender != owner)throw;
owner.transfer(amount);
}
| // transfer balance to owner | LineComment | v0.4.12+commit.194ff033 | None | bzzr://26fbaeacddae373b1fc1315f0a2c4382dfc67305a20b1cc9773f7c81e3dd5d2b | {
"func_code_index": [
5620,
5726
]
} | 22,123 | ||
APS3 | APS3.sol | 0x541993c6b5456f005470b54af1751ff84b308ca1 | Solidity | APS3 | contract APS3 is SafeMath{
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
address public owner;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (address => uint256) public freezeOf;
... | function() payable {
}
| // can accept ether | LineComment | v0.4.12+commit.194ff033 | None | bzzr://26fbaeacddae373b1fc1315f0a2c4382dfc67305a20b1cc9773f7c81e3dd5d2b | {
"func_code_index": [
5752,
5781
]
} | 22,124 | |||
BondTellerErc20 | contracts/interface/IxSOLACE.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IxSOLACE | interface IxSOLACE is IERC20, IERC20Permit {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when SOLACE is staked.
event Staked(address user, uint256 amountSolace, uint256 amountXSolace);
/// @notice Emitted when SOLACE is unstaked.... | /**
* @title xSolace Token (xSOLACE)
* @author solace.fi
* @notice The **SOLACE** staking contract.
*
* Users can stake their **SOLACE** and receive **xSOLACE**. **xSOLACE** is designed to be a safe up-only contract that allows users to enter or leave at any time. The value of **xSOLACE** relative to **SOLACE** wi... | NatSpecMultiLine | solace | function solace() external view returns (address solace_);
| /// @notice native solace token | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
547,
609
]
} | 22,125 | ||
BondTellerErc20 | contracts/interface/IxSOLACE.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IxSOLACE | interface IxSOLACE is IERC20, IERC20Permit {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when SOLACE is staked.
event Staked(address user, uint256 amountSolace, uint256 amountXSolace);
/// @notice Emitted when SOLACE is unstaked.... | /**
* @title xSolace Token (xSOLACE)
* @author solace.fi
* @notice The **SOLACE** staking contract.
*
* Users can stake their **SOLACE** and receive **xSOLACE**. **xSOLACE** is designed to be a safe up-only contract that allows users to enter or leave at any time. The value of **xSOLACE** relative to **SOLACE** wi... | NatSpecMultiLine | solaceToXSolace | function solaceToXSolace(uint256 amountSolace) external view returns (uint256 amountXSolace);
| /**
* @notice Determines the current value in xsolace for an amount of solace.
* @param amountSolace The amount of solace.
* @return amountXSolace The amount of xsolace.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
808,
905
]
} | 22,126 | ||
BondTellerErc20 | contracts/interface/IxSOLACE.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IxSOLACE | interface IxSOLACE is IERC20, IERC20Permit {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when SOLACE is staked.
event Staked(address user, uint256 amountSolace, uint256 amountXSolace);
/// @notice Emitted when SOLACE is unstaked.... | /**
* @title xSolace Token (xSOLACE)
* @author solace.fi
* @notice The **SOLACE** staking contract.
*
* Users can stake their **SOLACE** and receive **xSOLACE**. **xSOLACE** is designed to be a safe up-only contract that allows users to enter or leave at any time. The value of **xSOLACE** relative to **SOLACE** wi... | NatSpecMultiLine | xSolaceToSolace | function xSolaceToSolace(uint256 amountXSolace) external view returns (uint256 amountSolace);
| /**
* @notice Determines the current value in solace for an amount of xsolace.
* @param amountXSolace The amount of xsolace.
* @return amountSolace The amount of solace.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1104,
1201
]
} | 22,127 | ||
BondTellerErc20 | contracts/interface/IxSOLACE.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IxSOLACE | interface IxSOLACE is IERC20, IERC20Permit {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when SOLACE is staked.
event Staked(address user, uint256 amountSolace, uint256 amountXSolace);
/// @notice Emitted when SOLACE is unstaked.... | /**
* @title xSolace Token (xSOLACE)
* @author solace.fi
* @notice The **SOLACE** staking contract.
*
* Users can stake their **SOLACE** and receive **xSOLACE**. **xSOLACE** is designed to be a safe up-only contract that allows users to enter or leave at any time. The value of **xSOLACE** relative to **SOLACE** wi... | NatSpecMultiLine | stake | function stake(uint256 amountSolace) external returns (uint256 amountXSolace);
| /**
* @notice Allows a user to stake **SOLACE**.
* Shares of the pool (xSOLACE) are minted to msg.sender.
* @param amountSolace Amount of solace to deposit.
* @return amountXSolace The amount of xsolace minted.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1559,
1641
]
} | 22,128 | ||
BondTellerErc20 | contracts/interface/IxSOLACE.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IxSOLACE | interface IxSOLACE is IERC20, IERC20Permit {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when SOLACE is staked.
event Staked(address user, uint256 amountSolace, uint256 amountXSolace);
/// @notice Emitted when SOLACE is unstaked.... | /**
* @title xSolace Token (xSOLACE)
* @author solace.fi
* @notice The **SOLACE** staking contract.
*
* Users can stake their **SOLACE** and receive **xSOLACE**. **xSOLACE** is designed to be a safe up-only contract that allows users to enter or leave at any time. The value of **xSOLACE** relative to **SOLACE** wi... | NatSpecMultiLine | stakeSigned | function stakeSigned(address depositor, uint256 amountSolace, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external returns (uint256 amountXSolace);
| /**
* @notice Allows a user to stake **SOLACE**.
* Shares of the pool (xSOLACE) are minted to msg.sender.
* @param depositor The depositing user.
* @param amountSolace The deposit amount.
* @param deadline Time the transaction must go through before.
* @param v secp256k1 signature
* @param r secp256k1 signature
... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2098,
2254
]
} | 22,129 | ||
BondTellerErc20 | contracts/interface/IxSOLACE.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IxSOLACE | interface IxSOLACE is IERC20, IERC20Permit {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when SOLACE is staked.
event Staked(address user, uint256 amountSolace, uint256 amountXSolace);
/// @notice Emitted when SOLACE is unstaked.... | /**
* @title xSolace Token (xSOLACE)
* @author solace.fi
* @notice The **SOLACE** staking contract.
*
* Users can stake their **SOLACE** and receive **xSOLACE**. **xSOLACE** is designed to be a safe up-only contract that allows users to enter or leave at any time. The value of **xSOLACE** relative to **SOLACE** wi... | NatSpecMultiLine | unstake | function unstake(uint256 amountXSolace) external returns (uint256 amountSolace);
| /**
* @notice Allows a user to unstake **xSOLACE**.
* Burns **xSOLACE** tokens and transfers **SOLACE** to msg.sender.
* @param amountXSolace Amount of xSOLACE.
* @return amountSolace Amount of SOLACE returned.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2499,
2583
]
} | 22,130 | ||
BondTellerErc20 | contracts/interface/IxSOLACE.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IxSOLACE | interface IxSOLACE is IERC20, IERC20Permit {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when SOLACE is staked.
event Staked(address user, uint256 amountSolace, uint256 amountXSolace);
/// @notice Emitted when SOLACE is unstaked.... | /**
* @title xSolace Token (xSOLACE)
* @author solace.fi
* @notice The **SOLACE** staking contract.
*
* Users can stake their **SOLACE** and receive **xSOLACE**. **xSOLACE** is designed to be a safe up-only contract that allows users to enter or leave at any time. The value of **xSOLACE** relative to **SOLACE** wi... | NatSpecMultiLine | burn | function burn(uint256 amount) external;
| /**
* @notice Burns **xSOLACE** from msg.sender.
* @param amount Amount to burn.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2688,
2731
]
} | 22,131 | ||
BondTellerErc20 | contracts/BondTellerErc20.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | BondTellerErc20 | contract BondTellerErc20 is BondTellerBase, IBondTellerErc20 {
/***************************************
BONDER FUNCTIONS
***************************************/
/**
* @notice Create a bond by depositing `amount` of `principal`.
* Principal will be transferred from `msg.sender` using `allowa... | /**
* @title BondTellerErc20
* @author solace.fi
* @notice A bond teller that accepts an ERC20 as payment.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the ... | NatSpecMultiLine | deposit | function deposit(
uint256 amount,
uint256 minAmountOut,
address depositor,
bool stake
) external override returns (uint256 payout, uint256 bondID) {
// pull tokens
SafeERC20.safeTransferFrom(principal, msg.sender, address(this), amount);
// accounting
return _deposit(amount, minAmountOut... | /**
* @notice Create a bond by depositing `amount` of `principal`.
* Principal will be transferred from `msg.sender` using `allowance`.
* @param amount Amount of principal to deposit.
* @param minAmountOut The minimum **SOLACE** or **xSOLACE** out.
* @param depositor The bond recipient, default msg.sender.
* @par... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
699,
1085
]
} | 22,132 | ||
BondTellerErc20 | contracts/BondTellerErc20.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | BondTellerErc20 | contract BondTellerErc20 is BondTellerBase, IBondTellerErc20 {
/***************************************
BONDER FUNCTIONS
***************************************/
/**
* @notice Create a bond by depositing `amount` of `principal`.
* Principal will be transferred from `msg.sender` using `allowa... | /**
* @title BondTellerErc20
* @author solace.fi
* @notice A bond teller that accepts an ERC20 as payment.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the ... | NatSpecMultiLine | depositSigned | function depositSigned(
uint256 amount,
uint256 minAmountOut,
address depositor,
bool stake,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external override returns (uint256 payout, uint256 bondID) {
// permit
IERC20Permit(address(principal)).permit(depositor, address(this), ... | /**
* @notice Create a bond by depositing `amount` of `principal`.
* Principal will be transferred from `depositor` using `permit`.
* Note that not all ERC20s have a permit function, in which case this function will revert.
* @param amount Amount of principal to deposit.
* @param minAmountOut The minimum **SOLACE*... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1879,
2471
]
} | 22,133 | ||
BondTellerErc20 | contracts/BondTellerErc20.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | BondTellerErc20 | contract BondTellerErc20 is BondTellerBase, IBondTellerErc20 {
/***************************************
BONDER FUNCTIONS
***************************************/
/**
* @notice Create a bond by depositing `amount` of `principal`.
* Principal will be transferred from `msg.sender` using `allowa... | /**
* @title BondTellerErc20
* @author solace.fi
* @notice A bond teller that accepts an ERC20 as payment.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the ... | NatSpecMultiLine | _deposit | function _deposit(
uint256 amount,
uint256 minAmountOut,
address depositor,
bool stake
) internal returns (uint256 payout, uint256 bondID) {
require(depositor != address(0), "invalid address");
require(!paused, "cannot deposit while paused");
require(termsSet, "not initialized");
requir... | /**
* @notice Create a bond by depositing `amount` of `principal`.
* @param amount Amount of principal to deposit.
* @param minAmountOut The minimum **SOLACE** or **xSOLACE** out.
* @param depositor The bond recipient, default msg.sender.
* @param stake True to stake, false to not stake.
* @return payout The amou... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2922,
5178
]
} | 22,134 | ||
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | balanceOf | function balanceOf(address account) external view returns (uint256);
| /**
* @dev Returns the amount of tokens owned by `account`.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
165,
238
]
} | 22,135 | ||
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | transfer | function transfer(address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
462,
544
]
} | 22,136 | ||
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | allowance | function allowance(address owner, address spender) external view returns (uint256);
| /**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
823,
911
]
} | 22,137 | ||
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | approve | function approve(address spender, uint256 amount) external returns (bool);
| /**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
1575,
1654
]
} | 22,138 | ||
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | Solidity | IERC20 | interface IERC20 {
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipi... | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
| /**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
1967,
2069
]
} | 22,139 | ||
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | 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 ... | /**
* @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 la... | 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 | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
259,
445
]
} | 22,140 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | 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 ... | /**
* @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 la... | 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 | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
723,
864
]
} | 22,141 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | 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 ... | /**
* @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 la... | 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 | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
1162,
1359
]
} | 22,142 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | 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 ... | /**
* @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 la... | 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 | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
1613,
2089
]
} | 22,143 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | 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 ... | /**
* @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 la... | 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 reve... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
2560,
2697
]
} | 22,144 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | 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 ... | /**
* @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 la... | 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 in... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
3188,
3471
]
} | 22,145 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | 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 ... | /**
* @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 la... | 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 (consumi... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
3931,
4066
]
} | 22,146 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | 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 ... | /**
* @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 la... | 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 opcod... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
4546,
4717
]
} | 22,147 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | 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 ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codeha... | /**
* @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 | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
606,
1230
]
} | 22,148 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | 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 ... | /**
* @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... | /**
* @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 `tr... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
2160,
2562
]
} | 22,149 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | 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 ... | /**
* @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 ... | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
3318,
3496
]
} | 22,150 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | 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 ... | /**
* @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 | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
3721,
3922
]
} | 22,151 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | 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 ... | /**
* @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 | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
4292,
4523
]
} | 22,152 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | 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 ... | /**
* @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");
return _functionCallWithValue(target, data, value, errorMessage);
}
| /**
* @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 | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
4774,
5095
]
} | 22,153 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
566,
650
]
} | 22,154 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | renounceOwnership | function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
1209,
1362
]
} | 22,155 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | transferOwnership | function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
1512,
1761
]
} | 22,156 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | lock | function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = now + time;
emit OwnershipTransferred(_owner, address(0));
}
| //Locks the contract for owner for the amount of time provided | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
1929,
2148
]
} | 22,157 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/... | /**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
... | NatSpecMultiLine | unlock | function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(now > _lockTime , "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
| //Unlocks the contract for owner when _lockTime is exceeds | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
2219,
2517
]
} | 22,158 |
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | Solidity | KoromaruInu | contract KoromaruInu is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address ... | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
8820,
8854
]
} | 22,159 | ||||
KoromaruInu | KoromaruInu.sol | 0x262d60e3e58a1dc7c41a73627edbfb5f74dfb3a6 | Solidity | KoromaruInu | contract KoromaruInu is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address ... | _tokenTransfer | function _tokenTransfer(address sender, address recipient, uint256 amount,bool takeFee) private {
if(!takeFee)
removeAllFee();
if (_isExcluded[sender] && !_isExcluded[recipient]) {
_transferFromExcluded(sender, recipient, amount);
} else if (!_isExcluded[sender] && _isExcluded... | //this method is responsible for taking all fee, if takeFee is true | LineComment | v0.6.12+commit.27d51765 | MIT | ipfs://97432defb90967a3d51642ad83e271d1777062faac04515d3ae87177aa13d69c | {
"func_code_index": [
17044,
17883
]
} | 22,160 | ||
BondTellerErc20 | contracts/interface/IBondDepository.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondDepository | interface IBondDepository {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a teller is added.
event TellerAdded(address indexed teller);
/// @notice Emitted when a teller is removed.
event TellerRemoved(address indexed tell... | /**
* @title BondDepository
* @author solace.fi
* @notice Factory and manager of [`Bond Tellers`](./IBondTeller).
*/ | NatSpecMultiLine | solace | function solace() external view returns (address solace_);
| /// @notice Native [**SOLACE**](./SOLACE) Token. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
619,
681
]
} | 22,161 | ||
BondTellerErc20 | contracts/interface/IBondDepository.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondDepository | interface IBondDepository {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a teller is added.
event TellerAdded(address indexed teller);
/// @notice Emitted when a teller is removed.
event TellerRemoved(address indexed tell... | /**
* @title BondDepository
* @author solace.fi
* @notice Factory and manager of [`Bond Tellers`](./IBondTeller).
*/ | NatSpecMultiLine | xsolace | function xsolace() external view returns (address xsolace_);
| /// @notice [**xSOLACE**](./xSOLACE) Token. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
731,
795
]
} | 22,162 | ||
BondTellerErc20 | contracts/interface/IBondDepository.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondDepository | interface IBondDepository {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a teller is added.
event TellerAdded(address indexed teller);
/// @notice Emitted when a teller is removed.
event TellerRemoved(address indexed tell... | /**
* @title BondDepository
* @author solace.fi
* @notice Factory and manager of [`Bond Tellers`](./IBondTeller).
*/ | NatSpecMultiLine | underwritingPool | function underwritingPool() external view returns (address pool_);
| /// @notice Underwriting pool contract. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
841,
911
]
} | 22,163 | ||
BondTellerErc20 | contracts/interface/IBondDepository.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondDepository | interface IBondDepository {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a teller is added.
event TellerAdded(address indexed teller);
/// @notice Emitted when a teller is removed.
event TellerRemoved(address indexed tell... | /**
* @title BondDepository
* @author solace.fi
* @notice Factory and manager of [`Bond Tellers`](./IBondTeller).
*/ | NatSpecMultiLine | dao | function dao() external view returns (address dao_);
| /// @notice The DAO. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
938,
994
]
} | 22,164 | ||
BondTellerErc20 | contracts/interface/IBondDepository.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondDepository | interface IBondDepository {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a teller is added.
event TellerAdded(address indexed teller);
/// @notice Emitted when a teller is removed.
event TellerRemoved(address indexed tell... | /**
* @title BondDepository
* @author solace.fi
* @notice Factory and manager of [`Bond Tellers`](./IBondTeller).
*/ | NatSpecMultiLine | isTeller | function isTeller(address teller) external view returns (bool isTeller_);
| /// @notice Returns true if the address is a teller. | NatSpecSingleLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1053,
1130
]
} | 22,165 | ||
BondTellerErc20 | contracts/interface/IBondDepository.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondDepository | interface IBondDepository {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a teller is added.
event TellerAdded(address indexed teller);
/// @notice Emitted when a teller is removed.
event TellerRemoved(address indexed tell... | /**
* @title BondDepository
* @author solace.fi
* @notice Factory and manager of [`Bond Tellers`](./IBondTeller).
*/ | NatSpecMultiLine | createBondTeller | function createBondTeller(
string memory name,
address governance,
address impl,
address principal
) external returns (address teller);
| /**
* @notice Creates a new [`BondTeller`](./IBondTeller).
* Can only be called by the current [**governor**](/docs/protocol/governance).
* @param name The name of the bond token.
* @param governance The address of the teller's [governor](/docs/protocol/governance).
* @param impl The address of BondTeller implemen... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1733,
1908
]
} | 22,166 | ||
BondTellerErc20 | contracts/interface/IBondDepository.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondDepository | interface IBondDepository {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a teller is added.
event TellerAdded(address indexed teller);
/// @notice Emitted when a teller is removed.
event TellerRemoved(address indexed tell... | /**
* @title BondDepository
* @author solace.fi
* @notice Factory and manager of [`Bond Tellers`](./IBondTeller).
*/ | NatSpecMultiLine | create2BondTeller | function create2BondTeller(
string memory name,
address governance,
address impl,
bytes32 salt,
address principal
) external returns (address teller);
| /**
* @notice Creates a new [`BondTeller`](./IBondTeller).
* @param name The name of the bond token.
* Can only be called by the current [**governor**](/docs/protocol/governance).
* @param governance The address of the teller's [governor](/docs/protocol/governance).
* @param impl The address of BondTeller implemen... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2429,
2627
]
} | 22,167 | ||
BondTellerErc20 | contracts/interface/IBondDepository.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondDepository | interface IBondDepository {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a teller is added.
event TellerAdded(address indexed teller);
/// @notice Emitted when a teller is removed.
event TellerRemoved(address indexed tell... | /**
* @title BondDepository
* @author solace.fi
* @notice Factory and manager of [`Bond Tellers`](./IBondTeller).
*/ | NatSpecMultiLine | addTeller | function addTeller(address teller) external;
| /**
* @notice Adds a teller.
* Can only be called by the current [**governor**](/docs/protocol/governance).
* @param teller The teller to add.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2799,
2847
]
} | 22,168 | ||
BondTellerErc20 | contracts/interface/IBondDepository.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondDepository | interface IBondDepository {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a teller is added.
event TellerAdded(address indexed teller);
/// @notice Emitted when a teller is removed.
event TellerRemoved(address indexed tell... | /**
* @title BondDepository
* @author solace.fi
* @notice Factory and manager of [`Bond Tellers`](./IBondTeller).
*/ | NatSpecMultiLine | removeTeller | function removeTeller(address teller) external;
| /**
* @notice Adds a teller.
* Can only be called by the current [**governor**](/docs/protocol/governance).
* @param teller The teller to remove.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3022,
3073
]
} | 22,169 | ||
BondTellerErc20 | contracts/interface/IBondDepository.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondDepository | interface IBondDepository {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a teller is added.
event TellerAdded(address indexed teller);
/// @notice Emitted when a teller is removed.
event TellerRemoved(address indexed tell... | /**
* @title BondDepository
* @author solace.fi
* @notice Factory and manager of [`Bond Tellers`](./IBondTeller).
*/ | NatSpecMultiLine | setAddresses | function setAddresses(address solace_, address xsolace_, address pool_, address dao_) external;
| /**
* @notice Sets the parameters to pass to new tellers.
* Can only be called by the current [**governor**](/docs/protocol/governance).
* @param solace_ Address of [**SOLACE**](./solace).
* @param xsolace_ Address of [**xSOLACE**](./xsolace).
* @param pool_ Address of underwriting pool.
* @param dao_ Address of ... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3440,
3539
]
} | 22,170 | ||
BondTellerErc20 | contracts/interface/IBondDepository.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondDepository | interface IBondDepository {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a teller is added.
event TellerAdded(address indexed teller);
/// @notice Emitted when a teller is removed.
event TellerRemoved(address indexed tell... | /**
* @title BondDepository
* @author solace.fi
* @notice Factory and manager of [`Bond Tellers`](./IBondTeller).
*/ | NatSpecMultiLine | pullSolace | function pullSolace(uint256 amount) external;
| /**
* @notice Sends **SOLACE** to the teller.
* Can only be called by tellers.
* @param amount The amount of **SOLACE** to send.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3818,
3867
]
} | 22,171 | ||
BondTellerErc20 | contracts/interface/IBondDepository.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondDepository | interface IBondDepository {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a teller is added.
event TellerAdded(address indexed teller);
/// @notice Emitted when a teller is removed.
event TellerRemoved(address indexed tell... | /**
* @title BondDepository
* @author solace.fi
* @notice Factory and manager of [`Bond Tellers`](./IBondTeller).
*/ | NatSpecMultiLine | returnSolace | function returnSolace(address dst, uint256 amount) external;
| /**
* @notice Sends **SOLACE** to an address.
* Can only be called by the current [**governor**](/docs/protocol/governance).
* @param dst Destination to send **SOLACE**.
* @param amount The amount of **SOLACE** to send.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
4121,
4185
]
} | 22,172 | ||
BondTellerErc20 | contracts/interface/IERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IERC721EnhancedInitializable | interface IERC721EnhancedInitializable is IERC721EnumerableUpgradeable {
/***************************************
SIMPLER TRANSFERS
***************************************/
/**
* @notice Transfers `tokenID` from `msg.sender` to `to`.
* @dev This was excluded from the official `ERC721` standa... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | transfer | function transfer(address to, uint256 tokenID) external;
| /**
* @notice Transfers `tokenID` from `msg.sender` to `to`.
* @dev This was excluded from the official `ERC721` standard in favor of `transferFrom(address from, address to, uint256 tokenID)`. We elect to include it.
* @param to The receipient of the token.
* @param tokenID The token to transfer.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
517,
577
]
} | 22,173 | ||
BondTellerErc20 | contracts/interface/IERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IERC721EnhancedInitializable | interface IERC721EnhancedInitializable is IERC721EnumerableUpgradeable {
/***************************************
SIMPLER TRANSFERS
***************************************/
/**
* @notice Transfers `tokenID` from `msg.sender` to `to`.
* @dev This was excluded from the official `ERC721` standa... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | safeTransfer | function safeTransfer(address to, uint256 tokenID) external;
| /**
* @notice Safely transfers `tokenID` from `msg.sender` to `to`.
* @dev This was excluded from the official `ERC721` standard in favor of `safeTransferFrom(address from, address to, uint256 tokenID)`. We elect to include it.
* @param to The receipient of the token.
* @param tokenID The token to transfer.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
920,
984
]
} | 22,174 | ||
BondTellerErc20 | contracts/interface/IERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IERC721EnhancedInitializable | interface IERC721EnhancedInitializable is IERC721EnumerableUpgradeable {
/***************************************
SIMPLER TRANSFERS
***************************************/
/**
* @notice Transfers `tokenID` from `msg.sender` to `to`.
* @dev This was excluded from the official `ERC721` standa... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | permit | function permit(
address spender,
uint256 tokenID,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
| /**
* @notice Approve of a specific `tokenID` for spending by `spender` via signature.
* @param spender The account that is being approved.
* @param tokenID The ID of the token that is being approved for spending.
* @param deadline The deadline timestamp by which the call must be mined for the approve to work.
* @... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1728,
1894
]
} | 22,175 | ||
BondTellerErc20 | contracts/interface/IERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IERC721EnhancedInitializable | interface IERC721EnhancedInitializable is IERC721EnumerableUpgradeable {
/***************************************
SIMPLER TRANSFERS
***************************************/
/**
* @notice Transfers `tokenID` from `msg.sender` to `to`.
* @dev This was excluded from the official `ERC721` standa... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | nonces | function nonces(uint256 tokenID) external view returns (uint256 nonce);
| /**
* @notice Returns the current nonce for `tokenID`. This value must be
* included whenever a signature is generated for `permit`.
* Every successful call to `permit` increases ``tokenID``'s nonce by one. This
* prevents a signature from being used multiple times.
* @param tokenID ID of the token to request nonc... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2292,
2367
]
} | 22,176 | ||
BondTellerErc20 | contracts/interface/IERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IERC721EnhancedInitializable | interface IERC721EnhancedInitializable is IERC721EnumerableUpgradeable {
/***************************************
SIMPLER TRANSFERS
***************************************/
/**
* @notice Transfers `tokenID` from `msg.sender` to `to`.
* @dev This was excluded from the official `ERC721` standa... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | PERMIT_TYPEHASH | function PERMIT_TYPEHASH() external view returns (bytes32 typehash);
| // solhint-disable-next-line func-name-mixedcase | LineComment | v0.8.6+commit.11564f7e | {
"func_code_index": [
2560,
2632
]
} | 22,177 | ||
BondTellerErc20 | contracts/interface/IERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IERC721EnhancedInitializable | interface IERC721EnhancedInitializable is IERC721EnumerableUpgradeable {
/***************************************
SIMPLER TRANSFERS
***************************************/
/**
* @notice Transfers `tokenID` from `msg.sender` to `to`.
* @dev This was excluded from the official `ERC721` standa... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | DOMAIN_SEPARATOR | function DOMAIN_SEPARATOR() external view returns (bytes32 seperator);
| // solhint-disable-next-line func-name-mixedcase | LineComment | v0.8.6+commit.11564f7e | {
"func_code_index": [
2875,
2949
]
} | 22,178 | ||
BondTellerErc20 | contracts/interface/IERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IERC721EnhancedInitializable | interface IERC721EnhancedInitializable is IERC721EnumerableUpgradeable {
/***************************************
SIMPLER TRANSFERS
***************************************/
/**
* @notice Transfers `tokenID` from `msg.sender` to `to`.
* @dev This was excluded from the official `ERC721` standa... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | listTokens | function listTokens() external view returns (uint256[] memory tokenIDs);
| /**
* @notice Lists all tokens.
* Order not specified.
* @dev This function is more useful off chain than on chain.
* @return tokenIDs The list of token IDs.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3255,
3331
]
} | 22,179 | ||
BondTellerErc20 | contracts/interface/IERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IERC721EnhancedInitializable | interface IERC721EnhancedInitializable is IERC721EnumerableUpgradeable {
/***************************************
SIMPLER TRANSFERS
***************************************/
/**
* @notice Transfers `tokenID` from `msg.sender` to `to`.
* @dev This was excluded from the official `ERC721` standa... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | listTokensOfOwner | function listTokensOfOwner(address owner) external view returns (uint256[] memory tokenIDs);
| /**
* @notice Lists the tokens owned by `owner`.
* Order not specified.
* @dev This function is more useful off chain than on chain.
* @return tokenIDs The list of token IDs.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3540,
3636
]
} | 22,180 | ||
BondTellerErc20 | contracts/interface/IERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IERC721EnhancedInitializable | interface IERC721EnhancedInitializable is IERC721EnumerableUpgradeable {
/***************************************
SIMPLER TRANSFERS
***************************************/
/**
* @notice Transfers `tokenID` from `msg.sender` to `to`.
* @dev This was excluded from the official `ERC721` standa... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | exists | function exists(uint256 tokenID) external view returns (bool status);
| /**
* @notice Determines if a token exists or not.
* @param tokenID The ID of the token to query.
* @return status True if the token exists, false if it doesn't.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3827,
3900
]
} | 22,181 | ||
BondTellerErc20 | contracts/interface/IBondTeller.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondTeller | interface IBondTeller {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a bond is created.
event CreateBond(uint256 bondID, uint256 principalAmount, address payoutToken, uint256 payoutAmount, uint256 maturation);
/// @notice Emi... | /**
* @title IBondTeller
* @author solace.fi
* @notice Base type of Bond Tellers.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the underwriting pool and use... | NatSpecMultiLine | initialize | function initialize(
string memory name_,
address governance_,
address solace_,
address xsolace_,
address pool_,
address dao_,
address principal_,
address bondDepo_
) external;
| /**
* @notice Initializes the teller.
* @param name_ The name of the bond token.
* @param governance_ The address of the [governor](/docs/protocol/governance).
* @param solace_ The SOLACE token.
* @param xsolace_ The xSOLACE token.
* @param pool_ The underwriting pool.
* @param dao_ The DAO.
* @param principal_... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1355,
1603
]
} | 22,182 | ||
BondTellerErc20 | contracts/interface/IBondTeller.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondTeller | interface IBondTeller {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a bond is created.
event CreateBond(uint256 bondID, uint256 principalAmount, address payoutToken, uint256 payoutAmount, uint256 maturation);
/// @notice Emi... | /**
* @title IBondTeller
* @author solace.fi
* @notice Base type of Bond Tellers.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the underwriting pool and use... | NatSpecMultiLine | bondPrice | function bondPrice() external view returns (uint256 price_);
| /**
* @notice Calculate the current price of a bond.
* Assumes 1 SOLACE payout.
* @return price_ The price of the bond measured in `principal`.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1905,
1969
]
} | 22,183 | ||
BondTellerErc20 | contracts/interface/IBondTeller.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondTeller | interface IBondTeller {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a bond is created.
event CreateBond(uint256 bondID, uint256 principalAmount, address payoutToken, uint256 payoutAmount, uint256 maturation);
/// @notice Emi... | /**
* @title IBondTeller
* @author solace.fi
* @notice Base type of Bond Tellers.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the underwriting pool and use... | NatSpecMultiLine | calculateAmountOut | function calculateAmountOut(uint256 amountIn, bool stake) external view returns (uint256 amountOut);
| /**
* @notice Calculate the amount of **SOLACE** or **xSOLACE** out for an amount of `principal`.
* @param amountIn Amount of principal to deposit.
* @param stake True to stake, false to not stake.
* @return amountOut Amount of **SOLACE** or **xSOLACE** out.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2262,
2366
]
} | 22,184 | ||
BondTellerErc20 | contracts/interface/IBondTeller.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondTeller | interface IBondTeller {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a bond is created.
event CreateBond(uint256 bondID, uint256 principalAmount, address payoutToken, uint256 payoutAmount, uint256 maturation);
/// @notice Emi... | /**
* @title IBondTeller
* @author solace.fi
* @notice Base type of Bond Tellers.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the underwriting pool and use... | NatSpecMultiLine | calculateAmountIn | function calculateAmountIn(uint256 amountOut, bool stake) external view returns (uint256 amountIn);
| /**
* @notice Calculate the amount of `principal` in for an amount of **SOLACE** or **xSOLACE** out.
* @param amountOut Amount of **SOLACE** or **xSOLACE** out.
* @param stake True to stake, false to not stake.
* @return amountIn Amount of principal to deposit.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2662,
2765
]
} | 22,185 | ||
BondTellerErc20 | contracts/interface/IBondTeller.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondTeller | interface IBondTeller {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a bond is created.
event CreateBond(uint256 bondID, uint256 principalAmount, address payoutToken, uint256 payoutAmount, uint256 maturation);
/// @notice Emi... | /**
* @title IBondTeller
* @author solace.fi
* @notice Base type of Bond Tellers.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the underwriting pool and use... | NatSpecMultiLine | redeem | function redeem(uint256 bondID) external;
| /**
* @notice Redeem a bond.
* Bond must be matured.
* Redeemer must be owner or approved.
* @param bondID The ID of the bond to redeem.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3048,
3093
]
} | 22,186 | ||
BondTellerErc20 | contracts/interface/IBondTeller.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondTeller | interface IBondTeller {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a bond is created.
event CreateBond(uint256 bondID, uint256 principalAmount, address payoutToken, uint256 payoutAmount, uint256 maturation);
/// @notice Emi... | /**
* @title IBondTeller
* @author solace.fi
* @notice Base type of Bond Tellers.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the underwriting pool and use... | NatSpecMultiLine | pause | function pause() external;
| /**
* @notice Pauses deposits.
* Can only be called by the current [**governor**](/docs/protocol/governance).
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3342,
3372
]
} | 22,187 | ||
BondTellerErc20 | contracts/interface/IBondTeller.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondTeller | interface IBondTeller {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a bond is created.
event CreateBond(uint256 bondID, uint256 principalAmount, address payoutToken, uint256 payoutAmount, uint256 maturation);
/// @notice Emi... | /**
* @title IBondTeller
* @author solace.fi
* @notice Base type of Bond Tellers.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the underwriting pool and use... | NatSpecMultiLine | unpause | function unpause() external;
| /**
* @notice Unpauses deposits.
* Can only be called by the current [**governor**](/docs/protocol/governance).
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3507,
3539
]
} | 22,188 | ||
BondTellerErc20 | contracts/interface/IBondTeller.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | IBondTeller | interface IBondTeller {
/***************************************
EVENTS
***************************************/
/// @notice Emitted when a bond is created.
event CreateBond(uint256 bondID, uint256 principalAmount, address payoutToken, uint256 payoutAmount, uint256 maturation);
/// @notice Emi... | /**
* @title IBondTeller
* @author solace.fi
* @notice Base type of Bond Tellers.
*
* Bond tellers allow users to buy bonds. After vesting for `vestingTerm`, bonds can be redeemed for [**SOLACE**](./SOLACE) or [**xSOLACE**](./xSOLACE). Payments are made in `principal` which is sent to the underwriting pool and use... | NatSpecMultiLine | setAddresses | function setAddresses(
address solace_,
address xsolace_,
address pool_,
address dao_,
address principal_,
address bondDepo_
) external;
| /**
* @notice Sets the addresses to call out.
* Can only be called by the current [**governor**](/docs/protocol/governance).
* @param solace_ The SOLACE token.
* @param xsolace_ The xSOLACE token.
* @param pool_ The underwriting pool.
* @param dao_ The DAO.
* @param principal_ address The ERC20 token that users ... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
3955,
4147
]
} | 22,189 | ||
MEGAFLOKIDINGERDOGE | MegaFloki.sol | 0xc949204faf59c8cb7eaffee2a5b540ea333f6123 | Solidity | MEGAFLOKIDINGERDOGE | contract MEGAFLOKIDINGERDOGE is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address payable public marketingAddress =
payable(0x980674BE9C08088c38124850eDB492FfFfC68b6C); // Marketing Address
address public immutable deadAddress =
0x000000000000000000000000... | //to recieve ETH from uniswapV2Router when swaping | LineComment | v0.8.4+commit.c7e474f2 | None | ipfs://5a48da76002d7cea6d48f8c6da92c1c93b146ea2f3094abcbff738764b8cf0ae | {
"func_code_index": [
19546,
19579
]
} | 22,190 | ||||
MEGAFLOKIDINGERDOGE | MegaFloki.sol | 0xc949204faf59c8cb7eaffee2a5b540ea333f6123 | Solidity | MEGAFLOKIDINGERDOGE | contract MEGAFLOKIDINGERDOGE is Context, IERC20, Ownable {
using SafeMath for uint256;
using Address for address;
address payable public marketingAddress =
payable(0x980674BE9C08088c38124850eDB492FfFfC68b6C); // Marketing Address
address public immutable deadAddress =
0x000000000000000000000000... | emergencyWithdraw | function emergencyWithdraw() external onlyOwner {
payable(owner()).send(address(this).balance);
}
| // Withdraw ETH that gets stuck in contract by accident | LineComment | v0.8.4+commit.c7e474f2 | None | ipfs://5a48da76002d7cea6d48f8c6da92c1c93b146ea2f3094abcbff738764b8cf0ae | {
"func_code_index": [
19641,
19754
]
} | 22,191 | ||
BondTellerErc20 | contracts/ERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | ERC721EnhancedInitializable | abstract contract ERC721EnhancedInitializable is IERC721EnhancedInitializable, ERC721EnumerableUpgradeable, EIP712Upgradeable {
/// @dev The nonces used in the permit signature verification.
/// tokenID => nonce
mapping(uint256 => uint256) private _nonces;
/// @dev Value is equal to keccak256("Permit(... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | __ERC721Enhanced_init | function __ERC721Enhanced_init(string memory name, string memory symbol) internal initializer {
__ERC721_init(name, symbol);
__ERC721Enumerable_init_unchained();
__EIP712_init_unchained(name, "1");
}
| /**
* @notice Initializes the `ERC721Enhanced` contract.
* @param name The name of the token.
* @param symbol The symbol of the token.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
664,
895
]
} | 22,192 | ||
BondTellerErc20 | contracts/ERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | ERC721EnhancedInitializable | abstract contract ERC721EnhancedInitializable is IERC721EnhancedInitializable, ERC721EnumerableUpgradeable, EIP712Upgradeable {
/// @dev The nonces used in the permit signature verification.
/// tokenID => nonce
mapping(uint256 => uint256) private _nonces;
/// @dev Value is equal to keccak256("Permit(... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | transfer | function transfer(address to, uint256 tokenID) public override {
super.transferFrom(msg.sender, to, tokenID);
}
| /**
* @notice Transfers `tokenID` from `msg.sender` to `to`.
* @dev This was excluded from the official `ERC721` standard in favor of `transferFrom(address from, address to, uint256 tokenID)`. We elect to include it.
* @param to The receipient of the token.
* @param tokenID The token to transfer.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1413,
1540
]
} | 22,193 | ||
BondTellerErc20 | contracts/ERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | ERC721EnhancedInitializable | abstract contract ERC721EnhancedInitializable is IERC721EnhancedInitializable, ERC721EnumerableUpgradeable, EIP712Upgradeable {
/// @dev The nonces used in the permit signature verification.
/// tokenID => nonce
mapping(uint256 => uint256) private _nonces;
/// @dev Value is equal to keccak256("Permit(... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | safeTransfer | function safeTransfer(address to, uint256 tokenID) public override {
super.safeTransferFrom(msg.sender, to, tokenID, "");
}
| /**
* @notice Safely transfers `tokenID` from `msg.sender` to `to`.
* @dev This was excluded from the official `ERC721` standard in favor of `safeTransferFrom(address from, address to, uint256 tokenID)`. We elect to include it.
* @param to The receipient of the token.
* @param tokenID The token to transfer.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
1883,
2022
]
} | 22,194 | ||
BondTellerErc20 | contracts/ERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | ERC721EnhancedInitializable | abstract contract ERC721EnhancedInitializable is IERC721EnhancedInitializable, ERC721EnumerableUpgradeable, EIP712Upgradeable {
/// @dev The nonces used in the permit signature verification.
/// tokenID => nonce
mapping(uint256 => uint256) private _nonces;
/// @dev Value is equal to keccak256("Permit(... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | permit | function permit(
address spender,
uint256 tokenID,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external override {
require(_exists(tokenID), "query for nonexistent token");
require(block.timestamp <= deadline, "permit expired");
uint256 nonce = _nonces[tokenID]++; // get then ... | /**
* @notice Approve of a specific `tokenID` for spending by `spender` via signature.
* @param spender The account that is being approved.
* @param tokenID The ID of the token that is being approved for spending.
* @param deadline The deadline timestamp by which the call must be mined for the approve to work.
* @... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
2766,
3960
]
} | 22,195 | ||
BondTellerErc20 | contracts/ERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | ERC721EnhancedInitializable | abstract contract ERC721EnhancedInitializable is IERC721EnhancedInitializable, ERC721EnumerableUpgradeable, EIP712Upgradeable {
/// @dev The nonces used in the permit signature verification.
/// tokenID => nonce
mapping(uint256 => uint256) private _nonces;
/// @dev Value is equal to keccak256("Permit(... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | nonces | function nonces(uint256 tokenID) external view override returns (uint256 nonce) {
return _nonces[tokenID];
}
| /**
* @notice Returns the current nonce for `tokenID`. This value must be
* included whenever a signature is generated for `permit`.
* Every successful call to `permit` increases ``tokenID``'s nonce by one. This
* prevents a signature from being used multiple times.
* @param tokenID ID of the token to request nonc... | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
4358,
4482
]
} | 22,196 | ||
BondTellerErc20 | contracts/ERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | ERC721EnhancedInitializable | abstract contract ERC721EnhancedInitializable is IERC721EnhancedInitializable, ERC721EnumerableUpgradeable, EIP712Upgradeable {
/// @dev The nonces used in the permit signature verification.
/// tokenID => nonce
mapping(uint256 => uint256) private _nonces;
/// @dev Value is equal to keccak256("Permit(... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | PERMIT_TYPEHASH | function PERMIT_TYPEHASH() external pure override returns (bytes32 typehash) {
return _PERMIT_TYPEHASH;
}
| // solhint-disable-next-line func-name-mixedcase | LineComment | v0.8.6+commit.11564f7e | {
"func_code_index": [
4675,
4796
]
} | 22,197 | ||
BondTellerErc20 | contracts/ERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | ERC721EnhancedInitializable | abstract contract ERC721EnhancedInitializable is IERC721EnhancedInitializable, ERC721EnumerableUpgradeable, EIP712Upgradeable {
/// @dev The nonces used in the permit signature verification.
/// tokenID => nonce
mapping(uint256 => uint256) private _nonces;
/// @dev Value is equal to keccak256("Permit(... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | DOMAIN_SEPARATOR | function DOMAIN_SEPARATOR() public view override returns (bytes32 seperator) {
return _domainSeparatorV4();
}
| // solhint-disable-next-line func-name-mixedcase | LineComment | v0.8.6+commit.11564f7e | {
"func_code_index": [
5039,
5164
]
} | 22,198 | ||
BondTellerErc20 | contracts/ERC721EnhancedInitializable.sol | 0x501ace163ffacda6584d75b274ed23155bff4812 | Solidity | ERC721EnhancedInitializable | abstract contract ERC721EnhancedInitializable is IERC721EnhancedInitializable, ERC721EnumerableUpgradeable, EIP712Upgradeable {
/// @dev The nonces used in the permit signature verification.
/// tokenID => nonce
mapping(uint256 => uint256) private _nonces;
/// @dev Value is equal to keccak256("Permit(... | /**
* @title ERC721Enhanced
* @author solace.fi
* @notice An extension of `ERC721`.
*
* The base is OpenZeppelin's `ERC721Enumerable` which also includes the `Metadata` extension. This extension includes simpler transfers, gasless approvals, and better enumeration.
*/ | NatSpecMultiLine | listTokens | function listTokens() public view override returns (uint256[] memory tokenIDs) {
uint256 tokenCount = totalSupply();
tokenIDs = new uint256[](tokenCount);
for(uint256 index = 0; index < tokenCount; index++) {
tokenIDs[index] = tokenByIndex(index);
}
return tokenIDs;
}
| /**
* @notice Lists all tokens.
* Order not specified.
* @dev This function is more useful off chain than on chain.
* @return tokenIDs The list of token IDs.
*/ | NatSpecMultiLine | v0.8.6+commit.11564f7e | {
"func_code_index": [
5470,
5798
]
} | 22,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.