Skip to content

Instantly share code, notes, and snippets.

View Neurone's full-sized avatar
💭
Spreading the web 3.0 approach to the world

Giuseppe Bertone Neurone

💭
Spreading the web 3.0 approach to the world
View GitHub Profile
@Neurone
Neurone / stackExchange_85231_array-of-mapping.sol
Last active July 23, 2020 22:28
Load this file into remix-ide (Realtime Ethereum Contract Compiler and Runtime) by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.9+commit.3e3065ac.js&optimize=false&gist=7f4de04ec5e3e926af27d5cd437aa8e2
// https://ethereum.stackexchange.com/questions/85231/array-of-mapping
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.5.0 <0.8.0;
contract myContract {
mapping (address => mapping (uint => uint)) public payments;
mapping (address => uint) public lastPayment;
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;
abstract contract CheckEIP20TokenInfo {
string public name;
string public symbol;
uint256 public decimals;
uint256 public totalSupply;
function balanceOf(address _owner) virtual public returns (uint256 balance);
function allowance(address _owner, address _spender) virtual public returns (uint256 remaining);
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract EIP_196_197 {
// After calling testAdd() output variable cointains these values:
// - output[0] == 0x030644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd3
// - output[1] == 0x15ed738c0e0a7c92e7845f96b2ae9c0a68a6a449e3538fc7ff3ebf7a5a18a2c4
uint256[2] public output;
@Neurone
Neurone / contracts...MoveFunds.sol
Created February 3, 2023 20:06
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.7+commit.e28d00a7.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
interface IHederaTokenService {
function associateToken(address account, address token) external returns (int responseCode);
function transferToken(address token, address sender, address recipient, int64 amount) external returns (int responseCode);
}
contract MoveFunds {