Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

Commit

Permalink
Update ICT post refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-es committed Jun 22, 2020
1 parent cf80867 commit 664dd6b
Show file tree
Hide file tree
Showing 89 changed files with 14,526 additions and 204 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pragma solidity 0.6.4;
// "SPDX-License-Identifier: Apache-2.0"
pragma solidity 0.6.10;
pragma experimental ABIEncoderV2;

import "./CheckpointStorage.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pragma solidity 0.6.4;
// "SPDX-License-Identifier: Apache-2.0"
pragma solidity 0.6.10;


contract CheckpointStorage {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pragma solidity 0.6.4;
// "SPDX-License-Identifier: Apache-2.0"
pragma solidity 0.6.10;
pragma experimental ABIEncoderV2;

import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
Expand All @@ -9,6 +10,8 @@ import "./CheckpointedTokenStorage.sol";

contract CheckpointedToken is CheckpointedTokenStorage, ERC20, ReentrancyGuard {

constructor(string memory name, string memory symbol) ERC20(name, symbol) public {}

/**
* @notice returns an array of holders with non zero balance at a given checkpoint
* @param checkpointId Checkpoint id at which holder list is to be populated
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pragma solidity 0.6.4;
// "SPDX-License-Identifier: Apache-2.0"
pragma solidity 0.6.10;
pragma experimental ABIEncoderV2;

import "../Checkpoint/Checkpoint.sol";
Expand Down
5 changes: 4 additions & 1 deletion packages/ap-contracts/contracts/ICT/DepositAllocater.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pragma solidity 0.6.4;
// "SPDX-License-Identifier: Apache-2.0"
pragma solidity 0.6.10;
pragma experimental ABIEncoderV2;

import "openzeppelin-solidity/contracts/math/SafeMath.sol";
Expand All @@ -16,6 +17,8 @@ contract DepositAllocater is CheckpointedToken, DepositAllocaterStorage {

using SafeMath for uint256;


constructor(string memory name, string memory symbol) CheckpointedToken(name, symbol) public {}

function createDeposit(bytes32 depositId, uint256 scheduledFor, bool onlySignaled, address token) public {
Deposit storage deposit = deposits[depositId];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pragma solidity 0.6.4;
// "SPDX-License-Identifier: Apache-2.0"
pragma solidity 0.6.10;

/**
* @title Holds the storage variable for the FDTCheckpoint (i.e ERC20, Ether)
Expand Down
15 changes: 8 additions & 7 deletions packages/ap-contracts/contracts/ICT/ICT.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
pragma solidity ^0.6.4;
// "SPDX-License-Identifier: Apache-2.0"
pragma solidity ^0.6.10;
pragma experimental ABIEncoderV2;

import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "@atpar/actus-solidity/contracts/Core/Utils.sol";

import "../../Core/AssetRegistry/IAssetRegistry.sol";
import "../Core/Base/AssetRegistry/IAssetRegistry.sol";
import "./DepositAllocater.sol";


Expand All @@ -18,7 +19,7 @@ contract ICT is IERC20, Ownable, DepositAllocater, Utils {
bytes32 public assetId;


constructor(IAssetRegistry _assetRegistry) public {
constructor(IAssetRegistry _assetRegistry) DepositAllocater("Investment Certificate Token", "ICT") public {
assetRegistry = _assetRegistry;
}

Expand All @@ -38,13 +39,13 @@ contract ICT is IERC20, Ownable, DepositAllocater, Utils {
);

(EventType eventType, uint256 scheduleTime) = decodeEvent(_event);
LifecycleTerms memory terms = assetRegistry.getTerms(assetId);
address currency = assetRegistry.getAddressValueForTermsAttribute(assetId, "currency");

createDeposit(
_event,
scheduleTime,
(eventType == EventType.RD),
terms.currency
false, // (eventType == EventType.RD),
currency
);
}

Expand Down
191 changes: 0 additions & 191 deletions packages/ap-contracts/test/Core/AssetActor/TestEnhancements.js

This file was deleted.

38 changes: 38 additions & 0 deletions packages/ap-contracts/ts-bindings/ACTUSConstants.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* Generated by ts-generator ver. 0.0.8 */
/* tslint:disable */

import BN from "bn.js";
import { Contract, ContractOptions } from "web3-eth-contract";
import { EventLog } from "web3-core";
import { EventEmitter } from "events";
import { ContractEvent, Callback, TransactionObject, BlockType } from "./types";

interface EventOptions {
filter?: object;
fromBlock?: BlockType;
topics?: string[];
}

export class ACTUSConstants extends Contract {
constructor(
jsonInterface: any[],
address?: string,
options?: ContractOptions
);
clone(): ACTUSConstants;
methods: {
MAX_CYCLE_SIZE(): TransactionObject<string>;

MAX_EVENT_SCHEDULE_SIZE(): TransactionObject<string>;

ONE_POINT_ZERO(): TransactionObject<string>;

PRECISION(): TransactionObject<string>;
};
events: {
allEvents: (
options?: EventOptions,
cb?: Callback<EventLog>
) => EventEmitter;
};
}
Loading

0 comments on commit 664dd6b

Please sign in to comment.