diff --git a/contracts/JurisdictionUpgradable.sol b/contracts/JurisdictionUpgradable.sol index 240605d..9adaeb8 100644 --- a/contracts/JurisdictionUpgradable.sol +++ b/contracts/JurisdictionUpgradable.sol @@ -19,8 +19,8 @@ import "./abstract/CommonYJUpgradable.sol"; import "./abstract/Rules.sol"; import "./abstract/ContractBase.sol"; import "./abstract/Opinions.sol"; -import "./abstract/Recursion.sol"; -import "./abstract/Posts.sol"; +// import "./abstract/Recursion.sol"; +// import "./abstract/Posts.sol"; /** @@ -46,8 +46,8 @@ contract JurisdictionUpgradable is ContractBase, CommonYJUpgradable, Opinions, - Recursion, - Posts, + // Recursion, //DEPRECATE / Cleanp + // Posts, ERC1155RolesTrackerUp { // ERC1155RolesUpgradable { @@ -68,6 +68,13 @@ contract JurisdictionUpgradable is // mapping(uint256 => address) internal _cases; // Mapping for Case Contracts //DEPRECATED - No need for Case IDs, Use Hash mapping(address => bool) internal _active; // Mapping for Case Contracts + //Post Input Struct + struct PostInput { + uint256 tokenId; + string entRole; + string uri; + } + //--- Functions /// ERC165 - Supported Interfaces @@ -76,15 +83,17 @@ contract JurisdictionUpgradable is || interfaceId == type(IRules).interfaceId || super.supportsInterface(interfaceId); } - + /// Initializer function initialize (address hub, string calldata name_, string calldata uri_) public override initializer { //Initializers // __ERC1155RolesUpgradable_init(""); __CommonYJ_init(hub); __setTargetContract(IAssoc(address(_HUB)).getAssoc("avatar")); + //Init Recursion Controls - __Recursion_init(address(_HUB)); + // __Recursion_init(address(_HUB)); //DEPRECATED + //Set Contract URI _setContractURI(uri_); //Identifiers @@ -168,7 +177,7 @@ contract JurisdictionUpgradable is function repAdd(address contractAddr, uint256 tokenId, string calldata domain, bool rating, uint8 amount) external override { //Validate - Called by Child Case require(caseHas(_msgSender()), "NOT A VALID CASE"); - //Run + //Run on Self _repAdd(contractAddr, tokenId, domain, rating, amount); //Update Hub _HUB.repAdd(contractAddr, tokenId, domain, rating, amount); diff --git a/contracts/abstract/Recursion.sol b/contracts/abstract/Recursion.sol index e83ac41..f14aa30 100644 --- a/contracts/abstract/Recursion.sol +++ b/contracts/abstract/Recursion.sol @@ -7,7 +7,7 @@ import "../interfaces/IRecursion.sol"; import "../interfaces/IAssoc.sol"; import "../libraries/DataTypes.sol"; import "../libraries/AddressArray.sol"; -import "../abstract/AssocExt.sol"; +// import "../abstract/AssocExt.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; @@ -15,21 +15,24 @@ import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; * @title Core Contract Recursion Functionality * @dev Designed To Be Used by Jurisdictions */ -contract Recursion is IRecursion, Initializable, AssocExt { +contract Recursion is IRecursion, Initializable { + //-- Storage //Parent Addresses using AddressArray for address[]; address[] _parentAddrs; + /* DEPRECATE - Get Directly from Hub /// Initializer function __Recursion_init(address hub) internal onlyInitializing { - //Fetch Repo From Hub + //Fetch Repo From Hub address openRepo = IAssoc(hub).getAssoc("repo"); //Set Repo _setRepo(openRepo); } - + */ + /// Check if a Contract Address is a an Immediate Parent of Current Contract function isParent(address contractAddr) public view override returns (bool) { //Flat Check