Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = {
},
skipFiles: [
'tools/Migrations.sol',
'tools/testing/ERC734Mock.sol',
'tools/testing/ERC1271Mock.sol',
'tools/testing/TestClient.sol',
'tools/testing/TestReceiver.sol',
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## vNEXT
- Remove `smock` from unit tests:
- IexecPocoBoost (#148)
- Migrate unit test files to Typescript & Hardhat:
- ERC1154 (#145, #146)
- IexecEscrowToken (#141, #143)
Expand Down
24 changes: 24 additions & 0 deletions contracts/tools/testing/ERC734Mock.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// SPDX-FileCopyrightText: 2024 IEXEC BLOCKCHAIN TECH <contact@iex.ec>
// SPDX-License-Identifier: Apache-2.0

pragma solidity ^0.8.0;

import {IERC734} from "../../external/interfaces/IERC734.sol";

/**
* @notice This contract is for testing purposes only.
*/
contract ERC734Mock is IERC734 {
mapping(uint256 purpose => mapping(bytes32 key => bool)) private _keyHasPurpose;

function keyHasPurpose(bytes32 key, uint256 purpose) external view returns (bool) {
return _keyHasPurpose[purpose][key];
}

/**
* @notice Allows to easily configure from tests the behaviour of this contract.
*/
function setKeyHasPurpose(bytes32 key, uint256 purpose) external {
_keyHasPurpose[purpose][key] = true;
}
}
Loading