Further reorganisation of the repo (#2575)

Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
pull/2533/head
Hadrien Croubois 4 years ago committed by GitHub
parent b8ab763581
commit f076ff5dbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      CHANGELOG.md
  2. 6
      contracts/finance/PaymentSplitter.sol
  3. 10
      contracts/finance/README.adoc
  4. 2
      contracts/governance/README.adoc
  5. 2
      contracts/mocks/InitializableMock.sol
  6. 2
      contracts/mocks/MultipleInheritanceInitializableMocks.sol
  7. 2
      contracts/mocks/RegressionImplementation.sol
  8. 2
      contracts/mocks/SingleInheritanceInitializableMocks.sol
  9. 4
      contracts/proxy/README.adoc
  10. 2
      contracts/proxy/utils/Initializable.sol
  11. 12
      contracts/utils/README.adoc
  12. 6
      scripts/migrate-imports.js

@ -37,6 +37,10 @@ npx openzeppelin-contracts-migrate-imports
Make sure you're using git or another version control system to be able to recover from any potential error in our script.
### How to upgrade from 4.0-beta.x
Some further changes have been done during the beta the 4.0-beta.x phase. Transitions made during this period are also configured in the `migrate-imports` script. Consequently, you can upgrade from the 4.0-beta.x stage using the same script as described in the *How to upgrade from 3.x* section.
## 3.4.0 (2021-02-02)
* `BeaconProxy`: added new kind of proxy that allows simultaneous atomic upgrades. ([#2411](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2411))

@ -2,9 +2,9 @@
pragma solidity ^0.8.0;
import "./Address.sol";
import "./Context.sol";
import "./math/SafeMath.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";
import "../utils/math/SafeMath.sol";
/**
* @title PaymentSplitter

@ -0,0 +1,10 @@
= Finance
[.readme-notice]
NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/finance
This directory includes primitives for financial systems. We currently only offer the {PaymentSplitter} contract, but we want to grow this directory so we welcome ideas.
== PaymentSplitter
{{PaymentSplitter}}

@ -1,7 +1,7 @@
= Governance
[.readme-notice]
NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/access
NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/governance
This directory includes primitives for on-chain governance. We currently only offer the {TimelockController} contract, that can be used as a component in a governance systems to introduce a delay between a proposal and its execution.

@ -2,7 +2,7 @@
pragma solidity ^0.8.0;
import "../utils/Initializable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @title InitializableMock

@ -2,7 +2,7 @@
pragma solidity ^0.8.0;
import "../utils/Initializable.sol";
import "../proxy/utils/Initializable.sol";
// Sample contracts showing upgradeability with multiple inheritance.
// Child contract inherits from Father and Mother contracts, and Father extends from Gramps.

@ -2,7 +2,7 @@
pragma solidity ^0.8.0;
import "../utils/Initializable.sol";
import "../proxy/utils/Initializable.sol";
contract Implementation1 is Initializable {
uint internal _value;

@ -2,7 +2,7 @@
pragma solidity ^0.8.0;
import "../utils/Initializable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @title MigratableMockV1

@ -40,3 +40,7 @@ CAUTION: Using upgradeable proxies correctly and securely is a difficult task th
== Minimal Clones
{{Clones}}
== Utils
{{Initializable}}

@ -3,7 +3,7 @@
// solhint-disable-next-line compiler-version
pragma solidity ^0.8.0;
import "./Address.sol";
import "../../utils/Address.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed

@ -40,6 +40,14 @@ Finally, {Create2} contains all necessary utilities to safely use the https://bl
{{EIP712}}
== Escrow
{{ConditionalEscrow}}
{{Escrow}}
{{RefundEscrow}}
== Introspection
This set of interfaces and contracts deal with https://en.wikipedia.org/wiki/Type_introspection[type introspection] of contracts, that is, examining which functions can be called on them. This is usually referred to as a contract's _interface_.
@ -84,7 +92,3 @@ Note that, in all cases, accounts simply _declare_ their interfaces, but they ar
{{Counters}}
{{Strings}}
== Other
{{Initializable}}

@ -30,7 +30,8 @@ const pathUpdates = {
'payment/escrow/ConditionalEscrow.sol': 'utils/escrow/ConditionalEscrow.sol',
'payment/escrow/Escrow.sol': 'utils/escrow/Escrow.sol',
'payment/escrow/RefundEscrow.sol': 'utils/escrow/RefundEscrow.sol',
'payment/PaymentSplitter.sol': 'utils/PaymentSplitter.sol',
'payment/PaymentSplitter.sol': 'finance/PaymentSplitter.sol',
'utils/PaymentSplitter.sol': 'finance/PaymentSplitter.sol',
'payment/PullPayment.sol': 'security/PullPayment.sol',
'presets/ERC1155PresetMinterPauser.sol': 'token/ERC1155/presets/ERC1155PresetMinterPauser.sol',
'presets/ERC20PresetFixedSupply.sol': 'token/ERC20/presets/ERC20PresetFixedSupply.sol',
@ -40,7 +41,8 @@ const pathUpdates = {
'proxy/BeaconProxy.sol': 'proxy/beacon/BeaconProxy.sol',
// 'proxy/Clones.sol': undefined,
'proxy/IBeacon.sol': 'proxy/beacon/IBeacon.sol',
'proxy/Initializable.sol': 'utils/Initializable.sol',
'proxy/Initializable.sol': 'proxy/utils/Initializable.sol',
'utils/Initializable.sol': 'proxy/utils/Initializable.sol',
'proxy/ProxyAdmin.sol': 'proxy/transparent/ProxyAdmin.sol',
// 'proxy/Proxy.sol': undefined,
'proxy/TransparentUpgradeableProxy.sol': 'proxy/transparent/TransparentUpgradeableProxy.sol',

Loading…
Cancel
Save