This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity 0.6.0; | |
import "https://raw.githubusercontent.com/smartcontractkit/chainlink/develop/evm-contracts/src/v0.6/ChainlinkClient.sol"; | |
contract Adapter is ChainlinkClient { | |
uint256 public ethereumPrice; | |
address private oracle; | |
bytes32 private jobId; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
NewerOlder