Skip to content

Commit

Permalink
feat: add admin votes token contract
Browse files Browse the repository at this point in the history
  • Loading branch information
mootz12 committed Apr 24, 2024
1 parent 938dfdc commit 75c7314
Show file tree
Hide file tree
Showing 5 changed files with 266 additions and 185 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,5 +1,5 @@
{
"version": "0.6.1",
"version": "1.0.0",
"name": "@script3/soroban-governor-sdk",
"description": "Javascript SDK for the Soroban Governor",
"type": "module",
Expand Down
6 changes: 4 additions & 2 deletions src/contract_error.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { xdr } from "@stellar/stellar-sdk";
import { SorobanRpc } from "@stellar/stellar-sdk";
import { SorobanRpc, xdr } from "@stellar/stellar-sdk";
export class ContractError extends Error {
/**
* The type of the error
Expand Down Expand Up @@ -53,6 +52,9 @@ export enum ContractErrorType {
// Voter Token Errors
InsufficientVotesError = 100,
InvalidDelegateeError = 101,
InvalidCheckpointError = 102,
SequenceNotClosedError = 103,
InvalidEmissionConfigError = 104,

// Governor Errors
InvalidSettingsError = 200,
Expand Down
2 changes: 1 addition & 1 deletion src/governor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ export class GovernorContract extends Contract {
* Construct a vote operation
* @param voter - The address of the voter
* @param proposal_id - The id of the proposal
* @param support - The vote
* @param support - The vote support type (0=against, 1=for, 2=abstain)
* @returns A base64 XDR string of the operation
*/
vote({
Expand Down
Loading

0 comments on commit 75c7314

Please sign in to comment.