Skip to content

Smart Contracts for Azbit project (using Oraclize API)

Notifications You must be signed in to change notification settings

Dmitx/Azbit_Smart_Contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Contracts for Azbit

Azbit logo

Dependencies

truffle solidity

Smart contracts

ERC20 standard token of Azbit project.

Bounty Smart Contract of Azbit project.

List of owner functions:

Function Params Description
constructor (address) tokenAddress Constructor of AzbitBounty Contract.
sendTokens (address) beneficiary
(uint256) amount
Send tokens to beneficiary by owner.
sendTokensArray (address[]) beneficiaries
(uint256[]) amounts
Send tokens to the array of beneficiaries by owner.

List of public view functions:

Function Params Description
azbitToken –– Azbit token address.
contractTokenBalance –– Total tokens of this contract.

Airdrop Smart Contract of Azbit project.

List of owner functions:

Function Params Description
constructor (address) tokenAddress Constructor of AzbitAirdrop Contract.
sendTokens (address) beneficiary
(uint256) amount
Send tokens to beneficiary by owner.
sendTokensArray (address[]) beneficiaries
(uint256[]) amounts
Send tokens to the array of beneficiaries by owner.

List of public view functions:

Function Params Description
azbitToken –– Azbit token address.
contractTokenBalance –– Total tokens of this contract.

Smart contract for distribution tokens to Azbit advisors.

List of events:

Event Params Description
AdvisorAdded (address) advisorAddress
(TokenLockState) advisorLockState
(uint256) advisorAmount
Event for adding advisor logging.
TokensWithdrawn (address) advisorAddress
(uint256) amountWithdrawn
(uint256) amountOnContract
Event for withdrawal tokens by advisor logging.

List of enums:

Enum States Description
TokenLockState NotAdvisor (0)
WithoutLock (1)
SixMonthLock (2)
OneYearLock (3)
Token Lock State of advisors.

List of structs:

Struct Params Description
AdvisorInfo (TokenLockState) lockState
(uint256) tokensAmount
(uint256) withdrawnTokens
Information about advisors.

List of owner functions:

Function Params Description
constructor (address) tokenAddress Constructor of AzbitAdvisors Contract.
addAdvisor (address) advisorAddr
(TokenLockState) advisorLockState
(uint256) advisorAmount
Add advisor in advisors list.
addAdvisorsArray (address[]) advisorAddr
(TokenLockState[]) advisorLockState
(uint256[]) advisorAmount
Add array of advisors in advisors list.

List of external functions:

Function Params Description
withdrawTokens –– Withdrawal tokens from this contract by advisors.

List of public view functions:

Function Params Description
azbitToken –– Azbit token address.
advisors (address) advisorAddr Gets the advisor info of the specified address.
contractTokenBalance –– Total tokens of this contract.
tokenBalanceOf (address) advisorAddr Gets the token balance of the specified address.
getAdvisorInfo (address) advisorAddr Gets the advisor info of the specified address.
getStagesDates –– Gets dates of release stages.
getCurrentStage –– Gets current stage of release.
Return stage number from 0 to 4.
timeUntilNextUnlock –– Time until the next unlock of tokens.
releasableAmount (address) advisorAddr Calculates the amount that has already available but hasn't been withdrawn yet.

Smart contract for distribution tokens to US Azbit investors.

List of events:

Event Params Description
BalanceIncreased (address) investorAddress
(uint256) amount
(uint256) investorBalance
Event for increase of investor's balance logging.
TokensWithdrawn (address) investorAddress
(uint256) amountWithdrawn
(uint256) investorBalance
Event for withdrawal tokens by investor logging.

List of structs:

Struct Params Description
InvestorInfo (uint128) totalBuy
(uint128) totalWithdrawn
(uint32) currentWithdrawal
(uint128[]) tokenAmounts
(uint32[]) unlockTimes
Information about investors.

List of owner functions:

Function Params Description
constructor (address) tokenAddress Constructor of AzbitUSResidents Contract.
increaseInvestorBalance (address) beneficiary
(uint256) amount
Increase tokens balance of investor.
increaseInvestorsBalancesArray (address[]) beneficiaries
(uint256[]) amounts
Increase tokens the balance of the array of investors.

List of external functions:

