|
|
@ -1,17 +1,17 @@ |
|
|
|
package node |
|
|
|
package node |
|
|
|
|
|
|
|
|
|
|
|
import ( |
|
|
|
import ( |
|
|
|
"crypto/ecdsa" |
|
|
|
"crypto/ecdsa" |
|
|
|
"encoding/hex" |
|
|
|
"encoding/hex" |
|
|
|
"math/big" |
|
|
|
"math/big" |
|
|
|
|
|
|
|
"strconv" |
|
|
|
"strings" |
|
|
|
"strings" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
"github.com/ethereum/go-ethereum/common" |
|
|
|
"github.com/ethereum/go-ethereum/crypto" |
|
|
|
"github.com/ethereum/go-ethereum/crypto" |
|
|
|
"github.com/ethereum/go-ethereum/log" |
|
|
|
"github.com/ethereum/go-ethereum/log" |
|
|
|
"github.com/ethereum/go-ethereum/params" |
|
|
|
"github.com/ethereum/go-ethereum/params" |
|
|
|
"github.com/harmony-one/harmony/core/types" |
|
|
|
"github.com/harmony-one/harmony/core/types" |
|
|
|
"github.com/harmony-one/harmony/internal/utils/contract" |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
//AddDepositContractToPendingTransactions adds the deposit smart contract the genesis block.
|
|
|
|
//AddDepositContractToPendingTransactions adds the deposit smart contract the genesis block.
|
|
|
@ -64,4 +64,4 @@ func (node *Node) CreateStakingWithdrawTransaction(stake int) (*types.Transactio |
|
|
|
dataEnc := common.FromHex(contractData) |
|
|
|
dataEnc := common.FromHex(contractData) |
|
|
|
tx, err := types.SignTx(types.NewTransaction(nonce, DepositContractAddress, node.Consensus.ShardID, big.NewInt(0), params.TxGasContractCreation*10, nil, dataEnc), types.HomesteadSigner{}, node.AccountKey) |
|
|
|
tx, err := types.SignTx(types.NewTransaction(nonce, DepositContractAddress, node.Consensus.ShardID, big.NewInt(0), params.TxGasContractCreation*10, nil, dataEnc), types.HomesteadSigner{}, node.AccountKey) |
|
|
|
return tx, err |
|
|
|
return tx, err |
|
|
|
} |
|
|
|
} |
|
|
|