Skip to content

Commit 45ebcc7

Browse files
authored
Merge pull request #6 from datachainlab/improve-protogen
Update solidity-protobuf version Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
2 parents beb5ea1 + 94f0f1c commit 45ebcc7

File tree

11 files changed

+192
-627
lines changed

11 files changed

+192
-627
lines changed

Makefile

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,12 @@
1-
21
ABIGEN ?= abigen
3-
SOLPB_EXTERNAL_RUNTIME_REPO ?= @hyperledger-labs/yui-ibc-solidity/contracts/proto/
42

53
.PHONY: test
64
test:
75
go test -v ./pkg/...
86

9-
# Requirements
10-
# - setup for solidity-protobuf (https://github.com/datachainlab/solidity-protobuf)
11-
# - python3
12-
# - gsed if MacOS user
13-
.PHONY: solpb
14-
solpb:
15-
SOLPB_EXTERNAL_RUNTIME_REPO=$(SOLPB_EXTERNAL_RUNTIME_REPO) ./scripts/solpb.sh
16-
17-
# run after sol files changed
18-
.PHONY: setup
19-
setup:
20-
./scripts/setup.sh development
21-
22-
.PHONY: lint-go
23-
lint-go:
24-
go fmt ./pkg/...
25-
go vet ./pkg/...
7+
.PHONY: protogen
8+
protogen:
9+
./scripts/protogen.sh
2610

2711
.PHONY: abi
2812
abi:

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ interface IContractModule {
3636

3737
## For Developers
3838

39-
To develop this project, you need the code generator [solidity-protobuf](https://github.com/datachainlab/solidity-protobuf) to generate encoders and decoders in solidity from proto files.
40-
41-
Currently, you need to use [this version](https://github.com/datachainlab/solidity-protobuf/commit/a365f06c140c6ea366d7e72eeea68c9a5b94d390).
39+
To generate encoders and decoders in solidity from proto files, you need to use the code generator [solidity-protobuf](https://github.com/datachainlab/solidity-protobuf).
4240

41+
Currently, [this version](https://github.com/datachainlab/solidity-protobuf/commit/3def6706178e5407497f3d01b8f0ceb17b32108d) is required.

contracts/core/IContractModule.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pragma solidity ^0.8.9;
33

44
import "./PacketHandler.sol";
5-
import "./types/Auth.sol";
5+
import "../proto/cross/core/auth/Auth.sol";
66

77
// IContractModule defines the expected interface of a contract module on Cross Framework
88
interface IContractModule {

contracts/core/TxAtomicSimple.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import "./PacketHandler.sol";
88
import "./ContractRegistry.sol";
99
import "./IContractModule.sol";
1010
import "./IBCKeeper.sol";
11-
import "./types/AtomicSimple.sol";
11+
import "../proto/cross/core/atomic/simple/AtomicSimple.sol";
1212

1313
// TxAtomicSimple implements PacketHandler that supports simple-commit protocol
1414
abstract contract TxAtomicSimple is IBCKeeper, PacketHandler, ContractRegistry {

contracts/core/types/gogoproto/gogo.sol

Lines changed: 0 additions & 1 deletion
This file was deleted.

contracts/example/MockCrossContract.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pragma solidity ^0.8.9;
33

44
import "../core/IContractModule.sol";
5-
import "../core/types/Auth.sol";
5+
import "../proto/cross/core/auth/Auth.sol";
66

77
contract MockCrossContract is IContractModule {
88
function onContractCall(CrossContext calldata context, bytes calldata callInfo) external override returns (bytes memory) {

0 commit comments

Comments
 (0)