Skip to content

Instantly share code, notes, and snippets.

@jamadei
jamadei / contracts...1_Storage.sol
Created September 19, 2022 12:07
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=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
* @custom:dev-run-script ./scripts/deploy_with_ethers.ts
*/
contract Storage {
@jamadei
jamadei / contracts...IdCard3.sol
Created September 19, 2022 10: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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: CC-BY-1.0
// Creative Commons Attribution 1.0 Generic
// Contract will be compiled on version 0.7.0 or greater
pragma solidity ^0.8.0;
// A smart contract to model an IdCard
contract IdCard {
string public constant CONTRACT_AUTHOR = 'Marco Amadei';
@jamadei
jamadei / contracts...Lab1.sol
Created September 16, 2022 13:40
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=false&runs=200&gist=
// SPDX-License-Identifier: CC-BY-1.0
// Creative Commons Attribution 1.0 Generic
// Contract will be compiled on version 0.7.0 or greater
pragma solidity >=0.7.0 <0.9.0;
contract Utility {
// The owner of the current instance of this smart contract
@jamadei
jamadei / contracts...Lab1.sol
Created September 16, 2022 13:35
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=false&runs=200&gist=
// SPDX-License-Identifier: CC-BY-1.0
// Creative Commons Attribution 1.0 Generic
// Contract will be compiled on version 0.7.0 or greater
pragma solidity >=0.7.0 <0.9.0;
contract Utility {
// The owner of the current instance of this smart contract
@jamadei
jamadei / contracts...Lab1.sol
Created September 16, 2022 13:32
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=false&runs=200&gist=
// SPDX-License-Identifier: CC-BY-1.0
// Creative Commons Attribution 1.0 Generic
// Contract will be compiled on version 0.7.0 or greater
pragma solidity >=0.7.0 <0.9.0;
contract Utility {
// The owner of the current instance of this smart contract
@jamadei
jamadei / contracts...1_Storage.sol
Created September 16, 2022 13:21
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=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
* @custom:dev-run-script ./scripts/deploy_with_ethers.ts
*/
contract Storage {
@jamadei
jamadei / contracts...IdCard2.sol
Created September 15, 2022 14: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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: CC-BY-1.0
// Creative Commons Attribution 1.0 Generic
// Contract will be compiled on version 0.7.0 or greater
pragma solidity ^0.8.0;
// A smart contract to model a music album
contract IdCard {
string public constant contractAuthor = 'Marco Amadei';
@jamadei
jamadei / contracts...IdCard2.sol
Created September 15, 2022 14: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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: CC-BY-1.0
// Creative Commons Attribution 1.0 Generic
// Contract will be compiled on version 0.7.0 or greater
pragma solidity ^0.8.0;
// A smart contract to model a music album
contract IdCard {
string public constant contractAuthor = 'Marco Amadei';