14

UPDATE: This is the code I used to experiment with all combinations of permissions I could come up with: https://github.com/andresberrios/permissions_test After a lot of experimentation, I finally understand how permissions work in EOSIO! EOS Permission Model - Overview An account can have various permissions (like owner and active), which are represented ...


7

You can not forbid reading the data from a smart contracts table, because it is exposed by the RPC interface or CLI. What you can do to prevent understanding it by 3rd parties, is encrypt your data like @confused00 said. If you just want to limit access for adding, modyfing or deleting, you can use the scopes of the multi_index and the require_auth method, ...


7

Whenever you set up a local testnet node or run nodeos on your home computer, you are creating a new EOS chain. What matters is how you choose to connect it to other nodes to decentralise the system. If you want a private blockchain for, say, your office building, then you would set up several instances of nodeos in the office and connect them to each ...


5

If you used sudo make install, then you should use the eosiocpp binaries generated for you. In the latest version, I believe they shoud be in /usr/local/eosio/bin/ (it should print this info when sudo make install is finished if it's a different path) so add that to your $PATH: $ export PATH=/usr/local/eosio/bin/:$PATH $ which eosiocpp /usr/bin/eosio/bin/...


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

The primary key for a multi_index table can not be a string. In general it should be an int. The N() macro converts the contents within the brackets into a uint64_t.


4

While executing the contracts in the VM, it doesn't really matter what was the source language: be it C++ or Rust. It only cares about the compiled WASM being accepted by the WASM interpreter. Yes, you can write Rust, but because there's no explicit support or work done towards supporting Rust, you'll probably need quite a bit of tweaking. Several months ...


4

Any permission that has .code in it means the permission of the smart contract on the account. So in the case of eosio.code, it gives permission for the contract to use functions from the eosio smart contract. You could equally have permissions like mycontract.code, which would say that a contract had permission to use whatever actions are linked to that ...


4

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


3

The problem here was that the path provided was relative, and Rohan was working with a docker container. When passing the path to your contract's directory when using docker, it should be an absolute path, and match the mounted path of your docker container. cleos set contract helocode1234 /contracts/hello helo.wasm helo.abi -p helocode1234@active The ...


3

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 your file . now open your file like this using vim like this vim hello.cpp press i (to edit your file ) after editing press Esc than Ctrl+Shift+: and press wq ...


3

1.What is chainbase used for? we can find the answer in : about chainbase 2.when we add a new object (i.e., row) to the table by Multi-Index such as class addressbook: contract { struct address { uint64_t account_name; string first_name; string last_name; string street; string city; string ...


3

This seems to work for me: $ mkdir -p project/sender $ mkdir project/recipient $ touch project/sender/sender.cpp $ touch project/recipient/recipient.cpp sender.cpp #include<eosiolib/eosio.hpp> #include<string> using std::string; using eosio::contract; using eosio::permission_level; using eosio::action; class sender : contract { public: ...


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

Yes jungle testnet upgraded to 2.0 and before updating they have started account migration programme but it's ended now, and they have given manual migration form on this site https://jungletestnet.io/ to migrate your accounts.


3

Yes you can create a private blockchain take a look to this tutorial : https://developers.eos.io/eosio-nodeos/docs/bios-boot-sequence


2

I see 3 main options: Option 1 Bundle the cleos and keosd binaries with your application, so you can run them as children processes of your application and issue commands to them to manage the wallet and issue the transactions to the blockchain. That way you get a lot of nice functionality already implemented for you. cleos and keosd documentation: https:/...


2

After some digging and some help from EOS New York, I think I understand the process of making changes better, and I can answer my question: The setramrate update was proposed on 23rd July 2018 by Argentinaeos under the name of 1dot1dotzero, and it determined that EOS RAM should increase at 1kb per block. The transaction that incorporated this change has ...


2

This is a known issue for eosiocpp in version 1.1.2/1.1.3 of the eosio/eos Github repo. Switching to version 1.1.0 solved the problem for me and a colleague. Here's a host of issues relating to the problem: Github 5015 Github 5039 Github 5040 Github 4974


2

No, they're different concepts: accounts are on-chain identifiers and smart contracts are on-chain software. You need an account to deploy or interact with a smart contract, but you can have an account that never published a smart contract and is only used to interact with the blockchain or other smart contracts. However, smart contracts must belong to an ...


2

You should start with v1.2.3, as it contains important fixes for major bugs with dev tools, like this problem. Installed it fresh just today.


2

There would just be blocks missing at those time points, and the next BP will build on top of what they know to be the block of highest height. Relevant section from the whitepaper: The EOS.IO software enables blocks to be produced exactly every 0.5 second and exactly one producer is authorized to produce a block at any given point in time. If the block ...


2

In the proposal, there are several issues: The first bit of JSON where you specify the permissions has to be in alphanumeric order. i.e. partner1 has to come before partner2. The second section of json should refer to the demo account, i.e. `'[{"actor":"demo", "permission":"active"}]' For a detailed description of how to do msig with cleos, check out this ...


2

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(PropsValue) { const scatter = PropsValue.scatterObj; const { accounts } = await scatter.getIdentity({ accounts: [config.EOS_CONFIG.network] }); ...


2

The double square bracket in c++ indicates attribute specifier. The eosio::contract in this case guides eosio-cpp compiler to locate the smart contract class and make use of it when generating abi file with --abigen flag.


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 have multiple questions in this post, in the future you should try to have a more focused question. ".front()" is a vector function. From the documentation: std::vector::front() Returns a reference to the first element in the vector. Now, I'll assume you weren't actually asking about front(), and instead about the purpose of the merkle() function ...


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

I installed eosio.cdt with brew. Adding /usr/local/Cellar/eosio.cdt/1.6.3/opt/eosio.cdt/include/** to my includePath variable helped me For eosio.cdt 1.7.0, the path is: /usr/local/Cellar/eosio.cdt/1.7.0/opt/eosio.cdt/include/eosiolib/core/**


2

Each row must have a unique primary_key returned by individual::primary_key, or another row which has same primary key will not be added to table due to violation of primary key uniqueness. You can add new field for primary key like the next. ... private: struct [[eosio::table]] individual { uint64_t key; // new field which contains unique primary key ...


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