Skip to content

Instantly share code, notes, and snippets.

View luyzdeleon's full-sized avatar

Luis C. de Leon luyzdeleon

View GitHub Profile
@luyzdeleon
luyzdeleon / transaction.swift
Created September 7, 2018 14:38
Create transaction snippet
// Ethereum's transaction object
var params = [AnyHashable : Any]()
params["to"] = "0x0000000000"
params["data"] = nil
params["nonce"] = BigUInt.init(0)
// In wei
params["gasPrice"] = BigUInt.init(0)
params["gasLimit"] = BigUInt.init(0)
params["value"] = BigUint.init(0)
@luyzdeleon
luyzdeleon / import_wallet.swift
Created September 7, 2018 14:09
Import wallet
// The data parameter is not used in the Ethereum plugin
let privateKey = "plain_text_private_key"
let address = "0x000000000"
let importedWallet = try? PocketEth.importWallet(privateKey: privateKey, address: address, data: nil)
@luyzdeleon
luyzdeleon / wallet.swift
Created September 7, 2018 14:04
Create wallet snippet
// The data parameter is not used in the Ethereum plugin
let wallet = try? PocketEth.createWallet(data: nil)
@luyzdeleon
luyzdeleon / sha256.py
Created January 6, 2018 16:06
Hello World on SHA256
import hashlib
hash_object = hashlib.sha256(b'Hello World')
hex_dig = hash_object.hexdigest()
print(hex_dig)
@luyzdeleon
luyzdeleon / gist:ab60eca20713cada626c
Created November 15, 2014 13:46
Verifying that +luisdeleon is my openname (Bitcoin username). https://onename.io/luisdeleon
Verifying that +luisdeleon is my openname (Bitcoin username). https://onename.io/luisdeleon