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

feat: implement cross chain and oracle modules #42

Merged
merged 50 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
34bc9bd
ibc: init ibc module
yutianwu Nov 14, 2022
c5deb8b
add ibc querier
yutianwu Nov 15, 2022
c4b3581
rename module to crosschain
yutianwu Nov 15, 2022
694989a
minor changes
yutianwu Nov 15, 2022
d5510c8
add oracle module
yutianwu Nov 23, 2022
52049e5
add unit tests for cross chain module
yutianwu Nov 23, 2022
b207612
add tests for oracle msgs
yutianwu Nov 23, 2022
6c03351
check is relayer in turn
yutianwu Nov 24, 2022
4540635
refactor the check for the inturn relayer
yutianwu Nov 28, 2022
0a51cb3
remove pegaccount for cross chain module
yutianwu Nov 28, 2022
96be0f3
fix comments
yutianwu Dec 5, 2022
d0b11ea
add smartchain address
yutianwu Dec 6, 2022
d76c18f
update hash algo of bls sig
yutianwu Dec 16, 2022
6638269
update module name
yutianwu Dec 19, 2022
c1a1e36
fix package name
yutianwu Dec 19, 2022
e7392e9
delete bech32 address
yutianwu Dec 19, 2022
433863a
register oracle msg server
yutianwu Dec 20, 2022
0c54924
register msgs
yutianwu Dec 20, 2022
9bc618e
init codec
yutianwu Dec 26, 2022
5983dd2
update codec
yutianwu Dec 27, 2022
31b30f1
update msg claim
yutianwu Dec 28, 2022
3f66a6a
add ut for bls sig
yutianwu Dec 28, 2022
ddd5ec6
fix some issue and add msg server tests
yutianwu Dec 29, 2022
2a0803b
update tests
yutianwu Dec 29, 2022
420d1ed
fix error message
yutianwu Jan 4, 2023
6bc5563
rebase develop branch
yutianwu Jan 6, 2023
19dcf0a
refactor name of function ProcessClaim to CheckClaim
yutianwu Jan 9, 2023
3137311
add geneis initialization for oracle module
yutianwu Jan 9, 2023
b3469b1
add geneis initialization for cross chain module
yutianwu Jan 9, 2023
cbfeea5
fix issue for getting relayer fee param
yutianwu Jan 9, 2023
d58e4b9
remove unused metrics
yutianwu Jan 9, 2023
626b632
fix some comments and lint errors
yutianwu Jan 10, 2023
0040cce
fix lint error
yutianwu Jan 10, 2023
29dd2bf
add ack relayer fee to cross chain package header
yutianwu Jan 10, 2023
172a095
fix unit test
yutianwu Jan 10, 2023
705c7cb
distribute rewards to relayers
yutianwu Jan 10, 2023
98471dd
remove unused param
yutianwu Jan 10, 2023
f52d323
mint initial balance to cross chain module
yutianwu Jan 11, 2023
86bb4d2
add rpc queries for cross chain module
yutianwu Jan 11, 2023
94c002b
update the logic checking inturn relayers
yutianwu Jan 11, 2023
f0bb8bf
fix lint errors
yutianwu Jan 11, 2023
fdc3a0f
fix unit tests
yutianwu Jan 11, 2023
e7b4439
fix comments
yutianwu Jan 13, 2023
b3d6bb5
pass package header to cross chain app
yutianwu Jan 13, 2023
6d61c73
enrich the context passed to cross chain app
yutianwu Jan 13, 2023
e12c5ed
fix lint error
yutianwu Jan 13, 2023
0811eb6
fix unit tests
yutianwu Jan 16, 2023
436689b
update cross chain event
yutianwu Jan 16, 2023
8008310
fix unit tests
yutianwu Jan 16, 2023
e0fa0c2
increase oracle channel sequence when claim processed successfully
yutianwu Jan 16, 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
979 changes: 979 additions & 0 deletions bsc/rlp/decode.go

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions bsc/rlp/decode_tail_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright 2015 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// The go-ethereum library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.

package rlp

import (
"bytes"
"fmt"
)

type structWithTail struct {
A, B uint
C []uint `rlp:"tail"`
}

func ExampleDecode_structTagTail() {
// In this example, the "tail" struct tag is used to decode lists of
// differing length into a struct.
var val structWithTail

err := Decode(bytes.NewReader([]byte{0xC4, 0x01, 0x02, 0x03, 0x04}), &val)
fmt.Printf("with 4 elements: err=%v val=%v\n", err, val)

err = Decode(bytes.NewReader([]byte{0xC6, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06}), &val)
fmt.Printf("with 6 elements: err=%v val=%v\n", err, val)

// Note that at least two list elements must be present to
// fill fields A and B:
err = Decode(bytes.NewReader([]byte{0xC1, 0x01}), &val)
fmt.Printf("with 1 element: err=%q\n", err)

// Output:
// with 4 elements: err=<nil> val={1 2 [3 4]}
// with 6 elements: err=<nil> val={1 2 [3 4 5 6]}
// with 1 element: err="rlp: too few elements for rlp.structWithTail"
}
Loading