Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

get max type value in solidity

pragma solidity ^0.6.8;

contract TestContract {
    uint256 public a;
    uint256 public b;
    
    // replace uint256 for whatever type you require
    function myTest() external {
        a = type(uint256).min; // min value for uint256
        b = type(uint256).max; // max value for uint256
    }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: node js - excecute a child process and exchange message to and from 
Javascript :: jQuery - Set 
Javascript :: what does this operation tell if(!arr.some(isNaN)) JavaScript 
Javascript :: lookup in other document in array 
Javascript :: chart js svg word map 
Javascript :: How to add pop-up confirmation in angular typescript. 
Javascript :: OpenTok Create Session 
Javascript :: largest element in nested array 
Javascript :: get page scrolling amount js 
Javascript :: Javascripti functions accepting Flask parameters to display a PDF file with Adobe Embed API 
Javascript :: phaser place on circles 
Javascript :: phaser animation from png sequence 
Javascript :: phaser play animation with config.js 
Javascript :: chakra ui with humburger menu 
Javascript :: remove text and keep div inside a div jquery 2 
Javascript :: check letter case 
Javascript :: nodejs: redirect path to specific path 
Javascript :: show fist 100 character use js 
Javascript :: string concat in js 
Javascript :: block scoped in js 
Javascript :: javascript trunc 
Javascript :: useselector 
Javascript :: anonymous function 
Javascript :: how to turn a string into an array javascript 
Javascript :: is multiple select javascript 
Javascript :: how to get country code in react native 
Javascript :: javascript function expression 
Javascript :: js Destructuring in React 
Javascript :: javascript canvas load image 
Javascript :: add multiple images inside the DOM js 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =