mirror of
https://github.com/grassrootseconomics/cic-custodial.git
synced 2024-11-22 06:16:45 +01:00
refactor: pgx supports big.Int type conversion internally
This commit is contained in:
parent
e67a42ede3
commit
82294b96f8
@ -2,6 +2,7 @@ package store
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"math/big"
|
||||||
|
|
||||||
"github.com/grassrootseconomics/cic-custodial/pkg/enum"
|
"github.com/grassrootseconomics/cic-custodial/pkg/enum"
|
||||||
)
|
)
|
||||||
@ -26,7 +27,7 @@ type (
|
|||||||
Data string
|
Data string
|
||||||
GasLimit uint64
|
GasLimit uint64
|
||||||
TransferValue uint64
|
TransferValue uint64
|
||||||
GasPrice uint64
|
GasPrice *big.Int
|
||||||
Nonce uint64
|
Nonce uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ func AccountRefillGasProcessor(cu *custodial.Custodial) func(context.Context, *a
|
|||||||
TxHash: builtTx.Hash().Hex(),
|
TxHash: builtTx.Hash().Hex(),
|
||||||
From: cu.SystemPublicKey,
|
From: cu.SystemPublicKey,
|
||||||
Data: hexutil.Encode(builtTx.Data()),
|
Data: hexutil.Encode(builtTx.Data()),
|
||||||
GasPrice: builtTx.GasPrice().Uint64(),
|
GasPrice: builtTx.GasPrice(),
|
||||||
GasLimit: builtTx.Gas(),
|
GasLimit: builtTx.Gas(),
|
||||||
Nonce: builtTx.Nonce(),
|
Nonce: builtTx.Nonce(),
|
||||||
})
|
})
|
||||||
|
@ -89,7 +89,7 @@ func AccountRegisterOnChainProcessor(cu *custodial.Custodial) func(context.Conte
|
|||||||
TxHash: builtTx.Hash().Hex(),
|
TxHash: builtTx.Hash().Hex(),
|
||||||
From: cu.SystemPublicKey,
|
From: cu.SystemPublicKey,
|
||||||
Data: hexutil.Encode(builtTx.Data()),
|
Data: hexutil.Encode(builtTx.Data()),
|
||||||
GasPrice: builtTx.GasPrice().Uint64(),
|
GasPrice: builtTx.GasPrice(),
|
||||||
GasLimit: builtTx.Gas(),
|
GasLimit: builtTx.Gas(),
|
||||||
Nonce: builtTx.Nonce(),
|
Nonce: builtTx.Nonce(),
|
||||||
})
|
})
|
||||||
|
@ -96,7 +96,7 @@ func SignTransfer(cu *custodial.Custodial) func(context.Context, *asynq.Task) er
|
|||||||
TxHash: builtTx.Hash().Hex(),
|
TxHash: builtTx.Hash().Hex(),
|
||||||
From: payload.From,
|
From: payload.From,
|
||||||
Data: hexutil.Encode(builtTx.Data()),
|
Data: hexutil.Encode(builtTx.Data()),
|
||||||
GasPrice: builtTx.GasPrice().Uint64(),
|
GasPrice: builtTx.GasPrice(),
|
||||||
GasLimit: builtTx.Gas(),
|
GasLimit: builtTx.Gas(),
|
||||||
TransferValue: payload.Amount,
|
TransferValue: payload.Amount,
|
||||||
Nonce: builtTx.Nonce(),
|
Nonce: builtTx.Nonce(),
|
||||||
|
Loading…
Reference in New Issue
Block a user