Skip to content

Instantly share code, notes, and snippets.

View viswanathkgp12's full-sized avatar

Viswanath viswanathkgp12

View GitHub Profile

Forking Ganache Mainnet

ganache-cli -f https://cloudflare-eth.com/  -m "clutch captain shoe salt awake harvest setup primary inmate ugly among become" -i 999 -u 0x9759A6Ac90977b93B58547b4A71c78317f391A28 --port 7545

Generate a GPG Key:

gpg --generate-key

List Key:

gpg --list-keys
@viswanathkgp12
viswanathkgp12 / ed25519-verify.c
Last active October 23, 2023 14:51
Ed25519 Sign Verification using libsodium
#include "sodium.h"
int main(void)
{
sodium_init();
crypto_sign_state st;
unsigned char sig[64];
unsigned long long siglen;
@viswanathkgp12
viswanathkgp12 / Address.sol
Created September 21, 2018 07: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.4.25+commit.59dbf8f1.js&optimize=true&gist=
pragma solidity ^0.4.24;
/**
* Utility library of inline functions on addresses
*/
library Address {
/**
* Returns whether the target address is a contract
* @dev This function will return false if invoked during the constructor of a contract,
pragma solidity ^0.4.23;
contract FlawedStorageContract
{
uint256 private randomNumber;
address owner = msg.sender;
struct GameHistory
{
address player;
@viswanathkgp12
viswanathkgp12 / cars24.sol
Last active June 29, 2018 09:07
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.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.11;
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;