Skip to content

Commit

Permalink
Merge pull request #23 from push-protocol/3-updated-to-OZGovernor
Browse files Browse the repository at this point in the history
Upgrade governance to latest OZ Governor Standards
  • Loading branch information
zaryab2000 authored Apr 30, 2024
2 parents 7b21f2a + ac6b102 commit 7ae68ef
Show file tree
Hide file tree
Showing 47 changed files with 9,137 additions and 8,476 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ typechain-types
cache
artifacts

# Deployment and Arguments File
arguments/
deploymentData/
.openzeppelin
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "lib/forge-std"]
path = lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/forge-proposal-simulator"]
path = lib/forge-proposal-simulator
url = https://github.com/solidity-labs-io/forge-proposal-simulator
27 changes: 0 additions & 27 deletions addresses/addresses.json

This file was deleted.

73 changes: 73 additions & 0 deletions contracts/CallReceiverMock.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

contract CallReceiverMock {
event MockFunctionCalled();
event MockFunctionCalledWithArgs(uint256 a, uint256 b);

uint256[] private _array;

function mockFunction() public payable returns (string memory) {
emit MockFunctionCalled();

return "0x1234";
}

function mockFunctionEmptyReturn() public payable {
emit MockFunctionCalled();
}

function mockFunctionWithArgs(uint256 a, uint256 b) public payable returns (string memory) {
emit MockFunctionCalledWithArgs(a, b);

return "0x1234";
}

function mockFunctionNonPayable() public returns (string memory) {
emit MockFunctionCalled();

return "0x1234";
}

function mockStaticFunction() public pure returns (string memory) {
return "0x1234";
}

function mockFunctionRevertsNoReason() public payable {
revert();
}

function mockFunctionRevertsReason() public payable {
revert("CallReceiverMock: reverting");
}

function mockFunctionThrows() public payable {
assert(false);
}

function mockFunctionOutOfGas() public payable {
for (uint256 i = 0; ; ++i) {
_array.push(i);
}
}

function mockFunctionWritesStorage(bytes32 slot, bytes32 value) public returns (string memory) {
assembly {
sstore(slot, value)
}
return "0x1234";
}
}

contract CallReceiverMockTrustingForwarder is CallReceiverMock {
address private _trustedForwarder;

constructor(address trustedForwarder_) {
_trustedForwarder = trustedForwarder_;
}

function isTrustedForwarder(address forwarder) public view virtual returns (bool) {
return forwarder == _trustedForwarder;
}
}
5 changes: 2 additions & 3 deletions contracts/EPNS.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.11;

pragma solidity ^0.8.20;
contract EPNS {
/// @notice EIP-20 token name for this token
string public constant name = "Ethereum Push Notification Service";
Expand Down Expand Up @@ -694,7 +693,7 @@ contract EPNS {
return c;
}

function getChainId() internal pure returns (uint) {
function getChainId() internal view returns (uint) {
uint256 chainId;
assembly {
chainId := chainid()
Expand Down
Loading

0 comments on commit 7ae68ef

Please sign in to comment.