Unnamed: 0 int64 0 7.36k | comments stringlengths 3 35.2k | code_string stringlengths 1 527k | code stringlengths 1 527k | __index_level_0__ int64 0 88.6k |
|---|---|---|---|---|
18 | // Authorizes an account to manage all tokens/_operator The account address/_approved If permission is being given or removed | function setApprovalForAll(address _operator, bool _approved) external {
operatorApprovals[msg.sender][_operator] = _approved;
emit ApprovalForAll(msg.sender, _operator, _approved);
}
| function setApprovalForAll(address _operator, bool _approved) external {
operatorApprovals[msg.sender][_operator] = _approved;
emit ApprovalForAll(msg.sender, _operator, _approved);
}
| 30,029 |
153 | // Emits a {Transfer} event for each transfer of this multi-sending function./Function blocked when contract is paused./Function has a number of checks and conditions - see {_transfer} internal function./_bundleTo array of addresses which will get tokens/ return true if function passed successfully | function transfer(address[] memory _bundleTo, uint256 _amount)
public
whenNotPaused
returns (bool)
{
address owner = _msgSender();
_bundlesLoop(owner, _bundleTo, _amount, _transfer);
return true;
}
| function transfer(address[] memory _bundleTo, uint256 _amount)
public
whenNotPaused
returns (bool)
{
address owner = _msgSender();
_bundlesLoop(owner, _bundleTo, _amount, _transfer);
return true;
}
| 15,156 |
54 | // currency required for redemption | uint256 currencyRequired = rmul(epochRedeem, epochs[epochID].redeemFulfillment);
uint256 diff;
if (currencySupplied > currencyRequired) {
| uint256 currencyRequired = rmul(epochRedeem, epochs[epochID].redeemFulfillment);
uint256 diff;
if (currencySupplied > currencyRequired) {
| 15,078 |
10 | // set DISTANCETHRESHOLD/ ONLY DAO can call this function/distanceThreshold the min rebalance threshold to include/ a validator in the delegation process. | function setDistanceThreshold(uint256 distanceThreshold) external;
| function setDistanceThreshold(uint256 distanceThreshold) external;
| 31,977 |
19 | // TODO implement a turn based smart contract so that winner will be calculated by each attack and defense pattern | Player P1 = players[idx1];
Player P2 = players[idx2];
uint16 difference = 0;
for (uint16 i = 0; i < P1.moves.length; i++){
difference += P1.attacks[P1.moves[i]] - P2.attacks[P1.moves[i]];
}
| Player P1 = players[idx1];
Player P2 = players[idx2];
uint16 difference = 0;
for (uint16 i = 0; i < P1.moves.length; i++){
difference += P1.attacks[P1.moves[i]] - P2.attacks[P1.moves[i]];
}
| 30,433 |
26 | // Check that components not claimed already | require(!claimedByTokenId[tokenId], "ALREADY_CLAIMED");
| require(!claimedByTokenId[tokenId], "ALREADY_CLAIMED");
| 24,659 |
18 | // Gets all accessed reads and write slot from a recording session, for a given address | function accesses(address) external returns (bytes32[] memory reads, bytes32[] memory writes);
| function accesses(address) external returns (bytes32[] memory reads, bytes32[] memory writes);
| 17,302 |
24 | // Extension of `ERC20` that allows an owner to create certificatesto allow users to redeem/mint their own tokens according to certificate parameters / | contract ERC20Certificate is ERC20, owned {
using ECDSA for bytes32;
using SafeMath for uint256;
mapping (bytes32 => certificateType) public certificateTypes;
mapping (address => bool) public condenserDelegates;
struct certificateType {
uint256 amount;
string metadata;
mapping (address => bool) delegates;
mapping (address => bool) claimed;
}
/**
* @dev Creates a certificate type where users can redeem the certificate
* to receive `_amount` of tokens. Any of the `_delegates` can sign a certificate
* for a given address.
*
* `_metadata` field is meant to be an IPFS hash or URI which will
* resolve to display unique information about a particular certificate
*
* Can only be called by owner of contract
*
* Emits a `CertificateTypeCreated` event.
*/
function createCertificateType(uint256 _amount, address[] calldata _delegates, string calldata _metadata) external onlyOwner {
bytes32 certID = _getCertificateID(_amount, _delegates, _metadata);
certificateTypes[certID].amount = _amount;
certificateTypes[certID].metadata = _metadata;
for (uint8 i = 0; i < _delegates.length; i++) {
certificateTypes[certID].delegates[_delegates[i]] = true;
}
emit CertificateTypeCreated(certID, _amount, _delegates);
}
/**
* @dev Allows owner to add a trusted address as a condenser delegate.
* Any address added to this mapping will be able to sign condensed certificates
*/
function addCondenserDelegate(address _delegate) external onlyOwner {
condenserDelegates[_delegate] = true;
}
/**
* @dev Allows owner to remove an address from the condenser delegate mapping.
*/
function removeCondenserDelegate(address _delegate) external onlyOwner {
condenserDelegates[_delegate] = false;
}
/**
* @dev Allows caller to pass a `_signature` and a `_certificateID` to
* mint tokens to their own address. The token amount minted is speficied in the
* certificate. Can only be called once per caller, per certificate
*
* Emits a `CertificateRedeemed` event.
*/
function redeemCertificate(bytes calldata _signature, bytes32 _certificateID) external
returns (bool)
{
bytes32 hash = _getCertificateHash(_certificateID, msg.sender);
require(_isDelegateSigned(hash, _signature, _certificateID), "Not Delegate Signed");
require(!certificateTypes[_certificateID].claimed[msg.sender], "Cert already claimed");
certificateTypes[_certificateID].claimed[msg.sender] = true;
uint256 amount = certificateTypes[_certificateID].amount;
_mint(msg.sender, amount);
emit CertificateRedeemed(msg.sender, amount, _certificateID);
return true;
}
/**
* @dev Allows caller to pass an `_signature`, a `_combinedValue` and a list of `_certificateIDs` to
* redeem a condensed certificate which has the summed value of each certificate in the list.
* This will fail if any of the certificates in the list has already been redeemed
*
* Emits a `CertificateRedeemed` event.
*/
function redeemCondensedCertificate(bytes calldata _signature, uint256 _combinedValue, bytes32[] calldata _certificateIDs)
external
returns (bool)
{
bytes32 certIDsCondensed = _condenseCertificateIDs(_certificateIDs);
bytes32 condenserHash = _getCondensedCertificateHash(certIDsCondensed, _combinedValue, msg.sender);
address signer = condenserHash.toEthSignedMessageHash().recover(_signature);
require(condenserDelegates[signer], "Not valid condenser delegate");
for (uint8 i = 0; i < _certificateIDs.length; i++) {
require(!certificateTypes[_certificateIDs[i]].claimed[msg.sender], "Cert already claimed");
certificateTypes[_certificateIDs[i]].claimed[msg.sender] = true;
}
_mint(msg.sender, _combinedValue);
emit CondensedCertificateRedeemed(msg.sender, _combinedValue, _certificateIDs);
return true;
}
// View Functions
/**
* @dev Returns the metadata string for a `_certificateID`
*/
function getCertificateData(bytes32 _certificateID) external view returns (string memory) {
return certificateTypes[_certificateID].metadata;
}
/**
* @dev Returns the amount for a `_certificateID`
*/
function getCertificateAmount(bytes32 _certificateID) external view returns (uint256) {
return certificateTypes[_certificateID].amount;
}
/**
* @dev Calls internal function to return the ID for a certificate from parameters used to create certificate
*/
function getCertificateID(uint _amount, address[] calldata _delegates, string calldata _metadata) external view returns (bytes32) {
return _getCertificateID(_amount,_delegates, _metadata);
}
/**
* @dev Calls internal function to return the hash to sign for a certificate to redeemer
*/
function getCertificateHash(bytes32 _certificateID, address _redeemer) external view returns (bytes32) {
return _getCertificateHash(_certificateID, _redeemer);
}
/**
* @dev Calls internal function
*/
function getCondensedCertificateHash(bytes32 _condensedIDHash, uint256 _amount, address _redeemer) external view returns (bytes32) {
return _getCondensedCertificateHash(_condensedIDHash, _amount, _redeemer);
}
/**
* @dev Calls internal function to return boolean of whether a message and signature matches a certificate
*/
function isDelegateSigned(bytes32 _messageHash, bytes calldata _signature, bytes32 _certificateID) external view returns (bool) {
return _isDelegateSigned(_messageHash, _signature, _certificateID);
}
/**
* @dev Returns boolean of whether a `_delegate` address is a valid delagate of a certificate
*/
function isCertificateDelegate(bytes32 _certificateID, address _delegate) external view returns (bool) {
return certificateTypes[_certificateID].delegates[_delegate];
}
/**
* @dev Returns boolean of whether a certificate has been claimed by a `_recipient` address
*/
function isCertificateClaimed(bytes32 _certificateID, address _recipient) external view returns (bool) {
return certificateTypes[_certificateID].claimed[_recipient];
}
function condenseCertificateIDs(bytes32[] calldata _ids) external pure returns (bytes32) {
return _condenseCertificateIDs(_ids);
}
// Internal Functions
/** @dev Packs an `_amount`, this contract's address, `_delegates` array, and string `_metadata`
* and performs a keccak256 on the packed bytes and returns the bytes32 result
*/
function _getCertificateID(uint256 _amount, address[] memory _delegates, string memory _metadata) internal view returns (bytes32) {
return keccak256(abi.encodePacked(_amount,address(this),_delegates, _metadata));
}
/** @dev something
*/
function _getCondensedCertificateHash(bytes32 _condensedHash, uint256 _amount, address _redeemer) internal view returns (bytes32) {
return keccak256(abi.encodePacked(_condensedHash, _amount, _redeemer, address(this)));
}
/** @dev something
*/
function _condenseCertificateIDs(bytes32[] memory _ids) internal pure returns (bytes32) {
return keccak256(abi.encodePacked(_ids));
}
/** @dev Checks a `_signature` with a `_messageHash` to verify if the signer is a delegate for a given `_certificateID`
* and performs a keccak256 on the packed bytes and returns the bytes32 result
*/
function _isDelegateSigned(bytes32 _messageHash, bytes memory _signature, bytes32 _certificateID) internal view returns (bool) {
return certificateTypes[_certificateID].delegates[_messageHash.toEthSignedMessageHash().recover(_signature)];
}
function _getCertificateHash(bytes32 _certificateID, address _redeemer) internal view returns (bytes32) {
return keccak256(abi.encodePacked(_certificateID, address(this), _redeemer));
}
/**
* @dev Emitted when a new certificate is created for an `amount` that can have
* any of the `delegates` for signing certificates
*/
event CertificateTypeCreated(bytes32 indexed id, uint256 amount, address[] delegates);
/**
* @dev Emitted when a `caller` successfully redeems a certificate and receives `value` of tokens
*/
event CertificateRedeemed(address indexed caller, uint256 value, bytes32 certificateID);
/**
* @dev Emitted when a `caller` successfully redeems a certificate and receives `value` of tokens
*/
event CondensedCertificateRedeemed(address indexed caller, uint256 value, bytes32[] certificateIDs);
} | contract ERC20Certificate is ERC20, owned {
using ECDSA for bytes32;
using SafeMath for uint256;
mapping (bytes32 => certificateType) public certificateTypes;
mapping (address => bool) public condenserDelegates;
struct certificateType {
uint256 amount;
string metadata;
mapping (address => bool) delegates;
mapping (address => bool) claimed;
}
/**
* @dev Creates a certificate type where users can redeem the certificate
* to receive `_amount` of tokens. Any of the `_delegates` can sign a certificate
* for a given address.
*
* `_metadata` field is meant to be an IPFS hash or URI which will
* resolve to display unique information about a particular certificate
*
* Can only be called by owner of contract
*
* Emits a `CertificateTypeCreated` event.
*/
function createCertificateType(uint256 _amount, address[] calldata _delegates, string calldata _metadata) external onlyOwner {
bytes32 certID = _getCertificateID(_amount, _delegates, _metadata);
certificateTypes[certID].amount = _amount;
certificateTypes[certID].metadata = _metadata;
for (uint8 i = 0; i < _delegates.length; i++) {
certificateTypes[certID].delegates[_delegates[i]] = true;
}
emit CertificateTypeCreated(certID, _amount, _delegates);
}
/**
* @dev Allows owner to add a trusted address as a condenser delegate.
* Any address added to this mapping will be able to sign condensed certificates
*/
function addCondenserDelegate(address _delegate) external onlyOwner {
condenserDelegates[_delegate] = true;
}
/**
* @dev Allows owner to remove an address from the condenser delegate mapping.
*/
function removeCondenserDelegate(address _delegate) external onlyOwner {
condenserDelegates[_delegate] = false;
}
/**
* @dev Allows caller to pass a `_signature` and a `_certificateID` to
* mint tokens to their own address. The token amount minted is speficied in the
* certificate. Can only be called once per caller, per certificate
*
* Emits a `CertificateRedeemed` event.
*/
function redeemCertificate(bytes calldata _signature, bytes32 _certificateID) external
returns (bool)
{
bytes32 hash = _getCertificateHash(_certificateID, msg.sender);
require(_isDelegateSigned(hash, _signature, _certificateID), "Not Delegate Signed");
require(!certificateTypes[_certificateID].claimed[msg.sender], "Cert already claimed");
certificateTypes[_certificateID].claimed[msg.sender] = true;
uint256 amount = certificateTypes[_certificateID].amount;
_mint(msg.sender, amount);
emit CertificateRedeemed(msg.sender, amount, _certificateID);
return true;
}
/**
* @dev Allows caller to pass an `_signature`, a `_combinedValue` and a list of `_certificateIDs` to
* redeem a condensed certificate which has the summed value of each certificate in the list.
* This will fail if any of the certificates in the list has already been redeemed
*
* Emits a `CertificateRedeemed` event.
*/
function redeemCondensedCertificate(bytes calldata _signature, uint256 _combinedValue, bytes32[] calldata _certificateIDs)
external
returns (bool)
{
bytes32 certIDsCondensed = _condenseCertificateIDs(_certificateIDs);
bytes32 condenserHash = _getCondensedCertificateHash(certIDsCondensed, _combinedValue, msg.sender);
address signer = condenserHash.toEthSignedMessageHash().recover(_signature);
require(condenserDelegates[signer], "Not valid condenser delegate");
for (uint8 i = 0; i < _certificateIDs.length; i++) {
require(!certificateTypes[_certificateIDs[i]].claimed[msg.sender], "Cert already claimed");
certificateTypes[_certificateIDs[i]].claimed[msg.sender] = true;
}
_mint(msg.sender, _combinedValue);
emit CondensedCertificateRedeemed(msg.sender, _combinedValue, _certificateIDs);
return true;
}
// View Functions
/**
* @dev Returns the metadata string for a `_certificateID`
*/
function getCertificateData(bytes32 _certificateID) external view returns (string memory) {
return certificateTypes[_certificateID].metadata;
}
/**
* @dev Returns the amount for a `_certificateID`
*/
function getCertificateAmount(bytes32 _certificateID) external view returns (uint256) {
return certificateTypes[_certificateID].amount;
}
/**
* @dev Calls internal function to return the ID for a certificate from parameters used to create certificate
*/
function getCertificateID(uint _amount, address[] calldata _delegates, string calldata _metadata) external view returns (bytes32) {
return _getCertificateID(_amount,_delegates, _metadata);
}
/**
* @dev Calls internal function to return the hash to sign for a certificate to redeemer
*/
function getCertificateHash(bytes32 _certificateID, address _redeemer) external view returns (bytes32) {
return _getCertificateHash(_certificateID, _redeemer);
}
/**
* @dev Calls internal function
*/
function getCondensedCertificateHash(bytes32 _condensedIDHash, uint256 _amount, address _redeemer) external view returns (bytes32) {
return _getCondensedCertificateHash(_condensedIDHash, _amount, _redeemer);
}
/**
* @dev Calls internal function to return boolean of whether a message and signature matches a certificate
*/
function isDelegateSigned(bytes32 _messageHash, bytes calldata _signature, bytes32 _certificateID) external view returns (bool) {
return _isDelegateSigned(_messageHash, _signature, _certificateID);
}
/**
* @dev Returns boolean of whether a `_delegate` address is a valid delagate of a certificate
*/
function isCertificateDelegate(bytes32 _certificateID, address _delegate) external view returns (bool) {
return certificateTypes[_certificateID].delegates[_delegate];
}
/**
* @dev Returns boolean of whether a certificate has been claimed by a `_recipient` address
*/
function isCertificateClaimed(bytes32 _certificateID, address _recipient) external view returns (bool) {
return certificateTypes[_certificateID].claimed[_recipient];
}
function condenseCertificateIDs(bytes32[] calldata _ids) external pure returns (bytes32) {
return _condenseCertificateIDs(_ids);
}
// Internal Functions
/** @dev Packs an `_amount`, this contract's address, `_delegates` array, and string `_metadata`
* and performs a keccak256 on the packed bytes and returns the bytes32 result
*/
function _getCertificateID(uint256 _amount, address[] memory _delegates, string memory _metadata) internal view returns (bytes32) {
return keccak256(abi.encodePacked(_amount,address(this),_delegates, _metadata));
}
/** @dev something
*/
function _getCondensedCertificateHash(bytes32 _condensedHash, uint256 _amount, address _redeemer) internal view returns (bytes32) {
return keccak256(abi.encodePacked(_condensedHash, _amount, _redeemer, address(this)));
}
/** @dev something
*/
function _condenseCertificateIDs(bytes32[] memory _ids) internal pure returns (bytes32) {
return keccak256(abi.encodePacked(_ids));
}
/** @dev Checks a `_signature` with a `_messageHash` to verify if the signer is a delegate for a given `_certificateID`
* and performs a keccak256 on the packed bytes and returns the bytes32 result
*/
function _isDelegateSigned(bytes32 _messageHash, bytes memory _signature, bytes32 _certificateID) internal view returns (bool) {
return certificateTypes[_certificateID].delegates[_messageHash.toEthSignedMessageHash().recover(_signature)];
}
function _getCertificateHash(bytes32 _certificateID, address _redeemer) internal view returns (bytes32) {
return keccak256(abi.encodePacked(_certificateID, address(this), _redeemer));
}
/**
* @dev Emitted when a new certificate is created for an `amount` that can have
* any of the `delegates` for signing certificates
*/
event CertificateTypeCreated(bytes32 indexed id, uint256 amount, address[] delegates);
/**
* @dev Emitted when a `caller` successfully redeems a certificate and receives `value` of tokens
*/
event CertificateRedeemed(address indexed caller, uint256 value, bytes32 certificateID);
/**
* @dev Emitted when a `caller` successfully redeems a certificate and receives `value` of tokens
*/
event CondensedCertificateRedeemed(address indexed caller, uint256 value, bytes32[] certificateIDs);
} | 18,481 |
0 | // poke is called when new data arrives | function poke() public;
| function poke() public;
| 49,750 |
5 | // admin reserve minting | function gift(uint[] calldata quantity, address[] calldata recipient) external onlyOwner{
require(quantity.length == recipient.length, "Provide quantities and recipients" );
for(uint i = 0; i < recipient.length; ++i){
_safeMint(recipient[i], quantity[i]);
}
}
| function gift(uint[] calldata quantity, address[] calldata recipient) external onlyOwner{
require(quantity.length == recipient.length, "Provide quantities and recipients" );
for(uint i = 0; i < recipient.length; ++i){
_safeMint(recipient[i], quantity[i]);
}
}
| 75,693 |
65 | // Admin Functions / | function withdrawFunds() external onlyOwner whenNotPaused isSaleFinalized {
require(minimumRaiseAchieved(), "Minimum raise has to be reached");
FEE_ADDRESS.transfer(address(this).balance.mul(feePercentage).div(100)); /* Fee Address */
msg.sender.transfer(address(this).balance);
}
| function withdrawFunds() external onlyOwner whenNotPaused isSaleFinalized {
require(minimumRaiseAchieved(), "Minimum raise has to be reached");
FEE_ADDRESS.transfer(address(this).balance.mul(feePercentage).div(100)); /* Fee Address */
msg.sender.transfer(address(this).balance);
}
| 65,448 |
54 | // This emits when the approved address for an NFT is changed or reaffirmed. The zeroaddress indicates there is no approved address. When a Transfer event emits, this alsoindicates that the approved address for that NFT (if any) is reset to none. _owner Owner of NFT. _approved Address that we are approving. _tokenId NFT which we are approving. / | event Approval(
| event Approval(
| 3,779 |
101 | // Update the last block | pool.lastRewardBlock = block.number;
| pool.lastRewardBlock = block.number;
| 14,058 |
402 | // returns true if the reserve is enabled as collateral_reserve the reserve address return true if the reserve is enabled as collateral, false otherwise/ | function isReserveUsageAsCollateralEnabled(address _reserve) external view returns (bool) {
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
return reserve.usageAsCollateralEnabled;
}
| function isReserveUsageAsCollateralEnabled(address _reserve) external view returns (bool) {
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
return reserve.usageAsCollateralEnabled;
}
| 24,421 |
108 | // end of egses | 6,493 | ||
356 | // Return true if a particular market is in closing mode. Additional borrows cannot be takenfrom a market that is closing. marketIdThe market to queryreturn True if the market is closing / | function getMarketIsClosing(
uint256 marketId
)
public
view
returns (bool)
| function getMarketIsClosing(
uint256 marketId
)
public
view
returns (bool)
| 15,674 |
3 | // Setting the admin to be the person who has deployed this contract | admin = msg.sender;
| admin = msg.sender;
| 20,839 |
4 | // --- Auth --- |
address public ArchAdmin;
mapping(address => uint256) public wards;
|
address public ArchAdmin;
mapping(address => uint256) public wards;
| 4,749 |
28 | // Get a pointer to some free memory. | let freeMemoryPointer := mload(0x40)
| let freeMemoryPointer := mload(0x40)
| 8,459 |
32 | // https:docs.pynthetix.io/contracts/source/contracts/mixinresolver | contract MixinResolver {
AddressResolver public resolver;
mapping(bytes32 => address) private addressCache;
constructor(address _resolver) internal {
resolver = AddressResolver(_resolver);
}
/* ========== INTERNAL FUNCTIONS ========== */
function combineArrays(bytes32[] memory first, bytes32[] memory second)
internal
pure
returns (bytes32[] memory combination)
{
combination = new bytes32[](first.length + second.length);
for (uint i = 0; i < first.length; i++) {
combination[i] = first[i];
}
for (uint j = 0; j < second.length; j++) {
combination[first.length + j] = second[j];
}
}
/* ========== PUBLIC FUNCTIONS ========== */
// Note: this function is public not external in order for it to be overridden and invoked via super in subclasses
function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {}
function rebuildCache() public {
bytes32[] memory requiredAddresses = resolverAddressesRequired();
// The resolver must call this function whenver it updates its state
for (uint i = 0; i < requiredAddresses.length; i++) {
bytes32 name = requiredAddresses[i];
// Note: can only be invoked once the resolver has all the targets needed added
address destination = resolver.requireAndGetAddress(
name,
string(abi.encodePacked("Resolver missing target: ", name))
);
addressCache[name] = destination;
emit CacheUpdated(name, destination);
}
}
/* ========== VIEWS ========== */
function isResolverCached() external view returns (bool) {
bytes32[] memory requiredAddresses = resolverAddressesRequired();
for (uint i = 0; i < requiredAddresses.length; i++) {
bytes32 name = requiredAddresses[i];
// false if our cache is invalid or if the resolver doesn't have the required address
if (resolver.getAddress(name) != addressCache[name] || addressCache[name] == address(0)) {
return false;
}
}
return true;
}
/* ========== INTERNAL FUNCTIONS ========== */
function requireAndGetAddress(bytes32 name) internal view returns (address) {
address _foundAddress = addressCache[name];
require(_foundAddress != address(0), string(abi.encodePacked("Missing address: ", name)));
return _foundAddress;
}
/* ========== EVENTS ========== */
event CacheUpdated(bytes32 name, address destination);
}
| contract MixinResolver {
AddressResolver public resolver;
mapping(bytes32 => address) private addressCache;
constructor(address _resolver) internal {
resolver = AddressResolver(_resolver);
}
/* ========== INTERNAL FUNCTIONS ========== */
function combineArrays(bytes32[] memory first, bytes32[] memory second)
internal
pure
returns (bytes32[] memory combination)
{
combination = new bytes32[](first.length + second.length);
for (uint i = 0; i < first.length; i++) {
combination[i] = first[i];
}
for (uint j = 0; j < second.length; j++) {
combination[first.length + j] = second[j];
}
}
/* ========== PUBLIC FUNCTIONS ========== */
// Note: this function is public not external in order for it to be overridden and invoked via super in subclasses
function resolverAddressesRequired() public view returns (bytes32[] memory addresses) {}
function rebuildCache() public {
bytes32[] memory requiredAddresses = resolverAddressesRequired();
// The resolver must call this function whenver it updates its state
for (uint i = 0; i < requiredAddresses.length; i++) {
bytes32 name = requiredAddresses[i];
// Note: can only be invoked once the resolver has all the targets needed added
address destination = resolver.requireAndGetAddress(
name,
string(abi.encodePacked("Resolver missing target: ", name))
);
addressCache[name] = destination;
emit CacheUpdated(name, destination);
}
}
/* ========== VIEWS ========== */
function isResolverCached() external view returns (bool) {
bytes32[] memory requiredAddresses = resolverAddressesRequired();
for (uint i = 0; i < requiredAddresses.length; i++) {
bytes32 name = requiredAddresses[i];
// false if our cache is invalid or if the resolver doesn't have the required address
if (resolver.getAddress(name) != addressCache[name] || addressCache[name] == address(0)) {
return false;
}
}
return true;
}
/* ========== INTERNAL FUNCTIONS ========== */
function requireAndGetAddress(bytes32 name) internal view returns (address) {
address _foundAddress = addressCache[name];
require(_foundAddress != address(0), string(abi.encodePacked("Missing address: ", name)));
return _foundAddress;
}
/* ========== EVENTS ========== */
event CacheUpdated(bytes32 name, address destination);
}
| 19,016 |
18 | // Decrements Through Available Card Stack / | function _drawAvailableCard() private view returns (uint256)
| function _drawAvailableCard() private view returns (uint256)
| 26,691 |
1 | // Executes an action. _target Target of execution. _a Address usually represention from. _b Address usually representing to. _c Integer usually repersenting amount/value/id. / | function execute(
address _target,
address _a,
address _b,
uint256 _c
)
external;
| function execute(
address _target,
address _a,
address _b,
uint256 _c
)
external;
| 44,750 |
18 | // calculate the amount of token how much input token should be reimbursed, BNB -> BUSD | uint256 amountRequired = IUniswapV2Router02(sourceRouter).getAmountsIn(
amountToken,
path2
)[0];
| uint256 amountRequired = IUniswapV2Router02(sourceRouter).getAmountsIn(
amountToken,
path2
)[0];
| 27,924 |
17 | // encode the payload | bytes memory payload = abi.encode(msg.sender, msg.value);
| bytes memory payload = abi.encode(msg.sender, msg.value);
| 1,718 |
49 | // Confirm | confirmations[transactionId][signer] = true;
emit Confirmation(signer, transactionId);
| confirmations[transactionId][signer] = true;
emit Confirmation(signer, transactionId);
| 12,430 |
137 | // Set governance for this token There will only be a limited supply of tokens ever | governance = msg.sender;
DOMAINSEPARATOR = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), _getChainId(), address(this)));
KPRH = IKeep3rV1Helper(_kph);
maxCap = _maxCap;
| governance = msg.sender;
DOMAINSEPARATOR = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), _getChainId(), address(this)));
KPRH = IKeep3rV1Helper(_kph);
maxCap = _maxCap;
| 42,495 |
20 | // Returns the historical price specified by `id`. Decimals is 8. / | function getPrice(uint256 id) external returns (uint256);
| function getPrice(uint256 id) external returns (uint256);
| 41,462 |
19 | // ERC20 params | string public name; // ERC20
string public symbol; // ERC20
uint private _totalSupply; // ERC20
uint public decimals = 8; // ERC20
| string public name; // ERC20
string public symbol; // ERC20
uint private _totalSupply; // ERC20
uint public decimals = 8; // ERC20
| 33,185 |
16 | // sets KYA Requirements: - the caller must have DEFAULT_ADMIN_ROLE./ | function setKYA(string calldata _knowYourAsset) external {
require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "must have DEFAULT_ADMIN_ROLE");
KYA = _knowYourAsset;
}
| function setKYA(string calldata _knowYourAsset) external {
require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "must have DEFAULT_ADMIN_ROLE");
KYA = _knowYourAsset;
}
| 18,246 |
369 | // _transfer, _mint and _burn are the only functions where the balances are modified, so it is there that the snapshots are updated. Note that the update happens _before_ the balance change, with the pre-modified value. The same is true for the total supply and _mint and _burn. | function _transfer(address from, address to, uint256 value) internal virtual override {
_updateAccountSnapshot(from);
_updateAccountSnapshot(to);
super._transfer(from, to, value);
}
| function _transfer(address from, address to, uint256 value) internal virtual override {
_updateAccountSnapshot(from);
_updateAccountSnapshot(to);
super._transfer(from, to, value);
}
| 11,715 |
55 | // Set whether the collection can be editable or not. This property is used off-chain to check whether the items of the collectioncan be updated or not _value - Value to set / | function setEditable(bool _value) external onlyOwner {
require(isEditable != _value, "setEditable: VALUE_IS_THE_SAME");
emit SetEditable(isEditable, _value);
isEditable = _value;
}
| function setEditable(bool _value) external onlyOwner {
require(isEditable != _value, "setEditable: VALUE_IS_THE_SAME");
emit SetEditable(isEditable, _value);
isEditable = _value;
}
| 19,045 |
11 | // underlying function is not available for Aave tokens | function underlying ( ) external view returns ( address );
function liquidateBorrow ( address borrower, uint256 repayAmount, address cTokenCollateral ) external returns ( uint256 );
| function underlying ( ) external view returns ( address );
function liquidateBorrow ( address borrower, uint256 repayAmount, address cTokenCollateral ) external returns ( uint256 );
| 10,895 |
258 | // mint function for TrueRewardBackedTokenMints TrueCurrency backed by debtWhen we add multiple opportunities, this needs to work for mutliple interfaces / | function mint(address _to, uint256 _value) public onlyOwner {
// check if to address is enabled
bool toEnabled = trueRewardEnabled(_to);
// if to enabled, mint to this contract and deposit into finOp
if (toEnabled) {
// mint to this contract
super.mint(address(this), _value);
// transfer minted amount to target receiver
_transferAllArgs(address(this), _to, _value);
}
// otherwise call normal mint process
else {
super.mint(_to, _value);
}
}
| function mint(address _to, uint256 _value) public onlyOwner {
// check if to address is enabled
bool toEnabled = trueRewardEnabled(_to);
// if to enabled, mint to this contract and deposit into finOp
if (toEnabled) {
// mint to this contract
super.mint(address(this), _value);
// transfer minted amount to target receiver
_transferAllArgs(address(this), _to, _value);
}
// otherwise call normal mint process
else {
super.mint(_to, _value);
}
}
| 32,638 |
6 | // theof refrerrals | uint256 public _totalReferReward;
| uint256 public _totalReferReward;
| 19,066 |
29 | // If none of the above conditions are satisfied, then should not rebalance | return ShouldRebalance.NONE;
| return ShouldRebalance.NONE;
| 11,784 |
55 | // Scheduled for minting reserve tokens amount is 575M FNP | uint256 public mintSize = uint256(575000000).mul(10 ** 18);
| uint256 public mintSize = uint256(575000000).mul(10 ** 18);
| 41,490 |
69 | // get edition ID from storage | return _tokenToEdition[_tokenId];
| return _tokenToEdition[_tokenId];
| 66,888 |
40 | // if(timeT > 0) | {
uint256 rewardToGive = calculateReward(timeT,user);
return rewardToGive;
}//else
| {
uint256 rewardToGive = calculateReward(timeT,user);
return rewardToGive;
}//else
| 8,740 |
26 | // Get appeal time window./_disputeID The dispute ID as in arbitrator./_ruling The ruling option to query./ return Start/ return End | function getAppealPeriod(uint256 _disputeID, RulingOptions _ruling)
external
view
virtual
returns (uint256, uint256);
| function getAppealPeriod(uint256 _disputeID, RulingOptions _ruling)
external
view
virtual
returns (uint256, uint256);
| 25,898 |
28 | // add balance | _xETHBalances[to] = _xETHBalances[to].add(xETHValue);
emit Transfer(address(0),to,amount);
| _xETHBalances[to] = _xETHBalances[to].add(xETHValue);
emit Transfer(address(0),to,amount);
| 1,687 |
147 | // Max deposit of ERC20 token that is possible to deposit | uint128 internal constant MAX_DEPOSIT_AMOUNT = 20282409603651670423947251286015;
| uint128 internal constant MAX_DEPOSIT_AMOUNT = 20282409603651670423947251286015;
| 16,046 |
48 | // Find if the user calling approve is the winner or loser. | bool winner = false;
bool loser = false;
if (proposedMatches[id].winner == msg.sender) {
winner = true;
}
| bool winner = false;
bool loser = false;
if (proposedMatches[id].winner == msg.sender) {
winner = true;
}
| 16,882 |
124 | // Reward adjustment |
rewardAdjustmentPeriod = 210000;
|
rewardAdjustmentPeriod = 210000;
| 18,279 |
39 | // Token for crowdsale (Token contract). Replace 0x0 by deployed ERC20 token address. | ERC20 public token = ERC20(0x0e27b0ca1f890d37737dd5cde9de22431255f524);
| ERC20 public token = ERC20(0x0e27b0ca1f890d37737dd5cde9de22431255f524);
| 42,880 |
0 | // See the documentation in {IPRBProxyRegistry}. | /*//////////////////////////////////////////////////////////////////////////
CONSTANTS
| /*//////////////////////////////////////////////////////////////////////////
CONSTANTS
| 13,338 |
59 | // src/interfaces/IELIP002.sol/ pragma solidity ^0.6.7; /// | interface IELIP002 {
struct Item {
// index of `Formula`
uint256 index;
// strength rate
uint128 rate;
uint16 objClassExt;
uint16 class;
uint16 grade;
// element prefer
uint16 prefer;
// ids of major material
uint256 id;
// addresses of major material
address token;
// amounts of minor material
uint256 amount;
}
/**
@dev `Enchanted` MUST emit when item is enchanted.
The `user` argument MUST be the address of an account/contract that is approved to make the enchant (SHOULD be msg.sender).
The `tokenId` argument MUST be token Id of the item which it is enchanted.
The `index` argument MUST be index of the `Formula`.
The `rate` argument MUST be rate of minor material.
The `objClassExt` argument MUST be extension of `ObjectClass`.
The `class` argument MUST be class of the item.
The `grade` argument MUST be grade of the item.
The `prefer` argument MUST be prefer of the item.
The `id` argument MUST be token ids of major material.
The `token` argument MUST be token address of minor material.
The `amount` argument MUST be token amount of minor material.
The `now` argument MUST be timestamp of enchant.
*/
event Enchanced(
address indexed user,
uint256 indexed tokenId,
uint256 index,
uint128 rate,
uint16 objClassExt,
uint16 class,
uint16 grade,
uint16 prefer,
uint256 id,
address token,
uint256 amount,
uint256 now
);
/**
@dev `Disenchanted` MUST emit when item is disenchanted.
The `user` argument MUST be the address of an account/contract that is approved to make the disenchanted (SHOULD be msg.sender).
The `tokenId` argument MUST be token Id of the item which it is disenchated.
The `majors` argument MUST be major token addresses of major material.
The `ids` argument MUST be token ids of major material.
The `minors` argument MUST be token addresses of minor material.
The `amounts` argument MUST be token amounts of minor material.
*/
event Disenchanted(
address indexed user,
uint256 tokenId,
address major,
uint256 id,
address minor,
uint256 amount
);
/**
@notice Caller must be owner of tokens to enchant.
@dev Enchant function, Enchant a new NFT token from ERC721 tokens and ERC20 tokens. Enchant rule is according to `Formula`.
MUST revert if `_index` is not in `formula`.
MUST revert if length of `_ids` is not the same as length of `formula` index rules.
MUST revert if length of `_values` is not the same as length of `formula` index rules.
MUST revert on any other error.
@param _id ID of NFT tokens(order and length must match `formula` index rules).
@param _token Address of FT tokens(order and length must match `formula` index rules).
@return {
"tokenId": "New Token ID of Enchanting."
}
*/
function enchant(
uint256 _index,
uint256 _id,
address _token
) external returns (uint256);
// {
// ### smelt
// 1. check Formula rule by index
// 2. transfer FT and NFT to address(this)
// 3. track FTs NFT to new NFT
// 4. mint new NFT to caller
// }
/**
@notice Caller must be owner of token id to disenchat.
@dev Disenchant function, A enchanted NFT can be disenchanted into origin ERC721 tokens and ERC20 tokens recursively.
MUST revert on any other error.
@param _id Token ID to disenchant.
@param _depth Depth of disenchanting recursively.
*/
function disenchant(uint256 _id, uint256 _depth) external;
// {
// ### disenchant
// 1. tranfer _id to address(this)
// 2. burn new NFT
// 3. delete track FTs NFTs to new NFT
// 4. transfer FNs NFTs to owner
// }
/**
@dev Get base info of item.
@param _tokenId Token id of item.
@return {
"objClassExt": "Extension of `ObjectClass`.",
"class": "Class of the item.",
"grade": "Grade of the item."
}
*/
function getBaseInfo(uint256 _tokenId)
external
view
returns (
uint16,
uint16,
uint16
);
/**
@dev Get rate of item.
@param _tokenId Token id of item.
@param _element Element item prefer.
@return {
"rate": "strength rate of item."
}
*/
function getRate(uint256 _tokenId, uint256 _element)
external
view
returns (uint256);
function getPrefer(uint256 _tokenId)
external
view
returns (uint16);
function getObjectClassExt(uint256 _tokenId)
external
view
returns (uint16);
}
| interface IELIP002 {
struct Item {
// index of `Formula`
uint256 index;
// strength rate
uint128 rate;
uint16 objClassExt;
uint16 class;
uint16 grade;
// element prefer
uint16 prefer;
// ids of major material
uint256 id;
// addresses of major material
address token;
// amounts of minor material
uint256 amount;
}
/**
@dev `Enchanted` MUST emit when item is enchanted.
The `user` argument MUST be the address of an account/contract that is approved to make the enchant (SHOULD be msg.sender).
The `tokenId` argument MUST be token Id of the item which it is enchanted.
The `index` argument MUST be index of the `Formula`.
The `rate` argument MUST be rate of minor material.
The `objClassExt` argument MUST be extension of `ObjectClass`.
The `class` argument MUST be class of the item.
The `grade` argument MUST be grade of the item.
The `prefer` argument MUST be prefer of the item.
The `id` argument MUST be token ids of major material.
The `token` argument MUST be token address of minor material.
The `amount` argument MUST be token amount of minor material.
The `now` argument MUST be timestamp of enchant.
*/
event Enchanced(
address indexed user,
uint256 indexed tokenId,
uint256 index,
uint128 rate,
uint16 objClassExt,
uint16 class,
uint16 grade,
uint16 prefer,
uint256 id,
address token,
uint256 amount,
uint256 now
);
/**
@dev `Disenchanted` MUST emit when item is disenchanted.
The `user` argument MUST be the address of an account/contract that is approved to make the disenchanted (SHOULD be msg.sender).
The `tokenId` argument MUST be token Id of the item which it is disenchated.
The `majors` argument MUST be major token addresses of major material.
The `ids` argument MUST be token ids of major material.
The `minors` argument MUST be token addresses of minor material.
The `amounts` argument MUST be token amounts of minor material.
*/
event Disenchanted(
address indexed user,
uint256 tokenId,
address major,
uint256 id,
address minor,
uint256 amount
);
/**
@notice Caller must be owner of tokens to enchant.
@dev Enchant function, Enchant a new NFT token from ERC721 tokens and ERC20 tokens. Enchant rule is according to `Formula`.
MUST revert if `_index` is not in `formula`.
MUST revert if length of `_ids` is not the same as length of `formula` index rules.
MUST revert if length of `_values` is not the same as length of `formula` index rules.
MUST revert on any other error.
@param _id ID of NFT tokens(order and length must match `formula` index rules).
@param _token Address of FT tokens(order and length must match `formula` index rules).
@return {
"tokenId": "New Token ID of Enchanting."
}
*/
function enchant(
uint256 _index,
uint256 _id,
address _token
) external returns (uint256);
// {
// ### smelt
// 1. check Formula rule by index
// 2. transfer FT and NFT to address(this)
// 3. track FTs NFT to new NFT
// 4. mint new NFT to caller
// }
/**
@notice Caller must be owner of token id to disenchat.
@dev Disenchant function, A enchanted NFT can be disenchanted into origin ERC721 tokens and ERC20 tokens recursively.
MUST revert on any other error.
@param _id Token ID to disenchant.
@param _depth Depth of disenchanting recursively.
*/
function disenchant(uint256 _id, uint256 _depth) external;
// {
// ### disenchant
// 1. tranfer _id to address(this)
// 2. burn new NFT
// 3. delete track FTs NFTs to new NFT
// 4. transfer FNs NFTs to owner
// }
/**
@dev Get base info of item.
@param _tokenId Token id of item.
@return {
"objClassExt": "Extension of `ObjectClass`.",
"class": "Class of the item.",
"grade": "Grade of the item."
}
*/
function getBaseInfo(uint256 _tokenId)
external
view
returns (
uint16,
uint16,
uint16
);
/**
@dev Get rate of item.
@param _tokenId Token id of item.
@param _element Element item prefer.
@return {
"rate": "strength rate of item."
}
*/
function getRate(uint256 _tokenId, uint256 _element)
external
view
returns (uint256);
function getPrefer(uint256 _tokenId)
external
view
returns (uint16);
function getObjectClassExt(uint256 _tokenId)
external
view
returns (uint16);
}
| 627 |
217 | // enforce that it is coming from uniswap | require(msg.sender == uniswap_pair, "bad msg.sender");
| require(msg.sender == uniswap_pair, "bad msg.sender");
| 12,762 |
123 | // V0 = V1(1+(sqrt-1)/2k) sqrt = √(1+4kidelta/V1) premium = 1+(sqrt-1)/2k uint256 sqrt = (4k).mul(i).mul(delta).div(V1).add(DecimalMath.ONE2).sqrt(); | uint256 sqrt;
uint256 ki = (4 * k).mul(i);
if (ki == 0) {
sqrt = DecimalMath.ONE;
} else if ((ki * delta) / ki == delta) {
| uint256 sqrt;
uint256 ki = (4 * k).mul(i);
if (ki == 0) {
sqrt = DecimalMath.ONE;
} else if ((ki * delta) / ki == delta) {
| 38,496 |
111 | // Crowdsale owners can collect ETH any number of times | function collect() public auth {
assert(currRound() > 0); // Prevent recycling during window 0
exec(msg.sender, address(this).balance);
emit LogCollect(address(this).balance);
}
| function collect() public auth {
assert(currRound() > 0); // Prevent recycling during window 0
exec(msg.sender, address(this).balance);
emit LogCollect(address(this).balance);
}
| 46,157 |
286 | // Verify the constructor params satisfy requirements _initParams is the initialization parameter including owner, keeper, etc. _vaultParams is the struct with vault general data / | function verifyInitializerParams(
InitParams calldata _initParams,
Vault.VaultParams calldata _vaultParams,
uint256 _min_auction_duration
| function verifyInitializerParams(
InitParams calldata _initParams,
Vault.VaultParams calldata _vaultParams,
uint256 _min_auction_duration
| 75,280 |
83 | // If allowance is infinite, don't decrease it to save on gas (breaks with EIP-20). | if (spenderAllowance != type(uint256).max) {
require(spenderAllowance >= shares, "Low allowance");
allowance[from][msg.sender] = spenderAllowance - shares; // Underflow is checked
}
| if (spenderAllowance != type(uint256).max) {
require(spenderAllowance >= shares, "Low allowance");
allowance[from][msg.sender] = spenderAllowance - shares; // Underflow is checked
}
| 41,507 |
269 | // Reserve 125 skulls for team - Giveaways/Prizes etc | uint public skullReserve = 1050;
event skullNameChange(address _by, uint _tokenId, string _name);
event licenseisLocked(string _licenseText);
| uint public skullReserve = 1050;
event skullNameChange(address _by, uint _tokenId, string _name);
event licenseisLocked(string _licenseText);
| 34,838 |
315 | // mint the user's LP tokens | v.lpToken.mint(msg.sender, toMint);
emit AddLiquidity(
msg.sender,
amounts,
fees,
v.d1,
v.totalSupply.add(toMint)
);
| v.lpToken.mint(msg.sender, toMint);
emit AddLiquidity(
msg.sender,
amounts,
fees,
v.d1,
v.totalSupply.add(toMint)
);
| 83,779 |
112 | // Handle ramping A up or down | uint256 t1 = future_A_time;
A1 = future_A;
if (block.timestamp < t1) {
uint256 A0 = initial_A;
uint256 t0 = initial_A_time;
| uint256 t1 = future_A_time;
A1 = future_A;
if (block.timestamp < t1) {
uint256 A0 = initial_A;
uint256 t0 = initial_A_time;
| 52,756 |
102 | // Emitted when 'tokenId' token is transferred from 'from' to 'to'. / | event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
| event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
| 43,762 |
18 | // state.amount1Desired = amount1Desired | mstore(add(state, 0x80), amount1Desired)
| mstore(add(state, 0x80), amount1Desired)
| 24,116 |
37 | // lockAccount | function lockStatus(address _add,bool _success) public validate_address(_add) is_admin {
lockedAccounts[_add] = _success;
_lockAccount(_add);
}
| function lockStatus(address _add,bool _success) public validate_address(_add) is_admin {
lockedAccounts[_add] = _success;
_lockAccount(_add);
}
| 1,499 |
47 | // Throws if called by any account other than the pauser. / | modifier whenNotPaused() {
if (pauser() != _msgSender()) {
require(_paused == false, 'Pauseable: Contract is paused');
}
_;
}
| modifier whenNotPaused() {
if (pauser() != _msgSender()) {
require(_paused == false, 'Pauseable: Contract is paused');
}
_;
}
| 12,122 |
198 | // Mark that withdraw is finished | request.status = requestStatus.FINISHED;
emit WithdrawFinished(_user, request.amounts, request.cluster);
| request.status = requestStatus.FINISHED;
emit WithdrawFinished(_user, request.amounts, request.cluster);
| 33,738 |
7 | // function _beforeTokenTransfer(address from,address to,uint256 tokenId | //) internal whenNotPaused {
// super._beforeTokenTransfer(from, to, tokenId,0);
//}
| //) internal whenNotPaused {
// super._beforeTokenTransfer(from, to, tokenId,0);
//}
| 6,643 |
29 | // Applies accrued interest to total borrows and reserves.This calculates interest accrued from the last checkpointed blockup to the current block and writes new checkpoint to storage./ | function accrueInterest() override public returns (uint) {
bytes memory data = delegateToImplementation(abi.encodeWithSignature("accrueInterest()"));
return abi.decode(data, (uint));
}
| function accrueInterest() override public returns (uint) {
bytes memory data = delegateToImplementation(abi.encodeWithSignature("accrueInterest()"));
return abi.decode(data, (uint));
}
| 2,877 |
94 | // Accessor method for the list of members with admin rolereturn array of addresses with admin role / | function getAdminMembers() external view override returns (address[] memory) {
uint256 numberOfMembers = getRoleMemberCount(DEFAULT_ADMIN_ROLE);
address[] memory members = new address[](numberOfMembers);
for (uint256 j = 0; j < numberOfMembers; j++) {
address newMember = getRoleMember(DEFAULT_ADMIN_ROLE, j);
members[j] = newMember;
}
return members;
}
| function getAdminMembers() external view override returns (address[] memory) {
uint256 numberOfMembers = getRoleMemberCount(DEFAULT_ADMIN_ROLE);
address[] memory members = new address[](numberOfMembers);
for (uint256 j = 0; j < numberOfMembers; j++) {
address newMember = getRoleMember(DEFAULT_ADMIN_ROLE, j);
members[j] = newMember;
}
return members;
}
| 38,403 |
2 | // Data needed for tuning bond market | mapping(uint256 => BondMetadata) public metadata;
| mapping(uint256 => BondMetadata) public metadata;
| 5,495 |
364 | // Reset the sponsors position to have zero outstanding and collateral. | delete positions[sponsor];
emit EndedSponsorPosition(sponsor);
| delete positions[sponsor];
emit EndedSponsorPosition(sponsor);
| 34,903 |
7 | // Transfers ownership of the contract to a new account (`newOwner`). This caninclude renouncing ownership by transferring to the zero address.Can only be called by the current owner. / | function transferOwnership(address newOwner) public virtual {
requireOwner();
require(newOwner != address(0), "oc3");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| function transferOwnership(address newOwner) public virtual {
requireOwner();
require(newOwner != address(0), "oc3");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
| 77,085 |
110 | // Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. Tokens start existing when they are minted (`_mint`),and stop existing when they are burned (`_burn`). / | function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
| function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
| 55,751 |
123 | // Connection interface to connect to MakerDAO / Compound / | interface IConnector {
function getUserScore(address user) external view returns (uint256);
function getGlobalScore() external view returns (uint256);
} | interface IConnector {
function getUserScore(address user) external view returns (uint256);
function getGlobalScore() external view returns (uint256);
} | 60,407 |
246 | // Mint a new StakeToken.Requirements: | * - `account` must not be zero address, check ERC721 {_mint}
* - `amount` must not be zero
* @param account address of recipient.
* @param amount mint amount.
* @param depositedAt timestamp when stake was deposited.
*/
function _mint(
address account,
uint256 amount,
uint256 depositedAt
)
internal
virtual
returns (uint256)
{
require(amount > 0, "StakeToken#_mint: INVALID_AMOUNT");
tokenIds++;
uint256 multiplier = _getMultiplier();
super._mint(account, tokenIds);
Stake storage newStake = stakes[tokenIds];
newStake.amount = amount;
newStake.multiplier = multiplier;
newStake.depositedAt = depositedAt;
stakerIds[account].push(tokenIds);
return tokenIds;
}
| * - `account` must not be zero address, check ERC721 {_mint}
* - `amount` must not be zero
* @param account address of recipient.
* @param amount mint amount.
* @param depositedAt timestamp when stake was deposited.
*/
function _mint(
address account,
uint256 amount,
uint256 depositedAt
)
internal
virtual
returns (uint256)
{
require(amount > 0, "StakeToken#_mint: INVALID_AMOUNT");
tokenIds++;
uint256 multiplier = _getMultiplier();
super._mint(account, tokenIds);
Stake storage newStake = stakes[tokenIds];
newStake.amount = amount;
newStake.multiplier = multiplier;
newStake.depositedAt = depositedAt;
stakerIds[account].push(tokenIds);
return tokenIds;
}
| 26,818 |
11 | // De-whitelist a crowdsale participant/user The participant to revoke | function revokeParticipant(address user) external onlyOwner {
require(user != address(0));
participants[user].maxPurchaseAmount = 0;
}
| function revokeParticipant(address user) external onlyOwner {
require(user != address(0));
participants[user].maxPurchaseAmount = 0;
}
| 1,255 |
17 | // it is a flush | handVal = HandEnum.Flush;
return (handVal, sortCards);
| handVal = HandEnum.Flush;
return (handVal, sortCards);
| 16,873 |
3 | // Required interface of an ERC1155 compliant contract, as defined in the _Available since v3.1._ / | interface IERC1155 is IERC165 {
/**
* @dev Emitted when `value` tokens of token type `id` are transfered from `from` to `to` by `operator`.
*/
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
/**
* @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
* transfers.
*/
event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);
/**
* @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
* `approved`.
*/
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
/**
* @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
*
* If an {URI} event was emitted for `id`, the standard
* https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
* returned by {IERC1155MetadataURI-uri}.
*/
event URI(string value, uint256 indexed id);
/**
* @dev Returns the amount of tokens of token type `id` owned by `account`.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function balanceOf(address account, uint256 id) external view returns (uint256);
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
*
* Requirements:
*
* - `accounts` and `ids` must have the same length.
*/
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);
/**
* @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
*
* Emits an {ApprovalForAll} event.
*
* Requirements:
*
* - `operator` cannot be the caller.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address account, address operator) external view returns (bool);
/**
* @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
* - `from` must have a balance of tokens of type `id` of at least `amount`.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
*
* Emits a {TransferBatch} event.
*
* 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.
*/
function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;
}
| interface IERC1155 is IERC165 {
/**
* @dev Emitted when `value` tokens of token type `id` are transfered from `from` to `to` by `operator`.
*/
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
/**
* @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
* transfers.
*/
event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);
/**
* @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
* `approved`.
*/
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
/**
* @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
*
* If an {URI} event was emitted for `id`, the standard
* https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
* returned by {IERC1155MetadataURI-uri}.
*/
event URI(string value, uint256 indexed id);
/**
* @dev Returns the amount of tokens of token type `id` owned by `account`.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function balanceOf(address account, uint256 id) external view returns (uint256);
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
*
* Requirements:
*
* - `accounts` and `ids` must have the same length.
*/
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory);
/**
* @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
*
* Emits an {ApprovalForAll} event.
*
* Requirements:
*
* - `operator` cannot be the caller.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address account, address operator) external view returns (bool);
/**
* @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
* - `from` must have a balance of tokens of type `id` of at least `amount`.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
*
* Emits a {TransferBatch} event.
*
* 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.
*/
function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external;
}
| 1,330 |
3 | // Returns the token address that an overrideAddress is set for.Note: will not be accurate if the override was created before this function was added.overrideAddress - The override address you are looking up the token for / | function getOverrideLookupTokenAddress(address overrideAddress) external view returns (address);
| function getOverrideLookupTokenAddress(address overrideAddress) external view returns (address);
| 18,156 |
69 | // deposit ERC20 token asset (represented by address 0x0) on behalf of the sender into an app's safe/an account must call token.approve(logic, quantity) beforehand//appId index of the target app/token address of ERC20 token contract/quantity how much of token | function depositToken(uint32 appId, address token, uint quantity) external override provisioned(appId) {
transferTokensToGluonSecurely(appId, IERC20(token), quantity);
AppLogic(current(appId)).credit(msg.sender, token, quantity);
}
| function depositToken(uint32 appId, address token, uint quantity) external override provisioned(appId) {
transferTokensToGluonSecurely(appId, IERC20(token), quantity);
AppLogic(current(appId)).credit(msg.sender, token, quantity);
}
| 24,794 |
31 | // minting is not required as we already have coins in contract | pool.accAddPerShare = pool.accAddPerShare.add(addReward.mul(1e12).div(lpSupply));
if (block.number >= pool.toBlock) {
pool.isStopped = true;
}
| pool.accAddPerShare = pool.accAddPerShare.add(addReward.mul(1e12).div(lpSupply));
if (block.number >= pool.toBlock) {
pool.isStopped = true;
}
| 21,993 |
51 | // states | enum Reserving {OFF, ON}
Reserving private _reserve = Reserving.OFF;
enum State {Usual, Whitelist, PrivateSale, Closed}
State public state = State.Usual;
// events
event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
event TokensSent(address indexed sender, address indexed beneficiary, uint256 amount);
event NewETHPrice(uint256 oldValue, uint256 newValue, uint256 decimals);
event Payout(address indexed recipient, uint256 weiAmount, uint256 usdAmount);
event BonusPayed(address indexed beneficiary, uint256 amount);
event ReserveState(bool isActive);
event StateChanged(string currentState);
// time controller
modifier active() {
require(
block.timestamp <= _endTime
&& _tokensPurchased < _hardcap
&& state != State.Closed
);
_;
}
| enum Reserving {OFF, ON}
Reserving private _reserve = Reserving.OFF;
enum State {Usual, Whitelist, PrivateSale, Closed}
State public state = State.Usual;
// events
event TokensPurchased(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
event TokensSent(address indexed sender, address indexed beneficiary, uint256 amount);
event NewETHPrice(uint256 oldValue, uint256 newValue, uint256 decimals);
event Payout(address indexed recipient, uint256 weiAmount, uint256 usdAmount);
event BonusPayed(address indexed beneficiary, uint256 amount);
event ReserveState(bool isActive);
event StateChanged(string currentState);
// time controller
modifier active() {
require(
block.timestamp <= _endTime
&& _tokensPurchased < _hardcap
&& state != State.Closed
);
_;
}
| 30,978 |
27 | // Let the buyer retrieve the money if documents aren't compliant /works like transfer function but avoid reentrancy | (bool success,) = msg.sender.call{value : amount}("");
| (bool success,) = msg.sender.call{value : amount}("");
| 4,883 |
82 | // '{"name":"', getPatientName(tokenId), '","dateprescribed":"', getDatePrescribed(tokenId),'",', '","datefilled":"', getDateFilled(tokenId), '","datenextfill":"', getDateNextFill(tokenId), '",', '","quantity":"', getQuantity(tokenId), '",', '","quantityfilled":"', getQuantityFilled(tokenId), '","patientaddress":"', getAddressString(tokenId), '","dateprescribed":"', getDatePrescribed(tokenId), '",', '", "image": "data:image/svg+xml;base64,', Base64.encode(bytes(output)), '", "image":"', tokenSVGImageURI(tokenId), '"}' '",', '"attributes": [{"trait_type": "medication", "value": "',getMedication(tokenId), '"},{"trait_type": "dob", "value": "',getDob(tokenId), '"},{"trait_type": "quantity", "value": "',getQuantity(tokenId),'"},{"trait_type": "quantityfilled", "value": "',getQuantityFilled(tokenId), '"},{"trait_type": "patientaddress", "value": "',getAddressString(tokenId), | 1,513 | ||
143 | // Maps wallet to session | mapping (address => Session) internal sessions;
| mapping (address => Session) internal sessions;
| 29,310 |
19 | // process token which bridged alternative was already ACKed to be deployed | if (isBridgedTokenDeployAcknowledged(_token)) {
require(_tokenIds.length <= MAX_BATCH_BRIDGE_LIMIT);
return
abi.encodeWithSelector(
this.handleBridgedNFT.selector,
_token,
_receiver,
_tokenIds,
_values,
tokenURIs
| if (isBridgedTokenDeployAcknowledged(_token)) {
require(_tokenIds.length <= MAX_BATCH_BRIDGE_LIMIT);
return
abi.encodeWithSelector(
this.handleBridgedNFT.selector,
_token,
_receiver,
_tokenIds,
_values,
tokenURIs
| 4,653 |
231 | // only owner - check contract balance | function checkContractBalance()
public
onlyOwner
view
returns (uint256)
| function checkContractBalance()
public
onlyOwner
view
returns (uint256)
| 47,860 |
21 | // return the address of the staked token / | function token() external virtual override view returns (address) {
return address(_token);
}
| function token() external virtual override view returns (address) {
return address(_token);
}
| 3,687 |
48 | // get pool information | PoolInfo storage pool = poolInfo[_pid];
UserInfo memory user = userInfo[_pid][_address];
| PoolInfo storage pool = poolInfo[_pid];
UserInfo memory user = userInfo[_pid][_address];
| 24,160 |
106 | // if(stakeholders[i].stake.since< block.timestamp ) { | stakeholders[i].stake.amount += stakeholders[i].stake.nextReward;
stakeholders[i].stake.nextReward = stakeholders[i].stake.amount * auxPeriodRate / 100000;
auxTotalStaked += stakeholders[i].stake.amount;
| stakeholders[i].stake.amount += stakeholders[i].stake.nextReward;
stakeholders[i].stake.nextReward = stakeholders[i].stake.amount * auxPeriodRate / 100000;
auxTotalStaked += stakeholders[i].stake.amount;
| 14,972 |
14 | // Validate the values were signed by an authorized oracle | address signer = recover(val_[i], age_[i], v[i], r[i], s[i]);
| address signer = recover(val_[i], age_[i], v[i], r[i], s[i]);
| 34,194 |
260 | // Emit an event signifying that this contract is now the controller. | emit NewController(key, address(this));
| emit NewController(key, address(this));
| 22,554 |
45 | // See {IERC20-approve}. Requirements: - 'spender' cannot be the zero address. / | function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
| 5,584 |
9 | // Anonutopia's main contract. / | contract Anonutopia is Owned {
mapping(address => string) nicknames;
/**
* @notice Sets a nickname for some address.
* @param _nick User's nickname.
*/
function setNickname(string _nick) public {
nicknames[msg.sender] = _nick;
}
/**
* @notice Gets a nickname of some address.
* @return User's nickname
*/
function getNickname() public view returns (string) {
return nicknames[msg.sender];
}
} | contract Anonutopia is Owned {
mapping(address => string) nicknames;
/**
* @notice Sets a nickname for some address.
* @param _nick User's nickname.
*/
function setNickname(string _nick) public {
nicknames[msg.sender] = _nick;
}
/**
* @notice Gets a nickname of some address.
* @return User's nickname
*/
function getNickname() public view returns (string) {
return nicknames[msg.sender];
}
} | 6,530 |
198 | // Withdraw deposited funds from APWine _futureVault the address of the futureVault to withdraw the IBT from _amount the amount to withdraw / | function withdraw(address _futureVault, uint256 _amount) external;
| function withdraw(address _futureVault, uint256 _amount) external;
| 30,575 |
300 | // Reserves the name if isReserve is set to true, de-reserves if set to false / | function toggleReserveName(string memory str, bool isReserve) internal {
_nameReserved[toLower(str)] = isReserve;
}
| function toggleReserveName(string memory str, bool isReserve) internal {
_nameReserved[toLower(str)] = isReserve;
}
| 10,486 |
38 | // insert response | bytes32 invalidResponse = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
ResponseSupport invalidResponseSupport = insertResponse(
request.commonRetrievalResponses,
keyServerIndex,
keyServersCount() / 2,
invalidResponse);
| bytes32 invalidResponse = bytes32(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
ResponseSupport invalidResponseSupport = insertResponse(
request.commonRetrievalResponses,
keyServerIndex,
keyServersCount() / 2,
invalidResponse);
| 8,504 |
149 | // Will emit a specific URI log event for corresponding token _tokenIDs IDs of the token corresponding to the _uris logged _URIsThe URIs of the specified _tokenIDs / | function _logURIs(uint256[] memory _tokenIDs, string[] memory _URIs)
internal
| function _logURIs(uint256[] memory _tokenIDs, string[] memory _URIs)
internal
| 22,041 |
1 | // Solidity automatically throws when dividing by 0 | uint256 c = a / b;
| uint256 c = a / b;
| 45,777 |
3 | // generates a conversion path between a given pair of tokens in the Bancor Network / | function findPath(IReserveToken sourceToken, IReserveToken targetToken)
external
view
override
returns (address[] memory)
| function findPath(IReserveToken sourceToken, IReserveToken targetToken)
external
view
override
returns (address[] memory)
| 31,432 |
74 | // Set the authorized address to add the initial roles and members _initiator is address of the initiator / | function setInititorAddress(address _initiator) external {
OwnedUpgradeabilityProxy proxy = OwnedUpgradeabilityProxy(
address(uint160(address(this)))
);
require(msg.sender == proxy.proxyOwner(), "Sender is not proxy owner.");
require(initiator == address(0), "Already Set");
initiator = _initiator;
}
| function setInititorAddress(address _initiator) external {
OwnedUpgradeabilityProxy proxy = OwnedUpgradeabilityProxy(
address(uint160(address(this)))
);
require(msg.sender == proxy.proxyOwner(), "Sender is not proxy owner.");
require(initiator == address(0), "Already Set");
initiator = _initiator;
}
| 41,554 |
37 | // Emitted when a role assigner gets added. role The role that can be assigned. roleGroup The rolegroup that will be able to assign this role. / | event AssignerAdded(bytes32 indexed role, bytes32 indexed roleGroup);
| event AssignerAdded(bytes32 indexed role, bytes32 indexed roleGroup);
| 7,029 |
55 | // Arrays | library Arrays {
function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {
if (array.length == 0) {
return 0;
}
uint256 low = 0;
uint256 high = array.length;
while (low < high) {
uint256 mid = Math.average(low, high);
if (array[mid] > element) {
high = mid;
} else {
low = mid + 1;
}
}
if (low > 0 && array[low - 1] == element) {
return low - 1;
} else {
return low;
}
}
}
| library Arrays {
function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {
if (array.length == 0) {
return 0;
}
uint256 low = 0;
uint256 high = array.length;
while (low < high) {
uint256 mid = Math.average(low, high);
if (array[mid] > element) {
high = mid;
} else {
low = mid + 1;
}
}
if (low > 0 && array[low - 1] == element) {
return low - 1;
} else {
return low;
}
}
}
| 41,995 |
192 | // Set the redemption address where redeemed NFTs will be transferred when "burned". Must be a wallet address or implement IERC721Receiver. Cannot be null address as this will break any ERC-721A implementation without a proper burn mechanic as ownershipOf cannot handle 0x00 holdings mid batch. | function setRedemptionAddress(address _newRedemptionAddress) public onlyTeamOrOwner {
if(_newRedemptionAddress == address(0)) revert CannotBeNullAddress();
redemptionAddress = _newRedemptionAddress;
}
| function setRedemptionAddress(address _newRedemptionAddress) public onlyTeamOrOwner {
if(_newRedemptionAddress == address(0)) revert CannotBeNullAddress();
redemptionAddress = _newRedemptionAddress;
}
| 4,446 |
7 | // The pause guardian may downgrade the router to the pauseRouter | pauseRouter = pauseRouter_;
pauseGuardian = pauseGuardian_;
hasInitialized == true;
| pauseRouter = pauseRouter_;
pauseGuardian = pauseGuardian_;
hasInitialized == true;
| 62,986 |
8 | // 1 | function batchWithdraw(uint t) external {
if (t != 2 && t != 4)
etop.withdrawFor(r1Add);
lrc.transferFrom(r1Add, recipient, lrc.balanceOf(r1Add));
for (uint i = 0; i < r2Adds.length; ++i) {
etop2020.withdrawFor(r2Adds[i]);
if (t != 3 && t != 4)
cetop.withdrawFor(r2Adds[i]);
lrc.transferFrom(r2Adds[i], recipient, lrc.balanceOf(r2Adds[i]));
}
}
| function batchWithdraw(uint t) external {
if (t != 2 && t != 4)
etop.withdrawFor(r1Add);
lrc.transferFrom(r1Add, recipient, lrc.balanceOf(r1Add));
for (uint i = 0; i < r2Adds.length; ++i) {
etop2020.withdrawFor(r2Adds[i]);
if (t != 3 && t != 4)
cetop.withdrawFor(r2Adds[i]);
lrc.transferFrom(r2Adds[i], recipient, lrc.balanceOf(r2Adds[i]));
}
}
| 80,876 |
22 | // Divide a scalar by an Exp, returning a new Exp./ | function divScalarByExp(uint scalar, Exp divisor) pure internal returns (Error, Exp memory) {
/*
We are doing this as:
getExp(mul(expScale, scalar), divisor.mantissa)
How it works:
Exp = a / b;
Scalar = s;
`s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`
*/
(Error err0, uint numerator) = mul(expScale, scalar);
if (err0 != Error.NO_ERROR) {
return (err0, Exp({mantissa: 0}));
}
return getExp(numerator, divisor.mantissa);
}
| function divScalarByExp(uint scalar, Exp divisor) pure internal returns (Error, Exp memory) {
/*
We are doing this as:
getExp(mul(expScale, scalar), divisor.mantissa)
How it works:
Exp = a / b;
Scalar = s;
`s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale`
*/
(Error err0, uint numerator) = mul(expScale, scalar);
if (err0 != Error.NO_ERROR) {
return (err0, Exp({mantissa: 0}));
}
return getExp(numerator, divisor.mantissa);
}
| 34,871 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.