Skip to content

Instantly share code, notes, and snippets.

@optimistsLQ
optimistsLQ / xuexi...Constructor.sol
Created October 19, 2025 09:58
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.30+commit.73712a01.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// constructor 构造函数关键字
contract MyContract{
address public owner;
uint public x;
constructor(uint _x) {
x = _x;
@optimistsLQ
optimistsLQ / xuexi...Constructor.sol
Created October 19, 2025 09:53
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.30+commit.73712a01.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// constructor 构造函数关键字
contract MyContract{
address public owner;
uint public x;
constructor(uint _x) {
x = _x;