https://docs.multiversx.com/developers/developer-reference/sc-contract-calls/#proxies-from-contracts
Constants
ONE_EGLD
: The amount in EGLD used for participation in the lottery, consistent with the main lottery contract.
Proxy Trait
LotteryProxy
- This trait includes methods to facilitate interactions with the lottery contract, such as participating in the lottery and invoking the winner drawing mechanism.
Functions
lottery_contract_proxy(lottery_sc_address) -> lottery::Proxy
- Creates a proxy instance to interact with the lottery contract at the specified address.
participate(lottery_sc_address)
- Enables participation in the lottery by sending
ONE_EGLD
to the lottery contract's address.
draw_winner_endpoint(lottery_sc_address, amount)
- Triggers the winner drawing function in the lottery contract, along with the transfer of an EGLD amount.
fund_lottery(lottery_sc_address, amount)
- A function to fund the lottery with a specified amount of EGLD.