Skip to content

Commit

Permalink
test: asset vault expected valid owner
Browse files Browse the repository at this point in the history
  • Loading branch information
geolffreym committed Jan 3, 2025
1 parent 40e8bfd commit a5ad567
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion contracts/assets/AssetOwnership.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ contract AssetOwnership is

// TODO build getURI => from distributor custodian /erc721-metadata
// TODO transfer ownership + fee
// TODO: approved content get an incentive: a cooling mechanism is needed eg: leg decay, max registered asset rate, etc
// TODO: approved content get an incentive: a cooling mechanism is needed eg:
// log decay, max registered asset rate, etc

/// @notice Mints a new NFT representing an asset to the specified address.
/// @dev The assumption is that only those who know the asset ID
Expand Down
2 changes: 1 addition & 1 deletion contracts/core/primitives/BasePolicy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ abstract contract BasePolicy is IPolicy, ERC165 {
mapping(bytes32 => uint256) private _attestations;

/// @notice Emitted when an enforcement process is successfully completed for a given account.
/// @param context The attested agreement key map relations. eg: (account & holder address), (account & asset id), etc
/// @param context The attested agreement key map relations. eg: (account & holder), (account & asset id)
/// @param account The address of the user whose access or compliance is being enforced.
/// @param attestationId The unique identifier of the attestations that confirms compliance or access.
event AttestedAgreement(bytes32 indexed context, address indexed account, uint256 attestationId);
Expand Down
1 change: 0 additions & 1 deletion contracts/economics/Treasury.sol
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ contract Treasury is
emit FeesCollected(collectors[i], collected, currency);
totalCollected += collected;
}

}

/// @notice Function that should revert when msg.sender is not authorized to upgrade the contract.
Expand Down
4 changes: 3 additions & 1 deletion contracts/financial/AgreementSettler.sol
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ contract AgreementSettler is
// eg: access handling for gating content. etc..
// function isAccessAllowed(bytes calldata criteria) external view return (bool) {
// // get registered access hooks for this contract
// IHook hook = HOOKS.get(address(this), IAccessHook) <- internal handling of any logic needed to get the valid hook
// IHook hook = HOOKS.get(address(this), IAccessHook) <- internal handling of any logic needed
// to get the valid hook

// if (!hook) return false // need conf hook
// return hook.exec(criteria)
//}
Expand Down
5 changes: 5 additions & 0 deletions test/assets/AssetVault.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ contract AssetVaultTest is BaseTest {
assert(keccak256(abi.encodePacked(expected)) == keccak256(abi.encodePacked(b64)));
}

function test_SetContent_StoredEventEmitted() public {
vm.warp(1641070800);
vm.prank(user);
}

function test_SetContent_RevertIf_InvalidOwner() public {
vm.warp(1641070800);
vm.prank(user);
Expand Down

0 comments on commit a5ad567

Please sign in to comment.