Skip to content

Instantly share code, notes, and snippets.

View ylv-io's full-sized avatar
🤑
Building Internet Money

Igor Yalovoy ylv-io

🤑
Building Internet Money
View GitHub Profile
cleos --url https://jungle.eosio.cr:443 system buyram ylvdeveloper ylvdeveloper "10 EOS"
3481816ms thread-0 main.cpp:429 create_action ] result: {"binargs":"7055a5516d9576f47055a5516d9576f4a08601000000000004454f5300000000"} arg: {"code":"eosio","action":"buyram","args":{"payer":"ylvdeveloper","receiver":"ylvdeveloper","quant":"10.0000 EOS"}}
executed transaction: 8eb30f6cfced6845e02b134946c7b6d623558f0c1a5ceff135b7e98007da692f 128 bytes 5094 us
# eosio <= eosio::buyram {"payer":"ylvdeveloper","receiver":"ylvdeveloper","quant":"10.0000 EOS"}
# eosio.token <= eosio.token::transfer {"from":"ylvdeveloper","to":"eosio.ram","quantity":"9.9500 EOS","memo":"buy ram"}
# ylvdeveloper <= eosio.token::transfer {"from":"ylvdeveloper","to":"eosio.ram","quantity":"9.9500 EOS","memo":"buy ram"}
# eosio.ram <= eosio.token::transfer {"from":"ylvdeveloper","to":"eosio.ram","quantity":"9.9500 EOS","memo":"buy ram"}
# eosio.token <= eosio.token::tra
cleos --url https://jungle.eosio.cr:443 set contract ylvdeveloper ./contracts/eosio.token
Reading WAST/WASM from ./contracts/eosio.token/eosio.token.wasm...
Using already assembled WASM...
Publishing contract...
executed transaction: 3fa704e4c1c72050e61882460bf0acd3b200df087d86a157d3d60ec1c439ba65 8104 bytes 3178 us
# eosio <= eosio::setcode {"account":"ylvdeveloper","vmtype":0,"vmversion":0,"code":"0061736d01000000017e1560037f7e7f0060057f7...
# eosio <= eosio::setabi {"account":"ylvdeveloper","abi":"0e656f73696f3a3a6162692f312e30010c6163636f756e745f6e616d65046e616d6...
warning: transaction executed locally, but may not be confirmed by the network yet
cleos --url https://jungle.eosio.cr:443 get code ylvdeveloper
code hash: 641f336aa1d08526201599c3c0ddb7a646e5ac8f9fd2493f56414d0422a0f957
cleos --url https://jungle.eosio.cr:443 push action ylvdeveloper create '{"issuer":"ylvdeveloper","maximum_supply":"1000000.00 YLV"}' -p ylvdeveloper
executed transaction: 8df25bdb13a8d96236ecaac42d175ea09bd582f2359d027b6723f282d89bbb9d 120 bytes 1015 us
# ylvdeveloper <= ylvdeveloper::create {"issuer":"ylvdeveloper","maximum_supply":"1000000.00 YLV"}
cleos --url https://jungle.eosio.cr:443 push action ylvdeveloper issue '{"to":"ylvdeveloper","quantity":"1000.00 YLV", "memo":"airdrop"}' -p ylvdeveloper
executed transaction: fb25bf6dc85cd0f62fbeb8d9ffb375dd09241dca6174b7919425ddde6ca0dcd2 128 bytes 1391 us
# ylvdeveloper <= ylvdeveloper::issue {"to":"ylvdeveloper","quantity":"1000.00 YLV","memo":"airdrop"}
cleos --url https://jungle.eosio.cr:443 get table ylvdeveloper ylvdeveloper accounts
{
"rows": [{
"balance": "1000.00 YLV"
}
],
"more": false
}
cleos --url https://jungle.eosio.cr:443 push action ylvdeveloper transfer '{"from":"ylvdeveloper", "to":"ylvio", "quantity":"100.00 YLV", "memo":"gift"}' -p ylvdeveloper
executed transaction: 32abee7e426d9e5653f67a7b492c17ca62aeeef97ff1a86037f58f2dd1459452 136 bytes 1639 us
# ylvdeveloper <= ylvdeveloper::transfer {"from":"ylvdeveloper","to":"ylvio","quantity":"100.00 YLV","memo":"gift"}
# ylvio <= ylvdeveloper::transfer {"from":"ylvdeveloper","to":"ylvio","quantity":"100.00 YLV","memo":"gift"}
cleos --url https://jungle.eosio.cr:443 get table ylvdeveloper ylvdeveloper accounts
{
"rows": [{
"balance": "900.00 YLV"
}
],
"more": false
}
Bytezilla:build iYalovoy$ cleos --url https://jungle.eosio.cr:443 get table ylvdeveloper ylvio accounts
{
// Author: Igor Yalovoy
// Web: ylv.io
// Email: [email protected]
// GitHub: https://github.com/ylv-io/coinpledge/tree/master
// Twitter: https://twitter.com/ylv_io
// Coin Pledge
// Achieve your goals and have fun with friends. Powered by security of smart contracts.
window.addEventListener('load', () => {
// Checking if Web3 has been injected by the browser (Mist/MetaMask)
if (typeof web3 !== 'undefined') {
// Use Mist/MetaMask's provider
web3js = new Web3(web3.currentProvider);
} else {
console.log('No web3? You should consider trying MetaMask!');
// fallback - use your fallback strategy (local node / hosted node + in-dapp id mgmt / fail)
web3js = new Web3(new Web3.providers.HttpProvider('http://localhost:8545'));
}