Skip to content

Instantly share code, notes, and snippets.

View HCastano's full-sized avatar

Hernando Castano HCastano

  • Toronto, ON
View GitHub Profile
@HCastano
HCastano / contract-metadata.json
Created June 13, 2022 20:51
Outer Contract Metadata
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ContractMetadata",
"description": "Smart contract metadata.",
"type": "object",
"required": [
"contract",
"source"
],
"properties": {
@HCastano
HCastano / ink-metadata-versioned-schema.json
Created June 13, 2022 19:22
ink! MetadataVersioned Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "MetadataVersioned",
"description": "Versioned ink! project metadata.\n\n# Note\n\nRepresents the version of the serialized metadata *format*, which is distinct from the version of this crate for Rust semantic versioning compatibility.",
"oneOf": [
{
"description": "Version 0 placeholder. Represents the original non-versioned metadata format.",
"type": "object",
"required": [
"V0"
@HCastano
HCastano / check-lines.sh
Last active September 22, 2021 15:30
`cargo-llvm-lines` output on `ink!` example contracts
#!/bin/bash
#
# A script to see who the worst offenders are in terms of lines of total number of LLVM
# IR lines generated across the `ink!` example contracts.
set -eux
for example in "./examples"/*/; do
name=$(basename $example)
# cargo llvm-lines --release --manifest-path=${example}Cargo.toml | tail -n +4 > ${name}.txt;
@HCastano
HCastano / rustc-panic.txt
Last active May 8, 2021 02:19
thread 'rustc' panicked at 'found unstable fingerprints for optimized_mir
Compiling template-runtime v3.0.0 (/home/hernando/remote-builds/4993105950480157826/bin/template/runtime)
Compiling millau-bridge-node v0.1.0 (/home/hernando/remote-builds/4993105950480157826/bin/millau/node)
Compiling rialto-bridge-node v0.1.0 (/home/hernando/remote-builds/4993105950480157826/bin/rialto/node)
thread 'rustc' panicked at 'found unstable fingerprints for optimized_mir(rialto_runtime[9cb1]::_#11::{impl#0}::deserialize::{impl#2}::visit_seq): Body { basic_blocks: [BasicBlockData { statements: [_7 = &mut _2, _6 = &mut (*_7)], terminator: Some(Terminator { source_info: SourceInfo { span: /home/hernando/.cargo/git/checkouts/substrate-7e08433d4c370a21/7b4d55b/frame/support/src/genesis_config.rs:82:39: 88:9 (#2798), scope: scope[0] }, kind: _5 = <__A as SeqAccess>::next_element::<pallet_bridge_eth_poa::GenesisConfig>(move _6) -> [return: bb1, unwind: bb87] }), is_cleanup: false }, BasicBlockData { statements: [_8 = discriminant(_5)], terminator: Some(Terminator { source_info: SourceInfo { span
@HCastano
HCastano / node2_10085.log
Last active March 19, 2019 16:27
Note: There are two logs files here (just scroll a while)
Loading config file from ./config/node2.toml
2019-03-18 18:22:39 main INFO parity_ethereum::run Starting Parity-Ethereum/v2.2.11-unstable-b5097c671-20190304/x86_64-macos/rustc1.33.0
2019-03-18 18:22:39 main INFO parity_ethereum::run Keys path parity-data/node2/keys/DPoSChain
2019-03-18 18:22:39 main INFO parity_ethereum::run DB path parity-data/node2/chains/DPoSChain/db/92a11512e67ae1c3
2019-03-18 18:22:39 main INFO parity_ethereum::run State DB configuration: fast
2019-03-18 18:22:39 main INFO parity_ethereum::run Operating mode: active
2019-03-18 18:22:39 main INFO ethcore_service::service Configured for DPoSChain using AuthorityRound engine
2019-03-18 18:22:39 main TRACE engine Multi ValidatorSet retrieved for block 0.
2019-03-18 18:22:39 main TRACE engine obtained proof for initial set: 3 validators, 19336 bytes
2019-03-18 18:22:39 main INFO engine Signal for switch to contract-based validator set.

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

0x564c13f144B8E4E9aeF020d52170eB67d8907D62