Skip to content

Instantly share code, notes, and snippets.

View viraj124's full-sized avatar
💻
Blockchaining:)

Viraz Malhotra viraj124

💻
Blockchaining:)
View GitHub Profile
import fs from 'fs'
import csv from 'csv-parser'
const json: any = []
fs.createReadStream('scripts/input.csv')
.pipe(csv())
.on('data', (row: any) => {
const val: any = Object.values(row)[0]
json.push(val)
})
// File: @openzeppelin/contracts/utils/Context.sol
pragma solidity >=0.6.0 <0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
// File: @openzeppelin/contracts/utils/Context.sol
pragma solidity >=0.6.0 <0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
pragma solidity ^0.6.0;
// very simple version of the wallet contract
contract Wallet {
// this doesn't have a authentication layer since it is an example ideally which ever user is the owner of this wallet can only call this method
function execute(address _target, bytes memory _data)
public
payable
pragma solidity ^0.6.0;
contract Box {
uint256 private value;
// Emitted when the stored value changes
event ValueChanged(uint256 newValue);
// Stores a new value in the contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/utils/Create2.sol";
contract MinimalProxyFactory {
event MinimalProxyCreated(address minimalProxy);
function computeAddress(uint256 salt, address implementation)
public
import _ from 'lodash';
import { QueryParams } from 'routing-controllers';
import { Service } from 'typedi';
import { ApiPromise, WsProvider } from '@polkadot/api';
import { Keyring } from '@polkadot/keyring';
import { StakingOperatioQuery } from '../controllers/requests/StakingQuery';
import * as bip32 from 'bip32';
import * as BufferLayout from 'buffer-layout';
import _ from 'lodash';
import nacl from 'tweetnacl';
import { Service } from 'typedi';
import {
Account, Connection, PublicKey, SystemProgram, SYSVAR_RENT_PUBKEY, Transaction,
TransactionInstruction
} from '@solana/web3.js';
yarn run v1.22.4
$ react-scripts start
There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.
The react-scripts package provided by Create React App requires a dependency:
"babel-loader": "8.0.4"