How to prepare the Executor for use
Last updated
Was this helpful?
Last updated
Was this helpful?
Since in the SDK a special address is created to send transactions to the Bitkub Chain on behalf of the Executor, so in order to limit the Address Executor to send tx to the contract within its own project (env) it is necessary to add a modifier for Check the permissions of tx.origin.
Add Executor generated from BKC Console to contract ExecutorEnv [] with function addExecutorForUser
with variable (Executor address, EnvId)
The address that has the authority to send tx to the contract within the project (env) can be checked with the function isExecutor
with the variable (Executor address, EnvId)
.
Add a modifier within the logic contract for functions that need to restrict addresses to be invoked.