Created
June 14, 2018 22:53
-
-
Save johnX9/f1f39467547b2a49478ceafb28061f7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Magic ball | |
cleos push action market add '{"account":"market","newProduct":{"product_id":1,"name":"magic ball","power":120,"health":10,"ability":"see the future","level_up":3,"quantity":10,"price":150}}' -p market@active | |
executed transaction: effdd4505745f336170dfdd1ab0e4579b7b578fada0273617de1c8204c042208 176 bytes 542 us | |
# market <= market::add {"account":"market","newProduct":{"product_id":1,"name":"magic ball","power":120,"health":10,"abilit... | |
cleos push action market getbyid '[1]' -p market | |
executed transaction: bd10a266a494919a578bc00cbaa73e0bbed52ad5d072fcca7b52d687c24e9367 104 bytes 618 us | |
# market <= market::getbyid {"productId":1} | |
>> Id: 1 | Name: magic ball | Power: 120 | Health: 10 | Ability: see the future | Level up: 3 | Quantity: 10 | Price: 150 | |
# Elf's potion | |
cleos push action market add '{"account":"market","newProduct":{"product_id":2,"name":"elf’s potion","power":50,"health":300,"ability":"heal fast","level_up":0,"quantity":4,"price":350}}' -p market@active | |
executed transaction: ce5b3b104736f9a6940c322587adafc73d283d6ce6dca68b93f68a47f8c4f8af 176 bytes 493 us | |
# market <= market::add {"account":"market","newProduct":{"product_id":2,"name":"elf’s potion","power":50,"health":300,"ab... | |
# Update potion quantity to 6 | |
cleos push action market update '["market",2,2]' -p market | |
executed transaction: f6403545df115ff32018b96f2cc26458d4241979dcb71d261c5e9fdcdb93a8da 120 bytes 546 us | |
# market <= market::update {"account":"market","product_id":2,"quantity":2} | |
cleos push action market getbyid '[2]' -p market | |
executed transaction: 5fee346b1724b79313cbfb1c440967ed03f29cb349ae550a49c2815aadccb410 104 bytes 494 us | |
# market <= market::getbyid {"productId":2} | |
>> Id: 2 | Name: elf’s potion | Power: 50 | Health: 300 | Ability: heal fast | Level up: 0 | Quantity: 6 | Price: 350 | |
# Orb of Osuvox | |
cleos push action market add '{"account":"market","newProduct":{"product_id":3,"name":"Orb of Osuvox","power":5000,"health":300,"ability":"","level_up":0,"quantity":1,"price":3250}}' -p market@active | |
executed transaction: 214256d25856875c7e7fd6c1fb07e429ddf792480f38e7ee1a70a77ca86a35b0 168 bytes 518 us | |
# market <= market::add {"account":"market","newProduct":{"product_id":3,"name":"Orb of Osuvox","power":5000,"health":300,"a... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great article. You forgot adding this embed tho;