Documentation
¶
Index ¶
- Constants
- Variables
- func DeployMintableSrc20(client *Client, src20Handler common.Address, cy string) (common.Address, error)
- func GenTransactor(kp *secp256k1.Keypair) *bind.TransactOpts
- func GetDepositNonce(client *Client, bridge seroCommon.Address, chain types.ChainId) (uint64, error)
- func IsActive(status uint8) bool
- func IsExecuted(status uint8) bool
- func IsPassed(status uint8) bool
- func RegisterResource(client *Client, bridge, handler seroCommon.Address, rId types.ResourceId, ...) error
- func SetResoruceTokenAddress(client *Client, bridge, handler seroCommon.Address, rId types.ResourceId, ...) error
- func WaitForTx(client *Client, tx *serotypes.Transaction) error
- type Client
- type DeployedContracts
- type EventSig
- type ProposalStatus
Constants ¶
View Source
const DefaultGasLimit = 6721975
View Source
const DefaultMaxGasPrice = 20000000000
Variables ¶
View Source
var ( RelayerAddresses = []seroCommon.Address{ common.GenCommonAddress(keystore.TestKeyRing.EthereumKeys[keystore.AliceKey]), common.GenCommonAddress(keystore.TestKeyRing.EthereumKeys[keystore.BobKey]), common.GenCommonAddress(keystore.TestKeyRing.EthereumKeys[keystore.CharlieKey]), common.GenCommonAddress(keystore.TestKeyRing.EthereumKeys[keystore.DaveKey]), common.GenCommonAddress(keystore.TestKeyRing.EthereumKeys[keystore.EveKey]), } ZeroAddress = seroCommon.Address{} )
View Source
var ExpectedBlockTime = time.Second
View Source
var Max, _ = new(big.Int).SetString("100000000000000000000000000000", 10)
Functions ¶
func DeployMintableSrc20 ¶
func DeployMintableSrc20(client *Client, src20Handler common.Address, cy string) (common.Address, error)
DeployMintAndApprove deploys a new erc20 contract, mints to the deployer, and approves the erc20 handler to transfer those token.
func GenTransactor ¶
func GenTransactor(kp *secp256k1.Keypair) *bind.TransactOpts
func GetDepositNonce ¶
func IsExecuted ¶
func RegisterResource ¶
func RegisterResource(client *Client, bridge, handler seroCommon.Address, rId types.ResourceId, cy string, min *big.Int) error
func SetResoruceTokenAddress ¶
func SetResoruceTokenAddress(client *Client, bridge, handler seroCommon.Address, rId types.ResourceId, addr seroCommon.Address) error
Types ¶
type Client ¶
type Client struct { Client *sero.WrappedClient Opts *bind.TransactOpts CallOpts *bind.CallOpts // contains filtered or unexported fields }
type DeployedContracts ¶
type DeployedContracts struct { BridgeAddress seroCommon.Address SRC20HandlerAddress seroCommon.Address SignatureColletorContact seroCommon.Address }
func DeployContracts ¶
func DeployContracts(client *Client, chainID uint8, initialRelayerThreshold *big.Int) (*DeployedContracts, error)
DeployContracts deploys Bridge, Relayer, ERC20Handler, ERC721Handler and CentrifugeAssetHandler and returns the addresses
type ProposalStatus ¶
type ProposalStatus int
const ( Inactive ProposalStatus = iota Active Passed Executed Cancelled )
Click to show internal directories.
Click to hide internal directories.