Skip to content

Commit

Permalink
Add a timelock filter to the outputmap query to ignore timelocks stil…
Browse files Browse the repository at this point in the history
…l in the future
  • Loading branch information
lmoe committed Dec 5, 2024
1 parent 607d226 commit 4b29f19
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/l1connection/l1connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
iotago "github.com/iotaledger/iota.go/v3"
"github.com/iotaledger/iota.go/v3/builder"
"github.com/iotaledger/iota.go/v3/nodeclient"

"github.com/iotaledger/wasp/packages/cryptolib"
"github.com/iotaledger/wasp/packages/isc"
"github.com/iotaledger/wasp/packages/parameters"
Expand Down Expand Up @@ -92,8 +93,20 @@ func (c *l1client) OutputMap(myAddress iotago.Address, timeout ...time.Duration)
defer cancelContext()

bech32Addr := myAddress.Bech32(parameters.L1().Protocol.Bech32HRP)
falseParam := false
trueParam := true

queries := []nodeclient.IndexerQuery{
&nodeclient.BasicOutputsQuery{AddressBech32: bech32Addr},
&nodeclient.BasicOutputsQuery{
AddressBech32: bech32Addr,
IndexerTimelockParas: nodeclient.IndexerTimelockParas{
HasTimelock: &trueParam,
TimelockedBefore: uint32(time.Now().Unix()),
},
IndexerNativeTokenParas: nodeclient.IndexerNativeTokenParas{
HasNativeTokens: &falseParam,
},
},
&nodeclient.FoundriesQuery{AliasAddressBech32: bech32Addr},
&nodeclient.NFTsQuery{AddressBech32: bech32Addr},
&nodeclient.AliasesQuery{GovernorBech32: bech32Addr},
Expand Down

0 comments on commit 4b29f19

Please sign in to comment.