VestingScheme¶
A scheme for vesting.
Execution cost: less than 21833 gas
Deployment cost: less than 1404800 gas
Combined cost: less than 1426633 gas
Constructor¶
Events¶
AgreementCancel(uint256)¶
Execution cost: No bound available
Params:
- _agreementId of type
uint256
AgreementProposal(address,bytes32)¶
Execution cost: No bound available
Params:
- _avatar of type
address - _proposalId of type
bytes32
Collect(uint256)¶
Execution cost: No bound available
Params:
- _agreementId of type
uint256
NewVestedAgreement(uint256)¶
Execution cost: No bound available
Params:
- _agreementId of type
uint256
OwnershipTransferred(address,address)¶
Execution cost: No bound available
Params:
- previousOwner of type
address - newOwner of type
address
ProposalDeleted(address,bytes32)¶
Execution cost: No bound available
Params:
- _avatar of type
address - _proposalId of type
bytes32
ProposalExecuted(address,bytes32,int256)¶
Execution cost: No bound available
Params:
- _avatar of type
address - _proposalId of type
bytes32 - _param of type
int256
RevokeSignToCancelAgreement(uint256,address)¶
Execution cost: No bound available
Params:
- _agreementId of type
uint256 - _signer of type
address
SignToCancelAgreement(uint256,address)¶
Execution cost: No bound available
Params:
- _agreementId of type
uint256 - _signer of type
address
Methods¶
signToCancelAgreement(uint256)¶
Function to sign to cancel an agreement.
Execution cost: No bound available
Params:
-
_agreementId of type
uint256the relevant agreement.
agreementsCounter()¶
Execution cost: less than 766 gas
Attributes: constant
Returns:
- output_0 of type
uint256
agreements(uint256)¶
Execution cost: less than 3271 gas
Attributes: constant
Params:
- param_0 of type
uint256
Returns:
- token of type
address - beneficiary of type
address - returnOnCancelAddress of type
address - startingBlock of type
uint256 - amountPerPeriod of type
uint256 - periodLength of type
uint256 - numOfAgreedPeriods of type
uint256 - cliffInPeriods of type
uint256 - signaturesReqToCancel of type
uint256 - collectedPeriods of type
uint256 - signaturesReceivedCounter of type
uint256
owner()¶
Execution cost: less than 787 gas
Attributes: constant
Returns:
- output_0 of type
address
parameters(bytes32)¶
Execution cost: less than 894 gas
Attributes: constant
Params:
- param_0 of type
bytes32
Returns:
- voteParams of type
bytes32 - intVote of type
address
hashedParameters()¶
Execution cost: less than 744 gas
Attributes: constant
Returns:
- output_0 of type
bytes32
createVestedAgreement(address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,address[])¶
Creating a vesting agreement.
Execution cost: No bound available
Params:
-
_token of type
addressthe relevant token in the agreement.
-
_beneficiary of type
addressthe beneficiary of the agreement.
-
_returnOnCancelAddress of type
addresswhere to send the tokens in case of stoping.
-
_startingBlock of type
uint256the block from which the agreement starts.
-
_amountPerPeriod of type
uint256amount of tokens per period.
-
_periodLength of type
uint256period length in blocks.
-
_numOfAgreedPeriods of type
uint256how many periods agreed on.
-
_cliffInPeriods of type
uint256the length of the cliff in periods.
-
_signaturesReqToCancel of type
uint256number of signatures required to cancel agreement.
-
_signersArray of type
address[]avatar array of addresses that can sign to cancel agreement.
Returns:
uint the agreement index.
- output_0 of type
uint256
collect(uint256)¶
Function for a beneficiary to collect.
Execution cost: No bound available
Params:
-
_agreementId of type
uint256the relevant agreement.
organizationsData(address,bytes32)¶
Execution cost: less than 3220 gas
Attributes: constant
Params:
- param_0 of type
address - param_1 of type
bytes32
Returns:
- token of type
address - beneficiary of type
address - returnOnCancelAddress of type
address - startingBlock of type
uint256 - amountPerPeriod of type
uint256 - periodLength of type
uint256 - numOfAgreedPeriods of type
uint256 - cliffInPeriods of type
uint256 - signaturesReqToCancel of type
uint256 - collectedPeriods of type
uint256 - signaturesReceivedCounter of type
uint256
execute(bytes32,address,int256)¶
execution of proposals, can only be called by the voting machine in which the vote is held.
Execution cost: No bound available
Params:
-
_proposalId of type
bytes32the ID of the voting in the voting machine
-
_avatar of type
addressaddress of the controller
-
_param of type
int256a parameter of the voting result, 0 is no and 1 is yes.
Returns:
bool which represents a successful of the function
- output_0 of type
bool
getParametersHash(bytes32,address)¶
Hash the parameters, and return the hash value
Execution cost: less than 564 gas
Attributes: constant
Params:
-
_voteParams of type
bytes32- voting parameters
-
_intVote of type
address- voting machine contract.
Returns:
bytes32 -the parameters hash
- output_0 of type
bytes32
proposeVestingAgreement(address,address,uint256,uint256,uint256,uint256,uint256,uint256,address[],address)¶
Proposing a vesting agreement in an organization.
Execution cost: No bound available
Params:
-
_beneficiary of type
addressthe beneficiary of the agreement.
-
_returnOnCancelAddress of type
addresswhere to send the tokens in case of stoping.
-
_startingBlock of type
uint256the block from which the agreement starts.
-
_amountPerPeriod of type
uint256amount of tokens per period.
-
_periodLength of type
uint256period length in blocks.
-
_numOfAgreedPeriods of type
uint256how many periods agreed on.
-
_cliffInPeriods of type
uint256the length of the cliff in periods.
-
_signaturesReqToCancel of type
uint256number of signatures required to cancel agreement.
-
_signersArray of type
address[]avatar array of addresses that can sign to cancel agreement.
-
_avatar of type
addressavatar of the organization.
Returns:
bytes32 the proposalId
- output_0 of type
bytes32
revokeSignToCancelAgreement(uint256)¶
Function to revoke vote for canceling agreement.
Execution cost: less than 43398 gas
Params:
-
_agreementId of type
uint256the relevant agreement.
setParameters(bytes32,address)¶
Hash the parameters, save them if necessary, and return the hash value
Execution cost: less than 41091 gas
Params:
-
_voteParams of type
bytes32- voting parameters
-
_intVote of type
address- voting machine contract.
Returns:
bytes32 -the parameters hash
- output_0 of type
bytes32
transferOwnership(address)¶
Allows the current owner to transfer control of the contract to a newOwner.
Execution cost: less than 23071 gas
Params:
-
newOwner of type
addressThe address to transfer ownership to.
updateParameters(bytes32)¶
Execution cost: less than 20572 gas
Params:
- _hashedParameters of type
bytes32