Skip to content

Commit 130f883

Browse files
committed
Make gnosh bindings generator work
1 parent 4878c5a commit 130f883

17 files changed

+119
-12
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
artifacts/
2+
cache/
3+
gnoshcontracts/
4+
out/

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "src/common/lib/openzeppelin"]
2-
path = src/common/lib/openzeppelin
2+
path = lib/openzeppelin
33
url = https://github.com/OpenZeppelin/openzeppelin-contracts
44
[submodule "forge-std"]
5-
path = forge-std
5+
path = lib/forge-std
66
url = https://github.com/foundry-rs/forge-std

foundry.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[profile.default]
22
src = "src"
33
out = "out"
4-
libs = ["src/common/lib"]
4+
libs = ["lib"]
55
solc = "0.8.22"
66

77
extra_output = ['devdoc', 'userdoc', 'metadata', 'storageLayout']
@@ -12,4 +12,4 @@ build_info_path = 'artifacts/build-info'
1212
[rpc_endpoints]
1313
hardhat = "${HARDHAT_RPC_URL}"
1414

15-
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
15+
# See more config options https://github.com/foundry-rs/foundry/tree/master/config

gnosh_orig/gen_bindings.sh renamed to gen_gnosh_bindings.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
CONTRACTS=(
44
"Sequencer"
55
"ValidatorRegistry"
6+
"KeyperSetManager"
7+
"KeyperSet"
8+
"EonKeyPublish"
9+
"KeyBroadcastContract"
610
)
711
OUTPUT_DIR="gnoshcontracts"
812
PACKAGE_NAME="gnoshcontracts"

src/common/KeyperSet.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.22;
33

4-
import "./lib/openzeppelin/contracts/access/Ownable.sol";
4+
import "openzeppelin/contracts/access/Ownable.sol";
55
import "./intf/IKeyperSet.sol";
66

77
error AlreadyFinalized();

src/common/KeyperSetManager.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.22;
33

4-
import "./lib/openzeppelin/contracts/utils/math/Math.sol";
4+
import "openzeppelin/contracts/utils/math/Math.sol";
55
import "./KeyperSet.sol";
6-
import "./lib/RestrictedPausable.sol";
6+
import "./RestrictedPausable.sol";
77
import "./intf/IKeyperSetManager.sol";
88

99
error AlreadyDeactivated();

src/common/lib/RestrictedPausable.sol renamed to src/common/RestrictedPausable.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.22;
33

4-
import "./openzeppelin/contracts/access/AccessControl.sol";
5-
import "./openzeppelin/contracts/utils/Pausable.sol";
4+
import "openzeppelin/contracts/access/AccessControl.sol";
5+
import "openzeppelin/contracts/utils/Pausable.sol";
66

77
error UnauthorizedInitializer();
88
error AlreadyInitialized();
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.20;
3+
4+
error InvalidKey();
5+
error AlreadyHaveKey();
6+
error NotAllowed();
7+
8+
interface IKeyBroadcastContract {
9+
function broadcastEonKey(uint64 eon, bytes memory key) external;
10+
11+
function getEonKey(uint64 eon) external view returns (bytes memory);
12+
13+
event EonKeyBroadcast(uint64 eon, bytes key);
14+
}

0 commit comments

Comments
 (0)