Skip to content

Commit

Permalink
rename _isClassic to _
Browse files Browse the repository at this point in the history
  • Loading branch information
fragwuerdig committed Jun 8, 2023
1 parent ad68f25 commit 956994d
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 38 deletions.
12 changes: 6 additions & 6 deletions src/core/wasm/msgs/MsgClearContractAdmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class MsgClearContractAdmin extends JSONSerializable<

public static fromAmino(
data: MsgClearContractAdmin.Amino,
_isClassic?: boolean
_?: boolean
): MsgClearContractAdmin {
const {
value: { sender, contract },
Expand All @@ -28,7 +28,7 @@ export class MsgClearContractAdmin extends JSONSerializable<
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
public toAmino(_isClassic?: boolean): MsgClearContractAdmin.Amino {
public toAmino(_?: boolean): MsgClearContractAdmin.Amino {
const { admin, contract } = this;
return {
type: 'wasm/MsgClearAdmin',
Expand All @@ -41,13 +41,13 @@ export class MsgClearContractAdmin extends JSONSerializable<

public static fromProto(
data: MsgClearContractAdmin.Proto,
_isClassic?: boolean
_?: boolean
): MsgClearContractAdmin {
const { sender, contract } = data as MsgClearContractAdmin.DataV2;
return new MsgClearContractAdmin(sender, contract);
}

public toProto(_isClassic?: boolean): MsgClearContractAdmin.Proto {
public toProto(_?: boolean): MsgClearContractAdmin.Proto {
return MsgClearAdmin_pb.fromPartial({
sender: this.admin,
contract: this.contract,
Expand Down Expand Up @@ -75,13 +75,13 @@ export class MsgClearContractAdmin extends JSONSerializable<

public static fromData(
data: MsgClearContractAdmin.Data,
_isClassic?: boolean
_?: boolean
): MsgClearContractAdmin {
const { sender, contract } = data as MsgClearContractAdmin.DataV2;
return new MsgClearContractAdmin(sender, contract);
}

public toData(_isClassic?: boolean): MsgClearContractAdmin.Data {
public toData(_?: boolean): MsgClearContractAdmin.Data {
return {
'@type': '/cosmwasm.wasm.v1.MsgClearAdmin',
sender: this.admin,
Expand Down
12 changes: 6 additions & 6 deletions src/core/wasm/msgs/MsgExecuteContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class MsgExecuteContract extends JSONSerializable<

public static fromAmino(
data: MsgExecuteContract.Amino,
_isClassic?: boolean
_?: boolean
): MsgExecuteContract {
const {
value: { sender, contract, msg, funds },
Expand All @@ -43,7 +43,7 @@ export class MsgExecuteContract extends JSONSerializable<
);
}

public toAmino(_isClassic?: boolean): MsgExecuteContract.Amino {
public toAmino(_?: boolean): MsgExecuteContract.Amino {
const { sender, contract, execute_msg, coins } = this;
return {
type: 'wasm/MsgExecuteContract',
Expand All @@ -58,7 +58,7 @@ export class MsgExecuteContract extends JSONSerializable<

public static fromProto(
proto: MsgExecuteContract.Proto,
_isClassic?: boolean
_?: boolean
): MsgExecuteContract {
const p = proto as MsgExecuteContract_pb;
return new MsgExecuteContract(
Expand All @@ -69,7 +69,7 @@ export class MsgExecuteContract extends JSONSerializable<
);
}

public toProto(_isClassic?: boolean): MsgExecuteContract.Proto {
public toProto(_?: boolean): MsgExecuteContract.Proto {
const { sender, contract, execute_msg, coins } = this;
return MsgExecuteContract_pb.fromPartial({
funds: coins.toProto(),
Expand Down Expand Up @@ -100,13 +100,13 @@ export class MsgExecuteContract extends JSONSerializable<

public static fromData(
data: MsgExecuteContract.Data,
_isClassic?: boolean
_?: boolean
): MsgExecuteContract {
const { sender, contract, msg, funds } = data as MsgExecuteContract.DataV2;
return new MsgExecuteContract(sender, contract, msg, Coins.fromData(funds));
}

public toData(_isClassic?: boolean): MsgExecuteContract.Data {
public toData(_?: boolean): MsgExecuteContract.Data {
const { sender, contract, execute_msg, coins } = this;
return {
'@type': '/cosmwasm.wasm.v1.MsgExecuteContract',
Expand Down
12 changes: 6 additions & 6 deletions src/core/wasm/msgs/MsgInstantiateContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class MsgInstantiateContract extends JSONSerializable<

public static fromAmino(
data: MsgInstantiateContract.Amino,
_isClassic?: boolean
_?: boolean
): MsgInstantiateContract {
const {
value: { sender, admin, code_id, msg, funds, label },
Expand All @@ -50,7 +50,7 @@ export class MsgInstantiateContract extends JSONSerializable<
);
}

public toAmino(_isClassic?: boolean): MsgInstantiateContract.Amino {
public toAmino(_?: boolean): MsgInstantiateContract.Amino {
const { sender, admin, code_id, init_msg, init_coins, label } = this;
return {
type: 'wasm/MsgInstantiateContract',
Expand All @@ -67,7 +67,7 @@ export class MsgInstantiateContract extends JSONSerializable<

public static fromProto(
proto: MsgInstantiateContract.Proto,
_isClassic?: boolean
_?: boolean
): MsgInstantiateContract {
const p = proto as MsgInstantiateContract_pb;
return new MsgInstantiateContract(
Expand All @@ -80,7 +80,7 @@ export class MsgInstantiateContract extends JSONSerializable<
);
}

public toProto(_isClassic?: boolean): MsgInstantiateContract.Proto {
public toProto(_?: boolean): MsgInstantiateContract.Proto {
const { sender, admin, code_id, init_msg, init_coins, label } = this;
return MsgInstantiateContract_pb.fromPartial({
admin,
Expand Down Expand Up @@ -113,7 +113,7 @@ export class MsgInstantiateContract extends JSONSerializable<

public static fromData(
data: MsgInstantiateContract.Data,
_isClassic?: boolean
_?: boolean
): MsgInstantiateContract {
const { sender, admin, code_id, label, msg, funds } =
data as MsgInstantiateContract.DataV2;
Expand All @@ -127,7 +127,7 @@ export class MsgInstantiateContract extends JSONSerializable<
);
}

public toData(_isClassic?: boolean): MsgInstantiateContract.Data {
public toData(_?: boolean): MsgInstantiateContract.Data {
const { sender, admin, code_id, label, init_msg, init_coins } = this;
return {
'@type': '/cosmwasm.wasm.v1.MsgInstantiateContract',
Expand Down
8 changes: 4 additions & 4 deletions src/core/wasm/msgs/MsgMigrateCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class MsgMigrateCode extends JSONSerializable<

public static fromAmino(
_data: MsgMigrateCode.Amino,
_isClassic?: boolean
_?: boolean
): MsgMigrateCode {
throw new Error('Not supported for the network');
}
Expand All @@ -35,7 +35,7 @@ export class MsgMigrateCode extends JSONSerializable<

public static fromProto(
_proto: MsgMigrateCode.Proto,
_isClassic?: boolean
_?: boolean
): MsgMigrateCode {
throw new Error('Not supported for the network');
}
Expand All @@ -54,12 +54,12 @@ export class MsgMigrateCode extends JSONSerializable<

public static fromData(
_data: MsgMigrateCode.Data,
_isClassic?: boolean
_?: boolean
): MsgMigrateCode {
throw new Error('Not supported for the network');
}

public toData(_isClassic?: boolean): MsgMigrateCode.Data {
public toData(_?: boolean): MsgMigrateCode.Data {
throw new Error('Not supported for the network');
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/core/wasm/msgs/MsgMigrateContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class MsgMigrateContract extends JSONSerializable<

public static fromAmino(
data: MsgMigrateContract.Amino,
_isClassic?: boolean
_?: boolean
): MsgMigrateContract {
const {
value: { sender, contract, code_id, msg },
Expand All @@ -40,7 +40,7 @@ export class MsgMigrateContract extends JSONSerializable<
);
}

public toAmino(_isClassic?: boolean): MsgMigrateContract.Amino {
public toAmino(_?: boolean): MsgMigrateContract.Amino {
const { admin, contract, new_code_id, migrate_msg } = this;
return {
type: 'wasm/MsgMigrateContract',
Expand All @@ -55,7 +55,7 @@ export class MsgMigrateContract extends JSONSerializable<

public static fromProto(
proto: MsgMigrateContract.Proto,
_isClassic?: boolean
_?: boolean
): MsgMigrateContract {
const p = proto as MsgMigrateContract_pb;
return new MsgMigrateContract(
Expand All @@ -66,7 +66,7 @@ export class MsgMigrateContract extends JSONSerializable<
);
}

public toProto(_isClassic?: boolean): MsgMigrateContract.Proto {
public toProto(_?: boolean): MsgMigrateContract.Proto {
const { admin, contract, new_code_id, migrate_msg } = this;
return MsgMigrateContract_pb.fromPartial({
sender: admin,
Expand Down Expand Up @@ -96,7 +96,7 @@ export class MsgMigrateContract extends JSONSerializable<

public static fromData(
data: MsgMigrateContract.Data,
_isClassic?: boolean
_?: boolean
): MsgMigrateContract {
const { sender, contract, code_id, msg } =
data as MsgMigrateContract.DataV2;
Expand All @@ -108,7 +108,7 @@ export class MsgMigrateContract extends JSONSerializable<
);
}

public toData(_isClassic?: boolean): MsgMigrateContract.Data {
public toData(_?: boolean): MsgMigrateContract.Data {
const { admin, contract, new_code_id, migrate_msg } = this;
return {
'@type': '/cosmwasm.wasm.v1.MsgMigrateContract',
Expand Down
12 changes: 6 additions & 6 deletions src/core/wasm/msgs/MsgStoreCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class MsgStoreCode extends JSONSerializable<

public static fromAmino(
data: MsgStoreCode.AminoV2 | MsgStoreCode.AminoV1,
_isClassic?: boolean
_?: boolean
): MsgStoreCode {
const {
value: { sender, wasm_byte_code, instantiate_permission },
Expand All @@ -39,7 +39,7 @@ export class MsgStoreCode extends JSONSerializable<
);
}

public toAmino(_isClassic?: boolean): MsgStoreCode.AminoV2 {
public toAmino(_?: boolean): MsgStoreCode.AminoV2 {
const { sender, wasm_byte_code, instantiate_permission } = this;
return {
type: 'wasm/MsgStoreCode',
Expand All @@ -53,7 +53,7 @@ export class MsgStoreCode extends JSONSerializable<

public static fromProto(
proto: MsgStoreCode.Proto,
_isClassic?: boolean
_?: boolean
): MsgStoreCode {
const p = proto as MsgStoreCode_pb;
return new MsgStoreCode(
Expand All @@ -65,7 +65,7 @@ export class MsgStoreCode extends JSONSerializable<
);
}

public toProto(_isClassic?: boolean): MsgStoreCode.Proto {
public toProto(_?: boolean): MsgStoreCode.Proto {
const { sender, wasm_byte_code, instantiate_permission } = this;
return MsgStoreCode_pb.fromPartial({
sender,
Expand All @@ -91,7 +91,7 @@ export class MsgStoreCode extends JSONSerializable<

public static fromData(
data: MsgStoreCode.DataV2 | MsgStoreCode.DataV1,
_isClassic?: boolean
_?: boolean
): MsgStoreCode {
const { sender, wasm_byte_code, instantiate_permission } =
data as MsgStoreCode.DataV2;
Expand All @@ -104,7 +104,7 @@ export class MsgStoreCode extends JSONSerializable<
);
}

public toData(_isClassic?: boolean): MsgStoreCode.Data {
public toData(_?: boolean): MsgStoreCode.Data {
const { sender, wasm_byte_code, instantiate_permission } = this;
return {
'@type': '/cosmwasm.wasm.v1.MsgStoreCode',
Expand Down
8 changes: 4 additions & 4 deletions src/core/wasm/msgs/MsgUpdateContractAdmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ export class MsgUpdateContractAdmin extends JSONSerializable<

public static fromAmino(
data: MsgUpdateContractAdmin.Amino,
_isClassic?: boolean
_?: boolean
): MsgUpdateContractAdmin {
const {
value: { sender, new_admin, contract },
} = data as MsgUpdateContractAdmin.AminoV2;
return new MsgUpdateContractAdmin(sender, new_admin, contract);
}

public toAmino(_isClassic?: boolean): MsgUpdateContractAdmin.Amino {
public toAmino(_?: boolean): MsgUpdateContractAdmin.Amino {
const { admin, new_admin, contract } = this;
return {
type: 'wasm/MsgUpdateAdmin',
Expand All @@ -46,13 +46,13 @@ export class MsgUpdateContractAdmin extends JSONSerializable<

public static fromProto(
proto: MsgUpdateContractAdmin.Proto,
_isClassic?: boolean
_?: boolean
): MsgUpdateContractAdmin {
const p = proto as MsgUpdateAdmin_pb;
return new MsgUpdateContractAdmin(p.sender, p.newAdmin, p.contract);
}

public toProto(_isClassic?: boolean): MsgUpdateContractAdmin.Proto {
public toProto(_?: boolean): MsgUpdateContractAdmin.Proto {
const { admin, new_admin, contract } = this;
return MsgUpdateAdmin_pb.fromPartial({
sender: admin,
Expand Down

0 comments on commit 956994d

Please sign in to comment.