Skip to content

Commit

Permalink
gen schema
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-c-child committed May 13, 2024
1 parent fa2769b commit 4d8a6c0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
6 changes: 5 additions & 1 deletion contracts/name-minter/schema/name-minter.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,15 @@
"add_whitelist": {
"type": "object",
"required": [
"address"
"address",
"whitelist_type"
],
"properties": {
"address": {
"type": "string"
},
"whitelist_type": {
"type": "string"
}
},
"additionalProperties": false
Expand Down
11 changes: 8 additions & 3 deletions ts/src/NameMinter.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,11 @@ export interface NameMinterInterface extends NameMinterReadOnlyInterface {
pause: boolean;
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
addWhitelist: ({
address
address,
whitelistType
}: {
address: string;
whitelistType: string;
}, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise<ExecuteResult>;
removeWhitelist: ({
address
Expand Down Expand Up @@ -141,13 +143,16 @@ export class NameMinterClient extends NameMinterQueryClient implements NameMinte
}, fee, memo, funds);
};
addWhitelist = async ({
address
address,
whitelistType
}: {
address: string;
whitelistType: string;
}, fee: number | StdFee | "auto" = "auto", memo?: string, funds?: Coin[]): Promise<ExecuteResult> => {
return await this.client.execute(this.sender, this.contractAddress, {
add_whitelist: {
address
address,
whitelist_type: whitelistType
}
}, fee, memo, funds);
};
Expand Down
11 changes: 8 additions & 3 deletions ts/src/NameMinter.message-composer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ export interface NameMinterMessage {
pause: boolean;
}, funds?: Coin[]) => MsgExecuteContractEncodeObject;
addWhitelist: ({
address
address,
whitelistType
}: {
address: string;
whitelistType: string;
}, funds?: Coin[]) => MsgExecuteContractEncodeObject;
removeWhitelist: ({
address
Expand Down Expand Up @@ -116,9 +118,11 @@ export class NameMinterMessageComposer implements NameMinterMessage {
};
};
addWhitelist = ({
address
address,
whitelistType
}: {
address: string;
whitelistType: string;
}, funds?: Coin[]): MsgExecuteContractEncodeObject => {
return {
typeUrl: "/cosmwasm.wasm.v1.MsgExecuteContract",
Expand All @@ -127,7 +131,8 @@ export class NameMinterMessageComposer implements NameMinterMessage {
contract: this.contractAddress,
msg: toUtf8(JSON.stringify({
add_whitelist: {
address
address,
whitelist_type: whitelistType
}
})),
funds
Expand Down
1 change: 1 addition & 0 deletions ts/src/NameMinter.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export type ExecuteMsg = {
} | {
add_whitelist: {
address: string;
whitelist_type: string;
};
} | {
remove_whitelist: {
Expand Down

0 comments on commit 4d8a6c0

Please sign in to comment.