Environment
The environment information is accessed using mainly two APIs:
- Runtime
Runtime
Following are the runtime specific functions provided by the SDK accessed by Runtime::
API | Description |
---|---|
fn get_contract_id() -> String | Provides the contract address of the executing contract |
fn get_sender() -> String | Provides the sender address. This can be either client Wallet address or contract address in case of cross-contract call |
fn call_contract(contract_id: String, method_name: String, method_args: Option<String>) -> anyhow::Result<R> | This is used to make a cross-contract call to other contracts. More details are given in next section |