diff --git a/app/app.go b/app/app.go index 48476f47..6cd75d92 100644 --- a/app/app.go +++ b/app/app.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "io" + "io/fs" "net/http" "os" "path/filepath" @@ -1061,7 +1062,7 @@ func (app *App) SimulationManager() *module.SimulationManager { // provideFS is used to provide the virtual file system used for the logic module // to load external file. -func (app *App) provideFS(ctx context.Context) logicfs.FS { +func (app *App) provideFS(ctx context.Context) fs.FS { wasmHandler := logicfs.NewWasmHandler(app.WasmKeeper) return logicfs.NewVirtualFS(ctx, []logicfs.URIHandler{wasmHandler}) } diff --git a/x/logic/fs/fs.go b/x/logic/fs/virtual_fs.go similarity index 95% rename from x/logic/fs/fs.go rename to x/logic/fs/virtual_fs.go index b7c50004..9529e6ab 100644 --- a/x/logic/fs/fs.go +++ b/x/logic/fs/virtual_fs.go @@ -5,10 +5,6 @@ import ( "io/fs" ) -type FS interface { - fs.FS -} - // VirtualFS is the custom virtual file system used into the blockchain. // It will hold a list of handler that can resolve file URI and return the corresponding binary file. type VirtualFS struct { @@ -16,7 +12,7 @@ type VirtualFS struct { router Router } -var _ FS = (*VirtualFS)(nil) +var _ fs.FS = (*VirtualFS)(nil) // NewVirtualFS return a new VirtualFS object that will handle all virtual file on the interpreter. // File can be provided from different sources like CosmWasm cw-storage smart contract. diff --git a/x/logic/keeper/keeper.go b/x/logic/keeper/keeper.go index 433af3e3..d8204651 100644 --- a/x/logic/keeper/keeper.go +++ b/x/logic/keeper/keeper.go @@ -3,12 +3,12 @@ package keeper import ( goctx "context" "fmt" + "io/fs" "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/okp4/okp4d/x/logic/fs" "github.com/okp4/okp4d/x/logic/types" )