Do you have some example that shows how to design an action for a smart contract that when the user sends a REDEEMCODE action the smart contract will transfer some quantity of a custom token for the user?

The important point here is: The smart contract needs to do it automatically. The user calls the contract action, insert the REDEEMCODE and automatically the contract will transfer an amount of a custom token to this user.

Thanks a lot.

1 Answer 1


You probably want to take a look at the following three posts:

Inline-Actions, Inline-transfer1, Inline-transfer2

But the bigger problem will probably be the Redeemcode-logic. If you want to have a condition verifying that a redeemcode is valid, you will need to store a copy of the redeemcode or a hash of a redeemcode on-chain, in a table, where it's visible to the public and everyone can read it. It will not take long until people try to game the system, writing bots to find the redeemcodes programmatically and extruding the value from the system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.