[#496] pkg/innerring: provide wrappers to processors

The only thing we need hashes for is to process notifications.
Balance contract if left for now, as it has some initialization.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-05-31 14:50:11 +03:00 committed by Alex Vanin
parent 9b87e6267d
commit 8a2b7f4501
24 changed files with 215 additions and 228 deletions

View file

@ -29,12 +29,18 @@ type Option func(*cfg)
type cfg struct {
transferXMethod, // transferX method name for invocation
mintMethod,
burnMethod,
lockMethod,
balanceOfMethod, // balanceOf method name for invocation
decimalsMethod string // decimals method name for invocation
}
const (
defaultTransferXMethod = "transferX" // default "transferX" method name
defaultMintMethod = "mint" // default "mint" method name
defaultBurnMethod = "burn" // default "burn" method name
defaultLockMethod = "lock" // default "lock" method name
defaultBalanceOfMethod = "balanceOf" // default "balance of" method name
defaultDecimalsMethod = "decimals" // default decimals method name
)
@ -42,6 +48,9 @@ const (
func defaultConfig() *cfg {
return &cfg{
transferXMethod: defaultTransferXMethod,
mintMethod: defaultMintMethod,
burnMethod: defaultBurnMethod,
lockMethod: defaultLockMethod,
balanceOfMethod: defaultBalanceOfMethod,
decimalsMethod: defaultDecimalsMethod,
}