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...artifacts...ERC20.json
Last active August 6, 2021 04: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.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
@prtk418
prtk418 / gist-3cec7b3829462b45db177a17edad7fdd...contracts...subquest-uniswap.sol
Created August 14, 2021 11:41
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.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
pragma solidity >=0.7.0 <0.9.0;
interface cETH {
// define functions of COMPOUND we'll be using
function mint() external payable; // to deposit to compound
function redeem(uint redeemTokens) external returns (uint); // to withdraw from compound
@prtk418
prtk418 / index.js
Last active July 23, 2023 15:53
Arbitrage Bot: Price Discovery
require('dotenv').config()
const express = require('express')
const http = require('http')
const Web3 = require('web3')
const moment = require('moment-timezone')
// SERVER CONFIG
const PORT = process.env.PORT || 5000
const app = express();
const server = http.createServer(app).listen(PORT, () => console.log(`Listening on ${ PORT }`))
@prtk418
prtk418 / contracts...subquest-erc-721.sol
Created August 18, 2021 17:00
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.7.0+commit.9e61f92b.js&optimize=false&runs=200&gist=
pragma solidity >=0.6.0 <0.8.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/release-v3.4/contracts/token/ERC721/ERC721.sol";
contract MyNft is ERC721 {
string NAME = "Abstract Collectibles";
string SYMBOL = "ABS";
uint256 private _tokenId;
address private _owner;
@prtk418
prtk418 / gist-195b27a40656c46924421efad787e297...contracts...subquest-erc-721.sol
Created August 19, 2021 19: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.7.0+commit.9e61f92b.js&optimize=false&runs=200&gist=
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
contract YourCollectible is ERC721URIStorage {
string NAME = "Abstract Collectibles";
string SYMBOL = "ABS";
uint256 private _tokenId = 1;
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
contract YourCollectible is ERC721URIStorage {
string NAME = "Abstract Collectibles";
string SYMBOL = "ABS";
uint256 private _tokenId = 1;
@prtk418
prtk418 / contracts...RockPaperScissors.sol
Created August 21, 2021 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: GPL-3.0
pragma solidity ^0.8;
contract RockPaperScissors {
uint public enrollmentAmount;
address owner;
address[] public players;
mapping(address => bool) playerPlayed;
@prtk418
prtk418 / gist-5d33ac6857bd0683e63202b8dc6b1b9d...contracts...subquest-add-compound.sol
Last active August 30, 2021 13:01
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.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
pragma solidity >=0.7.0 <0.9.0;
interface cETH {
// define functions of COMPOUND we'll be using
function mint() external payable; // to deposit to compound
function redeem(uint redeemTokens) external returns (uint); // to withdraw from compound
@prtk418
prtk418 / gist-5d33ac6857bd0683e63202b8dc6b1b9d...contracts...subquest-add-compound.sol
Created August 30, 2021 13:00
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.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
pragma solidity >=0.7.0 <0.9.0;
interface cETH {
// define functions of COMPOUND we'll be using
function mint() external payable; // to deposit to compound
function redeem(uint redeemTokens) external returns (uint); // to withdraw from compound
@prtk418
prtk418 / gist-5d33ac6857bd0683e63202b8dc6b1b9d...contracts...subquest-add-compound.sol
Created August 30, 2021 13:00
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.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
pragma solidity >=0.7.0 <0.9.0;
interface cETH {
// define functions of COMPOUND we'll be using
function mint() external payable; // to deposit to compound
function redeem(uint redeemTokens) external returns (uint); // to withdraw from compound