Skip to content

Instantly share code, notes, and snippets.

View dbuarque's full-sized avatar

Dio Ianakiara dbuarque

View GitHub Profile
@dbuarque
dbuarque / send-token.js
Created February 4, 2023 17:19
How to send crypto using klever blockchain
import { Account, TransactionType } from "@klever/sdk";
// Define the transaction payload object
const payload = {
amount // The amount of KLV to be transferred
receiver, // The address of the receiver
kda: 'KLV', // The symbol for the KLEVER token or your token id
};
// The private key of the sender's account
@dbuarque
dbuarque / bash
Last active February 4, 2023 17:18
How to install Klever javascript sdk?
//Installation
$ npm install @klever/sdk
@dbuarque
dbuarque / graphql-go-mongodb-example.go
Created March 8, 2020 16:09 — forked from trunet/graphql-go-mongodb-example.go
Minimal example of GraphQL Golang and MongoDB playing nicely together. Edit
// Embedded in this article https://medium.com/p/c98e491015b6
package main
import (
"context"
"fmt"
"log"
"net/http"
"time"
@dbuarque
dbuarque / README.md
Created January 4, 2019 04:41 — forked from sullof/Eventron
A gist to run Eventron — an alternative to Tron Quickstart

Instructions

  1. Create docker-compose.yaml and up.sh on your computer
  2. Make up.sh executable (chmod +x ip.sh)
  3. Run ./up.sh

You can force pre-approval of proposals commenting/uncommenting variables in the section

    environment:
 - allowTvmTransferTrc10=1
@dbuarque
dbuarque / TokenMock.spec.js
Last active January 2, 2019 01:36
TokenMock.spec.js
/* global artifacts, contract, it, assert, before, beforeEach, tronWeb, done */
/* eslint-disable prefer-reflect */
const wait = require('./helpers/wait')
const TokenMock = artifacts.require('TokenMock.sol')
const TOKEN_NAME = 'TRONWALLET'
const TOKEN_SYMBOL = 'TWX'
const TOKEN_UNIT = 1000000
const TOKEN_TOTAL_SUPPLY = 20000000000
const TOKEN_DECIMALS = 6
const INVALID_ADDRESS = '0x0'
@dbuarque
dbuarque / IDEX.sol
Created December 28, 2018 23:32 — forked from dominiek/IDEX.sol
IDEX Smart Contract
pragma solidity ^0.4.16;
contract Token {
bytes32 public standard;
bytes32 public name;
bytes32 public symbol;
uint256 public totalSupply;
uint8 public decimals;
bool public allowTransactions;
mapping (address => uint256) public balanceOf;
var StellarSdk = require('stellar-sdk');
StellarSdk.Network.useTestNetwork();
var server = new StellarSdk.Server('https://horizon-testnet.stellar.org');
var sourceAccountPair = StellarSdk.Keypair.random();
var destAccountPair = StellarSdk.Keypair.random();
var astroDollar1 = new StellarSdk.Asset('AstroDollar1', sourceAccountPair.publicKey());
@dbuarque
dbuarque / Tron Deterministic Wallet Proposal.md
Last active March 31, 2023 10:49
Tron Deterministic Wallet Proposal

Tron Deterministic Wallet Proposal (TWP)

Preamble

TWP: 0001
Title: Tron Wallet Proposal - Key Derivation Methods for Tron Accounts with BIP39
Author: getty.io
Created: 2017-04-05
@dbuarque
dbuarque / Home.js
Last active May 7, 2019 21:10
Minimal Mobx Setup
import 'babel-polyfill';
import React, { Component } from 'react'
import {
View
} from 'react-native'
import { observer, inject } from 'mobx-react'
@inject('appStore') @observer
class HomeScreen extends Component {
@dbuarque
dbuarque / .babelrc
Last active February 23, 2018 01:01
Mobx Basic Setup
{
"presets": ["react-native"],
"plugins": ["transform-decorators-legacy"]
}