How to prepare the Executor for use

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.

  1. Add Executor generated from BKC Console to contract ExecutorEnv [your generated executor address] with function addExecutorForUser with variable (Executor address, EnvId)

Beta Testnet Only, after this, will be Auto added, and the User cannot add manually

  1. 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).

  1. Add a modifier within the logic contract for functions that need to restrict addresses to be invoked.

Last updated