diff --git a/docs/src/content/modules/dispute/bonded_dispute_module.md b/docs/src/content/modules/dispute/bonded_dispute_module.md index 6288d854..5625333d 100644 --- a/docs/src/content/modules/dispute/bonded_dispute_module.md +++ b/docs/src/content/modules/dispute/bonded_dispute_module.md @@ -1,5 +1,8 @@ # Bonded Dispute Module +> [!CAUTION] +> The contracts included in the examples folder have not been thoroughly tested nor audited and are meant to be examples or source of inspiration for new modules. Do not use them in a production environment. + See [IBondedDisputeModule.sol](/solidity/interfaces/modules/dispute/IBondedDisputeModule.sol/interface.IBondedDisputeModule.md) for more details. ## 1. Introduction diff --git a/docs/src/content/modules/dispute/circuit_resolver_module.md b/docs/src/content/modules/dispute/circuit_resolver_module.md index c7837596..78255ee7 100644 --- a/docs/src/content/modules/dispute/circuit_resolver_module.md +++ b/docs/src/content/modules/dispute/circuit_resolver_module.md @@ -1,5 +1,8 @@ # Circuit Resolver Module +> [!CAUTION] +> The contracts included in the examples folder have not been thoroughly tested nor audited and are meant to be examples or source of inspiration for new modules. Do not use them in a production environment. + See [ICircuitResolverModule.sol](/solidity/interfaces/modules/dispute/ICircuitResolverModule.sol/interface.ICircuitResolverModule.md) for more details. ## 1. Introduction diff --git a/docs/src/content/modules/dispute/root_verification_module.md b/docs/src/content/modules/dispute/root_verification_module.md index d5dabc67..e1024e21 100644 --- a/docs/src/content/modules/dispute/root_verification_module.md +++ b/docs/src/content/modules/dispute/root_verification_module.md @@ -1,5 +1,8 @@ # Root Verification Module +> [!CAUTION] +> The contracts included in the examples folder have not been thoroughly tested nor audited and are meant to be examples or source of inspiration for new modules. Do not use them in a production environment. + See [IRootVerificationModule.sol](/solidity/interfaces/modules/dispute/IRootVerificationModule.sol/interface.IRootVerificationModule.md) for more details. ## 1. Introduction diff --git a/docs/src/content/modules/finality/multiple_callbacks_module.md b/docs/src/content/modules/finality/multiple_callbacks_module.md index 45280dbb..760792f1 100644 --- a/docs/src/content/modules/finality/multiple_callbacks_module.md +++ b/docs/src/content/modules/finality/multiple_callbacks_module.md @@ -1,5 +1,8 @@ # Multiple Callbacks Module +> [!CAUTION] +> The contracts included in the examples folder have not been thoroughly tested nor audited and are meant to be examples or source of inspiration for new modules. Do not use them in a production environment. + See [IMultipleCallbacksModule.sol](/solidity/interfaces/modules/finality/IMultipleCallbacksModule.sol/interface.IMultipleCallbacksModule.md) for more details. ## 1. Introduction diff --git a/docs/src/content/modules/request/contract_call_request_module.md b/docs/src/content/modules/request/contract_call_request_module.md index 0eeb579a..6429f3c8 100644 --- a/docs/src/content/modules/request/contract_call_request_module.md +++ b/docs/src/content/modules/request/contract_call_request_module.md @@ -1,5 +1,8 @@ # Contract Call Request Module +> [!CAUTION] +> The contracts included in the examples folder have not been thoroughly tested nor audited and are meant to be examples or source of inspiration for new modules. Do not use them in a production environment. + See [IContractCallRequestModule.sol](/solidity/interfaces/modules/request/IContractCallRequestModule.sol/interface.IContractCallRequestModule.md) for more details. ## 1. Introduction diff --git a/docs/src/content/modules/request/sparse_merkle_tree_request_module.md b/docs/src/content/modules/request/sparse_merkle_tree_request_module.md index 4f87fd26..0c5b43f5 100644 --- a/docs/src/content/modules/request/sparse_merkle_tree_request_module.md +++ b/docs/src/content/modules/request/sparse_merkle_tree_request_module.md @@ -1,5 +1,8 @@ # Sparse Merkle Tree Request Module +> [!CAUTION] +> The contracts included in the examples folder have not been thoroughly tested nor audited and are meant to be examples or source of inspiration for new modules. Do not use them in a production environment. + See [ISparseMerkleTreeRequestModule.sol](/solidity/interfaces/modules/request/ISparseMerkleTreeRequestModule.sol/interface.ISparseMerkleTreeRequestModule.md) for more details. ## 1. Introduction diff --git a/docs/src/content/modules/resolution/bond_escalation_resolution_module.md b/docs/src/content/modules/resolution/bond_escalation_resolution_module.md index 56bdd37c..095c394a 100644 --- a/docs/src/content/modules/resolution/bond_escalation_resolution_module.md +++ b/docs/src/content/modules/resolution/bond_escalation_resolution_module.md @@ -1,5 +1,8 @@ # Bond Escalation Resolution Module +> [!CAUTION] +> The contracts included in the examples folder have not been thoroughly tested nor audited and are meant to be examples or source of inspiration for new modules. Do not use them in a production environment. + See [IBondEscalationResolutionModule.sol](/solidity/interfaces/modules/resolution/IBondEscalationResolutionModule.sol/interface.IBondEscalationResolutionModule.md) for more details. ## 1. Introduction diff --git a/docs/src/content/modules/resolution/erc20_resolution_module.md b/docs/src/content/modules/resolution/erc20_resolution_module.md index 54a791cb..16bba49e 100644 --- a/docs/src/content/modules/resolution/erc20_resolution_module.md +++ b/docs/src/content/modules/resolution/erc20_resolution_module.md @@ -1,5 +1,8 @@ # ERC20 Resolution Module +> [!CAUTION] +> The contracts included in the examples folder have not been thoroughly tested nor audited and are meant to be examples or source of inspiration for new modules. Do not use them in a production environment. + See [IERC20ResolutionModule.sol](/solidity/interfaces/modules/resolution/IERC20ResolutionModule.sol/interface.IERC20ResolutionModule.md) for more details. ## 1. Introduction diff --git a/docs/src/content/modules/resolution/private_erc20_resolution_module.md b/docs/src/content/modules/resolution/private_erc20_resolution_module.md index 8475e70d..5ebc0702 100644 --- a/docs/src/content/modules/resolution/private_erc20_resolution_module.md +++ b/docs/src/content/modules/resolution/private_erc20_resolution_module.md @@ -1,5 +1,8 @@ # Private ERC20 Resolution Module +> [!CAUTION] +> The contracts included in the examples folder have not been thoroughly tested nor audited and are meant to be examples or source of inspiration for new modules. Do not use them in a production environment. + See [IPrivateERC20ResolutionModule.sol](/solidity/interfaces/modules/resolution/IPrivateERC20ResolutionModule.sol/interface.IPrivateERC20ResolutionModule.md) for more details. ## 1. Introduction diff --git a/package.json b/package.json index 8cad7ee4..f7963342 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "package.json": "sort-package-json" }, "dependencies": { - "@defi-wonderland/prophet-core": "0.0.0-c80cc1e9", + "@defi-wonderland/prophet-core": "0.0.0-88db2d6f", "@openzeppelin/contracts": "4.9.5", "solmate": "https://github.com/transmissions11/solmate.git#bfc9c25865a274a7827fea5abf6e4fb64fc64e6c" }, diff --git a/solidity/contracts/examples/README.md b/solidity/contracts/examples/README.md new file mode 100644 index 00000000..60ba0b2f --- /dev/null +++ b/solidity/contracts/examples/README.md @@ -0,0 +1,4 @@ +> [!CAUTION] +> Do not use the contracts in the example folder for production. + +The contracts included in the examples folder have not been thoroughly tested nor audited. These are meant to be used as examples or inspiration for new modules. Do not use them in a production environment. \ No newline at end of file diff --git a/solidity/contracts/libraries/MerkleLib.sol b/solidity/contracts/examples/libraries/MerkleLib.sol similarity index 100% rename from solidity/contracts/libraries/MerkleLib.sol rename to solidity/contracts/examples/libraries/MerkleLib.sol diff --git a/solidity/contracts/modules/dispute/BondedDisputeModule.sol b/solidity/contracts/examples/modules/dispute/BondedDisputeModule.sol similarity index 96% rename from solidity/contracts/modules/dispute/BondedDisputeModule.sol rename to solidity/contracts/examples/modules/dispute/BondedDisputeModule.sol index 91f83cc2..f9f5d593 100644 --- a/solidity/contracts/modules/dispute/BondedDisputeModule.sol +++ b/solidity/contracts/examples/modules/dispute/BondedDisputeModule.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.19; import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; -import {IBondedDisputeModule} from '../../../interfaces/modules/dispute/IBondedDisputeModule.sol'; +import {IBondedDisputeModule} from '../../../../interfaces/examples/modules/dispute/IBondedDisputeModule.sol'; contract BondedDisputeModule is Module, IBondedDisputeModule { constructor(IOracle _oracle) Module(_oracle) {} diff --git a/solidity/contracts/modules/dispute/CircuitResolverModule.sol b/solidity/contracts/examples/modules/dispute/CircuitResolverModule.sol similarity index 95% rename from solidity/contracts/modules/dispute/CircuitResolverModule.sol rename to solidity/contracts/examples/modules/dispute/CircuitResolverModule.sol index 7f208ebf..19be3728 100644 --- a/solidity/contracts/modules/dispute/CircuitResolverModule.sol +++ b/solidity/contracts/examples/modules/dispute/CircuitResolverModule.sol @@ -2,13 +2,13 @@ pragma solidity ^0.8.19; import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; -import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; - -import {IProphetVerifier} from '../../../interfaces/IProphetVerifier.sol'; -import {ICircuitResolverModule} from '../../../interfaces/modules/dispute/ICircuitResolverModule.sol'; import {ModuleAccessController} from '@defi-wonderland/prophet-core/solidity/contracts/access/ModuleAccessController.sol'; +import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; + +import {IProphetVerifier} from '../../../../interfaces/IProphetVerifier.sol'; +import {ICircuitResolverModule} from '../../../../interfaces/examples/modules/dispute/ICircuitResolverModule.sol'; contract CircuitResolverModule is ModuleAccessController, ICircuitResolverModule { /// @notice Keeps track of the correct responses to requests diff --git a/solidity/contracts/modules/dispute/RootVerificationModule.sol b/solidity/contracts/examples/modules/dispute/RootVerificationModule.sol similarity index 97% rename from solidity/contracts/modules/dispute/RootVerificationModule.sol rename to solidity/contracts/examples/modules/dispute/RootVerificationModule.sol index e8bbf36c..02e58b69 100644 --- a/solidity/contracts/modules/dispute/RootVerificationModule.sol +++ b/solidity/contracts/examples/modules/dispute/RootVerificationModule.sol @@ -4,7 +4,8 @@ pragma solidity ^0.8.19; import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; -import {IRootVerificationModule} from '../../../interfaces/modules/dispute/IRootVerificationModule.sol'; +import {IRootVerificationModule} from '../../../../interfaces/examples/modules/dispute/IRootVerificationModule.sol'; + import {MerkleLib} from '../../libraries/MerkleLib.sol'; import {ModuleAccessController} from '@defi-wonderland/prophet-core/solidity/contracts/access/ModuleAccessController.sol'; diff --git a/solidity/contracts/modules/finality/MultipleCallbacksModule.sol b/solidity/contracts/examples/modules/finality/MultipleCallbacksModule.sol similarity index 92% rename from solidity/contracts/modules/finality/MultipleCallbacksModule.sol rename to solidity/contracts/examples/modules/finality/MultipleCallbacksModule.sol index 526dd46f..5908e278 100644 --- a/solidity/contracts/modules/finality/MultipleCallbacksModule.sol +++ b/solidity/contracts/examples/modules/finality/MultipleCallbacksModule.sol @@ -4,8 +4,8 @@ pragma solidity ^0.8.19; import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; -import {IProphetCallback} from '../../../interfaces/IProphetCallback.sol'; -import {IMultipleCallbacksModule} from '../../../interfaces/modules/finality/IMultipleCallbacksModule.sol'; +import {IProphetCallback} from '../../../../interfaces/IProphetCallback.sol'; +import {IMultipleCallbacksModule} from '../../../../interfaces/examples/modules/finality/IMultipleCallbacksModule.sol'; contract MultipleCallbacksModule is Module, IMultipleCallbacksModule { constructor(IOracle _oracle) Module(_oracle) {} diff --git a/solidity/contracts/modules/request/ContractCallRequestModule.sol b/solidity/contracts/examples/modules/request/ContractCallRequestModule.sol similarity index 95% rename from solidity/contracts/modules/request/ContractCallRequestModule.sol rename to solidity/contracts/examples/modules/request/ContractCallRequestModule.sol index cd7a4cfc..27ffcca4 100644 --- a/solidity/contracts/modules/request/ContractCallRequestModule.sol +++ b/solidity/contracts/examples/modules/request/ContractCallRequestModule.sol @@ -4,7 +4,8 @@ pragma solidity ^0.8.19; import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; -import {IContractCallRequestModule} from '../../../interfaces/modules/request/IContractCallRequestModule.sol'; +import {IContractCallRequestModule} from + '../../../../interfaces/examples/modules/request/IContractCallRequestModule.sol'; contract ContractCallRequestModule is Module, IContractCallRequestModule { constructor(IOracle _oracle) Module(_oracle) {} diff --git a/solidity/contracts/modules/request/SparseMerkleTreeRequestModule.sol b/solidity/contracts/examples/modules/request/SparseMerkleTreeRequestModule.sol similarity index 95% rename from solidity/contracts/modules/request/SparseMerkleTreeRequestModule.sol rename to solidity/contracts/examples/modules/request/SparseMerkleTreeRequestModule.sol index bdaa8837..4af4c3d7 100644 --- a/solidity/contracts/modules/request/SparseMerkleTreeRequestModule.sol +++ b/solidity/contracts/examples/modules/request/SparseMerkleTreeRequestModule.sol @@ -4,7 +4,8 @@ pragma solidity ^0.8.19; import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; -import {ISparseMerkleTreeRequestModule} from '../../../interfaces/modules/request/ISparseMerkleTreeRequestModule.sol'; +import {ISparseMerkleTreeRequestModule} from + '../../../../interfaces/examples/modules/request/ISparseMerkleTreeRequestModule.sol'; contract SparseMerkleTreeRequestModule is Module, ISparseMerkleTreeRequestModule { constructor(IOracle _oracle) Module(_oracle) {} diff --git a/solidity/contracts/modules/resolution/BondEscalationResolutionModule.sol b/solidity/contracts/examples/modules/resolution/BondEscalationResolutionModule.sol similarity index 98% rename from solidity/contracts/modules/resolution/BondEscalationResolutionModule.sol rename to solidity/contracts/examples/modules/resolution/BondEscalationResolutionModule.sol index 9870aa2f..16fa92bb 100644 --- a/solidity/contracts/modules/resolution/BondEscalationResolutionModule.sol +++ b/solidity/contracts/examples/modules/resolution/BondEscalationResolutionModule.sol @@ -15,11 +15,12 @@ import {IResolutionModule} from '@defi-wonderland/prophet-core/solidity/interfaces/modules/resolution/IResolutionModule.sol'; import {IBondEscalationResolutionModule} from - '../../../interfaces/modules/resolution/IBondEscalationResolutionModule.sol'; + '../../../../interfaces/examples/modules/resolution/IBondEscalationResolutionModule.sol'; + import {ModuleAccessController} from '@defi-wonderland/prophet-core/solidity/contracts/access/ModuleAccessController.sol'; -import {ModuleTypehash} from '../../utils/ModuleTypehash.sol'; +import {ModuleTypehash} from '../../../utils/ModuleTypehash.sol'; contract BondEscalationResolutionModule is ModuleAccessController, IBondEscalationResolutionModule { using SafeERC20 for IERC20; diff --git a/solidity/contracts/modules/resolution/ERC20ResolutionModule.sol b/solidity/contracts/examples/modules/resolution/ERC20ResolutionModule.sol similarity index 97% rename from solidity/contracts/modules/resolution/ERC20ResolutionModule.sol rename to solidity/contracts/examples/modules/resolution/ERC20ResolutionModule.sol index 375ca5c1..7b8da1f4 100644 --- a/solidity/contracts/modules/resolution/ERC20ResolutionModule.sol +++ b/solidity/contracts/examples/modules/resolution/ERC20ResolutionModule.sol @@ -9,9 +9,9 @@ import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; -import {IERC20ResolutionModule} from '../../../interfaces/modules/resolution/IERC20ResolutionModule.sol'; +import {IERC20ResolutionModule} from '../../../../interfaces/examples/modules/resolution/IERC20ResolutionModule.sol'; -import {ModuleTypehash} from '../../utils/ModuleTypehash.sol'; +import {ModuleTypehash} from '../../../utils/ModuleTypehash.sol'; import {ModuleAccessController} from '@defi-wonderland/prophet-core/solidity/contracts/access/ModuleAccessController.sol'; diff --git a/solidity/contracts/modules/resolution/PrivateERC20ResolutionModule.sol b/solidity/contracts/examples/modules/resolution/PrivateERC20ResolutionModule.sol similarity index 97% rename from solidity/contracts/modules/resolution/PrivateERC20ResolutionModule.sol rename to solidity/contracts/examples/modules/resolution/PrivateERC20ResolutionModule.sol index 99d57c34..1dfaa83c 100644 --- a/solidity/contracts/modules/resolution/PrivateERC20ResolutionModule.sol +++ b/solidity/contracts/examples/modules/resolution/PrivateERC20ResolutionModule.sol @@ -6,11 +6,12 @@ import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import {EnumerableSet} from '@openzeppelin/contracts/utils/structs/EnumerableSet.sol'; -import {ModuleTypehash} from '../../utils/ModuleTypehash.sol'; +import {ModuleTypehash} from '../../../utils/ModuleTypehash.sol'; import {IModule, Module} from '@defi-wonderland/prophet-core/solidity/contracts/Module.sol'; import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; -import {IPrivateERC20ResolutionModule} from '../../../interfaces/modules/resolution/IPrivateERC20ResolutionModule.sol'; +import {IPrivateERC20ResolutionModule} from + '../../../../interfaces/examples/modules/resolution/IPrivateERC20ResolutionModule.sol'; import {ModuleAccessController} from '@defi-wonderland/prophet-core/solidity/contracts/access/ModuleAccessController.sol'; diff --git a/solidity/contracts/periphery/SparseMerkleTreeL32Verifier.sol b/solidity/contracts/examples/periphery/SparseMerkleTreeL32Verifier.sol similarity index 94% rename from solidity/contracts/periphery/SparseMerkleTreeL32Verifier.sol rename to solidity/contracts/examples/periphery/SparseMerkleTreeL32Verifier.sol index 8c599180..5d687284 100644 --- a/solidity/contracts/periphery/SparseMerkleTreeL32Verifier.sol +++ b/solidity/contracts/examples/periphery/SparseMerkleTreeL32Verifier.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import {ITreeVerifier} from '../../interfaces/ITreeVerifier.sol'; +import {ITreeVerifier} from '../../../interfaces/ITreeVerifier.sol'; import {MerkleLib} from '../libraries/MerkleLib.sol'; diff --git a/solidity/interfaces/modules/dispute/IBondedDisputeModule.sol b/solidity/interfaces/examples/modules/dispute/IBondedDisputeModule.sol similarity index 97% rename from solidity/interfaces/modules/dispute/IBondedDisputeModule.sol rename to solidity/interfaces/examples/modules/dispute/IBondedDisputeModule.sol index feaa3426..ba94df40 100644 --- a/solidity/interfaces/modules/dispute/IBondedDisputeModule.sol +++ b/solidity/interfaces/examples/modules/dispute/IBondedDisputeModule.sol @@ -5,7 +5,7 @@ import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle import {IDisputeModule} from '@defi-wonderland/prophet-core/solidity/interfaces/modules/dispute/IDisputeModule.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; -import {IAccountingExtension} from '../../extensions/IAccountingExtension.sol'; +import {IAccountingExtension} from '../../../extensions/IAccountingExtension.sol'; /* * @title BondedDisputeModule diff --git a/solidity/interfaces/modules/dispute/ICircuitResolverModule.sol b/solidity/interfaces/examples/modules/dispute/ICircuitResolverModule.sol similarity index 97% rename from solidity/interfaces/modules/dispute/ICircuitResolverModule.sol rename to solidity/interfaces/examples/modules/dispute/ICircuitResolverModule.sol index b040a5ab..dfc8e18a 100644 --- a/solidity/interfaces/modules/dispute/ICircuitResolverModule.sol +++ b/solidity/interfaces/examples/modules/dispute/ICircuitResolverModule.sol @@ -5,7 +5,7 @@ import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle import {IDisputeModule} from '@defi-wonderland/prophet-core/solidity/interfaces/modules/dispute/IDisputeModule.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; -import {IAccountingExtension} from '../../extensions/IAccountingExtension.sol'; +import {IAccountingExtension} from '../../../extensions/IAccountingExtension.sol'; /** * @title CircuitResolverModule diff --git a/solidity/interfaces/modules/dispute/IRootVerificationModule.sol b/solidity/interfaces/examples/modules/dispute/IRootVerificationModule.sol similarity index 96% rename from solidity/interfaces/modules/dispute/IRootVerificationModule.sol rename to solidity/interfaces/examples/modules/dispute/IRootVerificationModule.sol index 8b80dfa7..d3f95281 100644 --- a/solidity/interfaces/modules/dispute/IRootVerificationModule.sol +++ b/solidity/interfaces/examples/modules/dispute/IRootVerificationModule.sol @@ -5,8 +5,8 @@ import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle import {IDisputeModule} from '@defi-wonderland/prophet-core/solidity/interfaces/modules/dispute/IDisputeModule.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; -import {ITreeVerifier} from '../../ITreeVerifier.sol'; -import {IAccountingExtension} from '../../extensions/IAccountingExtension.sol'; +import {ITreeVerifier} from '../../../ITreeVerifier.sol'; +import {IAccountingExtension} from '../../../extensions/IAccountingExtension.sol'; /* * @title RootVerificationModule diff --git a/solidity/interfaces/modules/finality/IMultipleCallbacksModule.sol b/solidity/interfaces/examples/modules/finality/IMultipleCallbacksModule.sol similarity index 100% rename from solidity/interfaces/modules/finality/IMultipleCallbacksModule.sol rename to solidity/interfaces/examples/modules/finality/IMultipleCallbacksModule.sol diff --git a/solidity/interfaces/modules/request/IContractCallRequestModule.sol b/solidity/interfaces/examples/modules/request/IContractCallRequestModule.sol similarity index 96% rename from solidity/interfaces/modules/request/IContractCallRequestModule.sol rename to solidity/interfaces/examples/modules/request/IContractCallRequestModule.sol index b65c1e7f..913011a3 100644 --- a/solidity/interfaces/modules/request/IContractCallRequestModule.sol +++ b/solidity/interfaces/examples/modules/request/IContractCallRequestModule.sol @@ -5,7 +5,7 @@ import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle import {IRequestModule} from '@defi-wonderland/prophet-core/solidity/interfaces/modules/request/IRequestModule.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; -import {IAccountingExtension} from '../../../interfaces/extensions/IAccountingExtension.sol'; +import {IAccountingExtension} from '../../../../interfaces/extensions/IAccountingExtension.sol'; /** * @title ContractCallRequestModule diff --git a/solidity/interfaces/modules/request/ISparseMerkleTreeRequestModule.sol b/solidity/interfaces/examples/modules/request/ISparseMerkleTreeRequestModule.sol similarity index 94% rename from solidity/interfaces/modules/request/ISparseMerkleTreeRequestModule.sol rename to solidity/interfaces/examples/modules/request/ISparseMerkleTreeRequestModule.sol index 999a59a4..62b48f4f 100644 --- a/solidity/interfaces/modules/request/ISparseMerkleTreeRequestModule.sol +++ b/solidity/interfaces/examples/modules/request/ISparseMerkleTreeRequestModule.sol @@ -5,8 +5,8 @@ import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle import {IRequestModule} from '@defi-wonderland/prophet-core/solidity/interfaces/modules/request/IRequestModule.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; -import {ITreeVerifier} from '../../../interfaces/ITreeVerifier.sol'; -import {IAccountingExtension} from '../../../interfaces/extensions/IAccountingExtension.sol'; +import {ITreeVerifier} from '../../../../interfaces/ITreeVerifier.sol'; +import {IAccountingExtension} from '../../../../interfaces/extensions/IAccountingExtension.sol'; /* * @title SparseMerkleTreeRequestModule diff --git a/solidity/interfaces/modules/resolution/IBondEscalationResolutionModule.sol b/solidity/interfaces/examples/modules/resolution/IBondEscalationResolutionModule.sol similarity index 99% rename from solidity/interfaces/modules/resolution/IBondEscalationResolutionModule.sol rename to solidity/interfaces/examples/modules/resolution/IBondEscalationResolutionModule.sol index ac59ee98..ce88c751 100644 --- a/solidity/interfaces/modules/resolution/IBondEscalationResolutionModule.sol +++ b/solidity/interfaces/examples/modules/resolution/IBondEscalationResolutionModule.sol @@ -7,7 +7,7 @@ import {IResolutionModule} from '@defi-wonderland/prophet-core/solidity/interfaces/modules/resolution/IResolutionModule.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; -import {IBondEscalationAccounting} from '../../extensions/IBondEscalationAccounting.sol'; +import {IBondEscalationAccounting} from '../../../extensions/IBondEscalationAccounting.sol'; /** * @title BondEscalationResolutionModule diff --git a/solidity/interfaces/modules/resolution/IERC20ResolutionModule.sol b/solidity/interfaces/examples/modules/resolution/IERC20ResolutionModule.sol similarity index 98% rename from solidity/interfaces/modules/resolution/IERC20ResolutionModule.sol rename to solidity/interfaces/examples/modules/resolution/IERC20ResolutionModule.sol index 7fdbca13..1b45ab43 100644 --- a/solidity/interfaces/modules/resolution/IERC20ResolutionModule.sol +++ b/solidity/interfaces/examples/modules/resolution/IERC20ResolutionModule.sol @@ -7,7 +7,7 @@ import {IResolutionModule} from '@defi-wonderland/prophet-core/solidity/interfaces/modules/resolution/IResolutionModule.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; -import {IAccountingExtension} from '../../extensions/IAccountingExtension.sol'; +import {IAccountingExtension} from '../../../extensions/IAccountingExtension.sol'; /** * @title ERC20ResolutionModule diff --git a/solidity/interfaces/modules/resolution/IPrivateERC20ResolutionModule.sol b/solidity/interfaces/examples/modules/resolution/IPrivateERC20ResolutionModule.sol similarity index 99% rename from solidity/interfaces/modules/resolution/IPrivateERC20ResolutionModule.sol rename to solidity/interfaces/examples/modules/resolution/IPrivateERC20ResolutionModule.sol index 08ad096b..1b0dd918 100644 --- a/solidity/interfaces/modules/resolution/IPrivateERC20ResolutionModule.sol +++ b/solidity/interfaces/examples/modules/resolution/IPrivateERC20ResolutionModule.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -import {IAccountingExtension} from '../../extensions/IAccountingExtension.sol'; +import {IAccountingExtension} from '../../../extensions/IAccountingExtension.sol'; import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; import {IAccessController} from '@defi-wonderland/prophet-core/solidity/interfaces/access/IAccessController.sol'; diff --git a/solidity/scripts/Deploy.sol b/solidity/scripts/Deploy.sol index 53b511e8..61a80552 100644 --- a/solidity/scripts/Deploy.sol +++ b/solidity/scripts/Deploy.sol @@ -7,21 +7,24 @@ import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle import {IResolutionModule} from '@defi-wonderland/prophet-core/solidity/interfaces/modules/resolution/IResolutionModule.sol'; +import {BondedDisputeModule} from '../contracts/examples/modules/dispute/BondedDisputeModule.sol'; import {BondEscalationModule} from '../contracts/modules/dispute/BondEscalationModule.sol'; -import {BondedDisputeModule} from '../contracts/modules/dispute/BondedDisputeModule.sol'; -import {CircuitResolverModule} from '../contracts/modules/dispute/CircuitResolverModule.sol'; -import {RootVerificationModule} from '../contracts/modules/dispute/RootVerificationModule.sol'; +import {CircuitResolverModule} from '../contracts/examples/modules/dispute/CircuitResolverModule.sol'; +import {RootVerificationModule} from '../contracts/examples/modules/dispute/RootVerificationModule.sol'; + +import {MultipleCallbacksModule} from '../contracts/examples/modules/finality/MultipleCallbacksModule.sol'; +import {ContractCallRequestModule} from '../contracts/examples/modules/request/ContractCallRequestModule.sol'; import {CallbackModule} from '../contracts/modules/finality/CallbackModule.sol'; -import {MultipleCallbacksModule} from '../contracts/modules/finality/MultipleCallbacksModule.sol'; -import {ContractCallRequestModule} from '../contracts/modules/request/ContractCallRequestModule.sol'; import {HttpRequestModule} from '../contracts/modules/request/HttpRequestModule.sol'; -import {SparseMerkleTreeRequestModule} from '../contracts/modules/request/SparseMerkleTreeRequestModule.sol'; +import {SparseMerkleTreeRequestModule} from '../contracts/examples/modules/request/SparseMerkleTreeRequestModule.sol'; + +import {BondEscalationResolutionModule} from + '../contracts/examples/modules/resolution/BondEscalationResolutionModule.sol'; +import {ERC20ResolutionModule} from '../contracts/examples/modules/resolution/ERC20ResolutionModule.sol'; +import {PrivateERC20ResolutionModule} from '../contracts/examples/modules/resolution/PrivateERC20ResolutionModule.sol'; import {ArbitratorModule} from '../contracts/modules/resolution/ArbitratorModule.sol'; -import {BondEscalationResolutionModule} from '../contracts/modules/resolution/BondEscalationResolutionModule.sol'; -import {ERC20ResolutionModule} from '../contracts/modules/resolution/ERC20ResolutionModule.sol'; -import {PrivateERC20ResolutionModule} from '../contracts/modules/resolution/PrivateERC20ResolutionModule.sol'; import {BondedResponseModule} from '../contracts/modules/response/BondedResponseModule.sol'; import {AccountingExtension} from '../contracts/extensions/AccountingExtension.sol'; diff --git a/solidity/test/integration/ContractCallRequest.t.sol b/solidity/test/integration/ContractCallRequest.t.sol index 8c917c04..d4963586 100644 --- a/solidity/test/integration/ContractCallRequest.t.sol +++ b/solidity/test/integration/ContractCallRequest.t.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.19; import { ContractCallRequestModule, IContractCallRequestModule -} from '../../contracts/modules/request/ContractCallRequestModule.sol'; +} from '../../contracts/examples/modules/request/ContractCallRequestModule.sol'; import {MockCallee} from '../mocks/MockCallee.sol'; import './IntegrationBase.sol'; diff --git a/solidity/test/integration/IntegrationBase.sol b/solidity/test/integration/IntegrationBase.sol index 55f14233..083a342c 100644 --- a/solidity/test/integration/IntegrationBase.sol +++ b/solidity/test/integration/IntegrationBase.sol @@ -22,29 +22,34 @@ import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import {IWETH9} from '../utils/external/IWETH9.sol'; +import { + BondedDisputeModule, IBondedDisputeModule +} from '../../contracts/examples/modules/dispute/BondedDisputeModule.sol'; +import { + IRootVerificationModule, + RootVerificationModule +} from '../../contracts/examples/modules/dispute/RootVerificationModule.sol'; + +import { + IMultipleCallbacksModule, + MultipleCallbacksModule +} from '../../contracts/examples/modules/finality/MultipleCallbacksModule.sol'; import {AccountingExtension, IAccountingExtension} from '../../contracts/extensions/AccountingExtension.sol'; import { BondEscalationAccounting, IBondEscalationAccounting } from '../../contracts/extensions/BondEscalationAccounting.sol'; import {BondEscalationModule, IBondEscalationModule} from '../../contracts/modules/dispute/BondEscalationModule.sol'; -import {BondedDisputeModule, IBondedDisputeModule} from '../../contracts/modules/dispute/BondedDisputeModule.sol'; -import { - IRootVerificationModule, RootVerificationModule -} from '../../contracts/modules/dispute/RootVerificationModule.sol'; import {CallbackModule, ICallbackModule} from '../../contracts/modules/finality/CallbackModule.sol'; -import { - IMultipleCallbacksModule, - MultipleCallbacksModule -} from '../../contracts/modules/finality/MultipleCallbacksModule.sol'; -import {HttpRequestModule, IHttpRequestModule} from '../../contracts/modules/request/HttpRequestModule.sol'; import { ISparseMerkleTreeRequestModule, SparseMerkleTreeRequestModule -} from '../../contracts/modules/request/SparseMerkleTreeRequestModule.sol'; +} from '../../contracts/examples/modules/request/SparseMerkleTreeRequestModule.sol'; + +import {SparseMerkleTreeL32Verifier} from '../../contracts/examples/periphery/SparseMerkleTreeL32Verifier.sol'; +import {HttpRequestModule, IHttpRequestModule} from '../../contracts/modules/request/HttpRequestModule.sol'; import {ArbitratorModule, IArbitratorModule} from '../../contracts/modules/resolution/ArbitratorModule.sol'; import {BondedResponseModule, IBondedResponseModule} from '../../contracts/modules/response/BondedResponseModule.sol'; -import {SparseMerkleTreeL32Verifier} from '../../contracts/periphery/SparseMerkleTreeL32Verifier.sol'; import {IProphetVerifier} from '../../interfaces/IProphetVerifier.sol'; import {MockCallback, MockFailCallback} from '../mocks/MockCallback.sol'; diff --git a/solidity/test/unit/modules/dispute/BondedDisputeModule.t.sol b/solidity/test/unit/modules/dispute/BondedDisputeModule.t.sol index 173fe4f7..3fb62760 100644 --- a/solidity/test/unit/modules/dispute/BondedDisputeModule.t.sol +++ b/solidity/test/unit/modules/dispute/BondedDisputeModule.t.sol @@ -10,8 +10,9 @@ import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import { - BondedDisputeModule, IBondedDisputeModule -} from '../../../../contracts/modules/dispute/BondedDisputeModule.sol'; + BondedDisputeModule, + IBondedDisputeModule +} from '../../../../contracts/examples/modules/dispute/BondedDisputeModule.sol'; import {IAccountingExtension} from '../../../../interfaces/extensions/IAccountingExtension.sol'; diff --git a/solidity/test/unit/modules/dispute/CircuitResolverModule.t.sol b/solidity/test/unit/modules/dispute/CircuitResolverModule.t.sol index 144a5e2d..3e523648 100644 --- a/solidity/test/unit/modules/dispute/CircuitResolverModule.t.sol +++ b/solidity/test/unit/modules/dispute/CircuitResolverModule.t.sol @@ -12,7 +12,7 @@ import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import { CircuitResolverModule, ICircuitResolverModule -} from '../../../../contracts/modules/dispute/CircuitResolverModule.sol'; +} from '../../../../contracts/examples/modules/dispute/CircuitResolverModule.sol'; import {IProphetVerifier} from '../../../../interfaces/IProphetVerifier.sol'; import {IAccountingExtension} from '../../../../interfaces/extensions/IAccountingExtension.sol'; diff --git a/solidity/test/unit/modules/dispute/RootVerificationModule.t.sol b/solidity/test/unit/modules/dispute/RootVerificationModule.t.sol index 1205386f..32fc094b 100644 --- a/solidity/test/unit/modules/dispute/RootVerificationModule.t.sol +++ b/solidity/test/unit/modules/dispute/RootVerificationModule.t.sol @@ -12,7 +12,7 @@ import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import { IRootVerificationModule, RootVerificationModule -} from '../../../../contracts/modules/dispute/RootVerificationModule.sol'; +} from '../../../../contracts/examples/modules/dispute/RootVerificationModule.sol'; import {ITreeVerifier} from '../../../../interfaces/ITreeVerifier.sol'; import {IAccountingExtension} from '../../../../interfaces/extensions/IAccountingExtension.sol'; diff --git a/solidity/test/unit/modules/finality/MultipleCallbacksModule.t.sol b/solidity/test/unit/modules/finality/MultipleCallbacksModule.t.sol index 708b8a74..c64d448f 100644 --- a/solidity/test/unit/modules/finality/MultipleCallbacksModule.t.sol +++ b/solidity/test/unit/modules/finality/MultipleCallbacksModule.t.sol @@ -11,7 +11,7 @@ import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle import { IMultipleCallbacksModule, MultipleCallbacksModule -} from '../../../../contracts/modules/finality/MultipleCallbacksModule.sol'; +} from '../../../../contracts/examples/modules/finality/MultipleCallbacksModule.sol'; import {IProphetCallback} from '../../../../interfaces/IProphetCallback.sol'; diff --git a/solidity/test/unit/modules/request/ContractCallRequestModule.t.sol b/solidity/test/unit/modules/request/ContractCallRequestModule.t.sol index 7f114cfc..79cec039 100644 --- a/solidity/test/unit/modules/request/ContractCallRequestModule.t.sol +++ b/solidity/test/unit/modules/request/ContractCallRequestModule.t.sol @@ -12,7 +12,7 @@ import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import { ContractCallRequestModule, IContractCallRequestModule -} from '../../../../contracts/modules/request/ContractCallRequestModule.sol'; +} from '../../../../contracts/examples/modules/request/ContractCallRequestModule.sol'; import {IAccountingExtension} from '../../../../interfaces/extensions/IAccountingExtension.sol'; diff --git a/solidity/test/unit/modules/request/SparseMerkleTreeRequestModule.t.sol b/solidity/test/unit/modules/request/SparseMerkleTreeRequestModule.t.sol index 92364234..5c6cd876 100644 --- a/solidity/test/unit/modules/request/SparseMerkleTreeRequestModule.t.sol +++ b/solidity/test/unit/modules/request/SparseMerkleTreeRequestModule.t.sol @@ -12,7 +12,7 @@ import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import { ISparseMerkleTreeRequestModule, SparseMerkleTreeRequestModule -} from '../../../../contracts/modules/request/SparseMerkleTreeRequestModule.sol'; +} from '../../../../contracts/examples/modules/request/SparseMerkleTreeRequestModule.sol'; import {ITreeVerifier} from '../../../../interfaces/ITreeVerifier.sol'; import {IAccountingExtension} from '../../../../interfaces/extensions/IAccountingExtension.sol'; diff --git a/solidity/test/unit/modules/resolution/BondEscalationResolutionModule.t.sol b/solidity/test/unit/modules/resolution/BondEscalationResolutionModule.t.sol index 3570c120..661ba8e6 100644 --- a/solidity/test/unit/modules/resolution/BondEscalationResolutionModule.t.sol +++ b/solidity/test/unit/modules/resolution/BondEscalationResolutionModule.t.sol @@ -16,7 +16,7 @@ import {ValidatorLib} from '@defi-wonderland/prophet-core/solidity/libraries/Val import { BondEscalationResolutionModule, IBondEscalationResolutionModule -} from '../../../../contracts/modules/resolution/BondEscalationResolutionModule.sol'; +} from '../../../../contracts/examples/modules/resolution/BondEscalationResolutionModule.sol'; import {IBondEscalationAccounting} from '../../../../interfaces/extensions/IBondEscalationAccounting.sol'; /** diff --git a/solidity/test/unit/modules/resolution/ERC20ResolutionModule.t.sol b/solidity/test/unit/modules/resolution/ERC20ResolutionModule.t.sol index 23c99964..1a02cf28 100644 --- a/solidity/test/unit/modules/resolution/ERC20ResolutionModule.t.sol +++ b/solidity/test/unit/modules/resolution/ERC20ResolutionModule.t.sol @@ -15,7 +15,7 @@ import {ValidatorLib} from '@defi-wonderland/prophet-core/solidity/libraries/Val import { ERC20ResolutionModule, IERC20ResolutionModule -} from '../../../../contracts/modules/resolution/ERC20ResolutionModule.sol'; +} from '../../../../contracts/examples/modules/resolution/ERC20ResolutionModule.sol'; import {IAccountingExtension} from '../../../../interfaces/extensions/IAccountingExtension.sol'; diff --git a/solidity/test/unit/modules/resolution/PrivateERC20ResolutionModule.t.sol b/solidity/test/unit/modules/resolution/PrivateERC20ResolutionModule.t.sol index 49a67024..568b4fa2 100644 --- a/solidity/test/unit/modules/resolution/PrivateERC20ResolutionModule.t.sol +++ b/solidity/test/unit/modules/resolution/PrivateERC20ResolutionModule.t.sol @@ -14,7 +14,7 @@ import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import { IPrivateERC20ResolutionModule, PrivateERC20ResolutionModule -} from '../../../../contracts/modules/resolution/PrivateERC20ResolutionModule.sol'; +} from '../../../../contracts/examples/modules/resolution/PrivateERC20ResolutionModule.sol'; import {IAccountingExtension} from '../../../../interfaces/extensions/IAccountingExtension.sol'; contract ForTest_PrivateERC20ResolutionModule is PrivateERC20ResolutionModule { diff --git a/solidity/test/unit/periphery/SparseMerkleTreeL32Verifier.t.sol b/solidity/test/unit/periphery/SparseMerkleTreeL32Verifier.t.sol index 572553c9..924f7798 100644 --- a/solidity/test/unit/periphery/SparseMerkleTreeL32Verifier.t.sol +++ b/solidity/test/unit/periphery/SparseMerkleTreeL32Verifier.t.sol @@ -3,9 +3,9 @@ pragma solidity ^0.8.19; import 'forge-std/Test.sol'; -import {SparseMerkleTreeL32Verifier} from '../../../contracts/periphery/SparseMerkleTreeL32Verifier.sol'; +import {SparseMerkleTreeL32Verifier} from '../../../contracts/examples/periphery/SparseMerkleTreeL32Verifier.sol'; -import {MerkleLib} from '../../../contracts/libraries/MerkleLib.sol'; +import {MerkleLib} from '../../../contracts/examples/libraries/MerkleLib.sol'; /** * @dev Harness to set an entry in the requestData mapping, without triggering setup request hooks diff --git a/yarn.lock b/yarn.lock index 8d39d38d..c9fc61f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -193,10 +193,10 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@defi-wonderland/prophet-core@0.0.0-c80cc1e9": - version "0.0.0-c80cc1e9" - resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-core/-/prophet-core-0.0.0-c80cc1e9.tgz#3586b8bcde26bd670384155f187888745af1e000" - integrity sha512-CU/IRGdOPoHDBiNv3XdimdJqx8Tl/4o3JrkYBKVfx+VW58k9e5i9XquAk+NqDiGZx18TMFZwskkt6fA5cMAQHQ== +"@defi-wonderland/prophet-core@0.0.0-88db2d6f": + version "0.0.0-88db2d6f" + resolved "https://registry.yarnpkg.com/@defi-wonderland/prophet-core/-/prophet-core-0.0.0-88db2d6f.tgz#cda83fc86ed283d9e979630a07ef4b98eafc4c44" + integrity sha512-aNbFp1lKVfjzuugKTpmLQNwVIInbhZ/5AFnFR2aZlfzo3JGKwgB1I6Q+X0cgtFgHmXQXDcIUBedOPdxSCBRFCA== "@defi-wonderland/solidity-utils@0.0.0-3e9c8e8b": version "0.0.0-3e9c8e8b"