2020-10-12 08:39:33 +00:00
|
|
|
package commands
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"fmt"
|
2020-10-24 17:03:52 +00:00
|
|
|
|
|
|
|
"github.com/ledgerwatch/turbo-geth/common"
|
|
|
|
"github.com/ledgerwatch/turbo-geth/common/hexutil"
|
2020-10-12 08:39:33 +00:00
|
|
|
)
|
|
|
|
|
2020-10-24 17:03:52 +00:00
|
|
|
// GetCompilers implements eth_getCompilers. Returns a list of available compilers in the client.
|
|
|
|
// Deprecated: This function will be removed in the future.
|
|
|
|
func (api *APIImpl) GetCompilers(_ context.Context) ([]string, error) {
|
|
|
|
return []string{}, fmt.Errorf(NotAvailableDeprecated, "eth_getCompilers")
|
2020-10-12 08:39:33 +00:00
|
|
|
}
|
|
|
|
|
2020-10-24 17:03:52 +00:00
|
|
|
// CompileLLL implements eth_compileLLL. Returns compiled LLL code.
|
|
|
|
// Deprecated: This function will be removed in the future.
|
|
|
|
func (api *APIImpl) CompileLLL(_ context.Context, _ string) (hexutil.Bytes, error) {
|
|
|
|
return hexutil.Bytes(""), fmt.Errorf(NotAvailableDeprecated, "eth_compileLLL")
|
2020-10-12 08:39:33 +00:00
|
|
|
}
|
|
|
|
|
2020-10-24 17:03:52 +00:00
|
|
|
// CompileSolidity implements eth_compileSolidity. Returns compiled solidity code.
|
|
|
|
// Deprecated: This function will be removed in the future.
|
|
|
|
func (api *APIImpl) CompileSolidity(ctx context.Context, _ string) (hexutil.Bytes, error) {
|
|
|
|
return hexutil.Bytes(""), fmt.Errorf(NotAvailableDeprecated, "eth_compileSolidity")
|
2020-10-12 08:39:33 +00:00
|
|
|
}
|
|
|
|
|
2020-10-24 17:03:52 +00:00
|
|
|
// CompileSerpent implements eth_compileSerpent. Returns compiled serpent code.
|
|
|
|
// Deprecated: This function will be removed in the future.
|
|
|
|
func (api *APIImpl) CompileSerpent(ctx context.Context, _ string) (hexutil.Bytes, error) {
|
|
|
|
return hexutil.Bytes(""), fmt.Errorf(NotAvailableDeprecated, "eth_compileSerpent")
|
2020-10-12 08:39:33 +00:00
|
|
|
}
|
|
|
|
|
2020-10-24 17:03:52 +00:00
|
|
|
// Accounts implements eth_accounts. Returns a list of addresses owned by the client.
|
|
|
|
// Deprecated: This function will be removed in the future.
|
|
|
|
func (api *APIImpl) Accounts(ctx context.Context) ([]common.Address, error) {
|
|
|
|
return []common.Address{}, fmt.Errorf(NotAvailableDeprecated, "eth_accounts")
|
2020-10-12 08:39:33 +00:00
|
|
|
}
|
|
|
|
|
2020-10-24 17:03:52 +00:00
|
|
|
// Sign implements eth_sign. Calculates an Ethereum specific signature with: sign(keccak256('\\x19Ethereum Signed Message:\\n' + len(message) + message))).
|
|
|
|
// Deprecated: This function will be removed in the future.
|
|
|
|
func (api *APIImpl) Sign(ctx context.Context, _ common.Address, _ hexutil.Bytes) (hexutil.Bytes, error) {
|
|
|
|
return hexutil.Bytes(""), fmt.Errorf(NotAvailableDeprecated, "eth_sign")
|
2020-10-12 08:39:33 +00:00
|
|
|
}
|
2020-11-09 08:52:18 +00:00
|
|
|
|
|
|
|
// SignTransaction deprecated
|
|
|
|
func (api *APIImpl) SignTransaction(_ context.Context, txObject interface{}) (common.Hash, error) {
|
|
|
|
return common.Hash{0}, fmt.Errorf(NotAvailableDeprecated, "eth_signTransaction")
|
|
|
|
}
|