Skip to content

Commit

Permalink
replace ocean token with test token
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Aug 12, 2020
1 parent 738b743 commit 35828ea
Show file tree
Hide file tree
Showing 105 changed files with 284 additions and 2,324 deletions.
Binary file removed assets/signatures.db
Binary file not shown.
1 change: 0 additions & 1 deletion assets/signatures.json

This file was deleted.

1 change: 0 additions & 1 deletion contracts.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"AccessSecretStoreCondition",
"EscrowReward",
"EscrowAccessSecretStoreTemplate",
"OceanToken",
"DIDRegistry",
"ThresholdCondition",
"WhitelistingCondition",
Expand Down
18 changes: 9 additions & 9 deletions contracts/Dispenser.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pragma solidity 0.5.6;

import 'openzeppelin-eth/contracts/math/SafeMath.sol';
import 'openzeppelin-eth/contracts/ownership/Ownable.sol';
import './OceanToken.sol';
import './TestToken.sol';

/**
* @title Ocean Protocol Dispenser Contract
Expand All @@ -29,7 +29,7 @@ contract Dispenser is Ownable {
uint256 internal minPeriod;
uint256 internal scale;

OceanToken public oceanToken;
TestToken public token;

event RequestFrequencyExceeded(
address indexed requester,
Expand All @@ -53,25 +53,25 @@ contract Dispenser is Ownable {

/**
* @dev Dispenser Initializer
* @param _oceanTokenAddress The deployed contract address of an OceanToken
* @param _tokenAddress The deployed contract address of an ERC20
* @param _owner The owner of the Dispenser
* Runs only on initial contract creation.
*/
function initialize(
address _oceanTokenAddress,
address _tokenAddress,
address _owner
)
external
initializer
isValidAddress(_oceanTokenAddress)
isValidAddress(_tokenAddress)
{
Ownable.initialize(_owner);
// init total mint amount
totalMintAmount = 0;
// instantiate OceanToken contract
oceanToken = OceanToken(_oceanTokenAddress);
// instantiate Token contract
token = TestToken(_tokenAddress);

scale = 10 ** uint256(oceanToken.decimals());
scale = 10 ** uint256(token.decimals());
maxAmount = uint256(1000).mul(scale);
minPeriod = 0;

Expand Down Expand Up @@ -118,7 +118,7 @@ contract Dispenser is Ownable {
return false;
} else {
require(
oceanToken.mint(msg.sender, amountWithDigits),
token.mint(msg.sender, amountWithDigits),
'Token minting failed.'
);

Expand Down
14 changes: 7 additions & 7 deletions contracts/OceanToken.sol → contracts/TestToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ import 'openzeppelin-eth/contracts/token/ERC20/ERC20Detailed.sol';
import 'openzeppelin-eth/contracts/ownership/Ownable.sol';

/**
* @title Ocean Protocol ERC20 Token Contract
* @title Test Token Contract
* @author Keyko & Ocean Protocol
*
* @dev Implementation of the Ocean Token.
* Ocean Token is ERC20 token
* @dev Implementation of a Test Token.
* Test Token is an ERC20 token only for testing purposes
*/
contract OceanToken is Ownable, ERC20Detailed, ERC20Capped {
contract TestToken is Ownable, ERC20Detailed, ERC20Capped {

using SafeMath for uint256;

/**
* @dev OceanToken Initializer
* @dev TestToken Initializer
* Runs only on initial contract creation.
* @param _owner refers to the owner of the contract
* @param _initialMinter is the first token minter added
Expand All @@ -29,10 +29,10 @@ contract OceanToken is Ownable, ERC20Detailed, ERC20Capped {
public
initializer
{
uint256 CAP = 1410000000;
uint256 CAP = 1500000000;
uint256 TOTALSUPPLY = CAP.mul(10 ** 18);

ERC20Detailed.initialize('OceanToken', 'OCEAN', 18);
ERC20Detailed.initialize('TestToken', 'NVM', 18);
ERC20Capped.initialize(TOTALSUPPLY, _owner);
Ownable.initialize(_owner);

Expand Down
27 changes: 0 additions & 27 deletions contracts/test/Dispenser/DispenserChangeFunctionSignature.sol

This file was deleted.

14 changes: 0 additions & 14 deletions contracts/test/Dispenser/DispenserChangeInStorage.sol

This file was deleted.

12 changes: 0 additions & 12 deletions contracts/test/Dispenser/DispenserChangeInStorageAndLogic.sol

This file was deleted.

16 changes: 0 additions & 16 deletions contracts/test/Dispenser/DispenserExtraFunctionality.sol

This file was deleted.

31 changes: 0 additions & 31 deletions contracts/test/Dispenser/DispenserWithBug.sol

This file was deleted.

11 changes: 0 additions & 11 deletions contracts/test/OceanToken/OceanTokenChangeInStorage.sol

This file was deleted.

21 changes: 0 additions & 21 deletions contracts/test/OceanToken/OceanTokenChangeInStorageAndLogic.sol

This file was deleted.

16 changes: 0 additions & 16 deletions contracts/test/OceanToken/OceanTokenExtraFunctionality.sol

This file was deleted.

8 changes: 4 additions & 4 deletions doc/RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ One instance of the multi sig wallet, defined as `owner`. This wallet will be as

##### Deploy a single contracts

- To deploy a single contract you need to specify the contracts to deploy as a parameter to the deploy script: ie. `npm run deploy:staging -- OceanToken Dispenser`will deploy `OceanToken` and `Dispenser`.
- To deploy a single contract you need to specify the contracts to deploy as a parameter to the deploy script: ie. `npm run deploy:staging -- TestToken Dispenser`will deploy `TestToken` and `Dispenser`.

##### Upgrade the whole application

- To upgrade all contracts run `npm run upgrade:staging`

##### Upgrade a single contract

- To upgrade a single contract run `npm run upgrade:staging -- OceanToken`. For upgrading the `OceanToken` contract.
- To upgrade a single contract run `npm run upgrade:staging -- TestToken`. For upgrading the `TestToken` contract.

##### Persist artifacts

Expand All @@ -79,15 +79,15 @@ One instance of the multi sig wallet, defined as `owner`. This wallet will be as

##### Deploy a single contracts

- To deploy a single contracts you need to specify the contracts to deploy as a parameter to the deploy script: ie. `npm run deploy:kovan -- OceanToken Dispenser` will deploy `OceanToken` and `Dispenser`.
- To deploy a single contracts you need to specify the contracts to deploy as a parameter to the deploy script: ie. `npm run deploy:kovan -- TestToken Dispenser` will deploy `TestToken` and `Dispenser`.

##### Upgrade the whole application

- To upgrade all contracts run `npm run upgrade:kovan`

##### Upgrade a single contract

- To upgrade a single contract run `npm run upgrade:kovan -- OceanToken`. For upgrading the `OceanToken` contract.
- To upgrade a single contract run `npm run upgrade:kovan -- TestToken`. For upgrading the `TestToken` contract.

##### Persist artifacts

Expand Down
9 changes: 4 additions & 5 deletions doc/UPGRADES.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ function that will be executed only once after the initial deployment.
"AccessSecretStoreCondition",
"EscrowReward",
"EscrowAccessSecretStoreTemplate",
"OceanToken",
"DIDRegistry"
]
```
Expand Down Expand Up @@ -100,15 +99,15 @@ The following steps shows how to perform contracts deployment and upgrade on `Ni

##### Deploy a single contracts

- To deploy a single contract you need to specify the contracts to deploy as a parameter to the deploy script: ie. `npm run deploy:staging -- OceanToken Dispenser`will deploy `OceanToken` and `Dispenser`.
- To deploy a single contract you need to specify the contracts to deploy as a parameter to the deploy script: ie. `npm run deploy:staging -- TestToken Dispenser`will deploy `TestToken` and `Dispenser`.

##### Upgrade the whole application

- To upgrade all contracts run `npm run upgrade:staging`

##### Upgrade a single contract

- To upgrade a single contract run `npm run upgrade:staging -- OceanToken`. For upgrading the `OceanToken` contract.
- To upgrade a single contract run `npm run upgrade:staging -- TestToken`. For upgrading the `TestToken` contract.

##### Persist artifacts

Expand All @@ -126,15 +125,15 @@ The following steps shows how to perform contracts deployment and upgrade on `Ni

##### Deploy a single contracts

- To deploy a single contracts you need to specify the contracts to deploy as a parameter to the deploy script: ie. `npm run deploy:kovan -- OceanToken Dispenser` will deploy `OceanToken` and `Dispenser`.
- To deploy a single contracts you need to specify the contracts to deploy as a parameter to the deploy script: ie. `npm run deploy:kovan -- TestToken Dispenser` will deploy `TestToken` and `Dispenser`.

##### Upgrade the whole application

- To upgrade all contracts run `npm run upgrade:kovan`

##### Upgrade a single contract

- To upgrade a single contract run `npm run upgrade:kovan -- OceanToken`. For upgrading the `OceanToken` contract.
- To upgrade a single contract run `npm run upgrade:kovan -- TestToken`. For upgrading the `TestToken` contract.

##### Persist artifacts

Expand Down
2 changes: 1 addition & 1 deletion doc/contracts/AccessSecretStoreCondition.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Documentation:
```
@title Access Secret Store Condition
@author Ocean Protocol Team
@author Keyko & Ocean Protocol
* @dev Implementation of the Access Secret Store Condition
* Access Secret Store Condition is special condition
where parity secret store can encrypt/decrypt documents
Expand Down
2 changes: 1 addition & 1 deletion doc/contracts/AgreementStoreLibrary.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Documentation:
```
@title Agreement Store Library
@author Ocean Protocol Team
@author Keyko & Ocean Protocol
* @dev Implementation of the Agreement Store Library.
For more information: https://github.com/oceanprotocol/OEPs/issues/125
TODO: update the OEP link
Expand Down
2 changes: 1 addition & 1 deletion doc/contracts/AgreementStoreManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Documentation:
```
@title Agreement Store Manager
@author Ocean Protocol Team
@author Keyko & Ocean Protocol
* @dev Implementation of the Agreement Store.
TODO: link to OEP
* The agreement store generates conditions for an agreement template.
Expand Down
2 changes: 1 addition & 1 deletion doc/contracts/AgreementTemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Documentation:
```
@title Agreement Template
@author Ocean Protocol Team
@author Keyko & Ocean Protocol
* @dev Implementation of Agreement Template
* Agreement template is a reference template where it
has the ability to create agreements from whitelisted
Expand Down
2 changes: 1 addition & 1 deletion doc/contracts/Common.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Documentation:
```
@title Common functions
@author Ocean Protocol Team
@author Keyko & Ocean Protocol
```

## Functions
Expand Down
2 changes: 1 addition & 1 deletion doc/contracts/ComputeExecutionCondition.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Documentation:
```
@title Compute Execution Condition
@author Ocean Protocol Team
@author Keyko & Ocean Protocol
* @dev Implementation of the Compute Execution Condition
This condition is meant to be a signal in which triggers
the execution of a compute service. The compute service is fully described
Expand Down

0 comments on commit 35828ea

Please sign in to comment.