Nirdesh Kumar Choudhary
  • Member for 3 years, 6 months
  • Last seen more than a month ago
How I can typecast the "0.0001 EOS" into eosio::asset
Accepted answer
4 votes

I find the way to solve this problem .I use the function of symbol.hpp which is located at eosiolib/symbol.hpp inside our eos . First of all I create a string and then assign some amount to the struct ...

View answer
How to push a vector to an action
Accepted answer
3 votes

suppose your action looks like this: first define type of your vector let say you need a vector of double void vectortest(const std::vector<double> &vec) ; than you should be able to call ...

View answer
How do I find and edit Hello.cpp?
3 votes

Open terminal and go to your home directory because it is the root directory of your all work directories . Go through this sequence 1.open terminal 2.# cd 3.#locate hello.cpp and you will find ...

View answer
How can I get my contract currency balance with c++ code?
3 votes

If you are using eosio.token to create tokens, you can easily get your balance from the eosio.token table, you don't need to define a new table structure it's already in eosio.token . All you have to ...

View answer
`cleos get table` not returning vector<string>
Accepted answer
2 votes

You need to push back values into the vector like this: book.emplace(_self, [&](struct wname &a){ a.name = fa.pubaddress; a.namehash = nameHash; ...

View answer
Error for below code of scatter!
Accepted answer
2 votes

As @Ami Heines suggested this can be achieve using async nature of js. So define your getScatter action like this and try to define network in a config.json file like I used async getScatter(...

View answer
Need to perform automatic smart contract function execution
2 votes

First of all you need to push a transaction initially and you have to write a deferred transaction that call itself recursively after a certain period of time. You should also write some basecase . ...

View answer
get actions for jungle testnet
Accepted answer
2 votes

You can get all the actions of your contract including table: cleos --url http://dev.cryptolions.io:38888 get abi <your_account> or cleos --url https://junglehistory.cryptolions.io:443 get ...

View answer
Transfer EOS tokens inside a smart contract from an account to another
2 votes

First of all you need to provide the permission of eosio.code. After that you can use the transfer action of eosio.token contract. before assigning tokens see if both .abi and .wast file are there, ...

View answer
Deploying contract to jungle testnet wallet error
Accepted answer
2 votes

First of all you should create a account on jungle testnet, you should also have a wallet already created in your system, in my case wallet path is: /home/nirdesh.choudhary/eosio-wallet after that ...

View answer
empty actions - abi file
2 votes

Your code should be like this // @abi action void token::create( account_name issuer, asset maximum_supply ) { require_auth( _self ); auto sym = maximum_supply....

View answer
I am not getting Table Rows. Kindly anyone help me?
2 votes

Although your code is not easy to read you should not post the images. But as far as I understand by your code you have a problem with scope, pass the correct scope while getting your table. I think ...

View answer
How to be more efficient (transaction took too long)
Accepted answer
1 votes

If you are sending all these transactions from one account, Than all you could do : void Democontract::demoaction(account_name from,vector &tos,vector &memos,string memo,uint64_t delay){ ...

View answer
Divide funds by % to send to different wallets
1 votes

If you want to send tokens to multiple accounts. You should send the names and the corresponding percentage inside a vector. I have written the code and tested the same with my contract It goes like ...

View answer
Getting Error while creating new account using EOSjs on Jungle-testnet
1 votes

I have Installed eosjs(16.0.x) and also I use promises apply some other changes, If someone goes through this problem, you can see I defined my config file like : let config = { chainId: '...

View answer
Whats the use of EOSLIB_SERIALIZE?
Accepted answer
1 votes

EOSLIB_SERIAlIZE is a DataStream Seralizater , if you want to deep dive into what it does you should go to contracts/eosiolib/serialize.hpp in your EOS directory. It basically gives the struct extra ...

View answer
Allow users to withdraw their tokens
1 votes

Assuming you have setup the scatter and eosjs for your front. if not go here After that you need to set permissions, Using two functions like this: async getScatter(nextProps) { const scatter = ...

View answer
Retrieve the creator account name of a new generated account
1 votes

If you know your account name go this site and there is a option called Account Info on the top left corner. Click on that and put your account name. After enter you will find all info , ram and cpu ...

View answer
How to increase RAM on Jungle testnet?
0 votes

we can also add the required amount of RAM through scatter Desktop: if you configured the network setting and add your account correctly. you will get this kind of UI where you can pretty easily ...

View answer
How to do arithmetic with asset amount particulary decimals
0 votes

First of all you need to define your percentage variable as a double. After that you can do like this: const double amount = 25.0; const double total = 50.0; const double percentage = (amount * 100....

View answer
How to pass a list / array / vector to an action?
0 votes

Let say you have a action like this: void vertordemo(vector<double> &percentages){ //play with your vector here } you have to pass values like: cleos push action mycontract vertordemo '{"...

View answer
Q: What is nodeos exception: unrecognised option 'wallet-dir'
0 votes

You need to change your config.ini file. Unknown configuration items in config.ini will now error on startup (#5678) Prior to 1.3.0 unknown configuration items in config.ini would be silently ...

View answer