Questions tagged [eosio-code]

Questions relating to the official eosio code--for instance, this may include questions about particular functions or data structures, certain files or contracts, compilation or building problems, related libraries, scripts, binaries, or similar.

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

How to declare a table outside of its contract-class?

As we know from the documentation, a table must be initialized as shown below: class [[eosio::contract]] helloworld: public eosio::contract { public: helloworld(eosio::name receiver, eosio::name ...
user avatar
  • 1
0 votes
0 answers
18 views

Why eosio.code permission is not required in my local blockchain?

I am running a local blockchain with the following command: nodeos -e -p "eosio" --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --delete-all-blocks > /dev/null 2>&...
user avatar
  • 1
0 votes
1 answer
24 views

How to generate the EOS keys from Mnemonic/Seed on Expo

I try to develop the eos crypto wallet app on Expo. But I can't find the solution to generate the eos keys from Mnemonic/seed phrases on Expo. Once you know the solution, please let me know.
user avatar
0 votes
0 answers
7 views

how to calculate signatures parameter in the push_transaction request json offline?

I referred to the writing in EosioSoftkeySignatureProvider, passed in the jsonData data of the request parameters, and then calculated it together with chainIdData and contextFreeDataHash, but there ...
user avatar
  • 1
0 votes
1 answer
138 views

How to extract data from atomic assets ATTRIBUTE_MAP

Title says it all. I'd like to get data from atomic assets' attribute map. This is the link to their docs https://github.com/pinknetworkx/atomicassets-contract/wiki/Custom-Types#atomic_attrbiute tried ...
user avatar
0 votes
1 answer
24 views

Is there a way to convert an object to JSON in the smart contract?

I want to convert a series of data/object/struct into a json text before saving it into my table. Is this possible?
user avatar
0 votes
0 answers
38 views

Error 3070003: Serialization Error Processing WASM while set contract eosio.system

set contract: cleos set contract eosio ./eosio.system -p eosio@active I get : Error 3070003: Serialization Error Processing WASM Publishing contract... Error 3070003: Serialization Error Processing ...
user avatar
0 votes
0 answers
15 views

How to derive a uint from a string to use it as key/index in eosio table

I want to store json key-value pairs in an eosio table. The keys in the json are unique and that's why it would be perfect to use them as primary_key or secondary_id for querying the table later. The ...
user avatar
  • 111
0 votes
1 answer
323 views

atomicassets mintasset in contract

I am trying to mint an NFT as a reward for player via the smart contract, here is my code. eosio::action mint_action = eosio::action( eosio::permission_level(_self, eosio::name("active")), ...
user avatar
0 votes
0 answers
16 views

recovery_key function failing to compile

so I'm trying to use the recovery_key function linked here: https://developers.eos.io/manuals/eosio.cdt/latest/group__crypto/?query=recover_key&page=1#function-recover_key Whenever I do use it ...
user avatar
0 votes
0 answers
33 views

Is there a small C++ library or a simple gist/function just for signing transactions?

I'm building an app that consists of two services, one service will run on the edge and the other in the cloud. Obviously, I want the service on the edge to be lightweight since It will run on ...
user avatar
  • 111
0 votes
1 answer
55 views

Smart contract redeem token action - Example

Do you have some example that shows how to design an action for a smart contract that when the user sends a REDEEMCODE action the smart contract will transfer some quantity of a custom token for the ...
user avatar
0 votes
1 answer
26 views

is it possible to listen the return asset quantity of specified account?

is it possible to listen the return asset quantity of specified account in contract? e.g i use contract(A) to send asset of the specified account(B) to a DEX, can i listen the return asset quantity on ...
user avatar
0 votes
1 answer
12 views

3060102 reversible_guard_exception

I am facing this issue after 3 month when i ran the node, 3060102 reversible_guard_exception: Reversible block log usage is at unsafe levels reversible free: 2096992, guard size: 2097152 {"f"...
user avatar
0 votes
0 answers
17 views

Nodeos folder non-existed after eosio installation with brew

I am trying to install and run an EOS node on macos. I installed eosio with brew. I used brew tap eosio/eosio brew install eosio Everything went alright. But after installation the following folder ...
user avatar
0 votes
1 answer
48 views

Inline action with 2 permissions/authorizations

I have 3 accounts: Contract Account. Storage Account. Recipient Account. I made a smart contract to give out tokens from Storage Account to the Recipient Account using a claim function from the ...
user avatar
1 vote
1 answer
409 views

Getting authorization to burn atomicassets via smart contract - WAX

i want to write a small smart contract game where players will be able to send Characters (NFTs, atomicassets) into a battlefield. On that battlefield they have a chance to die. Which means that asset ...
user avatar
0 votes
1 answer
42 views

Issue in v2.0.2-rc1 The CMAKE_ASM-LLVMWAR_COMPILER: g++ is not a full path and was not found in the PATH

CMake Error at libraries/chain/CMakeLists.txt:38 (enable_language): The CMAKE_ASM-LLVMWAR_COMPILER: g++ is not a full path and was not found in the PATH. Tell CMake where to find the compiler by ...
user avatar
  • 261
0 votes
1 answer
812 views

WAX - Signature error : "Message: transaction declares authority, but does not have signatures for it."

I'm trying to send a transaction from my react frontend to local chain, I have signed in wax cloud wallet and made a transaction. But at last I met this signature error. "Message: transaction ...
user avatar
0 votes
1 answer
48 views

Testnet status for web portal

Is any else facing testnet 502 gateway error when trying to access the front end web portal for the testnet.
user avatar
0 votes
1 answer
33 views

Runtime error (eos-vm system failure) on using C++ `virtual` keyword?

In my contract I have a data structure that involves a node struct and a LeafNode and InnerNode struct that inherit from node. struct node { ... virtual string to_string() const { ...
user avatar
0 votes
1 answer
120 views

Building a contact in EOS Studio and getting eosio.code permissions when calling it

After deploying a contract built in EOS Studio ... on my call to another action where I have called 'permission_level()' ... I get a permission error "transaction declares authority '{"actor&...
user avatar
0 votes
1 answer
60 views

Buyng Ram EOSIO

Hello i want to make api for buying RAM so is there any api available or any library please let me know but im already using eosjs ,eos-api of nodejs please let me know in comment thank you
user avatar
0 votes
1 answer
151 views

Error 3080004 Transaction exceeded the current CPU usage limit imposed on the transaction

Hello i am trying to create eosio.system contract but its keep giving me this Error 3080004: Transaction exceeded the current CPU usage limit imposed on the transaction Error Details: transaction was ...
user avatar
0 votes
2 answers
38 views

how to make sure the tx to be included in block

as subject, any way to make sure the tx to be included in block, what i think of is, if the tx meet the condition, then notify the contract to execute the specified action, otherwise notify an account ...
user avatar
0 votes
1 answer
53 views

dApps: Public networks & Messaging

Could you please help me to figure out the following questions? Is it safe if users of a decentralized application use public nodes endpoint via RPC to make transactions to smart contracts? Such as ...
user avatar
0 votes
2 answers
109 views

Inline action for transferring tokens

I am trying to transfer some tokens as part of my contract action, but I get an error: ACTION maincontract::sendtoken(const name sender, const name receiver) { action( permission_level{ get_self(...
user avatar
1 vote
1 answer
142 views

EOS STUDIO TERMINAL compilation issue

In terminal, I created a wallet, then created the eosio keys, imported that into the wallet, created an account with those keys, and set up my smart contract that has no errors, but when I try to do ...
user avatar
  • 11
1 vote
1 answer
89 views

Code sample to use PowerUp feature

Can someone point me to code samples on how to use PowerUp feature? Also, how can a wallet be setup to use it automatically? Thanks in advance.
user avatar
  • 13
0 votes
2 answers
139 views

Status of EOS Powerup feature

I have following questions on EOS Powerup: Is the EOS Powerup model optional? When is this expected to go live? The link here mentions April 8 where as https://eosauthority.com/powerup/ mentions that ...
user avatar
  • 13
1 vote
1 answer
34 views

GetAccount Not Found Error, is this Testnode Sync Issue?

I am testing the EOS SDK and have testnode running on my local, it gives me an error Not Found, Exception I have created an account from developer dashboard at testnode and using the accountname ...
user avatar
  • 11
1 vote
0 answers
31 views

How can i update a table by TransactionID? And can transactionId be the same when we update the data?

I am running my nodeos on my local machine, I can retrieve all the data via api and do some CRUD also. I have succeeded update the table by tableId, But can someone suggest to me how do I update the ...
user avatar
1 vote
2 answers
44 views

send different amount of tokens to different accounts in single transaction

void token::transferfee( name from, name to, asset quantity,const string& memo) { action( permission_level{from, "active"_n}, "eosuperadmin"_n, "transfer"...
user avatar
  • 21
0 votes
1 answer
111 views

How user stake and earn reward and How we can implement this staking model

Basically, staking and unstaking are an on going process throughout the life of a blockchain and in EOSIO we have 0.1 token not 10% of the account's tokens is staked for RAM Cleos stakes 8 KB of RAM ...
user avatar
2 votes
1 answer
38 views

Is having hashes of document certificates in EOS blockchain for tamper proof a good use case for EOS?

I have a application where I want to store a SHA256 hash of a document in a Blockchain. I want it to have a good life, ie storing the SHA256 hasha as a data in a transaction should bot be deleted ...
user avatar
  • 125
0 votes
1 answer
199 views

How can i convert a time_point to a string?

I want to convert a time_point variable to a string using eos studio. I need to insert a time_point variable in a string in order to creare the object of my smart contract.
user avatar
0 votes
1 answer
222 views

Convert type string to type checksum256

fist off let me get this strait, yes I know the dangers of memo parsing, yes I am aware of the vulnerabilities that can be created from doing such a process, so please there is no need to lecture me ...
user avatar
2 votes
0 answers
26 views

What is purpose of eos flag --enable-stale-production?

I am trying to setup a private eos network but when i unset flag --enable-stale-flags node does not start producing blocks what is exactly the purpose of this flag In which cases this flag should be ...
user avatar
0 votes
2 answers
75 views

How to replace EOS as core system token with some other(created) token for private network

Is it possible to replace eos with some other token created from eosio.token contract and make it core system token
user avatar
0 votes
1 answer
46 views

Can we make txs free of cost/without staking on privately deployed eos network

I want to deploy a private eos network on which users don't have to stake or pay ram or network or cpu is that possible if yes how so ? do I have to tweak code in eosio.system contracts Also what are ...
user avatar
0 votes
1 answer
37 views

EOS Node Build Help

I'm new to development so hopefully someone can point out what I may have done wrong. I'm trying to set up an EOS node using Ubuntu VirtualBox on my Windows machine. I have installed everything ...
user avatar
  • 1
0 votes
1 answer
47 views

How to reduce block production speed in private Network Setup

I setup an eos private network which is creating block at speed of 500ms per block is it possible to reduce it to 2sec per block or more The problem is most of the blocks gets produced with 0 txs in ...
user avatar
0 votes
0 answers
47 views

eosio-explorer can't see block and transactions,postgreSQL light is red

I want to build a local blcokchain explorer. I used the offical eosio-explorer, but it didn't work. The postgreSQL light always red. I can't search the block form number or transactions. I can use the ...
user avatar
0 votes
1 answer
64 views

How to integrate Restfull API with smart contract using c#?

I am new to EOSIO. I referred eos.io for learning. Now I need to learn how to integrate API with a smart contract. I am willing to do this in c#. I got answers mostly for eosjs which is used in nodejs,...
user avatar
  • 293
0 votes
2 answers
31 views

No member name in namespace 'block-signing_authority' in eosio

I am having issues compling the eosio.system contract with the new eosio 2.0 upgrades I keep generating the same error below. What could be the cause of this error ? include/eosio.system/eosio....
user avatar
0 votes
1 answer
319 views

Setting eosio.code permission for contract account in eosjs

I am trying to set the eosio.code permission for my contract on account kbo2byvpkbiy (private blockchain). The reason I want to do this is calling eosio.token/transfer from within this contract. All ...
user avatar
  • 101
1 vote
1 answer
40 views

Eos-sharp jungle Error 3090003 when trying to call external smart contract

I’m trying to achieve something quite simple. I try to call eosio.token transfer from one of my smartContract (lomtaxjungle dopurchase), but after severals days i still don’t manage to do it. From ...
user avatar
1 vote
1 answer
74 views

I have doubts about intercontract communication

I have read that: In order to call an inline action, that is to call an action of contract A from contract B, there is a need to set some special permission. In this case, the Ram payer for the ...
user avatar
  • 43
0 votes
2 answers
157 views

(eosio v2.0.2) contract prints are not shown, even using nodeos with --contracts-console parameter

simple contract compiled using eosio.cdt v1.7.0: #include <eosiolib/contracts/eosio/eosio.hpp> #include <eosiolib/core/eosio/print.hpp> using namespace eosio; CONTRACT eventhandler : ...
user avatar
  • 151
1 vote
0 answers
32 views

Is it possible to let caller to pay for the cpu of an inline deferred transaction of a contract?

For example, A send a transaction t1 that will call the contract action act1, act1 will send a deferred transaction t2. Is it possilbe that let A pay for the cpu instead of the contract account?
user avatar