Simple market fund manager

This commit is contained in:
Łukasz Magiera
2019-11-08 18:15:56 +01:00
parent eae0b84b80
commit be2e58a2fb
9 changed files with 125 additions and 75 deletions
+2
View File
@@ -2,6 +2,7 @@ package impl
import (
"context"
"github.com/filecoin-project/lotus/node/impl/market"
"github.com/filecoin-project/lotus/node/impl/client"
"github.com/filecoin-project/lotus/node/impl/paych"
@@ -21,6 +22,7 @@ type FullNodeAPI struct {
full.ChainAPI
client.API
full.MpoolAPI
market.MarketAPI
paych.PaychAPI
full.StateAPI
full.WalletAPI
+21
View File
@@ -0,0 +1,21 @@
package market
import (
"context"
"go.uber.org/fx"
"github.com/filecoin-project/lotus/chain/address"
"github.com/filecoin-project/lotus/chain/market"
"github.com/filecoin-project/lotus/chain/types"
)
type MarketAPI struct {
fx.In
FMgr *market.FundMgr
}
func (a *MarketAPI) MarketEnsureAvailable(ctx context.Context, addr address.Address, amt types.BigInt) error {
return a.FMgr.EnsureAvailable(ctx, addr, amt)
}