Skip to content

Commit

Permalink
Merge pull request #59 from terra-money/feat/tokenfactory
Browse files Browse the repository at this point in the history
feat: urls to osmosis instead of cosmwasm
  • Loading branch information
emidev98 authored Nov 13, 2023
2 parents 43ff7c1 + 9de1410 commit d8a00ad
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 27 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@terra-money/feather.js",
"version": "2.0.0-beta.8",
"version": "2.0.0-beta.9",
"description": "The JavaScript SDK for Terra and Feather chains",
"license": "MIT",
"author": "Terraform Labs, PTE.",
Expand Down
3 changes: 3 additions & 0 deletions src/client/lcd/LCDClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
WasmAPI,
IbcTransferAPI,
IbcAPI,
TokenFactory,
} from './api';
import { LCDUtils } from './LCDUtils';
import { Wallet } from './Wallet';
Expand Down Expand Up @@ -113,6 +114,7 @@ export class LCDClient {
public slashing: SlashingAPI;
public staking: StakingAPI;
public tendermint: TendermintAPI;
public tokenfactory: TokenFactory;
public wasm: WasmAPI;
public tx: TxAPI;
public ibc: IbcAPI;
Expand Down Expand Up @@ -159,6 +161,7 @@ export class LCDClient {
this.slashing = new SlashingAPI(this);
this.staking = new StakingAPI(this);
this.tendermint = new TendermintAPI(this);
this.tokenfactory = new TokenFactory(this);
this.wasm = new WasmAPI(this);
this.ibc = new IbcAPI(this);
this.icaV1 = new ICAv1API(this);
Expand Down
16 changes: 8 additions & 8 deletions src/core/Msg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -612,13 +612,13 @@ export namespace Msg {
case '/terra.wasm.v1beta1.MsgClearContractAdmin':
case '/cosmwasm.wasm.v1.MsgClearAdmin':
return MsgClearContractAdmin.fromData(data, isClassic);
case '/cosmwasm.tokenfactory.v1beta1.MsgCreateDenom':
case '/osmosis.tokenfactory.v1beta1.MsgCreateDenom':
return MsgCreateDenom.fromData(data);
case '/cosmwasm.tokenfactory.v1beta1.MsgBurn':
case '/osmosis.tokenfactory.v1beta1.MsgBurn':
return MsgBurn.fromData(data);
case '/cosmwasm.tokenfactory.v1beta1.MsgChangeAdmin':
case '/osmosis.tokenfactory.v1beta1.MsgChangeAdmin':
return MsgChangeAdmin.fromData(data);
case '/cosmwasm.tokenfactory.v1beta1.MsgMint':
case '/osmosis.tokenfactory.v1beta1.MsgMint':
return MsgMint.fromData(data);

// ibc-transfer
Expand Down Expand Up @@ -816,13 +816,13 @@ export namespace Msg {
case '/terra.wasm.v1beta1.MsgClearContractAdmin':
case '/cosmwasm.wasm.v1.MsgClearAdmin':
return MsgClearContractAdmin.unpackAny(proto, isClassic);
case '/cosmwasm.tokenfactory.v1beta1.MsgCreateDenom':
case '/osmosis.tokenfactory.v1beta1.MsgCreateDenom':
return MsgCreateDenom.unpackAny(proto, isClassic);
case '/cosmwasm.tokenfactory.v1beta1.MsgBurn':
case '/osmosis.tokenfactory.v1beta1.MsgBurn':
return MsgBurn.unpackAny(proto, isClassic);
case '/cosmwasm.tokenfactory.v1beta1.MsgChangeAdmin':
case '/osmosis.tokenfactory.v1beta1.MsgChangeAdmin':
return MsgChangeAdmin.unpackAny(proto, isClassic);
case '/cosmwasm.tokenfactory.v1beta1.MsgMint':
case '/osmosis.tokenfactory.v1beta1.MsgMint':
return MsgMint.unpackAny(proto, isClassic);

// ibc-transfer
Expand Down
2 changes: 1 addition & 1 deletion src/core/wasm/msgs/tokenfactory/MsgBurn.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('MsgBurn', () => {

it('match data interface with model MsgBurn correctly', () => {
const data: MsgBurn.Data = {
'@type': '/cosmwasm.tokenfactory.v1beta1.MsgBurn',
'@type': '/osmosis.tokenfactory.v1beta1.MsgBurn',
sender: 'MinterAddr',
amount: new Coin('uluna', '10'),
};
Expand Down
6 changes: 3 additions & 3 deletions src/core/wasm/msgs/tokenfactory/MsgBurn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class MsgBurn extends JSONSerializable<
public packAny(_?: boolean): Any {
_;
return Any.fromPartial({
typeUrl: '/cosmwasm.tokenfactory.v1beta1.MsgBurn',
typeUrl: '/osmosis.tokenfactory.v1beta1.MsgBurn',
value: MsgBurn_pb.encode(this.toProto()).finish(),
});
}
Expand All @@ -75,7 +75,7 @@ export class MsgBurn extends JSONSerializable<
_;
const { sender, amount } = this;
return {
'@type': '/cosmwasm.tokenfactory.v1beta1.MsgBurn',
'@type': '/osmosis.tokenfactory.v1beta1.MsgBurn',
sender,
amount,
};
Expand All @@ -100,7 +100,7 @@ export namespace MsgBurn {
}

export interface Data {
'@type': '/cosmwasm.tokenfactory.v1beta1.MsgBurn';
'@type': '/osmosis.tokenfactory.v1beta1.MsgBurn';
sender: AccAddress;
amount?: Coin;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/wasm/msgs/tokenfactory/MsgChangeAdmin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('MsgChangeAdmin', () => {

it('match data interface with model MsgChangeAdmin correctly', () => {
const data: MsgChangeAdmin.Data = {
'@type': '/cosmwasm.tokenfactory.v1beta1.MsgChangeAdmin',
'@type': '/osmosis.tokenfactory.v1beta1.MsgChangeAdmin',
sender: 'terrav1',
newAdmin: 'terrav2',
denom: 'uluna',
Expand Down
6 changes: 3 additions & 3 deletions src/core/wasm/msgs/tokenfactory/MsgChangeAdmin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class MsgChangeAdmin extends JSONSerializable<
public packAny(_?: boolean): Any {
_;
return Any.fromPartial({
typeUrl: '/cosmwasm.tokenfactory.v1beta1.MsgChangeAdmin',
typeUrl: '/osmosis.tokenfactory.v1beta1.MsgChangeAdmin',
value: MsgChangeAdmin_pb.encode(this.toProto()).finish(),
});
}
Expand All @@ -82,7 +82,7 @@ export class MsgChangeAdmin extends JSONSerializable<
_;
const { sender, newAdmin, denom } = this;
return {
'@type': '/cosmwasm.tokenfactory.v1beta1.MsgChangeAdmin',
'@type': '/osmosis.tokenfactory.v1beta1.MsgChangeAdmin',
sender,
newAdmin,
denom,
Expand All @@ -109,7 +109,7 @@ export namespace MsgChangeAdmin {
}

export interface Data {
'@type': '/cosmwasm.tokenfactory.v1beta1.MsgChangeAdmin';
'@type': '/osmosis.tokenfactory.v1beta1.MsgChangeAdmin';
sender: AccAddress;
newAdmin: AccAddress;
denom: string;
Expand Down
2 changes: 1 addition & 1 deletion src/core/wasm/msgs/tokenfactory/MsgCreateDenom.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('MsgCreateDenom', () => {

it('match data interface with model MsgCreateDenom correctly', () => {
const data: MsgCreateDenom.Data = {
'@type': '/cosmwasm.tokenfactory.v1beta1.MsgCreateDenom',
'@type': '/osmosis.tokenfactory.v1beta1.MsgCreateDenom',
sender: 'terra',
subdenom: 'uluna',
};
Expand Down
6 changes: 3 additions & 3 deletions src/core/wasm/msgs/tokenfactory/MsgCreateDenom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class MsgCreateDenom extends JSONSerializable<
public packAny(_?: boolean): Any {
_;
return Any.fromPartial({
typeUrl: '/cosmwasm.tokenfactory.v1beta1.MsgCreateDenom',
typeUrl: '/osmosis.tokenfactory.v1beta1.MsgCreateDenom',
value: MsgCreateDenom_pb.encode(this.toProto()).finish(),
});
}
Expand All @@ -84,7 +84,7 @@ export class MsgCreateDenom extends JSONSerializable<
_;
const { sender, subdenom } = this;
return {
'@type': '/cosmwasm.tokenfactory.v1beta1.MsgCreateDenom',
'@type': '/osmosis.tokenfactory.v1beta1.MsgCreateDenom',
sender,
subdenom,
};
Expand All @@ -109,7 +109,7 @@ export namespace MsgCreateDenom {
}

export interface Data {
'@type': '/cosmwasm.tokenfactory.v1beta1.MsgCreateDenom';
'@type': '/osmosis.tokenfactory.v1beta1.MsgCreateDenom';
sender: AccAddress;
subdenom: string;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/wasm/msgs/tokenfactory/MsgMint.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('MsgMint', () => {

it('match data interface with model MsgMint correctly', () => {
const data: MsgMint.Data = {
'@type': '/cosmwasm.tokenfactory.v1beta1.MsgMint',
'@type': '/osmosis.tokenfactory.v1beta1.MsgMint',
sender: 'MinterAddr',
amount: new Coin('uluna', '10'),
};
Expand Down
6 changes: 3 additions & 3 deletions src/core/wasm/msgs/tokenfactory/MsgMint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class MsgMint extends JSONSerializable<
public packAny(_?: boolean): Any {
_;
return Any.fromPartial({
typeUrl: '/cosmwasm.tokenfactory.v1beta1.MsgMint',
typeUrl: '/osmosis.tokenfactory.v1beta1.MsgMint',
value: MsgMint_pb.encode(this.toProto()).finish(),
});
}
Expand All @@ -75,7 +75,7 @@ export class MsgMint extends JSONSerializable<
_;
const { sender, amount } = this;
return {
'@type': '/cosmwasm.tokenfactory.v1beta1.MsgMint',
'@type': '/osmosis.tokenfactory.v1beta1.MsgMint',
sender,
amount,
};
Expand All @@ -100,7 +100,7 @@ export namespace MsgMint {
}

export interface Data {
'@type': '/cosmwasm.tokenfactory.v1beta1.MsgMint';
'@type': '/osmosis.tokenfactory.v1beta1.MsgMint';
sender: AccAddress;
amount?: Coin;
}
Expand Down

0 comments on commit d8a00ad

Please sign in to comment.