Skip to content

Instantly share code, notes, and snippets.

View andreafspeziale's full-sized avatar

Andrea Francesco Speziale andreafspeziale

View GitHub Profile
@andreafspeziale
andreafspeziale / Lisk blockchain database structure.md
Last active October 9, 2020 16:28
Lisk blockchain platform PostgreSQL database structure description

Lisk blockchain database structure

Lisk is a blockchain application platform and crypto-currency, which offers an all round solution for Node.js and JavaScript developers to deploy their own blockchain applications.

You can find a very nice documentation about Lisk here but some useful iformation like the complete database structure are missing.

This gist aims at telling you more about where the Lisk blockchain is stored. The following notes are taken from the study of Lisk testnet 0.9.3a version.

Database

@andreafspeziale
andreafspeziale / Operating Ropsten Ethereum testnet.md
Last active March 30, 2022 03:24
Operating Ropsten Ethereum testnet network with Geth and Mist on OSX

Operating Ropsten Ethereum testnet

from a newbie to newbies

Intro

I believe that a development environment is one of the access key in learning new technologies. I didn't find on the internet a simple and common path to make the Ropsten network, the Ethereum public testnet, work.

So I'm writing down a couple of command lines and links that can be useful to achieve it.

Resources and requirements

@andreafspeziale
andreafspeziale / FlaskApache2.md
Last active August 16, 2018 10:10
Flask - Apache2 deployed app structure

Flask - Apache2

Project structure

Useful link for requirements: How To Deploy a Flask Application on an Ubuntu VPS

Under /var/www folder you should have a structure like following

/var/www/
/var/www/project-name/
/var/www/project-name/project-name.wsgi
/var/www/project-name/project/__init__.py
@andreafspeziale
andreafspeziale / JavaScript array functions.md
Last active August 30, 2018 20:55
JavaScript array functions resources
@andreafspeziale
andreafspeziale / Next-Gen JavaScript.md
Last active September 27, 2018 10:52
Some Next-Gen JavaScript hints
@andreafspeziale
andreafspeziale / # Get Smart Contract instance bytecode and hashed bytecode.md
Last active August 26, 2023 13:16
# Get Smart Contract instance bytecode and hashed bytecode

Get Smart Contract instance bytecode and hashed bytecode

Minimal SC sample exposing a way to get the bytecode and the hashed bytecode of a deployed smart contract.
This without the new OPCODE of EIP1052

pragma solidity ^0.4.24;

contract SomeContractInstance {
    constructor () public {}
}
contract Wallet {
  ...
  address public logic_;
  /**
   * @dev Deposit any ERC20 token into this wallet.
   * @param _token The address of the existing token contract.
   * @param _amount The amount of tokens to deposit.
   * @return Bool if the deposit was successful.
 */
pragma solidity ^0.5.2;

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
interface IERC20 {
    function transfer(address to, uint256 value) external returns (bool);
@andreafspeziale
andreafspeziale / starteos.sh
Created April 11, 2019 11:07
Basic EOS node bootstrap using Docker.
# be sure that the docker daemon is running before you start this script
#
# this script will create an alias at the end, so please run it with:
#
# source starteos.sh
#
# see https://developers.eos.io/eosio-nodeos/docs/docker-quickstart
docker pull eosio/eos-dev:v1.2.5 # pull eosio image
docker network create eosdev # create an eos network(see docker networking)
@andreafspeziale
andreafspeziale / cleaneos.sh
Created April 11, 2019 11:38
Basic EOS node cleaner based on the bootstrap script using Docker.
echo "Stopping container.."
docker stop keosd
docker stop nodeos
echo "Removing container.."
docker rm keosd
docker rm nodeos
echo "Removing network.."
docker network rm eosdev