Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Update Command Line Interface #177

Open
xavier506 opened this issue May 14, 2021 · 1 comment
Open

Update Command Line Interface #177

xavier506 opened this issue May 14, 2021 · 1 comment
Assignees
Labels
contenido web contenido para el sitio tutorial

Comments

@xavier506
Copy link
Contributor

xavier506 commented May 14, 2021

Incluyamos errores comunes y sus soluciones para el Command Line Interface (cleos).

agregar flag: -r "Accept-Encoding: identity"

Incluir dentro del contenido de command line interface.

@leisterfrancisco nos ayuda con esta tarea?

@ldrojas ldrojas added ? necesitamos más información contenido web contenido para el sitio tutorial and removed ? necesitamos más información labels May 17, 2021
@leisterfrancisco leisterfrancisco self-assigned this May 31, 2021
@leisterfrancisco
Copy link

Error 3200000: http exception
Error Details:
Unable to read http response: End of file
Solución: Añadir -r "Accept-Encoding: identity", por ejemplo: cleos -u https://lacchain.eosio.cr -r "Accept-Encoding: identity" push action <expression>

transaction declares authority '{"actor":"costarica","permission":"writer"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [], provided keys ["EOS52fADru6HdXxWvWqpDPtmeDAh1gdXit7Q7A25GhCe39nHeWsUh","EOS5oSXwBRZKrGyg5SSo81HGEhpwE9My2x4scGH2RSSTPv6STDjw4"], and a delay max limit of 3888000000 ms
Solución: Revise que las firmas estén registradas en los wallets y que el endpoint sea https://lacchain.eosio.cr

Error 3090003: Provided keys, pemissions, and delays do not satisfy declared authorizations
Ensure you have the related private keys inside your wallet and your wallet is unlocked.
Error Details:
transaction declares authority '{"actor": "lifebankcode", "permission": "active"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [{"actor": "lifebankcode", "permission": "eosio.code"}], provided keys [], and a delay max limit of 3888000000 ms
Solución: Dar permiso de eosio.code a los contratos en comunicación, por ejemplo:

permission.json
{
"threshold": 1,
"keys": [
{
"key": <public_key>,
"weight": 1
}
],
"accounts": [
{
"permission": {
"actor": <contract_name>,
"permission": "eosio.code"
},
"weight": 1
}
]
}

grant_contract_permission() {
mkdir -p ./stdout/permission
TEMP_DIR=./stdout/permission

cleos -u $EOS_API_URL push action -j -d -s writer run '{}' -p costarica@writer >$TEMP_DIR/tx1.json
cleos -u https://writer.eosio.cr set account permission <contract_name> active permission.json owner -j -d -s -p <contract_name> >$TEMP_DIR/tx2.json
jq -s '[.[].actions[]]' $TEMP_DIR/tx1.json $TEMP_DIR/tx2.json >$TEMP_DIR/tx3.json
jq '.actions = input' $TEMP_DIR/tx1.json $TEMP_DIR/tx3.json >$TEMP_DIR/tx4.json
cleos -u $EOS_API_URL -r "Accept-Encoding: identity" push transaction $TEMP_DIR/tx4.json -p costarica@writer -p <contract_name>@active

}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contenido web contenido para el sitio tutorial
Projects
None yet
Development

No branches or pull requests

4 participants