UpgradeAgent

Title: UpgradeAgent
Description: Contract interface derived from UpgradeAgent by Token Market
Author: TokenMarket Ltd/Updated by Ian Bray, Tru Ltd
Solidity Version: ^0.4.18
Relative Path: ./contracts/supporting/UpgradeAgent.sol
License: Apache 2 License
Current Version: 0.1.9
Original Source: UpgradeAgent Source

1. Imports & Dependencies

There are no imports or dependencies for the UpgradeAgent Smart Contract.

2. Variables

The following variables exist for the UpgradeAgent Smart Contract:

Variable Type Vis Details
originalSupply uint256 public Variable containing the original token count of the the pre-upgrade token

3. Enums

There are no enums for the UpgradeAgent Smart Contract.

4. Events

There are no events for the UpgradeAgent Smart Contract.

5. Mappings

The are no mappings for the UpgradeAgent Smart Contract.

6. Modifiers

There are no modifiers for the UpgradeAgent Smart Contract.

7. Functions

The following functions exist for the UpgradeAgent Smart Contract:

Name Description
isUpgradeAgent Interface function for checking if an UpgradeAgent
upgradeFrom Interface function for upgrading tokens

isUpgradeAgent

Function Name: isUpgradeAgent
Description: Interface function for checking if an UpgradeAgent
Function Type: Pure
Function Visibility: Public
Function Modifiers: N/A
Return Type: bool
Return Details: returns whether an UpgradeAgent or not

Code

The code for the isUpgradeAgent function is an interface and it is defined as follows:

isUpgradeAgent Code
function isUpgradeAgent() public pure returns (bool) {
    return true;
}

Usage

The isUpgradeAgent function has the following usage syntax:

isUpgradeAgent Usage Example
isUpgradeAgent();

upgradeFrom

Function Name: upgradeFrom
Description: Interface function to upgrade from one token to another
Function Type: Pure
Function Visibility: Public
Function Modifiers: N/A
Return Type: bool
Return Details: returns whether an UpgradeAgent or not

Code

The code for the upgradeFrom function is an interface and it is defined as follows:

isUpgradeAgent Code
function isUpgradeAgent() public pure returns (bool) {
    return true;
}

Usage

The upgradeFrom function has the following usage syntax and arguments:

  Argument Type Details
1 _from address Address to transfer upgrade tokens from
2 _value uint256 Amount of tokens to upgrade
upgradeFrom Usage Example
upgradeFrom(0x123456789abcdefghijklmnopqrstuvwxyz98765, 100);