AElf.Contracts.Association
Association contract.
Organizations established to achieve specific goals can use this contract to cooperatively handle transactions within the organization
Implement AElf Standards ACS1 and ACS3.
Contract Methods
Method Name |
Request Type |
Response Type |
Description |
---|---|---|---|
CreateOrganization |
Create an organization and return its address. |
||
CreateOrganizationBySystemContract |
Creates an organization by system contract and return its address. |
||
AddMember |
Add organization members. |
||
RemoveMember |
Remove organization members. |
||
ChangeMember |
Replace organization member with a new member. |
||
GetOrganization |
Get the organization according to the organization address. |
||
CalculateOrganizationAddress |
Calculate the input and return the organization address. |
AElf.Standards.ACS1
Method Name |
Request Type |
Response Type |
Description |
---|---|---|---|
SetMethodFee |
Set the method fees for the specified method. Note that this will override all fees of the method. |
||
ChangeMethodFeeController |
Change the method fee controller, the default is parliament and default organization. |
||
GetMethodFee |
Query method fee information by method name. |
||
GetMethodFeeController |
Query the method fee controller. |
AElf.Standards.ACS3
Method Name |
Request Type |
Response Type |
Description |
---|---|---|---|
CreateProposal |
Create a proposal for which organization members can vote. When the proposal is released, a transaction will be sent to the specified contract. Return id of the newly created proposal. |
||
Approve |
Approve a proposal according to the proposal ID. |
||
Reject |
Reject a proposal according to the proposal ID. |
||
Abstain |
Abstain a proposal according to the proposal ID. |
||
Release |
Release a proposal according to the proposal ID and send a transaction to the specified contract. |
||
ChangeOrganizationThreshold |
Change the thresholds associated with proposals. All fields will be overwritten by the input value and this will affect all current proposals of the organization. Note: only the organization can execute this through a proposal. |
||
ChangeOrganizationProposerWhiteList |
Change the white list of organization proposer. This method overrides the list of whitelisted proposers. |
||
CreateProposalBySystemContract |
Create a proposal by system contracts, and return id of the newly created proposal. |
||
ClearProposal |
Remove the specified proposal. If the proposal is in effect, the cleanup fails. |
||
GetProposal |
Get the proposal according to the proposal ID. |
||
ValidateOrganizationExist |
Check the existence of an organization. |
||
ValidateProposerInWhiteList |
Check if the proposer is whitelisted. |
Contract Types
AElf.Contracts.Association
Association.ChangeMemberInput
Field |
Type |
Description |
Label |
---|---|---|---|
old_member |
The old member address. |
||
new_member |
The new member address. |
Association.CreateOrganizationBySystemContractInput
Field |
Type |
Description |
Label |
---|---|---|---|
organization_creation_input |
The parameters of creating organization. |
||
organization_address_feedback_method |
The organization address callback method which replies the organization address to caller contract. |
Association.CreateOrganizationInput
Field |
Type |
Description |
Label |
---|---|---|---|
organization_member_list |
Initial organization members. |
||
proposal_release_threshold |
The threshold for releasing the proposal. |
||
proposer_white_list |
The proposer whitelist. |
||
creation_token |
The creation token is for organization address generation. |
Association.MemberAdded
Field |
Type |
Description |
Label |
---|---|---|---|
member |
The added member address. |
||
organization_address |
The organization address. |
Association.MemberChanged
Field |
Type |
Description |
Label |
---|---|---|---|
old_member |
The old member address. |
||
new_member |
The new member address. |
||
organization_address |
The organization address. |
Association.MemberRemoved
Field |
Type |
Description |
Label |
---|---|---|---|
member |
The removed member address. |
||
organization_address |
The organization address. |
Association.Organization
Field |
Type |
Description |
Label |
---|---|---|---|
organization_member_list |
The organization members. |
||
proposal_release_threshold |
The threshold for releasing the proposal. |
||
proposer_white_list |
The proposer whitelist. |
||
organization_address |
The address of organization. |
||
organization_hash |
The organizations id. |
||
creation_token |
The creation token is for organization address generation. |
Association.OrganizationMemberList
Field |
Type |
Description |
Label |
---|---|---|---|
organization_members |
The address of organization members. |
repeated |
Association.ProposalInfo
Field |
Type |
Description |
Label |
---|---|---|---|
proposal_id |
The proposal ID. |
||
contract_method_name |
The method that this proposal will call when being released. |
||
to_address |
The address of the target contract. |
||
params |
The parameters of the release transaction. |
||
expired_time |
The date at which this proposal will expire. |
||
proposer |
The address of the proposer of this proposal. |
||
organization_address |
The address of this proposals organization. |
||
approvals |
Address list of approved. |
repeated |
|
rejections |
Address list of rejected. |
repeated |
|
abstentions |
Address list of abstained. |
repeated |
|
proposal_description_url |
Url is used for proposal describing. |
AElf.Standards.ACS1
acs1.MethodFee
Field |
Type |
Description |
Label |
---|---|---|---|
symbol |
The token symbol of the method fee. |
||
basic_fee |
The amount of fees to be charged. |
acs1.MethodFees
Field |
Type |
Description |
Label |
---|---|---|---|
method_name |
The name of the method to be charged. |
||
fees |
List of fees to be charged. |
repeated |
|
is_size_fee_free |
Optional based on the implementation of SetMethodFee method. |
AElf.Standards.ACS3
acs3.CreateProposalBySystemContractInput
Field |
Type |
Description |
Label |
---|---|---|---|
proposal_input |
The parameters of creating proposal. |
||
origin_proposer |
The actor that trigger the call. |
acs3.CreateProposalInput
Field |
Type |
Description |
Label |
---|---|---|---|
contract_method_name |
The name of the method to call after release. |
||
to_address |
The address of the contract to call after release. |
||
params |
The parameter of the method to be called after the release. |
||
expired_time |
The timestamp at which this proposal will expire. |
||
organization_address |
The address of the organization. |
||
proposal_description_url |
Url is used for proposal describing. |
||
token |
The token is for proposal id generation and with this token, proposal id can be calculated before proposing. |
acs3.OrganizationCreated
Field |
Type |
Description |
Label |
---|---|---|---|
organization_address |
The address of the created organization. |
acs3.OrganizationHashAddressPair
Field |
Type |
Description |
Label |
---|---|---|---|
organization_hash |
The id of organization. |
||
organization_address |
The address of organization. |
acs3.OrganizationThresholdChanged
Field |
Type |
Description |
Label |
---|---|---|---|
organization_address |
The organization address |
||
proposer_release_threshold |
The new release threshold. |
acs3.OrganizationWhiteListChanged
Field |
Type |
Description |
Label |
---|---|---|---|
organization_address |
The organization address. |
||
proposer_white_list |
The new proposer whitelist. |
acs3.ProposalCreated
Field |
Type |
Description |
Label |
---|---|---|---|
proposal_id |
The id of the created proposal. |
||
organization_address |
The organization address of the created proposal. |
acs3.ProposalOutput
Field |
Type |
Description |
Label |
---|---|---|---|
proposal_id |
The id of the proposal. |
||
contract_method_name |
The method that this proposal will call when being released. |
||
to_address |
The address of the target contract. |
||
params |
The parameters of the release transaction. |
||
expired_time |
The date at which this proposal will expire. |
||
organization_address |
The address of this proposals organization. |
||
proposer |
The address of the proposer of this proposal. |
||
to_be_released |
Indicates if this proposal is releasable. |
||
approval_count |
Approval count for this proposal. |
||
rejection_count |
Rejection count for this proposal. |
||
abstention_count |
Abstention count for this proposal. |
acs3.ProposalReleaseThreshold
Field |
Type |
Description |
Label |
---|---|---|---|
minimal_approval_threshold |
The value for the minimum approval threshold. |
||
maximal_rejection_threshold |
The value for the maximal rejection threshold. |
||
maximal_abstention_threshold |
The value for the maximal abstention threshold. |
||
minimal_vote_threshold |
The value for the minimal vote threshold. |
acs3.ProposalReleased
Field |
Type |
Description |
Label |
---|---|---|---|
proposal_id |
The id of the released proposal. |
||
organization_address |
The organization address of the released proposal. |
acs3.ProposerWhiteList
Field |
Type |
Description |
Label |
---|---|---|---|
proposers |
The address of the proposers |
repeated |
acs3.ReceiptCreated
Field |
Type |
Description |
Label |
---|---|---|---|
proposal_id |
The id of the proposal. |
||
address |
The sender address. |
||
receipt_type |
The type of receipt(Approve, Reject or Abstain). |
||
time |
The timestamp of this method call. |
||
organization_address |
The address of the organization. |
acs3.ValidateProposerInWhiteListInput
Field |
Type |
Description |
Label |
---|---|---|---|
proposer |
The address to search/check. |
||
organization_address |
The address of the organization. |
AElf.Types
aelf.Address
Field |
Type |
Description |
Label |
---|---|---|---|
value |
aelf.BinaryMerkleTree
Field |
Type |
Description |
Label |
---|---|---|---|
nodes |
The leaf nodes. |
repeated |
|
root |
The root node hash. |
||
leaf_count |
The count of leaf node. |
aelf.Hash
Field |
Type |
Description |
Label |
---|---|---|---|
value |
aelf.LogEvent
Field |
Type |
Description |
Label |
---|---|---|---|
address |
The contract address. |
||
name |
The name of the log event. |
||
indexed |
The indexed data, used to calculate bloom. |
repeated |
|
non_indexed |
The non indexed data. |
aelf.MerklePath
Field |
Type |
Description |
Label |
---|---|---|---|
merkle_path_nodes |
The merkle path nodes. |
repeated |
aelf.MerklePathNode
Field |
Type |
Description |
Label |
---|---|---|---|
hash |
The node hash. |
||
is_left_child_node |
Whether it is a left child node. |
aelf.SInt32Value
Field |
Type |
Description |
Label |
---|---|---|---|
value |
aelf.SInt64Value
Field |
Type |
Description |
Label |
---|---|---|---|
value |
aelf.ScopedStatePath
Field |
Type |
Description |
Label |
---|---|---|---|
address |
The scope address, which will be the contract address. |
||
path |
The path of contract state. |
aelf.SmartContractRegistration
Field |
Type |
Description |
Label |
---|---|---|---|
category |
The category of contract code(0: C#). |
||
code |
The byte array of the contract code. |
||
code_hash |
The hash of the contract code. |
||
is_system_contract |
Whether it is a system contract. |
||
version |
The version of the current contract. |
aelf.StatePath
Field |
Type |
Description |
Label |
---|---|---|---|
parts |
The partial path of the state path. |
repeated |
aelf.Transaction
Field |
Type |
Description |
Label |
---|---|---|---|
from |
The address of the sender of the transaction. |
||
to |
The address of the contract when calling a contract. |
||
ref_block_number |
The height of the referenced block hash. |
||
ref_block_prefix |
The first four bytes of the referenced block hash. |
||
method_name |
The name of a method in the smart contract at the To address. |
||
params |
The parameters to pass to the smart contract method. |
||
signature |
When signing a transaction it’s actually a subset of the fields: from/to and the target method as well as the parameter that were given. It also contains the reference block number and prefix. |
aelf.TransactionExecutingStateSet
Field |
Type |
Description |
Label |
---|---|---|---|
writes |
The changed states. |
repeated |
|
reads |
The read states. |
repeated |
|
deletes |
The deleted states. |
repeated |
aelf.TransactionExecutingStateSet.DeletesEntry
Field |
Type |
Description |
Label |
---|---|---|---|
key |
|||
value |
aelf.TransactionExecutingStateSet.ReadsEntry
Field |
Type |
Description |
Label |
---|---|---|---|
key |
|||
value |
aelf.TransactionExecutingStateSet.WritesEntry
Field |
Type |
Description |
Label |
---|---|---|---|
key |
|||
value |
aelf.TransactionResult
Field |
Type |
Description |
Label |
---|---|---|---|
transaction_id |
The transaction id. |
||
status |
The transaction result status. |
||
logs |
The log events. |
repeated |
|
bloom |
Bloom filter for transaction logs. A transaction log event can be defined in the contract and stored in the bloom filter after the transaction is executed. Through this filter, we can quickly search for and determine whether a log exists in the transaction result. |
||
return_value |
The return value of the transaction execution. |
||
block_number |
The height of the block hat packages the transaction. |
||
block_hash |
The hash of the block hat packages the transaction. |
||
error |
Failed execution error message. |
aelf.TransactionResultStatus
Name |
Number |
Description |
---|---|---|
NOT_EXISTED |
0 |
The execution result of the transaction does not exist. |
PENDING |
1 |
The transaction is in the transaction pool waiting to be packaged. |
FAILED |
2 |
Transaction execution failed. |
MINED |
3 |
The transaction was successfully executed and successfully packaged into a block. |
CONFLICT |
4 |
When executed in parallel, there are conflicts with other transactions. |
PENDING_VALIDATION |
5 |
The transaction is waiting for validation. |
NODE_VALIDATION_FAILED |
6 |
Transaction validation failed. |