| ensip | XX (draft, number TBD, next after ENSIP-24) |
|---|---|
| title | On-chain Contract Version Registry |
| status | Draft |
| type | Standards Track |
| author | Jeff Lau <jeff@ens.domains> |
| created | 2026-05-12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity >= 0.4.22 <0.9.0; | |
| library console { | |
| address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); | |
| function _sendLogPayload(bytes memory payload) private view { | |
| uint256 payloadLength = payload.length; | |
| address consoleAddress = CONSOLE_ADDRESS; | |
| assembly { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SPDX-License-Identifier: MIT | |
| pragma solidity >= 0.4.22 <0.9.0; | |
| library console { | |
| address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67); | |
| function _sendLogPayload(bytes memory payload) private view { | |
| uint256 payloadLength = payload.length; | |
| address consoleAddress = CONSOLE_ADDRESS; | |
| assembly { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity >=0.6.0 <0.7.0; | |
| import "@nomiclabs/buidler/console.sol"; | |
| // SPDX-License-Identifier: MIT | |
| contract MultiSig { | |
| address[] public owners; | |
| mapping(address => bool) isOwner; | |
| uint256 public confirmations; | |
| Transaction[] public transactions; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function calcPoolValueLoss(x){ | |
| return Math.pow(x, 0.02)*((1)^0.98) | |
| } |
The ENS library is to be used in dapps and possibly other tools that need to connect to the set of ENS contracts on the Ethereum blockchain. It should give them all the tools they need to resolve and set records for their ENS names, as well as abstracting implementation details including, but not limited to:
- namehashes (could be provided as an advanced option)
- resolvers (unless it's absolutely required for custom resolvers)
- using the graph for getting textRecord or non-eth address keys
- decoders/encoders of addresses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function sendHelper(tx) { | |
| return new Promise((resolve, reject) => { | |
| tx() | |
| .on('transactionHash', txHash => { | |
| const txState = 'Pending' | |
| addTransaction({ txHash, txState }) | |
| resolve(txHash) | |
| }) | |
| .on('receipt', receipt => { | |
| const txHash = receipt.transactionHash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const cloudName = 'xxxxxx' | |
| const cloudinaryUrl = `https://api.cloudinary.com/v1_1/${cloudName}/upload` | |
| const unsignedUploadPreset = 'xxxxxx' | |
| export function upload(file) { | |
| const body = new FormData() | |
| body.append('file', file) | |
| body.append('upload_preset', unsignedUploadPreset) | |
| return ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const useMedia = (query, defaultState) => { | |
| const [state, setState] = useState(defaultState) | |
| useEffect( | |
| () => { | |
| let mounted = true | |
| const mql = window.matchMedia(query) | |
| const onChange = () => { | |
| if (!mounted) return | |
| setState(!!mql.matches) |
NewerOlder