Skip to content

Instantly share code, notes, and snippets.

from math import exp, ceil, floor
YEAR = 365*24*60*60
WEEK = 7*24*3600
DAY = 24*3600
def average(lst):
return sum(lst) / len(lst)
class Miner:
{
"protocol_version": 30,
"genesis_time": "2020-10-11T02:50:01.072884962Z",
"chain_id": "test-chain-8zIE1",
"genesis_height": 0,
"num_block_producer_seats": 4,
"num_block_producer_seats_per_shard": [
4
],
"avg_hidden_validator_seats_per_shard": [
# time duration for pippenger benchmarks for different numbers of inner parameters
table=[(0.0, 86815.0), (1.0, 208363.0), (2.0, 289890.0), (4.0, 455238.0), (8.0, 807350.0), (16.0, 1300415.0), (32.0, 2021450.0), (64.0, 3310835.0), (128.0, 5763210.0), (256.0, 9747500.0), (512.0, 16994230.0), (1024.0, 31981060.0), (2048.0, 57126540.0), (4096.0, 103076550.0), (8192.0, 190984260.0), (16384.0, 370553400.0), (32768.0, 688027060.0), (65536.0, 1283714240.0)]
# gas costs are obtained from nearcore mastes
keccak512_base = 1937129412.0
keccak512_byte = 12216567.0
keccak256_base = 1959830425.0
keccak256_byte = 7157035.0
# time duration (in ms) obtained from running runtime params estimator
{-# STDLIB_VERSION 4 #-}
{-# CONTENT_TYPE DAPP #-}
{-# SCRIPT_TYPE ACCOUNT #-}
let transferVK=base58''
let utxoAccumulatorVK=base58''
let emptyRoot=base58'4ABQyM1tpHEDkbHes1t7G1F3yyMJXQSvaUR1rqkZqKak'

Keybase proof

I hereby claim:

  • I am snjax on github.
  • I am snjax (https://keybase.io/snjax) on keybase.
  • I have a public key ASB7F9GvuE9TmGF5vJWpPaGsQqWf4hvjqQTY01_7fEsmjwo

To claim this, I am signing this object:

pub fn c_tx<'a, CS:ConstraintSystem, P:PoolParams<CS::F>>(
root: &Signal<'a, CS>,
nullifier: &[Signal<'a, CS>],
out_note_hash_root: &Signal<'a, CS>,
out_hash: &[Signal<'a, CS>],
in_note:&[CNote<'a, CS>],
out_note:&[CNote<'a, CS>],
delta:&Signal<'a, CS>,
msg_hash:&Signal<'a, CS>,
in_proof:&[CMerkleProof<'a, CS>],
2004611329999999613927424
["0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB624c02622e9eB", "0xfDC3881F0a0b7a086f8A9A461eB
pragma solidity ^0.4.25;
import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/v2.0.0/contracts/token/ERC20/ERC20.sol";
import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/v2.0.0/contracts/ownership/Ownable.sol";
contract BatchTransfer is Ownable {
function process(address token, address[] memory _from, address[] memory _to, uint256[] memory _amount) public onlyOwner returns(bool) {
for (uint i=0; i < _from.length; i++) {
require(IERC20(token).transferFrom(_from[i], _to[i], _amount[i]));
pragma solidity ^0.4.24;
// File: openzeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* See https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.