Skip to content

Instantly share code, notes, and snippets.

@JIAXIAN04
JIAXIAN04 / web3...call.sol
Created October 30, 2025 10:30
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.30;
contract Receiver {
string public text;
uint public x;
event Received(string message);
fallback() external payable {
@JIAXIAN04
JIAXIAN04 / web3...solidity3.sol
Created October 22, 2025 17:04
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.30;
contract hello {
// if-else
function demoif(unit x) external pure returns(uint){
if (x < 100){
//code
return 1;
} else if (x < 200){
@JIAXIAN04
JIAXIAN04 / solidity2.sol
Created October 22, 2025 16:49
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.30;
contract array{
uint[] public arr;
uint[] public arr2 = [1,2,3];
uint[5] public fixarr; //[0,0,0,0,0]
function get(uint i) public view returns(uint){
return arr2[i];
@JIAXIAN04
JIAXIAN04 / .git...1
Created October 22, 2025 06:28
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=
123
@JIAXIAN04
JIAXIAN04 / .git...1
Created October 22, 2025 06:27
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=
// this line is added to create a gist. Empty file is not allowed.
@JIAXIAN04
JIAXIAN04 / .prettierrc.json
Created October 22, 2025 06:24
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=
{
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false