UController¶
Universal Controller contract
Execution cost: less than 4240 gas
Deployment cost: less than 3752800 gas
Combined cost: less than 3757040 gas
Constructor¶
Events¶
ExternalTokenTransfer(address,address,address,uint256)¶
Execution cost: No bound available
Params:
- _sender of type
address
- _externalToken of type
address
- _to of type
address
- _value of type
uint256
MintReputation(address,address,uint256,address)¶
Execution cost: No bound available
Params:
- _sender of type
address
- _to of type
address
- _amount of type
uint256
- _avatar of type
address
AddGlobalConstraint(address,bytes32,uint8,address)¶
Execution cost: No bound available
Params:
- _globalConstraint of type
address
- _params of type
bytes32
- _when of type
uint8
- _avatar of type
address
ExternalTokenDecreaseApproval(address,address,address,uint256)¶
Execution cost: No bound available
Params:
- _sender of type
address
- _externalToken of type
address
- _spender of type
address
- _value of type
uint256
ExternalTokenIncreaseApproval(address,address,address,uint256)¶
Execution cost: No bound available
Params:
- _sender of type
address
- _externalToken of type
address
- _spender of type
address
- _value of type
uint256
GenericAction(address,bytes32[])¶
Execution cost: No bound available
Params:
- _sender of type
address
- _params of type
bytes32[]
ExternalTokenTransferFrom(address,address,address,address,uint256)¶
Execution cost: No bound available
Params:
- _sender of type
address
- _externalToken of type
address
- _from of type
address
- _to of type
address
- _value of type
uint256
BurnReputation(address,address,uint256,address)¶
Execution cost: No bound available
Params:
- _sender of type
address
- _from of type
address
- _amount of type
uint256
- _avatar of type
address
MintTokens(address,address,uint256,address)¶
Execution cost: No bound available
Params:
- _sender of type
address
- _beneficiary of type
address
- _amount of type
uint256
- _avatar of type
address
RegisterScheme(address,address,address)¶
Execution cost: No bound available
Params:
- _sender of type
address
- _scheme of type
address
- _avatar of type
address
RemoveGlobalConstraint(address,uint256,bool,address)¶
Execution cost: No bound available
Params:
- _globalConstraint of type
address
- _index of type
uint256
- _isPre of type
bool
- _avatar of type
address
SendEther(address,uint256,address)¶
Execution cost: No bound available
Params:
- _sender of type
address
- _amountInWei of type
uint256
- _to of type
address
UnregisterScheme(address,address,address)¶
Execution cost: No bound available
Params:
- _sender of type
address
- _scheme of type
address
- _avatar of type
address
UpgradeController(address,address,address)¶
Execution cost: No bound available
Params:
- _oldController of type
address
- _newController of type
address
- _avatar of type
address
Methods¶
globalConstraintsCount(address)¶
globalConstraintsCount return the global constraint pre and post count
Execution cost: less than 1192 gas
Attributes: constant
Params:
- _avatar of type
address
Returns:
uint globalConstraintsPre count.uint globalConstraintsPost count.
- output_0 of type
uint256
- output_1 of type
uint256
externalTokenTransferFrom(address,address,address,uint256,address)¶
transfer token "from" address "to" address One must to approve the amount of tokens which can be spend from the "from" account.This can be done using externalTokenApprove.
Execution cost: No bound available
Params:
-
_externalToken of type
address
the address of the Token Contract
-
_from of type
address
address of the account to send from
-
_to of type
address
address of the beneficiary
-
_value of type
uint256
the amount of ether (in Wei) to send
-
_avatar of type
address
the organization avatar.
Returns:
bool which represents a success
- output_0 of type
bool
addGlobalConstraint(address,bytes32,address)¶
add or update Global Constraint
Execution cost: No bound available
Params:
-
_globalConstraint of type
address
the address of the global constraint to be added.
-
_params of type
bytes32
the constraint parameters hash.
-
_avatar of type
address
the avatar of the organization
Returns:
bool which represents a success
- output_0 of type
bool
externalTokenDecreaseApproval(address,address,uint256,address)¶
decrease approval for the spender address to spend a specified amount of tokens on behalf of msg.sender.
Execution cost: No bound available
Params:
-
_externalToken of type
address
the address of the Token Contract
-
_spender of type
address
address
-
_subtractedValue of type
uint256
the amount of ether (in Wei) which the approval is referring to.
-
_avatar of type
address
the organization avatar.
Returns:
bool which represents a success
- output_0 of type
bool
externalTokenTransfer(address,address,uint256,address)¶
send some amount of arbitrary ERC20 Tokens
Execution cost: No bound available
Params:
-
_externalToken of type
address
the address of the Token Contract
-
_to of type
address
address of the beneficiary
-
_value of type
uint256
the amount of ether (in Wei) to send
-
_avatar of type
address
the organization avatar.
Returns:
bool which represents a success
- output_0 of type
bool
burnReputation(uint256,address,address)¶
Burns
_amount
of reputation from_from
Execution cost: No bound available
Params:
-
_amount of type
uint256
amount of reputation to burn
-
_from of type
address
The address that will lose the reputation
-
_avatar of type
address
Returns:
bool which represents a success
- output_0 of type
bool
externalTokenIncreaseApproval(address,address,uint256,address)¶
increase approval for the spender address to spend a specified amount of tokens on behalf of msg.sender.
Execution cost: No bound available
Params:
-
_externalToken of type
address
the address of the Token Contract
-
_spender of type
address
address
-
_addedValue of type
uint256
the amount of ether (in Wei) which the approval is referring to.
-
_avatar of type
address
the organization avatar.
Returns:
bool which represents a success
- output_0 of type
bool
isSchemeRegistered(address,address)¶
Execution cost: less than 1217 gas
Attributes: constant
Params:
- _scheme of type
address
- _avatar of type
address
Returns:
- output_0 of type
bool
genericAction(bytes32[],address)¶
do a generic delegate call to the contract which called us. This function use delegatecall and might expose the organization to security risk. Use this function only if you really knows what you are doing.
Execution cost: No bound available
Params:
-
_params of type
bytes32[]
the params for the call.
-
_avatar of type
address
the organization avatar.
Returns:
bool which represents success
- output_0 of type
bool
newOrganization(address)¶
newOrganization set up a new organization with default daoCreator.
Execution cost: No bound available
Params:
-
_avatar of type
address
the organization avatar
mintTokens(uint256,address,address)¶
mint tokens .
Execution cost: No bound available
Params:
-
_amount of type
uint256
amount of token to mint
-
_beneficiary of type
address
beneficiary address
-
_avatar of type
address
the organization avatar.
Returns:
bool which represents a success
- output_0 of type
bool
isGlobalConstraintRegistered(address,address)¶
Execution cost: less than 1771 gas
Attributes: constant
Params:
- _globalConstraint of type
address
- _avatar of type
address
Returns:
- output_0 of type
bool
mintReputation(uint256,address,address)¶
Mint
_amount
of reputation that are assigned to_to
.
Execution cost: No bound available
Params:
-
_amount of type
uint256
amount of reputation to mint
-
_to of type
address
beneficiary address
-
_avatar of type
address
the address of the organization's avatar
Returns:
bool which represents a success
- output_0 of type
bool
getSchemeParameters(address,address)¶
Execution cost: less than 811 gas
Attributes: constant
Params:
- _scheme of type
address
- _avatar of type
address
Returns:
- output_0 of type
bytes32
getNativeReputation(address)¶
getNativeReputation
Execution cost: less than 1062 gas
Attributes: constant
Params:
-
_avatar of type
address
the organization avatar.
Returns:
organization native reputation
- output_0 of type
address
getSchemePermissions(address,address)¶
Execution cost: less than 1186 gas
Attributes: constant
Params:
- _scheme of type
address
- _avatar of type
address
Returns:
- output_0 of type
bytes4
newControllers(address)¶
Execution cost: less than 846 gas
Attributes: constant
Params:
- param_0 of type
address
Returns:
- output_0 of type
address
organizations(address)¶
Execution cost: less than 1391 gas
Attributes: constant
Params:
- param_0 of type
address
Returns:
- nativeToken of type
address
- nativeReputation of type
address
- exist of type
bool
registerScheme(address,bytes32,bytes4,address)¶
register or update a scheme
Execution cost: No bound available
Params:
-
_scheme of type
address
the address of the scheme
-
_paramsHash of type
bytes32
a hashed configuration of the usage of the scheme
-
_permissions of type
bytes4
the permissions the new scheme will have
-
_avatar of type
address
the organization avatar.
Returns:
bool which represents a success
- output_0 of type
bool
removeGlobalConstraint(address,address)¶
remove Global Constraint
Execution cost: No bound available
Params:
-
_globalConstraint of type
address
the address of the global constraint to be remove.
-
_avatar of type
address
the organization avatar.
Returns:
bool which represents a success
- output_0 of type
bool
reputations(address)¶
Execution cost: less than 617 gas
Attributes: constant
Params:
- param_0 of type
address
Returns:
- output_0 of type
bool
sendEther(uint256,address,address)¶
send some ether
Execution cost: No bound available
Params:
-
_amountInWei of type
uint256
the amount of ether (in Wei) to send
-
_to of type
address
address of the beneficiary
-
_avatar of type
address
the organization avatar.
Returns:
bool which represents a success
- output_0 of type
bool
tokens(address)¶
Execution cost: less than 1057 gas
Attributes: constant
Params:
- param_0 of type
address
Returns:
- output_0 of type
bool
unregisterScheme(address,address)¶
unregister a scheme
Execution cost: No bound available
Params:
-
_scheme of type
address
the address of the scheme
-
_avatar of type
address
the organization avatar.
Returns:
bool which represents a success
- output_0 of type
bool
unregisterSelf(address)¶
unregister the caller's scheme
Execution cost: less than 28553 gas
Params:
-
_avatar of type
address
the organization avatar.
Returns:
bool which represents a success
- output_0 of type
bool
upgradeController(address,address)¶
upgrade the Controller The function will trigger an event 'UpgradeController'.
Execution cost: No bound available
Params:
-
_newController of type
address
the address of the new controller.
-
_avatar of type
address
the organization avatar.
Returns:
bool which represents a success
- output_0 of type
bool