Skip to content

Instantly share code, notes, and snippets.

View SauravKanchan's full-sized avatar
🏠
Working from home

Saurav Kanchan SauravKanchan

🏠
Working from home
View GitHub Profile
@SauravKanchan
SauravKanchan / eas.js
Created July 22, 2023 02:31
eas-test
import {
EAS,
Offchain,
SchemaRegistry,
SchemaEncoder,
} from "@ethereum-attestation-service/eas-sdk";
import { ethers } from "ethers";
export const EASContractAddress = "0xC2679fBD37d54388Ce493F1DB75320D236e1815e"; // Sepolia v0.26
This file has been truncated, but you can view the full file.
/*! For license information please see storage.umd.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.arcana=e():(t.arcana=t.arcana||{},t.arcana.storage=e())}(self,(function(){return(()=>{var __webpack_modules__={5851:(t,e,r)=>{"use strict";r.d(e,{i:()=>n});const n="abi/5.6.3"},2734:(t,e,r)=>{"use strict";r.d(e,{R:()=>T,$:()=>P});var n=r(3286),i=r(3587),o=r(711),s=r(5851),a=r(1184),u=r(4594);class h extends a.XI{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,e){try{e=(0,u.getAddress)(e)}catch(t){this._throwError(t.message,e)}return t.writeValue(e)}decode(t){return(0,u.getAddress)((0,n.hexZeroPad)(t.readValue().toHexString(),20))}}class l extends a.XI{constructor(t){super(t.name,t.type,void 0,t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)
<script>
export let segment;
import { token, status } from "../stores/user";
import { getApi, getContract } from "../utils";
import logo_svg from "images/logo.svg";
import { goto } from "@sapper/app";
const api = getApi($token);
let price;
let balance;
{
"name": "example",
"genesis": {
"nonce": "0x0000000000000000",
"timestamp": "0x0",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000d8d5941037ad6c6b83d4c81592573e5ba622fab94912a880c0",
"gasLimit": "0x1388",
"difficulty": "0x1",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Newfang {
address public storageAddress;
address public owner;
uint256 public number;
bytes32 private password;
bool public lock;
Public Key Username Email First Name Last Name Nonce
0x07d291ea... alex123 alex@example.com Alex Rodriguez 12
0x041a2c63... sauravnk30 sauravn30@gmail.com Saurav Kanchan 87
0x038a5k41... anonymous john@example.com John Doe 21
@SauravKanchan
SauravKanchan / db.csv
Last active September 26, 2020 11:06
Public Key table
Public Key Username Email First Name Last Name
0x07d291ea... alex123 alex@example.com Alex Rodriguez
0x041a2c63... sauravnk30 sauravn30@gmail.com Saurav Kanchan
0x038a5k41... anonymous john@example.com John Doe
@SauravKanchan
SauravKanchan / install.sh
Created November 27, 2019 08:56
Install go and go-ipfs
#!/bin/bash
# Install go
set -e
VERSION="1.13.4"
[ -z "$GOROOT" ] && GOROOT="$HOME/.go"
[ -z "$GOPATH" ] && GOPATH="$HOME/go"
OS="$(uname -s)"
{
"private_key": "24C4FE6063E62710EAD956611B71825B778B041B18ED53118CE5DA5F02E494BA",
"network": "kovan",
"ERC20": "0x0DEd9F7D82a24099F09AF7831CaB61B31Df10487",
"name": "Kanchan Coin",
"symbol": "SNK",
"total_supply": "1000000000000000000000000",
"decimals": 18
}
@SauravKanchan
SauravKanchan / app.js
Last active September 23, 2019 13:24
const ethers = require('ethers');
const config = require('./config.json');
// Import the json file from build to get the abi
const erc_json = require('./build/ERC20.json'); //import the json of the contract which you want to interact
// You can use any standard network name
// - "homestead"
// - "rinkeby"
// - "ropsten"