Skip to content

Instantly share code, notes, and snippets.

@johnX9 johnX9/Marketplace.cpp
Last active Aug 1, 2018

Embed
What would you like to do?
# Create asset
# asset({amount}, string_to_symbol({precision}, {symbol}));
asset productPrice = asset(product.price, string_to_symbol(4, "OAS"));
# Do inline trasfer
# action({permission_level}, {contract_deployer}, {contract_action}, {data_to_pass}).send();
action(vector<permission_level>(), N(anorak), N(transfer), make_tuple(buyer, _self, productPrice, string(""))).send();
# Execute action from another contract
# action({permission_level}, {contract_deployer}, {contract_action}, {data_to_pass}).send();
action(vector<permission_level>(), N(market), N(additem), make_tuple(buyer,
product.product_id,
product.name,
product.power,
product.health,
product.ability,
product.level_up
)).send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.