Skip to content

Instantly share code, notes, and snippets.

View molekilla's full-sized avatar

Rogelio Morrell molekilla

  • Panama
View GitHub Profile
import { Markets } from './tradingview/Markets';
import { MarginBot } from './binance/MarginBot';
import { BookTicker } from "./binance/BookTicker";
import { BinanceOrder } from "./binance/BinanceOrder";
import { forkJoin } from 'rxjs';
import { MMMBotDB } from './MMMBotDB';
import { Position } from './binance/Position';
import { Dashboard } from './dashboard';
import BigNumber from 'bignumber.js';
@molekilla
molekilla / gist:fbb9e1770dccb68f4e035c9514c98ed0
Created February 13, 2020 15:07
solido-walletconnect-vechain

solido-provider-wallet

Solido Wallet Provider

Implementing WalletConnect Protocol for a VeChain Dapp

solido-provider-wallet is a wrapper for solido-provider-connex which injects a SolidoSigner interface that sends signing requests to WalletConnect.

Additionally, a Dapp needs to instantiate a self hosted connex. To create a new connex instance, add @vechain/connex-framework and @vechain/connex.driver-nodejs. The latter only works with server side applications but is enough to let us create a connex object.

@molekilla
molekilla / WalletConnectDappUtils.ts
Created March 24, 2020 19:21
Wait for WalletConnect Transaction by looking up tx
import { from } from 'rxjs';
import { mergeMap, filter } from 'rxjs/operators';
export class WalletConnectDappUtils {
public static async waitFor(methodResponse: any) {
let result: any = {};
// CANNOT BE executed with the plugin due to next tick issues with Javascript
let exit = 5;
let n = methodResponse.beforeBlock - 2;
// eslint-disable-next-line no-constant-condition
@molekilla
molekilla / WSecureMessaging.md
Last active April 11, 2020 14:10
A secure messaging workflow specification

A secure messaging workflow specification

This document describes how to implement a DSL workflow using smart contracts for a secure messaging smart control protocol.

It contains building blocks that can be apply to other domains (DeFi, supply chain, flash loans, and others)

Define states

After your discovery phase and business requirements, create the different states that will define the workflow.

@molekilla
molekilla / mdv.md
Created April 23, 2020 11:34
MDV Docs Draft

MDV - Mensajeria de Documentos Verificables

WF API v1.0.0-rc.0

Autor: Rogelio Morrell C. , 2020

Introduccion

MDV es una solucion descentralizada de solicitudes de documentos que permite crear workflows de tramites por medio de Solidity y Javascript.

Adicionalmente incluye soporte para PKCS#7 para documentos PDF e integracion de identidad digital por medio de ethr-did.

Contratos

@molekilla
molekilla / onboard.vue
Created April 23, 2020 14:01
onboard.js
//1 ) Instancia Onboard.js
this.onboard = Onboard({
dappId: (Vue as any).appconfig.BLOCKNATIVE_API_KEY,
networkId: this.defaultNetwork,
subscriptions: this.onboardSync,
walletSelect: undefined,
walletCheck: undefined
});
// Si no tiene wallet, muestra una pagina para que instale wallet

DV - Digito Verificador

DV API v0.1.0

Autor: Rogelio Morrell C. , 2020

Introduccion

DV es un contrato inteligente que encapsula el algoritmo de digito verificador utilizado por la Direccion General de Ingresos para verificacion de la secuencia de credenciales como RUCs y cedulas.

Contratos

DV

DV contiene dos metodos:

@molekilla
molekilla / gist:d05baf77d9f66a314a86a14a717e86fe
Created May 3, 2020 19:44
mdv gas estimates with rlp when creating workflow
·-----------------------------------------------|----------------------------|-------------|----------------------------·
| Solc version: 0.6.6+commit.6c089d02 · Optimizer enabled: false · Runs: 200 · Block limit: 6721975 gas │
················································|····························|·············|·····························
| Methods · 3 gwei/gas · 209.49 usd/eth │
···························|····················|··············|·············|·············|··············|··············
| Contract · Method · Min · Max · Avg · # calls · usd (avg) │
···························|····················|··············|·············|·············|··············|··············
| DV · calc · 49803 · 50076 · 50011 · 14 · 0.03 │
···························|····················
@molekilla
molekilla / gist:c2ab3af0a1236cbbb7a3b51dadfff9fc
Created May 3, 2020 19:44
mdv gas estimates with rlp when creating workflow
·-----------------------------------------------|----------------------------|-------------|----------------------------·
| Solc version: 0.6.6+commit.6c089d02 · Optimizer enabled: false · Runs: 200 · Block limit: 6721975 gas │
················································|····························|·············|·····························
| Methods · 3 gwei/gas · 209.49 usd/eth │
···························|····················|··············|·············|·············|··············|··············
| Contract · Method · Min · Max · Avg · # calls · usd (avg) │
···························|····················|··············|·············|·············|··············|··············
| DV · calc · 49803 · 50076 · 50011 · 14 · 0.03 │
···························|····················
contentscript.js:79 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
Db @ contentscript.js:79
(anonymous) @ contentscript.js:73
Y @ contentscript.js:73
(anonymous) @ contentscript.js:90
(anonymous) @ contentscript.js:90
contentScript.js:3092 [Jul 5, 08:11:06 am] [contentScript]: [INFO]: Initialising TronLink
contentScript.js:3092 [Jul 5, 08:11:06 am] [contentScript]: [INFO]: TronLink injected
management:1 Unchecked runtime.lastError: The message port closed before a response was received.
DevTools failed to load SourceMap: Could not load content for chrome-extension://dkdedlpgdmmkkfjabffeganieamfklkm/static/js/content.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME