Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Add eosio.contracts documentation content to release/1.9.x #356

Merged
merged 31 commits into from
Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
7666714
introduce the file structure, layout and part of the content
iamveritas Jul 24, 2019
cb63f56
introduce the file structure, layout and part of the content
iamveritas Jul 24, 2019
9f8f627
Merge branch 'docs/starter' of github.com:EOSIO/eosio.contracts into …
dskvr Aug 9, 2019
3fe59fb
refactoring after feedback from Sean/Han and incorporating correction…
iamveritas Aug 12, 2019
ff925d9
Adjust annotations, remove typedef docs and adjust files
dskvr Aug 12, 2019
23b575f
Merge
dskvr Aug 12, 2019
ff91a49
remove second docs.json
dskvr Aug 12, 2019
f15511e
annotating rex.results.cpp as well
iamveritas Aug 12, 2019
be19190
Merge pull request #308 from EOSIO/docs/starter-append
dskvr Aug 13, 2019
5662155
fix a typo and position correctly annotation for rex.results class
iamveritas Aug 13, 2019
a14a8b4
Merge branches 'docs/starter' and 'docs/starter' of https://github.co…
iamveritas Aug 13, 2019
9c73838
correct relative links to md files
iamveritas Aug 14, 2019
e151db6
correct links to eos how-to's
iamveritas Aug 14, 2019
65a561c
add index.md from introduction.md
iamveritas Aug 22, 2019
22dac81
Had to make some modifications to some of the inline comments so they…
Sep 26, 2019
ca5afe9
Update the README.md build section
Oct 18, 2019
000d101
Merge branch 'develop' of github.com:EOSIO/eosio.contracts into docs/…
Oct 18, 2019
15ba163
clean up README.md, the referenced build section has the after build …
Oct 18, 2019
222907a
change pronoun in buyrex Ricardian summary
arhag Oct 19, 2019
509a1d9
Merge pull request #355 from EOSIO/system-ricardian-pronoun-develop
arhag Oct 19, 2019
ac48222
Merge branch 'develop' of github.com:EOSIO/eosio.contracts into docs/…
Oct 22, 2019
cf5db63
update the token issue guide since now the token can be issued only t…
Oct 22, 2019
2f71085
correct problems introduced after merging with develop branch and res…
Oct 23, 2019
fdddaff
update the compile/build steps to include compilation of the tests as…
Oct 24, 2019
adbbc66
Remove documentation from private functions
dskvr Oct 29, 2019
b816cc4
remove documentation from private method
dskvr Oct 29, 2019
418c654
Remove private methods and struct documentation for first iteration, …
dskvr Oct 29, 2019
2410224
Re-do the three tutorials to not have reference to cleos documentatio…
Oct 31, 2019
3219299
clean up one remaining TO DO.
Oct 31, 2019
d1cf46b
final touches: use build everywhere instead of a mix of build and com…
Oct 31, 2019
4292fc1
Do not provide documentation for get_core_symbol during this release.
dskvr Nov 1, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,7 @@ Dependencies:
* [eosio.cdt v1.7.x](https://github.com/EOSIO/eosio.cdt/releases/tag/v1.7.0-rc1)
* [eosio v2.0.x](https://github.com/EOSIO/eos/releases/tag/v2.0.0-rc1) (optional dependency only needed to build unit tests)

To build contracts alone:
1. Ensure an appropriate version of eosio.cdt is installed. Installing eosio.cdt from binaries is sufficient.
2. Run the `build.sh` script in the top directory to build all the contracts.

To build the contracts and unit tests:
1. Ensure an appropriate version of eosio.cdt is installed. Installing eosio.cdt from binaries is sufficient.
2. Ensure an appropriate version of eosio has been built from source and installed. Installing eosio from binaries is not sufficient.
3. Run the `build.sh` script in the top directory with the `-t` flag to build all the contracts and the unit tests for these contracts.

After build:
* If the build was configured to also build unit tests, the unit tests executable is placed in the _build/tests_ folder and is named __unit_test__.
* The contracts (both `.wasm` and `.abi` files) are built into their corresponding _build/contracts/\<contract name\>_ folder.
* Finally, simply use __cleos__ to _set contract_ by pointing to the previously mentioned directory for the specific contract.
To build the contracts follow the instructions in [`Build and deploy` section](./docs/02_build-and-deploy.md).

## Contributing

Expand Down
68 changes: 1 addition & 67 deletions contracts/eosio.bios/include/eosio.bios/eosio.bios.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ namespace eosiobios {
using eosio::permission_level;
using eosio::public_key;

/**
* A weighted permission.
*
* @details Defines a weighted permission, that is a permission which has a weight associated.
* A permission is defined by an account name plus a permission name. The weight is going to be
* used against a threshold, if the weight is equal or greater than the threshold set then authorization
* will pass.
*/
struct permission_level_weight {
permission_level permission;
uint16_t weight;
Expand All @@ -52,11 +44,6 @@ namespace eosiobios {
EOSLIB_SERIALIZE( permission_level_weight, (permission)(weight) )
};

/**
* Weighted key.
*
* @details A weighted key is defined by a public key and an associated weight.
*/
struct key_weight {
eosio::public_key key;
uint16_t weight;
Expand All @@ -65,11 +52,6 @@ namespace eosiobios {
EOSLIB_SERIALIZE( key_weight, (key)(weight) )
};

/**
* Wait weight.
*
* @details A wait weight is defined by a number of seconds to wait for and a weight.
*/
struct wait_weight {
uint32_t wait_sec;
uint16_t weight;
Expand All @@ -78,15 +60,6 @@ namespace eosiobios {
EOSLIB_SERIALIZE( wait_weight, (wait_sec)(weight) )
};

/**
* Blockchain authority.
*
* @details An authority is defined by:
* - a vector of key_weights (a key_weight is a public key plus a weight),
* - a vector of permission_level_weights, (a permission_level is an account name plus a permission name)
* - a vector of wait_weights (a wait_weight is defined by a number of seconds to wait and a weight)
* - a threshold value
*/
struct authority {
uint32_t threshold = 0;
std::vector<key_weight> keys;
Expand All @@ -97,19 +70,6 @@ namespace eosiobios {
EOSLIB_SERIALIZE( authority, (threshold)(keys)(accounts)(waits) )
};

/**
* Blockchain block header.
*
* @details A block header is defined by:
* - a timestamp,
* - the producer that created it,
* - a confirmed flag default as zero,
* - a link to previous block,
* - a link to the transaction merkel root,
* - a link to action root,
* - a schedule version,
* - and a producers' schedule.
*/
struct block_header {
uint32_t timestamp;
name producer;
Expand All @@ -125,26 +85,9 @@ namespace eosiobios {
(schedule_version)(new_producers))
};

/**
* @defgroup eosiobios eosio.bios
* @ingroup eosiocontracts
*
* eosio.bios is a minimalistic system contract that only supplies the actions that are absolutely
* critical to bootstrap a chain and nothing more.
*
* @{
*/
class [[eosio::contract("eosio.bios")]] bios : public eosio::contract {
public:
using contract::contract;
/**
* @{
* These actions map one-on-one with the ones defined in
* [Native Action Handlers](@ref native_action_handlers) section.
* They are present here so they can show up in the abi file and thus user can send them
* to this contract, but they have no specific implementation at this contract level,
* they will execute the implementation at the core level and nothing else.
*/
/**
* New account action
*
Expand Down Expand Up @@ -358,11 +301,6 @@ namespace eosiobios {
[[eosio::action]]
void reqactivated( const eosio::checksum256& feature_digest );

/**
* Abi hash structure
*
* @details Abi hash structure is defined by contract owner and the contract hash.
*/
struct [[eosio::table]] abi_hash {
name owner;
checksum256 hash;
Expand All @@ -371,9 +309,6 @@ namespace eosiobios {
EOSLIB_SERIALIZE( abi_hash, (owner)(hash) )
};

/**
* Multi index table that stores the contracts' abi index by their owners/accounts.
*/
typedef eosio::multi_index< "abihash"_n, abi_hash > abi_hash_table;

using newaccount_action = action_wrapper<"newaccount"_n, &bios::newaccount>;
Expand All @@ -392,5 +327,4 @@ namespace eosiobios {
using activate_action = action_wrapper<"activate"_n, &bios::activate>;
using reqactivated_action = action_wrapper<"reqactivated"_n, &bios::reqactivated>;
};
/** @}*/ // end of @defgroup eosiobios eosio.bios
} /// namespace eosiobios
}
7 changes: 3 additions & 4 deletions contracts/eosio.msig/include/eosio.msig/eosio.msig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <eosio/transaction.hpp>

namespace eosio {

/**
* @defgroup eosiomsig eosio.msig
* @ingroup eosiocontracts
Expand All @@ -27,8 +28,7 @@ namespace eosio {
* authorized by the provided keys and permissions, and if the proposal name doesn’t
* already exist; if all validations pass the `proposal_name` and `trx` trasanction are
* saved in the proposals table and the `requested` permission levels to the
* approvals table (for the `proposer` context).
* Storage changes are billed to `proposer`.
* approvals table (for the `proposer` context). Storage changes are billed to `proposer`.
*
* @param proposer - The account proposing a transaction
* @param proposal_name - The name of the proposal (should be unique for proposer)
Expand All @@ -46,8 +46,7 @@ namespace eosio {
* proposed by `proposer`. If the proposal's requested approval list contains the `level`
* permission then the `level` permission is moved from internal `requested_approvals` list to
* internal `provided_approvals` list of the proposal, thus persisting the approval for
* the `proposal_name` proposal.
* Storage changes are billed to `proposer`.
* the `proposal_name` proposal. Storage changes are billed to `proposer`.
*
* @param proposer - The account proposing a transaction
* @param proposal_name - The name of the proposal (should be unique for proposer)
Expand Down
Loading