método geth eth_getBalance não existe
Não consigo executar nenhum comando depois de configurar clef e geth na cadeia Görli.
geth attach /path/to/clef.ipc
Welcome to the Geth JavaScript console!
modules: account:1.0 rpc:1.0
> eth.getBalance("0x8e3097A24838d7C11efd79F93c90Fa4Eb5a97C99", "ether")
Error: the method eth_getBalance does not exist/is not available
at web3.js:6347:37(47)
at web3.js:5081:62(37)
at <eval>:1:15(5)
Qualquer ajuda seria muito apreciada. Eu sou muito novo nisso tudo. Obrigado pelo seu tempo.
Seguindo as etapas iniciais de geth e Görli: https://geth.ethereum.org/docs/getting-started. Estas são as etapas e resultados exatos:
- criou 2 contas na clave
- execute o clef no meu armazenamento de chaves:
clef --keystore /path/to/keystore --chainid 5
WARNING!
Clef is an account management tool. It may, like any software, contain bugs.
Please take care to
- backup your keystore files,
- verify that the keystore(s) can be opened with your password.
Clef is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the GNU General Public License for more details.
Enter 'ok' to proceed:
> ok
INFO [10-21|16:02:31.229] Using CLI as UI-channel
INFO [10-21|16:02:31.397] Loaded 4byte database embeds=146841 locals=0 local=./4byte-custom.json
## Master Password
Please enter the password to decrypt the master seed
>
-----------------------
INFO [10-21|16:02:33.013] Starting signer chainid=5 keystore=/path/to/keystore light-kdf=false advanced=false
DEBUG[10-21|16:02:33.013] FS scan times list="255.496µs" set="14.219µs" diff="15.4µs"
DEBUG[10-21|16:02:33.024] Ledger support enabled
DEBUG[10-21|16:02:33.026] Trezor support enabled via HID
DEBUG[10-21|16:02:33.027] Trezor support enabled via WebUSB
INFO [10-21|16:02:33.028] Audit logs configured file=audit.log
DEBUG[10-21|16:02:33.028] IPC registered namespace=account
INFO [10-21|16:02:33.028] IPC endpoint opened url=/path/to/clef.ipc
------- Signer info -------
* intapi_version : 7.0.1
* extapi_version : 6.1.0
* extapi_http : n/a
* extapi_ipc : /path/to/clef.ipc
- execute geth:
geth --goerli --syncmode "light" --signer=/path/to/clef.ipc
INFO [10-21|16:05:47.030] Starting Geth on Görli testnet...
INFO [10-21|16:05:47.030] Dropping default light client cache provided=1024 updated=128
INFO [10-21|16:05:47.031] Maximum peer count ETH=0 LES=10 total=50
INFO [10-21|16:05:47.031] Using external signer url=/path/to/clef.ipc
INFO [10-21|16:05:47.033] Set global gas cap cap=25000000
INFO [10-21|16:05:47.033] Allocated cache and file handles database=~/Library/Ethereum/goerli/geth/lightchaindata cache=64.00MiB handles=5120
INFO [10-21|16:05:47.074] Allocated cache and file handles database=~/Library/Ethereum/goerli/geth/lespay cache=16.00MiB handles=16
INFO [10-21|16:05:47.134] Persisted trie from memory database nodes=361 size=51.17KiB time="935.06µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [10-21|16:05:47.135] Initialised chain configuration config="{ChainID: 5 Homestead: 0 DAO: <nil> DAOSupport: true EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: 0 Petersburg: 0 Istanbul: 1561651, Muir Glacier: <nil>, YOLO v1: <nil>, Engine: clique}"
INFO [10-21|16:05:47.137] Added trusted checkpoint block=3538943 hash="ff3ae3…d375f2"
INFO [10-21|16:05:47.137] Loaded most recent local header number=0 hash="bf7e33…b88c1a" td=1 age=1y9mo9h
INFO [10-21|16:05:47.137] Configured checkpoint registrar address=0x18CA0E045F0D772a851BC7e48357Bcaab0a0795D signers=5 threshold=2
INFO [10-21|16:05:47.138] Starting peer-to-peer node instance=Geth/v1.9.23-stable/darwin-amd64/go1.15.2
INFO [10-21|16:05:47.201] UDP listener up net=enode://e562ddd8103347f6df44468cd9d52400314975992a86cd2b2f8f612ff0ef5a7d5d650ae0d24d48cb2effa589d04241a50ca78f71d258c32a4c6d845051fc30e1@[::]:30303
Respostas
Essa linha de comando está errado: geth attach /path/to/clef.ipc.
Você tem que usar em vez disso: geth attach <IPC_LOCATION>. Você deve encontrar em seu repositório goerli um geth.ipcarquivo. Pode ser um arquivo oculto, então não hesite ls -aem vê-lo. IPC_LOCATIONé o caminho para este arquivo.
Para se conectar ao console ipc, o comando é, portanto:
geth attach /PATH/geth.ipc
Você deverá ver as seguintes APIs disponíveis: modules: admin:1.0 clique:1.0 debug:1.0 eth:1.0 les:1.0 lespay:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0.