Squashed commit of the following:

commit 05d142664d
Author: Mohamed Sohail 天明 <sohailsameja@gmail.com>
Date:   Mon Oct 7 15:12:58 2024 +0300

    feat: handle contract creation (#43)

    * feat: add contract creation handler

    * fix: process contract creations

    * fix: redis keys name

commit 4b2ad3daf9
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Oct 7 15:12:15 2024 +0300

    build(deps): bump github.com/knadh/koanf/providers/env (#37)

    Bumps [github.com/knadh/koanf/providers/env](https://github.com/knadh/koanf) from 0.1.0 to 1.0.0.
    - [Release notes](https://github.com/knadh/koanf/releases)
    - [Commits](https://github.com/knadh/koanf/compare/v0.1.0...v1.0.0)

    ---
    updated-dependencies:
    - dependency-name: github.com/knadh/koanf/providers/env
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit f1086fcdc1
Author: Mohamed Sohail 天明 <sohailsameja@gmail.com>
Date:   Mon Oct 7 10:07:11 2024 +0300

    feat: optimize exists to check multiple keys in one call (#40)

    * closes #32

commit fd59d286f5
Author: Mohammed Sohail <sohailsameja@gmail.com>
Date:   Mon Oct 7 09:49:01 2024 +0300

    feat: add custodial registration proxy handler
This commit is contained in:
2024-10-07 15:14:24 +03:00
parent 8e3e027044
commit 725c18c0ff
12 changed files with 206 additions and 30 deletions

View File

@@ -230,12 +230,12 @@ func bootstrapCache() error {
}
for _, address := range ko.MustStrings("bootstrap.watchlist") {
if err := cache.Add(ctx, address); err != nil {
if err := cache.Add(ctx, ethutils.HexToAddress(address).Hex()); err != nil {
return err
}
}
for _, address := range ko.MustStrings("bootstrap.blacklist") {
if err := cache.Remove(ctx, address); err != nil {
if err := cache.Remove(ctx, ethutils.HexToAddress(address).Hex()); err != nil {
return err
}
}

View File

@@ -11,6 +11,8 @@ func bootstrapEventRouter(cacheProvider cache.Cache, pubCB router.Callback) *rou
handlerContainer := handler.New(cacheProvider)
router := router.New(pubCB)
router.RegisterContractCreationHandler(handler.HandleContractCreation())
router.RegisterLogRoute(w3.H("0x26162814817e23ec5035d6a2edc6c422da2da2119e27cfca6be65cc2dc55ca4c"), handler.HandleFaucetGiveLog())
router.RegisterLogRoute(w3.H("0xa226db3f664042183ee0281230bba26cbf7b5057e50aee7f25a175ff45ce4d7f"), handler.HandleIndexAddLog(handlerContainer))
router.RegisterLogRoute(w3.H("0x24a12366c02e13fe4a9e03d86a8952e85bb74a456c16e4a18b6d8295700b74bb"), handler.HandleIndexRemoveLog(handlerContainer))
@@ -21,6 +23,7 @@ func bootstrapEventRouter(cacheProvider cache.Cache, pubCB router.Callback) *rou
router.RegisterLogRoute(w3.H("0x6b7e2e653f93b645d4ed7292d6429f96637084363e477c8aaea1a43ed13c284e"), handler.HandleSealStateChangeLog())
router.RegisterLogRoute(w3.H("0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5"), handler.HandleTokenBurnLog())
router.RegisterLogRoute(w3.H("0xab8530f87dc9b59234c4623bf917212bb2536d647574c8e7e5da92c2ede0c9f8"), handler.HandleTokenMintLog())
router.RegisterLogRoute(w3.H("0x894e56e1dac400b4475c83d8af0f0aa44de17c62764bd82f6e768a504e242461"), handler.HandleCustodialRegistrationLog())
router.RegisterLogRoute(w3.H("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), handler.HandleTokenTransferLog(handlerContainer))
router.RegisterInputDataRoute("63e4bff4", handler.HandleFaucetGiveInputData())
@@ -35,6 +38,7 @@ func bootstrapEventRouter(cacheProvider cache.Cache, pubCB router.Callback) *rou
router.RegisterInputDataRoute("86fe212d", handler.HandleSealStateChangeInputData())
router.RegisterInputDataRoute("42966c68", handler.HandleTokenBurnInputData())
router.RegisterInputDataRoute("449a52f8", handler.HandleTokenMintInputData())
router.RegisterInputDataRoute("4420e486", handler.HandleCustodialRegistrationInputData())
router.RegisterInputDataRoute("a9059cbb", handler.HandleTokenTransferInputData(handlerContainer))
router.RegisterInputDataRoute("23b872dd", handler.HandleTokenTransferInputData(handlerContainer))