Grant Authority

Introduction

Grant Authority (grantAuthority): Grant a specific permission role to an address.

Parameters

Request Parameters:

Parameter NameTypeDescription
jsonrpcstringFixed value:2.0
methodstringMethod name. Fixed value: grantAuthority
tokenstringToken address
nonceintNonce
recentCheckpointintBlock height
methodArgsarrayDynamic contract parameters:
Param1 = MINT_ROLE,BURN_ROLE,PAUSE_ROLE,BLACKLIST_ROLE
Param2 = hash
signatureobjectSignature result

Request Example:

{
    "jsonrpc": "2.0",
    "method": "grantAuthority",
    "params": {
        "nonce": 3,
        "token": "0x...",
        "methodArgs": [
            "MINT_ROLE", //Authorization permissions
            "0x1234567890123456789012345678901234567890" //Authorized hash
        ],
        "recentCheckpoint": 12348,
        "signature": {
            "r": "string",
            "s": "string",
            "v": "string"
        }
    },
    "id": 1
}

Response Parameters:

Parameter NameTypeDescription
hashstringTransaction hash

Response Example:

{
    "jsonrpc": "2.0",
    "result": {
        "hash": "0x..."
    },
    "id": 1
}


Did this page help you?