cronos
cronos copied to clipboard
Metamask does not guess the currency symbol && Not Metamask connection (Solved) && Problem following https://docs.cronos.org/for-node-hosts/running-nodes/local-devnet: gas prices; got: 0 required: 7: insufficient fee (Solved)
I am following https://docs.cronos.org/for-node-hosts/running-nodes/local-devnet
Option 2
Modify the configuration script: ./scripts/cronos-devnet.yaml
Use pystarport
pystarport serve --config ./scripts/cronos-devnet.yaml
the serve command would truncate all the blocks previously generated and regenerate a new genesis block, which means you'll also lose all of your transaction records.
the accounts' information is generated in: data/cronos_777-1/accounts.json
If you wish to restart the chain with the existing blocks, please run pystarport with start command:
pystarport start --config ./scripts/cronos-devnet.yaml
Operations Key management
cronosd keys add signer2 --recover --keyring-backend test
(The bip39 mnemonic, as can be found in data/cronos_777-1/accounts.json, in “mnemonic” field)
{"name": "signer2", "type": "local", "address": "crc1q04jewhxw4xxu3vlg3rc85240h9q7ns6hglz0g", "pubkey": "{\"@type\":\"/ethermint.crypto.v1.ethsecp256k1.PubKey\",\"key\":\"A3K9+A9hnuhqkxn+/GHLVZwFthvAERmvpSupb0d44WtD\"}", "mnemonic": "night renew tonight dinner shaft scheme domain oppose echo summer broccoli agent face guitar surface belt veteran siren poem alcohol menu custom crunch index"}
See balance
sudo apt install jq
cronosd q bank balances crc1q04jewhxw4xxu3vlg3rc85240h9q7ns6hglz0g -o json | jq
{
"balances": [
{
"denom": "basetcro",
"amount": "30000000000000000000000"
}
],
"pagination": {
"next_key": null,
"total": "0"
}
}
Transfer token to another address
cronosd keys add Bob --keyring-backend test
- address: crc1jyylfq5wq8dg7shyz8chgyl7tv37z02qq43ms2
name: Bob
pubkey: '{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"AgsFPVdkEm0CM1sWibpvng7gAv+Z7t9ZbcOdVxbqiK11"}'
type: local
**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.
dash similar old grief extra duty cost hotel tray balcony foam together episode inject pride ramp dash bundle chalk real subject trick negative despair
Now we can transfer tokens to Bob, for example you can send 1basetcro to Bob's address by
cronosd tx bank send signer2 crc1jyylfq5wq8dg7shyz8chgyl7tv37z02qq43ms2 1basetcro --keyring-backend test --chain-id cronos_777-1
auth_info:
fee:
amount: []
gas_limit: "200000"
granter: ""
payer: ""
signer_infos: []
tip: null
body:
extension_options: []
memo: ""
messages:
- '@type': /cosmos.bank.v1beta1.MsgSend
amount:
- amount: "1"
denom: basetcro
from_address: crc1q04jewhxw4xxu3vlg3rc85240h9q7ns6hglz0g
to_address: crc1jyylfq5wq8dg7shyz8chgyl7tv37z02qq43ms2
non_critical_extension_options: []
timeout_height: "0"
signatures: []
confirm transaction before signing and broadcasting [y/N]: y
…
#FF0000 Error:
gas prices; got: 0 required: 7: insufficient fee"
#00FF00 Questions:
How can I give funds for the transaction?
Why does not have funds to pay transactions but has funds (30000000000000000000000 basetcro)?
Thanks for your support.
@EAG-es Have you try set --gas-prices when do tx bank send?
--gas-prices
It worked!!! (It would be a great help to update the doc.)
cronosd tx bank send signer2 crc1jyylfq5wq8dg7shyz8chgyl7tv37z02qq43ms2 1basetcro --keyring-backend test --chain-id cronos_777-1 --gas-prices 7.0basetcro
Now I have a new problem.... I cannot set Metamask local network configuration: cronosd config
{
"chain-id": "331110",
"keyring-backend": "os",
"output": "text",
"node": "tcp://localhost:26657",
"broadcast-mode": "sync"
}
This parameters are not acceptable by Metamask:
Networks
>
Add a network
>
Add a network manually
A malicious network provider can lie about the state of the blockchain and log your network activity. Add only trusted custom networks.
Network name
Local Cronos
New RPC URL
http://localhost:26657
#FF0000 http://localhost:26657 is required, but node address is: tcp://localhost:26657
String identifier
331110
#FF0000 `Could not capture ID. chain. Is the RPC URL correct?
currency symbol
tCRO
#FF0000 _Ticker symbol verification data is currently unavailable, please make sure the symbol you entered is correct. It will impact the conversion rates you see for this network_
Block Explorer URL
(Optional)
How do I connect Metamask to the local Cronos network?
Thanks
26657 is the cometbft rpc server port, 8545 is the default eth json-rpc port.
26657is the cometbft rpc server port,8545is the default eth json-rpc port.
localhost:8545 has not anything listening at it, after pystarport start --config ./scripts/cronos-devnet.yaml
Can you please give me a reference to any doc to make cronosd available to Metamask?
Thanks
26657is the cometbft rpc server port,8545is the default eth json-rpc port.
localhost:8545has not anything listening at it, afterpystarport start --config ./scripts/cronos-devnet.yamlCan you please give me a reference to any doc to make cronosd available to Metamask?
Thanks
you might find and match related ports in here
26657is the cometbft rpc server port,8545is the default eth json-rpc port.
localhost:8545has not anything listening at it, afterpystarport start --config ./scripts/cronos-devnet.yamlCan you please give me a reference to any doc to make cronosd available to Metamask? Thanksyou might find and match related ports in here
The python source code here does not give me clues...
Where is base_port defined?
Is it defined in a configuration file? (genesis?)
I cannot find any way to define/active/detect json-rpc port (service)...
My Local network should be able to interact with Metamask and Smart Contracts and with Keplr (desirable) but I cannot find any documentation/manual about it...
Hope you can help me...
have you try http://localhost:26651, the url should match with your json-rpc address in app.toml
the json-rpc address to be used in metamask is defined in the app.toml, json-rpc.address.
331110
have you try http://localhost:26651, the url should match with your json-rpc address in app.tomlthe json-rpc address to be used in metamask is defined in the app.toml, json-rpc.address.Yes It worked! Hope it will be soon in the doc. 🥇
I have been able to connect LocalDev Node to Metamask...
There is an issue with network ID 777. It is already used by cheapETH...
So I changed to other number.
But Metamask does not detect the Currency Symbol:
Ticker symbol verification data is currently unavailable, please make sure the symbol you entered is correct. It will impact the conversion rates you see for this network
How can I tell Metamask the Currency Symbol?
Thanks...
@EAG-es you might change try with CRO