ens-contracts
openzeppelin-solidity
ens-contracts | openzeppelin-solidity | |
---|---|---|
7 | 4 | |
531 | 10,805 | |
3.4% | - | |
8.4 | 9.4 | |
5 days ago | almost 3 years ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ens-contracts
- Implement offchain DNS Registrar support #203
-
ENS DAO Newsletter - The long-awaited NameWrapper is live!
More details can be found in the pull request.
- A beginner's guide to ENS Name Wrapper and It's Functionality
-
Daily General Discussion - March 6, 2023
M3mber: I think this is a way to mint an NFT that represents a membership in something with an expiry date (pitched as a way for DAOs to bring in recurring money like a subscription rather than just the one-off token sale). They use ENS domains, with NameWrapper to accomplish this; is it only because ENS domains already have expiry built in so they don't have to code it from scratch?
-
How to find length of string in Solidity, from the smart contract of ens
// SPDX-License-Identifier: MIT // Source: // https://github.com/ensdomains/ens-contracts/blob/master/contracts/ethregistrar/StringUtils.sol pragma solidity >=0.8.4; library StringUtils { /** * @dev Returns the length of a given string * * @param s The string to measure the length of * @return The length of the input string */ function strlen(string memory s) internal pure returns (uint256) { uint256 len; uint256 i = 0; uint256 bytelength = bytes(s).length; for (len = 0; i < bytelength; len++) { bytes1 b = bytes(s)[i]; if (b < 0x80) { i += 1; } else if (b < 0xE0) { i += 2; } else if (b < 0xF0) { i += 3; } else if (b < 0xF8) { i += 4; } else if (b < 0xFC) { i += 5; } else { i += 6; } } return len; } }
-
string length function explaination
I came across this helper function to find a string length present at https://github.com/ensdomains/ens-contracts/blob/master/contracts/ethregistrar/StringUtils.sol And I couldn't understand what this piece of code is doing uint bytelength = bytes(s).length; for(len = 0; i < bytelength; len++) { bytes1 b = bytes(s)[i]; if(b < 0x80) { i += 1; } else if (b < 0xE0) { i += 2; } else if (b < 0xF0) { i += 3; } else if (b < 0xF8) { i += 4; } else if (b < 0xFC) { i += 5; } else { i += 6; } } return len; Any help is appreciated. Thank you
- ERC1155 "Name Wrapper" is the .eth, and integrated extensions, new unified protocols
openzeppelin-solidity
-
Attack Vectors in Solidity #6:Unexpected Ether( Incorrect Use of this.balance)
pragma solidity ^0.5.0; import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/math/SafeMath.sol"; contract MyContract { using SafeMath for uint256; function deposit() public payable { // code to deposit ether } function withdraw(uint256 _amount) public { require(this.balance.sub(_amount) >= 0, "Insufficient funds"); // code to withdraw ether } }
-
How to check if tokenholder is holding 2 different tokens at the same time before an event is triggered?
The basic structure could be done as follows using OZ ERC20 interface https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/IERC20.sol
-
Is this why shib price keeps going down?
return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; }
-
can someone tell me what this contract wants?
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
What are some alternatives?
EIPs - The Ethereum Improvement Proposal repository
RegEx-DoS - :cop: :punch: RegEx Denial of Service (ReDos) Scanner
contracts-v2 - 🐇 Hop Protocol v2 smart contracts
openzeppelin-contracts - OpenZeppelin Contracts is a library for secure smart contract development.
echidna - Ethereum smart contract fuzzer
eattheblocks - Source code for Eat The Blocks, a screencast for Ethereum Dapp Developers
yulp - ➕ A low-level, highly efficient extension to Yul, an intermediate language for the Ethereum Virtual Machine.
bytecode-verifier - Compile Solidity source code and verify its bytecode matches the blockchain
SoliditySamples - Solidity Smart Contracts Samples
solidity-flattener - Utility to combine Solidity project to a flat file
Intergration-IDRT-Fiat-Gateway-On-Harmony-one-wallet- - intergration idrt on harmony one wallet
randao - RANDAO: A DAO working as RNG of Ethereum