Skip to content

Instantly share code, notes, and snippets.

View luyzdeleon's full-sized avatar

Luis C. de Leon luyzdeleon

View GitHub Profile
This file has been truncated, but you can view the full file.
{"genesis_time":"2020-05-22T16:04:03.57251Z","chain_id":"loadnet","consensus_params":{"block":{"max_bytes":"4000000","max_gas":"-1","time_iota_ms":"1"},"evidence":{"max_age":"1000000"},"validator":{"pub_key_types":["ed25519"]}},"app_hash":"","app_state":{"pos":{"params":{"relays_to_tokens_multiplier":"1000","unstaking_time":"1814400000000000","max_validators":"5000","stake_denom":"upokt","stake_minimum":"1000000","session_block_frequency":"25","dao_allocation":"10","proposer_allocation":"1","maximum_chains":"15","max_jailed_blocks":"1000","max_evidence_age":"120000000000","signed_blocks_window":"100","min_signed_per_window":"0.500000000000000000","downtime_jail_duration":"600000000000","slash_fraction_double_sign":"0.050000000000000000","slash_fraction_downtime":"0.010000000000000000"},"prevState_total_power":"0","prevState_validator_powers":null,"validators":[{"address":"9def728e48a0fcaf53d1efd99e03246fa126d607","public_key":"3ed3b8d68213adecd3a367dae5ca63e05ffed804791aeb12984b35273954e94f","jailed":false,"s
This file has been truncated, but you can view the full file.
{"genesis_time":"2020-05-22T16:04:03.57251Z","chain_id":"loadnet","consensus_params":{"block":{"max_bytes":"4000000","max_gas":"-1","time_iota_ms":"1"},"evidence":{"max_age":"1000000"},"validator":{"pub_key_types":["ed25519"]}},"app_hash":"","app_state":{"pos":{"params":{"relays_to_tokens_multiplier":"1000","unstaking_time":"1814400000000000","max_validators":"5000","stake_denom":"upokt","stake_minimum":"1000000","session_block_frequency":"25","dao_allocation":"10","proposer_allocation":"1","maximum_chains":"15","max_jailed_blocks":"1000","max_evidence_age":"120000000000","signed_blocks_window":"100","min_signed_per_window":"0.500000000000000000","downtime_jail_duration":"600000000000","slash_fraction_double_sign":"0.050000000000000000","slash_fraction_downtime":"0.010000000000000000"},"prevState_total_power":"0","prevState_validator_powers":null,"validators":[{"address":"2f1a1d7b51caa441c3bf5b13e9f25de442588b18","public_key":"330fb56cb66b1b8d75308bec61a0191b85f3e9d7ad2db0cc2ee34e26967db9b5","jailed":false,"s
{"genesis_time":"2020-05-22T16:04:03.57251Z","chain_id":"loadnet","consensus_params":{"block":{"max_bytes":"4000000","max_gas":"-1","time_iota_ms":"1"},"evidence":{"max_age":"1000000"},"validator":{"pub_key_types":["ed25519"]}},"app_hash":"","app_state":{"pos":{"params":{"relays_to_tokens_multiplier":"1000","unstaking_time":"1814400000000000","max_validators":"5000","stake_denom":"upokt","stake_minimum":"1000000","session_block_frequency":"25","dao_allocation":"10","proposer_allocation":"1","maximum_chains":"15","max_jailed_blocks":"1000","max_evidence_age":"120000000000","signed_blocks_window":"100","min_signed_per_window":"0.500000000000000000","downtime_jail_duration":"600000000000","slash_fraction_double_sign":"0.050000000000000000","slash_fraction_downtime":"0.010000000000000000"},"prevState_total_power":"0","prevState_validator_powers":null,"validators":[{"address":"e5a968b20317436d4c75c183c2947ae38877db6e","public_key":"f9e811060e5eae13c69b04d9b8933ac3f5d8b3072407d7bacc658f59da16089b","jailed":false,"s
{"genesis_time":"2020-05-22T16:04:03.57251Z","chain_id":"loadnet","consensus_params":{"block":{"max_bytes":"4000000","max_gas":"-1","time_iota_ms":"1"},"evidence":{"max_age":"1000000"},"validator":{"pub_key_types":["ed25519"]}},"app_hash":"","app_state":{"pos":{"params":{"relays_to_tokens_multiplier":"1000","unstaking_time":"1814400000000000","max_validators":"5000","stake_denom":"upokt","stake_minimum":"1000000","session_block_frequency":"25","dao_allocation":"10","proposer_allocation":"1","maximum_chains":"15","max_jailed_blocks":"1000","max_evidence_age":"120000000000","signed_blocks_window":"100","min_signed_per_window":"0.500000000000000000","downtime_jail_duration":"600000000000","slash_fraction_double_sign":"0.050000000000000000","slash_fraction_downtime":"0.010000000000000000"},"prevState_total_power":"0","prevState_validator_powers":null,"validators":[{"address":"992f17ab9b4991b8f5ea44aaf40c30cd55816da3","public_key":"cb5e3a9e77a91a08af4f0416ed5f3aee86a4f0a27489f98f63fd66cbe81a1359","jailed":false,"s
{"genesis_time":"2020-05-22T16:04:03.57251Z","chain_id":"loadnet","consensus_params":{"block":{"max_bytes":"4000000","max_gas":"-1","time_iota_ms":"1"},"evidence":{"max_age":"1000000"},"validator":{"pub_key_types":["ed25519"]}},"app_hash":"","app_state":{"pos":{"params":{"relays_to_tokens_multiplier":"1000","unstaking_time":"1814400000000000","max_validators":"5000","stake_denom":"upokt","stake_minimum":"1000000","session_block_frequency":"25","dao_allocation":"10","proposer_allocation":"1","maximum_chains":"15","max_jailed_blocks":"1000","max_evidence_age":"120000000000","signed_blocks_window":"100","min_signed_per_window":"0.500000000000000000","downtime_jail_duration":"600000000000","slash_fraction_double_sign":"0.050000000000000000","slash_fraction_downtime":"0.010000000000000000"},"prevState_total_power":"0","prevState_validator_powers":null,"validators":[{"address":"0c3162664dfeb5e82671c6f2874dfeb768aeec49","public_key":"bda2b9f3894403e4185f1520c7f6f010e8a51f20d3eda7fbf86ab8fc95adafbf","jailed":false,"s
{"genesis_time":"2020-05-22T16:04:03.57251Z","chain_id":"loadnet","consensus_params":{"block":{"max_bytes":"4000000","max_gas":"-1","time_iota_ms":"1"},"evidence":{"max_age":"1000000"},"validator":{"pub_key_types":["ed25519"]}},"app_hash":"","app_state":{"pos":{"params":{"relays_to_tokens_multiplier":"1000","unstaking_time":"1814400000000000","max_validators":"5000","stake_denom":"upokt","stake_minimum":"1000000","session_block_frequency":"25","dao_allocation":"10","proposer_allocation":"1","maximum_chains":"15","max_jailed_blocks":"1000","max_evidence_age":"120000000000","signed_blocks_window":"100","min_signed_per_window":"0.500000000000000000","downtime_jail_duration":"600000000000","slash_fraction_double_sign":"0.050000000000000000","slash_fraction_downtime":"0.010000000000000000"},"prevState_total_power":"0","prevState_validator_powers":null,"validators":[{"address":"bb6fd938b03ec5cec114ece7d1107cc24cde570d","public_key":"a1726b1cf7950cf3268ddb691cdf91e726543e4b2f28b152cce4cc77ac939094","jailed":false,"s
@luyzdeleon
luyzdeleon / pocket-terminal.js
Created October 21, 2019 19:40
Pocket + Terminal integration sample
const TerminalHttpProvider = require('@terminal-packages/sdk').TerminalHttpProvider;
const PocketProvider = require('pocket-js-web3-provider');
const Web3 = require('web3');
var pocketProvider = new PocketProvider("ETH", "1", "<Your Pocket Dev ID here>", {
// This is just a stub, only gets called when eth_sendRawTransaction or eth_sendTransaction are called.
transactionSigner: {
/*
Callback method called to determine wether or not the
@luyzdeleon
luyzdeleon / execute_query.swift
Created September 7, 2018 14:53
Execute query Pocket
Pocket.shared.executeQuery(query: query) { (queryResponse, error) in
if error != nil {
return
}
// Do something with the queryResponse.result.value()
}
@luyzdeleon
luyzdeleon / send_transaction.swift
Created September 7, 2018 14:50
Send transaction Pocket
Pocket.shared.sendTransaction(transaction: transaction) { (transactionResponse, error) in
if error != nil {
return
}
guard let txHash = transactionResponse?.hash else {
return
}
// Do something with the txHash
@luyzdeleon
luyzdeleon / query.swift
Created September 7, 2018 14:46
Create query
// Queries are structured like JSON-RPC calls, all methods are supported except sendTransaction and sendRawTransaction
let queryParams = ["rpcMethod": "eth_getTransactionCount", "rpcParams": ["0x0", "latest"]]
// The decoder is going to be used to try and decode the response in case it's a hex or any other data type that needs decoding
// You can pass in nil and get the raw response from the blockchain
let decoder = ["returnTypes": ["uint256"]]
let query = try? PocketEth.createQuery(params: queryParams, decoder: decoder)