Skip to content

Instantly share code, notes, and snippets.

View georgemac510's full-sized avatar

John McLaughlin georgemac510

View GitHub Profile
@georgemac510
georgemac510 / transactionService.ts
Created June 29, 2021 23:01
Gnosis Transaction Service for Rinkeby via APIs.
import EIP712Domain from "eth-typed-data";
import BigNumber from "bignumber.js";
import * as ethUtil from 'ethereumjs-util';
import { ethers } from "ethers";
import axios from "axios";
/*
* Safe relay service example
* * * * * * * * * * * * * * * * * * * */
@georgemac510
georgemac510 / Sample.sol
Created February 16, 2023 15:31
Mintable ERC20
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Sample is ERC20, Ownable {
constructor() ERC20("Sample", "SAMP") {}
function mint(address to, uint256 amount) public onlyOwner {
@georgemac510
georgemac510 / Burnable.sol
Created February 16, 2023 19:46
Mintable and burnable ERC20 contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract Sample is ERC20, ERC20Burnable, Ownable {
constructor() ERC20("Sample", "SAMP") {}