Skip to content

Instantly share code, notes, and snippets.

View prtk418's full-sized avatar
:shipit:
Chilling

Pratik Agarwal prtk418

:shipit:
Chilling
View GitHub Profile
@prtk418
prtk418 / contracts...ForeverClub.sol
Created October 9, 2021 04: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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: UNLICENSED
/*
ForeverClub is an NFT that can't be bought or sold.
Only be transferred, to bootstrap crypto communities.
Rules:
* Mint ForeverClub NFT
* give it a name
* decide the size of the club
* Minter transfers to second member
@prtk418
prtk418 / [email protected]
Created December 13, 2021 13: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
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
{
ethereum(network: ethereum) {
smartContractCalls(
smartContractMethod: {is: "Contract Creation"}
caller: {is: "0x9dfc3cbf922cd187990c1bb82a7bd134350c2d37"}
options: {desc: "date.date"}
) {
date {
date
}
@prtk418
prtk418 / HelloWorld.sol
Created April 25, 2022 02:52
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.1;
/// @notice Hello World contract
contract HelloWorld {
/// @notice state variable to store the number
uint256 intToStore;
/**
* @notice Stores specified number in contract
@prtk418
prtk418 / Ballot.sol
Created April 25, 2022 02: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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/// @title Voting with delegation.
contract Ballot {
// This declares a new complex type which will
// be used for variables later.
// It will represent a single voter.
struct Voter {
uint weight; // weight is accumulated by delegation
bool voted; // if true, that person already voted