SynapseBridge
Methods
DEFAULT_ADMIN_ROLE
Returns
GOVERNANCE_ROLE
Returns
NODEGROUP_ROLE
Returns
WETH_ADDRESS
Returns
addKappas
Parameters
bridgeVersion
Returns
chainGasAmount
Returns
deposit
Relays to nodes to transfers an ERC20 token cross-chain
Parameters
depositAndSwap
Relays to nodes to both transfer an ERC20 token cross-chain, and then have the nodes execute a swap through a liquidity pool on behalf of the user.
Parameters
getFeeBalance
Parameters
Returns
getRoleAdmin
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Parameters
Returns
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
Returns
getRoleMemberCount
Returns the number of accounts that have role
. Can be used together with {getRoleMember} to enumerate all bearers of a role.
Parameters
Returns
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
hasRole
Returns true
if account
has been granted role
.
Parameters
Returns
initialize
kappaExists
Parameters
Returns
mint
Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to). This is called by the nodes after a TokenDeposit event is emitted.
This means the SynapseBridge.sol contract must have minter access to the token attempting to be minted
Parameters
mintAndSwap
Nodes call this function to mint a SynERC20 (or any asset that the bridge is given minter access to), and then attempt to swap the SynERC20 into the desired destination asset. This is called by the nodes after a TokenDepositAndSwap event is emitted.
This means the BridgeDeposit.sol contract must have minter access to the token attempting to be minted
Parameters
pause
paused
Returns true if the contract is paused, and false otherwise.
Returns
redeem
Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain
Parameters
redeemAndRemove
Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g "swap" out of the LP token)
Parameters
redeemAndSwap
Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain. This function indicates to the nodes that they should attempt to redeem the LP token for the underlying assets (E.g "swap" out of the LP token)
Parameters
redeemV2
Relays to nodes that (typically) a wrapped synAsset ERC20 token has been burned and the underlying needs to be redeeemed on the native chain
Parameters
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
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
setChainGasAmount
Parameters
setWethAddress
Parameters
startBlockNumber
Returns
unpause
withdraw
Function to be called by the node group to withdraw the underlying assets from the contract
Parameters
withdrawAndRemove
Function to be called by the node group to withdraw the underlying assets from the contract
Parameters
withdrawFees
withdraw specified ERC20 token fees to a given address
Parameters
Events
Paused
Parameters
RoleAdminChanged
Parameters
RoleGranted
Parameters
RoleRevoked
Parameters
TokenDeposit
Parameters
TokenDepositAndSwap
Parameters
TokenMint
Parameters
TokenMintAndSwap
Parameters
TokenRedeem
Parameters
TokenRedeemAndRemove
Parameters
TokenRedeemAndSwap
Parameters
TokenRedeemV2
Parameters
TokenWithdraw
Parameters
TokenWithdrawAndRemove
Parameters
Unpaused
Parameters
Last updated