Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a beacon proxy contract #2411

Merged
merged 33 commits into from
Nov 26, 2020
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c6f7a74
import beacon proxy files from f8n/openzeppelin-sdk
frangio Nov 13, 2020
dc003f8
rename UpgradeabilityBeacon -> BeaconUpgradeable
frangio Nov 13, 2020
47d93a4
get contracts to compile
frangio Nov 13, 2020
3ecf638
edit tests
frangio Nov 13, 2020
e7ef88c
refactor tests minimally to pass
frangio Nov 16, 2020
33c4257
use Address.functionDelegateCall
frangio Nov 16, 2020
00e3d30
use 4 space indentation
frangio Nov 16, 2020
d0a9b7c
inline behavior into test file
frangio Nov 18, 2020
68b56e0
adapt reason strings to convention and test for them
frangio Nov 18, 2020
1124059
Merge branch 'master' into beacon-proxy
frangio Nov 18, 2020
86d40ec
widen pragma for 0.7
frangio Nov 18, 2020
edbad75
rename clashing variable
frangio Nov 19, 2020
cbbdcd3
add documentation or edit to conform to our conventions
frangio Nov 20, 2020
f40ffc4
lint
frangio Nov 20, 2020
12b4314
fix UpgradeableProxy tests
frangio Nov 20, 2020
fe8037b
fix ProxyAdmin tests
frangio Nov 20, 2020
2c0b0f4
fix tests under solidity-coverage (ganache)
frangio Nov 20, 2020
3e821fe
rename BeaconUpgradeableProxy -> BeaconProxy, Beacon -> UpgradeableBe…
frangio Nov 20, 2020
3da41f5
fix tests under solidity-coverage (ganache)
frangio Nov 20, 2020
7b08c20
Update contracts/proxy/README.adoc
frangio Nov 25, 2020
b72bee0
Update contracts/proxy/UpgradeableBeacon.sol
frangio Nov 25, 2020
1f051c5
add positive test for available function
frangio Nov 25, 2020
1cd213d
remove unnecessary await
frangio Nov 25, 2020
56b1c45
refactor handling of beacon to avoid repeated getStorageAt
frangio Nov 25, 2020
08b7244
create separate test suite for UpgradeableBeacon
frangio Nov 25, 2020
4567c90
fix bad test description
frangio Nov 25, 2020
5c3e8c8
simplify test for shared beacon
frangio Nov 25, 2020
b4bdf1c
simplify initialization tests
frangio Nov 25, 2020
48c56ee
simplify upgrade tests
frangio Nov 25, 2020
88db9a4
simplify test description
frangio Nov 25, 2020
541b743
lint
frangio Nov 25, 2020
298f068
add more tests for bad beacon
frangio Nov 25, 2020
e72ead8
lint
frangio Nov 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix tests under solidity-coverage (ganache)
  • Loading branch information
frangio committed Nov 20, 2020
commit 2c0b0f4ddf0c303c910ec501aab4f919b36ec0da
6 changes: 3 additions & 3 deletions test/proxy/BeaconUpgradeableProxy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ contract('BeaconUpgradeableProxy', function (accounts) {
await beaconContract.upgradeTo(instance1.address, { from: proxyCreator });

const proxyInstance1 = await new Implementation2(proxy.address);
await expectRevert(proxyInstance1.getValue(), 'function selector was not recognized');
await expectRevert.unspecified(proxyInstance1.getValue());
});

it('should change function signature', async () => {
Expand Down Expand Up @@ -482,12 +482,12 @@ contract('BeaconUpgradeableProxy', function (accounts) {

it('should remove function from proxy 1', async function () {
const instance2 = await new Implementation2(this.proxy1.address);
await expectRevert(instance2.getValue(), 'function selector was not recognized');
await expectRevert.unspecified(instance2.getValue());
});

it('should remove function from proxy 2', async function () {
const instance2 = await new Implementation2(this.proxy2.address);
await expectRevert(instance2.getValue(), 'function selector was not recognized');
await expectRevert.unspecified(instance2.getValue());
});
});
});
Expand Down