NodeEnv
Synapse Authors
NodeEnv contract
This contract implements a key-value store for storing variables on which synapse nodes must coordinate methods are purposely arbitrary to allow these fields to be defined in synapse improvement proposals.This token is used for configuring different tokens on the bridge and mapping them across chains.*
Methods
BRIDGEMANAGER_ROLE
Returns
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
DEFAULT_ADMIN_ROLE
Returns
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
get
gets the value associated with the key
Parameters
Name | Type | Description |
---|---|---|
_key | string | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | string | undefined |
getRoleAdmin
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
getRoleMember
Returns one of the accounts that have role
. index
must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
index | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
getRoleMemberCount
Returns the number of accounts that have role
. Can be used together with {getRoleMember} to enumerate all bearers of a role.
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
grantRole
Grants role
to account
. If account
had not been already granted role
, emits a {RoleGranted} event. Requirements: - the caller must have role
's admin role.
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
hasRole
Returns true
if account
has been granted role
.
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
keyCount
get the length of the config
this is useful for enumerating through all keys in the env
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
keyValueByIndex
gets the key/value pair by it's index Requirements: - index
must be strictly less than {length}.
Parameters
Name | Type | Description |
---|---|---|
index | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | string | undefined |
_1 | string | undefined |
renounceRole
Revokes role
from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must be account
.
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
revokeRole
Revokes role
from account
. If account
had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must have role
's admin role.
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
set
sets the key
caller must have bridge manager role
Parameters
Name | Type | Description |
---|---|---|
_key | string | undefined |
_value | string | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
Events
ConfigUpdate
Parameters
Name | Type | Description |
---|---|---|
key | string | undefined |
RoleAdminChanged
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
previousAdminRole | bytes32 | undefined |
newAdminRole | bytes32 | undefined |
RoleGranted
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
sender | address | undefined |
RoleRevoked
Parameters
Name | Type | Description |
---|---|---|
role | bytes32 | undefined |
account | address | undefined |
sender | address | undefined |
Last updated