banking

package
v0.73.0-preview.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2023 License: AGPL-3.0 Imports: 27 Imported by: 0

README

banking

This package provide an engine which is an abstraction on top of the Collateral engined and the External Resource checker.

One method will be provided for each type of ChainEvent dealing with Collateral and for each asset supported, as of now:

  • Asset_Allowlisted
  • Asset_Deposited
  • Asset_Withdrawn

Once one of these methods called, the banking will setup into the external resource checker some validation to be done, e.g: Asset_Deposited validation for an erc20 token requires to look at the eth event logs to confirm that the deposit really did happen.

After the validation is confirmed, the engine will finalize the processing of the ChainEvent by calling the appropriate function on the Collateral engine.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRecurringTransferDoesNotExists             = errors.New("recurring transfer does not exists")
	ErrCannotCancelOtherPartiesRecurringTransfers = errors.New("cannot cancel other parties recurring transfers")
)
View Source
var (
	ErrWrongAssetTypeUsedInBuiltinAssetChainEvent = errors.New("non builtin asset used for builtin asset chain event")
	ErrWrongAssetTypeUsedInERC20ChainEvent        = errors.New("non ERC20 for ERC20 chain event")
	ErrWrongAssetUsedForERC20Withdraw             = errors.New("non erc20 asset used for lock withdraw")
	ErrInvalidWithdrawalState                     = errors.New("invalid withdrawal state")
	ErrNotMatchingWithdrawalForReference          = errors.New("invalid reference for withdrawal chain event")
	ErrWithdrawalNotReady                         = errors.New("withdrawal not ready")
	ErrNotEnoughFundsToTransfer                   =