Skip to content

Instantly share code, notes, and snippets.

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

Viraz Malhotra viraj124

💻
Blockchaining:)
View GitHub Profile
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
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
// 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
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)
})