Function Params Description
withdrawTokens –– Withdrawal tokens from this contract by investors.

List of public view functions:

Function Params Description
azbitToken –– Azbit token address.
investors (address) beneficiary Gets the investor info of the specified address.
lockPeriod –– Lockout period after token purchase –– 365 days.
contractTokenBalance –– Total tokens of this contract.
tokenBalanceOf (address) beneficiary Gets the token balance of the specified address.
releasableAmount (address) beneficiary Calculates the amount that has already available but hasn't been withdrawn yet.
currentUnlockTime (address) beneficiary Gets current next unlock timestamp of investor.
latestUnlockTime (address) beneficiary Gets latest unlock timestamp of investor.
getInvestorInfo (address) beneficiary Gets the investor info of the specified address.

Smart contract for check token price.

List of events:

Event Params Description
NewOraclizeQuery (string) description Event for new oraclize query logging.
NewPriceTicker (bytes32) myid
(string) price
(bytes) proof
Event for new AzbitToken price ticker logging.
SetNewGasLimit (uint256) newGasLimit Event for new gas limit logging.
SetNewGasPrice (uint256) newGasPrice Event for new gas price logging.
SetProof (string) proofType Event for set oraclize proof logging.

List of owner functions:

Function Params Description
constructor (uint256) tokenPrice Constructor of AzbitPriceTicker Contract.
Initial price of AzbitToken in USD * 1e9.
* payable
startUpdatingPrice –– Start updating of price.
* payable
setGasLimit (uint256) gasLimit Set new gas limit for oraclize query.
setGasPrice (uint256) gasPrice Set new gas price for oraclize query.
enableProof –– Enable oraclize proof.
disableProof –– Disable oraclize proof.
withdrawEth (address) wallet
(uint256) amount
Withdrawal eth from contract.

List of external functions:

Function Params Description
fallback –– Payable.

List of public view functions:

Function Params Description
initialPrice –– Initial price of AzbitToken in USD * 1e9.
oraclizeGasLimit –– Oraclize query gas limit.
oraclizeGasPrice –– Oraclize query gas price.
updateTime –– Oraclize time of price update.
Each 6 hours.
getCurrentCount (uint256) x2Count
(uint256) x3Count
(uint256) x4Count
(uint256) x5Count
Gets number of price satisfactory measurements.
getCurrentDays (uint256) x2Days
(uint256) x3Days
(uint256) x4Days
(uint256) x5Days
Gets number of price satisfactory days.

Smart contract for lock tokens of founders and team.

List of owner functions:

Function Params Description
constructor (address) tokenAddress
(uint256) tokenPrice
(address) beneficiary
Constructor of AzbitTeamTokenLock Contract.
* payable

List of external functions:

Function Params Description
withdrawTokens –– Withdrawal tokens from this contract to founders and team.

List of public view functions:

Function Params Description
azbitToken –– Azbit token.
teamAddress –– Address of founders and team.
withdrawnTokens –– Number of withdrawn tokens.
lockPeriod –– Lockout period after token purchase.
2 years.
contractTokenBalance –– Total tokens of this contract.
getReleaseDates –– Gets dates of release stages (each stage – 25%).
Timestamps of stages.
getCurrentStage –– Gets current stage of release.
Stage number from 0 to 4.
getUnlockedPercent –– Gets unlocked percent of tokens.
releasableAmount –– Calculates the amount that has already available but hasn't been withdrawn yet.

Smart contract for reserved tokens.

List of owner functions:

Function Params Description
constructor (address) tokenAddress
(uint256) tokenPrice
(address) beneficiary
Constructor of AzbitReservedTokenLock Contract.
* payable

List of external functions:

Function Params Description
withdrawTokens –– Withdrawal tokens from this contract to founders and team.

List of public view functions:

Function Params Description
azbitToken –– Azbit token.
withdrawalAddress –– Address for tokens withdrawal.
withdrawnTokens –– Number of withdrawn tokens.
lockPeriod –– Lockout period after token purchase.
5 years.
contractTokenBalance –– Total tokens of this contract.
getUnlockedPercent –– Gets unlocked percent of tokens.
releasableAmount –– Calculates the amount that has already available but hasn't been withdrawn yet.

Created by

Dmitx