Skip to content

Commit

Permalink
Merge pull request #129 from oceanprotocol/feature/rinkeby-deployment
Browse files Browse the repository at this point in the history
feature/rinkeby-deployment
  • Loading branch information
Ahmed Ali committed Jul 20, 2020
2 parents ce5c39a + 9b53c31 commit 3b9dbff
Show file tree
Hide file tree
Showing 29 changed files with 139,129 additions and 7,369 deletions.
2,847 changes: 2,847 additions & 0 deletions artifacts/rinkeby/BConst.json

Large diffs are not rendered by default.

16,514 changes: 16,514 additions & 0 deletions artifacts/rinkeby/BMath.json

Large diffs are not rendered by default.

13,047 changes: 13,047 additions & 0 deletions artifacts/rinkeby/BNum.json

Large diffs are not rendered by default.

15,612 changes: 15,612 additions & 0 deletions artifacts/rinkeby/BToken.json

Large diffs are not rendered by default.

15,395 changes: 15,395 additions & 0 deletions artifacts/rinkeby/BTokenBase.json

Large diffs are not rendered by default.

276 changes: 138 additions & 138 deletions artifacts/rinkeby/Context.json

Large diffs are not rendered by default.

968 changes: 484 additions & 484 deletions artifacts/rinkeby/Converter.json

Large diffs are not rendered by default.

1,320 changes: 837 additions & 483 deletions artifacts/rinkeby/Factory.json β†’ artifacts/rinkeby/DTFactory.json

Large diffs are not rendered by default.

3,154 changes: 1,577 additions & 1,577 deletions artifacts/rinkeby/DataTokenTemplate.json

Large diffs are not rendered by default.

300 changes: 150 additions & 150 deletions artifacts/rinkeby/Deployer.json

Large diffs are not rendered by default.

4,092 changes: 2,046 additions & 2,046 deletions artifacts/rinkeby/ERC20.json

Large diffs are not rendered by default.

1,316 changes: 658 additions & 658 deletions artifacts/rinkeby/ERC20Pausable.json

Large diffs are not rendered by default.

680 changes: 340 additions & 340 deletions artifacts/rinkeby/IERC20.json

Large diffs are not rendered by default.

716 changes: 358 additions & 358 deletions artifacts/rinkeby/IERC20Template.json

Large diffs are not rendered by default.

224 changes: 112 additions & 112 deletions artifacts/rinkeby/Migrations.json

Large diffs are not rendered by default.

3,603 changes: 3,603 additions & 0 deletions artifacts/rinkeby/SFactory.json

Large diffs are not rendered by default.

63,656 changes: 63,656 additions & 0 deletions artifacts/rinkeby/SPool.json

Large diffs are not rendered by default.

1,956 changes: 978 additions & 978 deletions artifacts/rinkeby/SafeMath.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/contracts/Factory.md β†’ docs/contracts/DTFactory.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## `Factory`
## `DTFactory`



Implementation of Ocean DataTokens Factory

Factory deploys DataToken proxy contracts.
DTFactory deploys DataToken proxy contracts.
New DataToken proxy contracts are links to the template contract's bytecode.
Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard.

Expand Down
38 changes: 38 additions & 0 deletions docs/contracts/SFactory.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## `SFactory`






### `constructor(address spoolTemplate)` (public)





### `newSPool() β†’ address spool` (public)





### `getSPool() β†’ address` (external)






### `SPoolCreated(address newSPoolAddress, address spoolTemplateAddress)`





### `SPoolRegistered(address spoolAddress, address registeredBy, uint256 registeredAt)`





8 changes: 8 additions & 0 deletions docs/contracts/balancer/BConst.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## `BConst`







107 changes: 107 additions & 0 deletions docs/contracts/balancer/BMath.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
## `BMath`






### `calcSpotPrice(uint256 tokenBalanceIn, uint256 tokenWeightIn, uint256 tokenBalanceOut, uint256 tokenWeightOut, uint256 swapFee) β†’ uint256 spotPrice` (public)

********************************************************************************************
// calcSpotPrice //
// sP = spotPrice //
// bI = tokenBalanceIn ( bI / wI ) 1 //
// bO = tokenBalanceOut sP = ----------- * ---------- //
// wI = tokenWeightIn ( bO / wO ) ( 1 - sF ) //
// wO = tokenWeightOut //
// sF = swapFee //*********************************************************************************************



### `calcOutGivenIn(uint256 tokenBalanceIn, uint256 tokenWeightIn, uint256 tokenBalanceOut, uint256 tokenWeightOut, uint256 tokenAmountIn, uint256 swapFee) β†’ uint256 tokenAmountOut` (public)

********************************************************************************************
// calcOutGivenIn //
// aO = tokenAmountOut //
// bO = tokenBalanceOut //
// bI = tokenBalanceIn / / bI \ (wI / wO) \ //
// aI = tokenAmountIn aO = bO * | 1 - | -------------------------- | ^ | //
// wI = tokenWeightIn \ \ ( bI + ( aI * ( 1 - sF )) / / //
// wO = tokenWeightOut //
// sF = swapFee //*********************************************************************************************



### `calcInGivenOut(uint256 tokenBalanceIn, uint256 tokenWeightIn, uint256 tokenBalanceOut, uint256 tokenWeightOut, uint256 tokenAmountOut, uint256 swapFee) β†’ uint256 tokenAmountIn` (public)

