6

UPDATE: Updated the code to compile with eosio.cdt version 1.6.1. I finally got it working nicely! Parsing the token symbol in the action parameters was especially complicated. The other solution posted has a couple of issues that will prevent you from clearing all the RAM properly: It doesn't delete the stat table, leaving there some info about the ...


5

Using the EOSIO_DISPATCH macros disables the automatic inclusion of actions and on_notifys, and assumes that you will deal with them manually. To fix this, you have to remove the EOSIO_DISPATCH macro from your header file. An additional note, as of eosio.cdt 1.6 there is a bug when using on_notify with a wildcard for the contract name, this can be fixed ...


4

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 . My code goes like this ... std::string sym = "EOS"; symbol_type symbolvalue = string_to_symbol(4,sym.c_str()); eosio::asset tosend; tosend.amount = 10001; ...


4

In a smart contract, you could do this by emplacing multiple actions into a single transaction, as follows: transaction transfer; transfer.actions.emplace_back(eosio::permission_level {_self, N(active) }, N(eosio.token), N(transfer), std::make_tuple(from_account, to_account_1, quantity_to_send, std::string("memo"))); transfer.actions.emplace_back(eosio::...


4

EOS is a specific blockchain implemented using the open source EOSIO software built originally by Block One. EOSIO can be used to create new blockchains with varying degree of changes in many areas -- technical and non-technical. For example, TELOS is such a blockchain based on EOSIO with significant governance tweaks. Similarly, there are other ...


4

Yes there is IDE for eosio you can try to this IDE https://www.eosstudio.io/


4

Token precision (number of decimal places) is defined when executing the create function on the eosio.token contract. You pass max supply to the token contract, which will include the precision. In the case of the EOS token, it is divisiable up to 4 decimal places. 0.0001 Is the smallest unit of EOS.


3

The contract rightfully encapsulates the implementation details as private. Instead, it provides the following function as the public interface: static asset get_balance( name token_contract_account, name owner, symbol_code sym_code ) A better version of the code to get EOS balance is thus as follows: auto how_much = token::get_balance("eosio.token"_n, "...


3

No official side chains yet. This is still being developed. Some challenges are technical and others are economical or governance related. On the technical side, IBC (inter blockchain communication) is being developed in such a way that you will be able to transfer tokens from one chain to another with no need for a third party to coordinate and of course ...


3

Putting @confused00 's comment and mine together: Question 1: All accounts are unique in one EOS.IO chain (like the mainnet). That is why there are also things like name bidding. This is quite well described here. However an account can be controlled by key-pairs and can have multiple permission levels. So it is possible that multiple entities control an ...


3

In many cases, the contract of custom tokens are based on eosio.token contract. You can add custom actions, or change the logic of existing actions such as create, issue, transfer and so on. The main difference of eosio.system contract and others is that eosio.system is for privileged account, so it contains privileged APIs like setpriv etc. (Privileged ...


3

Do I need to shift to a standard like erc-20 ? This really depends on what you're trying to achieve. The NFT and ERC-20 are fundamentally different. Do you understand the difference? Non fungible tokens are used to manage ownership of unique items which are not equal in properties and value. An example for a non fungible item is when your friend lends you ...


3

The problem is you are trying to transfer tokens, which requires mycontract@active permission. But when you send tokens from within a contract, the permission is mycontract@eosio.code - even if you sign the transaction with your mycontract@active key. There are then two problems with the example you post: You sign the action with bob@active, it should be ...


2

Summary: Functionally, the two are almost identical at the moment, but, conceptually and semantically, transfer accomplishes an implementation-agnostic transfer of tokens, while transferring using push action is a lower-level, implementation-dependent solution that may or may not change in the future. I think Andres' answer is good, but if you want ...


2

It's exactly the same. If you run the cleos transfer command with -d you'll see the transaction that gets sent. It's simply a transaction with a single action to eosio.token::transfer.


2

There is a fallback method available for those who did not register before the deadline. The link below should be a good starting point to access your funds via the EOS blockchain: https://eosauthority.com/blog/how_to_generate_your_EOS_fallback_key_from_ethereum_private_key


2

If you want to access an action in a contract, you can simply push an action to that entry-point specifically. In your case: $ cleos push action eosio.token retire '["20.000 SYS", "my memo"]' -p <issuer@permission> assuming you want to retire 20.000 SYS tokens and the eosio.token contract is on the eosio.token account.


2

In EOS, actions don't have tokens associated with them. The tokens are handled through token contracts, for example, the "real" EOS token is managed by the eosio.token contract account. If you want to allow users to pay for your dapp, they need to call the eosio.token::transfer action. What you need to do is to listen to the eosio.token::transfer action in ...


2

Well, what I learnt from EOS developers Telegram group: Update eosio.cdt. The latest version is 1.3.2 Also, although the tutorial says not to use abigen since abi is included...we need to use abigen since eosio.token.abi is not included in the download. So the command need to be changed as below: eosio-cpp -I include -o eosio.token.wasm src/eosio.token....


2

Yes, your approach is good. Only issue is efficiency. Your tokens will be processed using more CPU than the regular eosio.token contract tokens due to the extra steps to match by the secondary key. Good luck, and don't forget to share a link to the implementation.


2

You can call any function of a smart contract from within the smart contract, however only functions labelled as actions can be called from outside of the smart contract. So if you have a function in contract A that needs to call a function from contract B, you would have to do this by sending an action. An inline action means that the action has to be ...


2

It seems that you are using outdated eosio.cdt. eosio::same_payer is declared in multi_index.hpp. Upgrade eosio.cdt from here. The latest version of eosio.cdt is 1.4.1.


2

The chrome extension is deprecated and unsafe. You should move to the desktop application as soon as possible. In the desktop application, you can simply click on "View Tokens", and it will list all of your tokens.


2

https://www.eosstudio.io/ https://dev4eos.com/ I found two interesting tools, eosstudio is way better than dev4eos. The problem i found in eosstudio is, it's not open source and got lot of bugs while deploying and checking the contract state. The latter one is a complete mess, no active support, lots and lots of bugs


2

You are looking for Custom Dispatchers.


2

Yes, compared to Ethereum, rather than having payable you would set up your contract to listen to an action, in particular transfer from eosio.token. The listener will reference a specific action to execute in your contract you would use to define what logic/code should happen. In the EOSIO world, it's better practice to minimise the amount of logic done ...


2

In [producer_pay.cpp][1], you'll find: const int64_t min_activated_stake = 150'000'000'0000; You'll want to either alter that when loading the contracts, or just issue tokens to some accounts and ensure that enough votes (150 million) have been cast to pass this threshold.


2

Try this command cleos -u http://127.0.0.1:8892 --wallet-url http://127.0.0.1:8891 create account eosio eosio.token your_key your_key


1

You can change it by modifying max-transaction-time = 30 in config.ini according to your own preferred time. If you push transaction by cleos then i don't think it will get expires in 30 seconds as per my experience in eosio.


1

In recently version of eos_compiler. Some data type are deprecated. including account_name .. downgrade your compiler or edit code, or add typedef yourself. good day :)


Only top voted, non community-wiki answers of a minimum length are eligible