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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setInbox | function setInbox(address _inbox, bool _enabled) external;
| /**
* @notice Enable or disable an inbox contract
* @param _inbox Inbox contract to add or remove
* @param _enabled New status of inbox
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
573,
635
]
} | 27,000 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | pause | function pause() external;
| /**
* @notice Pause interaction with the rollup contract
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
711,
741
]
} | 27,001 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | resume | function resume() external;
| /**
* @notice Resume interaction with the rollup contract
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
818,
849
]
} | 27,002 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setFacets | function setFacets(address newAdminFacet, address newUserFacet) external;
| /**
* @notice Set the addresses of rollup logic facets called
* @param newAdminFacet address of logic that owner of rollup calls
* @param newUserFacet ddress of logic that user of rollup calls
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
1071,
1148
]
} | 27,003 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setValidator | function setValidator(address[] memory _validator, bool[] memory _val) external;
| /**
* @notice Set the addresses of the validator whitelist
* @dev It is expected that both arrays are same length, and validator at
* position i corresponds to the value at position i
* @param _validator addresses to set in the whitelist
* @param _val value to set in the whitelist for corresponding address
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
1495,
1579
]
} | 27,004 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setOwner | function setOwner(address newOwner) external;
| /**
* @notice Set a new owner address for the rollup
* @param newOwner address of new rollup owner
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
1702,
1751
]
} | 27,005 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setMinimumAssertionPeriod | function setMinimumAssertionPeriod(uint256 newPeriod) external;
| /**
* @notice Set minimum assertion period for the rollup
* @param newPeriod new minimum period for assertions
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
1886,
1953
]
} | 27,006 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setConfirmPeriodBlocks | function setConfirmPeriodBlocks(uint256 newConfirmPeriod) external;
| /**
* @notice Set number of blocks until a node is considered confirmed
* @param newConfirmPeriod new number of blocks until a node is confirmed
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
2122,
2193
]
} | 27,007 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setExtraChallengeTimeBlocks | function setExtraChallengeTimeBlocks(uint256 newExtraTimeBlocks) external;
| /**
* @notice Set number of extra blocks after a challenge
* @param newExtraTimeBlocks new number of blocks
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
2325,
2403
]
} | 27,008 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setArbGasSpeedLimitPerBlock | function setArbGasSpeedLimitPerBlock(uint256 newArbGasSpeedLimitPerBlock) external;
| /**
* @notice Set speed limit per block
* @param newArbGasSpeedLimitPerBlock maximum arbgas to be used per block
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
2540,
2627
]
} | 27,009 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setBaseStake | function setBaseStake(uint256 newBaseStake) external;
| /**
* @notice Set base stake required for an assertion
* @param newBaseStake maximum arbgas to be used per block
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
2764,
2821
]
} | 27,010 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setStakeToken | function setStakeToken(address newStakeToken) external;
| /**
* @notice Set the token used for stake, where address(0) == eth
* @dev Before changing the base stake token, you might need to change the
* implementation of the Rollup User facet!
* @param newStakeToken address of token used for staking
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
3097,
3156
]
} | 27,011 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setSequencerInboxMaxDelayBlocks | function setSequencerInboxMaxDelayBlocks(uint256 newSequencerInboxMaxDelayBlocks) external;
| /**
* @notice Set max delay in blocks for sequencer inbox
* @param newSequencerInboxMaxDelayBlocks max number of blocks
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
3300,
3395
]
} | 27,012 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setSequencerInboxMaxDelaySeconds | function setSequencerInboxMaxDelaySeconds(uint256 newSequencerInboxMaxDelaySeconds) external;
| /**
* @notice Set max delay in seconds for sequencer inbox
* @param newSequencerInboxMaxDelaySeconds max number of seconds
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
3542,
3639
]
} | 27,013 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setChallengeExecutionBisectionDegree | function setChallengeExecutionBisectionDegree(uint256 newChallengeExecutionBisectionDegree)
external;
| /**
* @notice Set execution bisection degree
* @param newChallengeExecutionBisectionDegree execution bisection degree
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
3781,
3894
]
} | 27,014 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | updateWhitelistConsumers | function updateWhitelistConsumers(
address whitelist,
address newWhitelist,
address[] memory targets
) external;
| /**
* @notice Updates a whitelist address for its consumers
* @dev setting the newWhitelist to address(0) disables it for consumers
* @param whitelist old whitelist to be deprecated
* @param newWhitelist new whitelist to be used
* @param targets whitelist consumers to be triggered
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
4215,
4359
]
} | 27,015 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setWhitelistEntries | function setWhitelistEntries(
address whitelist,
address[] memory user,
bool[] memory val
) external;
| /**
* @notice Updates a whitelist's entries
* @dev user at position i will be assigned value i
* @param whitelist whitelist to be updated
* @param user users to be updated in the whitelist
* @param val if user is or not allowed in the whitelist
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
4643,
4776
]
} | 27,016 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | setSequencer | function setSequencer(address newSequencer) external;
| /**
* @notice Updates a sequencer address at the sequencer inbox
* @param newSequencer new sequencer address to be used
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
4920,
4977
]
} | 27,017 | ||||
RollupEventBridge | contracts/rollup/facets/IRollupFacets.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupAdmin | interface IRollupAdmin {
/**
* @notice Add a contract authorized to put messages into this rollup's inbox
* @param _outbox Outbox contract to add
*/
function setOutbox(IOutbox _outbox) external;
/**
* @notice Disable an old outbox from interacting with the bridge
* @param _outbox O... | upgradeBeacon | function upgradeBeacon(address beacon, address newImplementation) external;
| /**
* @notice Upgrades the implementation of a beacon controlled by the rollup
* @param beacon address of beacon to be upgraded
* @param newImplementation new address of implementation
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
5191,
5270
]
} | 27,018 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | getStakerAddress | function getStakerAddress(uint256 stakerNum) external view returns (address);
| /**
* @notice Get the address of the staker at the given index
* @param stakerNum Index of the staker
* @return Address of the staker
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
463,
544
]
} | 27,019 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | isStaked | function isStaked(address staker) external view returns (bool);
| /**
* @notice Check whether the given staker is staked
* @param staker Staker address to check
* @return True or False for whether the staker was staked
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
726,
793
]
} | 27,020 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | latestStakedNode | function latestStakedNode(address staker) external view returns (uint256);
| /**
* @notice Get the latest staked node of the given staker
* @param staker Staker address to lookup
* @return Latest node staked of the staker
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
967,
1045
]
} | 27,021 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | currentChallenge | function currentChallenge(address staker) external view returns (address);
| /**
* @notice Get the current challenge of the given staker
* @param staker Staker address to lookup
* @return Current challenge of the staker
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
1217,
1295
]
} | 27,022 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | amountStaked | function amountStaked(address staker) external view returns (uint256);
| /**
* @notice Get the amount staked of the given staker
* @param staker Staker address to lookup
* @return Amount staked of the staker
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
1459,
1533
]
} | 27,023 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | zombieAddress | function zombieAddress(uint256 zombieNum) external view returns (address);
| /**
* @notice Get the original staker address of the zombie at the given index
* @param zombieNum Index of the zombie to lookup
* @return Original staker address of the zombie
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
1738,
1816
]
} | 27,024 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | zombieLatestStakedNode | function zombieLatestStakedNode(uint256 zombieNum) external view returns (uint256);
| /**
* @notice Get Latest node that the given zombie at the given index is staked on
* @param zombieNum Index of the zombie to lookup
* @return Latest node that the given zombie is staked on
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
2035,
2122
]
} | 27,025 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | zombieCount | function zombieCount() external view returns (uint256);
| /// @return Current number of un-removed zombies | NatSpecSingleLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
2177,
2236
]
} | 27,026 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | withdrawableFunds | function withdrawableFunds(address owner) external view returns (uint256);
| /**
* @notice Get the amount of funds withdrawable by the given address
* @param owner Address to check the funds of
* @return Amount of funds withdrawable by owner
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
2499,
2577
]
} | 27,027 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | firstUnresolvedNode | function firstUnresolvedNode() external view returns (uint256);
| /**
* @return Index of the first unresolved node
* @dev If all nodes have been resolved, this will be latestNodeCreated + 1
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
2725,
2792
]
} | 27,028 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | latestConfirmed | function latestConfirmed() external view returns (uint256);
| /// @return Index of the latest confirmed node | NatSpecSingleLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
2845,
2908
]
} | 27,029 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | latestNodeCreated | function latestNodeCreated() external view returns (uint256);
| /// @return Index of the latest rollup node created | NatSpecSingleLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
2966,
3031
]
} | 27,030 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | lastStakeBlock | function lastStakeBlock() external view returns (uint256);
| /// @return Ethereum block that the most recent stake was created | NatSpecSingleLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
3103,
3165
]
} | 27,031 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | stakerCount | function stakerCount() external view returns (uint256);
| /// @return Number of active stakers currently staked | NatSpecSingleLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
3225,
3284
]
} | 27,032 | ||||
RollupEventBridge | contracts/rollup/IRollupCore.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IRollupCore | interface IRollupCore {
function _stakerMap(address stakerAddress)
external
view
returns (
uint256,
uint256,
uint256,
address,
bool
);
function getNode(uint256 nodeNum) external view returns (INode);
/**
* @no... | getNodeHash | function getNodeHash(uint256 index) external view returns (bytes32);
| /// @return Node hash as of this node number | NatSpecSingleLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
3335,
3407
]
} | 27,033 | ||||
RollupEventBridge | contracts/arch/IOneStepProof.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | IOneStepProof | interface IOneStepProof {
// Bridges is sequencer bridge then delayed bridge
function executeStep(
address[2] calldata bridges,
uint256 initialMessagesRead,
bytes32[2] calldata accs,
bytes calldata proof,
bytes calldata bproof
)
external
view
r... | executeStep | function executeStep(
address[2] calldata bridges,
uint256 initialMessagesRead,
bytes32[2] calldata accs,
bytes calldata proof,
bytes calldata bproof
)
external
view
returns (
uint64 gas,
uint256 afterMessagesRead,
bytes32[4] memory fields
);
| // Bridges is sequencer bridge then delayed bridge | LineComment | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
81,
439
]
} | 27,034 | ||||
basic_erc20_token_factory | basic_erc20_token_factory.sol | 0xbac8813bd946e5397abfd2237316115b727f587b | Solidity | BasicERC20token | contract BasicERC20token {
uint256 constant MAX_UINT256 = 2**256 - 1;
uint256 public totalSupply;
string public name;
uint8 public decimals;
string public symbol;
string public version = 'smartmachine_basic_erc20_token_01';
address public creator;
uint public init;
address... | approveAndCall | function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) {
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
require(_spender.call(bytes4(bytes32(keccak256("receiveApproval(address,uint256,address,bytes)"))), msg.sender, ... | /* Approves and then calls the receiving contract */ | Comment | v0.4.25+commit.59dbf8f1 | bzzr://d70f4af4b07e4725b2761ad71557a502a2235fc77daf645932f33f4a90889fb4 | {
"func_code_index": [
1975,
2368
]
} | 27,035 | |||
MONA__Farming | Address.sol | 0x1c0e62e20a400a9d79cd7bfdb3cc938791d5cae4 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* IMPORTANT: It is unsafe to ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | isContract | function isContract(address account) internal view returns (bool) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
// According to EIP-1052, 0x0 is the value returned for not-yet created a... | /**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* IMPORTANT: It is unsafe to assume that an address for which this
* function ... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://e6a5441ba89f633efd29951f28819caeeddd601f3ec372018072923022e85b4e | {
"func_code_index": [
460,
1261
]
} | 27,036 |
MONA__Farming | Address.sol | 0x1c0e62e20a400a9d79cd7bfdb3cc938791d5cae4 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* IMPORTANT: It is unsafe to ... | /**
* @dev Collection of functions related to the address type
*/ | NatSpecMultiLine | toPayable | function toPayable(address account) internal pure returns (address payable) {
return address(uint160(account));
}
| /**
* @dev Converts an `address` into `address payable`. Note that this is
* simply a type cast: the actual underlying value is not changed.
*
* _Available since v2.4.0._
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://e6a5441ba89f633efd29951f28819caeeddd601f3ec372018072923022e85b4e | {
"func_code_index": [
1466,
1595
]
} | 27,037 |
MONA__Farming | Address.sol | 0x1c0e62e20a400a9d79cd7bfdb3cc938791d5cae4 | Solidity | Address | library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* IMPORTANT: It is unsafe to ... | /**
* @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-call-value
(bool success, ) = recipient.call.value(amount)("");
require(success, "Address: unable to send value, recipie... | /**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer... | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://e6a5441ba89f633efd29951f28819caeeddd601f3ec372018072923022e85b4e | {
"func_code_index": [
2548,
2917
]
} | 27,038 |
MONA__Farming | interfaceFarming.sol | 0x1c0e62e20a400a9d79cd7bfdb3cc938791d5cae4 | Solidity | IFarming | interface IFarming {
function lastTimeRewardApplicable() external view returns (uint256);
function rewardPerToken() external view returns (uint256);
function earned(address account) external view returns (uint256);
function getRewardForDuration() external view returns (uint256);
function totalS... | stake | function stake(uint256 amount) external;
| // Mutative | LineComment | v0.5.17+commit.d19bba13 | Unlicense | bzzr://e6a5441ba89f633efd29951f28819caeeddd601f3ec372018072923022e85b4e | {
"func_code_index": [
453,
497
]
} | 27,039 | ||
RollupEventBridge | contracts/rollup/Rollup.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | Rollup | contract Rollup is RollupBase {
// _rollupParams = [ confirmPeriodBlocks, extraChallengeTimeBlocks, arbGasSpeedLimitPerBlock, baseStake ]
// connectedContracts = [delayedBridge, sequencerInbox, outbox, rollupEventBridge, challengeFactory, nodeFactory]
function initialize(
bytes32 _machineHash,
... | initialize | function initialize(
bytes32 _machineHash,
uint256[4] calldata _rollupParams,
address _stakeToken,
address _owner,
bytes calldata _extraConfig,
address[6] calldata connectedContracts,
address[2] calldata _facets,
uint256[2] calldata sequencerInboxParams
) public {
require(confirmPeri... | // _rollupParams = [ confirmPeriodBlocks, extraChallengeTimeBlocks, arbGasSpeedLimitPerBlock, baseStake ]
// connectedContracts = [delayedBridge, sequencerInbox, outbox, rollupEventBridge, challengeFactory, nodeFactory] | LineComment | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
260,
2314
]
} | 27,040 | ||||
RollupEventBridge | contracts/rollup/Rollup.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | Rollup | contract Rollup is RollupBase {
// _rollupParams = [ confirmPeriodBlocks, extraChallengeTimeBlocks, arbGasSpeedLimitPerBlock, baseStake ]
// connectedContracts = [delayedBridge, sequencerInbox, outbox, rollupEventBridge, challengeFactory, nodeFactory]
function initialize(
bytes32 _machineHash,
... | getFacets | function getFacets() public view returns (address, address) {
return (getAdminFacet(), getUserFacet());
}
| /**
* Fallback and delegate functions from OZ
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.4.0/contracts/proxy/TransparentUpgradeableProxy.sol
* And dispatch pattern from EIP-2535: Diamonds
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
3485,
3606
]
} | 27,041 | ||||
RollupEventBridge | contracts/rollup/Rollup.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | Rollup | contract Rollup is RollupBase {
// _rollupParams = [ confirmPeriodBlocks, extraChallengeTimeBlocks, arbGasSpeedLimitPerBlock, baseStake ]
// connectedContracts = [delayedBridge, sequencerInbox, outbox, rollupEventBridge, challengeFactory, nodeFactory]
function initialize(
bytes32 _machineHash,
... | /**
* @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other
* function in the contract matches the call data.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
3986,
4046
]
} | 27,042 | ||||||
RollupEventBridge | contracts/rollup/Rollup.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | Rollup | contract Rollup is RollupBase {
// _rollupParams = [ confirmPeriodBlocks, extraChallengeTimeBlocks, arbGasSpeedLimitPerBlock, baseStake ]
// connectedContracts = [delayedBridge, sequencerInbox, outbox, rollupEventBridge, challengeFactory, nodeFactory]
function initialize(
bytes32 _machineHash,
... | /**
* @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data
* is empty.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
4202,
4261
]
} | 27,043 | ||||||
RollupEventBridge | contracts/rollup/Rollup.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | Rollup | contract Rollup is RollupBase {
// _rollupParams = [ confirmPeriodBlocks, extraChallengeTimeBlocks, arbGasSpeedLimitPerBlock, baseStake ]
// connectedContracts = [delayedBridge, sequencerInbox, outbox, rollupEventBridge, challengeFactory, nodeFactory]
function initialize(
bytes32 _machineHash,
... | _fallback | function _fallback() internal virtual {
require(msg.data.length >= 4, "NO_FUNC_SIG");
address rollupOwner = owner;
// if there is an owner and it is the sender, delegate to admin facet
address target =
rollupOwner != address(0) && rollupOwner == msg.sender
? getAdminFacet()
... | /**
* @dev Delegates the current call to the address returned by `_implementation()`.
*
* This function does not return to its internall call site, it will return directly to the external caller.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
4486,
4891
]
} | 27,044 | ||||
RollupEventBridge | contracts/rollup/Rollup.sol | 0x5c7355e46d5486583a1cc211701e25004231d9dd | Solidity | Rollup | contract Rollup is RollupBase {
// _rollupParams = [ confirmPeriodBlocks, extraChallengeTimeBlocks, arbGasSpeedLimitPerBlock, baseStake ]
// connectedContracts = [delayedBridge, sequencerInbox, outbox, rollupEventBridge, challengeFactory, nodeFactory]
function initialize(
bytes32 _machineHash,
... | _delegate | function _delegate(address implementation) internal virtual {
// solhint-disable-next-line no-inline-assembly
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad... | /**
* @dev Delegates the current call to `implementation`.
*
* This function does not return to its internall call site, it will return directly to the external caller.
*/ | NatSpecMultiLine | v0.6.11+commit.5ef660b1 | {
"func_code_index": [
5089,
6072
]
} | 27,045 | ||||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | name | function name() public view returns (string memory) {
return _name;
}
| /**
* @dev Returns the name of the token.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
872,
957
]
} | 27,046 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | symbol | function symbol() public view returns (string memory) {
return _symbol;
}
| /**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
1066,
1155
]
} | 27,047 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | decimals | function decimals() public view returns (uint8) {
return _decimals;
}
| /**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the v... | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
1774,
1859
]
} | 27,048 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | totalSupply | function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
| /**
* @dev See {IERC20-totalSupply}.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
1915,
2017
]
} | 27,049 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | balanceOf | function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
| /**
* @dev See {IERC20-balanceOf}.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
2071,
2192
]
} | 27,050 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | transfer | function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
| /**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
2391,
2567
]
} | 27,051 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | allowance | function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
| /**
* @dev See {IERC20-allowance}.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
2621,
2774
]
} | 27,052 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | approve | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| /**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
2908,
3078
]
} | 27,053 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | transferFrom | function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
| /**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* ... | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
3534,
3855
]
} | 27,054 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | increaseAllowance | function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
| /**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be t... | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
4246,
4465
]
} | 27,055 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | decreaseAllowance | function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
| /**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be t... | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
4948,
5218
]
} | 27,056 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | _transfer | function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] =... | /**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipie... | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
5688,
6222
]
} | 27,057 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | _mint | function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(addre... | /** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
6488,
6862
]
} | 27,058 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | _burn | function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSup... | /**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
7177,
7591
]
} | 27,059 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | _approve | function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}... | /**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
*... | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
8010,
8354
]
} | 27,060 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | _setupDecimals | function _setupDecimals(uint8 decimals_) internal {
_decimals = decimals_;
}
| /**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
8673,
8765
]
} | 27,061 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | ERC20 | contract ERC20 is Context, IERC20_1 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
... | /**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
... | NatSpecMultiLine | _beforeTokenTransfer | function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
| /**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to... | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
9348,
9444
]
} | 27,062 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20_1 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20_1 token, address... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using ... | NatSpecMultiLine | safeApprove | function safeApprove(IERC20_1 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line ma... | /**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/ | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
732,
1351
]
} | 27,063 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | SafeERC20 | library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20_1 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20_1 token, address... | /**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using ... | NatSpecMultiLine | _callOptionalReturn | function _callOptionalReturn(IERC20_1 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target add... | /**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.enc... | NatSpecMultiLine | v0.6.7+commit.b8d736ae | {
"func_code_index": [
2357,
3114
]
} | 27,064 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | IJar | interface IJar is IERC20_1 {
function token() external view returns (address);
function claimInsurance() external; // NOTE: Only yDelegatedVault implements this
function getRatio() external view returns (uint256);
function depositAll() external;
function deposit(uint256) external;
function ... | /* import "../lib/erc20.sol"; */ | Comment | getRatio | function getRatio() external view returns (uint256);
| // NOTE: Only yDelegatedVault implements this | LineComment | v0.6.7+commit.b8d736ae | {
"func_code_index": [
171,
227
]
} | 27,065 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | StrategyBase | abstract contract StrategyBase {
using SafeERC20 for IERC20_1;
using Address for address;
using SafeMath for uint256;
// Perfomance fees - start with 20%
uint256 public performanceTreasuryFee = 2000;
uint256 public constant performanceTreasuryMax = 10000;
uint256 public performanceDevFee =... | // Strategy Contract Basics | LineComment | balanceOfWant | function balanceOfWant() public view returns (uint256) {
return IERC20_1(want).balanceOf(address(this));
}
| // **** Views **** // | LineComment | v0.6.7+commit.b8d736ae | {
"func_code_index": [
1895,
2017
]
} | 27,066 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | StrategyBase | abstract contract StrategyBase {
using SafeERC20 for IERC20_1;
using Address for address;
using SafeMath for uint256;
// Perfomance fees - start with 20%
uint256 public performanceTreasuryFee = 2000;
uint256 public constant performanceTreasuryMax = 10000;
uint256 public performanceDevFee =... | // Strategy Contract Basics | LineComment | setWithdrawalDevFundFee | function setWithdrawalDevFundFee(uint256 _withdrawalDevFundFee) external {
require(msg.sender == timelock, "!timelock");
withdrawalDevFundFee = _withdrawalDevFundFee;
}
| // **** Setters **** // | LineComment | v0.6.7+commit.b8d736ae | {
"func_code_index": [
2305,
2497
]
} | 27,067 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | StrategyBase | abstract contract StrategyBase {
using SafeERC20 for IERC20_1;
using Address for address;
using SafeMath for uint256;
// Perfomance fees - start with 20%
uint256 public performanceTreasuryFee = 2000;
uint256 public constant performanceTreasuryMax = 10000;
uint256 public performanceDevFee =... | // Strategy Contract Basics | LineComment | deposit | function deposit() public virtual;
| // **** State mutations **** // | LineComment | v0.6.7+commit.b8d736ae | {
"func_code_index": [
3745,
3783
]
} | 27,068 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | StrategyBase | abstract contract StrategyBase {
using SafeERC20 for IERC20_1;
using Address for address;
using SafeMath for uint256;
// Perfomance fees - start with 20%
uint256 public performanceTreasuryFee = 2000;
uint256 public constant performanceTreasuryMax = 10000;
uint256 public performanceDevFee =... | // Strategy Contract Basics | LineComment | withdraw | function withdraw(IERC20_1 _asset) external returns (uint256 balance) {
require(msg.sender == controller, "!controller");
require(want != address(_asset), "want");
balance = _asset.balanceOf(address(this));
_asset.safeTransfer(controller, balance);
}
| // Controller only function for creating additional rewards from dust | LineComment | v0.6.7+commit.b8d736ae | {
"func_code_index": [
3859,
4149
]
} | 27,069 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | StrategyBase | abstract contract StrategyBase {
using SafeERC20 for IERC20_1;
using Address for address;
using SafeMath for uint256;
// Perfomance fees - start with 20%
uint256 public performanceTreasuryFee = 2000;
uint256 public constant performanceTreasuryMax = 10000;
uint256 public performanceDevFee =... | // Strategy Contract Basics | LineComment | withdraw | function withdraw(uint256 _amount) external {
require(msg.sender == controller, "!controller");
uint256 _balance = IERC20_1(want).balanceOf(address(this));
if (_balance < _amount) {
_amount = _withdrawSome(_amount.sub(_balance));
_amount = _amount.add(_balance);
}
uint256 _feeDev = ... | // Withdraw partial funds, normally used with a jar withdrawal | LineComment | v0.6.7+commit.b8d736ae | {
"func_code_index": [
4218,
5227
]
} | 27,070 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | StrategyBase | abstract contract StrategyBase {
using SafeERC20 for IERC20_1;
using Address for address;
using SafeMath for uint256;
// Perfomance fees - start with 20%
uint256 public performanceTreasuryFee = 2000;
uint256 public constant performanceTreasuryMax = 10000;
uint256 public performanceDevFee =... | // Strategy Contract Basics | LineComment | withdrawForSwap | function withdrawForSwap(uint256 _amount)
external
returns (uint256 balance)
{
require(msg.sender == controller, "!controller");
_withdrawSome(_amount);
balance = IERC20_1(want).balanceOf(address(this));
address _jar = IController(controller).jars(address(want));
require(_jar != address(0)... | // Withdraw funds, used to swap between strategies | LineComment | v0.6.7+commit.b8d736ae | {
"func_code_index": [
5284,
5708
]
} | 27,071 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | StrategyBase | abstract contract StrategyBase {
using SafeERC20 for IERC20_1;
using Address for address;
using SafeMath for uint256;
// Perfomance fees - start with 20%
uint256 public performanceTreasuryFee = 2000;
uint256 public constant performanceTreasuryMax = 10000;
uint256 public performanceDevFee =... | // Strategy Contract Basics | LineComment | withdrawAll | function withdrawAll() external returns (uint256 balance) {
require(msg.sender == controller, "!controller");
_withdrawAll();
balance = IERC20_1(want).balanceOf(address(this));
address _jar = IController(controller).jars(address(want));
require(_jar != address(0), "!jar"); // additional protection... | // Withdraw all funds, normally used when migrating strategies | LineComment | v0.6.7+commit.b8d736ae | {
"func_code_index": [
5777,
6206
]
} | 27,072 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | StrategyBase | abstract contract StrategyBase {
using SafeERC20 for IERC20_1;
using Address for address;
using SafeMath for uint256;
// Perfomance fees - start with 20%
uint256 public performanceTreasuryFee = 2000;
uint256 public constant performanceTreasuryMax = 10000;
uint256 public performanceDevFee =... | // Strategy Contract Basics | LineComment | execute | function execute(address _target, bytes memory _data)
public
payable
returns (bytes memory response)
{
require(msg.sender == timelock, "!timelock");
require(_target != address(0), "!target");
// call contract in current context
assembly {
let succeeded := delegatecall(
s... | // **** Emergency functions **** | LineComment | v0.6.7+commit.b8d736ae | {
"func_code_index": [
6453,
7476
]
} | 27,073 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | StrategyBase | abstract contract StrategyBase {
using SafeERC20 for IERC20_1;
using Address for address;
using SafeMath for uint256;
// Perfomance fees - start with 20%
uint256 public performanceTreasuryFee = 2000;
uint256 public constant performanceTreasuryMax = 10000;
uint256 public performanceDevFee =... | // Strategy Contract Basics | LineComment | _swapUniswap | function _swapUniswap(
address _from,
address _to,
uint256 _amount
) internal {
require(_to != address(0));
// Swap with uniswap
IERC20_1(_from).safeApprove(univ2Router2, 0);
IERC20_1(_from).safeApprove(univ2Router2, _amount);
address[] memory path;
if (_from == weth || _to == wet... | // **** Internal functions **** | LineComment | v0.6.7+commit.b8d736ae | {
"func_code_index": [
7514,
8310
]
} | 27,074 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | StrategyStakingRewardsBase | abstract contract StrategyStakingRewardsBase is StrategyBase {
address public rewards;
// **** Getters ****
constructor(
address _rewards,
address _want,
address _governance,
address _strategist,
address _controller,
address _timelock
)
public
... | // Base contract for SNX Staking rewards contract interfaces | LineComment | deposit | function deposit() public override {
uint256 _want = IERC20_1(want).balanceOf(address(this));
if (_want > 0) {
IERC20_1(want).safeApprove(rewards, 0);
IERC20_1(want).safeApprove(rewards, _want);
IStakingRewards(rewards).stake(_want);
}
}
| // **** Setters **** | LineComment | v0.6.7+commit.b8d736ae | {
"func_code_index": [
739,
1044
]
} | 27,075 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | StrategyBasisFarmBase | abstract contract StrategyBasisFarmBase is StrategyStakingRewardsBase {
// Token addresses
address public bas = 0xa7ED29B253D8B4E3109ce07c80fc570f81B63696;
address public dai = 0x6B175474E89094C44Da98b954EedeAC495271d0F;
// DAI/<token1> pair
address public token1;
// How much BAS tokens to kee... | /* import "./strategy-staking-rewards-base.sol"; */ | Comment | setKeepBAS | function setKeepBAS(uint256 _keepBAS) external {
require(msg.sender == timelock, "!timelock");
keepBAS = _keepBAS;
}
| // **** Setters **** | LineComment | v0.6.7+commit.b8d736ae | {
"func_code_index": [
874,
1014
]
} | 27,076 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | StrategyBasisFarmBase | abstract contract StrategyBasisFarmBase is StrategyStakingRewardsBase {
// Token addresses
address public bas = 0xa7ED29B253D8B4E3109ce07c80fc570f81B63696;
address public dai = 0x6B175474E89094C44Da98b954EedeAC495271d0F;
// DAI/<token1> pair
address public token1;
// How much BAS tokens to kee... | /* import "./strategy-staking-rewards-base.sol"; */ | Comment | harvest | function harvest() public override onlyBenevolent {
// Anyone can harvest it at any given time.
// I understand the possibility of being frontrun
// But ETH is a dark forest, and I wanna see how this plays out
// i.e. will be be heavily frontrunned?
// if so, a new strategy will be deployed.
... | // **** State Mutations **** | LineComment | v0.6.7+commit.b8d736ae | {
"func_code_index": [
1050,
3222
]
} | 27,077 | ||
StrategyBasisBacDaiLp | contracts/token/ERC20/ERC20.sol | 0xf06ffef3ada3725919699bff7ec5d38c743bb3cb | Solidity | StrategyBasisBacDaiLp | contract StrategyBasisBacDaiLp is StrategyBasisFarmBase {
// Token addresses
address public bas_rewards = 0x067d4D3CE63450E74F880F86b5b52ea3edF9Db0f;
address public uni_bac_dai_lp = 0xd4405F0704621DBe9d4dEA60E128E0C3b26bddbD;
address public bac = 0x3449FC1Cd036255BA1EB19d65fF4BA2b8903A69a;
construc... | /* import "../strategy-basis-farm-base.sol"; */ | Comment | getName | function getName() external override pure returns (string memory) {
return "StrategyBasisBacDaiLp";
}
| // **** Views **** | LineComment | v0.6.7+commit.b8d736ae | {
"func_code_index": [
699,
816
]
} | 27,078 | ||
MONA__Farming | math.sol | 0x1c0e62e20a400a9d79cd7bfdb3cc938791d5cae4 | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uin... | /**
* @dev Standard math utilities missing in the Solidity language.
*/ | NatSpecMultiLine | max | function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
| /**
* @dev Returns the largest of two numbers.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://e6a5441ba89f633efd29951f28819caeeddd601f3ec372018072923022e85b4e | {
"func_code_index": [
79,
188
]
} | 27,079 |
MONA__Farming | math.sol | 0x1c0e62e20a400a9d79cd7bfdb3cc938791d5cae4 | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uin... | /**
* @dev Standard math utilities missing in the Solidity language.
*/ | NatSpecMultiLine | min | function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
| /**
* @dev Returns the smallest of two numbers.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://e6a5441ba89f633efd29951f28819caeeddd601f3ec372018072923022e85b4e | {
"func_code_index": [
255,
363
]
} | 27,080 |
MONA__Farming | math.sol | 0x1c0e62e20a400a9d79cd7bfdb3cc938791d5cae4 | Solidity | Math | library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uin... | /**
* @dev Standard math utilities missing in the Solidity language.
*/ | NatSpecMultiLine | average | function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
}
| /**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://e6a5441ba89f633efd29951f28819caeeddd601f3ec372018072923022e85b4e | {
"func_code_index": [
472,
666
]
} | 27,081 |
MONA__Farming | Ownable.sol | 0x1c0e62e20a400a9d79cd7bfdb3cc938791d5cae4 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
... | owner | function owner() public view returns (address) {
return _owner;
}
| /**
* @dev Returns the address of the current owner.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://e6a5441ba89f633efd29951f28819caeeddd601f3ec372018072923022e85b4e | {
"func_code_index": [
480,
561
]
} | 27,082 | ||
MONA__Farming | Ownable.sol | 0x1c0e62e20a400a9d79cd7bfdb3cc938791d5cae4 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
... | renounceOwnership | function renounceOwnership() public onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
| /**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://e6a5441ba89f633efd29951f28819caeeddd601f3ec372018072923022e85b4e | {
"func_code_index": [
1103,
1244
]
} | 27,083 | ||
MONA__Farming | Ownable.sol | 0x1c0e62e20a400a9d79cd7bfdb3cc938791d5cae4 | Solidity | Ownable | contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
... | transferOwnership | function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| /**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/ | NatSpecMultiLine | v0.5.17+commit.d19bba13 | Unlicense | bzzr://e6a5441ba89f633efd29951f28819caeeddd601f3ec372018072923022e85b4e | {
"func_code_index": [
1389,
1625
]
} | 27,084 | ||
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | supportsInterface | function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC1155).interfaceId ||
interfaceId == type(IERC1155MetadataURI).interfaceId ||
super.supportsInterface(interfaceId);
}
| /**
* @dev See {IERC165-supportsInterface}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
652,
967
]
} | 27,085 |
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | uri | function uri(uint256) public view virtual override returns (string memory) {
return _uri;
}
| /**
* @dev See {IERC1155MetadataURI-uri}.
*
* This implementation returns the same URI for *all* token types. It relies
* on the token type ID substitution mechanism
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
*
* Clients calling this function must replace the `\{id\}` substrin... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
1373,
1483
]
} | 27,086 |
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | balanceOf | function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
require(account != address(0), "ERC1155: balance query for the zero address");
return _balances[id][account];
}
| /**
* @dev See {IERC1155-balanceOf}.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
1629,
1865
]
} | 27,087 |
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | balanceOfBatch | function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
public
view
virtual
override
returns (uint256[] memory)
{
require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");
uint256[] memory batchBalances = new uint256[](accounts.length);
... | /**
* @dev See {IERC1155-balanceOfBatch}.
*
* Requirements:
*
* - `accounts` and `ids` must have the same length.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
2026,
2555
]
} | 27,088 |
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | setApprovalForAll | function setApprovalForAll(address operator, bool approved) public virtual override {
require(_msgSender() != operator, "ERC1155: setting approval status for self");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
| /**
* @dev See {IERC1155-setApprovalForAll}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
2623,
2939
]
} | 27,089 |
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | isApprovedForAll | function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
return _operatorApprovals[account][operator];
}
| /**
* @dev See {IERC1155-isApprovedForAll}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
3006,
3179
]
} | 27,090 |
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | safeTransferFrom | function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) public virtual override {
require(
from == _msgSender() || isApprovedForAll(from, _msgSender()),
"ERC1155: caller is not owner nor approved"
);
_safeTransferFro... | /**
* @dev See {IERC1155-safeTransferFrom}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
3246,
3652
]
} | 27,091 |
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | safeBatchTransferFrom | function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public virtual override {
require(
from == _msgSender() || isApprovedForAll(from, _msgSender()),
"ERC1155: transfer caller is not owner nor appro... | /**
* @dev See {IERC1155-safeBatchTransferFrom}.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
3724,
4171
]
} | 27,092 |
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | _safeTransferFrom | function _safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: transfer to the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, from, to, _asSingleton... | /**
* @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `from` must have a balance of tokens of type `id` of at least `amount`.
* - If `to` refers to a smart contract, it must implemen... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
4630,
5455
]
} | 27,093 |
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | _safeBatchTransferFrom | function _safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
require(to != address(0), "ERC1155: transfer to the zer... | /**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
5808,
6887
]
} | 27,094 |
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | _setURI | function _setURI(string memory newuri) internal virtual {
_uri = newuri;
}
| /**
* @dev Sets a new URI for all token types, by relying on the token type ID
* substitution mechanism
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
*
* By this mechanism, any occurrence of the `\{id\}` substring in either the
* URI or any of the amounts in the JSON file at said U... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
7726,
7819
]
} | 27,095 |
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | _mint | function _mint(
address account,
uint256 id,
uint256 amount,
bytes memory data
) internal virtual {
require(account != address(0), "ERC1155: mint to the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _as... | /**
* @dev Creates `amount` tokens of token type `id`, and assigns them to `account`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* a... | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
8215,
8819
]
} | 27,096 |
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | _mintBatch | function _mintBatch(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: mint to the zero address");
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
address operato... | /**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
*
* Requirements:
*
* - `ids` and `amounts` must have the same length.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
9170,
9910
]
} | 27,097 |
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | _burn | function _burn(
address account,
uint256 id,
uint256 amount
) internal virtual {
require(account != address(0), "ERC1155: burn from the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount)... | /**
* @dev Destroys `amount` tokens of token type `id` from `account`
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens of token type `id`.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
10164,
10844
]
} | 27,098 |
MGDCbreedBAYC | @openzeppelin/contracts/token/ERC1155/ERC1155.sol | 0x563cb938f8945d01c1795bb7e457123e65983c06 | Solidity | ERC1155 | contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address =>... | /**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/ | NatSpecMultiLine | _burnBatch | function _burnBatch(
address account,
uint256[] memory ids,
uint256[] memory amounts
) internal virtual {
require(account != address(0), "ERC1155: burn from the zero address");
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
address operator = _msgSend... | /**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
*
* Requirements:
*
* - `ids` and `amounts` must have the same length.
*/ | NatSpecMultiLine | v0.8.4+commit.c7e474f2 | None | ipfs://466c4b071e867d164a5adec752e29c006da37e4005e639aaa96813b5b09d4112 | {
"func_code_index": [
11042,
11965
]
} | 27,099 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.