diff --git a/docs/src/content/modules/dispute/bonded_dispute_module.md b/docs/src/content/modules/dispute/bonded_dispute_module.md index 6288d854..3208be74 100644 --- a/docs/src/content/modules/dispute/bonded_dispute_module.md +++ b/docs/src/content/modules/dispute/bonded_dispute_module.md @@ -1,5 +1,10 @@ # Bonded Dispute Module +## This is an example module +The contracts included in the examples folder have not been thoroughly tested nor audited. +This are meant to use as example or inspiration for new modules. +==DO NOT USE IN A PRODUCTIVE 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..33a8ea82 100644 --- a/docs/src/content/modules/dispute/circuit_resolver_module.md +++ b/docs/src/content/modules/dispute/circuit_resolver_module.md @@ -1,5 +1,10 @@ # Circuit Resolver Module +## This is an example module +The contracts included in the examples folder have not been thoroughly tested nor audited. +This are meant to use as example or inspiration for new modules. +==DO NOT USE IN A PRODUCTIVE 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..5fb1177c 100644 --- a/docs/src/content/modules/dispute/root_verification_module.md +++ b/docs/src/content/modules/dispute/root_verification_module.md @@ -1,5 +1,10 @@ # Root Verification Module +## This is an example module +The contracts included in the examples folder have not been thoroughly tested nor audited. +This are meant to use as example or inspiration for new modules. +==DO NOT USE IN A PRODUCTIVE 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..13cc00dc 100644 --- a/docs/src/content/modules/finality/multiple_callbacks_module.md +++ b/docs/src/content/modules/finality/multiple_callbacks_module.md @@ -1,5 +1,10 @@ # Multiple Callbacks Module +## This is an example module +The contracts included in the examples folder have not been thoroughly tested nor audited. +This are meant to use as example or inspiration for new modules. +==DO NOT USE IN A PRODUCTIVE 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..fc66c630 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,10 @@ # Contract Call Request Module +## This is an example module +The contracts included in the examples folder have not been thoroughly tested nor audited. +This are meant to use as example or inspiration for new modules. +==DO NOT USE IN A PRODUCTIVE 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..3229bac2 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,10 @@ # Sparse Merkle Tree Request Module +## This is an example module +The contracts included in the examples folder have not been thoroughly tested nor audited. +This are meant to use as example or inspiration for new modules. +==DO NOT USE IN A PRODUCTIVE 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..d4da3c43 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,10 @@ # Bond Escalation Resolution Module +## This is an example module +The contracts included in the examples folder have not been thoroughly tested nor audited. +This are meant to use as example or inspiration for new modules. +==DO NOT USE IN A PRODUCTIVE 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..ceb59ac9 100644 --- a/docs/src/content/modules/resolution/erc20_resolution_module.md +++ b/docs/src/content/modules/resolution/erc20_resolution_module.md @@ -1,5 +1,10 @@ # ERC20 Resolution Module +## This is an example module +The contracts included in the examples folder have not been thoroughly tested nor audited. +This are meant to use as example or inspiration for new modules. +==DO NOT USE IN A PRODUCTIVE 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..2fcc65fe 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,10 @@ # Private ERC20 Resolution Module +## This is an example module +The contracts included in the examples folder have not been thoroughly tested nor audited. +This are meant to use as example or inspiration for new modules. +==DO NOT USE IN A PRODUCTIVE ENVIRONMENT== + See [IPrivateERC20ResolutionModule.sol](/solidity/interfaces/modules/resolution/IPrivateERC20ResolutionModule.sol/interface.IPrivateERC20ResolutionModule.md) for more details. ## 1. Introduction diff --git a/solidity/contracts/examples/README.md b/solidity/contracts/examples/README.md new file mode 100644 index 00000000..57a12366 --- /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. This are meant to use as example or inspiration for new modules. Do not use them in a production environment. \ No newline at end of file diff --git a/solidity/contracts/modules/dispute/BondedDisputeModule.sol b/solidity/contracts/examples/modules/dispute/BondedDisputeModule.sol similarity index 86% rename from solidity/contracts/modules/dispute/BondedDisputeModule.sol rename to solidity/contracts/examples/modules/dispute/BondedDisputeModule.sol index 42f8fd97..1736631f 100644 --- a/solidity/contracts/modules/dispute/BondedDisputeModule.sol +++ b/solidity/contracts/examples/modules/dispute/BondedDisputeModule.sol @@ -4,8 +4,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 {IBondedDisputeModule} from '../../../interfaces/modules/dispute/IBondedDisputeModule.sol'; +import {IBondedDisputeModule} from '../../../../interfaces/examples/modules/dispute/IBondedDisputeModule.sol'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // 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 85% rename from solidity/contracts/modules/dispute/CircuitResolverModule.sol rename to solidity/contracts/examples/modules/dispute/CircuitResolverModule.sol index e4c955d9..f41cd072 100644 --- a/solidity/contracts/modules/dispute/CircuitResolverModule.sol +++ b/solidity/contracts/examples/modules/dispute/CircuitResolverModule.sol @@ -4,9 +4,14 @@ 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 {IProphetVerifier} from '../../../../interfaces/IProphetVerifier.sol'; +import {ICircuitResolverModule} from '../../../../interfaces/examples/modules/dispute/ICircuitResolverModule.sol'; + +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // contract CircuitResolverModule is Module, ICircuitResolverModule { /// @notice Keeps track of the correct responses to requests mapping(bytes32 _requestId => bytes _correctResponse) internal _correctResponses; diff --git a/solidity/contracts/modules/dispute/RootVerificationModule.sol b/solidity/contracts/examples/modules/dispute/RootVerificationModule.sol similarity index 84% rename from solidity/contracts/modules/dispute/RootVerificationModule.sol rename to solidity/contracts/examples/modules/dispute/RootVerificationModule.sol index 775d26b7..b94143d4 100644 --- a/solidity/contracts/modules/dispute/RootVerificationModule.sol +++ b/solidity/contracts/examples/modules/dispute/RootVerificationModule.sol @@ -4,9 +4,14 @@ 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 {MerkleLib} from '../../libraries/MerkleLib.sol'; - +import {IRootVerificationModule} from '../../../../interfaces/examples/modules/dispute/IRootVerificationModule.sol'; +import {MerkleLib} from '../../../libraries/MerkleLib.sol'; + +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // contract RootVerificationModule is Module, IRootVerificationModule { using MerkleLib for MerkleLib.Tree; diff --git a/solidity/contracts/modules/finality/MultipleCallbacksModule.sol b/solidity/contracts/examples/modules/finality/MultipleCallbacksModule.sol similarity index 78% rename from solidity/contracts/modules/finality/MultipleCallbacksModule.sol rename to solidity/contracts/examples/modules/finality/MultipleCallbacksModule.sol index 526dd46f..6ca6e201 100644 --- a/solidity/contracts/modules/finality/MultipleCallbacksModule.sol +++ b/solidity/contracts/examples/modules/finality/MultipleCallbacksModule.sol @@ -4,9 +4,14 @@ 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'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // 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 80% rename from solidity/contracts/modules/request/ContractCallRequestModule.sol rename to solidity/contracts/examples/modules/request/ContractCallRequestModule.sol index cd7a4cfc..7c63feb1 100644 --- a/solidity/contracts/modules/request/ContractCallRequestModule.sol +++ b/solidity/contracts/examples/modules/request/ContractCallRequestModule.sol @@ -4,8 +4,14 @@ 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'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // 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 80% rename from solidity/contracts/modules/request/SparseMerkleTreeRequestModule.sol rename to solidity/contracts/examples/modules/request/SparseMerkleTreeRequestModule.sol index bdaa8837..4544f092 100644 --- a/solidity/contracts/modules/request/SparseMerkleTreeRequestModule.sol +++ b/solidity/contracts/examples/modules/request/SparseMerkleTreeRequestModule.sol @@ -4,8 +4,14 @@ 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'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // 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 96% rename from solidity/contracts/modules/resolution/BondEscalationResolutionModule.sol rename to solidity/contracts/examples/modules/resolution/BondEscalationResolutionModule.sol index ca12c694..4772e742 100644 --- a/solidity/contracts/modules/resolution/BondEscalationResolutionModule.sol +++ b/solidity/contracts/examples/modules/resolution/BondEscalationResolutionModule.sol @@ -15,8 +15,13 @@ 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'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // contract BondEscalationResolutionModule is Module, IBondEscalationResolutionModule { using SafeERC20 for IERC20; diff --git a/solidity/contracts/modules/resolution/ERC20ResolutionModule.sol b/solidity/contracts/examples/modules/resolution/ERC20ResolutionModule.sol similarity index 90% rename from solidity/contracts/modules/resolution/ERC20ResolutionModule.sol rename to solidity/contracts/examples/modules/resolution/ERC20ResolutionModule.sol index b2bfad3f..abbea958 100644 --- a/solidity/contracts/modules/resolution/ERC20ResolutionModule.sol +++ b/solidity/contracts/examples/modules/resolution/ERC20ResolutionModule.sol @@ -9,7 +9,12 @@ 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'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // +import {IERC20ResolutionModule} from '../../../../interfaces/examples/modules/resolution/IERC20ResolutionModule.sol'; contract ERC20ResolutionModule is Module, IERC20ResolutionModule { using SafeERC20 for IERC20; diff --git a/solidity/contracts/modules/resolution/PrivateERC20ResolutionModule.sol b/solidity/contracts/examples/modules/resolution/PrivateERC20ResolutionModule.sol similarity index 91% rename from solidity/contracts/modules/resolution/PrivateERC20ResolutionModule.sol rename to solidity/contracts/examples/modules/resolution/PrivateERC20ResolutionModule.sol index f56dd714..74e25aae 100644 --- a/solidity/contracts/modules/resolution/PrivateERC20ResolutionModule.sol +++ b/solidity/contracts/examples/modules/resolution/PrivateERC20ResolutionModule.sol @@ -9,8 +9,14 @@ 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 {IPrivateERC20ResolutionModule} from '../../../interfaces/modules/resolution/IPrivateERC20ResolutionModule.sol'; - +import {IPrivateERC20ResolutionModule} from + '../../../../interfaces/examples/modules/resolution/IPrivateERC20ResolutionModule.sol'; + +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // contract PrivateERC20ResolutionModule is Module, IPrivateERC20ResolutionModule { using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.AddressSet; diff --git a/solidity/interfaces/modules/dispute/IBondedDisputeModule.sol b/solidity/interfaces/examples/modules/dispute/IBondedDisputeModule.sol similarity index 82% rename from solidity/interfaces/modules/dispute/IBondedDisputeModule.sol rename to solidity/interfaces/examples/modules/dispute/IBondedDisputeModule.sol index feaa3426..3c24dbf2 100644 --- a/solidity/interfaces/modules/dispute/IBondedDisputeModule.sol +++ b/solidity/interfaces/examples/modules/dispute/IBondedDisputeModule.sol @@ -5,8 +5,13 @@ 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'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // /* * @title BondedDisputeModule * @notice Module allowing users to dispute a proposed response diff --git a/solidity/interfaces/modules/dispute/ICircuitResolverModule.sol b/solidity/interfaces/examples/modules/dispute/ICircuitResolverModule.sol similarity index 86% rename from solidity/interfaces/modules/dispute/ICircuitResolverModule.sol rename to solidity/interfaces/examples/modules/dispute/ICircuitResolverModule.sol index b040a5ab..361cfd8e 100644 --- a/solidity/interfaces/modules/dispute/ICircuitResolverModule.sol +++ b/solidity/interfaces/examples/modules/dispute/ICircuitResolverModule.sol @@ -5,8 +5,13 @@ 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'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // /** * @title CircuitResolverModule * @notice Module allowing users to dispute a proposed response by bonding tokens. diff --git a/solidity/interfaces/modules/dispute/IRootVerificationModule.sol b/solidity/interfaces/examples/modules/dispute/IRootVerificationModule.sol similarity index 84% rename from solidity/interfaces/modules/dispute/IRootVerificationModule.sol rename to solidity/interfaces/examples/modules/dispute/IRootVerificationModule.sol index 8b80dfa7..dde1f043 100644 --- a/solidity/interfaces/modules/dispute/IRootVerificationModule.sol +++ b/solidity/interfaces/examples/modules/dispute/IRootVerificationModule.sol @@ -5,9 +5,14 @@ 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'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // /* * @title RootVerificationModule * @notice Dispute module allowing disputers to calculate the correct root for a given request and propose it as a response. diff --git a/solidity/interfaces/modules/finality/IMultipleCallbacksModule.sol b/solidity/interfaces/examples/modules/finality/IMultipleCallbacksModule.sol similarity index 82% rename from solidity/interfaces/modules/finality/IMultipleCallbacksModule.sol rename to solidity/interfaces/examples/modules/finality/IMultipleCallbacksModule.sol index 811e46c5..1bd8916f 100644 --- a/solidity/interfaces/modules/finality/IMultipleCallbacksModule.sol +++ b/solidity/interfaces/examples/modules/finality/IMultipleCallbacksModule.sol @@ -4,6 +4,11 @@ pragma solidity ^0.8.19; import {IOracle} from '@defi-wonderland/prophet-core/solidity/interfaces/IOracle.sol'; import {IFinalityModule} from '@defi-wonderland/prophet-core/solidity/interfaces/modules/finality/IFinalityModule.sol'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // /** * @title MultipleCallbackModule * @notice Module allowing users to make multiple calls to different contracts diff --git a/solidity/interfaces/modules/request/IContractCallRequestModule.sol b/solidity/interfaces/examples/modules/request/IContractCallRequestModule.sol similarity index 80% rename from solidity/interfaces/modules/request/IContractCallRequestModule.sol rename to solidity/interfaces/examples/modules/request/IContractCallRequestModule.sol index b65c1e7f..3a596d1f 100644 --- a/solidity/interfaces/modules/request/IContractCallRequestModule.sol +++ b/solidity/interfaces/examples/modules/request/IContractCallRequestModule.sol @@ -5,8 +5,13 @@ 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'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // /** * @title ContractCallRequestModule * @notice Request module for making contract calls diff --git a/solidity/interfaces/modules/request/ISparseMerkleTreeRequestModule.sol b/solidity/interfaces/examples/modules/request/ISparseMerkleTreeRequestModule.sol similarity index 80% rename from solidity/interfaces/modules/request/ISparseMerkleTreeRequestModule.sol rename to solidity/interfaces/examples/modules/request/ISparseMerkleTreeRequestModule.sol index 999a59a4..4b1bf685 100644 --- a/solidity/interfaces/modules/request/ISparseMerkleTreeRequestModule.sol +++ b/solidity/interfaces/examples/modules/request/ISparseMerkleTreeRequestModule.sol @@ -5,9 +5,14 @@ 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'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // /* * @title SparseMerkleTreeRequestModule * @notice Module allowing a user to request the calculation diff --git a/solidity/interfaces/modules/resolution/IBondEscalationResolutionModule.sol b/solidity/interfaces/examples/modules/resolution/IBondEscalationResolutionModule.sol similarity index 95% rename from solidity/interfaces/modules/resolution/IBondEscalationResolutionModule.sol rename to solidity/interfaces/examples/modules/resolution/IBondEscalationResolutionModule.sol index ea32729b..1cb051ff 100644 --- a/solidity/interfaces/modules/resolution/IBondEscalationResolutionModule.sol +++ b/solidity/interfaces/examples/modules/resolution/IBondEscalationResolutionModule.sol @@ -6,8 +6,13 @@ 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'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // /** * @title BondEscalationResolutionModule * @notice Handles the bond escalation resolution process for disputes, in which sides take turns pledging for or against a dispute by bonding tokens. diff --git a/solidity/interfaces/modules/resolution/IERC20ResolutionModule.sol b/solidity/interfaces/examples/modules/resolution/IERC20ResolutionModule.sol similarity index 92% rename from solidity/interfaces/modules/resolution/IERC20ResolutionModule.sol rename to solidity/interfaces/examples/modules/resolution/IERC20ResolutionModule.sol index f4fe7bbe..3a1bf91b 100644 --- a/solidity/interfaces/modules/resolution/IERC20ResolutionModule.sol +++ b/solidity/interfaces/examples/modules/resolution/IERC20ResolutionModule.sol @@ -6,8 +6,13 @@ 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'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // /** * @title ERC20ResolutionModule * @notice This contract allows for disputes to be resolved by a voting process. diff --git a/solidity/interfaces/modules/resolution/IPrivateERC20ResolutionModule.sol b/solidity/interfaces/examples/modules/resolution/IPrivateERC20ResolutionModule.sol similarity index 93% rename from solidity/interfaces/modules/resolution/IPrivateERC20ResolutionModule.sol rename to solidity/interfaces/examples/modules/resolution/IPrivateERC20ResolutionModule.sol index 51ae24e6..7011ef2c 100644 --- a/solidity/interfaces/modules/resolution/IPrivateERC20ResolutionModule.sol +++ b/solidity/interfaces/examples/modules/resolution/IPrivateERC20ResolutionModule.sol @@ -1,12 +1,17 @@ // 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 {IResolutionModule} from '@defi-wonderland/prophet-core/solidity/interfaces/modules/resolution/IResolutionModule.sol'; import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; +// ==========================================WARNING========================================= // +// The contracts included in the examples folder have not been thoroughly tested nor audited. // +// This are meant to use as example or inspiration for new modules. // +// DO NOT USE IN A PRODUCTIVE ENVIRONMENT. // +// ==========================================WARNING========================================= // /* * @title PrivateERC20ResolutionModule * @notice Module allowing users to vote on a dispute using ERC20 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 598ff0dc..444324b0 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 4eb7f84c..a112a593 100644 --- a/solidity/test/integration/IntegrationBase.sol +++ b/solidity/test/integration/IntegrationBase.sol @@ -18,26 +18,30 @@ 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 {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'; diff --git a/solidity/test/unit/modules/dispute/BondedDisputeModule.t.sol b/solidity/test/unit/modules/dispute/BondedDisputeModule.t.sol index 4066ac4f..3a0221c4 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 7d071dfd..7d8a0293 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 bf74e3bb..d2bc66b0 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 3362cac0..b7035e6a 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 1ea5bba7..03e71b39 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 09cb0530..45b1547a 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 {