Skip to content

Commit

Permalink
Add MassaStation deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
pivilartisant committed Nov 21, 2024
1 parent d174818 commit 6e1ffb6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/massaStation/MassaStationAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,18 @@ export class MassaStationAccount implements Provider {
return client.executeReadOnlyCall(readOnlyParams);
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
public async deploySC(_params: DeploySCParams): Promise<SmartContract> {
public async deploySC(params: DeploySCParams): Promise<SmartContract> {
console.log(params);
// const body: DeploySCFunctionBody = {
// nickname: this.accountName,
// smartContract: params.byteCode
// };

// const res = await postRequest<MSSendOperationResp>(
// `${MASSA_STATION_URL}cmd/deploySC`,
// body,
// );

throw new Error('Method not implemented.');
}

Expand Down
10 changes: 10 additions & 0 deletions src/massaStation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ export type ExecuteFunctionBody = {
async?: boolean;
};

export type DeploySCFunctionBody = {
nickname: string;
smartContract: File;
gasLimit: number;
coins: number;
expiry: number;
fee: number;
datastore: string;
};

export type PluginInfo = {
author: string;
description: string;
Expand Down

0 comments on commit 6e1ffb6

Please sign in to comment.