Questions tagged [smart-contract]

Anything related to decentralized application (dApp) development, concepts, and possibilities with smart contracts, or technical questions for the development of smart contracts.

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

How do I set up EOSIO to make every transaction free of NET/CPU/RAM fee

How do I set up EOSIO to make every transaction free of NET/CPU/RAM fee. I have checked many system contract code, but still no clue.
Gasai Maple's user avatar
0 votes
0 answers
8 views

eosio-init command not found

Im trying to create the smartcontracts on the wax-blockchain and i'm following the approach using the docker but it says eosio-init command not found. Is there anyone who can identify the issue from ...
Talha Javaid Malik's user avatar
0 votes
0 answers
31 views

General Tips on Smart Contract Development? ( Business Logic + Token )

Currently developing an eosio based token with some semi intricate business logic that frequently modifies aspects of the token contract( staking, supply, etc ) based on a variety of factors including ...
DaCryptonaut's user avatar
0 votes
1 answer
18 views

How to get account name of current action?

I am gonna get account name of caller(wallet) in my action of smart contract. I used functions current_receiver(), get_sender(), get_first_receiver(). but I got contract`s account name and empty ...
Back-end expert's user avatar
0 votes
0 answers
8 views

Who to set permissions when reading Smart Contract table?

I am wondering if i could set authentication and authorization to allow read calls to data stored in a Smart Contract table. Thanks
WakiApi's user avatar
  • 11
0 votes
1 answer
43 views

Get table row count or property from the last row

As I said I need to get the count of rows in a table. Preferly via rpc with http plugin or from a new action inside the Smart Contract. This is my Smart Contract: #include <eosio/eosio.hpp> ...
WakiApi's user avatar
  • 11
0 votes
0 answers
35 views

High Cost to Mint an NFT on Wax Network

I am trying to mint an NFT on the wax network by following this tutorial: https://developer.wax.io/en/tutorials/create-nft/nft_use.html For some reason, the cost is 377084 bytes of RAM. Console-Output:...
Zachary Janczak's user avatar
0 votes
1 answer
34 views

What is the maximum size of smart contract?

I'm developing a smart contract and yesterday I couldn't deploy it into testnet with error: root@698a02be20d9:/# cleos --verbose set contract myaccount /work/mycontract -p myaccount@active Reading ...
serghd's user avatar
  • 11
0 votes
2 answers
26 views

Get Action Index (or contract) from inside notification

Is there a way to get the index (ordinal) of the current action that is being processed? If you could access apply_context you could do get_action_id() but afaik that isn't exposed inside an action. ...
NKCSS's user avatar
  • 101
0 votes
0 answers
24 views

Lost value of vector when passed from one function to another

I have a function that receives a vector and passes it to another function. However, when the second function tries to use it, the vector seems to have lost its values. void getTeam(const vector<...
Icaro's user avatar
  • 51
0 votes
1 answer
16 views

Efficency of Actions

I am new to smart contracts, and I am developing a smart contract for a game. I am trying to understand if the smart contract that I created is efficient or not. I have deployed the smart contract on ...
luca gualandi's user avatar
0 votes
1 answer
24 views

How to get name of account which is processing action recent in contract?

I need to authorize with admin table of contract. but I could not account name which is processing action of contract. Let me know about any eos function to get account name, if anyone know well. ...
Victor's user avatar
  • 1
0 votes
1 answer
42 views

Adding Ricardian Clause

I am new to eosio and so far I have been learning using EOS Studio. I have come to the point where I would like to be able to write some Ricardian Clauses in the abi file but EOS Studio does not seem ...
vision_m's user avatar
0 votes
1 answer
27 views

how can my on_notify trigger calls contract actions (permisson issue)

I need to write a contract that automaticaly mint nfts when tokens are being transferred. So i have my : [[eosio::on_notify("*::transfer")]] void logdeposit(name from,name destination, ...
hjiul's user avatar
  • 1
0 votes
1 answer
36 views

how to get cpu usage of prev. actions in contract call?

Is it possible to figure out before transaction is completed, how much CPU an action in a smart contract will use? E.G. I make transaction with X actions + call to my smart - contract. Is possible to ...
Apepenkov's user avatar
  • 109
0 votes
1 answer
22 views

What is the eosio private key when running on local?

I was trying to test the smart contract I created in my local but I am currently blocked as I can't create a new account. As per EOS documentation, I used the command below to create a new account: ...
user6469's user avatar
0 votes
1 answer
127 views

How to deploy a smart contract on the mainnet?

I created and tested my smart contract on testnet. Now I want to deploy it on mainnet, I assume I have to purchase some EOS token and buy ram, cpu and net... I can't find anything in the docs about ...
basilisk's user avatar
  • 131
1 vote
1 answer
39 views

confusion with contract names and account names in eosio testnet

When writing contracts, the contract class in file name_a.cpp is defined as follows: class[[eosio::contract("name_a")]] name_b : public contract {..} In my understanding the name of the ...
sam's user avatar
  • 13
2 votes
1 answer
103 views

Can I make a http request from smart contract code?

I know that eosio has http plugins, which is why I'm thinking that maybe a http library is embedded to the eosio.hpp and that I can use it internally to send http requests. Is this possible? My goal ...
basilisk's user avatar
  • 131
0 votes
0 answers
47 views

How to link an external library to my eosio smart contract?

I normally use eosio-cpp to compile my smart contract, but recently I needed to use an external lib and link to it to build my project. I checked the docs here, but it basically shows how to use cmake ...
basilisk's user avatar
  • 131
0 votes
0 answers
43 views

how can i pass array of integers to smartcontract action using SwiftSDK

I have following action in my smartcontract: ACTION uploadfile1 (name creator, vector<uint8_t> content, string filename) I'm trying to push action from my Swift application using following code:...
Boni's user avatar
  • 21
0 votes
1 answer
52 views

Immutable smart contract

In EOS, smart contracts can be updated by the account owner. This could be a problem for certain applications in finance. For instance, if I want to deploy a token, the transfer function should be non-...
ChJ4m3s's user avatar
  • 101
0 votes
1 answer
60 views

Is there a max stack depth in EOSIO?

For ethereum it is 1024, is there one for EOSIO, if so what is it?
Nat's user avatar
  • 3,425
0 votes
1 answer
26 views

Caller of action detail in code

I need to check Account of caller action ,as in ethereum we have a concept of msg.sender to get the caller eth_address, similar is there a way to get caller of action details in EOS.
Asmita's user avatar
  • 1
0 votes
1 answer
1k 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 ...
devbluesky111's user avatar
0 votes
1 answer
50 views

Nested depth exceeded

kipping set abi because the new abi is the same as the existing abi Publishing contract... Error 3070002: Runtime Error Processing WASM Error Details: Nested depth exceeded pending console output: ...
James Cai's user avatar
1 vote
1 answer
31 views

cdt1.8.1 compile issue

error encountered when compile the contracts with cdt 1.8.1, any idea? /usr/local/Cellar/eosio.cdt/1.8.1/opt/eosio.cdt/bin/../include/boost/pfr/detail/core17_generated.hpp:38:9: error: type 'swaps_row'...
James Cai's user avatar
0 votes
1 answer
69 views

EOSIO failed when using Smart Contract Action with updated Parameters

I deploy a Smart Contract first time and the action becomes usable as it's supposed to be, but when Action's parameters is updated with a new one between existing p1 and p2 old parameters (result: p1, ...
Leister Campos's user avatar
1 vote
1 answer
171 views

Is it allowed to look up tables of another contract?

Imagine if I have an account with contract. Is it allowed for me to look up tables of some another contract from my contract action?
Владимир Говорухин's user avatar
0 votes
1 answer
98 views

Passing struct as a parameter to smart contract action

I want to save data in the blockchain table whose format is as below: { "docsample": { "id": 1, "creationDate": "2012-05-16T18:25:43.511Z", "...
Varsh's user avatar
  • 307
0 votes
2 answers
345 views

How to call Wax action in PHP

All of the tutorials on building dApps, they use Javascript and then they tell you how NOT to do it by using your PK to create a signature. So I'd like to use PHP on the backend and grab my key from a ...
Todd Vance's user avatar
0 votes
1 answer
82 views

Cleos set contract, Internal Service error timeout_exception

I am running EOS on my laptop. If I execute the "cleos set contract" command and the contract size is more than 200kb, I get an error: error 2021-06-01T17:44:30.084 http-1 http_plugin.cpp:...
Lari's user avatar
  • 1
0 votes
1 answer
83 views

Traverse multi-index table through non-primary value and delete the record

Below is my smart contract: #include <eosio/eosio.hpp> #include <eosio/print.hpp> #include <eosio/system.hpp> #include <string> using namespace eosio; using std::string; ...
Varsh's user avatar
  • 307
1 vote
1 answer
108 views

Can a smart contract perform actions on a scheduled delay indefinitely?

I am pretty new to working with EOS, so please excuse my ignorance and improper terminology. I am trying to repeatedly excecute a given action on a set time delay. For example, trying to submit a ...
Ian goodall-halliwell's user avatar
1 vote
0 answers
31 views

Build existing autoconf C project to include in smart contract

I'd like to include GNU's GMP library in my smart contract project. It's an autotools/autoconf project, how can I compile it as a standalone webassembly library and then include it in my smart ...
Guillermo Rodriguez's user avatar
0 votes
1 answer
154 views

Tables of a smart contract: public or private?

I was wondering about the ramifications of having tables declared public. Since EOSIO is a transparent blockchain anyone can read tables of any contract. So having them declared public in a smart ...
mschoenebeck's user avatar
0 votes
1 answer
63 views

How much RAM does a smart contract consume?

I have a smart contract compiled resulting in a 10,961 Bytes wasm file and a 2,372 Bytes abi file. However, when deploying the contract on chain it consumes about 110,000 Bytes which is almost 10x the ...
mschoenebeck's user avatar
0 votes
1 answer
70 views

Compiling smart contract not getting done

I have a setup of multi-node of 4 peers blockchain. Blockchain is running, few days before I deployed the smart contract and using it to save data on the blockchain. Now, I did some changes to the ...
Varsh's user avatar
  • 307
0 votes
1 answer
78 views

Using a smart contract table. How can I query a row using another field instead of the primary key id?

How can I query a smart contract table to return a row instead of using the primary key id? I have the following: https://jungle.bloks.io/account/mybest111111?loadContract=true&tab=Tables&...
Patoshi パトシ's user avatar
0 votes
2 answers
43 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 ...
James Cai's user avatar
1 vote
3 answers
126 views

on_notify does not get triggered

I am using a very simple example: mycontract.hpp: [[eosio::on_notify("eosio.token::transfer")]] void depos(name from, name to, asset quantity, string memo); mycontract.cpp: [[eosio::...
towi_parallelism's user avatar
0 votes
1 answer
74 views

Issues regarding the update of a staking contract

Suppose that we need a token staking mechanism (similar to the stake and lock function introduced in the EOSIO training). Someone owns that contract. Now the question is: How would the rest of the ...
towi_parallelism's user avatar
1 vote
1 answer
108 views

How to access data inside multi-index table when using 2D vector / 2D array?

What is going on? :D I write data, but cannot find it after I write it. The following code successfully emplaces the row into the multi-index table: See specifically the vector<vector <...
TLCC Consultants's user avatar
1 vote
0 answers
20 views

getting error when i try to add permission to a user who is signing a smart contract action

here is what i am trying to do : users will sign a specific action which will take their username, permission_name, smart_contract_name, action_name, public_key i am trying to assign the user ...
niksad8's 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 ...
stockmar's user avatar
1 vote
1 answer
109 views

nested stuff inside index_table

I'm trying to build a small hearthstone like game and I've finished up the front-end for the game client. I created a NoSQL mockup of the user data and now it's time to move those to the index_table ...
Milos Krstic's user avatar
0 votes
2 answers
39 views

How check deferred transaction logs on EOS jungle testnet?

As I working on jungle testnet and perform a 1 deferred transaction with some scheduled automatic time. But I failed to see transaction logs on the jungle testnet. Can any please guide me here with ...
Isha Padalia's user avatar
1 vote
1 answer
36 views

How to get table data from Jungle testnetwork?

I am trying to get all the insert data using get table on jungle testnet. But I was failed and get only an empty row value. command: cleos --url https://jungle3.cryptolions.io:443 get table ...
Isha Padalia's user avatar
1 vote
0 answers
21 views

How to set a eos contract on jungle network [duplicate]

As I trying to deploy a contract on Eos Jungle test network using cmd. But I failed to run. Command : cleos --url https://jungle3.cryptolions.io:443 set contract tulsipadalia addressbook -p ...
Isha Padalia's user avatar
3 votes
3 answers
452 views

Set source file properties called with incorrect number of arguments

When attempting to compile a new contract, I am getting this error. I'm using eosio version 2.1 for this. CMake Error at /home/michael/eosio.cdt/build/lib/cmake/eosio.cdt/EosioCDTMacros.cmake:18 (...
Michael Nash's user avatar

1
2 3 4 5
13