Skip to content

Commit

Permalink
remove copy-pasted OZ proxy contracts; remove rudimentary scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
avasilevich committed Dec 27, 2023
1 parent 62d417d commit e8cee84
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 413 deletions.
14 changes: 14 additions & 0 deletions contracts/upgradeability/Import.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: Apache 2.0
pragma solidity =0.8.17;

import "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";

// Base ProxyAdmin does not provide a way to set contract owner in constructor
// - that's why this contract exists.
contract ProxyAdminOwnable is ProxyAdmin {
constructor(address initialOwner) {
transferOwnership(initialOwner);
}
}
84 changes: 0 additions & 84 deletions contracts/upgradeability/ProxyAdmin.sol

This file was deleted.

192 changes: 0 additions & 192 deletions contracts/upgradeability/TransparentUpgradeableProxy.sol

This file was deleted.

2 changes: 1 addition & 1 deletion initial-contracts.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
}
],
"admin": {
"name": "ProxyAdmin",
"name": "ProxyAdminOwnable",
"address": "0x8000000000000000000000000000000000000000"
},
"registry": {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"flat": "bash scripts/make_flat.sh",
"solidity-docgen": "rm -rf docs/docs/api* && npm i && npx hardhat docgen --exclude interfaces,libs,ERC677BridgeTokenRewardable.sol . contracts docs && node docs/website/sidebars-fix.js",
"generate-uml": "sol2uml ./contracts -o docs/classDiagram.svg",
"test": "node scripts/check_for_clashing.js && npx hardhat test",
"testNoUpgradeProxy": "export CONTRACTS_NO_UPGRADE_PROXY=true && node scripts/check_for_clashing.js && bash scripts/test.sh",
"test": "npx hardhat test",
"testOnTestnet": "export CONTRACTS_NO_UPGRADE_PROXY=true && ./node_modules/.bin/truffle test --network testNet test/KeyGenHistory.js test/mockContracts/BlockRewardHbbftMock.sol test/mockContracts/RandomHbbftMock.sol test/mockContracts/ValidatorSetHbbftMock.sol test/mockContracts/StakingHbbftMock.sol",
"getFunctionSignatures": "node scripts/getFunctionSignatures.js"
},
Expand Down
76 changes: 0 additions & 76 deletions scripts/check_for_clashing.js

This file was deleted.

Loading

0 comments on commit e8cee84

Please sign in to comment.