Skip to content

Releases: YourJustice-Live/Excalibur

Version 0.4.3 - Repo Fix

11 Jul 16:34
Compare
Choose a tag to compare
Pre-release

Functionality Changes

Added Owner Account address to RulesRepo Events

/// Rule Added or Changed
event Rule(address indexed originAddress, uint256 indexed id, bytes32 about, string affected, string uri, bool negation);

/// Rule Disabled Status Changed
event RuleDisabled(address indexed originAddress, uint256 id, bool disabled);

/// Rule Removed
event RuleRemoved(address indexed originAddress, uint256 indexed id);

/// Generic Role Effect
event RuleEffect(address indexed originAddress, uint256 indexed id, bool direction, uint8 value, string name);

/// Action Confirmation Change
event Confirmation(address indexed originAddress, uint256 indexed id, string ruling, bool evidence, uint witness);

/// Reaction Change
event Reaction(address indexed originAddress, uint256 indexed id, bytes32 reactionId);

Version 0.4.2 - Everything can have a soul

11 Jul 01:18
91f172c
Compare
Choose a tag to compare

Summary

  • Renamed 'Incident' to 'Reaction'

  • Souls can now be assigned and minted by Contracts

Added Functionality

Soul Types

Soul minting (& Game Creation) emits an event with the type of the soul

Type is the symbol of the contract, "CONTRACT" if there's no symbol and empty "" if not a contract

/// Soul Type Change
event SoulType(uint256 indexed tokenId, string soulType);

Get Soul type

types(tokenId);

Version 0.4.1 - Game Extensions (Multi-Proxy)

08 Jul 23:59
Compare
Choose a tag to compare

Summary

  • Games can be extended with multiple arbitrary contracts via a Multi-Proxy pattern
  • Contract will fallback to every contract in the extension stack until requested function is found

Added Functionality

Game Extensions

  • Extensions are loaded into the Hub by Game type
  • Extensions can not override any of the core Game functions
  • Pure contract that don't store data. For data storage use the OpenRepo

Example

// Add Game Extensions
hubContract.assocAdd("GAME_DAO", [CONTRACT_ADDRESS]);

// Set Game Type
await gameContract.confSet("type", "DAO");

Functionality Changes

  • Rules are now managed by a separate contract (RuleRepo). No changes in usability.

Version 0.4.0 - A Game Platform

06 Jul 20:03
Compare
Choose a tag to compare
Pre-release

Summary

Generalizing the Protocol

  • Renamed "plaintiff" to "creator"

  • Renamed "judge" to "authority"

  • 'Jurisdiction' is now 'Game'

  • 'Case' is now 'Incident'

Version 0.3.2 - Social interaction

06 Jul 14:35
Compare
Choose a tag to compare
Pre-release

Summary

Usability Upgrades & Social Interaction

Added Functionality

Apply to Join Jurisdictions & Cases

//Request to Join/add Jurisdiction/Case
function nominate(soulToken, uri)

Emits Event:

Nominate(address account, uint256 indexed id, string uri)

Jurisdiction Config

Set generic contract configuration

/// Generic Config Set Function
function confSet(string memory key, string memory value)

Emits Event:

StringSet(ownerContract, key, value)

Closed Jurisdictions

Prevent people from minting their own membership tokens

//Change to Closed Jurisdiction
jurisdictionContract.confSet("isClosed", "true")