********************************************************************************************
// calcInGivenOut //
// aI = tokenAmountIn //
// bO = tokenBalanceOut / / bO \ (wO / wI) \ //
// bI = tokenBalanceIn bI * | | ------------ | ^ - 1 | //
// aO = tokenAmountOut aI = \ \ ( bO - aO ) / / //
// wI = tokenWeightIn -------------------------------------------- //
// wO = tokenWeightOut ( 1 - sF ) //
// sF = swapFee //*********************************************************************************************



### `calcPoolOutGivenSingleIn(uint256 tokenBalanceIn, uint256 tokenWeightIn, uint256 poolSupply, uint256 totalWeight, uint256 tokenAmountIn, uint256 swapFee) β†’ uint256 poolAmountOut` (public)

********************************************************************************************
// calcPoolOutGivenSingleIn //
// pAo = poolAmountOut / \ //
// tAi = tokenAmountIn /// / // wI \ \\ \ wI \ //
// wI = tokenWeightIn //| tAi *| 1 - || 1 - -- | * sF || + tBi \ -- \ //
// tW = totalWeight pAo=|| \ \ \\ tW / // | ^ tW | * pS - pS //
// tBi = tokenBalanceIn \\ ------------------------------------- / / //
// pS = poolSupply \\ tBi / / //
// sF = swapFee \ / //*********************************************************************************************



### `calcSingleInGivenPoolOut(uint256 tokenBalanceIn, uint256 tokenWeightIn, uint256 poolSupply, uint256 totalWeight, uint256 poolAmountOut, uint256 swapFee) β†’ uint256 tokenAmountIn` (public)

********************************************************************************************
// calcSingleInGivenPoolOut //
// tAi = tokenAmountIn //(pS + pAo)\ / 1 \\ //
// pS = poolSupply || --------- | ^ | --------- || * bI - bI //
// pAo = poolAmountOut \\ pS / \(wI / tW)// //
// bI = balanceIn tAi = -------------------------------------------- //
// wI = weightIn / wI \ //
// tW = totalWeight | 1 - ---- | * sF //
// sF = swapFee \ tW / //*********************************************************************************************



### `calcSingleOutGivenPoolIn(uint256 tokenBalanceOut, uint256 tokenWeightOut, uint256 poolSupply, uint256 totalWeight, uint256 poolAmountIn, uint256 swapFee) β†’ uint256 tokenAmountOut` (public)

********************************************************************************************
// calcSingleOutGivenPoolIn //
// tAo = tokenAmountOut / / \\ //
// bO = tokenBalanceOut / // pS - (pAi * (1 - eF)) \ / 1 \ \\ //
// pAi = poolAmountIn | bO - || ----------------------- | ^ | --------- | * b0 || //
// ps = poolSupply \ \\ pS / \(wO / tW)/ // //
// wI = tokenWeightIn tAo = \ \ // //
// tW = totalWeight / / wO \ \ //
// sF = swapFee * | 1 - | 1 - ---- | * sF | //
// eF = exitFee \ \ tW / / //*********************************************************************************************



### `calcPoolInGivenSingleOut(uint256 tokenBalanceOut, uint256 tokenWeightOut, uint256 poolSupply, uint256 totalWeight, uint256 tokenAmountOut, uint256 swapFee) β†’ uint256 poolAmountIn` (public)

********************************************************************************************
// calcPoolInGivenSingleOut //
// pAi = poolAmountIn // / tAo \\ / wO \ \ //
// bO = tokenBalanceOut // | bO - -------------------------- |\ | ---- | \ //
// tAo = tokenAmountOut pS - || \ 1 - ((1 - (tO / tW)) * sF)/ | ^ \ tW / * pS | //
// ps = poolSupply \\ -----------------------------------/ / //
// wO = tokenWeightOut pAi = \\ bO / / //
// tW = totalWeight ------------------------------------------------------------- //
// sF = swapFee ( 1 - eF ) //
// eF = exitFee //*********************************************************************************************




68 changes: 68 additions & 0 deletions docs/contracts/balancer/BNum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
## `BNum`






### `btoi(uint256 a) β†’ uint256` (internal)





### `bfloor(uint256 a) β†’ uint256` (internal)





### `badd(uint256 a, uint256 b) β†’ uint256` (internal)





### `bsub(uint256 a, uint256 b) β†’ uint256` (internal)





### `bsubSign(uint256 a, uint256 b) β†’ uint256, bool` (internal)





### `bmul(uint256 a, uint256 b) β†’ uint256` (internal)





### `bdiv(uint256 a, uint256 b) β†’ uint256` (internal)





### `bpowi(uint256 a, uint256 n) β†’ uint256` (internal)





### `bpow(uint256 base, uint256 exp) β†’ uint256` (internal)





### `bpowApprox(uint256 base, uint256 exp, uint256 precision) β†’ uint256` (internal)






74 changes: 74 additions & 0 deletions docs/contracts/balancer/BToken.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
## `BToken`






### `name() β†’ string` (public)





### `symbol() β†’ string` (public)





### `decimals() β†’ uint8` (public)





### `allowance(address src, address dst) β†’ uint256` (external)





### `balanceOf(address whom) β†’ uint256` (external)





### `totalSupply() β†’ uint256` (public)





### `approve(address dst, uint256 amt) β†’ bool` (external)





### `increaseApproval(address dst, uint256 amt) β†’ bool` (external)





### `decreaseApproval(address dst, uint256 amt) β†’ bool` (external)





### `transfer(address dst, uint256 amt) β†’ bool` (external)





### `transferFrom(address src, address dst, uint256 amt) β†’ bool` (external)






0 comments on commit 3b9dbff

Please sign in to comment.