eos icon indicating copy to clipboard operation
eos copied to clipboard

context.privileged: eosio.system does not have permission to call this API

Open OuterSpaceTears opened this issue 8 years ago • 1 comments

I tried to test the eosio.system contract, but failed.

cleos push action eosio.system delegatebw '{"from":"alice","receiver":"alice","stake_net_quantity":"10.0000 EOS","stake_cpu_quantity":"10.0000 EOS","stake_storage_quantity":"10.0000 EOS"}' -p aliceError 3030000: transaction validation exception Ensure that your transaction satisfy the contract's constraint! Error Details: context.privileged: eosio.system does not have permission to call this API

Specific operation:

` cleos wallet create cleos wallet import 5Jmsawgsp1tQ3GD6JyGCwy1dcvqKZgX6ugMVMdjirx85iv5VyPR cleos set contract eosio build/contracts/eosio.bios -p eosio cleos create account eosio eosio.token EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4

cleos set contract eosio.token build/contracts/eosio.token -p eosio.token cleos create account eosio alice EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 cleos push action eosio.token create '[ "eosio", "1000000000.0000 EOS", 0, 0, 0]' -p eosio.token cleos push action eosio.token issue '[ "alice", "1000.0000 EOS", "" ]' -p eosio cleos create account eosio eosio.system EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 cleos set contract eosio.system build/contracts/eosio.system/ -p eosio.system `

Faild: cleos push action eosio.system delegatebw '{"from":"alice","receiver":"alice","stake_net_quantity":"10.0000 EOS","stake_cpu_quantity":"10.0000 EOS","stake_storage_quantity":"10.0000 EOS"}' -p alice Error 3030000: transaction validation exception Ensure that your transaction satisfy the contract's constraint! Error Details: context.privileged: eosio.system does not have permission to call this API

Can you help me? @elmato

OuterSpaceTears avatar May 08 '18 03:05 OuterSpaceTears

The step has changed and the problem has been solved.

` cleos wallet create cleos wallet import 5Jmsawgsp1tQ3GD6JyGCwy1dcvqKZgX6ugMVMdjirx85iv5VyPR cleos set contract eosio build/contracts/eosio.bios -p eosio cleos create account eosio eosio.token EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 cleos create account eosio alice EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 EOS7ijWCBmoXBi3CgtK7DJxentZZeTkeUnaSDvyro9dq7Sd1C3dC4 cleos set contract eosio build/contracts/eosio.system/ -p eosio cleos set contract eosio.token build/contracts/eosio.token -p eosio.token cleos push action eosio.token create '[ "eosio", "1000000000.0000 EOS", 0, 0, 0]' -p eosio.token cleos push action eosio.token issue '["alice","1000.0000 EOS",""]' -p eosio

`

result: ` cleos push action alice delegatebw '{"form":"alice","receiver":"alice","stake_net_quantity":"200.0000 EOS","stake_cpu_quantity":"100.0000 EOS","stake_storage_quantity":"500.0000 EOS"}' -p alice executed transaction: 76de378030f630b8f1163168cfb2d2b372aee8298d978e848712256103fcc877 224 bytes 102400 cycles

alice <= alice::delegatebw ""

`

OuterSpaceTears avatar May 08 '18 06:05 OuterSpaceTears