Skip to content

Commit 689d1db

Browse files
committed
format
Signed-off-by: Soumya Ghosh Dastidar <[email protected]>
1 parent a9df6cd commit 689d1db

File tree

5 files changed

+5
-15
lines changed

5 files changed

+5
-15
lines changed

api/account/account.go

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"context"
88

99
"github.com/renproject/id"
10-
1110
"github.com/renproject/multichain/api/address"
1211
"github.com/renproject/multichain/api/contract"
1312
"github.com/renproject/pack"

chain/cosmos/tx.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ import (
66
"fmt"
77
"math/big"
88

9-
"github.com/renproject/id"
10-
"github.com/renproject/surge"
11-
129
"github.com/btcsuite/btcd/btcec"
1310
"github.com/cosmos/cosmos-sdk/client"
1411
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
@@ -18,11 +15,13 @@ import (
1815
authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing"
1916
"github.com/cosmos/cosmos-sdk/x/auth/tx"
2017
bankType "github.com/cosmos/cosmos-sdk/x/bank/types"
18+
"github.com/renproject/id"
2119
"github.com/renproject/multichain"
2220
"github.com/renproject/multichain/api/account"
2321
"github.com/renproject/multichain/api/address"
2422
"github.com/renproject/multichain/api/contract"
2523
"github.com/renproject/pack"
24+
"github.com/renproject/surge"
2625
"github.com/tendermint/tendermint/crypto/tmhash"
2726
)
2827

@@ -78,8 +77,6 @@ func (builder txBuilder) WithSignMode(signMode int32) txBuilder {
7877
// This transaction is unsigned, and must be signed before submitting to the
7978
// cosmos chain.
8079
func (builder txBuilder) BuildTx(ctx context.Context, fromPubKey *id.PubKey, to address.Address, value, nonce, gasLimit, gasPrice, gasCap pack.U256, payload pack.Bytes) (account.Tx, error) {
81-
// We assume the "from" address is a public key as it is required for
82-
// setting the signature.
8380
pubKeyBytes, err := surge.ToBinary(fromPubKey)
8481
if err != nil {
8582
return nil, err

chain/ethereum/tx.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ import (
55
"fmt"
66
"math/big"
77

8-
"github.com/renproject/id"
9-
108
"github.com/ethereum/go-ethereum/common"
119
"github.com/ethereum/go-ethereum/core/types"
10+
"github.com/renproject/id"
1211
"github.com/renproject/multichain/api/account"
1312
"github.com/renproject/multichain/api/address"
1413
"github.com/renproject/multichain/chain/evm"
@@ -29,9 +28,6 @@ func NewTxBuilder(chainID *big.Int) TxBuilder {
2928

3029
// BuildTx receives transaction fields and constructs a new transaction.
3130
func (txBuilder TxBuilder) BuildTx(ctx context.Context, fromPubKey *id.PubKey, to address.Address, value, nonce, gas, gasTipCap, gasFeeCap pack.U256, payload pack.Bytes) (account.Tx, error) {
32-
33-
//_ = multichain.Address(crypto.PubkeyToAddress(ecdsa.PublicKey(fromPubKey)).Hex())
34-
3531
toAddr, err := NewAddressFromHex(string(pack.String(to)))
3632
if err != nil {
3733
return nil, fmt.Errorf("bad to address '%v': %v", to, err)

chain/evm/tx.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ import (
55
"fmt"
66
"math/big"
77

8-
"github.com/renproject/id"
9-
108
"github.com/ethereum/go-ethereum/common"
119
"github.com/ethereum/go-ethereum/core/types"
10+
"github.com/renproject/id"
1211
"github.com/renproject/multichain/api/account"
1312
"github.com/renproject/multichain/api/address"
1413
"github.com/renproject/multichain/api/contract"

chain/filecoin/account.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ import (
66
"crypto/ecdsa"
77
"fmt"
88

9-
"github.com/renproject/id"
10-
119
eth_crypto "github.com/ethereum/go-ethereum/crypto"
1210
filaddress "github.com/filecoin-project/go-address"
1311
"github.com/filecoin-project/go-state-types/abi"
1412
"github.com/filecoin-project/go-state-types/big"
1513
"github.com/filecoin-project/go-state-types/crypto"
1614
"github.com/filecoin-project/lotus/chain/types"
1715
"github.com/minio/blake2b-simd"
16+
"github.com/renproject/id"
1817
"github.com/renproject/multichain/api/account"
1918
"github.com/renproject/multichain/api/address"
2019
"github.com/renproject/multichain/api/contract"

0 commit comments

Comments
 (0)