Smart Contract | Access Control
The access control of your contract is an important concept that governs many features provided by your smart contract.
Ownership
Get smart contract owner.
curl -X GET "http://0.0.0.0:7000/nftkit/nft/accessControl/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/owner"Transfer ownership of the contract to a new account.
curl -X POST "http://0.0.0.0:7000/nftkit/nft/accessControl/chain/MUMBAI/contract/0xf277BE034881eE38A9b270E5b6C5c6f333Af2517/ownershipTransfer" \
-H "Content-Type: application/json" \
-d '{"account":"0x8448Ff4b2733b52f62d81ca46d64bD16786299Cd"}'{
"account": "string"
}Renounce ownership of the smart contract.
Role-Based Access Control
Verify if an account has been granted role
As we have a role hierarchy, You can use this API to get role admin that controls a sub role.
Grant role to account. The caller must have role's admin role.
Revoke role to account. The caller must have role's admin role.
Renounce role from the calling account.
Last updated
Was this helpful?