Jurisdiction Posts (Like Case

/// Add Post 
function post(string entRole, uint256 tokenId, string uri_)

Example

jurisdictionContract.post(entRole, tokenId, uri)

Emits Event:

event Post(address indexed account, uint256 tokenId, string entRole, string uri);

Avatar Posts

/// Post
function post(uint256 tokenId, string calldata uri_)

Example

avatarContract.post(tokenId, uri)

Emits Event:

event Post(_msgSender(), tokenId, uri_)

Version 0.3.1 - Touchups

21 Jun 01:22
Compare
Choose a tag to compare
Pre-release

Summary

Added Functionality

Hub - Get Repo Address

//Repo Address
function repoAddr() external view returns(address);

Functionality Changes

Case Post

Added SoulId to the post function

/// Add Post 
function post(string calldata entRole, uint256 tokenId, string calldata uri) external;

Example

caseContract.post("subject", soulId, uri);

Case Maker

New cases will now receive a URI parameter and no symbol

/// Make a new Case
function caseMake(
    string calldata name_, 
    string calldata uri_, 
    DataTypes.RuleRef[] calldata addRules, 
    DataTypes.InputRoleToken[] calldata assignRoles, 
    PostInput[] calldata posts
) external returns (address);

function caseMakeOpen(
    string calldata name_, 
    string calldata uri_, 
    DataTypes.RuleRef[] calldata addRules, 
    DataTypes.InputRoleToken[] calldata assignRoles, 
    PostInput[] calldata posts
) external returns (address);

Example

    let ruleRefArr = [
        {
          jurisdiction: jurisdictionContract.address, 
          ruleId: 1,
        }
      ];

      let roleRefArr = [
        {
          role: "subject",
          tokenId: user1SoulId,
        },
        {
          role: "witness",
          tokenId: user2SoulId,
        }
      ];

      let posts = [
        {
          tokenId: adminSoulId, 
          entRole: "admin",
          uri: test_uri,
        }
      ];

    let caseAddr = await jurisdictionContract.caseMake("CASE_NAME", "IPFS_URI", ruleRefArr, roleRefArr, posts);

Version 0.3.0 - Composability w/Tracker Tokens (ERC1155Tracker)

17 Jun 21:35
Compare
Choose a tag to compare

Summary

Roles will now be assigned to tokens instead of accounts (using ERC1155Tracker)

Jurisdiction & Case roles will be attached to existing Avatar tokens

  • Accounts must have an Avatar to receive a role
  • Roles track the Avatar token owner [TBT]

Added Functionality

Role for Token

Cases & Jurisdictions would now assign roles to Avatar tokens instead of accounts. Allowing to assign roles to un-owned tokens & track the owner once Avatars are claimed.

This change is backward compatible and existing functionality is maintained. However, still prefer to use Token ID instead of account for fully support all profile types.

/// Assign Tethered Token to a Role
function roleAssignToToken(uint256 toToken, string memory role) external;

/// Remove Tethered Token from a Role
function roleRemoveFromToken(uint256 ownerToken, string memory role) external;

Added Transfer Events

/// Single Token Transfer
event TransferByToken(address indexed operator, uint256 indexed fromOwnerToken, uint256 indexed toOwnerToken, uint256 id, uint256 value);

/// Batch Token Transfer
event TransferBatchByToken(
    address indexed operator,
    uint256 indexed fromOwnerToken, 
    uint256 indexed toOwnerToken,
    uint256[] ids,
    uint256[] values
);

Contract URI

Cases & Jurisdictions now have a function for setting contract URI (by admin)

await caseContract.setContractURI("IPFS_URI");

Event

emit ContractURI(uri);

Secondary Avatar Owners

/// Map Account to Existing Token
function tokenOwnerAdd(address owner, uint256 tokenId) external;

/// Remove Account from Existing Token
function tokenOwnerRemove(address owner, uint256 tokenId) external;

Event

 Emits a faux Transfer() event (burn or mint)

Functionality Changes

Case Maker

New cases will now receive a URI parameter and no symbol

/// Make a new Case
function caseMake(
    string calldata name_, 
    string calldata uri_, 
    DataTypes.RuleRef[] calldata addRules, 
    DataTypes.InputRoleToken[] calldata assignRoles, 
    PostInput[] calldata posts
) external returns (address);

function caseMakeOpen(
    string calldata name_, 
    string calldata uri_, 
    DataTypes.RuleRef[] calldata addRules, 
    DataTypes.InputRoleToken[] calldata assignRoles, 
    PostInput[] calldata posts
) external returns (address);

Example

    let ruleRefArr = [
        {
          jurisdiction: jurisdictionContract.address, 
          ruleId: 1,
        }
      ];

      let roleRefArr = [
        {
          role: "subject",
          tokenId: user1SoulId,
        },
        {
          role: "witness",
          tokenId: user2SoulId,
        }
      ];

      let posts = [
        {
          entRole: "admin",
          uri: test_uri,
        }
      ];

    let caseAddr = await jurisdictionContract.caseMake("CASE_NAME", "IPFS_URI", ruleRefArr, roleRefArr, posts);

Version 0.2.2 - Hub Migration

12 May 18:53
Compare
Choose a tag to compare
Pre-release

Added Functionality

Hub Update

Migrates the contracts (avatars & actions) the a new hub

/// Update Hub
function hubChange(address newHubAddr) external;

Event

emit HubChanged(newHubAddr);

Contract URI

For Jurisdictions & Cases

Set Contract URI (By Owner or Admin)

jurisdictionContract.setContractURI(contract_uri)

Get Contract URI

jurisdictionContract.contractURI()

Token URIs

For Jurisdictions & Cases

Set Role URI (By Owner or Admin)

await jurisdictionContract.setRoleURI("admin", uri);

Get Role URI

jurisdictionContract.roleURI("admin");

Version 0.2.1 - Upgradability

09 May 21:55
Compare
Choose a tag to compare
Pre-release

Summary

Implemented Upgradable Beacons for creating new jurisdiction contracts on demand

Added Functionality

Jurisdiction Factory (Upgradable Beacon)

/// Create New Jurisdiction
hub.jurisdictionMake("[NAME]", ipfs_uri);

Event

emit ContractCreated("jurisdiction", address(newJurisdiction));

Functionality Changes

/// Make a new Case
function caseMake(string calldata name_, DataTypes.RuleRef[] memory addRules, DataTypes.InputRole[] memory assignRoles);

Will Now Emit New Event

emit ContractCreated("case", address(newCase));

Version 0.2 - Verified Reputation

02 May 18:17
Compare
Choose a tag to compare
Pre-release

Deployed Contracts (Rinkeby)

  • Config 0x14E5D5B68A41665E86225e6830a69bb2b5F6E484
  • Case 0xB40102c50fEcF14fD8339f3C9A16ef4dec0C0352
  • Hub 0xce92b64ba4b9a2905605c8c04e9F1e27C5D6E559
  • Avatar 0xE7254468763a8d4f791f30F5e8dcA635DF850772
  • History 0xe699f8dd6968F7a60786E846899CEf56154D3573
  • Jurisdiction 0x22A339004E2a005ED5D5b94C83EEA2E47BE249EB

Summary

Complete case flow & reputation change upon completion (both in Jurisdiction and in global context)

Functionality Changes

Avatar Address Lookup

/// Get Token ID by Address
function tokenByAddress(address owner) external view returns (uint256);

Map Multiple Addresses to an Avatar

/// Map Account to Existing Token
function tokenOwnerAdd(address owner, uint256 tokenId) external onlyOwner;

Get Members By Role

Returns an array of Unique Members for a specified Role

/// Unique Members Addresses
function uniqueRoleMembers(string memory role) external view returns (address[] memory);

/// Unique Members Count (w/Token)
function uniqueRoleMembersCount(string memory role) external view returns (uint256);    

Support for Custom Effects

Was

Input: Effects as part of the rule object

 let rule = {
	...
	effects:{
	  environmental: 0,
	  professional: -5,
	  social: 5,
	  personal: 0,
	}
};

Function

jurisdictionContract..ruleAdd(rule, confirmation);

Event

emit RuleEffects(id, rule.effects.environmental, rule.effects.personal, rule.effects.social, rule.effects.professional);	

Now

Input: Effects as a Separate Array

let effects = [
	{name:'environmental', value:10, direction:false},
	{name:'personal', value:4, direction:true},
];

Function:

jurisdictionContract.ruleAdd(rule, confirmation, effects);

Event For Each Rule

RuleEffect(uint256 indexed id, bool direction, int8 value, string name)

Support for Custom Reputation Domains

Event For Opinion Changes w/Crosschain Support

event OpinionChange(uint256 chainId, address indexed contractAddr, uint256 indexed tokenId, string domain, DataTypes.Rating rating, uint256 score);
  • Implemented in Avatar & Jurisdiction Contracts