Skip to content
Verified contractPartial

TradeProfile

Address0xc41ef7caf3f9977be7b953de5d6b8e610e7be3ed
Balance

0 ETH

 

Transactions

101

 

Compiler

solc 0.4.26

 

Same code

24 more contracts

 

Details

Compiler
solc 0.4.26+commit.4563c3fc
Language
solidity
Optimization
No
EVM version
byzantium
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
9,297,350
Creation transaction
0x58c33d1e14…1f597338c4
Main copy (most transactions)
0x5b76d87c…4afa5f7f

TradeProfile.sol

/**
 *Submitted for verification at Etherscan.io on 2020-01-14
*/

pragma solidity ^0.4.24;
pragma experimental ABIEncoderV2;
contract TradeProfile {
    event LogTraderTradingTransaction(string tradingTx);
    event LogAggregatedFollowersTradingTransaction(bytes32 aggregatedTxsHash);

    mapping(address=>bool) public errand;
    address public admin;
    uint256 public strategyId;
    constructor(uint256 _strategyId) public {
        strategyId = _strategyId;
        admin = msg.sender;
    }

    /**
    * @dev Log the trader's trading transactions.
    * @param _tradingTxs string Trading transactions in JSON format.
    */
    function logTraderTradingTx(string[] _tradingTxs) public {
        require(errand[msg.sender]);
        for(uint i=0; i<_tradingTxs.length; i++) {
            emit LogTraderTradingTransaction(_tradingTxs[i]);
        }
    }

    function newErrand(address _newErrand) public {
      require(msg.sender == admin);
      errand[_newErrand] = true;
    }

    function removeErrand(address _errand) public {
      require(msg.sender == admin);
      errand[_errand] = false;
    }

    /**
    * @dev Log the followers' trading transactions.
    * @param _aggregatedTxsHash bytes32 Hash of aggregation of followers' trading transactions.
    */
    function logFollowerTradingTx(bytes32 _aggregatedTxsHash) public {
        require(errand[msg.sender]);
        emit LogAggregatedFollowersTradingTransaction(_aggregatedTxsHash);
    }
}
Compiler settingsShow
{
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "evmVersion": "byzantium",
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.