Skip to content

Commit

Permalink
chore: fix return comment and set_emis contract call
Browse files Browse the repository at this point in the history
  • Loading branch information
mootz12 committed Mar 13, 2024
1 parent 4e33cf3 commit 92c1586
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.2.0",
"version": "0.3.0",
"name": "soroban-governor-js-sdk",
"dependencies": {
"@stellar/freighter-api": "1.7.1",
Expand Down
20 changes: 10 additions & 10 deletions src/governor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export class GovernorClient {
* Constructs an initialize operation
* @param votes - The address of the votes contract
* @param settings - The governor settings for managing proposals
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
initialize({
votes,
Expand All @@ -293,7 +293,7 @@ export class GovernorClient {

/**
* Construct a settings operation. (READ ONLY: Operation should only be simulated)
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
settings(): string {
return this.contract
Expand All @@ -307,7 +307,7 @@ export class GovernorClient {
* @param title - The title of the proposal
* @param description - The description of the proposal
* @param action - The action to be taken by the proposal
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
propose({
creator,
Expand Down Expand Up @@ -340,7 +340,7 @@ export class GovernorClient {
/**
* Contructs a getProposal operation (READ ONLY: Operation should only be simulated)
* @param proposal_id - The id of the proposal
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
getProposal({ proposal_id }: { proposal_id: u32 }): string {
return this.contract
Expand All @@ -356,7 +356,7 @@ export class GovernorClient {
/**
* Construct a close operation
* @param proposal_id - The id of the proposal
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
close({ proposal_id }: { proposal_id: u32 }): string {
return this.contract
Expand All @@ -372,7 +372,7 @@ export class GovernorClient {
/**
* Construct a execute operation
* @param proposal_id - The id of the proposal
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
execute({ proposal_id }: { proposal_id: u32 }): string {
return this.contract
Expand All @@ -389,7 +389,7 @@ export class GovernorClient {
* Construct a cancel operation
* @param creator - The address of the creator
* @param proposal_id - The id of the proposal
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
cancel({
creator,
Expand All @@ -414,7 +414,7 @@ export class GovernorClient {
* @param voter - The address of the voter
* @param proposal_id - The id of the proposal
* @param support - The vote
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
vote({
voter,
Expand All @@ -441,7 +441,7 @@ export class GovernorClient {
* Construct a getVote operation (READ ONLY: Operation should only be simulated)
* @param voter - The address of the voter
* @param proposal_id - The id of the proposal
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
getVote({ voter, proposal_id }: { voter: string; proposal_id: u32 }): string {
return this.contract
Expand All @@ -458,7 +458,7 @@ export class GovernorClient {
/**
* Construct a getProposalVotes operation (READ ONLY: Operation should only be simulated)
* @param proposal_id - The id of the proposal
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
getProposalVotes({ proposal_id }: { proposal_id: u32 }): string {
return this.contract
Expand Down
42 changes: 21 additions & 21 deletions src/votes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export class VotesClient {
* Constructs an allowance operation
* @param from The address of the owner of the tokens
* @param spender The address of the spender
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
allowance({ from, spender }: { from: string; spender: string }): string {
return this.contract
Expand All @@ -177,7 +177,7 @@ export class VotesClient {
* @param spender The address of the spender
* @param amount The amount of tokens to approve
* @param expiration_ledger The expiration ledger
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
approve({
from,
Expand Down Expand Up @@ -206,7 +206,7 @@ export class VotesClient {
/**
* Constructs a balance operation
* @param id The address of the account
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
balance({ id }: { id: string }): string {
return this.contract
Expand All @@ -224,7 +224,7 @@ export class VotesClient {
* @param from The address of the sender
* @param to The address of the recipient
* @param amount The amount of tokens to transfer
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
transfer({
from,
Expand Down Expand Up @@ -253,7 +253,7 @@ export class VotesClient {
* @param from The address of the sender
* @param to The address of the recipient
* @param amount The amount of tokens to transfer
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
transferFrom({
spender,
Expand Down Expand Up @@ -283,7 +283,7 @@ export class VotesClient {
* Constructs a burn operation
* @param from The address of the account
* @param amount The amount of tokens to burn
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
burn({ from, amount }: { from: string; amount: i128 }): string {
return this.contract
Expand All @@ -302,7 +302,7 @@ export class VotesClient {
* @param spender The address of the spender
* @param from The address of the account
* @param amount The amount of tokens to burn
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
burnFrom({
spender,
Expand All @@ -327,7 +327,7 @@ export class VotesClient {

/**
* Constructs a decimals operation (READ ONLY: Operation should only be simulated)
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
decimals(): string {
return this.contract
Expand All @@ -337,7 +337,7 @@ export class VotesClient {

/**
* Constructs a name operation (READ ONLY: Operation should only be simulated)
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
name(): string {
return this.contract
Expand All @@ -347,7 +347,7 @@ export class VotesClient {

/**
* Constructs a symbol operation (READ ONLY: Operation should only be simulated)
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
symbol(): string {
return this.contract
Expand All @@ -359,7 +359,7 @@ export class VotesClient {
* Constructs an initialize operation
* @param token The address of the voting token
* @param governor The address of the governor
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
initialize({ token, governor }: { token: string; governor: string }): string {
return this.contract
Expand All @@ -375,7 +375,7 @@ export class VotesClient {

/**
* Constructs a total_supply operation (READ ONLY: Operation should only be simulated)
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
totalSupply(): string {
return this.contract
Expand All @@ -386,7 +386,7 @@ export class VotesClient {
/**
* Constructs a get_past_total_supply operation (READ ONLY: Operation should only be simulated)
* @param sequence The sequence number
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
getPastTotalSupply({ sequence }: { sequence: u32 }): string {
return this.contract
Expand All @@ -402,7 +402,7 @@ export class VotesClient {
/**
* Constructs a get_votes operation (READ ONLY: Operation should only be simulated)
* @param account The address of the account
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
getVotes({ account }: { account: string }): string {
return this.contract
Expand All @@ -419,7 +419,7 @@ export class VotesClient {
* Constructs a get_past_votes operation (READ ONLY: Operation should only be simulated)
* @param user The address of the user
* @param sequence The sequence number
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
getPastVotes({ user, sequence }: { user: string; sequence: u32 }): string {
return this.contract
Expand All @@ -436,7 +436,7 @@ export class VotesClient {
/**
* Constructs a get_delegate operation (READ ONLY: Operation should only be simulated)
* @param account The address of the account
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
getDelegate({ account }: { account: string }): string {
return this.contract
Expand All @@ -453,7 +453,7 @@ export class VotesClient {
* Constructs a delegate operation
* @param account The address of the account delgating the votes
* @param delegatee The address of the delegatee
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
delegate({
account,
Expand All @@ -477,7 +477,7 @@ export class VotesClient {
* Constructs a deposit_for operation
* @param from The address of the account
* @param amount The amount of tokens to deposit
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
depositFor({ from, amount }: { from: string; amount: i128 }): string {
return this.contract
Expand All @@ -495,7 +495,7 @@ export class VotesClient {
* Constructs a withdraw_to operation
* @param from The address of the account
* @param amount The amount of tokens to withdraw
* @returns An object containing the operation and a parser for the result
* @returns A base64 XDR string of the operation
*/
withdrawTo({ from, amount }: { from: string; amount: i128 }): string {
return this.contract
Expand Down Expand Up @@ -529,12 +529,12 @@ export class VotesClient {
* Constructs a set_emis operation
* @param from The address of the account
* @param amount The amount of tokens to withdraw
* @returns An object containing the operation
* @returns A base64 XDR string of the operation
*/
setEmis({ tokens, expiration }: { tokens: i128; expiration: u64 }): string {
return this.contract
.call(
"claim",
"set_emis",
...this.spec.funcArgsToScVals("set_emis", { tokens, expiration })
)
.toXDR("base64");
Expand Down

0 comments on commit 92c1586

Please sign in to comment.