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

Marker ics20 hooks #1678

Merged
merged 83 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from 76 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
dd0caa8
Add Osmosis IBC-Hooks Initial port
iramiller Aug 23, 2023
9c55d4e
ibchooks lint fixes
iramiller Aug 23, 2023
4026d29
lint fixes and depguard config for golang-ci lint
iramiller Aug 23, 2023
f5d73fa
Remove import comments
iramiller Aug 23, 2023
a57bd20
wip/adding testing system
iramiller Aug 25, 2023
a0c416a
clean up tests
iramiller Aug 25, 2023
660414e
fix wasm keeper hooks wiring
iramiller Aug 25, 2023
85b72ba
add basic simulation wiring to ibchooks
iramiller Aug 25, 2023
8062e3e
set default ibchooks params in upgrade
iramiller Aug 25, 2023
5f6a150
remove unused golangci-lint linters
iramiller Aug 25, 2023
c16c977
lint work
iramiller Aug 25, 2023
157e795
protection for quotes in quoted json
iramiller Aug 25, 2023
bdbe9c8
changelog
iramiller Aug 25, 2023
a3dc938
temporary fix for invalid simulation handling for staking denom
iramiller Aug 28, 2023
7a3ce3b
Merge branch 'main' into add-ibc-hooks
iramiller Aug 28, 2023
2855900
restore supply increase proposal simulation for valid markers
iramiller Aug 28, 2023
4457e50
use calculated temporary supply increase
iramiller Aug 28, 2023
fc22b2d
wip: build fix
iramiller Aug 28, 2023
a36cae8
Further proposal disabling for marker supply tests
iramiller Aug 28, 2023
d3596e6
switch to reference contracts from embedded wasm
iramiller Aug 29, 2023
bbdc065
Merge branch 'main' into add-ibc-hooks
iramiller Sep 7, 2023
7f9ce7d
Merge remote-tracking branch 'origin/add-ibc-hooks' into nullpointer0…
nullpointer0x00 Sep 11, 2023
3627379
start hook entry point file, start marker hooks file
nullpointer0x00 Sep 11, 2023
73349df
refactor structure to allow for ics20 marker hook calls
nullpointer0x00 Sep 11, 2023
3c2a722
do lint-fix
nullpointer0x00 Sep 11, 2023
ceaa2e0
fix mock's lint
nullpointer0x00 Sep 11, 2023
2fda225
fix more lint issues
nullpointer0x00 Sep 11, 2023
e672c29
add marker send packet override
nullpointer0x00 Sep 12, 2023
b4b1567
update marker hooks logic
nullpointer0x00 Sep 12, 2023
f2377c3
Merge branch 'main' into nullpointer0x00/1127-marker-ibs20-hooks
nullpointer0x00 Sep 12, 2023
59089cc
add some more logic flow
nullpointer0x00 Sep 12, 2023
fc3c96b
check if denom is not from source chain to do marker mutations
nullpointer0x00 Sep 12, 2023
b515822
do not try and create marker if denom is from source
nullpointer0x00 Sep 12, 2023
98fdfe1
fix lint issues with imports
nullpointer0x00 Sep 12, 2023
2cbdb6b
update test
nullpointer0x00 Sep 12, 2023
aec1d73
test fix json
nullpointer0x00 Sep 13, 2023
203654b
test json change
nullpointer0x00 Sep 13, 2023
d2645b8
move marker memo struct to types
nullpointer0x00 Sep 13, 2023
be12a87
move wasm structs to type... still needs some reworking to correct json
nullpointer0x00 Sep 13, 2023
ab59ed2
refactor json structs, add tests, add constructors
nullpointer0x00 Sep 13, 2023
467d753
comment one test case for now. Test needs fixing not implementation
nullpointer0x00 Sep 13, 2023
a080f7e
add send packet functions
nullpointer0x00 Sep 14, 2023
ca120a9
add map for processing after SendPacket
nullpointer0x00 Sep 14, 2023
43e693a
move memo processing on the receiver, process transfer auths in memo
nullpointer0x00 Sep 14, 2023
506d357
Merge branch 'main' into nullpointer0x00/1127-marker-ibs20-hooks
nullpointer0x00 Sep 15, 2023
9e2bd03
finalize creating remote marker and transfer permissions, decided if …
nullpointer0x00 Sep 15, 2023
107a7bf
Merge branch 'main' into nullpointer0x00/1127-marker-ibs20-hooks
nullpointer0x00 Sep 15, 2023
709fe2b
add chain id and denom meta data
nullpointer0x00 Sep 15, 2023
fc0bd2a
Merge branch 'main' into nullpointer0x00/1127-marker-ibs20-hooks
nullpointer0x00 Sep 27, 2023
45c8bef
add callback data to post send processing, refactor packet bytes orde…
nullpointer0x00 Sep 27, 2023
5d762e4
add new marker error type, emit error on acknowledgement if error pro…
nullpointer0x00 Sep 28, 2023
e0819ff
add error handling for reset marker access grants
nullpointer0x00 Sep 28, 2023
0e73b49
remove unused bank keeper from constructor of maker hooks
nullpointer0x00 Sep 28, 2023
5a72f4d
remove unused parameter from get chain id
nullpointer0x00 Sep 28, 2023
8bcfdba
rename variables
nullpointer0x00 Sep 28, 2023
1d92901
remove unused variable from memo processing
nullpointer0x00 Sep 28, 2023
43e4d96
refactor send processing fn parameters
nullpointer0x00 Sep 28, 2023
a7382b2
add call back validation checks in wasm processing function, various …
nullpointer0x00 Sep 28, 2023
acee23c
add start to maker hooks tests, remove todo comment
nullpointer0x00 Sep 28, 2023
71ed550
add happy path test for ProcessMarkerMemo
nullpointer0x00 Sep 28, 2023
7adca36
refactor way memo creation and processing works, refactor method name…
nullpointer0x00 Oct 4, 2023
dea432c
Merge branch 'main' into nullpointer0x00/1127-marker-ibs20-hooks
nullpointer0x00 Oct 4, 2023
027eb71
complete process marker memo tests
nullpointer0x00 Oct 4, 2023
bdbe888
finish reset permissions tests
nullpointer0x00 Oct 4, 2023
9d55659
add more tests
nullpointer0x00 Oct 5, 2023
df21e7a
rename pre send data processing functions
nullpointer0x00 Oct 5, 2023
067405d
add pre send packet data processing test for marker hooks
nullpointer0x00 Oct 5, 2023
584d94f
refactor processing loop
nullpointer0x00 Oct 5, 2023
175712e
review PR and add updates to method comments and refactor function name
nullpointer0x00 Oct 6, 2023
3d666ce
more refactors
nullpointer0x00 Oct 6, 2023
c6311b0
add change log
nullpointer0x00 Oct 6, 2023
c3b1bb9
fix method comments
nullpointer0x00 Oct 9, 2023
69a3c1c
add test
nullpointer0x00 Oct 9, 2023
e561486
change logic flow
nullpointer0x00 Oct 9, 2023
673eb20
refactor AddUpdateMarker flow
nullpointer0x00 Oct 9, 2023
26dec33
fix lint
nullpointer0x00 Oct 9, 2023
423a1da
rename method
nullpointer0x00 Oct 10, 2023
65331a3
update tests
nullpointer0x00 Oct 10, 2023
f282b90
change codeID
nullpointer0x00 Oct 10, 2023
dea154d
add allow force transfer flag
nullpointer0x00 Oct 10, 2023
abf05bc
extract updating of auth-transfers and allow force transfer into own …
nullpointer0x00 Oct 10, 2023
f72c362
Merge branch 'main' into nullpointer0x00/1127-marker-ibs20-hooks
nullpointer0x00 Oct 10, 2023
e37ddef
Merge branch 'main' into nullpointer0x00/1127-marker-ibs20-hooks
iramiller Oct 10, 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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
Holds are also reflected in the `x/bank` module's `SpendableBalances` query.
* Add new MaxSupply param to marker module and deprecate MaxTotalSupply. [#1292](https://github.com/provenance-io/provenance/issues/1292).
* Add hidden docgen command to output documentation in different formats. [#1468](https://github.com/provenance-io/provenance/issues/1468).
* Add ics20 marker creation for receiving marker via ibc sends [#1127](https://github.com/provenance-io/provenance/issues/1127).

### Improvements

Expand Down
12 changes: 11 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,8 @@ type App struct {

TransferStack *ibchooks.IBCMiddleware
Ics20WasmHooks *ibchooks.WasmHooks
Ics20MarkerHooks *ibchooks.MarkerHooks
IbcHooks *ibchooks.IbcHooks
HooksICS4Wrapper ibchooks.ICS4Middleware

// the module manager
Expand Down Expand Up @@ -509,9 +511,14 @@ func New(
addrPrefix := sdk.GetConfig().GetBech32AccountAddrPrefix() // We use this approach so running tests which use "cosmos" will work while we use "pb"
wasmHooks := ibchooks.NewWasmHooks(&hooksKeeper, nil, addrPrefix) // The contract keeper needs to be set later
app.Ics20WasmHooks = &wasmHooks
markerHooks := ibchooks.NewMarkerHooks(nil)
app.Ics20MarkerHooks = &markerHooks
ibcHooks := ibchooks.NewIbcHooks(appCodec, &hooksKeeper, app.IBCKeeper, app.Ics20WasmHooks, app.Ics20MarkerHooks, nil)
app.IbcHooks = &ibcHooks

app.HooksICS4Wrapper = ibchooks.NewICS4Middleware(
app.IBCKeeper.ChannelKeeper,
app.Ics20WasmHooks,
app.IbcHooks,
)

// Create Transfer Keepers
Expand Down Expand Up @@ -641,6 +648,9 @@ func New(
app.ContractKeeper = wasmkeeper.NewDefaultPermissionKeeper(app.WasmKeeper)
app.Ics20WasmHooks.ContractKeeper = app.WasmKeeper // app.ContractKeeper -- this changes in the next version of wasm to a permissioned keeper
app.IBCHooksKeeper.ContractKeeper = app.ContractKeeper
app.Ics20MarkerHooks.MarkerKeeper = &app.MarkerKeeper

app.IbcHooks.SendPacketPreProcessors = []ibchookstypes.PreSendPacketDataProcessingFn{app.Ics20MarkerHooks.ProcessMarkerMemoFn, app.Ics20WasmHooks.GetWasmSendPacketPreProcessor}

app.ScopedOracleKeeper = scopedOracleKeeper
app.OracleKeeper = *oraclekeeper.NewKeeper(
Expand Down
Loading
Loading