Skip to content

Instantly share code, notes, and snippets.

View sanjeevan121's full-sized avatar

Sanjeevan Thorat sanjeevan121

View GitHub Profile
@sanjeevan121
sanjeevan121 / contracts...enumerated.sol
Created October 30, 2022 12:50
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:MIT
pragma solidity 0.8.6;
contract enum1{
enum FreshJuice{small,medium,large} FreshJuice choice;
FreshJuice constant defaultChoice=FreshJuice.medium;
function setLarge() public{
choice=FreshJuice.large;
}
@sanjeevan121
sanjeevan121 / contracts...structure.sol
Created October 30, 2022 12:50
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:MIT
pragma solidity 0.8.6;
contract structure{
struct Book{
string title;
string author;
uint bookID;
uint price;
}
@sanjeevan121
sanjeevan121 / contracts...1_Storage.sol
Created October 30, 2022 12: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: 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 {
@sanjeevan121
sanjeevan121 / README.txt
Created October 30, 2022 12:47
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=
REMIX DEFAULT WORKSPACE
Remix default workspace is present when:
i. Remix loads for the very first time
ii. A new workspace is created with 'Default' template
iii. There are no files existing in the File Explorer
This workspace contains 3 directories:
1. 'contracts': Holds three contracts with increasing levels of complexity.
@sanjeevan121
sanjeevan121 / contracts...1_Storage.sol
Created March 15, 2022 09:39
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.12+commit.f00d7308.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
contract Counter {
uint public count;
// Function to get the current count
function get() public view returns (uint) {
return count;
@sanjeevan121
sanjeevan121 / list.md
Created September 26, 2021 11:12 — forked from ih2502mk/list.md
Quantopian Lectures Saved