@@ -43,13 +43,12 @@ func getTransaction(ctx client.Context, txHash string) (*types.TxResponse, error
4343}
4444
4545func CrossChainSwap (c * cosmos.CosmosChain , ctx context.Context , keyName string , ibcDenom string ) (tx ibc.Tx , _ error ) {
46- tn := getFullNode ( c )
46+ tn := c . GetNode ( )
4747
4848 txHash , err := tn .ExecTx (ctx , keyName ,
4949 "feeabs" , "swap" , ibcDenom ,
5050 "--gas" , "auto" ,
5151 )
52-
5352 if err != nil {
5453 return tx , fmt .Errorf ("executing transaction failed: %w" , err )
5554 }
@@ -103,7 +102,7 @@ func CrossChainSwap(c *cosmos.CosmosChain, ctx context.Context, keyName string,
103102}
104103
105104func AddHostZoneProposal (c * cosmos.CosmosChain , ctx context.Context , keyName string , fileLocation string ) (string , error ) {
106- tn := getFullNode ( c )
105+ tn := c . GetNode ( )
107106 dat , err := os .ReadFile (fileLocation )
108107 if err != nil {
109108 return "" , fmt .Errorf ("failed to read file: %w" , err )
@@ -127,7 +126,7 @@ func AddHostZoneProposal(c *cosmos.CosmosChain, ctx context.Context, keyName str
127126}
128127
129128func DeleteHostZoneProposal (c * cosmos.CosmosChain , ctx context.Context , keyName string , fileLocation string ) (string , error ) {
130- tn := getFullNode ( c )
129+ tn := c . GetNode ( )
131130 dat , err := os .ReadFile (fileLocation )
132131 if err != nil {
133132 return "" , fmt .Errorf ("failed to read file: %w" , err )
@@ -151,7 +150,7 @@ func DeleteHostZoneProposal(c *cosmos.CosmosChain, ctx context.Context, keyName
151150}
152151
153152func SetHostZoneProposal (c * cosmos.CosmosChain , ctx context.Context , keyName string , fileLocation string ) (string , error ) {
154- tn := getFullNode ( c )
153+ tn := c . GetNode ( )
155154 dat , err := os .ReadFile (fileLocation )
156155 if err != nil {
157156 return "" , fmt .Errorf ("failed to read file: %w" , err )
@@ -175,7 +174,7 @@ func SetHostZoneProposal(c *cosmos.CosmosChain, ctx context.Context, keyName str
175174}
176175
177176func ParamChangeProposal (c * cosmos.CosmosChain , ctx context.Context , keyName string , prop * paramsutils.ParamChangeProposalJSON ) (tx cosmos.TxProposal , _ error ) {
178- tn := getFullNode ( c )
177+ tn := c . GetNode ( )
179178 content , err := json .Marshal (prop )
180179 if err != nil {
181180 return tx , err
@@ -206,7 +205,8 @@ func ParamChangeProposal(c *cosmos.CosmosChain, ctx context.Context, keyName str
206205}
207206
208207func txProposal (c * cosmos.CosmosChain , txHash string ) (tx cosmos.TxProposal , _ error ) {
209- fn := getFullNode (c )
208+ fn := c .GetNode ()
209+
210210 txResp , err := getTransaction (fn .CliContext (), txHash )
211211 if err != nil {
212212 return tx , fmt .Errorf ("failed to get transaction %s: %w" , txHash , err )
0 commit comments