值类型

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.7;

contract DataTypes {
    bool public valid;
    uint public counter;
    int public rate; // 100% percent
    address public owner;
    bytes32 public message;

    constructor() {
        valid = true;
        counter = 1;
        rate = -20;
        owner = msg.sender;
        message = bytes32(keccak256("Hello World!"));
    }
}

Remix 尝试一下?!

Last updated

Was this helpful?