@@ -3,7 +3,7 @@ package simapp
3
3
import (
4
4
"encoding/json"
5
5
"fmt"
6
- "io/ioutil "
6
+ "os "
7
7
8
8
"github.com/tendermint/tendermint/libs/log"
9
9
dbm "github.com/tendermint/tm-db"
@@ -34,7 +34,7 @@ func SetupSimulation(dirPrefix, dbName string) (simtypes.Config, dbm.DB, string,
34
34
logger = log .NewNopLogger ()
35
35
}
36
36
37
- dir , err := ioutil . TempDir ("" , dirPrefix )
37
+ dir , err := os . MkdirTemp ("" , dirPrefix )
38
38
if err != nil {
39
39
return simtypes.Config {}, nil , "" , nil , false , err
40
40
}
@@ -56,7 +56,7 @@ func SimulationOperations(app App, cdc codec.JSONCodec, config simtypes.Config)
56
56
}
57
57
58
58
if config .ParamsFile != "" {
59
- bz , err := ioutil .ReadFile (config .ParamsFile )
59
+ bz , err := os .ReadFile (config .ParamsFile )
60
60
if err != nil {
61
61
panic (err )
62
62
}
@@ -84,7 +84,7 @@ func CheckExportSimulation(
84
84
return err
85
85
}
86
86
87
- if err := ioutil .WriteFile (config .ExportStatePath , []byte (exported .AppState ), 0600 ); err != nil {
87
+ if err := os .WriteFile (config .ExportStatePath , []byte (exported .AppState ), 0600 ); err != nil {
88
88
return err
89
89
}
90
90
}
@@ -96,7 +96,7 @@ func CheckExportSimulation(
96
96
return err
97
97
}
98
98
99
- if err := ioutil .WriteFile (config .ExportParamsPath , paramsBz , 0600 ); err != nil {
99
+ if err := os .WriteFile (config .ExportParamsPath , paramsBz , 0600 ); err != nil {
100
100
return err
101
101
}
102
102
}
0 commit comments