7
votes
How to debug eosio::on_notify("eosio.token::transfer") actions?
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 ...
6
votes
Multiple EOS transfers in a single transaction
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)...
6
votes
Accepted
Clearing RAM tables of eosio.token contract
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 ...
6
votes
Accepted
What is the smallest unit of eos?
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 ...
4
votes
Accepted
In the eosio.token contract, why are the structs private?
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,...
4
votes
Accepted
How I can typecast the "0.0001 EOS" into eosio::asset
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 ...
4
votes
Accepted
What does it mean to have multiple blockchains on EOS
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 -- ...
4
votes
Is there any IDE for eos smart contract?
Yes there is IDE for eosio you can try to this IDE https://www.eosstudio.io/
4
votes
assertion failure with message: no balance object found
This error message is caused because you are trying to transfer a token that you do not own and have never owned. You have no balance, which is not the same as having a balance of zero.
Usually you ...
3
votes
EOS have its official sidechains?
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) ...
3
votes
Accepted
How does the EOS account system work together with smart contracts?
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 ...
tmm♦
- 2,114
3
votes
Accepted
What is the major difference between system contract and other contracts?
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 ...
3
votes
Accepted
How can i send 10,000 NFT in a single transaction like we send EOS tokens
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 ...
3
votes
Accepted
Make a transfer inline
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 [email protected] - even if you ...
3
votes
What is the latest version of eosio and what is the new github site?
EOSIO was taken over by the EOS Network Foundation and block.one, the company that initially developed the EOSIO framework stopped development and archived the repositories in github.com/eosio.
EOSIO ...
2
votes
Accepted
Is "cleos transfer" just a shortcut for "cleos push action eosio.token transfer"?
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 ...
2
votes
Is "cleos transfer" just a shortcut for "cleos push action eosio.token transfer"?
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
votes
Why did EOSio exclude all EOS ERC20-token holders who didn't register before 2st of June 2018?
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://...
2
votes
Accepted
What is the command to use the retire function in eosio.token
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 <...
2
votes
Receiving EOS tokens in the contract's action
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 ...
2
votes
Unable to compile eosio.token
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 ...
2
votes
how to implement a 48-char-long symbol token with balances like "10.0000 custom.name.of.the.token"?
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.
...
2
votes
Accepted
How to transfer EOS token using Scatter.js or eos.js?
After searching the official doc and trying different approches I finally got it to work. I've used eos.transaction instead of eos.transfer and the following example is working for those interested:
...
2
votes
What is the difference between a method call and the use of SEND_INLINE_ACTION?
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 ...
2
votes
Accepted
How can eosio.token (v1.4.0) compile?
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
votes
Accepted
Custom token in scatter
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 ...
2
votes
How to display custom token on Mainnet Monitor?
This should happen automatically as long as you follow the format of the eosio.token contract. The two most important things are that you have the tables from the eosio.token contract:
accounts
stats
...
2
votes
Is there any IDE for eos smart contract?
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 ...
2
votes
How to automatically push an action when EOS is sent to the contract
You are looking for Custom Dispatchers.
2
votes
How to automatically push an action when EOS is sent to the contract
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
eosio.token × 122smart-contract × 30
nodeos × 24
cleos × 24
eosio-code × 20
eosjs × 17
tokens × 12
transfer × 11
transactions × 8
eosio.cdt × 7
blockchains × 6
keosd × 4
block-producer × 3
eosio.system × 3
scatter × 3
private-blockchain × 3
inline-action × 3
accounts × 2
ram × 2
action × 2
permissions × 2
rpc × 2
api × 2
testnet × 2
resources × 2