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

[iip-15]sgdRegistry implementation #3845

Merged
merged 33 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
68d964a
[iip-15]sgdRegistry implementation
millken Apr 14, 2023
e050ec6
fix server tests
millken Apr 14, 2023
3fb9a0f
fix comments
millken Apr 19, 2023
679d327
fix comments
millken Apr 19, 2023
b11d20d
remove sgdAct
millken Apr 19, 2023
51fbc45
Merge branch 'master' into iip15-sgd
millken May 8, 2023
cb1fb4d
Revert "remove sgdAct"
millken May 8, 2023
2b3a232
Revert "fix comments"
millken May 8, 2023
57a9973
Revert "fix comments"
millken May 8, 2023
ec02883
Revert "fix server tests"
millken May 8, 2023
bf8079a
Revert "[iip-15]sgdRegistry implementation"
millken May 8, 2023
adc3ec6
init sgd registry
millken May 8, 2023
1b4955d
implement sgdRegistry, added e2etest
millken May 9, 2023
7808510
Merge branch 'master' into iip15-sgd
millken May 9, 2023
4f14ef6
fix comments
millken May 10, 2023
7d64233
fix comments
millken May 10, 2023
779e6db
monitor contract events
millken May 16, 2023
ef749eb
remove unused file
millken May 16, 2023
dd8372a
Merge branch 'master' into iip15-sgd
millken May 16, 2023
e7c3abd
fix merged code
millken May 16, 2023
1951bae
fix tests
millken May 17, 2023
1e5f441
optimized code
millken May 17, 2023
6ad008d
fix tests
millken May 17, 2023
ad8d2d8
fix comments
millken May 17, 2023
4fc5e39
fix comments
millken May 18, 2023
ad49288
fix comments
millken May 18, 2023
9d6149d
add FetchContracts interface to sgdRegistry
millken May 19, 2023
71f9386
fix comments
millken May 23, 2023
e17fbce
fix comments
millken May 24, 2023
d4001c8
update SGDRegistry, improve checkIndex performance
millken May 30, 2023
203d6a1
fix ci flow
millken May 30, 2023
e6152e9
fix ci flow
millken May 30, 2023
0087a81
fix yaml var name
millken May 30, 2023
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
32 changes: 16 additions & 16 deletions action/protocol/execution/testdata-istanbul/iip15-manager.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ contract IIP15Manager is Ownable {

event ContractRegistered(address contractAddress, address recipient);
event ContractApproved(address contractAddress);
event ContractUnapproved(address contractAddress);
event ContractDisapproved(address contractAddress);
event ContractRemoved(address contractAddress);

function registerContract(address _contractAddress, address _recipient) public {
Expand All @@ -39,7 +39,7 @@ contract IIP15Manager is Ownable {
require(contractInfo.recipient != address(0), "Contract is not registered");
require(contractInfo.isApproved, "Contract is not approved");
contractInfo.isApproved = false;
emit ContractUnapproved(_contractAddress);
emit ContractDisapproved(_contractAddress);
}

function removeContract(address _contractAddress) public onlyOwner {
Expand Down
3 changes: 3 additions & 0 deletions blockchain/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ type (
BloomfilterIndexDBPath string `yaml:"bloomfilterIndexDBPath"`
CandidateIndexDBPath string `yaml:"candidateIndexDBPath"`
StakingIndexDBPath string `yaml:"stakingIndexDBPath"`
SGDIndexDBPath string `yaml:"sgdIndexDBPath"`
SGDContract string `yaml:"sgdContract"`
ID uint32 `yaml:"id"`
EVMNetworkID uint32 `yaml:"evmNetworkID"`
Address string `yaml:"address"`
Expand Down Expand Up @@ -83,6 +85,7 @@ var (
BloomfilterIndexDBPath: "/var/data/bloomfilter.index.db",
CandidateIndexDBPath: "/var/data/candidate.index.db",
StakingIndexDBPath: "/var/data/staking.index.db",
SGDIndexDBPath: "/var/data/sgd.index.db",
ID: 1,
EVMNetworkID: 4689,
Address: "",
Expand Down
93 changes: 88 additions & 5 deletions blockindex/indexpb/index.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion blockindex/indexpb/index.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
// This source code is governed by Apache License 2.0 that can be found in the LICENSE file.

// To compile the proto, run:
// protoc --go_out=plugins=grpc:. *.proto
// protoc --go_out=. *.proto
// option go_package = "../indexpb"; is to specify the package name in the generated go file
syntax = "proto3";
package indexpb;

Expand All @@ -17,3 +18,9 @@ message BlockIndex {
message ActionIndex {
uint64 blkHeight = 1;
}

message SGDIndex {
bytes contract = 1;
bytes receiver = 2;
bool approved = 3;
}
Loading