Dapatkan nilai tipe maks dalam soliditas

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
    }
}
Anxious Alligator