Skip to content

Commit

Permalink
Merge branch 'tupui:main' into dapp-add-devote
Browse files Browse the repository at this point in the history
  • Loading branch information
0xExp-po authored Sep 18, 2024
2 parents 34d3a89 + c10b739 commit a7af81a
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 70 deletions.
16 changes: 8 additions & 8 deletions dapp/packages/soroban_versioning/dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/// <reference types="node" resolution-mode="require"/>
import {Buffer} from "buffer";
import { Buffer } from "buffer";
import {
AssembledTransaction,
Client as ContractClient,
ClientOptions as ContractClientOptions,
} from "@stellar/stellar-sdk/contract";
import type {u32} from "@stellar/stellar-sdk/contract";
import type { u32 } from "@stellar/stellar-sdk/contract";

export * from "@stellar/stellar-sdk";
export * as contract from "@stellar/stellar-sdk/contract";
Expand Down Expand Up @@ -45,13 +45,13 @@ export type DataKey = {
};
export type ProjectKey =
| {
tag: "Key";
values: readonly [Buffer];
}
tag: "Key";
values: readonly [Buffer];
}
| {
tag: "LastHash";
values: readonly [Buffer];
};
tag: "LastHash";
values: readonly [Buffer];
};

export interface Config {
hash: string;
Expand Down
96 changes: 48 additions & 48 deletions dapp/packages/soroban_versioning/dist/index.js
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
import {Buffer} from "buffer";
import { Buffer } from "buffer";
import {
Client as ContractClient,
Spec as ContractSpec,
Client as ContractClient,
Spec as ContractSpec,
} from "@stellar/stellar-sdk/contract";

export * from "@stellar/stellar-sdk";
export * as contract from "@stellar/stellar-sdk/contract";
export * as rpc from "@stellar/stellar-sdk/rpc";
if (typeof window !== "undefined") {
//@ts-ignore Buffer exists
window.Buffer = window.Buffer || Buffer;
//@ts-ignore Buffer exists
window.Buffer = window.Buffer || Buffer;
}
export const networks = {
testnet: {
networkPassphrase: "Test SDF Network ; September 2015",
contractId: "CCYM5OC6RTMEUHRK2BRU5YX4G4O745DPLPU4EXVTRCUN7JRJJWXEEXAB",
},
testnet: {
networkPassphrase: "Test SDF Network ; September 2015",
contractId: "CCYM5OC6RTMEUHRK2BRU5YX4G4O745DPLPU4EXVTRCUN7JRJJWXEEXAB",
},
};
export const Errors = {
0: {message: "UnexpectedError"},
1: {message: "InvalidKey"},
2: {message: "ProjectAlreadyExist"},
3: {message: "UnregisteredMaintainer"},
4: {message: "NoHashFound"},
5: {message: "InvalidDomainError"},
6: {message: "MaintainerNotDomainOwner"},
0: { message: "UnexpectedError" },
1: { message: "InvalidKey" },
2: { message: "ProjectAlreadyExist" },
3: { message: "UnregisteredMaintainer" },
4: { message: "NoHashFound" },
5: { message: "InvalidDomainError" },
6: { message: "MaintainerNotDomainOwner" },
};

export class Client extends ContractClient {
options;
options;

constructor(options) {
super(
new ContractSpec([
"AAAABAAAAAAAAAAAAAAADkNvbnRyYWN0RXJyb3JzAAAAAAAHAAAAAAAAAA9VbmV4cGVjdGVkRXJyb3IAAAAAAAAAAAAAAAAKSW52YWxpZEtleQAAAAAAAQAAAAAAAAATUHJvamVjdEFscmVhZHlFeGlzdAAAAAACAAAAAAAAABZVbnJlZ2lzdGVyZWRNYWludGFpbmVyAAAAAAADAAAAAAAAAAtOb0hhc2hGb3VuZAAAAAAEAAAAAAAAABJJbnZhbGlkRG9tYWluRXJyb3IAAAAAAAUAAAAAAAAAGE1haW50YWluZXJOb3REb21haW5Pd25lcgAAAAY=",
"AAAAAgAAAAAAAAAAAAAAB0RhdGFLZXkAAAAAAQAAAAAAAAAAAAAABUFkbWluAAAA",
"AAAAAgAAAAAAAAAAAAAAClByb2plY3RLZXkAAAAAAAIAAAABAAAAAAAAAANLZXkAAAAAAQAAAA4AAAABAAAAAAAAAAhMYXN0SGFzaAAAAAEAAAAO",
"AAAAAQAAAAAAAAAAAAAABkNvbmZpZwAAAAAAAgAAAAAAAAAEaGFzaAAAABAAAAAAAAAAA3VybAAAAAAQ",
"AAAAAQAAAAAAAAAAAAAAB1Byb2plY3QAAAAAAwAAAAAAAAAGY29uZmlnAAAAAAfQAAAABkNvbmZpZwAA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AALZ2V0X3Byb2plY3QAAAAAAQAAAAAAAAALcHJvamVjdF9rZXkAAAAADgAAAAEAAAfQAAAAB1Byb2plY3QA",
]),
options,
);
this.options = options;
}
constructor(options) {
super(
new ContractSpec([
"AAAABAAAAAAAAAAAAAAADkNvbnRyYWN0RXJyb3JzAAAAAAAHAAAAAAAAAA9VbmV4cGVjdGVkRXJyb3IAAAAAAAAAAAAAAAAKSW52YWxpZEtleQAAAAAAAQAAAAAAAAATUHJvamVjdEFscmVhZHlFeGlzdAAAAAACAAAAAAAAABZVbnJlZ2lzdGVyZWRNYWludGFpbmVyAAAAAAADAAAAAAAAAAtOb0hhc2hGb3VuZAAAAAAEAAAAAAAAABJJbnZhbGlkRG9tYWluRXJyb3IAAAAAAAUAAAAAAAAAGE1haW50YWluZXJOb3REb21haW5Pd25lcgAAAAY=",
"AAAAAgAAAAAAAAAAAAAAB0RhdGFLZXkAAAAAAQAAAAAAAAAAAAAABUFkbWluAAAA",
"AAAAAgAAAAAAAAAAAAAAClByb2plY3RLZXkAAAAAAAIAAAABAAAAAAAAAANLZXkAAAAAAQAAAA4AAAABAAAAAAAAAAhMYXN0SGFzaAAAAAEAAAAO",
"AAAAAQAAAAAAAAAAAAAABkNvbmZpZwAAAAAAAgAAAAAAAAAEaGFzaAAAABAAAAAAAAAAA3VybAAAAAAQ",
"AAAAAQAAAAAAAAAAAAAAB1Byb2plY3QAAAAAAwAAAAAAAAAGY29uZmlnAAAAAAfQAAAABkNvbmZpZwAAAAAAAAAAAAttYWludGFpbmVycwAAAAPqAAAAEwAAAAAAAAAEbmFtZQAAABA=",
"AAAAAAAAAAAAAAAEaW5pdAAAAAEAAAAAAAAABWFkbWluAAAAAAAAEwAAAAA=",
"AAAAAAAAAAAAAAAHdmVyc2lvbgAAAAAAAAAAAQAAAAQ=",
"AAAAAAAAAAAAAAAHdXBncmFkZQAAAAABAAAAAAAAAA1uZXdfd2FzbV9oYXNoAAAAAAAD7gAAACAAAAAA",
"AAAAAAAAADRSZWdpc3RlciBhIG5ldyBHaXQgcHJvamVjdHMgYW5kIGFzc29jaWF0ZWQgbWV0YWRhdGEuAAAACHJlZ2lzdGVyAAAABgAAAAAAAAAKbWFpbnRhaW5lcgAAAAAAEwAAAAAAAAAEbmFtZQAAABAAAAAAAAAAC21haW50YWluZXJzAAAAA+oAAAATAAAAAAAAAAN1cmwAAAAAEAAAAAAAAAAEaGFzaAAAABAAAAAAAAAAEmRvbWFpbl9jb250cmFjdF9pZAAAAAAAEwAAAAEAAAAO",
"AAAAAAAAAChDaGFuZ2UgdGhlIGNvbmZpZ3VyYXRpb24gb2YgdGhlIHByb2plY3QuAAAADXVwZGF0ZV9jb25maWcAAAAAAAAFAAAAAAAAAAptYWludGFpbmVyAAAAAAATAAAAAAAAAANrZXkAAAAADgAAAAAAAAALbWFpbnRhaW5lcnMAAAAD6gAAABMAAAAAAAAAA3VybAAAAAAQAAAAAAAAAARoYXNoAAAAEAAAAAA=",
"AAAAAAAAABhTZXQgdGhlIGxhc3QgY29tbWl0IGhhc2gAAAAGY29tbWl0AAAAAAADAAAAAAAAAAptYWludGFpbmVyAAAAAAATAAAAAAAAAAtwcm9qZWN0X2tleQAAAAAOAAAAAAAAAARoYXNoAAAAEAAAAAA=",
"AAAAAAAAABhHZXQgdGhlIGxhc3QgY29tbWl0IGhhc2gAAAAKZ2V0X2NvbW1pdAAAAAAAAQAAAAAAAAALcHJvamVjdF9rZXkAAAAADgAAAAEAAAAQ",
"AAAAAAAAAAAAAAALZ2V0X3Byb2plY3QAAAAAAQAAAAAAAAALcHJvamVjdF9rZXkAAAAADgAAAAEAAAfQAAAAB1Byb2plY3QA",
]),
options,
);
this.options = options;
}

fromJSON = {
init: this.txFromJSON,
version: this.txFromJSON,
upgrade: this.txFromJSON,
register: this.txFromJSON,
update_config: this.txFromJSON,
commit: this.txFromJSON,
get_commit: this.txFromJSON,
get_project: this.txFromJSON,
};
fromJSON = {
init: this.txFromJSON,
version: this.txFromJSON,
upgrade: this.txFromJSON,
register: this.txFromJSON,
update_config: this.txFromJSON,
commit: this.txFromJSON,
get_commit: this.txFromJSON,
get_project: this.txFromJSON,
};
}
26 changes: 13 additions & 13 deletions dapp/packages/soroban_versioning/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Buffer} from "buffer";
import {Address} from "@stellar/stellar-sdk";
import { Buffer } from "buffer";
import { Address } from "@stellar/stellar-sdk";
import {
AssembledTransaction,
Client as ContractClient,
Expand Down Expand Up @@ -38,19 +38,19 @@ export const networks = {
} as const;

export const Errors = {
0: {message: "UnexpectedError"},
0: { message: "UnexpectedError" },

1: {message: "InvalidKey"},
1: { message: "InvalidKey" },

2: {message: "ProjectAlreadyExist"},
2: { message: "ProjectAlreadyExist" },

3: {message: "UnregisteredMaintainer"},
3: { message: "UnregisteredMaintainer" },

4: {message: "NoHashFound"},
4: { message: "NoHashFound" },

5: {message: "InvalidDomainError"},
5: { message: "InvalidDomainError" },

6: {message: "MaintainerNotDomainOwner"},
6: { message: "MaintainerNotDomainOwner" },
};
export type DataKey = { tag: "Admin"; values: void };

Expand All @@ -74,7 +74,7 @@ export interface Client {
* Construct and simulate a init transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
*/
init: (
{admin}: { admin: string },
{ admin }: { admin: string },
options?: {
/**
* The fee to pay for the transaction. Default: BASE_FEE
Expand Down Expand Up @@ -117,7 +117,7 @@ export interface Client {
* Construct and simulate a upgrade transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
*/
upgrade: (
{new_wasm_hash}: { new_wasm_hash: Buffer },
{ new_wasm_hash }: { new_wasm_hash: Buffer },
options?: {
/**
* The fee to pay for the transaction. Default: BASE_FEE
Expand Down Expand Up @@ -243,7 +243,7 @@ export interface Client {
* Get the last commit hash
*/
get_commit: (
{project_key}: { project_key: Buffer },
{ project_key }: { project_key: Buffer },
options?: {
/**
* The fee to pay for the transaction. Default: BASE_FEE
Expand All @@ -266,7 +266,7 @@ export interface Client {
* Construct and simulate a get_project transaction. Returns an `AssembledTransaction` object which will have a `result` field containing the result of the simulation. If this transaction changes contract state, you will need to call `signAndSend()` on the returned object.
*/
get_project: (
{project_key}: { project_key: Buffer },
{ project_key }: { project_key: Buffer },
options?: {
/**
* The fee to pay for the transaction. Default: BASE_FEE
Expand Down
3 changes: 2 additions & 1 deletion dapp/src/utils/editLinkFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ export function getGithubContentUrlFromConfigUrl(
): string | undefined {
const { username, repoName } = getAuthorRepo(configUrl);
if (username && repoName) {
return getGithubContentUrl(username, repoName, "main/tansu.toml");
// use master as GitHub will do an automatic redirection to main
return getGithubContentUrl(username, repoName, "master/tansu.toml");
}
return undefined;
}
Expand Down

0 comments on commit a7af81a

Please sign in to comment.