Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Jaynti Kanani jdkanani

🎯
Focusing
View GitHub Profile
@jdkanani
jdkanani / 1_Storage.sol
Created Feb 12, 2021
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.5.9+commit.c68bc34e.js&optimize=false&runs=200&gist=
View 1_Storage.sol
pragma solidity >=0.4.22 <0.7.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
uint256 number;
View DepositTest.sol
pragma solidity 0.5.9;
contract DepositTest {
event Deposit(
address rootToken,
address user,
uint256 amountOrTokenId,
uint256 depositCount
);
View go-install.sh
#!/bin/bash
set -e
VERSION="1.15.5"
[ -z "$GOROOT" ] && GOROOT="$HOME/.go"
[ -z "$GOPATH" ] && GOPATH="$HOME/go"
OS="$(uname -s)"
ARCH="$(uname -m)"
View docker-image
name: Docker Image CI
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
View docker-image
name: Docker Image CI
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
View cs1.go
package main
import (
"encoding/hex"
"fmt"
"github.com/maticnetwork/heimdall/bor"
"github.com/maticnetwork/heimdall/helper"
)
@jdkanani
jdkanani / ChildERC20.sol
Last active Mar 19, 2019
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.5.4+commit.9549d8ff.js&optimize=true&gist=
View ChildERC20.sol
// pragma solidity >=0.4.22 <0.6.0;
pragma solidity >=0.5.2 <0.6.0;
import { ERC20 } from "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
import { ERC20Detailed } from "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol";
import { LibTokenTransferOrder } from "./libs/TokenTransferOrder.sol";
import { ECRecover } from "./libs/ECRecover.sol";
contract ChildERC20 is ERC20, ERC20Detailed, LibTokenTransferOrder, ECRecover {
@jdkanani
jdkanani / fire-model.js
Last active Jan 10, 2019
Mobx firebase binding
View fire-model.js
import { extendObservable } from "mobx"
import { firebaseActions } from "../plugins/mobfire"
export default class FireModel {
// constructor
constructor(data = {}) {
// treat data as properties
const v = {}
Object.keys(data).forEach(key => {
if (key !== ".value" && key !== ".key" && key !== "_id") {
@jdkanani
jdkanani / ATestRLP.sol
Last active Dec 18, 2018
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.4.25+commit.59dbf8f1.js&optimize=true&gist=
View ATestRLP.sol
pragma solidity ^0.4.24;
import "./RLP.sol";
import "./ECVerify.sol";
contract ATestRLP {
using RLP for bytes;
using RLP for RLP.RLPItem;
using RLP for RLP.Iterator;
View Verifying my Peepeth
Verifying my identity on Peepeth.com 0x01c7664ea0e4fa975ad3b9b97794e9b0c3901985