Documentation ¶
Index ¶
- Variables
- type ERC20
- func (e *ERC20) Address() string
- func (e ERC20) ChainID() string
- func (e *ERC20) GetAssetClass() common.AssetClass
- func (e *ERC20) IsValid() bool
- func (e *ERC20) ProtoAsset() *typespb.Asset
- func (e *ERC20) SetChainID(chainID string)
- func (e *ERC20) SetEnabled()
- func (e *ERC20) SetPendingListing()
- func (e *ERC20) SetRejected()
- func (e *ERC20) SetValid()
- func (e *ERC20) SignListAsset() (msg []byte, sig []byte, err error)
- func (e *ERC20) SignSetAssetLimits(nonce *num.Uint, lifetimeLimit *num.Uint, withdrawThreshold *num.Uint) (msg []byte, sig []byte, err error)
- func (e *ERC20) SignWithdrawal(amount *num.Uint, ethPartyAddress string, withdrawRef *big.Int, now time.Time) (msg []byte, sig []byte, err error)
- func (e *ERC20) String() string
- func (e ERC20) Type() *types.Asset
- func (e *ERC20) Update(updatedAsset *types.Asset)
- type ETHClient
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotAnErc20Asset = errors.New("not an erc20 asset")
Functions ¶
This section is empty.
Types ¶
type ERC20 ¶
type ERC20 struct {
// contains filtered or unexported fields
}
func New ¶
func New( id string, asset *types.AssetDetails, w ethnw.EthereumWallet, ethClient ETHClient, ) (*ERC20, error)
func (*ERC20) GetAssetClass ¶
func (e *ERC20) GetAssetClass() common.AssetClass
func (*ERC20) ProtoAsset ¶
func (*ERC20) SetChainID ¶ added in v0.76.0
SetChainID sets the chain-id on the ERC20. This should only be used during the migration from 0.75.
func (*ERC20) SetEnabled ¶
func (e *ERC20) SetEnabled()
func (*ERC20) SetPendingListing ¶
func (e *ERC20) SetPendingListing()
func (*ERC20) SetRejected ¶
func (e *ERC20) SetRejected()
func (*ERC20) SignListAsset ¶
SignListAsset create and sign the message to be sent to the bridge to whitelist the asset return the generated message and the signature for this message.
func (*ERC20) SignSetAssetLimits ¶
func (*ERC20) SignWithdrawal ¶
type ETHClient ¶
type ETHClient interface { bind.ContractBackend HeaderByNumber(context.Context, *big.Int) (*ethtypes.Header, error) CollateralBridgeAddress() ethcommon.Address CurrentHeight(context.Context) (uint64, error) ConfirmationsRequired() uint64 ChainID(ctx context.Context) (*big.Int, error) IsEthereum() bool }
Click to show internal directories.
Click to hide internal directories.