signer/core: move API JSON types to separate package (#23275)

This PR moves (some) account types into a standalone package, to avoid
depending on signer/core from accounts/external.
This commit is contained in:
Martin Holst Swende
2021-07-29 16:06:44 +02:00
committed by GitHub
parent 8f11d279d2
commit 295bc35ecf
12 changed files with 52 additions and 46 deletions

View File

@ -35,6 +35,7 @@ import (
"github.com/ethereum/go-ethereum/internal/ethapi"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/signer/core"
"github.com/ethereum/go-ethereum/signer/core/apitypes"
"github.com/ethereum/go-ethereum/signer/fourbyte"
"github.com/ethereum/go-ethereum/signer/storage"
)
@ -223,14 +224,14 @@ func TestNewAcc(t *testing.T) {
}
}
func mkTestTx(from common.MixedcaseAddress) core.SendTxArgs {
func mkTestTx(from common.MixedcaseAddress) apitypes.SendTxArgs {
to := common.NewMixedcaseAddress(common.HexToAddress("0x1337"))
gas := hexutil.Uint64(21000)
gasPrice := (hexutil.Big)(*big.NewInt(2000000000))
value := (hexutil.Big)(*big.NewInt(1e18))
nonce := (hexutil.Uint64)(0)
data := hexutil.Bytes(common.Hex2Bytes("01020304050607080a"))
tx := core.SendTxArgs{
tx := apitypes.SendTxArgs{
From: from,
To: &to,
Gas: gas,