Skip to content

Commit

Permalink
fix: Fix action typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
OnedgeLee committed Oct 18, 2024
1 parent 0f4caff commit ca14130
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions @planetarium/lib9c/src/actions/make_guild.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
import type { Value } from "@planetarium/bencodex";
import type { Address } from "@planetarium/account";
import { BencodexDictionary, type Value } from "@planetarium/bencodex";
import { PolymorphicAction } from "./common.js";

export type MakeGuildArgs = {
validatorAddressKey: Address;
};

export class MakeGuild extends PolymorphicAction {
protected readonly type_id: string = "make_guild";

private readonly validatorAddress: Address;

constructor({ validatorAddressKey }: MakeGuildArgs) {
super();

this.validatorAddress = validatorAddressKey;
}

protected plain_value(): Value {
return null;
const validatorAddressKey = "va" as const;

return new BencodexDictionary([[validatorAddressKey, this.validatorAddress.toBytes()]]);
}
}

0 comments on commit ca14130

Please sign in to comment.