Skip to content

Commit

Permalink
Refactor code base for migration and add upgradehandler for binary mi…
Browse files Browse the repository at this point in the history
…gration in network (#42)

* chore: fix lint issue

* chore: add upgrades

* chore: refactor code base for store migration

* chore: setup upgrade handler

* feat: fix swap test
  • Loading branch information
soring323 authored Jan 26, 2024
1 parent 884ae0a commit 89704d9
Show file tree
Hide file tree
Showing 20 changed files with 1,133 additions and 654 deletions.
712 changes: 80 additions & 632 deletions app/app.go

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions app/blocked.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package app

import (
"strings"
)

// BlockedAddrs returns all the app's module account addresses that are not
// allowed to receive external tokens.
func (app *App) BlockedAddrs() map[string]bool {
blockedAddrs := make(map[string]bool)
// We block all OFAC-blocked ETH addresses from receiving tokens as well
// The list is sourced from: https://www.treasury.gov/ofac/downloads/sanctions/1.0/sdn_advanced.xml
ofacRawEthAddrs := []string{}
for _, addr := range ofacRawEthAddrs {
blockedAddrs[addr] = true
blockedAddrs[strings.ToLower(addr)] = true
}

return blockedAddrs
}
Loading

0 comments on commit 89704d9

Please sign in to comment.