Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Veber MikkySnow

  • Minsk, Belarus
View GitHub Profile
View Permissions
cleos set account permission test active '{"threshold":1, "keys":[{"key":"EOS6Kdb1AUAhZeYZrU7TJXh9KQQLziC7f42txc63ettp79mnYxQWf", "weight":1}], "accounts": [{"permission":{"actor":"test","permission":"eosio.code"},"weight":1}]}' owner -p test
View Example EOS ICO
#include <eosiolib/eosio.hpp>
#include <eosiolib/currency.hpp>
using namespace eosio;
class hello : public eosio::contract {
public:
using contract::contract;
hello(account_name self) : contract(self) {}
View Recursive Transactions EOS
#include <eosiolib/eosio.hpp>
#include <eosiolib/transaction.hpp>
using namespace eosio;
using namespace std;
class rec : public eosio::contract {
public:
using contract::contract;
View ABI
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"minterList","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"add
View WC.sol
pragma solidity ^0.4.21;
contract ERC223ReceivingContract {
/**
* @dev Standard ERC223 function that will handle incoming token transfers.
*
* @param _from Token sender address.
* @param _value Amount of tokens.
* @param _data Transaction metadata.
*/
View API.sol
// Создает новый запрос на минтинг WhiteCoin
// amount - количество токенов для создания
// address - адрес клиента, на который нужно отправить WhiteCoi
mintingRequest: function (amount, address) {
WhiteCoin.mintingRequest(amount, address, (error, result) => {
// TODO: Добавить сюда обработку результата
WhiteCoin.NewMintingRequest().watch((err, response) => {
console.log(response.args.amount); // Сумма для эмиссии
console.log(response.args.id); // Номер запроса, который мы подставляем в mintWhitecoin()
console.log(response.args.to); // Адрес клиента
You can’t perform that action at this time.