sayHello()method to demonstrate the same.
printf()method can only be used for debugging. A more realistic smart contract would need to implement many more complex features.
createRedEnvlope: To create a new red envelope
queryEnvlope: Query existing red envelope details
claimEnvlope: To claim a red envelope
structtype data before storage.
self_address()method can be used to fetch the address of the invocation. The amount of token imported to the contract is based on the token type input by the user.
claimEnvlope()method is the only way to move an asset out of this contract. Hence, we establish that the assets stored in the contract are safe.