mirror of
https://github.com/grassrootseconomics/cic-custodial.git
synced 2026-05-27 13:37:56 +02:00
@@ -147,12 +147,7 @@ func GiftTokenProcessor(
|
||||
return err
|
||||
}
|
||||
|
||||
abi, err := w3.NewFunc("mint(address,uint256)", "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
input, err := abi.EncodeArgs(publicKey, system.GiftableTokenValue)
|
||||
input, err := system.Abis["mint"].EncodeArgs(publicKey, system.GiftableTokenValue)
|
||||
if err != nil {
|
||||
return fmt.Errorf("ABI encode failed %v: %w", err, asynq.SkipRetry)
|
||||
}
|
||||
|
||||
@@ -55,12 +55,7 @@ func TransferToken(
|
||||
return err
|
||||
}
|
||||
|
||||
abi, err := w3.NewFunc("transfer(address,uint256)", "bool")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
input, err := abi.EncodeArgs(w3.A(p.To), parseTransferValue(p.Amount, system.TokenDecimals))
|
||||
input, err := system.Abis["transfer"].EncodeArgs(w3.A(p.To), parseTransferValue(p.Amount, system.TokenDecimals))
|
||||
if err != nil {
|
||||
return fmt.Errorf("ABI encode failed %v: %w", err, asynq.SkipRetry)
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/celo-org/celo-blockchain/common"
|
||||
"github.com/grassrootseconomics/w3-celo-patch"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -15,6 +16,7 @@ type (
|
||||
)
|
||||
|
||||
type SystemContainer struct {
|
||||
Abis map[string]*w3.Func
|
||||
GasRefillThreshold *big.Int
|
||||
GasRefillValue *big.Int
|
||||
GiftableGasValue *big.Int
|
||||
|
||||
Reference in New Issue
Block a user