-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(solver): check target before accept
- Loading branch information
1 parent
c3bbe4e
commit 0e7c942
Showing
5 changed files
with
58 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//nolint:unused // Some functions are unused but are kept for future use | ||
package app | ||
|
||
import ( | ||
"github.com/omni-network/omni/contracts/bindings" | ||
"github.com/omni-network/omni/e2e/solve/devapp" | ||
"github.com/omni-network/omni/lib/netconf" | ||
"github.com/omni-network/omni/solver/types" | ||
) | ||
|
||
var ( | ||
targets map[netconf.ID]types.Targets = map[netconf.ID]types.Targets{ | ||
netconf.Devnet: {devapp.GetApp()}, | ||
} | ||
) | ||
|
||
func targetFor(network netconf.ID, call bindings.SolveCall) (types.Target, bool) { | ||
t, ok := targets[network] | ||
if !ok { | ||
return nil, false | ||
} | ||
|
||
return t.ForCall(call) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters