diff --git a/README.md b/README.md index 6d6430e3d..fc24fc206 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ The following components are required to run the project: - [Docker](https://docs.docker.com/get-docker/) - [Aiken](https://aiken-lang.org/installation-instructions) +- [Node.js](https://nodejs.org/en/download/) `>= v20.0.0` - [deno](https://docs.deno.com/runtime/manual/getting_started/installation) - [golang](https://golang.org/doc/install) - [Rust & Cargo](https://www.rust-lang.org/tools/install) diff --git a/cardano/README.md b/cardano/README.md deleted file mode 100644 index 27c8a249e..000000000 --- a/cardano/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# Mainchain - - - -## Getting started - -To make it easy for you to get started with GitLab, here's a list of recommended next steps. - -Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! - -## Add your files - -- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files -- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command: - -``` -cd existing_repo -git remote add origin https://git02.smartosc.com/cardano/ibc-sidechain/mainchain.git -git branch -M main -git push -uf origin main -``` - -## Integrate with your tools - -- [ ] [Set up project integrations](https://git02.smartosc.com/cardano/ibc-sidechain/mainchain/-/settings/integrations) - -## Collaborate with your team - -- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/) -- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html) -- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically) -- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/) -- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html) - -## Test and Deploy - -Use the built-in continuous integration in GitLab. - -- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html) -- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/) -- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html) -- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/) -- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html) - -*** - -# Editing this README - -When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template. - -## Suggestions for a good README -Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information. - -## Name -Choose a self-explaining name for your project. - -## Description -Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors. - -## Badges -On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge. - -## Visuals -Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method. - -## Installation -Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection. - -## Usage -Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README. - -## Support -Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc. - -## Roadmap -If you have ideas for releases in the future, it is a good idea to list them in the README. - -## Contributing -State if you are open to contributions and what your requirements are for accepting them. - -For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self. - -You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser. - -## Authors and acknowledgment -Show your appreciation to those who have contributed to the project. - -## License -For open source projects, say how it is licensed. - -## Project status -If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers. diff --git a/cardano/aiken-type-conversion/deno.json b/cardano/aiken-type-conversion/deno.json deleted file mode 100644 index 17a20ce53..000000000 --- a/cardano/aiken-type-conversion/deno.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "imports": { - "@std/path": "jsr:@std/path@^1.1.0", - "@std/fs": "jsr:@std/fs@^1.0.18", - "@cliffy/command": "jsr:@cliffy/command@^1.0.0-rc.7" - } -} \ No newline at end of file diff --git a/cardano/aiken-type-conversion/deno.lock b/cardano/aiken-type-conversion/deno.lock deleted file mode 100644 index e0b99586a..000000000 --- a/cardano/aiken-type-conversion/deno.lock +++ /dev/null @@ -1,68 +0,0 @@ -{ - "version": "5", - "specifiers": { - "jsr:@cliffy/command@^1.0.0-rc.7": "1.0.0-rc.7", - "jsr:@cliffy/flags@1.0.0-rc.7": "1.0.0-rc.7", - "jsr:@cliffy/internal@1.0.0-rc.7": "1.0.0-rc.7", - "jsr:@cliffy/table@1.0.0-rc.7": "1.0.0-rc.7", - "jsr:@std/fmt@~1.0.2": "1.0.4", - "jsr:@std/fs@^1.0.18": "1.0.18", - "jsr:@std/path@^1.1.0": "1.1.0", - "jsr:@std/text@~1.0.7": "1.0.10", - "npm:jsonpointer@*": "5.0.1" - }, - "jsr": { - "@cliffy/command@1.0.0-rc.7": { - "integrity": "1288808d7a3cd18b86c24c2f920e47a6d954b7e23cadc35c8cbd78f8be41f0cd", - "dependencies": [ - "jsr:@cliffy/flags", - "jsr:@cliffy/internal", - "jsr:@cliffy/table", - "jsr:@std/fmt", - "jsr:@std/text" - ] - }, - "@cliffy/flags@1.0.0-rc.7": { - "integrity": "318d9be98f6a6417b108e03dec427dea96cdd41a15beb21d2554ae6da450a781", - "dependencies": [ - "jsr:@std/text" - ] - }, - "@cliffy/internal@1.0.0-rc.7": { - "integrity": "10412636ab3e67517d448be9eaab1b70c88eba9be22617b5d146257a11cc9b17" - }, - "@cliffy/table@1.0.0-rc.7": { - "integrity": "9fdd9776eda28a0b397981c400eeb1aa36da2371b43eefe12e6ff555290e3180", - "dependencies": [ - "jsr:@std/fmt" - ] - }, - "@std/fmt@1.0.4": { - "integrity": "e14fe5bedee26f80877e6705a97a79c7eed599e81bb1669127ef9e8bc1e29a74" - }, - "@std/fs@1.0.18": { - "integrity": "24bcad99eab1af4fde75e05da6e9ed0e0dce5edb71b7e34baacf86ffe3969f3a", - "dependencies": [ - "jsr:@std/path" - ] - }, - "@std/path@1.1.0": { - "integrity": "ddc94f8e3c275627281cbc23341df6b8bcc874d70374f75fec2533521e3d6886" - }, - "@std/text@1.0.10": { - "integrity": "9dcab377450253c0efa9a9a0c731040bfd4e1c03f8303b5934381467b7954338" - } - }, - "npm": { - "jsonpointer@5.0.1": { - "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==" - } - }, - "workspace": { - "dependencies": [ - "jsr:@cliffy/command@^1.0.0-rc.7", - "jsr:@std/fs@^1.0.18", - "jsr:@std/path@^1.1.0" - ] - } -} diff --git a/cardano/aiken-type-conversion/main.ts b/cardano/aiken-type-conversion/main.ts deleted file mode 100644 index 593076dd9..000000000 --- a/cardano/aiken-type-conversion/main.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { Command } from "@cliffy/command"; -import { AikenType, PlutusDefinition } from "./src/types.ts"; -import { generateType } from "./src/mod.ts"; -import { ensureDirSync } from "@std/fs"; -import { genTypeToFile } from "./src/utils.ts"; - -async function main() { - await (new Command() - .name("juken") - .version("0.1.0") - .description("Generate Aiken types for Lucid") - .option("-i, --in-file ", "Path to plutus.json file", { - default: "./onchain/plutus.json", - }) - .option( - "-o, --out-dir ", - "Output directory for generated files", - { - default: "./offchain/lucid-types", - }, - ) - .action(({ inFile, outDir }) => { - const plutusFile = JSON.parse(Deno.readTextFileSync(inFile)); - - if (plutusFile.definitions["aiken/math/rational/Rational"] != undefined) { - plutusFile.definitions["aiken/math/rational/Rational"] = { - "title": "Rational", - "anyOf": [ - { - "title": "Rational", - "dataType": "constructor", - "index": 0, - "fields": [ - { - "title": "numerator", - "$ref": "#/definitions/Int", - }, - { - "title": "denominator", - "$ref": "#/definitions/Int", - }, - ], - }, - ], - }; - } - - Object.entries(plutusFile.definitions).forEach(([key]) => - plutusFile.definitions[key].path = key - ); - const plutusDefinition: PlutusDefinition = plutusFile.definitions; - - let count = 0; - - Object.values(plutusDefinition).forEach((typeDef) => { - const res = generateType(plutusDefinition, typeDef as AikenType); - if (res.type == "custom") { - const dir = `${outDir}/` + - res.path.split("/").slice(0, -1).join("/"); - ensureDirSync(dir); - Deno.writeTextFileSync( - `${outDir}/${res.path}.ts`, - genTypeToFile(res), - ); - count++; - } - }); - - const lintCommand = new Deno.Command(Deno.execPath(), { - args: ["lint", outDir], - }); - const { stderr, code } = lintCommand.outputSync(); - - if (code !== 0) { - const error = new TextDecoder().decode(stderr); - throw new Error("failed to lint generated files\n" + error); - } - - const fmtCommand = new Deno.Command(Deno.execPath(), { - args: ["fmt", outDir], - }); - fmtCommand.outputSync(); - - console.log(`Generated ${count} files`); - console.log(`Files saved to ${outDir}/`); - }) - .parse(Deno.args)); -} - -if (import.meta.main) { - await main(); -} diff --git a/cardano/aiken-type-conversion/src/const.ts b/cardano/aiken-type-conversion/src/const.ts deleted file mode 100644 index 7fca71fa4..000000000 --- a/cardano/aiken-type-conversion/src/const.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { GenType } from "./types.ts"; - -export const builtInTypes: { [type: string]: GenType } = { - Bool: { - type: "primitive", - schema: ["Data.Boolean()"], - }, - ByteArray: { - type: "primitive", - schema: ["Data.Bytes()"], - }, - AssetName: { - type: "primitive", - schema: ["Data.Bytes()"], - }, - BlockIdFlag: { - type: "primitive", - schema: ["Data.Integer()"], - }, - Data: { - type: "primitive", - schema: ["Data.Any()"], - }, - Duration: { - type: "primitive", - schema: ["Data.Integer()"], - }, - Time: { - type: "primitive", - schema: ["Data.Integer()"], - }, - Uint64: { - type: "primitive", - schema: ["Data.Integer()"], - }, - HashOp: { - type: "primitive", - schema: ["Data.Integer()"], - }, - LengthOp: { - type: "primitive", - schema: ["Data.Integer()"], - }, - Int: { - type: "primitive", - schema: ["Data.Integer()"], - }, - PolicyId: { - type: "primitive", - schema: ["Data.Bytes()"], - }, - ScriptHash: { - type: "primitive", - schema: ["Data.Bytes()"], - }, - Void: { - type: "primitive", - schema: ["Data.void()"], - }, - TransferModuleDatum: { - type: "primitive", - schema: ["Data.void()"], - }, -} as const; diff --git a/cardano/aiken-type-conversion/src/mod.ts b/cardano/aiken-type-conversion/src/mod.ts deleted file mode 100644 index 0dfd5c1cb..000000000 --- a/cardano/aiken-type-conversion/src/mod.ts +++ /dev/null @@ -1,386 +0,0 @@ -import { AikenType } from "../src/types.ts"; -import { GenType, ImportMap } from "../src/types.ts"; -import { builtInTypes } from "./const.ts"; -import { getPointer, insertDependencies } from "../src/utils.ts"; -import { PlutusDefinition } from "../src/types.ts"; - -export function generateType( - plutusDefinition: PlutusDefinition, - typeDef: AikenType, -): GenType { - const path = getType(typeDef.path); - - let lastPath = ""; - if (path != null) { - const path_parts = path.split("/"); - lastPath = path_parts[path_parts.length - 1]; - } - - if (path in builtInTypes) { - return builtInTypes[lastPath]; - } - - if ("dataType" in typeDef) { - if (typeDef.dataType == "list" && "items" in typeDef) { - const listType = getPointer( - plutusDefinition, - typeDef.items.$ref, - ); - - const genType = generateType(plutusDefinition, listType); - - if (genType.type === "primitive") { - return { - type: "composite", - dependencies: new Map(), - schema: [`Data.Array(${genType.schema})`], - }; - } else if (genType.type === "composite") { - return { - type: "composite", - dependencies: new Map([...genType.dependencies]), - schema: ["Data.Array(", ...genType.schema, ")"], - }; - } else if (genType.type === "custom") { - const importId = genType.name + "Schema"; - return { - type: "composite", - dependencies: new Map([[importId, { - content: importId, - path: genType.path, - }]]), - schema: ["Data.Array(", importId, ")"], - }; - } else { - throw new Error("list.item GenType.type not implemented yet"); - } - } - - if (typeDef.dataType == "map" && "keys" in typeDef && "values" in typeDef) { - let dependencies: ImportMap = new Map(); - - const keyType = getPointer(plutusDefinition, typeDef.keys.$ref); - const genKeyType = generateType(plutusDefinition, keyType); - let keySchema: string[]; - - if (genKeyType.type === "primitive") { - keySchema = genKeyType.schema; - } else if (genKeyType.type === "composite") { - const [updatedDeps, updatedSchema] = insertDependencies( - dependencies, - genKeyType.dependencies, - genKeyType.schema, - ); - dependencies = updatedDeps; - keySchema = updatedSchema; - } else if (genKeyType.type === "custom") { - const importId = genKeyType.name + "Schema"; - const [updatedDeps, updatedSchema] = insertDependencies( - dependencies, - new Map([[importId, { content: importId, path: genKeyType.path }]]), - [importId], - ); - dependencies = updatedDeps; - keySchema = updatedSchema; - } else { - throw new Error("map.key GenType.type not implemented yet"); - } - - const valType = getPointer(plutusDefinition, typeDef.values.$ref); - const genValType = generateType(plutusDefinition, valType); - let valSchema: string[]; - - if (genValType.type === "primitive") { - valSchema = genValType.schema; - } else if (genValType.type === "composite") { - const [updatedDeps, updatedSchema] = insertDependencies( - dependencies, - genValType.dependencies, - genValType.schema, - ); - dependencies = updatedDeps; - valSchema = updatedSchema; - } else if (genValType.type === "custom") { - const importId = genValType.name + "Schema"; - const [updatedDeps, updatedSchema] = insertDependencies( - dependencies, - new Map([[importId, { content: importId, path: genValType.path }]]), - [importId], - ); - dependencies = updatedDeps; - valSchema = updatedSchema; - } else { - throw new Error("map.value GenType.type not implemented yet"); - } - - return { - type: "composite", - dependencies, - schema: ["Data.Map(", ...keySchema, ",", ...valSchema, ")"], - }; - } - - if (typeDef.dataType == "constructor" && "fields" in typeDef) { - const fields = typeDef.fields as { - $ref: string; - }[]; - - if (fields.length > 0) { - if ("title" in fields[0]) { - let dependencies = new Map(); - const schema: string[] = []; - - fields.forEach((cur) => { - if (!("title" in cur) || typeof cur.title != "string") { - throw new Error("title can not be undefined in Object field"); - } - - const listType = getPointer(plutusDefinition, cur.$ref); - const genType = generateType(plutusDefinition, listType); - - if (genType.type == "primitive") { - schema.push(`${cur.title}: ${genType.schema},`); - return; - } - - if (genType.type == "composite") { - const [updatedDeps, updatedSchema] = insertDependencies( - dependencies, - genType.dependencies, - genType.schema, - ); - dependencies = updatedDeps; - schema.push(`${cur.title}:`, ...updatedSchema, ","); - return; - } - - if (genType.type == "custom") { - const importId = genType.name + "Schema"; - - const [updatedDeps, updatedSchema] = insertDependencies( - dependencies, - new Map([[importId, { - content: importId, - path: genType.path, - }]]), - [importId], - ); - dependencies = updatedDeps; - schema.push(`${cur.title}:`, ...updatedSchema, ","); - return; - } - - throw new Error("GenType.type not implemented yet"); - }); - - return { - type: "composite", - dependencies, - schema: ["Data.Object({", ...schema, "})"], - }; - } else { - let dependencies = new Map(); - const schema: string[] = []; - - fields.forEach((cur) => { - const listType = getPointer(plutusDefinition, cur.$ref); - const genType = generateType(plutusDefinition, listType); - - if (genType.type === "primitive") { - schema.push(...genType.schema, ","); - } else if (genType.type === "composite") { - const [updatedDeps, updatedSchema] = insertDependencies( - dependencies, - genType.dependencies, - genType.schema, - ); - dependencies = updatedDeps; - schema.push(...updatedSchema, ","); - } else if (genType.type === "custom") { - const importId = genType.name + "Schema"; - - const [updatedDeps, updatedSchema] = insertDependencies( - dependencies, - new Map([[importId, { - content: importId, - path: genType.path, - }]]), - [importId], - ); - dependencies = updatedDeps; - schema.push(...updatedSchema, ","); - } else { - throw new Error("GenType.type not implemented yet"); - } - }); - - return { - type: "composite", - dependencies, - schema: ["Data.Tuple([", ...schema, "])"], - }; - } - } else { - if (!("title" in typeDef)) { - throw new Error("title can not be undefined with Literal"); - } - - return { - type: "primitive", - schema: [`Data.Literal("${typeDef.title}"),`], - }; - } - } - } - - if ("anyOf" in typeDef) { - if (typeDef.anyOf.length == 1) { - const forwardTitle = typeDef.anyOf[0].dataType == "constructor" && !("title" in typeDef.anyOf[0]) - const forwardItem = typeDef.anyOf[0]; - if (forwardTitle) { - forwardItem.title = typeDef.title; - } - const genType = generateType( - plutusDefinition, - forwardItem as unknown as AikenType, - ); - - if (genType.type != "composite") { - throw new Error("GenType.type must be composite"); - } - - const dependencies: ImportMap = new Map([ - ["Data", { - content: "Data", - path: "@lucid-evolution/lucid", - }], - ]); - - genType.dependencies.forEach((value, key) => { - dependencies.set(key, value); - }); - - return { - type: "custom", - path: typeDef.path, - name: typeDef.title, - imports: dependencies, - schema: genType.schema, - }; - } else if (typeDef.title === "Optional" && typeDef.anyOf.length == 2) { - const someDef = typeDef.anyOf[0]; - - if ( - someDef.dataType !== "constructor" || !("title" in someDef) || - someDef.title != "Some" || someDef.fields.length !== 1 - ) { - throw new Error("Invalid type definition for Option.Some "); - } - - const someType = getPointer( - plutusDefinition, - typeDef.anyOf[0].fields[0].$ref, - ); - const genType = generateType(plutusDefinition, someType); - - if (genType.type === "primitive") { - return { - type: "composite", - dependencies: new Map(), - schema: [`Data.Nullable(${genType.schema.join("")})`], - }; - } else if (genType.type === "composite") { - return { - type: "composite", - dependencies: new Map([...genType.dependencies]), - schema: ["Data.Nullable(", ...genType.schema, ")"], - }; - } else if (genType.type === "custom") { - const importId: string = genType.name + "Schema"; - return { - type: "composite", - dependencies: new Map([[importId, { - content: importId, - path: genType.path, - }]]), - schema: ["Data.Nullable(", importId, ")"], - }; - } else { - throw new Error("Option.Some.value GenType.type not implemented yet"); - } - } else { - let dependencies: ImportMap = new Map([ - ["Data", { - content: "Data", - path: "@lucid-evolution/lucid", - }], - ]); - const schema: string[] = []; - - typeDef.anyOf.forEach((t) => { - if (!("title" in t)) { - throw new Error(`Enum ${typeDef.title} variant title not found`); - } - - const genType = generateType( - plutusDefinition, - t as unknown as AikenType, - ); - - if (genType.type === "primitive") { - schema.push(...genType.schema); - } else if (genType.type === "composite") { - genType.dependencies.forEach((value, key) => { - dependencies.set(key, value); - }); - - schema.push( - "Data.Object({", - t.title, - ":", - ...genType.schema, - "}),", - ); - - const [updatedDeps, updatedSchema] = insertDependencies( - dependencies, - genType.dependencies, - genType.schema, - ); - - dependencies = updatedDeps; - schema.push( - "Data.Object({", - t.title, - ":", - ...updatedSchema, - "}),", - ); - } else { - throw new Error( - `Enum variant ${t.title} GenType.type ${genType.type} not implemented yet`, - ); - } - }); - - return { - type: "custom", - path: typeDef.path, - name: typeDef.title, - imports: dependencies, - schema: ["Data.Enum([", ...schema, "])"], - }; - } - } - throw new Error("Type is not recognized"); -} - -function getType(path: string) { - if (path != null && path.indexOf('/') != -1) { - const path_parts = path.split("/"); - const lastPath = path_parts[path_parts.length - 1]; - return lastPath; - } else { - return path; - } -} diff --git a/cardano/aiken-type-conversion/src/types.ts b/cardano/aiken-type-conversion/src/types.ts deleted file mode 100644 index 69474c83e..000000000 --- a/cardano/aiken-type-conversion/src/types.ts +++ /dev/null @@ -1,84 +0,0 @@ -export type PlutusDefinition = { - [T: string]: - & { path: string } - & ( - | { - title: "Data"; - description: "Any Plutus data."; - } - | { - dataType: string; - } - | { - title: string; - description?: string; - } - | { - dataType: "list"; - items: { - $ref: string; - }; - } - | { - title: "Dict"; - description?: string; - dataType: "map"; - keys: { - $ref: string; - }; - values: { - $ref: string; - }; - } - | { - title: string; - description?: string; - anyOf: { - title: string; - dataType: "constructor"; - index: number; - fields: { - title: string; - $ref: string; - }[]; - }[]; - } - | { - title: string; - description?: string; - anyOf: { - title: string; - dataType: "constructor"; - index: number; - fields: { - $ref: string; - }[]; - }[]; - } - ); -}; - -export type AikenType = PlutusDefinition[keyof PlutusDefinition]; - -export type ImportContent = { - content: string; - path: string; -}; - -// Map from -export type ImportMap = Map; - -export type GenType = { - type: "custom"; - path: string; - imports: ImportMap; - name: string; - schema: string[]; -} | { - type: "primitive"; - schema: string[]; -} | { - type: "composite"; - dependencies: ImportMap; - schema: string[]; -}; diff --git a/cardano/aiken-type-conversion/src/utils.ts b/cardano/aiken-type-conversion/src/utils.ts deleted file mode 100644 index b003f692c..000000000 --- a/cardano/aiken-type-conversion/src/utils.ts +++ /dev/null @@ -1,109 +0,0 @@ -import jsonpointer from "npm:jsonpointer"; -import { AikenType } from "./types.ts"; -import { GenType, ImportMap } from "./types.ts"; -import * as path from "@std/path"; -import { PlutusDefinition } from "./types.ts"; - -export function getPointer( - plutusDefinition: PlutusDefinition, - ref: string, -): AikenType { - return jsonpointer.get(plutusDefinition, ref.slice(13)); -} - -export function genTypeToFile( - genType: Extract, -): string { - return generateImports(genType.imports, extractPath(genType.path).dir) + - "\n" + - generateFileContent(genType.name, genType.schema.join("")); -} - -function generateImports(importMap: ImportMap, basePath: string): string { - let importLines = ""; - importMap.forEach((importContent, importId) => { - if (importId != "Data") { - const { dir, name } = extractPath(importContent.path); - let relativePath = path.relative(basePath, dir) + "/"; - if (relativePath.length == 1) { - relativePath = "./"; - } - if (importId == importContent.content) { - importLines += `import { ${importId} } from "${ - relativePath + name - }.ts";\n`; - } else { - importLines += - `import { ${importContent.content} as ${importId} } from "${ - relativePath + name - }.ts";\n`; - } - } else { - importLines += `import { ${importId} } from "${importContent.path}";\n`; - } - }); - return importLines; -} - -function generateFileContent(name: string, schema: string): string { - return `export const ${name}Schema = ${schema};\n` + - `export type ${name} = Data.Static;\n` + - `export const ${name} = ${name}Schema as unknown as ${name};\n`; -} - -function extractPath(p: string) { - const segments = p.split("/"); - return { - dir: segments.slice(0, -1).join("/"), - name: segments.slice(-1)[0], - }; -} - -export function insertDependencies( - baseDeps: ImportMap, - newDeps: ImportMap, - newSchema: string[], -): [ImportMap, string[]] { - const updatedDeps = new Map([...baseDeps]); - const updatedSchema = [...newSchema]; - - for (const [importId, importContent] of newDeps) { - const foundContent = updatedDeps.get(importId); - - if (foundContent != undefined) { - if (JSON.stringify(foundContent) == JSON.stringify(importContent)) { - continue; - } else { - const postfix = generateRandomPostfix(); - const postfixedImportId = importId + postfix; - updatedDeps.set(postfixedImportId, importContent); - updatedSchema.forEach((item, index) => { - if (item === importId) { - updatedSchema[index] = postfixedImportId; - } - }); - } - } else { - updatedDeps.set(importId, importContent); - } - } - - return [updatedDeps, updatedSchema]; -} - -const generatedVal: Map = new Map(); -const generateRandomPostfix = (): string => { - const min = 0; - const max = Math.pow(10, 9); // 10^9 - - let val = Math.floor(Math.random() * (max - min)) + min; - - while (generatedVal.has(val)) { - val = Math.floor(Math.random() * (max - min)) + min; - } - - generatedVal.set(val, true); - - // Generate a random number between min (inclusive) and max (exclusive) - return String(val); -}; diff --git a/cardano/gateway/.env.example b/cardano/gateway/.env.example index 814d3ee72..ec2ca80fe 100644 --- a/cardano/gateway/.env.example +++ b/cardano/gateway/.env.example @@ -9,10 +9,15 @@ DATABASE_PASSWORD=v8hlDV0yMAHHlIurYupj KUPO_ENDPOINT=http://127.0.0.1:1442 OGMIOS_ENDPOINT=http://127.0.0.1:1337 +# Will disappear in the future, once the relayer is able to sign transactions itself. +# This seed is for testing purposes only. Never use it in production! +SIGNER_WALLET_SEED="direct language gravity into finger nurse rug rug spoon toddler music ability brisk wasp sound ball join guard pattern smooth lemon obscure raise royal" + CARDANO_CHAIN_HOST=127.0.0.1 CARDANO_CHAIN_PORT=3001 CARDANO_NETWORK_MAGIC=42 -CARDANO_EPOCH_NONCE_GENESIS="5a9f8426ad4079263b88c45c84079a2ccbd3e7d4218166404dababe07f69fdad" + +CARDANO_EPOCH_NONCE_GENESIS="3c1195a3fb825b2d2a6ba4e67008288ab7933a6db263a28eb9fd19b3ca05212f" HANDLER_JSON_PATH=/usr/src/app/cardano/offchain/deployments/handler.json diff --git a/cardano/gateway/package-lock.json b/cardano/gateway/package-lock.json index 5a1eea3dd..2bd075f0b 100644 --- a/cardano/gateway/package-lock.json +++ b/cardano/gateway/package-lock.json @@ -7078,9 +7078,10 @@ } }, "node_modules/form-data": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.3.tgz", - "integrity": "sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", diff --git a/cardano/gateway/src/app.module.ts b/cardano/gateway/src/app.module.ts index 42cd59835..4866439bc 100644 --- a/cardano/gateway/src/app.module.ts +++ b/cardano/gateway/src/app.module.ts @@ -12,8 +12,6 @@ import { MithrilModule } from './shared/modules/mithril/mithril.module'; @Module({ imports: [ - // IBCEventWatcherModule, - // ScheduleModule.forRoot(), TypeOrmModule.forRoot(DatabaseConfig), ConfigModule.forRoot({ load: [ diff --git a/cardano/gateway/src/config/constant.config.ts b/cardano/gateway/src/config/constant.config.ts deleted file mode 100644 index 235e526b8..000000000 --- a/cardano/gateway/src/config/constant.config.ts +++ /dev/null @@ -1 +0,0 @@ -export const MinimumActiveEpoch = BigInt(2); diff --git a/cardano/gateway/src/config/index.ts b/cardano/gateway/src/config/index.ts index 0edf68f44..b4279385a 100644 --- a/cardano/gateway/src/config/index.ts +++ b/cardano/gateway/src/config/index.ts @@ -1,34 +1,106 @@ -import { ConnectionConfig as IOgmiosClientConfig } from '@cardano-ogmios/client'; -import deploymentConfig, { IDeploymentConfig } from './valiator.config'; -import { connectionConfig } from './kupmios.config'; +import { Network } from '@lucid-evolution/lucid'; import { PostgresConnectionOptions } from 'typeorm/driver/postgres/PostgresConnectionOptions'; -export interface IConfig { - deployment: IDeploymentConfig; - ogmiosClientConfig: IOgmiosClientConfig; +type DeploymentConfig = { + validators: { + spendHandler: { + title: string; + script: string; + scriptHash: string; + address: string; + }; + spendClient: { + title: string; + script: string; + scriptHash: string; + address: string; + }; + mintHandlerValidator: { + title: string; + script: string; + scriptHash: string; + address: string; + }; + mintClient: { + title: string; + script: string; + scriptHash: string; + address: string; + }; + mintConnection: { + title: string; + script: string; + scriptHash: string; + address: string; + }; + spendConnection: { + title: string; + script: string; + scriptHash: string; + address: string; + }; + mintChannel: { + title: string; + script: string; + scriptHash: string; + address: string; + }; + spendChannel: { + title: string; + script: string; + scriptHash: string; + address: string; + }; + }; + nonceUtxo: { + txHash: string; + outputIndex: number; + }; + handlerAuthToken: { + policyId: string; + name: string; + }; +}; + +interface Config { + deployment: DeploymentConfig; ogmiosEndpoint: string; kupoEndpoint: string; + signerWalletSeed: string; database: PostgresConnectionOptions; - cardanoBridgeUrl: string; + cardanoChainHost: string; cardanoChainPort: number; cardanoChainNetworkMagic: number; + cardanoNetwork: Network; cardanoEpochNonceGenesis: string; mithrilEndpoint: string; mtithrilGenesisVerificationKey: string; } -export default (): Partial => ({ - deployment: deploymentConfig(), - ogmiosClientConfig: connectionConfig, - ogmiosEndpoint: process.env.OGMIOS_ENDPOINT, - kupoEndpoint: process.env.KUPO_ENDPOINT, - cardanoBridgeUrl: process.env.CARDANO_BRIDGE_URL, - cardanoChainHost: process.env.CARDANO_CHAIN_HOST, - cardanoChainPort: Number(process.env.CARDANO_CHAIN_PORT || 3001), - cardanoChainNetworkMagic: Number(process.env.CARDANO_CHAIN_NETWORK_MAGIC || 42), - cardanoEpochNonceGenesis: process.env.CARDANO_EPOCH_NONCE_GENESIS, - mithrilEndpoint: process.env.MITHRIL_ENDPOINT, - mtithrilGenesisVerificationKey: process.env.MITHRIL_GENESIS_VERIFICATION_KEY, -}); +export default (): Partial => { + let cardanoNetwork: Network = 'Custom'; + if (process.env.CARDANO_NETWORK_MAGIC === '1') { + cardanoNetwork = 'Preprod'; + } else if (process.env.CARDANO_NETWORK_MAGIC === '2') { + cardanoNetwork = 'Preview'; + } else if (process.env.CARDANO_NETWORK_MAGIC === '764824073') { + cardanoNetwork = 'Mainnet'; + } + + return { + ogmiosEndpoint: process.env.OGMIOS_ENDPOINT, + kupoEndpoint: process.env.KUPO_ENDPOINT, + signerWalletSeed: process.env.SIGNER_WALLET_SEED, + + cardanoChainHost: process.env.CARDANO_CHAIN_HOST, + cardanoChainPort: Number(process.env.CARDANO_CHAIN_PORT || 3001), + cardanoChainNetworkMagic: Number(process.env.CARDANO_CHAIN_NETWORK_MAGIC || 42), + cardanoNetwork: cardanoNetwork, + cardanoEpochNonceGenesis: process.env.CARDANO_EPOCH_NONCE_GENESIS, + + mithrilEndpoint: process.env.MITHRIL_ENDPOINT, + mtithrilGenesisVerificationKey: process.env.MITHRIL_GENESIS_VERIFICATION_KEY, + }; +}; diff --git a/cardano/gateway/src/config/kupmios.config.ts b/cardano/gateway/src/config/kupmios.config.ts deleted file mode 100644 index 1406602e5..000000000 --- a/cardano/gateway/src/config/kupmios.config.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { ConnectionConfig } from '@cardano-ogmios/client'; -import * as dotenv from 'dotenv'; - -dotenv.config(); - -export const kupmiosConfig = { - ogmios: process.env.OGMIOS_ENDPOINT, - kupo: process.env.KUPO_ENDPOINT, -}; - -const _128MB = 128 * 1024 * 1024; - -export const connectionConfig: ConnectionConfig = { - host: new URL(process.env.OGMIOS_ENDPOINT).hostname || 'localhost', - port: Number(new URL(process.env.OGMIOS_ENDPOINT).port) || 1337, - tls: false, - maxPayload: _128MB, -}; diff --git a/cardano/gateway/src/config/valiator.config.ts b/cardano/gateway/src/config/valiator.config.ts deleted file mode 100644 index 63e1393e1..000000000 --- a/cardano/gateway/src/config/valiator.config.ts +++ /dev/null @@ -1,72 +0,0 @@ -const deploymentConfig = () => ({ - validators: { - spendHandler: { - title: 'spending_handler.spend_handler', - script: - '59081059080d0100003333232323232323232322322322322223232323232533301132323232323232323232323232323232323253330233300100f3012302101a132325333028302b00215333025330030013014302301c13232323232533302a3370e90000010a99981519baf3374a90001981719ba548000cc0b8dd419b80375a6030605060306050042900118181814180c1814010981818140108020a9998151919299981619b8748000c0ac0044c8c8c94ccc0bccdd780119ba548000cc0cc0152f5c0294458c94ccc0bccdc3a400000226464a666068606e0042649318128008b181a80098168010b1816800981900098150008b1980100519ba548000cc0bcdd4813a5eb80c064c0a00845288b0b09919299981619b874800801054ccc0b0cc00808c01854ccc0b0c8c94ccc0b8cdc3a4000605a0022646464a66606266ebc008cdd2a40006606a00a97ae014a22c600a002606800260580022c6600801866e95200033031375204e97ae0301b302a02314a22c2c2a66605866e1d20040041323232323232323253330343300a02b00e15333034323253330363370e9000181a8008991919299981c99baf0023374a90011981e8029981e9ba900c3303d37520146607a6ea4020cc0f40192f5c0294458c034004c0f0004c0d000458cc030050cdd2a4000660726ea40bd2f5c06046606405629445858c0e0004c0e0008dd7181b000981b0011bae30340013034002375c606400260540442a66605866e1d20060041533302c3375e646466e95200033032323374a900019819981a00099819981a181a800998199ba8337006eb4c028c0b4c074c0b409920024bd701816180e1816012800981980098150118030a9998161919299981719b8748000c0b40044c8c8c94ccc0c4cdd780119ba548000cc0d40152f5c0294458c94ccc0c4cdc3a400000226464a66606c60720042649318138008b181b80098178010a99981899b87480080044c8c94ccc0d8c0e40084c9263027001163037001302f00216302f0013034001302c001163300400c3374a9000198189ba90254bd70180d98150118a51161614a0464a66605a66e1d20000011323253330323035002132498c08c00458c0cc004c0ac00854ccc0b4cdc3a4004002264646464646464646464a666074607a0042646493181480118158048b181d800981d8011bae30390013039002375c606e002606e0046eb8c0d4004c0d4008c0cc004c0ac00858c0ac00488cdd7991919ba548000cc0c8c8cdd2a4000660666068002660666ea0cdc01bad301e302d301d302d00548008c0d4c0d4004c0b0c070c0b0010004c0cc004c0a800800488c8cc00400400c894ccc0c0004530103d87a800013232323253330313375e00e004266e952000330350014bd7009980300300198190019818001181a0011819000981380f180d00099299981399b8748010c0980044c0b0c09400458c004c0900088c0acc0b0c0b00045858c0a4004c8cc00400402c894ccc0a000452f5c026464a66604e66ebcc054c094008c054c09404c4cc0ac008cc0100100044cc010010004c0b0008c0a80045888cdc3999911191919299981519b8748008004520001375a605e6050004605000264a66605266e1d200200114c0103d87a8000132323300100100222533302f00114c103d87a800013232323253330303371e014004266e95200033034375000297ae0133006006003375a60620066eb8c0bc008c0cc008c0c4004dd598171813801181380099198008008021129998160008a6103d87a8000132323232533302d3371e010004266e95200033031374c00297ae01330060060033756605c0066eb8c0b0008c0c0008c0b8004dd5980998110011bae30123022001375c6026604400290011bab302600130260013025001302400130230013022001302100130200023758603c002603c002603a0026028002602e004602a002646464646464a66603266e1d200230180031323232533301c3370e9000180d800899bb0300b301a3021301a00100816323300100100422533302000114c103d87a800013232533301f3375e601a603a00400a266e952000330230024bd7009980200200098120011811000980f800980b8018b1bac301d0013015003301b001301b002301900130110082301800123017301800114984d958c94ccc044cdc3a40000022a666028601e00e2930b0a99980899b874800800454ccc050c03c01c52616153330113370e900200089919191919191919299980e180f80109924c60140022c603a002603a0046eb8c06c004c06c008dd7180c800980c8011bae3017001300f007153330113370e90030008a99980a18078038a4c2c2a66602266e1d200800115333014300f00714985858c03c0188c94ccc044cdc3a4000002264646464a66603060360042930b1bad30190013019002375a602e002601e0042c601e002600200a464a66601e66e1d20000011323232325333016301900213232498c020008c94ccc050cdc3a40000022646464646464a66603a60400042930b1bad301e001301e002375a603800260380046eb4c068004c04801058c04800c58c05c004c05c008c054004c03400858c0340048c94ccc038cdc3a4000002264646464a66602a60300042930b1bae30160013016002375c602800260180042c60180026eb8004dd70009bae001230053754002460066ea80055cd2ab9d5573caae7d5d02ba1574498011e581c6d24c4413af4c5edf6b91820a7035ee6f28d613f6d6838c6ef246945004c011e581c9f1d58954f72f4bfd64c5086053317939a05922eadf1e83f09567cae004c011e581c19fbac9d1cb552f6a01eb5f1666a1646fe094968261734d7048a8d2f0001', - scriptHash: '4f10656c76d4ec9f57b84b36c7f63f7f85017dfcc07698bc558dca25', - address: 'addr_test1wp83qetvwm2we86hhp9nd3lk8alc2qtalnq8dx9u2kxu5fghpknlg', - }, - spendClient: { - title: 'spending_client.spend_client', - script: - '590a4e590a4b0100003232323232323232322223232323232533300b32323232323232323232533301533001007300a301301213232533301a301d0021533301733003001300c30150141323232533301a3370e9000000899191919299980f19980f1919198008008011129998120008a50132323253330243375e00e00229444cc014014008c090008c0a0008c098004dd59809980e1809180e00da504a2264646466ebccdd2a40006604a66e952000330253232323232323374a9000198159816003198159816002998159816002198159816001998159816001198159816000998158049816981680098160009815800981500098148009814000980f980a980f980a980f80f198129ba60014bd701813980f80f00519191980080080111299981300089981399bb00060044bd6f7b630099191919299981399baf3300b00a0024c0103d879800013302b3376001401000a2a66604e66ebc0280084cc0accdd800500400189981599bb00020013300600600330280033026002302a00230280013756602a603c6028603c03a6464646464646464646466e9520003302d37500066605a605c0026605a66e9520003302d302e302f0014bd7025eb80c0b8004c0b4008dd698158009815800981500098108009813800980f8009812800980e80219299980f99baf330030020014c103d87b8000100210013023302430243024302430243024301c3012301c3012301c01b1632323232323374a9000198131ba83248000dd718138009981318139814000a5eb80c07c004c094004c074004c08c004c06c008894ccc078cdc41bad3012301c002375a60246038002298103d87980001533301e337106eb4c048c070004dd69809180e0010a6103d87b80001533301e337106eb4c04cc070008dd69809980e0008a6103d87980001533301e337106eb4c04cc070004dd69809980e0010a6103d87b800014c103d87a80003020001301801614a0603002a602000264a66603066e1d200430170011301d301600116301c301d301d30150011616301b001323300100100322533301a00114bd7009919299980c99baf300d3017002300d301700b13301d00233004004001133004004001301e002301c00116223370e666444646464a66603866e1d20020011480004dd69810980d001180d00099299980d99b87480080045300103d87a8000132323300100100222533302100114c103d87a800013232323253330223371e014004266e95200033026375000297ae0133006006003375a60460066eb8c084008c094008c08c004dd59810180c801180c800991980080080211299980f0008a6103d87a8000132323232533301f3371e010004266e95200033023374c00297ae0133006006003375660400066eb8c078008c088008c080004dd59805980a0011bae300a3014001375c6016602800290011bac301800130180013017001300e0013011002300f00132323232323253330133370e900118090018991919299980b19b8748000c0540044cdd81805980a180d980a0008040b191980080080211299980d0008a6103d87a80001323253330193375e601a602e00400a266e9520003301d0024bd70099802002000980f001180e000980c80098088018b1bac3017001300f003301500130150023013001300b0082301200123011301200114984d958c8c8c94ccc034cdc3a400000226464a666024602a0042649319299980819b87480000044c8c8c8c8c8c8c8c94ccc06cc0780084c8c8c8c92630100043013005300e0063253330193370e9000000899191919299981018118010991924c64a66603e66e1d200000113232323232325333028302b00213232498cc0800088c94ccc0a0cdc3a400000226464646464646464a666066606c0042930b1bae30340013034002375a606400260640046eb8c0c0004c0c0008dd6981700098130010b181300099299981319b87480000044c8c8c8c94ccc0b4c0c00084c92632533302b3370e90000008991919192999819181a8010a4c2c6eb8c0cc004c0cc008dd6981880098148010b18148008b181700098170011bae302c001302400416302400316375860520026052004604e002604e0046eb4c094004c07400c58c074008c94ccc078cdc3a40000022646464646464646464646464a66605a60600042930b1bae302e001302e002375c605800260580046eb8c0a8004c0a8008dd6981400098140011bad30260013026002375c604800260380082c60380062c60420026042004603e002602e0102c602e00e2c603800260380046034002603400460300026030004602c002601c0042c601c0022c602600260160122a66601a66e1d200200115333010300b00914985858c02c0208c94ccc034cdc3a40000022646464646464a66602c60320042646493180500219806802918050008b1bad30170013017002301500130150023758602600260160042c6016002464a66601866e1d2000001132323232323232325333017301a002149858dd6980c000980c0011bad30160013016002375c602800260280046eb8c048004c02800858c028004c0040188c94ccc028cdc3a4000002264646464a6660226028004264649319299980819b87480000044c8c8c8c94ccc05cc06800852616375c603000260300046eb8c058004c03800c58c038008c94ccc03ccdc3a4000002264646464a66602c6032004264649319807001119191919299980c99b87480000044c8c8c8c8c8c94ccc088c0940084c9263253330203370e900000089919299981298140010a4c2c6eb8c098004c07800858c07800458c08c004c08c008dd7181080098108011bad301f00130170031630170023010002301800230160013253330143370e90000008991919191919191919191919191919192999813981500109919191924c66042008464a66605266e1d20000011323232323232323232325333036303900213232498c94ccc0d4cdc3a40000022646464646464646464646464a666088608e004264931981d80591bad00116375a608a002608a0046eb8c10c004c10c008dd6982080098208011bad303f001303f002375a607a002607a0046eb0c0ec004c0cc02458c0cc020c94ccc0d0cdc3a4000002264646464646464646464a66608260880042930b1bae30420013042002375a608000260800046eb4c0f8004c0f8008dd6981e000981e0011bad303a001303200a163032009163370e900118199baa30370013037002375a606a002606a0046eb4c0cc004c0cc008c0c4004c0c4008c0bc004c09c00858c09c004c07c014c078018c94ccc094cdc3a4000002264646464a666058605e0042930b1bad302d001302d002375a6056002604601c2c604601a2c6eb0c0a0004c0a0008c098004c098008c090004c090008dd6981100098110011bad30200013020002375a603c002603c004603800260380046eb8c068004c04801058c04800c58dd5980b800980b801180a80098068020b18068018b18090009809001180800098040010b1804000919299980499b87480000044c8c8c8c94ccc040c04c00852616375a602200260220046eb4c03c004c01c00858c01c00488c8cc00400400c894ccc0340045261323300300330110023003300f001230053754002460066ea80055cd2ab9d5573caae7d5d02ba157441', - scriptHash: '9981eb49baf611dbe5a73b71fcebb8f562f71872a0b019924c346f89', - address: 'addr_test1wzvcr66fhtmprkl95uahrl8thr6k9accw2stqxvjfs6xlzgyu630m', - }, - mintHandlerValidator: { - title: 'minting_handler.mint_handler', - script: - '5904015903fe0100003332323232323232323222322253330083232323232323232325333011323300100100722533301600114a026464a66602a66ebcc014c04c008048528899802002000980d001180c0008991919299980a19b87333002323300100100622533301900114bd6f7b630099191919299980d19b8f48900002100313301e337606ea4008dd3000998030030019bab301b003375c6032004603a00460360026eb8c010c04800cdd718009809001a400426464a666032603800426464a66603064646464a66603866e1cdd69806180d001a40002a66603866ebc00402c5288b0b18100009810001180f000980b0010a99980c19b873330063756600a602c0066eb8c020c05801cdd71802980b003a400429445858c94ccc060cdc3a4000002264646464a66603e6044004264649319299980f19b87480000044c8c8c8c94ccc094c0a000852616375c604c002604c0046eb8c090004c07000c58c070008c94ccc074cdc3a40000022646464646464a66604c60520042930b1bad30270013027002375a604a002604a0046eb4c08c004c06c01058c06c00c58c080004c080008c078004c05800858c058004c94ccc05ccdc3a4008602c00226038602a0022c60366038603860280022c6034002646600200201044a666032002297ae01323253330183232533301a3370e9001000899b8f015375c603e60300042940c060004c020c058c020c0580084cc070008cc0100100044cc010010004c074008c06c004588c064c068004888c8c8c94ccc060cdc3a40040022900009bad301d301600230160013253330173370e90010008a60103d87a8000132323300100100222533301d00114c103d87a8000132323232533301e3371e014004266e95200033022375000297ae0133006006003375a603e0066eb8c074008c084008c07c004dd5980e180a801180a800991980080080211299980d0008a6103d87a8000132323232533301b3371e010004266e9520003301f374c00297ae0133006006003375660380066eb8c068008c078008c070004cdd2a40006602a6ea4020cc0553001084768616e646c6572004bd700b1180b0009bab301400130140023758602400260240046eb0c040004c040008dd7180700099191919299980619b8748000c02c0044c8c8c8c8c8c8cc058dd48029980b1ba7003330163017001330163017301830180014bd70180b800980b0011bac3014001300c005375c602400260140022c60200026020004601c002600c00229309b2b1bae001230053754002460066ea80055cd2ab9d5573caae7d5d02ba1574498012bd8799fd8799f582020147ee639fef9a857ab9501dc742ca1c5b9598fe75d4c0d4968ecc4efc3bdf9ff02ff004c011e581c4f10656c76d4ec9f57b84b36c7f63f7f85017dfcc07698bc558dca250001', - scriptHash: 'c8e850fc3cee6be09ccef1caa18d3a84c35488d9bf839b7e0faab461', - address: '', - }, - mintClient: { - title: 'minting_client.mint_client', - script: - '590ebc590eb9010000332323232323232323232232223232533300932323232533300d3370e9000180600089919191919191919191919191919191919191919191919299981219b8748000c08c0044c8c8c8c94ccc0a0cdc3a4000604e002264646464a66605866ebc00d30103d8798000132323232323232323253330353370e66602a646600200204044a666074002297adef6c60132323232533303b3371e910100002100313303f337606ea4008dd3000998030030019bab303c003375c6074004607c00460780026eb8c05cc0cc004dd7180a1819800a400426464a666074607a0042a66606e6602a002006264646464a6660766464646464646464646464646464646464a666098a66609866609866e3cc040c038dd718171825001a45004a094454ccc130cdc4980d9bae302e304a003481904c94ccc134cdc3a400060980022646464a6660a066e1d2000304f00113232533305253330523330123031305000922337120020040082666024606260a00124466e240080040045280a99982919b8848000dd6981298280048a99982919b8848000dd6980998280048a99982919b8848000dd6982b982c182c182c182c18280048a99982919b8848000dd698189828180c98280048a99982919b88375a604a60a00126eb4c04cc1400245288b0b0b0b0b0b182b00098270008b19807240049001182980098258008b19805a400490030b0b099299982699b87300a002480084c94ccc138cdc3a4000609a0022a66609c66ebc01c0685288b0b198138010008b18090018b1bab30500013050002304e0013046003304c001304c002304a001304200d30010012253330470011480004cdc02400466004004609400244a66608666e1c005200014c0103d87a800015333043337100029000099ba548000cc11ccdd2a40006608e6ea0cdc0a40000046608e6ea0cdc0a400000297ae04bd70099ba548000cc11ccdd2a40006608e6ea0008cc11cdd4000a5eb812f5c044464646464646600e66e08010dd69826982700099b82375a609a002004608a00a6eb4c12c004c12c008dd69824800982080191822982318231823000980080091299981f99b8f0014890014890013253330403370e9020000899801801999b8c48008cdc09b8d002480080084008cdc7000a4000600200244a66607a66e3c0052210014890013232533303f3370e90200008998020021980680199b8100248008400ccdc700119b8100148008c0300044c94ccc0f0cdd7999911299981f99981f99299982019b87375a6044607c0029000099b87375a603e607c00290000a50304430453045304530453045303d0034a09445300103d87a8000132323253330423370e90010008a6103d87b80001323253330443371266e00dd6981318210009bad3017304200800714c103d87b800014c103d87980003048001304000230400013301a0020013005003301e303a301e303a00533704002904044bd1bab301b303a301e303a0054c103d879800014a22c64a66607866e1d2002303d375460366074002264a66607a66e1d2002303c0011375a608460760022c603c60740022c603460720422c4600460720024607e6080608060806080608060800026464a66607466e1d20000011323232325333041304400213232498c0e0008c94ccc0fccdc3a4000002264646464a66608c6092004264649319806001119191919299982499b87480000044c8c8c8c8c8c94ccc148c1540084c9263253330503370e900000089919299982a982c0010a4c2c6eb8c158004c13800858c13800458c14c004c14c008dd7182880098288011bad304f0013047003163047002301d002304800230460013253330443370e9000000899191919191919191919191919191919299982b982d00109919191924c6603e008464a6660b266e1d20000011323232323232323232325333066306900213232498c94ccc194cdc3a40000022646464646464646464646464a6660e860ee004264931981c80591bad00116375a60ea00260ea0046eb8c1cc004c1cc008dd6983880098388011bad306f001306f002375a60da00260da0046eb0c1ac004c18c02458c18c020c94ccc190cdc3a4000002264646464646464646464a6660e260e80042930b1bae30720013072002375a60e000260e00046eb4c1b8004c1b8008dd6983600098360011bad306a001306200a163062009163370e900118319baa30670013067002375a60ca00260ca0046eb4c18c004c18c008c184004c184008c17c004c15c00858c15c004c0b0014c0ac018c94ccc154cdc3a4000002264646464a6660b860be0042930b1bad305d001305d002375a60b600260a601c2c60a601a2c6eb0c160004c160008c158004c158008c150004c150008dd6982900098290011bad30500013050002375a609c002609c004609800260980046eb8c128004c10801058c10800c58dd5982380098238011822800981e8020b181e8018b182100098210011820000981c0018b181c00111191980080080191299981f8008a4c2646600600660860046006608200260120022c2c6076002646600200204644a666074002297ae01323253330393232533303b3370e9001000899b8f037375c608060720042940c0e4004c06cc0dcc06cc0dc0084cc0f4008cc0100100044cc010010004c0f8008c0f000458cdd2a4000660706ea4098cc0e0dd4800a5eb80cc8c8c8c8c8c8c8c894ccc0f0cdc4a4000002264a66607a66e24c030005201013232325333040337109018180780088008b1980299802801000801998061802a450a6962635f636c69656e740048020cc02cc010cc00cdd7180f981d80f1bae301c303b01e480a058dcc1b9933004375000291010016223371400400246e4c004c0040048894cccccc1040084c8c8c8c8cc0254ccc0f8cdc4001a401c266e0120f2010031533303e33710006904001099b813370090400a001a401c2c66e2922010128000015333040001133714911035b5d2900004133714911035b5f2000375c607e66600e00266ec1300102415d00375266e292210129000042233760980103422c2000375266601001000466e28dd718200009bae30410013758607c0046eb4c0f0004c8cdd81ba8303c001374e607a0026ea80084c94ccc0f80044cdc5245027b7d00002133714911037b5f2000375c607a64646600200200644a66608200220062664466ec130103422c20003752666012012608200466e29221023a20003330090093042002337146eb8c104004dd71821000982180099801001182200099bb04c10342207d0037520046eac0084c94ccc0f80044cdc52441025b5d00002133714911035b5f2000375c607a66600a00266ec1300102415d0037520044466ec1300103422c2000375266600c00c00466e28dd7181f0009bae303f001375800426600a6eb40080044c8cdc524410268270033223233300100100300222253330403371000490000800899191919980300319b8100548008cdc599b80002533304333710004900a0a40c02903719b8b33700002a66608666e2000520141481805206e0043370c004901019b8300148080cdc700300119b81371a002900119b8a4881012700002375c004444646600200200844a66607c0022008266006608000266004004608200244646600200200644a66607266e1c0052000133714910101300000315333039337100029000099b8a489012d003300200233702900000089980299b8400148050cdc599b803370a002900a240c00066002002444a66606c66e2400920001001133300300333708004900a19b8b3370066e14009201448180004dd6980a9818980a981880211199b8c480000040088dc680099299981899b87480000044c8c8c8c94ccc0e0c0ec0084c8c926302f0023253330363370e90000008991919191919299981f98210010a4c2c6eb4c100004c100008dd6981f000981f0011bad303c001303400416303400316303900130390023037001302f00216302f001300100323253330303370e900218178008981a98170008b1801181680091819981a181a000980598150038b19299981619b874800000454ccc0bcc0a800c526161533302c3370e90010008a99981798150018a4c2c2a66605866e1d2004001132323232323232325333037303a002132498c02800458c0e0004c0e0008dd7181b000981b0011bae30340013034002375c606400260540062a66605866e1d20060011533302f302a00314985854ccc0b0cdc3a40100022a66605e60540062930b0b1815001119299981619b87480000044c8c8c8c94ccc0ccc0d800852616375a606800260680046eb4c0c8004c0a800858c0a8004c0b8004c09800458cc004028cdd2a4004660566012604a00497ae022323300100100322533302d00114c0103d87a8000132323232533302e3375e00e004266e952000330320014bd700998030030019817801981680118188011817800981500098110008b191980080080a1129998140008a60103d87a8000132325333027330053006302500200813374a90001981580125eb804cc010010004c0b0008c0a800488cdc39998021bab30033022002375c600c60440026eb8c00cc088005200223027302800122232323253330263370e90010008a400026eb4c0acc090008c090004c94ccc094cdc3a4004002298103d87a8000132323300100100222533302b00114c103d87a8000132323232533302c3371e014004266e95200033030375000297ae0133006006003375a605a0066eb8c0ac008c0bc008c0b4004dd598151811801181180099198008008021129998140008a6103d87a800013232323253330293371e010004266e9520003302d374c00297ae0133006006003375660540066eb8c0a0008c0b0008c0a8004c004c0740688c090004dd5981100098110009810801180f800980f800980f000980e8011bab301b001301b001301a002375860300026030002602e0046eb0c054004c034014dd7180980098058008b18088009808801180780098038018a4c26cac64a66601266e1d200000113232533300e3011002132498c01000458c03c004c01c01058c01c00c8c94ccc024cdc3a4000002264646464a66602060260042930b1bae30110013011002375c601e002600e0042c600e0026eb80048c014dd5000918019baa0015734aae7555cf2ab9f5740ae855d12ba44c11e581c9981eb49baf611dbe5a73b71fcebb8f562f71872a0b019924c346f890001', - scriptHash: '6d24c4413af4c5edf6b91820a7035ee6f28d613f6d6838c6ef246945', - address: '', - }, - mintConnection: { - title: 'minting_connection.mint_connection', - script: - '591743591740010000333232323232323232323223223222323232533300c3232323253330103370e900018078008991919191919191919191919191919191919191919299981418158010991919191919191919191919191919191919191919191919191919191919191919191919191919191919191919299982919b87480000984c8c8c94ccc154cdc3a400060a80022646464a6660b066e1d2000305700113232533305a3375e666018607060b0607060b000266e080bd2080897a3756606060b0607060b000298103d8798000132533305b3370e9000182d00089919299982e9980701c8008a99982e99980f01b000a6103d87a800014a22c2c60c200260b20022c6666601c08009200e9110a636f6e6e656374696f6e00375a606060b0607060b00082c60bc00260ac0022c666600e0846eb8c0b4c154c0b4c1540c014cdd7181a982a981a982a818182d80098298008b1999801820819800a6103d87a80003058001305004b13232323232323232323232533305d3370e9000182e0008991919299983019b8748000c17c0044c8c94ccc188cdd799980a182018301820183000099b820374820225e8dd5981c183018201830000a6103d879800013253330633370e900018310008991929998329980b0208008a99983299981301f000a6103d87b800015333065332253330674a226464a6660d294454ccc1a5288a5116163374a900019836182318331817183300119836181f18330011983626103d87a80003306c0013306c306d306e306e306e306e30660024bd7019ba548000cc1acc114c194004cc1ad30010140003306b3374a900019835a610443696263004bd7025eb8058c10cc18c010c10cc18c0f85288b0b0b183480098308008b1999980b024028807a450a636f6e6e656374696f6e00375a607060c0608060c00082c60cc00260bc0022c666601e0946eb8c0d4c174c0d4c1740e016cdd7181e982e981e982e81c1831800982d8008b199980582481d80499ba548010cc180dd4803998301ba9005330603752006660c000297ae030600013060002375c60bc00260bc0046eb8c170004c170008dd7182d000982d001182c000982802591111919299982b99b87480000044c8c8c8c94ccc16ccdc3a40000022646464a6660bc66ebc0080284c8c8c8cdd2a4000660ca00497ae03253330613370e9000000899191919299983418358010991924c60ba00464a6660cc66e1d20000011323232323232533306f3072002149858dd6983800098380011bad306e001306e002375a60d800260c80082c60c80062c60d200260d200460ce00260be0042c60be0026072002606860b800c298103d87a800032533305e3370e90000008a999830982e0010a4c2c2a6660bc66e1d200200115333061305c00214985854ccc178cdc3a400800226464646464646464a6660d260d800426493182e0008b183500098350011bae30680013068002375c60cc00260cc0046eb8c190004c17000854ccc178cdc3a400c0022a6660c260b80042930b0a99982f19b874802000454ccc184c1700085261616305c0013061001305900214c103d87a800030590013300c0073374a90011982e981b982b800a5eb80c174004c154008530103d87a8000305500133017004233007302c30540010032222323232323253330593370e900000089919191919ba548000cc1840092f5c064a6660ba66e1d20000011323232325333064306700213232498c164008c94ccc188cdc3a4000002264646464a6660d260d800426464931981f801119191919299983619b87480000044c8c8c8c8c8c94ccc1d4c1e00084c9263253330733370e900000089919299983c183d8010a4c2c6eb8c1e4004c1c400858c1c400458c1d8004c1d8008dd7183a000983a0011bad3072001306a00316306a0023060002306b00230690013253330673370e9000000899191919191919191919191919191919299983d183e80109919191924c660a4008464a6660f866e1d2000001132323232323232323232533308901308c0100213232498c94ccc22004cdc3a40000022646464646464646464646464a66612e02613402004264931983600591bad00116375a6130020026130020046eb8c25804004c25804008dd6984a00800984a008011bad309201001309201002375a6120020026120020046eb0c23804004c2180402458c21804020c94ccc21c04cdc3a4000002264646464646464646464a66612802612e020042930b1bae309501001309501002375a6126020026126020046eb4c24404004c24404008dd69847808009847808011bad308d0100130850100a16308501009163370e90011843009baa308a01001308a01002375a6110020026110020046eb4c21804004c21804008c21004004c21004008c20804004c1e800858c1e8004c1bc014c1b8018c94ccc1e0cdc3a4000002264646464a6660fe6104020042930b1bad308001001308001002375a60fc00260ec01c2c60ec01a2c6eb0c1ec004c1ec008c1e4004c1e4008c1dc004c1dc008dd6983a800983a8011bad30730013073002375a60e200260e200460de00260de0046eb8c1b4004c19401058c19400c58dd598350009835001183400098300020b18300018b183280098328011831800982d8010b182d800981a9818982c800982f800982b8010a6103d87a8000305700133019007233009302e30560010023374a90001982d1ba90043305a375200297ae05333055337129000000899299982b19b893028001480404c8c8c94ccc164c04c004400458cc044cc04400800400ccc0a8c03d22010a6962635f636c69656e7400480214ccc158c0400144cc0a401520281616300c300b001163253330553370e9000182a000899191919299982c99b8f00148810a6962635f636c69656e740013232533305b3370e9000182d00089bad3060305900116533305a3371e0029110014c103d87a8000132323330010014c0105d8799f00ff00480008894ccc178cdc3800802080109998018019919299983019b87480000044c8c94ccc1894ccc188cdc4a40c0008266e24011207214a0266e95200033066375066e04cdc019b820014805001120604bd700a6103d87a8000375a60cc00260bc008298103d87a8000305e0033371c00a00266e000052002371a0026605400c66e000092002163302b005001375a60b00026466ec0c170004c170c174004dd6182d80098298008b191919299982b99b87480080045300103d87a8000132323374a90001982e991ba73305e305b0013305e305c0014bd7019bb037500026ea0cdc099b80001005480092f5c06eb4c174004c154008c154004c8c8cc00400520002253330583371000666e00004010530103d87a8000153330583371e666e300040100152201012d0013374a90001982e1ba80014bd7009980100119b8000148008c09c008c0992201012d00223370e66600c6eacc09cc13c008dd7181798278009bae3027304f001480088894ccc144ccc144c94ccc148cdc39bad30303050001480004cdc39bad3028305000148000528182b182b982b982b982b982b9827801a504a2298103d87a8000132323253330543370e90010008a6103d87b80001323253330563371266e00dd6981a182a0009bad3031305400800714c103d87b800014c103d8798000305a00130520023052001330050020013056305730573057305730573057304f00322323300100100322533305400114c103d87a800013232323253330553375e00e004266e952000330590014bd70099803003001982b001982a001182c001182b000911111919299982999b87333008323300100100822533305800114bd6f7b630099191919299982c99b8f488100002100313305d337606ea4008dd3000998030030019bab305a003375c60b000460b800460b40026eb8c0c4c144004dd718149828800a4004266e952000330570014bd700a60103d87a80003374a90001982b1ba900533056375200297ae05333051337129000000899299982919b893024001480404c8c8c94ccc154c03c004400458cc034cc03400800400ccc098c02c011200833025300a3300b375c606060a00086eb8c0a0c140011202816300830070011622232323253330513370e90010008a400026eb4c158c13c008c13c004c94ccc140cdc3a40040022980103d87a8000132323300100100222533305600114c103d87a800013232323253330573371e014004266e9520003305b375000297ae0133006006003375a60b00066eb8c158008c168008c160004dd5982a9827001182700099198008008021129998298008a6103d87a800013232323253330543371e010004266e95200033058374c00297ae0133006006003375660aa0066eb8c14c008c15c008c1540048dcc998031ba80014881002373000246e4c00488cdc5001000919b88480c0c064004c0040048894cccccc1380084c8c8c8c8cc0254ccc12ccdc4001a401c266e0120f2010031533304b33710006904001099b813370090400a001a401c2c66e29221012800001533304d001133714911035b5d2900004133714911035b5f2000375c609866600e00266ec1300102415d00375266e292210129000042233760980103422c2000375266601001000466e28dd718268009bae304e001375860960046eb4c124004c8cdd81ba83049001374e60940026ea80084c94ccc12c0044cdc5245027b7d00002133714911037b5f2000375c609464646600200200644a66609c00220062664466ec130103422c20003752666012012609c00466e29221023a2000333009009304f002337146eb8c138004dd71827800982800099801001182880099bb04c10342207d0037520046eac0084c94ccc12c0044cdc52441025b5d00002133714911035b5f2000375c609466600a00266ec1300102415d0037520044466ec1300103422c2000375266600c00c00466e28dd718258009bae304c001375800426600a6eb40080044c8cdc5244102682700332232333001001003002222533304d3371000490000800899191919980300319b8100548008cdc599b80002533305033710004900a0a40c02903719b8b33700002a6660a066e2000520141481805206e0043370c004901019b8300148080cdc700300119b81371a002900119b8a4881012700002375c004444646600200200844a6660960022008266006609a00266004004609c00244646600200200644a66608c66e1c0052000133714910101300000315333046337100029000099b8a489012d003300200233702900000089980299b8400148050cdc599b803370a002900a240c00066002002444a66608666e2400920001001133300300333708004900a19b8b3370066e14009201448180004888c8c8c8c94ccc1194ccc118c040dd7181218220018a99982319b8848000c024dd6180e18220018a999823198059bac301c3044003253330473330473371e60266eb8c094c1140052201004a09444c8cc0440048ccc124cdc7980a800a45004a0944dd6180e98228008a50132533304753330473371e6eb8c074c1140052210014a226660246eb8c074c1140052014482000454ccc11cc044dd718129822800899982399b873019375c604a608a6044608a00290002504a22940528180618220018a5014a029404c8c8c8c8c94ccc12ccdd78030058a99982599808001919299982699b8748000c1300044c94ccc138cdc79bae302c304c001375c605860980062a66609ca66609c66e212000301537586048609800629444c9281bae302c304c00313233018001232323300100100222533305600114a026464a6660aa66e3c008018528899802002000982d0011bae30580013758604c609c0066eb0c090c13000c5280a503052304b001163300e4bd70926d8799f41319f4d4f524445525f4f5244455245444f4f524445525f554e4f524445524544ffff00119b8f375c605660960026eb8c0acc12c0084cdd78008050a5014a0609e002609e0046eb0c134004c134004c11000c58c128004c128008c120004c10000c88c8cc00400400c894ccc1140045300103d87a8000132325333044300500213374a90001982400125eb804cc010010004c124008c11c004c004004894ccc1040045200013370090011980100118220009119198008008019129998210008a51132325333041300500213300400400114a0608c004608800246080608260826082002600200244a66607a00229000099b8048008cc008008c10000488c8cc00400400c894ccc0f800452889919299981e98028010998020020008a503042002375c6080002466600400290092410002444a66607066607066e3cc01000d2201004a094454ccc0e14ccc0e0cdc48011805001899b89300a00300114a0264646660020029452000222533303c3370e002008200426660060066464a66607c008200229414ccc0f54ccc0f4cdc4a418402002266e2400520f40114a0294454ccc0f54ccc0f4cdc4a410402002266e2400520b40114a0294454ccc0f54ccc0f4cdc4a40c0002266e24005207214a029444c8cc0040052f5c302182e008102185f008102182b008102182d0081021823008102185b008102185d008102183c008102183e001129998210008a501323253330413370e00400a29444cc010010004c118008dd6982200099b8e0070013370000290011b8d00314a029408c010c008004c004004894ccc0d0cdc7800a450014890013253330353370e90200008998018019980300124004200466e38005200030010012253330323371e0029101001489001323253330343370e90200008998020021980380199b8100248008400ccdc700119b8100148008c01000488ccdc600099b81371a00400200446e3400488ccdc624000002004605604a64a66605866e1d2002302d375460046054002264a66605a66e1d2002302c0011375a606460560022c601460540022c6002605201a46060606200264a66605466e1d20000011323232325333031303400213232498c098008c94ccc0bccdc3a4000002264646464646464646464a666078607e00426464649319299981e19b87480000044c8c8c8c8c8c94ccc114c1200084c9263253330433370e900000089919299982418258010a4c2c6eb8c124004c10400858c10400458c118004c118008dd7182200098220011bae3042001303a00616303a00532533303b3370e90000008a99981f181c8038a4c2c2a66607666e1d20020011533303e303900714985854ccc0eccdc3a40080022a66607c607200e2930b0a99981d99b874801800454ccc0f8c0e401c5261616303900633011007232533303b3370e90000008991919192999821182280109924c6602e00246eb800458dd6182180098218011bae3041001303900216303900116375a607a002607a00460760026076004607200260720046eb0c0dc004c0dc008dd7181a80098168020b18168018b18190009819001181800098140018b18140011119198008008019129998178008a4c264660060066066004600660620026002006464a66605066e1d200430270011302d302600116300230250012302b302c302c001163029001323300100100d22533302800114bd700991929998139919299981499b87480080044cdc78119bae302e302700214a0604e002600a604a600a604a0042660560046600800800226600800800260580046054002460500026eacc098004c098004c094008c08c004c08c004c088004c084008dd5980f800980f800980f0011bac301c001301c0023758603400260340046eb0c060004c040014dd7180b00098070008b180a000980a001180900098050020a4c26cac64a66601866e1d20000011323253330113014002132498c01400458c048004c02801454ccc030cdc3a4004002264646464646464646464a66603260380042646493180680118068048b180d000980d0011bae30180013018002375c602c002602c0046eb8c050004c050008c048004c02801458c0280108c94ccc030cdc3a4000002264646464a666026602c0042930b1bad30140013014002375a602400260140042c6014002464a66601666e1d200000113232323253330123015002149858dd7180980098098011bae30110013009002163009001375c0026eb80048c014dd5000918019baa0015734aae7555cf2ab9f5740ae855d12ba44c11e581c6d24c4413af4c5edf6b91820a7035ee6f28d613f6d6838c6ef246945004c011e581c2d7ab2096fa2300e2dafc3272ee30765fd881f63c3b59ee0f781fa570001', - scriptHash: '9f1d58954f72f4bfd64c5086053317939a05922eadf1e83f09567cae', - address: '', - }, - spendConnection: { - title: 'spending_connection.spend_connection', - script: - '591656591653010000332323232323232323232232222323232323232533300e32323232323232323232323232323232323253330203300100e3012301e01b132325333025302800213232323253330263300700530183024021132323232533302a3370e9000181480089919191919191919191919191919191919191919191919299982099b874800002c4c8c8c8c8c8c8c8c8c94ccc128cdc3a4000609200226464a66609866ebcccc054c0f0c128c0f0c128004cdc10132410112f46eacc0f8c128c0f0c128005300103d87980001533304c32323232323232323253330553375e606660a6608a60a60a098103d87a800013253330563330563371e0029101004a094454ccc158c94ccc15cc014dd71823982a8008a99982b99b8848000c00cdd61824982a8008a99982b99191980080080111299982e8008a5113232533305c533305c33305c3371e60186eb8c130c168009221004a09444c8c8cc004004008894ccc18800452889919299983099983099b8f3011002489004a09444cc01001000452818330011bae30640013758609c60b400429404cc0100100045281830801182f8009bac30493055001132533305853330583371e6eb8c128c1580052210014a2266600e6eb8c128c1580052014482000454ccc160c018dd71824182b000899982c19b873031375c609060ac606c60ac00290002504a22940528180b982a8008a5014a02940c118c1500c84cdd7991919ba548000cc170c8c8c8cdd2a4000660be60c0006660be60c0004660be98103d87c80003305f323374a9000198301830800998301ba9007306230620013059301b3059304b3059056001306030603060001305f001305630483056053001305d00130540510321616375c608e60a6602a60a6608a60a60622c600200244a6660b000229000099b8048008cc008008c16c0048ccc008005201248200048894ccc150ccc150cdc79802001a45004a094454ccc1514ccc150cdc48011816801899b89302d00300114a026464666002002945200022253330583370e002008200426660060066464a6660b4008200229414ccc1654ccc164cdc4a418402002266e2400520f40114a0294454ccc1654ccc164cdc4a410402002266e2400520b40114a0294454ccc1654ccc164cdc4a40c0002266e24005207214a029444c8cc0040052f5c302182e008102185f008102182b008102182d0081021823008102185b008102185d008102183c008102183e0011299982f0008a5013232533305d3370e00400a29444cc010010004c188008dd6983000099b8e0070013370000290011b8d00314a029408c010c008004c004004894ccc140cdc7800a450014890013253330513370e90200008998018019980c80124004200466e380052000300100122533304e3371e0029101001489001323253330503370e90200008998020021980b80199b8100248008400ccdc700119b8100148008c09c00454ccc130cc894ccc13928899192999828199998088020018008060040a99982825114a22c2c66666024980103d87b8000375c607e609a601e609a0040026eb0c104c134008dd6980898268011998099bae303e304c0010193012489036962630016303c304a001303c304a02814a22c2c2c60a000260900022c666601e0666eb8c0ecc11cc0ecc11c110114dd7181c9823981c9823822182680098268011bae304b001304b002375c609200260920046eb8c11c004c0fc0ec4c8c8c8c8c94ccc118cdc3a4000608a00226464a66609066ebcccc044c0e0c118c0e0c118004cdc10112410112f46eacc0e8c118c0e0c11800530103d87980001533304853330483375e604c608c6070608c08698103d87b800013375e646466e9520003304e32323374a900019828182880119828182880099828260103d87c80003052305200130510013048303a3048045001304f0013046043024161533304833223232533304c3333300d00400300100a00814a22c6666601c98103d87c8000375c60766092601660920040026eb0c0f4c124008dd6980698248011998079bae303a3048001015300e4890369626300303830460013038304602414a22c2c2c609800260880022c666601605e6eb8c0dcc10cc0dcc10c100104dd7181a9821981a9821820182480098248011bae3047001303f03b23046304730473047001222224a246088608a608a608a608a0024444466e9520003304637520086608c6e9c008cc118014cc11800ccc118dd4000a5eb808cdd2a4000660826ea40052f5c044466e952000330423752006660846ea4008cc1080052f5c044446464646464a66608666e1d20000011323232323374a90001982580125eb80c94ccc11ccdc3a4000002264646464a66609c60a20042646493182180119299982619b87480000044c8c8c8c94ccc14cc1580084c8c9263304900223232323253330563370e90000008991919191919299982f983100109924c64a6660ba66e1d20000011323253330623065002149858dd71831800982d8010b182d8008b183000098300011bae305e001305e002375a60b800260a80062c60a8004609000460aa00460a600264a6660a266e1d200000113232323232323232323232323232323253330643067002132323232498cc1700108c94ccc198cdc3a4000002264646464646464646464a6660e660ec004264649319299983919b87480000044c8c8c8c8c8c8c8c8c8c8c8c94ccc20404c210040084c9263307600b2375a0022c6eb4c20804004c20804008dd71840008009840008011bad307e001307e002375a60f800260f80046eb4c1e8004c1e8008dd6183c00098380048b183800419299983899b87480000044c8c8c8c8c8c8c8c8c8c94ccc1f8c2040400852616375c60fe00260fe0046eb4c1f4004c1f4008dd6983d800983d8011bad30790013079002375a60ee00260de0142c60de0122c66e1d20023070375460e800260e80046eb4c1c8004c1c8008dd69838000983800118370009837001183600098320010b1832000982b802982b00319299983119b87480000044c8c8c8c94ccc1a4c1b000852616375a60d400260d40046eb4c1a0004c18003858c18003458dd61832800983280118318009831801183080098308011bad305f001305f002375a60ba00260ba0046eb4c16c004c16c008c164004c164008dd7182b80098278020b18278018b1bab305400130540023052001304a00416304a00316304f001304f002304d00130450021630450013022303730430013049001304100214c103d87a8000304100133032007233023303430400010023374a9000198221ba900433044375200297ae0533303f337129000000899299982019b893019001480404c8c8c94ccc10cc06c004400458cc038cc03800800400ccc020dc9a450a6962635f636c69656e7400480214ccc100c0600144cc01c01520281616300c300d0011632533303f3370e9000181f000899191919299982199b8f00148810a6962635f636c69656e74001323253330453370e9000182200089bad304a30430011653330443371e0029110014c103d87a8000132323330010014c0105d8799f00ff00480008894ccc120cdc3800802080109998018019919299982519b87480000044c8c94ccc1314ccc130cdc4a40c0008266e24011207214a0266e95200033050375066e04cdc019b820014805001120604bd700a6103d87a8000375a60a00026090008298103d87a800030480033371c00a00266e000052002371a0026601600c66e0000920021633009005001375a60840026466ec0c118004c118c11c004dd61822800981e8008b191919299982099b87480080045300103d87a8000132323374a900019823991ba73304830450013304830460014bd7019bb037500026ea0cdc099b80001005480092f5c06eb4c11c004c0fc008c0fc004c8c8cc00400520002253330423371000666e00004010530103d87a8000153330423371e666e300040100152201012d0013374a9000198231ba80014bd7009980100119b8000148008c060008c05d2201012d0022333718900000080111199b8c001337026e340080040088894ccc0e8ccc0e8c94ccc0eccdc39bad302b3039001480004cdc39bad302d303900148000528181f98201820182018201820181c001a504a22980103d87a80001323232533303d3370e90010008a6103d87b800013232533303f3371266e00dd69817981e8009bad301d303d00800714c103d87b800014c103d87980003043001303b002303b001323300100100322533304000114c103d87a800013232323253330413375e00e004266e952000330450014bd700998030030019821001982000118220011821000981f982018201820182018201820181c001981a8181980099800a4410a636f6e6e656374696f6e004881012d003002300300a223371400400246e600048dcc998011ba80014881003001001222533333303a002132323232330095333037337100069007099b80483c80400c54ccc0dccdc4001a410004266e04cdc0241002800690070b19b8a4890128000015333039001133714911035b5d2900004133714911035b5f2000375c607066600e00266ec1300102415d00375266e292210129000042233760980103422c2000375266601001000466e28dd7181c8009bae303a0013758606e0046eb4c0d4004c8cdd81ba83035001374e606c0026ea80084c94ccc0dc0044cdc5245027b7d00002133714911037b5f2000375c606c64646600200200644a66607400220062664466ec130103422c20003752666012012607400466e29221023a2000333009009303b002337146eb8c0e8004dd7181d800981e00099801001181e80099bb04c10342207d0037520046eac0084c94ccc0dc0044cdc52441025b5d00002133714911035b5f2000375c606c66600a00266ec1300102415d0037520044466ec1300103422c2000375266600c00c00466e28dd7181b8009bae3038001375800426600a6eb40080044c8cdc524410268270033223233300100100300222253330393371000490000800899191919980300319b8100548008cdc599b80002533303c33710004900a0a40c02903719b8b33700002a66607866e2000520141481805206e0043370c004901019b8300148080cdc700300119b81371a002900119b8a4881012700002375c004444646600200200844a66606e0022008266006607200266004004607400244646600200200644a66606466e1c0052000133714910101300000315333032337100029000099b8a489012d003300200233702900000089980299b8400148050cdc599b803370a002900a240c00066002002444a66605e66e2400920001001133300300333708004900a19b8b3370066e14009201448180004dd6981800098140008b19919129998161802000899191919299981819b87480080045300103d87a80001325333031337129000000899ba548000cc0d4dd4000a5eb80530103d87a8000375a606a605c004605c0026464a66606066e1d200200114c0103d87a80001323374a90001981a9ba8375a60646466ec0c0dc004c0dcc0e0004dd6181b000a5eb80c0b8008c0b8004c8c8ccc00400530108d8799f9f0000ffff000022225333032337100029000080109998018019919299981a19b87480080045300103d87a8000132323232533303853330383371000c90300a5113371090390030a99981c19b87006481684cdd2a400066078646e9ccc0f4c0e8004cc0f4c0ec0052f5c066ec0dd419b814800000930010100004bd700a60103d87a8000153330383371000490000a6103d87a80001323374a90001981e991ba73303e303b0013303e303c0014bd7019bb0375066e0000ccdc100099807a40280046ea0cdc00012400497ae03370200c90301bad3039002375a606e0026466ec0c0ec004c0ecc0f0004dd6181d0009819002181900199b8e00500133702002900119b81371a0029001199b8c480c0cdc019b8133702002900124060900100118028008b1800800911299981619b8800148000520001533302c3370e00290000a40042a66605866e1ccdc3000a40089000099980180199b82002002337060029002099b820023330030033370400400466e0ccdc0800a400490021bae301b3027301b30270242337109018180100091b8d0013253330273370e900118141baa3019302500113253330283370e9001181380089bad302d30260011630173025001163018302400816301b001300100323253330253370e900218120008981518118008b1801181100091814181498148008b181300099198008008049129998128008a5eb804c8c94ccc090cdd7980a1811001180a181100909981400119802002000899802002000981480118138008b1119b8733322232323253330273370e90010008a400026eb4c0b0c094008c094004c94ccc098cdc3a40040022980103d87a8000132323300100100222533302c00114c103d87a8000132323232533302d3371e014004266e95200033031375000297ae0133006006003375a605c0066eb8c0b0008c0c0008c0b8004dd598159812001181200099198008008021129998148008a6103d87a8000132323232533302a3371e010004266e9520003302e374c00297ae0133006006003375660560066eb8c0a4008c0b4008c0ac004dd59809980f8011bae3011301f001375c6026603e002900118118009811800981100098108009810000980f8011bac301d001301d0023758603600260360026024002602a0046026002646464646464a66602e66e1d200230160031323232533301a3370e9000180c800899bb0300c3018301f3018001008163300a00323375e60146030002004603a002602a0062c6eb0c06c004c04c00cc064004c064008c05c004c03c0288c05800488c8cc00400400c894ccc0580045300103d87a8000132325333015300500213374a90001980c80125eb804cc010010004c068008c0600048c050c0540045261365632533300e3370e900000089919191919191919299980c980e00109924c60140022c603400260340046eb8c060004c060008dd7180b000980b0011bae3014001300c0081533300e3370e9001000899191919299980a980c00109924c600c0022c602c002602c0046eb8c050004c03002058c03001c8c94ccc038cdc3a4000002264646464a66602a60300042930b1bad30160013016002375a602800260180042c6018002600200c464a66601866e1d20000011323232325333013301600213232498c020008c94ccc044cdc3a4000002264646464646464646464a66603c604200426464649319299980f19b87480000044c8c8c8c8c8c94ccc09cc0a80084c9263253330253370e900000089919299981518168010a4c2c6eb8c0ac004c08c00858c08c00458c0a0004c0a0008dd7181300098130011bae3024001301c00616301c00532533301d3370e90000008a999810180d8038a4c2c2a66603a66e1d200200115333020301b00714985854ccc074cdc3a40080022a666040603600e2930b0a99980e99b874801800454ccc080c06c01c5261616301b00633013007232533301d3370e90000008991919192999812181380109924c6603200246eb800458dd6181280098128011bae3023001301b00216301b00116375a603e002603e004603a002603a004603600260360046eb0c064004c064008dd7180b80098078020b18078018b180a000980a001180900098050010b1805000919299980599b87480000044c8c8c8c94ccc048c05400852616375c602600260260046eb8c044004c02400858c02400488c8cc00400400c894ccc03c00452613233003003301300230033011001375c0024600a6ea80048c00cdd5000ab9a5573aaae7955cfaba05742ae895d22611e581c6d24c4413af4c5edf6b91820a7035ee6f28d613f6d6838c6ef2469450001', - scriptHash: '2d7ab2096fa2300e2dafc3272ee30765fd881f63c3b59ee0f781fa57', - address: 'addr_test1wqkh4vsfd73rqr3d4lpjwthrqajlmzqlv0pmt8hq77ql54cftusft', - }, - mintChannel: { - title: 'minting_channel.mint_channel', - script: - '5918cc5918c901000033332323232323232323232232232232223232533300d3232323253330113370e90001808000899191919191919191919191919191919191919191929998149816001099191919191919192999818981a0010991919299981899b87480000044c8c8c8c8c8c8c8c94ccc0e4cdc3a40006070002264646464646464646464646464646464646464a66609866e1d2000304b00113232323253330533056002153330503232323300100100222533305700114a026464a6660ac66e3c008018528899802002000982d8011bae305900137586046609e0046464a6660a466e1d200000114881164f524445525f4e4f4e455f554e53504543494649454400153330523370e90010008a450f4f524445525f554e4f5244455245440014890d4f524445525f4f5244455245440030500013022304e302d304e02813253330513370e9000182800089919299982999baf33322253330563330563253330573370e6eb4c0d0c154005200013370e6eb4c0a4c154005200014a060b660b860b860b860b860b860a8006941288a6103d87a8000132323253330593370e90010008a6103d87b800013232533305b3371266e00dd6981c182c8009bad3035305900800714c103d87b800014c103d8798000305f0013057002305700133024002001305b305c305c305c305c305c305c3054003303030513030305100133704048904044bd1bab30253051303030510014c103d879800013253330543370e9000182980089919299982b198100188008a99982b191919191919191919192999830299983019983019baf303d305e0044c103d87980004a094454ccc1814ccc180cdd79819182f002260103d87b800014a2266ebcc0c8c17801130103d87a80001323253330653068002153330623330080014805120800115333062325333063333009375c608060c2002900224100042a6660c6a6660c666e3cdd7181a9830800a4410014a226660126eb8c0d4c184005201048200045288b0b181e18300030a51161616375c60cc0026eb0c0d4c17801058584c8c94ccc188cdd78018068a99983119baf0014c103d87a800014a22c2c60cc00260bc0082c60c800260c800260c600460c200260b2066444a6660ba6660ba66e3cc018c01000d221004a094454ccc1754ccc174cdc4801180e001899b89301c00300114a026464666002002945200022253330613370e002008200426660060066464a6660c6008200229414ccc1894ccc188cdc4a418402002266e2400520f40114a0294454ccc1894ccc188cdc4a410402002266e2400520b40114a0294454ccc1894ccc188cdc4a40c0002266e24005207214a029444c8cc0040052f5c302182e008102185f008102182b008102182d0081021823008102185b008102185d008102183c008102183e001129998338008a501323253330663370e00400a29444cc010010004c1ac008dd6983480099b8e0070013370000290011b8d00314a02940c004004894ccc168cdc7800a4500148900132533305b3370e90200008998018019980880124004200466e38005200030010012253330583371e00291010014890013232533305a3370e90200008998020021980c00199b8100248008400ccdc700119b8100148008c05c0045288b0b182d00098290008b191919299982b19b87333021323300100103c22533305b00114bd6f7b630099191919299982e19b8f489000021003133060337606ea4008dd3000998030030019bab305d003375c60b600460be00460ba0026eb8c0ccc150004dd71814182a000a4004266e9520003305a0014bd700a60103d87a80003374a90001982c9ba904333059375200297ae05333054337129000000899299982a99b893014001480404c8c8c94ccc160c054004400458cc040cc04000800400ccc050c041221076368616e6e656c0048020cc04cc03ccc038dd7181918298119bae30273053023480a058c03cc04000458dd6981698289818182880c8b182b80098278008b19911919191919299982b99b87480000044c8c8c8c8cdd2a4000660be00497ae032533305b3370e9000000899191919299983118328010991924c60aa00464a6660c066e1d20000011323232325333067306a00213232498cc0f00088c8c8c8c94ccc1a8cdc3a40000022646464646464a6660e660ec0042649319299983899b87480000044c8c94ccc1d8c1e400852616375c60ee00260de0042c60de0022c60e800260e80046eb8c1c8004c1c8008dd6983800098340018b183400118188011834801183380099299983299b87480000044c8c8c8c8c8c8c8c8c8c8c8c8c8c8c8c94ccc1e0c1ec0084c8c8c8c9263304f004232533307a3370e90000008991919191919191919192999843809845008010991924c64a66610c0266e1d20000011323232323232323232323232533309501309801002132498cc1a402c8dd68008b1bad309601001309601002375c6128020026128020046eb4c24804004c24804008dd69848008009848008011bad308e01001308e0100237586118020026108020122c61080201064a66610a0266e1d2000001132323232323232323232533309201309501002149858dd71849808009849808011bad309101001309101002375a611e02002611e020046eb4c23404004c23404008dd69845808009841808050b1841808048b19b8748008c21004dd51844008009844008011bad308601001308601002375a61080200261080200461040200261040200461000200260f00042c60f0002608000a607e00c64a6660ec66e1d2000001132323232533307d308001002149858dd6983f000983f0011bad307c001307400e16307400d16375860f200260f200460ee00260ee00460ea00260ea0046eb4c1cc004c1cc008dd6983880098388011bad306f001306f002306d001306d002375c60d600260c60082c60c60062c6eacc1a0004c1a0008c198004c17801058c17800c58c18c004c18c008c184004c16400858c164004c0c8c0acc15c004c174004c154008530103d87a800030550013302103f233020302830540010023374a90001982c1ba905033058375200297ae033300b00348810a6962635f636c69656e74000013253330533370e90001829000899191919299982b99b8f00148810a6962635f636c69656e74001323253330593370e9000182c00089bad305e30570011653330583371e0029110014c103d87a8000132323330010014c0105d8799f00ff00480008894ccc170cdc3800802080109998018019919299982f19b87480000044c8c94ccc1814ccc180cdc4a40c0008266e24011207214a0266e95200033064375066e04cdc019b820014805001120604bd700a6103d87a8000375a60c800260b8008298103d87a8000305c0033371c00a00266e000052002371a0026601a00c66e0000920021633014005001375a60ac0026466ec0c168004c168c16c004dd6182c80098288008b19804800a45012d00375c6044609c6054609c0506eb8c0b4c138c0b4c13800c5858c150004dd61810182618159826000982900098250008b1991911919191919299982999b87480000044c8c8c8c8cdd2a4000660b600497ae03253330573370e9000000899191919299982f18308010991924c60a200464a6660b866e1d20000011323232323232323232325333069306c0021323232498c94ccc1a4cdc3a40000022646464646464a6660e460ea0042649319299983819b87480000044c8c94ccc1d4c1e000852616375c60ec00260dc0042c60dc0022c60e600260e60046eb8c1c4004c1c4008dd7183780098338030b183380299299983419b874800000454ccc1acc19801c52616153330683370e90010008a99983598330038a4c2c2a6660d066e1d20040011533306b306600714985854ccc1a0cdc3a400c0022a6660d660cc00e2930b0b18330031981e803919299983419b87480000044c8c8c8c94ccc1bcc1c80084c926330430012375c0022c6eb0c1c0004c1c0008dd7183700098330010b18330008b1bad306a001306a0023068001306800230660013066002375860c800260c80046eb8c188004c16801058c16800c58c17c004c17c008c174004c15400858c154004c0b8c09cc14c004c164004c144008530103d87a800030510013301d03b23301c302430500010023374a90001982a1ba904a33054375200297ae033300700248810a636f6e6e656374696f6e0000132533304f3370e90001827000899191919299982999b8f00148810a636f6e6e656374696f6e001323253330553370e9000182a00089bad305a305300116323253330563370e90010008a60103d87a80001323374a90001982d9ba8375a60b06466ec0c174004c174c178004dd6182e000a5eb80c150008c150004c8c8ccc00400530108d8799f9f0000ffff000022225333058337100029000080109998018019919299982d19b87480080045300103d87a8000132323232533305e533305e3371000c90300a5113371090390030a99982f19b87006481684cdd2a4000660c4646e9ccc18cc180004cc18cc1840052f5c066ec0dd419b814800000930010100004bd700a60103d87a80001533305e3371000490000a6103d87a80001323374a900019831991ba73306430610013306430620014bd7019bb0375066e0000ccdc100099809a40280046ea0cdc00012400497ae03370200c90301bad305f002375a60ba0026466ec0c184004c184c188004dd61830000982c002182c00199b8e00500133702002900119b81371a00290011980481319b800024800858cc040094004dd698290009919bb0305600130563057001375860aa002609a0022c6600a042911012d003001001222533304e3371000290000a40002a66609c66e1c005200014800854ccc138cdc399b8600148011200013330030033370400400466e0c005200413370400466600600666e08008008cdc199b81001480092004375c603a6092604a609204644666e30004cdc09b8d00200100222323232533304e3370e90010008a60103d87a8000132323374a90001982a191ba73305530520013305530530014bd7019bb037500026ea0cdc099b80001005480092f5c06eb4c150004c130008c130004c8c8cc004005200022533304f3371000666e00004010530103d87a80001533304f3371e666e300040100180144cdd2a4000660a66ea00052f5c026600400466e000052002300b003300a001222533304b337129000000899299982619b89300b001480404c8c8c94ccc13cc030004400458cc01ccc01c00800400ccc02cc01c0112008533304c300900413300a004480a05858c018c01c0045888cdc500100091b930012373000246e64cc014dd4000a45002337109018180180091199b8c480000040088dc68009800800911299999982480109919191919804a99982319b88003480384cdc0241e4020062a66608c66e2000d20800213370266e012080140034803858cdc524410128000015333048001133714911035b5d2900004133714911035b5f2000375c608e66600e00266ec1300102415d00375266e292210129000042233760980103422c2000375266601001000466e28dd718240009bae30490013758608c0046eb4c110004c8cdd81ba83044001374e608a0026ea80084c94ccc1180044cdc5245027b7d00002133714911037b5f2000375c608a64646600200200644a66609200220062664466ec130103422c20003752666012012609200466e29221023a2000333009009304a002337146eb8c124004dd71825000982580099801001182600099bb04c10342207d0037520046eac0084c94ccc1180044cdc52441025b5d00002133714911035b5f2000375c608a66600a00266ec1300102415d0037520044466ec1300103422c2000375266600c00c00466e28dd718230009bae3047001375800426600a6eb40080044c8cdc524410268270033223233300100100300222253330483371000490000800899191919980300319b8100548008cdc599b80002533304b33710004900a0a40c02903719b8b33700002a66609666e2000520141481805206e0043370c004901019b8300148080cdc700300119b81371a002900119b8a4881012700002375c004444646600200200844a66608c0022008266006609000266004004609200244646600200200644a66608266e1c0052000133714910101300000315333041337100029000099b8a489012d003300200233702900000089980299b8400148050cdc599b803370a002900a240c00066002002444a66607c66e2400920001001133300300333708004900a19b8b3370066e14009201448180004c0fc004c0dc00458c8c94ccc0e8cdc3a4000002264646464a66607c66e1d2000001132323253330413375e004980103d87c800013232323374a90001982400125eb80c94ccc110cdc3a4000002264646464a666096609c0042646493181f00119299982499b87480000044c8c8c8c8c8c94ccc148c15400852616375a60a600260a60046eb4c144004c144008dd6982780098238020b18238018b18260009826001182500098210010b1821000980d8009809981f8030a60103d87a80003253330413370e90000008a999822181f8010a4c2c2a66608266e1d200200115333044303f00214985854ccc104cdc3a400800226464646464646464a666098609e0042649318090008b182680098268011bae304b001304b002375c609200260920046eb8c11c004c0fc00854ccc104cdc3a400c0022a666088607e0042930b0a99982099b874802000454ccc110c0fc0085261616303f0013044001303c00214c103d87a8000303c0013300901a3374a900119820180c981d000a5eb80c100004c0e0008530103d87a8000303800133004024233003300b303700100723253330393370e9000000899191919299982018218010a4c2c6eb4c104004c104008dd6981f800981b8010b181b8009119b8733300337566014606c0046eb8c054c0d8004dd71805181b000a4004444646464a66607666e1d20020011480004dd69820181c801181c80099299981d19b8748008004530103d87a8000132323300100100222533304000114c103d87a800013232323253330413371e014004266e95200033045375000297ae0133006006003375a60840066eb8c100008c110008c108004dd5981f981c001181c000991980080080211299981e8008a6103d87a8000132323232533303e3371e010004266e95200033042374c00297ae01330060060033756607e0066eb8c0f4008c104008c0fc00488c8cc00400400c894ccc0ec0045300103d87a800013232533303a300500213374a90001981f00125eb804cc010010004c0fc008c0f400488c8cc00400400c894ccc0e8004530103d87a8000132323232533303b3375e00e004266e9520003303f0014bd70099803003001981e001981d001181f001181e000981b80098178140a50302f0273253330303370e900118189baa3002302e00113253330313370e9001181800089bad3036302f00116300d302e001163001302d01023034303500116375c60640026eb0c004c0a8c024c0a80108c0c4c0c8c0c8c0c8004c94ccc0accdc3a40000022646464646464a666068606e0042646493181380119299981919b87480000044c8c8c8c8c8c8c8c8c8c94ccc0fcc1080084c8c8c8c926330160062375c00264a66607e66e1d200000113232323253330463049002149858dd7182380098238011bae3045001303d00816303d00732533303e3370e90000008a999820981e0048a4c2c2a66607c66e1d200200115333041303c00914985854ccc0f8cdc3a40080022a66608260780122930b0b181e00419299981e99b874800000454ccc100c0ec028526161533303d3370e90010008a999820181d8050a4c2c2a66607a66e1d200400115333040303b00a14985854ccc0f4cdc3a400c0022a66608060760142930b0a99981e99b874802000454ccc100c0ec0285261616303b00916375c608000260800046eb0c0f8004c0f8008c0f0004c0f0008c0e8004c0e8008c0e0004c0c001858c0c001458c0d4004c0d4008dd718198009819801181880098148018b18148011119198008008019129998180008a4c264660060066068004600660640026002006464a66605266e1d200430280011302e302700116300230260012302c302d302d00116302a001323300100100d22533302900114bd700991929998141919299981519b87480080044cdc78111bae302f302800214a06050002600a604c600a604c00426605800466008008002266008008002605a0046056002460520026eacc09c004c09c004c098008c090004c090004c08c004c088008dd598100009810000980f8011bac301d001301d0023758603600260360046eb0c064004c044014dd7180b80098078008b180a800980a801180980098058018a4c26cac64a66601a66e1d20000011323253330123015002132498c01000458c04c004c02c01054ccc034cdc3a400400226464a666024602a0042649318020008b180980098058020b1805801919299980699b87480000044c8c8c8c94ccc050c05c00852616375c602a002602a0046eb8c04c004c02c00858c02c004dd70009bae001375c0024600a6ea80048c00cdd5000ab9a5573aaae7955cfaba05742ae895d226011e581c6d24c4413af4c5edf6b91820a7035ee6f28d613f6d6838c6ef246945004c011e581c9f1d58954f72f4bfd64c5086053317939a05922eadf1e83f09567cae004c011e581c3037b9daa9a8dbc78c68f9841700f32cbef42ca995a9af4b0ba747730001', - scriptHash: '19fbac9d1cb552f6a01eb5f1666a1646fe094968261734d7048a8d2f', - address: '', - }, - spendChannel: { - title: 'spending_channel.spend_channel', - script: - '58625860010000333223223222253330084a229309b2b1bae001375c002ae693011e581c6d24c4413af4c5edf6b91820a7035ee6f28d613f6d6838c6ef246945004c011e581c9f1d58954f72f4bfd64c5086053317939a05922eadf1e83f09567cae0001', - scriptHash: '3037b9daa9a8dbc78c68f9841700f32cbef42ca995a9af4b0ba74773', - address: 'addr_test1wqcr0ww64x5dh3uvdrucg9cq7vktaapv4x26nt6tpwn5wucjnqp6j', - }, - }, - nonceUtxo: { - txHash: '20147ee639fef9a857ab9501dc742ca1c5b9598fe75d4c0d4968ecc4efc3bdf9', - outputIndex: 2, - }, - handlerAuthToken: { - policyId: 'c8e850fc3cee6be09ccef1caa18d3a84c35488d9bf839b7e0faab461', - name: '68616e646c6572', - }, -}); - -export type IDeploymentConfig = ReturnType; - -export default deploymentConfig; diff --git a/cardano/gateway/src/query/services/db-sync.service.ts b/cardano/gateway/src/query/services/db-sync.service.ts index 93c72a69f..00cfc6f43 100644 --- a/cardano/gateway/src/query/services/db-sync.service.ts +++ b/cardano/gateway/src/query/services/db-sync.service.ts @@ -360,18 +360,4 @@ export class DbSyncService { } return results.length > 0 ? results[0].block_no : 0; } - - // async queryListBlockByImmutableFileNo(immutableFileNo: number): Promise { - // const query = "SELECT DISTINCT block_number as block_no FROM cardano_tx WHERE immutable_file_number=?;"; - // const blocks = await this.secondConnection.query(query, [immutableFileNo]); - - // return blocks.map((block) => block.block_no); - // } - - // async queryListImmutableFileNoByBlockNos(blockNos: number[]): Promise { - // const query = `SELECT DISTINCT immutable_file_number FROM cardano_tx WHERE block_number IN (${blockNos.map(() => `?`).join(",")});`; - // const files = await this.secondConnection.query(query, blockNos); - - // return files.map((file) => file.immutable_file_number); - // } } diff --git a/cardano/gateway/src/query/services/query.service.ts b/cardano/gateway/src/query/services/query.service.ts index 1de6f440c..d4d91a9c2 100644 --- a/cardano/gateway/src/query/services/query.service.ts +++ b/cardano/gateway/src/query/services/query.service.ts @@ -12,7 +12,7 @@ import { QueryNewClientRequest, QueryNewClientResponse, } from '@plus/proto-types/build/ibc/core/client/v1/query'; -import { BlockData, ClientState, ConsensusState } from '@plus/proto-types/build/ibc/lightclients/ouroboros/ouroboros'; +import { BlockData } from '@plus/proto-types/build/ibc/lightclients/ouroboros/ouroboros'; import { ClientState as ClientStateTendermint, ConsensusState as ConsensusStateTendermint, @@ -22,15 +22,8 @@ import { ConsensusState as ConsensusStateMithril, MithrilHeader, } from '@plus/proto-types/build/ibc/lightclients/mithril/mithril'; -import { - InteractionContext, - WebSocketCloseHandler, - WebSocketErrorHandler, - createInteractionContext, -} from '@cardano-ogmios/client'; -import { LedgerStateQueryClient, createLedgerStateQueryClient } from '@cardano-ogmios/client/dist/LedgerStateQuery'; + import { BlockDto } from '../dtos/block.dto'; -import { connectionConfig } from '@config/kupmios.config'; import { Any } from '@plus/proto-types/build/google/protobuf/any'; import { LucidService } from '@shared/modules/lucid/lucid.service'; import { ConfigService } from '@nestjs/config'; @@ -90,10 +83,8 @@ import { bytesFromBase64 } from '@plus/proto-types/build/helpers'; import { getIdByTokenName } from '@shared/helpers/helper'; import { decodeMintChannelRedeemer, decodeSpendChannelRedeemer } from '../../shared/types/channel/channel-redeemer'; import { - MintConnectionRedeemer, decodeMintConnectionRedeemer, decodeSpendConnectionRedeemer, - encodeMintConnectionRedeemer, } from '../../shared/types/connection/connection-redeemer'; import { decodeIBCModuleRedeemer } from '../../shared/types/port/ibc_module_redeemer'; import { Packet } from '@shared/types/channel/packet'; @@ -107,12 +98,6 @@ import { normalizeMithrilStakeDistribution, normalizeMithrilStakeDistributionCertificate, } from '../../shared/helpers/mithril-header'; -import { convertString2Hex } from '../../shared/helpers/hex'; -import { - blockHeight as queryBlockHeight, - genesisConfiguration, - systemStart as querySystemStart, -} from '../../shared/helpers/ogmios'; @Injectable() export class QueryService { diff --git a/cardano/gateway/src/shared/helpers/block-results.ts b/cardano/gateway/src/shared/helpers/block-results.ts index a31135971..06cf2f52d 100644 --- a/cardano/gateway/src/shared/helpers/block-results.ts +++ b/cardano/gateway/src/shared/helpers/block-results.ts @@ -27,7 +27,7 @@ import { convertHeaderToTendermint } from '../types/header'; import { Header } from '@plus/proto-types/build/ibc/lightclients/tendermint/v1/tendermint'; import { Any } from '@plus/proto-types/build/google/protobuf/any'; -export function normalizeEventConnection(evtType: ConnectionState): string { +function normalizeEventConnection(evtType: ConnectionState): string { switch (evtType) { case ConnectionState.Init: return EVENT_TYPE_CONNECTION.OPEN_INIT; @@ -76,7 +76,7 @@ export function normalizeTxsResultFromConnDatum(connDatum: ConnectionDatum, conn } as unknown as ResponseDeliverTx; } -export function normalizeEventChannel(evtType: ChannelState): string { +function normalizeEventChannel(evtType: ChannelState): string { switch (evtType) { case ChannelState.Init: return EVENT_TYPE_CHANNEL.OPEN_INIT; diff --git a/cardano/gateway/src/shared/helpers/channel.ts b/cardano/gateway/src/shared/helpers/channel.ts index 754009685..6bb99e51b 100644 --- a/cardano/gateway/src/shared/helpers/channel.ts +++ b/cardano/gateway/src/shared/helpers/channel.ts @@ -1,6 +1,6 @@ import { KEY_CHANNEL_END_PREFIX, KEY_CHANNEL_PREFIX, KEY_PORT_PREFIX } from '../../constant'; import { AuthToken } from '../types/auth-token'; -import { convertString2Hex, hashSha3_256, hexToBytes } from './hex'; +import { hashSha3_256, hexToBytes } from './hex'; export function getChannelIdByTokenName(tokenName: string, baseToken: AuthToken, prefix: string): string { const baseTokenPart = hashSha3_256(baseToken.policyId + baseToken.name).slice(0, 40); diff --git a/cardano/gateway/src/shared/helpers/commitment.ts b/cardano/gateway/src/shared/helpers/commitment.ts index de6782b85..d14890756 100644 --- a/cardano/gateway/src/shared/helpers/commitment.ts +++ b/cardano/gateway/src/shared/helpers/commitment.ts @@ -1,6 +1,6 @@ import crypto from 'crypto'; import { Packet } from '../types/channel/packet'; -import { convertHex2String, fromHex, hashSHA256, toHex } from './hex'; +import { fromHex, hashSHA256, toHex } from './hex'; // CommitPacket calculates the packet commitment bytes export function commitPacket(packet: Packet): string { diff --git a/cardano/gateway/src/shared/helpers/mithril-client.ts b/cardano/gateway/src/shared/helpers/mithril-client.ts index 6ffb82674..7936df394 100644 --- a/cardano/gateway/src/shared/helpers/mithril-client.ts +++ b/cardano/gateway/src/shared/helpers/mithril-client.ts @@ -1,6 +1,5 @@ -import { ClientState as ClientStateOuroboros } from '@plus/proto-types/build/ibc/lightclients/ouroboros/ouroboros'; import { MithrilClientState } from '../types/mithril'; -import { convertHex2String, convertString2Hex, fromText } from './hex'; +import { convertHex2String, fromText } from './hex'; import { ClientState as ClientStateMithril } from '@plus/proto-types/build/ibc/lightclients/mithril/mithril'; export function initializeMithrilClientState(clientStateMsg: ClientStateMithril): MithrilClientState { diff --git a/cardano/gateway/src/shared/helpers/mithril-header.ts b/cardano/gateway/src/shared/helpers/mithril-header.ts index c6958a2a6..027430809 100644 --- a/cardano/gateway/src/shared/helpers/mithril-header.ts +++ b/cardano/gateway/src/shared/helpers/mithril-header.ts @@ -7,7 +7,7 @@ import { } from '@plus/proto-types/build/ibc/lightclients/mithril/mithril'; import { getNanoseconds } from './time'; import { doubleToFraction } from './number'; -import { convertHex2String, convertString2Hex, fromHex } from './hex'; +import { convertHex2String } from './hex'; export function normalizeMithrilStakeDistribution( stakeDistribution: any, diff --git a/cardano/gateway/src/shared/helpers/ogmios.ts b/cardano/gateway/src/shared/helpers/ogmios.ts deleted file mode 100644 index 30dab10ed..000000000 --- a/cardano/gateway/src/shared/helpers/ogmios.ts +++ /dev/null @@ -1,88 +0,0 @@ -const ogmiosWsp = async (ogmiosUrl: string, methodname: string, args: unknown) => { - const client = new WebSocket(ogmiosUrl); - await new Promise((res) => { - client.addEventListener('open', () => res(1), { - once: true, - }); - }); - client.send( - JSON.stringify({ - jsonrpc: '2.0', - method: methodname, - params: args, - }), - ); - return client; -}; - -const genesisConfiguration = async (ogmiosUrl: string) => { - const client = await ogmiosWsp(ogmiosUrl, 'queryNetwork/genesisConfiguration', { era: 'shelley' }); - const genesisConfig = await new Promise((res, rej) => { - client.addEventListener( - 'message', - (msg: MessageEvent) => { - try { - const { result } = JSON.parse(msg.data); - res(result); - client.close(); - } catch (e) { - rej(e); - } - }, - { - once: true, - }, - ); - }); - - return genesisConfig; -}; - -const blockHeight = async (ogmiosUrl: string) => { - const client = await ogmiosWsp(ogmiosUrl, 'queryNetwork/blockHeight', {}); - const blockHeightRs = await new Promise((res, rej) => { - client.addEventListener( - 'message', - (msg: MessageEvent) => { - try { - const { result } = JSON.parse(msg.data); - res(result); - client.close(); - } catch (e) { - rej(e); - } - }, - { - once: true, - }, - ); - }); - - return blockHeightRs; -}; - -const systemStart = async (ogmiosUrl: string) => { - const client = await ogmiosWsp(ogmiosUrl, 'queryNetwork/startTime', {}); - const sysStart = await new Promise((res, rej) => { - client.addEventListener( - 'message', - (msg: MessageEvent) => { - try { - const { result } = JSON.parse(msg.data); - res(result); - client.close(); - } catch (e) { - rej(e); - } - }, - { - once: true, - }, - ); - }); - const parsedSystemTime = Date.parse(sysStart); - - return parsedSystemTime; -}; - -export { genesisConfiguration, blockHeight, systemStart }; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/channel/channle-close-init.dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-close-init.dto.ts similarity index 83% rename from cardano/gateway/src/shared/modules/lucid/dtos/channel/channle-close-init.dto.ts rename to cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-close-init.dto.ts index 93b37628a..e0541256a 100644 --- a/cardano/gateway/src/shared/modules/lucid/dtos/channel/channle-close-init.dto.ts +++ b/cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-close-init.dto.ts @@ -5,9 +5,6 @@ export type UnsignedChannelCloseInitDto = { channelUtxo: UTxO; connectionUtxo: UTxO; clientUtxo: UTxO; - spendChannelRefUtxo: UTxO; - spendMockModuleRefUtxo: UTxO; - channelCloseInitRefUtxO: UTxO; mockModuleUtxo: UTxO; channelCloseInitPolicyId: string; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-open-ack.dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-open-ack.dto.ts index 731f0f3e9..a8ad8b5f5 100644 --- a/cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-open-ack.dto.ts +++ b/cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-open-ack.dto.ts @@ -5,8 +5,6 @@ export type UnsignedChannelOpenAckDto = { channelUtxo: UTxO; connectionUtxo: UTxO; clientUtxo: UTxO; - spendChannelRefUtxo: UTxO; - spendTransferModuleRefUtxo: UTxO; transferModuleUtxo: UTxO; encodedSpendChannelRedeemer: string; encodedSpendTransferModuleRedeemer: string; @@ -14,31 +12,8 @@ export type UnsignedChannelOpenAckDto = { encodedUpdatedChannelDatum: string; constructedAddress: string; chanOpenAckPolicyId: PolicyId; - chanOpenAckRefUtxo: UTxO; channelToken: AuthToken; verifyProofPolicyId: PolicyId; - verifyProofRefUTxO: UTxO; - encodedVerifyProofRedeemer: string; -}; - -export type UnsignedOrderedChannelOpenAckDto = { - channelUtxo: UTxO; - connectionUtxo: UTxO; - clientUtxo: UTxO; - spendChannelRefUtxo: UTxO; - spendMockModuleRefUtxo: UTxO; - mockModuleUtxo: UTxO; - encodedSpendChannelRedeemer: string; - encodedSpendMockModuleRedeemer: string; - channelTokenUnit: string; - encodedUpdatedChannelDatum: string; - constructedAddress: string; - chanOpenAckPolicyId: PolicyId; - chanOpenAckRefUtxo: UTxO; - channelToken: AuthToken; - - verifyProofPolicyId: PolicyId; - verifyProofRefUTxO: UTxO; encodedVerifyProofRedeemer: string; }; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-open-confirm.dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-open-confirm.dto.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-open-init.dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-open-init.dto.ts index b2b5157d0..c7b3f5f13 100644 --- a/cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-open-init.dto.ts +++ b/cardano/gateway/src/shared/modules/lucid/dtos/channel/channel-open-init.dto.ts @@ -1,12 +1,10 @@ import { UTxO } from '@lucid-evolution/lucid'; export type UnsignedChannelOpenInitDto = { + constructedAddress: string; handlerUtxo: UTxO; connectionUtxo: UTxO; clientUtxo: UTxO; - spendHandlerRefUtxo: UTxO; - mintChannelRefUtxo: UTxO; - spendTransferModuleRefUtxo: UTxO; transferModuleUtxo: UTxO; encodedSpendTransferModuleRedeemer: string; encodedSpendHandlerRedeemer: string; @@ -15,23 +13,4 @@ export type UnsignedChannelOpenInitDto = { encodedUpdatedHandlerDatum: string; encodedChannelDatum: string; encodedNewTransferModuleDatum?: string; - constructedAddress: string; -}; - -export type UnsignedOrderedChannelOpenInitDto = { - handlerUtxo: UTxO; - connectionUtxo: UTxO; - clientUtxo: UTxO; - spendHandlerRefUtxo: UTxO; - mintChannelRefUtxo: UTxO; - spendMockModuleRefUtxo: UTxO; - mockModuleUtxo: UTxO; - encodedSpendMockModuleRedeemer: string; - encodedSpendHandlerRedeemer: string; - encodedMintChannelRedeemer: string; - channelTokenUnit: string; - encodedUpdatedHandlerDatum: string; - encodedChannelDatum: string; - encodedNewMockModuleDatum?: string; - constructedAddress: string; }; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/channel/index.ts b/cardano/gateway/src/shared/modules/lucid/dtos/channel/index.ts new file mode 100644 index 000000000..cf71850f1 --- /dev/null +++ b/cardano/gateway/src/shared/modules/lucid/dtos/channel/index.ts @@ -0,0 +1,5 @@ +export * from './channel-close-confirm.dto'; +export * from './channel-open-ack.dto'; +export * from './channel-open-init.dto'; +export * from './channel-open-try.dto'; +export * from './channel-close-init.dto'; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/connection/connection-open-ack.dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/connection/connection-open-ack.dto.ts index 62fb834bd..340e6efc1 100644 --- a/cardano/gateway/src/shared/modules/lucid/dtos/connection/connection-open-ack.dto.ts +++ b/cardano/gateway/src/shared/modules/lucid/dtos/connection/connection-open-ack.dto.ts @@ -5,9 +5,6 @@ export type UnsignedConnectionOpenAckDto = { clientUtxo: UTxO; constructedAddress: string; - spendConnectionRefUtxo: UTxO; - verifyProofRefUTxO: UTxO; - connectionTokenUnit: string; encodedSpendConnectionRedeemer: string; encodedUpdatedConnectionDatum: string; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/connection/index.ts b/cardano/gateway/src/shared/modules/lucid/dtos/connection/index.ts new file mode 100644 index 000000000..8aa68c1c8 --- /dev/null +++ b/cardano/gateway/src/shared/modules/lucid/dtos/connection/index.ts @@ -0,0 +1 @@ +export * from './connection-open-ack.dto'; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/index.ts b/cardano/gateway/src/shared/modules/lucid/dtos/index.ts new file mode 100644 index 000000000..3e30204d4 --- /dev/null +++ b/cardano/gateway/src/shared/modules/lucid/dtos/index.ts @@ -0,0 +1,3 @@ +export * from './channel'; +export * from './packet'; +export * from './connection'; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/packet/ack-packet-mint.dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/packet/ack-packet-mint.dto.ts index 7994de949..34b60615a 100644 --- a/cardano/gateway/src/shared/modules/lucid/dtos/packet/ack-packet-mint.dto.ts +++ b/cardano/gateway/src/shared/modules/lucid/dtos/packet/ack-packet-mint.dto.ts @@ -5,10 +5,7 @@ export type UnsignedAckPacketMintDto = { channelUtxo: UTxO; connectionUtxo: UTxO; clientUtxo: UTxO; - spendChannelRefUtxo: UTxO; - spendTransferModuleRefUtxo: UTxO; transferModuleUtxo: UTxO; - mintVoucherRefUtxo: UTxO; encodedSpendChannelRedeemer: string; encodedSpendTransferModuleRedeemer: string; @@ -22,11 +19,9 @@ export type UnsignedAckPacketMintDto = { denomToken: string; constructedAddress: string; - ackPacketRefUTxO: UTxO; ackPacketPolicyId: PolicyId; channelToken: AuthToken; verifyProofPolicyId: PolicyId; - verifyProofRefUTxO: UTxO; encodedVerifyProofRedeemer: string; }; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/packet/ack-packet-succeed.dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/packet/ack-packet-succeed.dto.ts index 830e1e594..b7d1b8709 100644 --- a/cardano/gateway/src/shared/modules/lucid/dtos/packet/ack-packet-succeed.dto.ts +++ b/cardano/gateway/src/shared/modules/lucid/dtos/packet/ack-packet-succeed.dto.ts @@ -5,8 +5,6 @@ export type UnsignedAckPacketSucceedDto = { channelUtxo: UTxO; connectionUtxo: UTxO; clientUtxo: UTxO; - spendChannelRefUtxo: UTxO; - spendTransferModuleRefUtxo: UTxO; transferModuleUtxo: UTxO; encodedSpendChannelRedeemer: string; @@ -15,34 +13,9 @@ export type UnsignedAckPacketSucceedDto = { encodedUpdatedChannelDatum: string; constructedAddress: string; - ackPacketRefUTxO: UTxO; ackPacketPolicyId: PolicyId; channelToken: AuthToken; verifyProofPolicyId: PolicyId; - verifyProofRefUTxO: UTxO; - encodedVerifyProofRedeemer: string; -}; - -export type UnsignedAckPacketSucceedForOrderedChannelDto = { - channelUtxo: UTxO; - connectionUtxo: UTxO; - clientUtxo: UTxO; - spendChannelRefUtxo: UTxO; - spendMockModuleRefUtxo: UTxO; - mockModuleUtxo: UTxO; - - encodedSpendChannelRedeemer: string; - encodedSpendMockModuleRedeemer: string; - channelTokenUnit: string; - encodedUpdatedChannelOrderedDatum: string; - constructedAddress: string; - - ackPacketRefUTxO: UTxO; - ackPacketPolicyId: PolicyId; - channelToken: AuthToken; - - verifyProofPolicyId: PolicyId; - verifyProofRefUTxO: UTxO; encodedVerifyProofRedeemer: string; }; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/packet/ack-packet-unescrow.dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/packet/ack-packet-unescrow.dto.ts index b035d4382..4d5e30e4d 100644 --- a/cardano/gateway/src/shared/modules/lucid/dtos/packet/ack-packet-unescrow.dto.ts +++ b/cardano/gateway/src/shared/modules/lucid/dtos/packet/ack-packet-unescrow.dto.ts @@ -5,8 +5,6 @@ export type UnsignedAckPacketUnescrowDto = { channelUtxo: UTxO; connectionUtxo: UTxO; clientUtxo: UTxO; - spendChannelRefUtxo: UTxO; - spendTransferModuleRefUtxo: UTxO; transferModuleUtxo: UTxO; encodedSpendChannelRedeemer: string; @@ -18,11 +16,9 @@ export type UnsignedAckPacketUnescrowDto = { constructedAddress: string; denomToken: string; - ackPacketRefUTxO: UTxO; ackPacketPolicyId: PolicyId; channelToken: AuthToken; verifyProofPolicyId: PolicyId; - verifyProofRefUTxO: UTxO; encodedVerifyProofRedeemer: string; }; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/packet/index.ts b/cardano/gateway/src/shared/modules/lucid/dtos/packet/index.ts new file mode 100644 index 000000000..404d123c9 --- /dev/null +++ b/cardano/gateway/src/shared/modules/lucid/dtos/packet/index.ts @@ -0,0 +1,10 @@ +export * from './ack-packet-succeed.dto'; +export * from './ack-packet-mint.dto'; +export * from './ack-packet-unescrow.dto'; +export * from './recv-packet-mint.dto'; +export * from './recv-packet-unescrow.dto'; +export * from './send-packet-escrow.dto'; +export * from './send-packet-burn.dto'; +export * from './timeout-refresh-dto'; +export * from './timeout-packet-mint.dto'; +export * from './timeout-packet-unescrow.dto'; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/packet/recv-packet-mint.dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/packet/recv-packet-mint.dto.ts index 46a974ee9..e2ba7bb67 100644 --- a/cardano/gateway/src/shared/modules/lucid/dtos/packet/recv-packet-mint.dto.ts +++ b/cardano/gateway/src/shared/modules/lucid/dtos/packet/recv-packet-mint.dto.ts @@ -5,7 +5,6 @@ export type UnsignedRecvPacketDto = { channelUtxo: UTxO; connectionUtxo: UTxO; clientUtxo: UTxO; - spendChannelRefUtxo: UTxO; encodedSpendChannelRedeemer: string; encodedUpdatedChannelDatum: string; @@ -13,12 +12,10 @@ export type UnsignedRecvPacketDto = { channelTokenUnit: string; constructedAddress: string; - recvPacketRefUTxO: UTxO; recvPacketPolicyId: PolicyId; channelToken: AuthToken; verifyProofPolicyId: PolicyId; - verifyProofRefUTxO: UTxO; encodedVerifyProofRedeemer: string; }; @@ -26,10 +23,7 @@ export type UnsignedRecvPacketMintDto = { channelUtxo: UTxO; connectionUtxo: UTxO; clientUtxo: UTxO; - spendChannelRefUtxo: UTxO; - spendTransferModuleRefUtxo: UTxO; transferModuleUtxo: UTxO; - mintVoucherRefUtxo: UTxO; encodedSpendChannelRedeemer: string; encodedSpendTransferModuleRedeemer: string; @@ -42,40 +36,9 @@ export type UnsignedRecvPacketMintDto = { receiverAddress: string; constructedAddress: string; - recvPacketRefUTxO: UTxO; recvPacketPolicyId: PolicyId; channelToken: AuthToken; verifyProofPolicyId: PolicyId; - verifyProofRefUTxO: UTxO; - encodedVerifyProofRedeemer: string; -}; - -export type UnsignedRecvPacketMintForOrderedChannelDto = { - channelUtxo: UTxO; - connectionUtxo: UTxO; - clientUtxo: UTxO; - spendChannelRefUtxo: UTxO; - spendMockModuleRefUtxo: UTxO; - mockModuleUtxo: UTxO; - mintVoucherRefUtxo: UTxO; - - encodedSpendChannelRedeemer: string; - encodedSpendMockModuleRedeemer: string; - encodedMintVoucherRedeemer: string; - encodedUpdatedChannelDatum: string; - - channelTokenUnit: string; - voucherTokenUnit: string; - transferAmount: bigint; - receiverAddress: string; - constructedAddress: string; - - recvPacketRefUTxO: UTxO; - recvPacketPolicyId: PolicyId; - channelToken: AuthToken; - - verifyProofPolicyId: PolicyId; - verifyProofRefUTxO: UTxO; encodedVerifyProofRedeemer: string; }; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/packet/recv-packet-unescrow.dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/packet/recv-packet-unescrow.dto.ts index 92cb31246..af60b92f4 100644 --- a/cardano/gateway/src/shared/modules/lucid/dtos/packet/recv-packet-unescrow.dto.ts +++ b/cardano/gateway/src/shared/modules/lucid/dtos/packet/recv-packet-unescrow.dto.ts @@ -5,8 +5,6 @@ export type UnsignedRecvPacketUnescrowDto = { channelUtxo: UTxO; connectionUtxo: UTxO; clientUtxo: UTxO; - spendChannelRefUtxo: UTxO; - spendTransferModuleRefUtxo: UTxO; transferModuleUtxo: UTxO; encodedSpendChannelRedeemer: string; @@ -17,11 +15,9 @@ export type UnsignedRecvPacketUnescrowDto = { receiverAddress: string; constructedAddress: string; - recvPacketRefUTxO: UTxO; recvPacketPolicyId: PolicyId; channelToken: AuthToken; verifyProofPolicyId: PolicyId; - verifyProofRefUTxO: UTxO; encodedVerifyProofRedeemer: string; }; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/packet/send-packet-burn.dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/packet/send-packet-burn.dto.ts index d01c2896c..229278c5a 100644 --- a/cardano/gateway/src/shared/modules/lucid/dtos/packet/send-packet-burn.dto.ts +++ b/cardano/gateway/src/shared/modules/lucid/dtos/packet/send-packet-burn.dto.ts @@ -5,10 +5,7 @@ export type UnsignedSendPacketBurnDto = { channelUTxO: UTxO; connectionUTxO: UTxO; clientUTxO: UTxO; - spendChannelRefUTxO: UTxO; - spendTransferModuleUTxO: UTxO; transferModuleUTxO: UTxO; - mintVoucherRefUtxo: UTxO; senderVoucherTokenUtxo: UTxO; encodedSpendChannelRedeemer: string; @@ -26,7 +23,6 @@ export type UnsignedSendPacketBurnDto = { constructedAddress: string; - sendPacketRefUTxO: UTxO; sendPacketPolicyId: PolicyId; channelToken: AuthToken; }; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/packet/send-packet-escrow.dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/packet/send-packet-escrow.dto.ts index aaa0b3628..5bc466514 100644 --- a/cardano/gateway/src/shared/modules/lucid/dtos/packet/send-packet-escrow.dto.ts +++ b/cardano/gateway/src/shared/modules/lucid/dtos/packet/send-packet-escrow.dto.ts @@ -5,8 +5,6 @@ export type UnsignedSendPacketEscrowDto = { channelUTxO: UTxO; connectionUTxO: UTxO; clientUTxO: UTxO; - spendChannelRefUTxO: UTxO; - spendTransferModuleUTxO: UTxO; transferModuleUTxO: UTxO; encodedSpendChannelRedeemer: string; @@ -24,35 +22,6 @@ export type UnsignedSendPacketEscrowDto = { constructedAddress: string; - sendPacketRefUTxO: UTxO; - sendPacketPolicyId: PolicyId; - channelToken: AuthToken; -}; - -export type UnsignedSendPacketEscrowForOrderedChannelDto = { - channelUTxO: UTxO; - connectionUTxO: UTxO; - clientUTxO: UTxO; - spendChannelRefUTxO: UTxO; - spendMockModuleUTxO: UTxO; - mockModuleUTxO: UTxO; - - encodedSpendChannelRedeemer: string; - encodedSpendModuleRedeemer: string; - encodedUpdatedChannelDatum: string; - - transferAmount: bigint; - senderAddress: string; - receiverAddress: string; - - spendChannelAddress: string; - channelTokenUnit: string; - mockModuleAddress: string; - denomToken: string; - - constructedAddress: string; - - sendPacketRefUTxO: UTxO; sendPacketPolicyId: PolicyId; channelToken: AuthToken; }; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/packet/timeout-packet-mint.dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/packet/timeout-packet-mint.dto.ts index 9f65069e2..0eb086b21 100644 --- a/cardano/gateway/src/shared/modules/lucid/dtos/packet/timeout-packet-mint.dto.ts +++ b/cardano/gateway/src/shared/modules/lucid/dtos/packet/timeout-packet-mint.dto.ts @@ -2,9 +2,6 @@ import { UTxO, PolicyId } from '@lucid-evolution/lucid'; import { AuthToken } from '../../../../types/auth-token'; export type UnsignedTimeoutPacketMintDto = { - spendChannelRefUtxo: UTxO; - spendTransferModuleRefUtxo: UTxO; - mintVoucherRefUtxo: UTxO; channelUtxo: UTxO; transferModuleUtxo: UTxO; connectionUtxo: UTxO; @@ -24,11 +21,9 @@ export type UnsignedTimeoutPacketMintDto = { voucherTokenUnit: string; constructedAddress: string; - timeoutPacketRefUTxO: UTxO; timeoutPacketPolicyId: PolicyId; channelToken: AuthToken; - verifyProofRefUTxO: UTxO; verifyProofPolicyId: PolicyId; encodedVerifyProofRedeemer: string; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/packet/timeout-packet-unescrow.dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/packet/timeout-packet-unescrow.dto.ts index 4d0768c00..1d7c816c7 100644 --- a/cardano/gateway/src/shared/modules/lucid/dtos/packet/timeout-packet-unescrow.dto.ts +++ b/cardano/gateway/src/shared/modules/lucid/dtos/packet/timeout-packet-unescrow.dto.ts @@ -2,8 +2,6 @@ import { UTxO, PolicyId } from '@lucid-evolution/lucid'; import { AuthToken } from '../../../../types/auth-token'; export type UnsignedTimeoutPacketUnescrowDto = { - spendChannelRefUtxo: UTxO; - spendTransferModuleUtxo: UTxO; channelUtxo: UTxO; transferModuleUtxo: UTxO; connectionUtxo: UTxO; @@ -22,11 +20,9 @@ export type UnsignedTimeoutPacketUnescrowDto = { denomToken: string; constructedAddress: string; - timeoutPacketRefUTxO: UTxO; timeoutPacketPolicyId: PolicyId; channelToken: AuthToken; - verifyProofRefUTxO: UTxO; verifyProofPolicyId: PolicyId; encodedVerifyProofRedeemer: string; }; diff --git a/cardano/gateway/src/shared/modules/lucid/dtos/packet/timeout-refresh-dto.ts b/cardano/gateway/src/shared/modules/lucid/dtos/packet/timeout-refresh-dto.ts index 0d8bda442..cdb2cc011 100644 --- a/cardano/gateway/src/shared/modules/lucid/dtos/packet/timeout-refresh-dto.ts +++ b/cardano/gateway/src/shared/modules/lucid/dtos/packet/timeout-refresh-dto.ts @@ -2,7 +2,6 @@ import { UTxO } from '@lucid-evolution/lucid'; export type UnsignedTimeoutRefreshDto = { channelUtxo: UTxO; - spendChannelRefUTxO: UTxO; encodedChannelDatum: string; encodedSpendChannelRedeemer: string; diff --git a/cardano/gateway/src/shared/modules/lucid/lucid.provider.ts b/cardano/gateway/src/shared/modules/lucid/lucid.provider.ts index 5fc6a85e0..b15260228 100644 --- a/cardano/gateway/src/shared/modules/lucid/lucid.provider.ts +++ b/cardano/gateway/src/shared/modules/lucid/lucid.provider.ts @@ -1,5 +1,6 @@ import { ConfigService } from '@nestjs/config'; import { querySystemStart } from '../../helpers/time'; +import { Network } from '@lucid-evolution/lucid'; export const LUCID_CLIENT = 'LUCID_CLIENT'; export const LUCID_IMPORTER = 'LUCID_IMPORTER'; @@ -11,10 +12,12 @@ export const LucidClient = { const Lucid = await (eval(`import('@lucid-evolution/lucid')`) as Promise); // Create Lucid provider and instance const provider = new Lucid.Kupmios(configService.get('kupoEndpoint'), configService.get('ogmiosEndpoint')); - const lucid = await Lucid.Lucid(provider, 'Custom'); + const network = configService.get('cardanoNetwork') as Network; + const lucid = await Lucid.Lucid(provider, network); + const chainZeroTime = await querySystemStart(configService.get('ogmiosEndpoint')); - Lucid.SLOT_CONFIG_NETWORK.Custom.zeroTime = chainZeroTime; - Lucid.SLOT_CONFIG_NETWORK.Custom.slotLength = 1000; + Lucid.SLOT_CONFIG_NETWORK[network].zeroTime = chainZeroTime; + Lucid.SLOT_CONFIG_NETWORK[network].slotLength = 1000; // const lucid = await Lucid.Lucid.new( // new Lucid.Blockfrost('https://cardano-preview.blockfrost.io/api/v0', 'preview2fjKEg2Zh687WPUwB8eljT2Mz2q045GC'), // 'Preview', diff --git a/cardano/gateway/src/shared/modules/lucid/lucid.service.ts b/cardano/gateway/src/shared/modules/lucid/lucid.service.ts index 93d416b89..a3082efd3 100644 --- a/cardano/gateway/src/shared/modules/lucid/lucid.service.ts +++ b/cardano/gateway/src/shared/modules/lucid/lucid.service.ts @@ -3,8 +3,6 @@ import { ConfigService } from '@nestjs/config'; import { type LucidEvolution, type UTxO, - type SpendingValidator, - type MintingPolicy, getAddressDetails, credentialToAddress, TxBuilder, @@ -40,35 +38,29 @@ import { decodeMockModuleDatum, encodeMockModuleDatum, } from '@shared/types/apps/mock/mock-module-datum'; -import { - UnsignedSendPacketEscrowDto, - UnsignedSendPacketEscrowForOrderedChannelDto, -} from './dtos/packet/send-packet-escrow.dto'; -import { UnsignedChannelOpenInitDto, UnsignedOrderedChannelOpenInitDto } from './dtos/channel/channel-open-init.dto'; -import { UnsignedChannelOpenAckDto, UnsignedOrderedChannelOpenAckDto } from './dtos/channel/channel-open-ack.dto'; import { calculateTransferToken } from './helpers/send-packet.helper'; -import { UnsignedRecvPacketUnescrowDto } from './dtos/packet/recv-packet-unescrow.dto'; -import { - UnsignedRecvPacketDto, - UnsignedRecvPacketMintDto, - UnsignedRecvPacketMintForOrderedChannelDto, -} from './dtos/packet/recv-packet-mint.dto'; import { MintVoucherRedeemer, encodeMintVoucherRedeemer, } from '@shared/types/apps/transfer/mint_voucher_redeemer/mint-voucher-redeemer'; -import { UnsignedTimeoutPacketMintDto } from './dtos/packet/timeout-packet-mint.dto'; -import { UnsignedTimeoutPacketUnescrowDto } from './dtos/packet/timeout-packet-unescrow.dto'; -import { UnsignedAckPacketUnescrowDto } from './dtos/packet/ack-packet-unescrow.dto'; -import { UnsignedAckPacketMintDto } from './dtos/packet/ack-packet-mint.dto'; -import { UnsignedSendPacketBurnDto } from './dtos/packet/send-packet-burn.dto'; -import { UnsignedTimeoutRefreshDto } from './dtos/packet/timeout-refresh-dto'; import { + UnsignedAckPacketMintDto, UnsignedAckPacketSucceedDto, - UnsignedAckPacketSucceedForOrderedChannelDto, -} from './dtos/packet/ack-packet-succeed.dto'; -import { UnsignedConnectionOpenAckDto } from './dtos/connection/connection-open-ack.dto'; -import { UnsignedChannelCloseInitDto } from './dtos/channel/channle-close-init.dto'; + UnsignedAckPacketUnescrowDto, + UnsignedChannelCloseInitDto, + UnsignedChannelOpenAckDto, + UnsignedChannelOpenInitDto, + UnsignedConnectionOpenAckDto, + UnsignedRecvPacketDto, + UnsignedRecvPacketMintDto, + UnsignedRecvPacketUnescrowDto, + UnsignedSendPacketBurnDto, + UnsignedSendPacketEscrowDto, + UnsignedTimeoutPacketMintDto, + UnsignedTimeoutPacketUnescrowDto, + UnsignedTimeoutRefreshDto, +} from './dtos'; + export type CodecType = | 'client' | 'connection' @@ -84,13 +76,56 @@ export type CodecType = | 'spendChannelRedeemer' | 'iBCModuleRedeemer' | 'mintVoucherRedeemer'; + +type ReferenceScripts = { + spendHandler: UTxO; + spendChannel: UTxO; + mintChannel: UTxO; + mintClient: UTxO; + mintConnection: UTxO; + spendConnection: UTxO; + spendClient: UTxO; + spendMockModule: UTxO; + spendTransferModule: UTxO; + verifyProof: UTxO; + channelOpenAck: UTxO; + channelCloseInit: UTxO; + receivePacket: UTxO; + ackPacket: UTxO; + sendPacket: UTxO; + timeoutPacket: UTxO; + mintVoucher: UTxO; +}; + @Injectable() export class LucidService { + private readonly referenceScripts: ReferenceScripts; constructor( @Inject(LUCID_IMPORTER) public LucidImporter: typeof import('@lucid-evolution/lucid'), @Inject(LUCID_CLIENT) public lucid: LucidEvolution, private configService: ConfigService, - ) {} + ) { + const deploymentConfig = this.configService.get('deployment'); + this.referenceScripts = { + spendHandler: deploymentConfig.validators.spendHandler.refUtxo, + spendConnection: deploymentConfig.validators.spendConnection.refUtxo, + spendChannel: deploymentConfig.validators.spendChannel.refUtxo, + spendClient: deploymentConfig.validators.spendClient.refUtxo, + spendMockModule: deploymentConfig.validators.spendMockModule?.refUtxo, + spendTransferModule: deploymentConfig.validators.spendTransferModule.refUtxo, + mintChannel: deploymentConfig.validators.mintChannel.refUtxo, + mintClient: deploymentConfig.validators.mintClient.refUtxo, + mintConnection: deploymentConfig.validators.mintConnection.refUtxo, + mintVoucher: deploymentConfig.validators.mintVoucher.refUtxo, + verifyProof: deploymentConfig.validators.verifyProof.refUtxo, + channelOpenAck: deploymentConfig.validators.spendChannel.refValidator.chan_open_ack.refUtxo, + channelCloseInit: deploymentConfig.validators.spendChannel.refValidator.chan_close_init.refUtxo, + receivePacket: deploymentConfig.validators.spendChannel.refValidator.recv_packet.refUtxo, + ackPacket: deploymentConfig.validators.spendChannel.refValidator.acknowledge_packet.refUtxo, + sendPacket: deploymentConfig.validators.spendChannel.refValidator.send_packet.refUtxo, + timeoutPacket: deploymentConfig.validators.spendChannel.refValidator.timeout_packet.refUtxo, + }; + } // ========================== Public functions ========================== // ========================== UTXO-related methods ========================== public async findUtxoAtWithUnit(addressOrCredential: string, unit: string): Promise { @@ -172,7 +207,6 @@ export class LucidService { }); } public async decodeDatum(encodedDatum: string, type: CodecType): Promise { - console.log('decodeDatum encodedDatum: ' + type + ': ' + encodedDatum); try { switch (type) { case 'client': @@ -194,7 +228,6 @@ export class LucidService { } // The main encode function public async encode(data: T, type: CodecType): Promise { - console.log('encode data: ' + type + ': ' + this.prettyPrint(data)); try { switch (type) { case 'client': @@ -263,9 +296,9 @@ export class LucidService { ): TxBuilder { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(constructedAddress); - const clientRefUTxO: UTxO = deploymentConfig.validators.spendClient.refUtxo; + tx.collectFrom([currentClientUtxo], encodedSpendClientRedeemer) - .readFrom([clientRefUTxO]) + .readFrom([this.referenceScripts.spendClient]) .pay.ToContract( deploymentConfig.validators.spendClient.address, { kind: 'inline', value: encodedNewClientDatum }, @@ -289,7 +322,7 @@ export class LucidService { const handlerAuthToken = deploymentConfig.handlerAuthToken.policyId + deploymentConfig.handlerAuthToken.name; const tx: TxBuilder = this.txFromWallet(constructedAddress); - tx.readFrom([deploymentConfig.validators.spendHandler.refUtxo, deploymentConfig.validators.mintClient.refUtxo]) + tx.readFrom([this.referenceScripts.spendHandler, this.referenceScripts.mintClient]) .collectFrom([handlerUtxo], encodedHandlerOperator) .mintAssets( { @@ -323,7 +356,7 @@ export class LucidService { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(constructedAddress); - tx.readFrom([deploymentConfig.validators.spendHandler.refUtxo, deploymentConfig.validators.mintConnection.refUtxo]) + tx.readFrom([this.referenceScripts.spendHandler, this.referenceScripts.mintConnection]) .collectFrom([handlerUtxo], encodedSpendHandlerRedeemer) .mintAssets( { @@ -357,7 +390,7 @@ export class LucidService { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(constructedAddress); - tx.readFrom([deploymentConfig.validators.spendHandler.refUtxo, deploymentConfig.validators.mintConnection.refUtxo]) + tx.readFrom([this.referenceScripts.spendHandler, this.referenceScripts.mintConnection]) .collectFrom([handlerUtxo], encodedSpendHandlerRedeemer) .mintAssets( { @@ -382,7 +415,7 @@ export class LucidService { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); - tx.readFrom([deploymentConfig.validators.spendConnection.refUtxo, dto.verifyProofRefUTxO]) + tx.readFrom([this.referenceScripts.spendConnection, this.referenceScripts.verifyProof]) .collectFrom([dto.connectionUtxo], dto.encodedSpendConnectionRedeemer) .readFrom([dto.clientUtxo]) .pay.ToContract( @@ -411,7 +444,7 @@ export class LucidService { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(constructedAddress); - tx.readFrom([deploymentConfig.validators.spendConnection.refUtxo]) + tx.readFrom([this.referenceScripts.spendConnection]) .collectFrom([connectionUtxo], encodedSpendConnectionRedeemer) .readFrom([clientUtxo]) .pay.ToContract( @@ -427,7 +460,11 @@ export class LucidService { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); - tx.readFrom([dto.spendHandlerRefUtxo, dto.mintChannelRefUtxo, dto.spendTransferModuleRefUtxo]) + tx.readFrom([ + this.referenceScripts.spendHandler, + this.referenceScripts.mintChannel, + this.referenceScripts.spendTransferModule, + ]) .collectFrom([dto.handlerUtxo], dto.encodedSpendHandlerRedeemer) .collectFrom([dto.transferModuleUtxo], dto.encodedSpendTransferModuleRedeemer) .mintAssets( @@ -456,41 +493,12 @@ export class LucidService { return tx; } - public createUnsignedOrderedChannelOpenInitTransaction(dto: UnsignedOrderedChannelOpenInitDto): TxBuilder { - const deploymentConfig = this.configService.get('deployment'); - const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); - tx.readFrom([dto.spendHandlerRefUtxo, dto.mintChannelRefUtxo, dto.spendMockModuleRefUtxo]) - .collectFrom([dto.handlerUtxo], dto.encodedSpendHandlerRedeemer) - .collectFrom([dto.mockModuleUtxo], dto.encodedSpendMockModuleRedeemer) - .mintAssets( - { - [dto.channelTokenUnit]: 1n, - }, - dto.encodedMintChannelRedeemer, - ) - .readFrom([dto.connectionUtxo, dto.clientUtxo]); - - const addPayToContract = (address: string, inline: string, token: Record) => { - tx.pay.ToContract(address, { kind: 'inline', value: inline }, token); - }; - addPayToContract(deploymentConfig.validators.spendHandler.address, dto.encodedUpdatedHandlerDatum, { - [this.getHandlerTokenUnit()]: 1n, - }); - addPayToContract(deploymentConfig.validators.spendChannel.address, dto.encodedChannelDatum, { - [dto.channelTokenUnit]: 1n, - }); - addPayToContract(deploymentConfig.modules.mock.address, dto.encodedNewMockModuleDatum, dto.mockModuleUtxo.assets); - return tx; - } public createUnsignedChannelOpenTryTransaction( handlerUtxo: UTxO, connectionUtxo: UTxO, clientUtxo: UTxO, mockModuleUtxo: UTxO, - spendHandlerRefUtxo: UTxO, - mintChannelRefUtxo: UTxO, - spendMockModuleRefUtxo: UTxO, encodedSpendMockModuleRedeemer: string, encodedSpendHandlerRedeemer: string, encodedMintChannelRedeemer: string, @@ -504,7 +512,11 @@ export class LucidService { const tx: TxBuilder = this.txFromWallet(constructedAddress); tx.collectFrom([handlerUtxo], encodedSpendHandlerRedeemer) .collectFrom([mockModuleUtxo], encodedSpendMockModuleRedeemer) - .readFrom([spendHandlerRefUtxo, mintChannelRefUtxo, spendMockModuleRefUtxo]) + .readFrom([ + this.referenceScripts.spendHandler, + this.referenceScripts.mintChannel, + this.referenceScripts.spendMockModule, + ]) .mintAssets( { [channelTokenUnit]: 1n, @@ -531,10 +543,10 @@ export class LucidService { const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); tx.readFrom([ - dto.spendChannelRefUtxo, - dto.spendTransferModuleRefUtxo, - dto.chanOpenAckRefUtxo, - dto.verifyProofRefUTxO, + this.referenceScripts.spendChannel, + this.referenceScripts.spendTransferModule, + this.referenceScripts.channelOpenAck, + this.referenceScripts.verifyProof, ]) .collectFrom([dto.channelUtxo], dto.encodedSpendChannelRedeemer) .collectFrom([dto.transferModuleUtxo], dto.encodedSpendTransferModuleRedeemer) @@ -572,11 +584,16 @@ export class LucidService { return tx; } + public createUnsignedChannelCloseInitTransaction(dto: UnsignedChannelCloseInitDto): TxBuilder { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); - tx.readFrom([dto.spendChannelRefUtxo, dto.spendMockModuleRefUtxo, dto.channelCloseInitRefUtxO]) + tx.readFrom([ + this.referenceScripts.spendChannel, + this.referenceScripts.spendMockModule, + this.referenceScripts.channelCloseInit, + ]) .collectFrom([dto.mockModuleUtxo], dto.encodedSpendMockModuleRedeemer) .collectFrom([dto.channelUtxo], dto.encodedSpendChannelRedeemer) .readFrom([dto.connectionUtxo, dto.clientUtxo]) @@ -606,53 +623,11 @@ export class LucidService { ); return tx; } - public createUnsignedOrderedChannelOpenAckTransaction(dto: UnsignedOrderedChannelOpenAckDto): TxBuilder { - const deploymentConfig = this.configService.get('deployment'); - const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); - - tx.readFrom([dto.spendChannelRefUtxo, dto.spendMockModuleRefUtxo, dto.chanOpenAckRefUtxo, dto.verifyProofRefUTxO]) - .collectFrom([dto.channelUtxo], dto.encodedSpendChannelRedeemer) - .collectFrom([dto.mockModuleUtxo], dto.encodedSpendMockModuleRedeemer) - .readFrom([dto.connectionUtxo, dto.clientUtxo]) - .pay.ToContract( - deploymentConfig.validators.spendChannel.address, - { - kind: 'inline', - value: dto.encodedUpdatedChannelDatum, - }, - { - [dto.channelTokenUnit]: 1n, - }, - ) - .pay.ToContract( - deploymentConfig.modules.mock.address, - { - kind: 'inline', - value: dto.mockModuleUtxo.datum, - }, - dto.mockModuleUtxo.assets, - ) - .mintAssets( - { - [dto.chanOpenAckPolicyId]: 1n, - }, - encodeAuthToken(dto.channelToken, this.LucidImporter), - ) - .mintAssets( - { - [dto.verifyProofPolicyId]: 1n, - }, - dto.encodedVerifyProofRedeemer, - ); - return tx; - } public createUnsignedChannelOpenConfirmTransaction( channelUtxo: UTxO, connectionUtxo: UTxO, clientUtxo: UTxO, - spendChannelRefUtxo: UTxO, - spendMockModuleRefUtxo: UTxO, mockModuleUtxo: UTxO, encodedSpendChannelRedeemer: string, encodedSpendMockModuleRedeemer: string, @@ -664,8 +639,7 @@ export class LucidService { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(constructedAddress); - tx.readFrom([spendChannelRefUtxo, spendMockModuleRefUtxo]) - + tx.readFrom([this.referenceScripts.spendChannel, this.referenceScripts.spendMockModule]) .collectFrom([channelUtxo], encodedSpendChannelRedeemer) .collectFrom([mockModuleUtxo], encodedSpendMockModuleRedeemer) .readFrom([connectionUtxo, clientUtxo]) @@ -690,15 +664,16 @@ export class LucidService { return tx; } + public createUnsignedRecvPacketUnescrowTx(dto: UnsignedRecvPacketUnescrowDto): TxBuilder { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); tx.readFrom([ - dto.spendChannelRefUtxo, - dto.spendTransferModuleRefUtxo, - dto.recvPacketRefUTxO, - dto.verifyProofRefUTxO, + this.referenceScripts.spendChannel, + this.referenceScripts.spendTransferModule, + this.referenceScripts.receivePacket, + this.referenceScripts.verifyProof, ]) .collectFrom([dto.channelUtxo], dto.encodedSpendChannelRedeemer) .collectFrom([dto.transferModuleUtxo], dto.encodedSpendTransferModuleRedeemer) @@ -747,7 +722,11 @@ export class LucidService { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); - tx.readFrom([dto.spendChannelRefUtxo, dto.recvPacketRefUTxO, dto.verifyProofRefUTxO]) + tx.readFrom([ + this.referenceScripts.spendChannel, + this.referenceScripts.receivePacket, + this.referenceScripts.verifyProof, + ]) .collectFrom([dto.channelUtxo], dto.encodedSpendChannelRedeemer) .readFrom([dto.connectionUtxo, dto.clientUtxo]) .pay.ToContract( @@ -781,11 +760,11 @@ export class LucidService { const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); tx.readFrom([ - dto.spendChannelRefUtxo, - dto.spendTransferModuleRefUtxo, - dto.mintVoucherRefUtxo, - dto.recvPacketRefUTxO, - dto.verifyProofRefUTxO, + this.referenceScripts.spendChannel, + this.referenceScripts.spendTransferModule, + this.referenceScripts.mintVoucher, + this.referenceScripts.receivePacket, + this.referenceScripts.verifyProof, ]) .collectFrom([dto.channelUtxo], dto.encodedSpendChannelRedeemer) .collectFrom([dto.transferModuleUtxo], dto.encodedSpendTransferModuleRedeemer) @@ -834,54 +813,17 @@ export class LucidService { return tx; } - public createUnsignedRecvPacketOrderedChannelMintTx(dto: UnsignedRecvPacketMintForOrderedChannelDto): TxBuilder { - const deploymentConfig = this.configService.get('deployment'); - const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); - tx.readFrom([dto.spendChannelRefUtxo, dto.spendMockModuleRefUtxo, dto.recvPacketRefUTxO, dto.verifyProofRefUTxO]) - .collectFrom([dto.channelUtxo], dto.encodedSpendChannelRedeemer) - .collectFrom([dto.mockModuleUtxo], dto.encodedSpendMockModuleRedeemer) - .readFrom([dto.connectionUtxo, dto.clientUtxo]) - .pay.ToContract( - deploymentConfig.validators.spendChannel.address, - { - kind: 'inline', - value: dto.encodedUpdatedChannelDatum, - }, - { - [dto.channelTokenUnit]: 1n, - }, - ) - .pay.ToContract( - deploymentConfig.modules.mock.address, - { - kind: 'inline', - value: dto.mockModuleUtxo.datum, - }, - { - ...dto.mockModuleUtxo.assets, - }, - ) - .mintAssets( - { - [dto.recvPacketPolicyId]: 1n, - }, - encodeAuthToken(dto.channelToken, this.LucidImporter), - ) - .mintAssets( - { - [dto.verifyProofPolicyId]: 1n, - }, - dto.encodedVerifyProofRedeemer, - ); - - return tx; - } public createUnsignedAckPacketSucceedTx(dto: UnsignedAckPacketSucceedDto): TxBuilder { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); - tx.readFrom([dto.spendChannelRefUtxo, dto.spendTransferModuleRefUtxo, dto.ackPacketRefUTxO, dto.verifyProofRefUTxO]) + tx.readFrom([ + this.referenceScripts.spendChannel, + this.referenceScripts.spendTransferModule, + this.referenceScripts.ackPacket, + this.referenceScripts.verifyProof, + ]) .collectFrom([dto.channelUtxo], dto.encodedSpendChannelRedeemer) .collectFrom([dto.transferModuleUtxo], dto.encodedSpendTransferModuleRedeemer) .readFrom([dto.connectionUtxo, dto.clientUtxo]) @@ -920,56 +862,17 @@ export class LucidService { return tx; } - public createUnsignedAckPacketSucceedTxForOrderedChannel( - dto: UnsignedAckPacketSucceedForOrderedChannelDto, - ): TxBuilder { - const deploymentConfig = this.configService.get('deployment'); - const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); - tx.readFrom([dto.spendChannelRefUtxo, dto.spendMockModuleRefUtxo, dto.ackPacketRefUTxO, dto.verifyProofRefUTxO]) - .collectFrom([dto.channelUtxo], dto.encodedSpendChannelRedeemer) - .collectFrom([dto.mockModuleUtxo], dto.encodedSpendMockModuleRedeemer) - .readFrom([dto.connectionUtxo, dto.clientUtxo]) - .pay.ToContract( - deploymentConfig.validators.spendChannel.address, - { - kind: 'inline', - value: dto.encodedUpdatedChannelOrderedDatum, - }, - { - [dto.channelTokenUnit]: 1n, - }, - ) - .pay.ToContract( - deploymentConfig.modules.mock.address, - { - kind: 'inline', - value: dto.mockModuleUtxo.datum, - }, - { - ...dto.mockModuleUtxo.assets, - }, - ) - .mintAssets( - { - [dto.ackPacketPolicyId]: 1n, - }, - encodeAuthToken(dto.channelToken, this.LucidImporter), - ) - .mintAssets( - { - [dto.verifyProofPolicyId]: 1n, - }, - dto.encodedVerifyProofRedeemer, - ); - - return tx; - } public createUnsignedAckPacketUnescrowTx(dto: UnsignedAckPacketUnescrowDto): TxBuilder { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); - tx.readFrom([dto.spendChannelRefUtxo, dto.spendTransferModuleRefUtxo, dto.ackPacketRefUTxO, dto.verifyProofRefUTxO]) + tx.readFrom([ + this.referenceScripts.spendChannel, + this.referenceScripts.spendTransferModule, + this.referenceScripts.ackPacket, + this.referenceScripts.verifyProof, + ]) .collectFrom([dto.channelUtxo], dto.encodedSpendChannelRedeemer) .collectFrom([dto.transferModuleUtxo], dto.encodedSpendTransferModuleRedeemer) .readFrom([dto.connectionUtxo, dto.clientUtxo]) @@ -1016,16 +919,17 @@ export class LucidService { return tx; } + public createUnsignedAckPacketMintTx(dto: UnsignedAckPacketMintDto): TxBuilder { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); tx.readFrom([ - dto.spendChannelRefUtxo, - dto.spendTransferModuleRefUtxo, - dto.mintVoucherRefUtxo, - dto.ackPacketRefUTxO, - dto.verifyProofRefUTxO, + this.referenceScripts.spendChannel, + this.referenceScripts.spendTransferModule, + this.referenceScripts.mintVoucher, + this.referenceScripts.ackPacket, + this.referenceScripts.verifyProof, ]) .collectFrom([dto.channelUtxo], dto.encodedSpendChannelRedeemer) .collectFrom([dto.transferModuleUtxo], dto.encodedSpendTransferModuleRedeemer) @@ -1082,7 +986,11 @@ export class LucidService { public createUnsignedSendPacketEscrowTx(dto: UnsignedSendPacketEscrowDto): TxBuilder { const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); - tx.readFrom([dto.spendChannelRefUTxO, dto.spendTransferModuleUTxO, dto.sendPacketRefUTxO]) + tx.readFrom([ + this.referenceScripts.spendChannel, + this.referenceScripts.spendTransferModule, + this.referenceScripts.sendPacket, + ]) .collectFrom([dto.channelUTxO], dto.encodedSpendChannelRedeemer) .collectFrom([dto.transferModuleUTxO], dto.encodedSpendTransferModuleRedeemer) .readFrom([dto.connectionUTxO, dto.clientUTxO]) @@ -1121,47 +1029,16 @@ export class LucidService { return tx; } - public createUnsignedSendPacketEscrowTxForOrderedChannel( - dto: UnsignedSendPacketEscrowForOrderedChannelDto, - ): TxBuilder { - const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); - tx.readFrom([dto.spendChannelRefUTxO, dto.spendMockModuleUTxO, dto.sendPacketRefUTxO]) - .collectFrom([dto.channelUTxO], dto.encodedSpendChannelRedeemer) - .collectFrom([dto.mockModuleUTxO], dto.encodedSpendModuleRedeemer) - .readFrom([dto.connectionUTxO, dto.clientUTxO]) - .pay.ToContract( - dto.spendChannelAddress, - { - kind: 'inline', - value: dto.encodedUpdatedChannelDatum, - }, - { - [dto.channelTokenUnit]: 1n, - }, - ) - .pay.ToContract( - dto.mockModuleAddress, - { - kind: 'inline', - value: dto.mockModuleUTxO.datum, - }, - dto.mockModuleUTxO.assets, - ) - .mintAssets( - { - [dto.sendPacketPolicyId]: 1n, - }, - encodeAuthToken(dto.channelToken, this.LucidImporter), - ); - - return tx; - } - public createUnsignedSendPacketBurnTx(dto: UnsignedSendPacketBurnDto): TxBuilder { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); - tx.readFrom([dto.spendChannelRefUTxO, dto.spendTransferModuleUTxO, dto.mintVoucherRefUtxo, dto.sendPacketRefUTxO]) + tx.readFrom([ + this.referenceScripts.spendChannel, + this.referenceScripts.spendTransferModule, + this.referenceScripts.mintVoucher, + this.referenceScripts.sendPacket, + ]) .collectFrom([dto.channelUTxO], dto.encodedSpendChannelRedeemer) .collectFrom([dto.transferModuleUTxO], dto.encodedSpendTransferModuleRedeemer) .collectFrom([dto.senderVoucherTokenUtxo]) @@ -1210,11 +1087,11 @@ export class LucidService { public createUnsignedTimeoutPacketMintTx(dto: UnsignedTimeoutPacketMintDto): TxBuilder { const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); tx.readFrom([ - dto.spendChannelRefUtxo, - dto.spendTransferModuleRefUtxo, - dto.mintVoucherRefUtxo, - dto.timeoutPacketRefUTxO, - dto.verifyProofRefUTxO, + this.referenceScripts.spendChannel, + this.referenceScripts.spendTransferModule, + this.referenceScripts.mintVoucher, + this.referenceScripts.timeoutPacket, + this.referenceScripts.verifyProof, ]) .collectFrom([dto.channelUtxo], dto.encodedSpendChannelRedeemer) .collectFrom([dto.transferModuleUtxo], dto.encodedSpendTransferModuleRedeemer) @@ -1264,13 +1141,14 @@ export class LucidService { return tx; } + public createUnsignedTimeoutPacketUnescrowTx(dto: UnsignedTimeoutPacketUnescrowDto): TxBuilder { const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); tx.readFrom([ - dto.spendChannelRefUtxo, - dto.spendTransferModuleUtxo, - dto.timeoutPacketRefUTxO, - dto.verifyProofRefUTxO, + this.referenceScripts.spendChannel, + this.referenceScripts.spendTransferModule, + this.referenceScripts.timeoutPacket, + this.referenceScripts.verifyProof, ]) .collectFrom([dto.channelUtxo], dto.encodedSpendChannelRedeemer) .collectFrom([dto.transferModuleUtxo], dto.encodedSpendTransferModuleRedeemer) @@ -1318,11 +1196,12 @@ export class LucidService { return tx; } - createUnsignedTimeoutRefreshTx(dto: UnsignedTimeoutRefreshDto): TxBuilder { + + public createUnsignedTimeoutRefreshTx(dto: UnsignedTimeoutRefreshDto): TxBuilder { const deploymentConfig = this.configService.get('deployment'); const tx: TxBuilder = this.txFromWallet(dto.constructedAddress); - tx.readFrom([dto.spendChannelRefUTxO]) + tx.readFrom([this.referenceScripts.spendChannel]) .collectFrom([dto.channelUtxo], dto.encodedSpendChannelRedeemer) .pay.ToContract( deploymentConfig.validators.spendChannel.address, @@ -1337,7 +1216,6 @@ export class LucidService { return tx; } - // ========================== private functions ========================== private getMintConnectionScriptHash(): string { return this.configService.get('deployment').validators.mintConnection.scriptHash; @@ -1371,8 +1249,7 @@ export class LucidService { } */ - const seed = - 'direct language gravity into finger nurse rug rug spoon toddler music ability brisk wasp sound ball join guard pattern smooth lemon obscure raise royal'; + const seed = this.configService.get('signerWalletSeed'); this.lucid.selectWallet.fromSeed(seed, { addressType: 'Enterprise' }); // this.lucid.selectWallet.fromAddress(signer, []); return this.lucid.newTx(); @@ -1382,39 +1259,4 @@ export class LucidService { } return this.lucid.newTx(); } - - private prettyPrint(obj: any, indent = 2): string { - const seen = new WeakSet(); - - function replacer(key: string, value: any): any { - // Handle circular references - if (typeof value === 'object' && value !== null) { - if (seen.has(value)) { - return '[Circular Reference]'; - } - seen.add(value); - } - - // Handle Map objects - if (value instanceof Map) { - const mapEntries: Record = {}; - value.forEach((v, k) => { - mapEntries[String(k)] = v; - }); - return { __type: 'Map', entries: mapEntries }; - } - - // Handle BigInt values - if (typeof value === 'bigint') { - return { __type: 'BigInt', value: value.toString() }; - } - - // Handle other special types as needed - // ... - - return value; - } - - return JSON.stringify(obj, replacer, indent); - } } diff --git a/cardano/gateway/src/shared/types/header.ts b/cardano/gateway/src/shared/types/header.ts index c2de5132d..a6f83339d 100644 --- a/cardano/gateway/src/shared/types/header.ts +++ b/cardano/gateway/src/shared/types/header.ts @@ -478,7 +478,6 @@ function verifyAdjacent( maxClockDrift: bigint, trustedLevel: Rational, ): boolean { - console.log('verifyAdjacent'); if (untrustedHeader.header.height !== trustedHeader.header.height + 1n) { throw new GrpcInvalidArgumentException('headers must be adjacent in height'); } diff --git a/cardano/gateway/src/shared/types/misbehaviour/misbehaviour.ts b/cardano/gateway/src/shared/types/misbehaviour/misbehaviour.ts index 5f607bd79..8cdbcfccd 100644 --- a/cardano/gateway/src/shared/types/misbehaviour/misbehaviour.ts +++ b/cardano/gateway/src/shared/types/misbehaviour/misbehaviour.ts @@ -1,8 +1,5 @@ import { GrpcInvalidArgumentException } from '~@/exception/grpc_exceptions'; -import { - Misbehaviour as MisbehaviourMsg, - Header as HeaderMsg, -} from '@plus/proto-types/build/ibc/lightclients/tendermint/v1/tendermint'; +import { Misbehaviour as MisbehaviourMsg } from '@plus/proto-types/build/ibc/lightclients/tendermint/v1/tendermint'; import { ClientDatum } from '../client-datum'; import { Header, checkTrustedHeader, decodeHeader, initializeHeader } from '../header'; diff --git a/cardano/gateway/src/tx/channel.service.ts b/cardano/gateway/src/tx/channel.service.ts index d699b3f1d..14d2c0e1c 100644 --- a/cardano/gateway/src/tx/channel.service.ts +++ b/cardano/gateway/src/tx/channel.service.ts @@ -1,4 +1,4 @@ -import { fromHex, TxBuilder, unixTimeToSlot, UTxO } from '@lucid-evolution/lucid'; +import { fromHex, TxBuilder, UTxO } from '@lucid-evolution/lucid'; import { Inject, Injectable, Logger } from '@nestjs/common'; import { LucidService } from 'src/shared/modules/lucid/lucid.service'; @@ -16,11 +16,6 @@ import { MsgChannelOpenTry, MsgChannelOpenTryResponse, } from '@plus/proto-types/build/ibc/core/channel/v1/tx'; -import { ChannelOpenInitOperator } from './dto/channel/channel-open-init-operator.dto'; -import { ChannelOpenConfirmOperator } from './dto/channel/channel-open-confirm-operator.dto'; -import { ChannelOpenAckOperator } from './dto/channel/channel-open-ack-operator.dto'; -import { ChannelOpenTryOperator } from './dto/channel/channel-open-try-operator.dto'; -import { ChannelCloseInitOperator } from './dto/channel/channel-close-init-operator.dto'; import { HandlerDatum } from 'src/shared/types/handler-datum'; import { parseClientSequence, parseConnectionSequence } from 'src/shared/helpers/sequence'; import { ConnectionDatum } from 'src/shared/types/connection/connection-datum'; @@ -36,15 +31,6 @@ import { MockModuleDatum } from '@shared/types/apps/mock/mock-module-datum'; import { insertSortMap } from '../shared/helpers/helper'; import { convertHex2String, convertString2Hex, toHex } from '@shared/helpers/hex'; import { ClientDatum } from '@shared/types/client-datum'; -import { - UnsignedChannelOpenInitDto, - UnsignedOrderedChannelOpenInitDto, -} from '@shared/modules/lucid/dtos/channel/channel-open-init.dto'; -import { - UnsignedChannelOpenAckDto, - UnsignedOrderedChannelOpenAckDto, -} from '@shared/modules/lucid/dtos/channel/channel-open-ack.dto'; -import { UnsignedChannelCloseInitDto } from '@shared/modules/lucid/dtos/channel/channle-close-init.dto'; import { isValidProofHeight } from './helper/height.validate'; import { validateAndFormatChannelOpenAckParams, @@ -62,8 +48,21 @@ import { orderFromJSON, } from '@plus/proto-types/build/ibc/core/channel/v1/channel'; import { ORDER_MAPPING_CHANNEL } from '~@/constant/channel'; -import { Order } from '~@/shared/types/channel/order'; import { sleep } from '../shared/helpers/time'; +import { + ChannelCloseInitOperator, + ChannelOpenAckOperator, + ChannelOpenConfirmOperator, + ChannelOpenInitOperator, + ChannelOpenTryOperator, +} from './dto'; +import { + UnsignedChannelCloseInitDto, + UnsignedChannelOpenAckDto, + UnsignedChannelOpenInitDto, +} from '~@/shared/modules/lucid/dtos'; + +const FIVE_MINUTES = 5 * 60 * 1000; @Injectable() export class ChannelService { @@ -76,14 +75,15 @@ export class ChannelService { async channelOpenInit(data: MsgChannelOpenInit): Promise { try { this.logger.log('Channel Open Init is processing'); + console.dir(data); const { channelOpenInitOperator, constructedAddress } = validateAndFormatChannelOpenInitParams(data); // Build and complete the unsigned transaction const { unsignedTx: unsignedChannelOpenInitTx, channelId } = await this.buildUnsignedChannelOpenInitTx( channelOpenInitOperator, constructedAddress, ); - const validToTime = Date.now() + 3 * 1e5; - const validToSlot = unixTimeToSlot(this.lucidService.lucid.config().network, Number(validToTime)); + const validToTime = Date.now() + FIVE_MINUTES; + const validToSlot = this.lucidService.lucid.unixTimeToSlot(Number(validToTime)); const currentSlot = this.lucidService.lucid.currentSlot(); if (currentSlot > validToSlot) { throw new GrpcInternalException('channel init failed: tx time invalid'); @@ -94,8 +94,7 @@ export class ChannelService { const signedChannelOpenInitTxCompleted = await (await unsignedChannelOpenInitTxValidTo.complete()).sign .withWallet() .complete(); - // unsignedChannelOpenInitTxCompleted.txComplete.to_js_value() - // console.log('channelOpenInit: ', unsignedChannelOpenInitTxCompleted.txComplete.to_json()); + this.logger.log(signedChannelOpenInitTxCompleted.toHash(), 'channel open init - unsignedTX - hash'); const response: MsgChannelOpenInitResponse = { channel_id: channelId, @@ -116,7 +115,7 @@ export class ChannelService { } } } - /* istanbul ignore next */ + async channelOpenTry(data: MsgChannelOpenTry): Promise { try { this.logger.log('Channel Open Try is processing'); @@ -126,7 +125,7 @@ export class ChannelService { channelOpenTryOperator, constructedAddress, ); - const unsignedChannelOpenTryTxValidTo: TxBuilder = unsignedChannelOpenTryTx.validTo(Date.now() + 300 * 1e3); + const unsignedChannelOpenTryTxValidTo: TxBuilder = unsignedChannelOpenTryTx.validTo(Date.now() + FIVE_MINUTES); // TODO: signing should be done by the relayer in the future const signedChannelOpenTryTxCompleted = await (await unsignedChannelOpenTryTxValidTo.complete()).sign .withWallet() @@ -150,21 +149,25 @@ export class ChannelService { } } } + async channelOpenAck(data: MsgChannelOpenAck): Promise { try { this.logger.log('Channel Open Ack is processing'); + console.dir(data); const { constructedAddress, channelOpenAckOperator } = validateAndFormatChannelOpenAckParams(data); // Build and complete the unsigned transaction const unsignedChannelOpenAckTx: TxBuilder = await this.buildUnsignedChannelOpenAckTx( channelOpenAckOperator, constructedAddress, ); - const validToTime = Date.now() + 3 * 1e5; - const validToSlot = unixTimeToSlot(this.lucidService.lucid.config().network, Number(validToTime)); + const validToTime = Date.now() + FIVE_MINUTES; + const validToSlot = this.lucidService.lucid.unixTimeToSlot(Number(validToTime)); const currentSlot = this.lucidService.lucid.currentSlot(); if (currentSlot > validToSlot) { throw new GrpcInternalException('channel init failed: tx time invalid'); } + + this.logger.log('validToTime: ', validToTime, 'validToSlot: ', validToSlot, 'currentSlot: ', currentSlot); const unsignedChannelOpenAckTxValidTo: TxBuilder = unsignedChannelOpenAckTx.validTo(validToTime); // TODO: signing should be done by the relayer in the future @@ -228,13 +231,6 @@ export class ChannelService { } async channelCloseInit(data: MsgChannelCloseInit): Promise { - console.log('dataMsgChannelCloseInit'); - console.dir( - { - ...data, - }, - { depth: 10 }, - ); try { this.logger.log('Channel Close Init is processing'); const { constructedAddress, channelCloseInitOperator } = validateAndFormatChannelCloseInitParams(data); @@ -336,6 +332,9 @@ export class ChannelService { port: convertString2Hex(channelOpenInitOperator.port_id), token: channelToken, }; + + console.dir(channelDatum); + const encodedMintChannelRedeemer: string = await this.lucidService.encode( mintChannelRedeemer, 'mintChannelRedeemer', @@ -345,102 +344,37 @@ export class ChannelService { 'handler', ); const encodedChannelDatum: string = await this.lucidService.encode(channelDatum, 'channel'); - const spendHandlerRefUtxo = this.configService.get('deployment').validators.spendHandler.refUtxo; - const mintChannelRefUtxo = this.configService.get('deployment').validators.mintChannel.refUtxo; - - switch (channelOpenInitOperator.ordering) { - case Order.Unordered: - const spendTransferModuleRefUtxo = this.configService.get('deployment').validators.spendTransferModule.refUtxo; - const transferModuleIdentifier = this.configService.get('deployment').modules.transfer.identifier; - const transferModuleUtxo = await this.lucidService.findUtxoByUnit(transferModuleIdentifier); - const spendTransferModuleRedeemer: IBCModuleRedeemer = { - Callback: [ - { - OnChanOpenInit: { - channel_id: channelId, - }, - }, - ], - }; - const encodedSpendTransferModuleRedeemer: string = await this.lucidService.encode( - spendTransferModuleRedeemer, - 'iBCModuleRedeemer', - ); - const unsignedChannelOpenInitParams: UnsignedChannelOpenInitDto = { - handlerUtxo, - connectionUtxo, - clientUtxo, - spendHandlerRefUtxo, - mintChannelRefUtxo, - spendTransferModuleRefUtxo, - transferModuleUtxo, - encodedSpendTransferModuleRedeemer, - encodedSpendHandlerRedeemer, - encodedMintChannelRedeemer, - channelTokenUnit, - encodedUpdatedHandlerDatum, - encodedChannelDatum, - constructedAddress, - }; - const unsignedUnorderedChannelTx = - this.lucidService.createUnsignedChannelOpenInitTransaction(unsignedChannelOpenInitParams); - return { unsignedTx: unsignedUnorderedChannelTx, channelId: channelId.toString() }; - case Order.Ordered: - const spendMockModuleRefUtxo = this.configService.get('deployment').validators.spendMockModule.refUtxo; - const mockModuleIdentifier = this.configService.get('deployment').modules.mock.identifier; - const mockModuleUtxo = await this.lucidService.findUtxoByUnit(mockModuleIdentifier); - - const spendMockModuleRedeemer: IBCModuleRedeemer = { - Callback: [ - { - OnChanOpenInit: { - channel_id: channelId, - }, - }, - ], - }; - const encodedSpendMockModuleRedeemer: string = await this.lucidService.encode( - spendMockModuleRedeemer, - 'iBCModuleRedeemer', - ); - - const currentMockModuleDatum = await this.lucidService.decodeDatum( - mockModuleUtxo.datum!, - 'mockModule', - ); - - const newMockModuleDatum: MockModuleDatum = { - ...currentMockModuleDatum, - }; - - const encodedNewMockModuleDatum: string = await this.lucidService.encode( - newMockModuleDatum, - 'mockModule', - ); - - const unsignedOrderedChannelOpenInitParams: UnsignedOrderedChannelOpenInitDto = { - handlerUtxo, - connectionUtxo, - clientUtxo, - spendHandlerRefUtxo, - mintChannelRefUtxo, - spendMockModuleRefUtxo, - mockModuleUtxo, - encodedSpendMockModuleRedeemer, - encodedSpendHandlerRedeemer, - encodedMintChannelRedeemer, - channelTokenUnit, - encodedUpdatedHandlerDatum, - encodedChannelDatum, - encodedNewMockModuleDatum, - constructedAddress, - }; - const unsignedOrderedChannelTx = this.lucidService.createUnsignedOrderedChannelOpenInitTransaction( - unsignedOrderedChannelOpenInitParams, - ); - - return { unsignedTx: unsignedOrderedChannelTx, channelId: channelId.toString() }; - } + const transferModuleIdentifier = this.configService.get('deployment').modules.transfer.identifier; + const transferModuleUtxo = await this.lucidService.findUtxoByUnit(transferModuleIdentifier); + const spendTransferModuleRedeemer: IBCModuleRedeemer = { + Callback: [ + { + OnChanOpenInit: { + channel_id: channelId, + }, + }, + ], + }; + const encodedSpendTransferModuleRedeemer: string = await this.lucidService.encode( + spendTransferModuleRedeemer, + 'iBCModuleRedeemer', + ); + const unsignedChannelOpenInitParams: UnsignedChannelOpenInitDto = { + constructedAddress, + channelTokenUnit, + handlerUtxo, + connectionUtxo, + clientUtxo, + transferModuleUtxo, + encodedSpendTransferModuleRedeemer, + encodedSpendHandlerRedeemer, + encodedMintChannelRedeemer, + encodedUpdatedHandlerDatum, + encodedChannelDatum, + }; + const unsignedUnorderedChannelTx = + this.lucidService.createUnsignedChannelOpenInitTransaction(unsignedChannelOpenInitParams); + return { unsignedTx: unsignedUnorderedChannelTx, channelId: channelId.toString() }; } /* istanbul ignore next */ async buildUnsignedChannelOpenTryTx( @@ -524,9 +458,6 @@ export class ChannelService { 'handler', ); const encodedChannelDatum: string = await this.lucidService.encode(channelDatum, 'channel'); - const spendHandlerRefUtxo = this.configService.get('deployment').validators.spendHandler.refUtxo; - const mintChannelRefUtxo = this.configService.get('deployment').validators.mintChannel.refUtxo; - const spendMockModuleRefUtxo = this.configService.get('deployment').validators.spendMockModule.refUtxo; const mockModuleIdentifier = this.configService.get('deployment').modules.mock.identifier; // Get mock module utxo const mockModuleUtxo = await this.lucidService.findUtxoByUnit(mockModuleIdentifier); @@ -564,9 +495,6 @@ export class ChannelService { connectionUtxo, clientUtxo, mockModuleUtxo, - spendHandlerRefUtxo, - mintChannelRefUtxo, - spendMockModuleRefUtxo, encodedSpendMockModuleRedeemer, encodedSpendHandlerRedeemer, encodedMintChannelRedeemer, @@ -645,21 +573,16 @@ export class ChannelService { updatedChannelDatum, 'channel', ); - const spendChannelRefUtxo = this.configService.get('deployment').validators.spendChannel.refUtxo; - const channelId = convertString2Hex(CHANNEL_ID_PREFIX + '-' + channelOpenAckOperator.channelSequence); + const channelId = convertString2Hex(CHANNEL_ID_PREFIX + '-' + channelOpenAckOperator.channelSequence); const chanOpenAckPolicyId = this.configService.get('deployment').validators.spendChannel.refValidator.chan_open_ack.scriptHash; - const chanOpenAckRefUtxo = - this.configService.get('deployment').validators.spendChannel.refValidator.chan_open_ack.refUtxo; - const channelToken = { policyId: mintChannelPolicyId, name: channelTokenName, }; - const verifyProofRefUTxO = this.configService.get('deployment').validators.verifyProof.refUtxo; const verifyProofPolicyId = this.configService.get('deployment').validators.verifyProof.scriptHash; const [_, consensusState] = [...clientDatum.state.consensusStates.entries()].find( ([key]) => key.revisionHeight === channelOpenAckOperator.proofHeight.revisionHeight, @@ -704,85 +627,38 @@ export class ChannelService { this.lucidService.LucidImporter, ); - switch (channelDatum.state.channel.ordering) { - case Order.Unordered: - const spendTransferModuleRefUtxo = this.configService.get('deployment').validators.spendTransferModule.refUtxo; - const transferModuleIdentifier = this.configService.get('deployment').modules.transfer.identifier; - const transferModuleUtxo = await this.lucidService.findUtxoByUnit(transferModuleIdentifier); + const transferModuleIdentifier = this.configService.get('deployment').modules.transfer.identifier; + const transferModuleUtxo = await this.lucidService.findUtxoByUnit(transferModuleIdentifier); - const spendTransferModuleRedeemer: IBCModuleRedeemer = { - Callback: [ - { - OnChanOpenAck: { - channel_id: channelId, - }, - }, - ], - }; - const encodedSpendTransferModuleRedeemer: string = await this.lucidService.encode( - spendTransferModuleRedeemer, - 'iBCModuleRedeemer', - ); - const unsignedChannelOpenAckParams: UnsignedChannelOpenAckDto = { - channelUtxo, - connectionUtxo, - clientUtxo, - spendChannelRefUtxo, - spendTransferModuleRefUtxo, - transferModuleUtxo, - encodedSpendChannelRedeemer, - encodedSpendTransferModuleRedeemer, - channelTokenUnit, - encodedUpdatedChannelDatum, - constructedAddress, - chanOpenAckPolicyId, - chanOpenAckRefUtxo, - channelToken, - verifyProofPolicyId, - verifyProofRefUTxO, - encodedVerifyProofRedeemer, - }; - return this.lucidService.createUnsignedChannelOpenAckTransaction(unsignedChannelOpenAckParams); - case Order.Ordered: - const spendMockModuleRefUtxo = this.configService.get('deployment').validators.spendMockModule.refUtxo; - const mockModuleIdentifier = this.configService.get('deployment').modules.mock.identifier; - const mockModuleUtxo = await this.lucidService.findUtxoByUnit(mockModuleIdentifier); - - const spendMockModuleRedeemer: IBCModuleRedeemer = { - Callback: [ - { - OnChanOpenAck: { - channel_id: channelId, - }, - }, - ], - }; - - const encodedSpendMockModuleRedeemer: string = await this.lucidService.encode( - spendMockModuleRedeemer, - 'iBCModuleRedeemer', - ); - const unsignedOrderedChannelOpenAckParams: UnsignedOrderedChannelOpenAckDto = { - channelUtxo, - connectionUtxo, - clientUtxo, - spendChannelRefUtxo, - spendMockModuleRefUtxo, - mockModuleUtxo, - encodedSpendChannelRedeemer, - encodedSpendMockModuleRedeemer, - channelTokenUnit, - encodedUpdatedChannelDatum, - constructedAddress, - chanOpenAckPolicyId, - chanOpenAckRefUtxo, - channelToken, - verifyProofPolicyId, - verifyProofRefUTxO, - encodedVerifyProofRedeemer, - }; - return this.lucidService.createUnsignedOrderedChannelOpenAckTransaction(unsignedOrderedChannelOpenAckParams); - } + const spendTransferModuleRedeemer: IBCModuleRedeemer = { + Callback: [ + { + OnChanOpenAck: { + channel_id: channelId, + }, + }, + ], + }; + const encodedSpendTransferModuleRedeemer: string = await this.lucidService.encode( + spendTransferModuleRedeemer, + 'iBCModuleRedeemer', + ); + const unsignedChannelOpenAckParams: UnsignedChannelOpenAckDto = { + channelUtxo, + connectionUtxo, + clientUtxo, + transferModuleUtxo, + encodedSpendChannelRedeemer, + encodedSpendTransferModuleRedeemer, + channelTokenUnit, + encodedUpdatedChannelDatum, + constructedAddress, + chanOpenAckPolicyId, + channelToken, + verifyProofPolicyId, + encodedVerifyProofRedeemer, + }; + return this.lucidService.createUnsignedChannelOpenAckTransaction(unsignedChannelOpenAckParams); } /* istanbul ignore next */ async buildUnsignedChannelOpenConfirmTx( @@ -840,8 +716,6 @@ export class ChannelService { updatedChannelDatum, 'channel', ); - const spendChannelRefUtxo = this.configService.get('deployment').validators.spendChannel.refUtxo; - const spendMockModuleRefUtxo = this.configService.get('deployment').validators.spendMockModule.refUtxo; const mockModuleIdentifier = this.configService.get('deployment').modules.mock.identifier; const mockModuleUtxo = await this.lucidService.findUtxoByUnit(mockModuleIdentifier); @@ -873,8 +747,6 @@ export class ChannelService { channelUtxo, connectionUtxo, clientUtxo, - spendChannelRefUtxo, - spendMockModuleRefUtxo, mockModuleUtxo, encodedSpendChannelRedeemer, encodedSpendMockModuleRedeemer, @@ -944,10 +816,6 @@ export class ChannelService { const deploymentConfig = this.configService.get('deployment'); const channelCloseInitPolicyId = deploymentConfig.validators.spendChannel.refValidator.chan_close_init.scriptHash; - const channelCloseInitRefUtxO = deploymentConfig.validators.spendChannel.refValidator.chan_close_init.refUtxo; - - const spendChannelRefUtxo = deploymentConfig.validators.spendChannel.refUtxo; - const spendMockModuleRefUtxo = deploymentConfig.validators.spendMockModule.refUtxo; const mockModuleIdentifier = deploymentConfig.modules.mock.identifier; const mockModuleUtxo = await this.lucidService.findUtxoByUnit(mockModuleIdentifier); @@ -977,9 +845,6 @@ export class ChannelService { channelUtxo, connectionUtxo, clientUtxo, - spendChannelRefUtxo, - spendMockModuleRefUtxo, - channelCloseInitRefUtxO, mockModuleUtxo, channelCloseInitPolicyId, encodedSpendChannelRedeemer, diff --git a/cardano/gateway/src/tx/client.service.ts b/cardano/gateway/src/tx/client.service.ts index 6e977a085..77d00f1c1 100644 --- a/cardano/gateway/src/tx/client.service.ts +++ b/cardano/gateway/src/tx/client.service.ts @@ -29,7 +29,7 @@ import { verifyClientMessage, } from '../shared/types/msgs/client-message'; import { checkForMisbehaviour } from '@shared/types/misbehaviour/misbehaviour'; -import { UpdateOnMisbehaviourOperatorDto, UpdateClientOperatorDto } from './dto/client/update-client-operator.dto'; +import { UpdateOnMisbehaviourOperatorDto, UpdateClientOperatorDto } from './dto'; import { validateAndFormatCreateClientParams, validateAndFormatUpdateClientParams } from './helper/client.validate'; @Injectable() @@ -58,6 +58,9 @@ export class ClientService { const validToTime = Number(consensusState.timestamp / 10n ** 6n + 120n * 10n ** 3n); const validToSlot = this.lucidService.lucid.unixTimeToSlot(Number(validToTime)); const currentSlot = this.lucidService.lucid.currentSlot(); + + this.logger.log('validToTime: ', validToTime, 'validToSlot: ', validToSlot, 'currentSlot: ', currentSlot); + if (currentSlot > validToSlot) { throw new GrpcInternalException( `create client failed: tx time invalid consesusState.timestamp ${consensusState.timestamp} validToTime ${validToTime} validToSlot ${validToSlot} currentSlot ${currentSlot}`, @@ -168,6 +171,19 @@ export class ClientService { const validFrom = Number(validFromTime); const validTo = new Date().valueOf() + 100 * 1e3; + this.logger.log( + 'validFromTime: ', + validFromTime, + 'validToTime: ', + validToTime, + 'validFromSlot: ', + validFromSlot, + 'validToSlot: ', + validToSlot, + 'currentSlot: ', + currentSlot, + ); + const unSignedTxValidTo: TxBuilder = unsignedUpdateClientTx.validFrom(validFrom).validTo(validTo); // Todo: signing should be done by the relayer in the future diff --git a/cardano/gateway/src/tx/connection.service.ts b/cardano/gateway/src/tx/connection.service.ts index b09d5121e..ddff7bb8c 100644 --- a/cardano/gateway/src/tx/connection.service.ts +++ b/cardano/gateway/src/tx/connection.service.ts @@ -1,9 +1,8 @@ import { MsgUpdateClientResponse } from '@plus/proto-types/build/ibc/core/client/v1/tx'; -import { TxBuilder, TxSignBuilder, UTxO, fromHex } from '@lucid-evolution/lucid'; - +import { TxBuilder, UTxO, fromHex } from '@lucid-evolution/lucid'; import { Inject, Injectable, Logger } from '@nestjs/common'; import { LucidService } from 'src/shared/modules/lucid/lucid.service'; -import { GrpcInternalException, GrpcInvalidArgumentException } from '~@/exception/grpc_exceptions'; +import { GrpcInternalException } from '~@/exception/grpc_exceptions'; import { MsgConnectionOpenAck, MsgConnectionOpenAckResponse, @@ -15,11 +14,6 @@ import { MsgConnectionOpenTryResponse, } from '@plus/proto-types/build/ibc/core/connection/v1/tx'; import { RpcException } from '@nestjs/microservices'; -import { ConnectionOpenInitOperator } from './dto/connection/connection-open-init-operator.dto'; -import { ConnectionOpenTryOperator } from './dto/connection/connection-open-try-operator.dto'; -import { CLIENT_PREFIX, CONNECTION_ID_PREFIX, DEFAULT_MERKLE_PREFIX } from 'src/constant'; -import { ConnectionOpenAckOperator } from './dto/connection/connection-open-ack-operator.dto'; -import { ConnectionOpenConfirmOperator } from './dto/connection/connection-open-confirm-operator.dto'; import { HandlerDatum } from 'src/shared/types/handler-datum'; import { HandlerOperator } from 'src/shared/types/handler-operator'; import { AuthToken } from 'src/shared/types/auth-token'; @@ -28,7 +22,7 @@ import { State } from 'src/shared/types/connection/state'; import { MintConnectionRedeemer, SpendConnectionRedeemer } from '@shared/types/connection/connection-redeemer'; import { ConfigService } from '@nestjs/config'; import { parseClientSequence } from 'src/shared/helpers/sequence'; -import { convertHex2String, convertString2Hex, fromText, toHex, toHexString } from '@shared/helpers/hex'; +import { convertHex2String, convertString2Hex, toHex } from '@shared/helpers/hex'; import { ClientDatum } from '@shared/types/client-datum'; import { isValidProofHeight } from './helper/height.validate'; import { @@ -37,16 +31,23 @@ import { validateAndFormatConnectionOpenInitParams, validateAndFormatConnectionOpenTryParams, } from './helper/connection.validate'; -import { UnsignedConnectionOpenAckDto } from '../shared/modules/lucid/dtos/connection/connection-open-ack.dto'; import { VerifyProofRedeemer, encodeVerifyProofRedeemer } from '../shared/types/connection/verify-proof-redeemer'; import { getBlockDelay } from '../shared/helpers/verify'; import { connectionPath } from '../shared/helpers/connection'; import { ConnectionEnd, State as ConnectionState } from '@plus/proto-types/build/ibc/core/connection/v1/connection'; -import { clientStatePath, getCardanoClientStateForVerifyProofRedeemer } from '~@/shared/helpers/client-state'; -import { ClientState as CardanoClientState } from '@plus/proto-types/build/ibc/lightclients/ouroboros/ouroboros'; +import { clientStatePath } from '~@/shared/helpers/client-state'; import { Any } from '@plus/proto-types/build/google/protobuf/any'; import { getMithrilClientStateForVerifyProofRedeemer } from '../shared/helpers/mithril-client'; import { ClientState as MithrilClientState } from '@plus/proto-types/build/ibc/lightclients/mithril/mithril'; +import { + ConnectionOpenAckOperator, + ConnectionOpenConfirmOperator, + ConnectionOpenInitOperator, + ConnectionOpenTryOperator, +} from './dto'; +import { CLIENT_PREFIX, CONNECTION_ID_PREFIX, DEFAULT_MERKLE_PREFIX } from '~@/constant'; +import { UnsignedConnectionOpenAckDto } from '~@/shared/modules/lucid/dtos'; + @Injectable() export class ConnectionService { constructor( @@ -425,8 +426,6 @@ export class ConnectionService { 'connection', ); - const spendConnectionRefUtxo = this.configService.get('deployment').validators.mintConnection.refUtxo; - const verifyProofRefUTxO = this.configService.get('deployment').validators.verifyProof.refUtxo; const verifyProofPolicyId = this.configService.get('deployment').validators.verifyProof.scriptHash; const [_, consensusState] = [...clientDatum.state.consensusStates.entries()].find( ([key]) => key.revisionHeight === connectionOpenAckOperator.proofHeight.revisionHeight, @@ -506,9 +505,7 @@ export class ConnectionService { clientUtxo, encodedUpdatedConnectionDatum, constructedAddress, - spendConnectionRefUtxo, verifyProofPolicyId, - verifyProofRefUTxO, encodedVerifyProofRedeemer, }; return this.lucidService.createUnsignedConnectionOpenAckTransaction(unsignedConnectionOpenAckParams); diff --git a/cardano/gateway/src/tx/dto/channel/index.ts b/cardano/gateway/src/tx/dto/channel/index.ts new file mode 100644 index 000000000..88c35975a --- /dev/null +++ b/cardano/gateway/src/tx/dto/channel/index.ts @@ -0,0 +1,5 @@ +export * from './channel-close-init-operator.dto'; +export * from './channel-open-ack-operator.dto'; +export * from './channel-open-confirm-operator.dto'; +export * from './channel-open-init-operator.dto'; +export * from './channel-open-try-operator.dto'; diff --git a/cardano/gateway/src/tx/dto/client/index.ts b/cardano/gateway/src/tx/dto/client/index.ts new file mode 100644 index 000000000..71f47cb25 --- /dev/null +++ b/cardano/gateway/src/tx/dto/client/index.ts @@ -0,0 +1 @@ +export * from './update-client-operator.dto'; diff --git a/cardano/gateway/src/tx/dto/client/update-client-operator.dto.ts b/cardano/gateway/src/tx/dto/client/update-client-operator.dto.ts index 59eb827f7..db354d9fb 100644 --- a/cardano/gateway/src/tx/dto/client/update-client-operator.dto.ts +++ b/cardano/gateway/src/tx/dto/client/update-client-operator.dto.ts @@ -1,6 +1,5 @@ import { UTxO } from '@lucid-evolution/lucid'; import { ClientDatum } from '../../../shared/types/client-datum'; -import { Misbehaviour } from '../../../shared/types/misbehaviour/misbehaviour'; import { Header } from '../../../shared/types/header'; import { Any } from '@plus/proto-types/build/google/protobuf/any'; diff --git a/cardano/gateway/src/tx/dto/connection/connection-open-ack-operator.dto.ts b/cardano/gateway/src/tx/dto/connection/connection-open-ack-operator.dto.ts index 63d1c5077..4be46de1a 100644 --- a/cardano/gateway/src/tx/dto/connection/connection-open-ack-operator.dto.ts +++ b/cardano/gateway/src/tx/dto/connection/connection-open-ack-operator.dto.ts @@ -1,5 +1,4 @@ import { Height } from 'src/shared/types/height'; -import { CardanoClientState } from '@shared/types/cardano'; import { MerkleProof } from '@shared/types/isc-23/merkle'; import { MithrilClientState } from '@shared/types/mithril'; diff --git a/cardano/gateway/src/tx/dto/connection/connection-open-try-operator.dto.ts b/cardano/gateway/src/tx/dto/connection/connection-open-try-operator.dto.ts index 4340f6498..a72574b37 100644 --- a/cardano/gateway/src/tx/dto/connection/connection-open-try-operator.dto.ts +++ b/cardano/gateway/src/tx/dto/connection/connection-open-try-operator.dto.ts @@ -1,7 +1,6 @@ import { Counterparty } from 'src/shared/types/connection/counterparty'; import { Version } from 'src/shared/types/connection/version'; import { Height } from 'src/shared/types/height'; -import { CardanoClientState } from '@shared/types/cardano'; import { MerkleProof } from '@shared/types/isc-23/merkle'; import { MithrilClientState } from '../../../shared/types/mithril'; diff --git a/cardano/gateway/src/tx/dto/connection/index.ts b/cardano/gateway/src/tx/dto/connection/index.ts new file mode 100644 index 000000000..76d2f2e1c --- /dev/null +++ b/cardano/gateway/src/tx/dto/connection/index.ts @@ -0,0 +1,4 @@ +export * from './connection-open-ack-operator.dto'; +export * from './connection-open-try-operator.dto'; +export * from './connection-open-init-operator.dto'; +export * from './connection-open-confirm-operator.dto'; diff --git a/cardano/gateway/src/tx/dto/index.ts b/cardano/gateway/src/tx/dto/index.ts new file mode 100644 index 000000000..b3d36e660 --- /dev/null +++ b/cardano/gateway/src/tx/dto/index.ts @@ -0,0 +1,4 @@ +export * from './channel'; +export * from './connection'; +export * from './packet'; +export * from './client'; diff --git a/cardano/gateway/src/tx/dto/packet/index.ts b/cardano/gateway/src/tx/dto/packet/index.ts new file mode 100644 index 000000000..f0c8328c9 --- /dev/null +++ b/cardano/gateway/src/tx/dto/packet/index.ts @@ -0,0 +1,5 @@ +export * from './ack-packet-operator.dto'; +export * from './recv-packet-operator.dto'; +export * from './send-packet-operator.dto'; +export * from './timeout-packet-operator.dto'; +export * from './timeout-resfresh-operator.dto'; diff --git a/cardano/gateway/src/tx/dto/packet/time-out-packet-operator.dto.ts b/cardano/gateway/src/tx/dto/packet/timeout-packet-operator.dto.ts similarity index 100% rename from cardano/gateway/src/tx/dto/packet/time-out-packet-operator.dto.ts rename to cardano/gateway/src/tx/dto/packet/timeout-packet-operator.dto.ts diff --git a/cardano/gateway/src/tx/helper/channel.validate.ts b/cardano/gateway/src/tx/helper/channel.validate.ts index e9e74cbae..c393ce463 100644 --- a/cardano/gateway/src/tx/helper/channel.validate.ts +++ b/cardano/gateway/src/tx/helper/channel.validate.ts @@ -45,6 +45,7 @@ export function validateAndFormatChannelOpenInitParams(data: MsgChannelOpenInit) orderingChannel = Order.Ordered; break; } + const channelOpenInitOperator: ChannelOpenInitOperator = { //TODO: check in channel.connection_hops connectionId: data.channel.connection_hops[0], diff --git a/cardano/gateway/src/tx/helper/connection.validate.ts b/cardano/gateway/src/tx/helper/connection.validate.ts index ad4a671ec..fbe2ffc77 100644 --- a/cardano/gateway/src/tx/helper/connection.validate.ts +++ b/cardano/gateway/src/tx/helper/connection.validate.ts @@ -14,18 +14,16 @@ import { MsgConnectionOpenTry, } from '@plus/proto-types/build/ibc/core/connection/v1/tx'; import { ConnectionOpenInitOperator } from '../dto/connection/connection-open-init-operator.dto'; -import { ClientState as ClientStateMsg } from '@plus/proto-types/build/ibc/lightclients/ouroboros/ouroboros'; import { ClientState as ClientStateMithrilMsg } from '@plus/proto-types/build/ibc/lightclients/mithril/mithril'; import { convertString2Hex, toHex } from '@shared/helpers/hex'; -import { CardanoClientState } from '@shared/types/cardano'; -import { initializeCardanoClientState } from '@shared/helpers/cardano-client'; import { ConnectionOpenTryOperator } from '../dto/connection/connection-open-try-operator.dto'; import { initializeMerkleProof } from '@shared/helpers/merkle-proof'; import { ConnectionOpenAckOperator } from '../dto/connection/connection-open-ack-operator.dto'; -import { decodeClientStateMithril, decodeClientStateOuroboros, decodeMerkleProof } from './helper'; +import { decodeClientStateMithril, decodeMerkleProof } from './helper'; import { ConnectionOpenConfirmOperator } from '../dto/connection/connection-open-confirm-operator.dto'; import { MithrilClientState } from '../../shared/types/mithril'; import { initializeMithrilClientState } from '../../shared/helpers/mithril-client'; + export function validateAndFormatConnectionOpenInitParams(data: MsgConnectionOpenInit): { constructedAddress: string; connectionOpenInitOperator: ConnectionOpenInitOperator; diff --git a/cardano/gateway/src/tx/helper/packet.validate.ts b/cardano/gateway/src/tx/helper/packet.validate.ts index 8adb9765e..0e6ade1fc 100644 --- a/cardano/gateway/src/tx/helper/packet.validate.ts +++ b/cardano/gateway/src/tx/helper/packet.validate.ts @@ -13,7 +13,7 @@ import { } from '@plus/proto-types/build/ibc/core/channel/v1/tx'; import { SendPacketOperator } from '../dto/packet/send-packet-operator.dto'; import { FungibleTokenPacketDatum } from '@shared/types/apps/transfer/types/fungible-token-packet-data'; -import { TimeoutPacketOperator } from '../dto/packet/time-out-packet-operator.dto'; +import { TimeoutPacketOperator } from '../dto/packet/timeout-packet-operator.dto'; import { AckPacketOperator } from '../dto/packet/ack-packet-operator.dto'; export function validateAndFormatRecvPacketParams(data: MsgRecvPacket): { diff --git a/cardano/gateway/src/tx/packet.service.ts b/cardano/gateway/src/tx/packet.service.ts index 5bc01c734..5ae7346da 100644 --- a/cardano/gateway/src/tx/packet.service.ts +++ b/cardano/gateway/src/tx/packet.service.ts @@ -14,8 +14,6 @@ import { MsgTransferResponse, ResponseResultType, } from '@plus/proto-types/build/ibc/core/channel/v1/tx'; - -import { RecvPacketOperator } from './dto/packet/recv-packet-operator.dto'; import { fromHex, TxBuilder, UTxO } from '@lucid-evolution/lucid'; import { parseChannelSequence, parseClientSequence, parseConnectionSequence } from 'src/shared/helpers/sequence'; import { ChannelDatum } from 'src/shared/types/channel/channel-datum'; @@ -26,39 +24,15 @@ import { ACK_RESULT, CHANNEL_ID_PREFIX, LOVELACE, ORDER_MAPPING_CHANNEL } from ' import { IBCModuleRedeemer } from '@shared/types/port/ibc_module_redeemer'; import { deleteKeySortMap, deleteSortMap, getDenomPrefix, prependToMap, sortedStringify } from '@shared/helpers/helper'; import { RpcException } from '@nestjs/microservices'; -import { SendPacketOperator } from './dto/packet/send-packet-operator.dto'; import { FungibleTokenPacketDatum } from '@shared/types/apps/transfer/types/fungible-token-packet-data'; -import { - UnsignedSendPacketEscrowDto, - UnsignedSendPacketEscrowForOrderedChannelDto, -} from '../shared/modules/lucid/dtos/packet/send-packet-escrow.dto'; import { TransferModuleRedeemer } from '../shared/types/apps/transfer/transfer_module_redeemer/transfer-module-redeemer'; import { normalizeDenomTokenTransfer } from './helper/helper'; import { convertHex2String, convertString2Hex, hashSHA256, hashSha3_256 } from '../shared/helpers/hex'; -import { UnsignedRecvPacketUnescrowDto } from '@shared/modules/lucid/dtos/packet/recv-packet-unescrow.dto'; -import { - UnsignedRecvPacketDto, - UnsignedRecvPacketMintDto, - UnsignedRecvPacketMintForOrderedChannelDto, -} from '@shared/modules/lucid/dtos/packet/recv-packet-mint.dto'; import { MintVoucherRedeemer } from '@shared/types/apps/transfer/mint_voucher_redeemer/mint-voucher-redeemer'; import { commitPacket } from '../shared/helpers/commitment'; -import { UnsignedAckPacketUnescrowDto } from '../shared/modules/lucid/dtos/packet/ack-packet-unescrow.dto'; -import { AckPacketOperator } from './dto/packet/ack-packet-operator.dto'; -import { UnsignedAckPacketMintDto } from '../shared/modules/lucid/dtos/packet/ack-packet-mint.dto'; -import { UnsignedSendPacketBurnDto } from '../shared/modules/lucid/dtos/packet/send-packet-burn.dto'; import { ClientDatum } from '@shared/types/client-datum'; -import { TimeoutPacketOperator } from './dto/packet/time-out-packet-operator.dto'; -import { UnsignedTimeoutPacketMintDto } from '@shared/modules/lucid/dtos/packet/timeout-packet-mint.dto'; -import { UnsignedTimeoutPacketUnescrowDto } from '@shared/modules/lucid/dtos/packet/timeout-packet-unescrow.dto'; import { isValidProofHeight } from './helper/height.validate'; -import { TimeoutRefreshOperator } from './dto/packet/timeout-resfresh-operator.dto'; -import { UnsignedTimeoutRefreshDto } from '@shared/modules/lucid/dtos/packet/timeout-refresh-dto'; import { AcknowledgementResponse } from '@shared/types/channel/acknowledgement_response'; -import { - UnsignedAckPacketSucceedDto, - UnsignedAckPacketSucceedForOrderedChannelDto, -} from '@shared/modules/lucid/dtos/packet/ack-packet-succeed.dto'; import { validateAndFormatAcknowledgementPacketParams, validateAndFormatRecvPacketParams, @@ -69,8 +43,27 @@ import { encodeVerifyProofRedeemer, VerifyProofRedeemer } from '../shared/types/ import { getBlockDelay } from '../shared/helpers/verify'; import { packetAcknowledgementPath, packetCommitmentPath, packetReceiptPath } from '../shared/helpers/packet-keys'; import { Order as ChannelOrder } from '@plus/proto-types/build/ibc/core/channel/v1/channel'; -import { Order } from '~@/shared/types/channel/order'; import { GrpcInternalException, GrpcInvalidArgumentException } from '~@/exception/grpc_exceptions'; +import { + AckPacketOperator, + RecvPacketOperator, + SendPacketOperator, + TimeoutPacketOperator, + TimeoutRefreshOperator, +} from './dto'; +import { + UnsignedAckPacketMintDto, + UnsignedAckPacketSucceedDto, + UnsignedAckPacketUnescrowDto, + UnsignedRecvPacketDto, + UnsignedRecvPacketMintDto, + UnsignedRecvPacketUnescrowDto, + UnsignedSendPacketBurnDto, + UnsignedSendPacketEscrowDto, + UnsignedTimeoutPacketMintDto, + UnsignedTimeoutPacketUnescrowDto, + UnsignedTimeoutRefreshDto, +} from '~@/shared/modules/lucid/dtos'; @Injectable() export class PacketService { @@ -139,11 +132,7 @@ export class PacketService { if (currentSlot > validToSlot) { throw new GrpcInternalException('recv packet failed: tx time invalid'); } - console.log({ - validToTime, - validToSlot, - currentSlot, - }); + this.logger.log('validToTime: ', validToTime, 'validToSlot: ', validToSlot, 'currentSlot: ', currentSlot); if ( recvPacketOperator.timeoutTimestamp > 0 && @@ -188,6 +177,8 @@ export class PacketService { throw new GrpcInternalException('channel init failed: tx time invalid'); } + this.logger.log('validToTime: ', validToTime, 'validToSlot: ', validToSlot, 'currentSlot: ', currentSlot); + const unsignedSendPacketTxValidTo: TxBuilder = unsignedSendPacketTx.validTo(validToTime); // Todo: signing should be done in the relayer in the future @@ -284,11 +275,8 @@ export class PacketService { const validToSlot = this.lucidService.lucid.unixTimeToSlot(Number(validToTime)); const currentSlot = this.lucidService.lucid.currentSlot(); - console.log({ - validToTime, - validToSlot, - currentSlot, - }); + this.logger.log('validToTime: ', validToTime, 'validToSlot: ', validToSlot, 'currentSlot: ', currentSlot); + if (currentSlot > validToSlot) { throw new GrpcInternalException('recv packet failed: tx time invalid'); } @@ -372,10 +360,8 @@ export class PacketService { spendChannelRedeemer, 'spendChannelRedeemer', ); - const spendChannelRefUtxo: UTxO = this.getSpendChannelRefUtxo(); const unsignedTimeoutRefreshParams: UnsignedTimeoutRefreshDto = { channelUtxo, - spendChannelRefUTxO: spendChannelRefUtxo, encodedSpendChannelRedeemer, encodedChannelDatum, channelTokenUnit, @@ -441,8 +427,6 @@ export class PacketService { const transferModuleIdentifier = this.getTransferModuleIdentifier(); // Get mock module utxo const transferModuleUtxo = await this.lucidService.findUtxoByUnit(transferModuleIdentifier); - const spendChannelRefUtxo: UTxO = this.getSpendChannelRefUtxo(); - const spendTransferModuleRefUtxo: UTxO = this.getSpendTransferModuleRefUtxo(); // channel id const channelId = convertString2Hex(recvPacketOperator.channelId); // Init packet @@ -472,12 +456,12 @@ export class PacketService { const deploymentConfig = this.configService.get('deployment'); const recvPacketPolicyId = deploymentConfig.validators.spendChannel.refValidator.recv_packet.scriptHash; - const recvPacketRefUTxO = deploymentConfig.validators.spendChannel.refValidator.recv_packet.refUtxo; + const channelToken = { policyId: mintChannelPolicyId, name: channelTokenName, }; - const verifyProofRefUTxO = this.configService.get('deployment').validators.verifyProof.refUtxo; + const verifyProofPolicyId = this.configService.get('deployment').validators.verifyProof.scriptHash; const [, consensusState] = [...clientDatum.state.consensusStates.entries()].find( ([key]) => key.revisionHeight === recvPacketOperator.proofHeight.revisionHeight, @@ -584,8 +568,6 @@ export class PacketService { channelUtxo, connectionUtxo, clientUtxo, - spendChannelRefUtxo, - spendTransferModuleRefUtxo, transferModuleUtxo, encodedSpendChannelRedeemer, @@ -597,11 +579,9 @@ export class PacketService { constructedAddress, recvPacketPolicyId, - recvPacketRefUTxO, channelToken, verifyProofPolicyId, - verifyProofRefUTxO, encodedVerifyProofRedeemer, }; return this.lucidService.createUnsignedRecvPacketUnescrowTx(unsignedRecvPacketUnescrowParams); @@ -652,10 +632,7 @@ export class PacketService { channelUtxo, connectionUtxo, clientUtxo, - spendChannelRefUtxo, - spendTransferModuleRefUtxo, transferModuleUtxo, - mintVoucherRefUtxo: this.getMintVoucherRefUtxo(), encodedSpendChannelRedeemer, encodedSpendTransferModuleRedeemer, @@ -669,11 +646,9 @@ export class PacketService { constructedAddress, recvPacketPolicyId, - recvPacketRefUTxO, channelToken, verifyProofPolicyId, - verifyProofRefUTxO, encodedVerifyProofRedeemer, }; @@ -707,7 +682,6 @@ export class PacketService { channelUtxo, connectionUtxo, clientUtxo, - spendChannelRefUtxo, encodedSpendChannelRedeemer, encodedUpdatedChannelDatum, @@ -716,11 +690,9 @@ export class PacketService { constructedAddress, recvPacketPolicyId, - recvPacketRefUTxO, channelToken, verifyProofPolicyId, - verifyProofRefUTxO, encodedVerifyProofRedeemer, }; @@ -781,9 +753,8 @@ export class PacketService { next_sequence_recv: timeoutPacketOperator.nextSequenceRecv, }, }; - // const deploymentConfig = this.configService.get('deployment'); + const { transferModuleUtxo, transferModuleAddress, spendChannelAddress } = await this.getTransferModuleDetails(); - const { spendChannelRefUtxo, spendTransferModuleUtxo } = this.getSpendUtxos(); const transferAmount = BigInt(timeoutPacketOperator.fungibleTokenPacketData.amount); const senderPublicKeyHash = timeoutPacketOperator.fungibleTokenPacketData.sender; const denom = @@ -831,9 +802,7 @@ export class PacketService { const deploymentConfig = this.configService.get('deployment'); const timeoutPacketPolicyId = deploymentConfig.validators.spendChannel.refValidator.timeout_packet.scriptHash; - const timeoutPacketRefUTxO = deploymentConfig.validators.spendChannel.refValidator.timeout_packet.refUtxo; const verifyProofPolicyId = deploymentConfig.validators.verifyProof.scriptHash; - const verifyProofRefUTxO = deploymentConfig.validators.verifyProof.refUtxo; const channelToken = { policyId: mintChannelPolicyId, name: channelTokenName, @@ -874,12 +843,10 @@ export class PacketService { this.logger.log(denom, 'unescrow timeout processing'); const unsignedSendPacketParams: UnsignedTimeoutPacketUnescrowDto = { - spendChannelRefUtxo: spendChannelRefUtxo, channelUtxo: channelUtxo, transferModuleUtxo: transferModuleUtxo, connectionUtxo: connectionUtxo, clientUtxo: clientUtxo, - spendTransferModuleUtxo: spendTransferModuleUtxo, encodedSpendChannelRedeemer: encodedSpendChannelRedeemer, encodedSpendTransferModuleRedeemer: encodedSpendTransferModuleRedeemer, @@ -895,10 +862,8 @@ export class PacketService { constructedAddress: constructedAddress, timeoutPacketPolicyId, - timeoutPacketRefUTxO, channelToken, - verifyProofRefUTxO, verifyProofPolicyId, encodedVerifyProofRedeemer, }; @@ -907,7 +872,6 @@ export class PacketService { this.logger.log(timeoutPacketOperator.fungibleTokenPacketData.denom, 'mint timeout processing'); // const prefixedDenom = convertString2Hex(sourcePrefix + denom); const prefixedDenom = convertString2Hex(denom); - const spendTransferModuleRefUtxo: UTxO = this.getSpendTransferModuleRefUtxo(); const mintVoucherRedeemer: MintVoucherRedeemer = { RefundVoucher: { packet_source_port: packet.source_port, @@ -917,15 +881,11 @@ export class PacketService { const voucherTokenName = hashSha3_256(prefixedDenom); const voucherTokenUnit = this.getMintVoucherScriptHash() + voucherTokenName; - const mintVoucherRefUtxo = this.getMintVoucherRefUtxo(); const encodedMintVoucherRedeemer: string = await this.lucidService.encode( mintVoucherRedeemer, 'mintVoucherRedeemer', ); const unsignedTimeoutPacketMintDto: UnsignedTimeoutPacketMintDto = { - spendChannelRefUtxo: spendChannelRefUtxo, - spendTransferModuleRefUtxo: spendTransferModuleRefUtxo, - mintVoucherRefUtxo: mintVoucherRefUtxo, channelUtxo: channelUtxo, transferModuleUtxo: transferModuleUtxo, connectionUtxo: connectionUtxo, @@ -946,15 +906,14 @@ export class PacketService { constructedAddress: constructedAddress, timeoutPacketPolicyId, - timeoutPacketRefUTxO, channelToken, - verifyProofRefUTxO, verifyProofPolicyId, encodedVerifyProofRedeemer, }; return this.lucidService.createUnsignedTimeoutPacketMintTx(unsignedTimeoutPacketMintDto); } + async buildUnsignedSendPacketTx(sendPacketOperator: SendPacketOperator): Promise { const channelSequence: string = sendPacketOperator.sourceChannel.replaceAll(`${CHANNEL_ID_PREFIX}-`, ''); // Get the token unit associated with the client @@ -984,8 +943,6 @@ export class PacketService { const transferModuleIdentifier = this.getTransferModuleIdentifier(); // Get transfer module utxo const transferModuleUtxo = await this.lucidService.findUtxoByUnit(transferModuleIdentifier); - const spendChannelRefUtxo: UTxO = this.getSpendChannelRefUtxo(); - const spendTransferModuleRefUtxo: UTxO = this.getSpendTransferModuleRefUtxo(); // channel id const channelId = convertString2Hex(sendPacketOperator.sourceChannel); @@ -1002,7 +959,6 @@ export class PacketService { receiver: sendPacketOperator.receiver, memo: sendPacketOperator.memo, }; - console.dir(sendPacketOperator, { depth: 100 }); // Init packet const packet: Packet = { @@ -1068,7 +1024,6 @@ export class PacketService { const deploymentConfig = this.configService.get('deployment'); const sendPacketPolicyId = deploymentConfig.validators.spendChannel.refValidator.send_packet.scriptHash; - const sendPacketRefUTxO = deploymentConfig.validators.spendChannel.refValidator.send_packet.refUtxo; const channelToken = { policyId: mintChannelPolicyId, name: channelTokenName, @@ -1082,7 +1037,6 @@ export class PacketService { ) ) { this.logger.log('send burn'); - const mintVoucherRefUtxo = deploymentConfig.validators.mintVoucher.refUtxo; const mintVoucherRedeemer: MintVoucherRedeemer = { BurnVoucher: { packet_source_port: packet.source_port, @@ -1104,11 +1058,8 @@ export class PacketService { channelUTxO: channelUtxo, connectionUTxO: connectionUtxo, clientUTxO: clientUtxo, - spendChannelRefUTxO: spendChannelRefUtxo, - spendTransferModuleUTxO: spendTransferModuleRefUtxo, transferModuleUTxO: transferModuleUtxo, senderVoucherTokenUtxo, - mintVoucherRefUtxo, encodedMintVoucherRedeemer, encodedSpendChannelRedeemer: encodedSpendChannelRedeemer, @@ -1126,7 +1077,6 @@ export class PacketService { denomToken: normalizeDenomTokenTransfer(sendPacketOperator.token.denom), sendPacketPolicyId, - sendPacketRefUTxO, channelToken, }; @@ -1134,84 +1084,32 @@ export class PacketService { } // escrow this.logger.log('send escrow'); - switch (channelDatum.state.channel.ordering) { - case Order.Unordered: - const unsignedSendPacketParams: UnsignedSendPacketEscrowDto = { - channelUTxO: channelUtxo, - connectionUTxO: connectionUtxo, - clientUTxO: clientUtxo, - spendChannelRefUTxO: spendChannelRefUtxo, - spendTransferModuleUTxO: spendTransferModuleRefUtxo, - transferModuleUTxO: transferModuleUtxo, - - encodedSpendChannelRedeemer: encodedSpendChannelRedeemer, - encodedSpendTransferModuleRedeemer: encodedSpendTransferModuleRedeemer, - encodedUpdatedChannelDatum: encodedUpdatedChannelDatum, - - transferAmount: BigInt(sendPacketOperator.token.amount), - senderAddress: sendPacketOperator.sender, - receiverAddress: sendPacketOperator.receiver, - - constructedAddress: sendPacketOperator.signer, - - spendChannelAddress: deploymentConfig.validators.spendChannel.address, - channelTokenUnit: channelTokenUnit, - transferModuleAddress: deploymentConfig.modules.transfer.address, - denomToken: normalizeDenomTokenTransfer(sendPacketOperator.token.denom), - - sendPacketPolicyId, - sendPacketRefUTxO, - channelToken, - }; - - this.prettyPrint(unsignedSendPacketParams); - - return this.lucidService.createUnsignedSendPacketEscrowTx(unsignedSendPacketParams); - - case Order.Ordered: - const mockModuleIdentifier = this.getMockModuleIdentifier(); - const mockModuleUtxo = await this.lucidService.findUtxoByUnit(mockModuleIdentifier); - const spendMockModuleRefUtxo: UTxO = this.getSpendMockModuleRefUtxo(); - const spendMockModuleRedeemer: IBCModuleRedeemer = { - Operator: ['OtherModuleOperator'], - }; - - const encodedSpendMockModuleRedeemer: string = await this.lucidService.encode( - spendMockModuleRedeemer, - 'iBCModuleRedeemer', - ); + const unsignedSendPacketParams: UnsignedSendPacketEscrowDto = { + channelUTxO: channelUtxo, + connectionUTxO: connectionUtxo, + clientUTxO: clientUtxo, + transferModuleUTxO: transferModuleUtxo, - const unsignedSendPacketChannelOrderedParams: UnsignedSendPacketEscrowForOrderedChannelDto = { - channelUTxO: channelUtxo, - connectionUTxO: connectionUtxo, - clientUTxO: clientUtxo, - spendChannelRefUTxO: spendChannelRefUtxo, - spendMockModuleUTxO: spendMockModuleRefUtxo, - mockModuleUTxO: mockModuleUtxo, - - encodedSpendChannelRedeemer: encodedSpendChannelRedeemer, - encodedSpendModuleRedeemer: encodedSpendMockModuleRedeemer, - encodedUpdatedChannelDatum: encodedUpdatedChannelDatum, - - transferAmount: BigInt(sendPacketOperator.token.amount), - senderAddress: sendPacketOperator.sender, - receiverAddress: sendPacketOperator.receiver, - - constructedAddress: sendPacketOperator.signer, - - spendChannelAddress: deploymentConfig.validators.spendChannel.address, - channelTokenUnit: channelTokenUnit, - mockModuleAddress: deploymentConfig.modules.mock.address, - denomToken: normalizeDenomTokenTransfer(sendPacketOperator.token.denom), - - sendPacketPolicyId, - sendPacketRefUTxO, - channelToken, - }; - return this.lucidService.createUnsignedSendPacketEscrowTxForOrderedChannel( - unsignedSendPacketChannelOrderedParams, - ); - } + encodedSpendChannelRedeemer: encodedSpendChannelRedeemer, + encodedSpendTransferModuleRedeemer: encodedSpendTransferModuleRedeemer, + encodedUpdatedChannelDatum: encodedUpdatedChannelDatum, + + transferAmount: BigInt(sendPacketOperator.token.amount), + senderAddress: sendPacketOperator.sender, + receiverAddress: sendPacketOperator.receiver, + + constructedAddress: sendPacketOperator.signer, + + spendChannelAddress: deploymentConfig.validators.spendChannel.address, + channelTokenUnit: channelTokenUnit, + transferModuleAddress: deploymentConfig.modules.transfer.address, + denomToken: normalizeDenomTokenTransfer(sendPacketOperator.token.denom), + + sendPacketPolicyId, + channelToken, + }; + + return this.lucidService.createUnsignedSendPacketEscrowTx(unsignedSendPacketParams); } async buildUnsignedAcknowlegementPacketTx( @@ -1271,8 +1169,6 @@ export class PacketService { // Get mock module utxo const transferModuleUtxo = await this.lucidService.findUtxoByUnit(transferModuleIdentifier); - const spendChannelRefUtxo: UTxO = this.getSpendChannelRefUtxo(); - const spendTransferModuleRefUtxo: UTxO = this.getSpendTransferModuleRefUtxo(); // channel id const channelId = convertString2Hex(ackPacketOperator.channelId); // Init packet @@ -1345,13 +1241,11 @@ export class PacketService { const deploymentConfig = this.configService.get('deployment'); const ackPacketPolicyId = deploymentConfig.validators.spendChannel.refValidator.acknowledge_packet.scriptHash; - const ackPacketRefUTxO = deploymentConfig.validators.spendChannel.refValidator.acknowledge_packet.refUtxo; const channelToken = { policyId: mintChannelPolicyId, name: channelTokenName, }; - const verifyProofRefUTxO = this.configService.get('deployment').validators.verifyProof.refUtxo; const verifyProofPolicyId = this.configService.get('deployment').validators.verifyProof.scriptHash; const [, consensusState] = [...clientDatum.state.consensusStates.entries()].find( ([key]) => key.revisionHeight === ackPacketOperator.proofHeight.revisionHeight, @@ -1385,125 +1279,43 @@ export class PacketService { ); // Check the type of acknowledgementResponse using discriminant property pattern if ('result' in acknowledgementResponse) { - switch (channelDatum.state.channel.ordering) { - case Order.Unordered: - // build update channel datum - const encodedSpendTransferModuleRedeemer: string = await this.lucidService.encode( - createIBCModuleRedeemer(channelId, fTokenPacketData, { - AcknowledgementResult: { - result: convertString2Hex(acknowledgementResponse.result as string), - }, - }), - 'iBCModuleRedeemer', - ); - const updatedChannelDatum: ChannelDatum = { - ...channelDatum, - state: { - ...channelDatum.state, - packet_commitment: deleteKeySortMap( - channelDatum.state.packet_commitment, - ackPacketOperator.packetSequence, - ), - }, - }; - const encodedUpdatedChannelDatum: string = await this.lucidService.encode( - updatedChannelDatum, - 'channel', - ); - const unsignedAckPacketSucceedParams: UnsignedAckPacketSucceedDto = { - channelUtxo, - connectionUtxo, - clientUtxo, - spendChannelRefUtxo, - spendTransferModuleRefUtxo, - transferModuleUtxo, - encodedSpendChannelRedeemer, - encodedSpendTransferModuleRedeemer, - channelTokenUnit, - encodedUpdatedChannelDatum, - constructedAddress, - ackPacketPolicyId, - ackPacketRefUTxO, - channelToken, - - verifyProofPolicyId, - verifyProofRefUTxO, - encodedVerifyProofRedeemer, - }; - return this.lucidService.createUnsignedAckPacketSucceedTx(unsignedAckPacketSucceedParams); - - case Order.Ordered: - const mockModuleIdentifier = this.getMockModuleIdentifier(); - const mockModuleUtxo = await this.lucidService.findUtxoByUnit(mockModuleIdentifier); - const spendMockModuleRefUtxo: UTxO = this.getSpendMockModuleRefUtxo(); - const createIBCMockModuleRedeemer = ( - channelId: string, - fTokenPacketData: any, - acknowledgementResponse: AcknowledgementResponse, - ) => ({ - Callback: [ - { - OnAcknowledgementPacket: { - channel_id: channelId, - data: 'OtherModuleData', - acknowledgement: { response: acknowledgementResponse }, - }, - }, - ], - }); - - const encodedSpendMockModuleRedeemer: string = await this.lucidService.encode( - createIBCMockModuleRedeemer(channelId, fTokenPacketData, { - AcknowledgementResult: { - result: '01', - }, - }), - 'iBCModuleRedeemer', - ); - const updatedChannelOrderedDatum: ChannelDatum = { - ...channelDatum, - state: { - ...channelDatum.state, - next_sequence_ack: channelDatum.state.next_sequence_ack + 1n, - packet_commitment: deleteKeySortMap( - channelDatum.state.packet_commitment, - ackPacketOperator.packetSequence, - ), - }, - }; - const encodedUpdatedChannelOrderedDatum: string = await this.lucidService.encode( - updatedChannelOrderedDatum, - 'channel', - ); - const unsignedAckPacketChannelOrdredMintParams: UnsignedAckPacketSucceedForOrderedChannelDto = { - channelUtxo, - connectionUtxo, - clientUtxo, - spendChannelRefUtxo, - spendMockModuleRefUtxo, - mockModuleUtxo, - - encodedSpendChannelRedeemer, - encodedSpendMockModuleRedeemer: encodedSpendMockModuleRedeemer, - encodedUpdatedChannelOrderedDatum, - channelTokenUnit, - - constructedAddress, - - ackPacketPolicyId, - ackPacketRefUTxO, - channelToken, - - verifyProofPolicyId, - verifyProofRefUTxO, - encodedVerifyProofRedeemer, - }; + // build update channel datum + const encodedSpendTransferModuleRedeemer: string = await this.lucidService.encode( + createIBCModuleRedeemer(channelId, fTokenPacketData, { + AcknowledgementResult: { + result: convertString2Hex(acknowledgementResponse.result as string), + }, + }), + 'iBCModuleRedeemer', + ); + const updatedChannelDatum: ChannelDatum = { + ...channelDatum, + state: { + ...channelDatum.state, + packet_commitment: deleteKeySortMap(channelDatum.state.packet_commitment, ackPacketOperator.packetSequence), + }, + }; + const encodedUpdatedChannelDatum: string = await this.lucidService.encode( + updatedChannelDatum, + 'channel', + ); + const unsignedAckPacketSucceedParams: UnsignedAckPacketSucceedDto = { + channelUtxo, + connectionUtxo, + clientUtxo, + transferModuleUtxo, + encodedSpendChannelRedeemer, + encodedSpendTransferModuleRedeemer, + channelTokenUnit, + encodedUpdatedChannelDatum, + constructedAddress, + ackPacketPolicyId, + channelToken, - // handle recv packet mint - return this.lucidService.createUnsignedAckPacketSucceedTxForOrderedChannel( - unsignedAckPacketChannelOrdredMintParams, - ); - } + verifyProofPolicyId, + encodedVerifyProofRedeemer, + }; + return this.lucidService.createUnsignedAckPacketSucceedTx(unsignedAckPacketSucceedParams); } if (!('err' in acknowledgementResponse)) { throw new GrpcInternalException('Acknowledgement Response invalid: unknown result'); @@ -1541,8 +1353,6 @@ export class PacketService { channelUtxo, connectionUtxo, clientUtxo, - spendChannelRefUtxo, - spendTransferModuleRefUtxo, transferModuleUtxo, encodedSpendChannelRedeemer, @@ -1556,11 +1366,9 @@ export class PacketService { constructedAddress, ackPacketPolicyId, - ackPacketRefUTxO, channelToken, verifyProofPolicyId, - verifyProofRefUTxO, encodedVerifyProofRedeemer, }; return this.lucidService.createUnsignedAckPacketUnescrowTx(unsignedAckPacketUnescrowParams); @@ -1603,10 +1411,7 @@ export class PacketService { channelUtxo, connectionUtxo, clientUtxo, - spendChannelRefUtxo, - spendTransferModuleRefUtxo, transferModuleUtxo, - mintVoucherRefUtxo: this.getMintVoucherRefUtxo(), encodedSpendChannelRedeemer, encodedSpendTransferModuleRedeemer, @@ -1623,11 +1428,9 @@ export class PacketService { constructedAddress, ackPacketPolicyId, - ackPacketRefUTxO, channelToken, verifyProofPolicyId, - verifyProofRefUTxO, encodedVerifyProofRedeemer, }; @@ -1638,12 +1441,6 @@ export class PacketService { const voucherPrefix = getDenomPrefix(portId, channelId); return denom.startsWith(voucherPrefix); } - private getSpendChannelRefUtxo(): UTxO { - return this.configService.get('deployment').validators.spendChannel.refUtxo; - } - private getSpendTransferModuleUtxo(): UTxO { - return this.configService.get('deployment').validators.spendTransferModule.refUtxo; - } private getTransferModuleAddress(): string { return this.configService.get('deployment').modules.transfer.address; } @@ -1656,24 +1453,9 @@ export class PacketService { private getTransferModuleIdentifier(): string { return this.configService.get('deployment').modules.transfer.identifier; } - private getSpendTransferModuleRefUtxo(): UTxO { - return this.configService.get('deployment').validators.spendTransferModule.refUtxo; - } - private getMintVoucherRefUtxo(): UTxO { - return this.configService.get('deployment').validators.mintVoucher.refUtxo; - } - private getSpendMockModuleUtxo(): UTxO { - return this.configService.get('deployment').validators.spendMockModule.refUtxo; - } - private getMockModuleAddress(): string { - return this.configService.get('deployment').modules.mock.address; - } private getMockModuleIdentifier(): string { return this.configService.get('deployment').modules.mock.identifier; } - private getSpendMockModuleRefUtxo(): UTxO { - return this.configService.get('deployment').validators.spendMockModule.refUtxo; - } private async getTransferModuleDetails(): Promise<{ transferModuleUtxo: UTxO; transferModuleAddress: string; @@ -1685,12 +1467,4 @@ export class PacketService { const spendChannelAddress = this.getSpendChannelAddress(); return { transferModuleUtxo, transferModuleAddress, spendChannelAddress }; } - private getSpendUtxos(): { - spendChannelRefUtxo: UTxO; - spendTransferModuleUtxo: UTxO; - } { - const spendChannelRefUtxo = this.getSpendChannelRefUtxo(); - const spendTransferModuleUtxo = this.getSpendTransferModuleUtxo(); - return { spendChannelRefUtxo, spendTransferModuleUtxo }; - } } diff --git a/cardano/.env.example b/cardano/offchain/.env.default similarity index 66% rename from cardano/.env.example rename to cardano/offchain/.env.default index fe1aa14db..b3074c615 100644 --- a/cardano/.env.example +++ b/cardano/offchain/.env.default @@ -1,3 +1,4 @@ DEPLOYER_SK=ed25519_sk1rvgjxs8sddhl46uqtv862s53vu4jf6lnk63rcn7f0qwzyq85wnlqgrsx42 KUPO_URL="http://localhost:1442" -OGMIOS_URL="http://localhost:1337" \ No newline at end of file +OGMIOS_URL="http://localhost:1337" +CARDANO_NETWORK_MAGIC=42 \ No newline at end of file diff --git a/cardano/offchain/.env.example b/cardano/offchain/.env.example deleted file mode 100644 index fe1aa14db..000000000 --- a/cardano/offchain/.env.example +++ /dev/null @@ -1,3 +0,0 @@ -DEPLOYER_SK=ed25519_sk1rvgjxs8sddhl46uqtv862s53vu4jf6lnk63rcn7f0qwzyq85wnlqgrsx42 -KUPO_URL="http://localhost:1442" -OGMIOS_URL="http://localhost:1337" \ No newline at end of file diff --git a/cardano/offchain/.gitignore b/cardano/offchain/.gitignore index 693832a7d..7fd26db73 100644 --- a/cardano/offchain/.gitignore +++ b/cardano/offchain/.gitignore @@ -4,5 +4,4 @@ plutus.json deployments .vscode .env -lucid-types/ deno.lock \ No newline at end of file diff --git a/cardano/offchain/deno.json b/cardano/offchain/deno.json index eee3e22ec..9da31c43c 100644 --- a/cardano/offchain/deno.json +++ b/cardano/offchain/deno.json @@ -1,16 +1,13 @@ { "imports": { "@std/crypto": "jsr:@std/crypto@^1.0.5", - "@std/dotenv": "jsr:@std/dotenv@^0.225.5", "@std/path": "jsr:@std/path@^1.0.13", "@std/fs": "jsr:@std/fs@^1.0.13", - "@cliffy/command": "jsr:@cliffy/command@^1.0.0-rc.7", - "@lucid-evolution/lucid": "npm:@lucid-evolution/lucid@0.4.29", - "cbor-x": "npm:cbor-x@1.6.0", - "js-sha3": "npm:js-sha3@^0.9.3" + "@lucid-evolution/lucid": "npm:@lucid-evolution/lucid@0.4.29" }, "nodeModulesDir": "auto", "tasks": { - "start": "deno run --env-file=.env.example --allow-net --allow-env --allow-read --allow-ffi --allow-write deploy.ts" + "clean": "rm -rf deployments", + "start": "deno run --env-file=.env.default --allow-net --allow-env --allow-read --allow-ffi --allow-write index.ts" } } \ No newline at end of file diff --git a/cardano/offchain/deploy.ts b/cardano/offchain/deploy.ts deleted file mode 100644 index e0e10bb7a..000000000 --- a/cardano/offchain/deploy.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { - Kupmios, - Lucid, - SLOT_CONFIG_NETWORK, -} from "@lucid-evolution/lucid"; -import { createDeployment } from "./src/create_deployment.ts"; -import { querySystemStart } from "./src/utils.ts"; -import { KUPMIOS_ENV } from "./src/constants.ts"; - -(async () => { - - const deployerSk = Deno.env.get("DEPLOYER_SK"); - const kupoUrl = Deno.env.get("KUPO_URL"); - const ogmiosUrl = Deno.env.get("OGMIOS_URL"); - - console.log(deployerSk, kupoUrl, ogmiosUrl); - - if (!deployerSk || !kupoUrl || !ogmiosUrl) { - throw new Error("Unable to load environment variables"); - } - - const provider = new Kupmios(kupoUrl, ogmiosUrl); - const chainZeroTime = await querySystemStart(ogmiosUrl); - SLOT_CONFIG_NETWORK.Preview.zeroTime = chainZeroTime; - console.log({ chainZeroTime }); - - const lucid = await Lucid( - provider, - "Preview" - ); - lucid.selectWallet.fromPrivateKey(deployerSk); - - console.log("=".repeat(70)); - try { - await createDeployment(lucid, provider, KUPMIOS_ENV); - } catch (error) { - console.error("ERR: ", error); - throw error; - } -})(); \ No newline at end of file diff --git a/cardano/offchain/index.ts b/cardano/offchain/index.ts new file mode 100644 index 000000000..edb658db4 --- /dev/null +++ b/cardano/offchain/index.ts @@ -0,0 +1,50 @@ +import { + Kupmios, + Lucid, + Network, + SLOT_CONFIG_NETWORK, +} from "@lucid-evolution/lucid"; +import { createDeployment } from "./src/deployment.ts"; +import { querySystemStart } from "./src/utils.ts"; +import { KUPMIOS_ENV } from "./src/constants.ts"; + +const deployerSk = Deno.env.get("DEPLOYER_SK"); +const kupoUrl = Deno.env.get("KUPO_URL"); +const ogmiosUrl = Deno.env.get("OGMIOS_URL"); +const cardanoNetworkMagic = Deno.env.get("CARDANO_NETWORK_MAGIC"); + +if (!cardanoNetworkMagic) { + throw new Error("CARDANO_NETWORK_MAGIC is not set in the environment variables"); +} + +let cardanoNetwork: Network = 'Custom'; +if (cardanoNetworkMagic === '1') { + cardanoNetwork = 'Preprod'; +} else if (cardanoNetworkMagic === '2') { + cardanoNetwork = 'Preview'; +} else if (cardanoNetworkMagic === '764824073') { + cardanoNetwork = 'Mainnet'; +} + +if (!deployerSk || !kupoUrl || !ogmiosUrl) { + throw new Error("Unable to load environment variables"); +} + +const provider = new Kupmios(kupoUrl, ogmiosUrl); +const chainZeroTime = await querySystemStart(ogmiosUrl); +SLOT_CONFIG_NETWORK.Preview.zeroTime = chainZeroTime; + +const lucid = await Lucid( + provider, + cardanoNetwork +); + +lucid.selectWallet.fromPrivateKey(deployerSk); + +console.log("=".repeat(70)); +try { + await createDeployment(lucid, KUPMIOS_ENV); +} catch (error) { + console.error("ERR: ", error); + throw error; +} diff --git a/cardano/offchain/src/check.ts b/cardano/offchain/src/check.ts deleted file mode 100644 index aea964725..000000000 --- a/cardano/offchain/src/check.ts +++ /dev/null @@ -1,198 +0,0 @@ -import { -credentialToAddress, - Data, - fromText, - Kupmios, - Lucid, -} from "@lucid-evolution/lucid"; -import { load } from "@std/dotenv"; -import { Command } from "@cliffy/command"; -import { DeploymentTemplate } from "./template.ts"; -import { AuthToken } from "../lucid-types/ibc/auth/AuthToken.ts"; -import { - generateTokenName, - parseChannelSequence, - parseClientSequence, - parseConnectionSequence, -} from "./utils.ts"; -import { ClientDatum } from "../lucid-types/ibc/client/ics_007_tendermint_client/client_datum/ClientDatum.ts"; -import { ConnectionDatum } from "../lucid-types/ibc/core/ics_003_connection_semantics/connection_datum/ConnectionDatum.ts"; -import { ChannelDatum } from "../lucid-types/ibc/core/ics_004/channel_datum/ChannelDatum.ts"; - -const env = await load(); - -const kupoUrl = env["KUPO_URL"] ? env["KUPO_URL"] : ""; -const ogmiosUrl = env["OGMIOS_URL"] ? env["OGMIOS_URL"] : ""; - -await new Command() - .name("cardano-ibc") - .version("0.1.0") - .description("Query Cardano IBC info") - .action(function () { - this.showHelp(); - }) - .globalOption("-k, --kupo ", "Kupo URL", { - default: kupoUrl, - }) - .globalOption("-o, --ogmios ", "Ogmios URL", { - default: ogmiosUrl, - }) - .globalOption("-ha, --handler ", "Path to handler.json file", { - default: "./deployments/handler.json", - }) - .command("client", "Query client, eg: ibc_client-0") - .arguments("") - .action(async ({ handler, kupo, ogmios }, id) => { - console.log("Query client with id:", id); - const deploymentInfo = await loadDeploymentInfo(handler); - - const handlerToken: AuthToken = { - policy_id: deploymentInfo.handlerAuthToken.policyId, - name: deploymentInfo.handlerAuthToken.name, - }; - - const clientTokenPolicyId = deploymentInfo.validators.mintClient.scriptHash; - - const clientSequence = parseClientSequence(id); - - const clientTokenName = await generateTokenName( - handlerToken, - fromText("ibc_client"), - clientSequence - ); - - const lucid = await setupLucid(kupo, ogmios); - - try { - const clientUtxo = await lucid.utxoByUnit( - clientTokenPolicyId + clientTokenName - ); - - const clientDatum = Data.from(clientUtxo.datum!, ClientDatum); - console.dir(clientDatum, { depth: 100 }); - } catch (_error) { - console.log("Failed to query client"); - } - }) - .command("connection", "Query connection, eg: connection-0") - .arguments("") - .action(async ({ handler, kupo, ogmios }, id) => { - console.log("Query connection with id:", id); - const deploymentInfo = await loadDeploymentInfo(handler); - - const handlerToken: AuthToken = { - policy_id: deploymentInfo.handlerAuthToken.policyId, - name: deploymentInfo.handlerAuthToken.name, - }; - - const tokenPolicyId = deploymentInfo.validators.mintConnection.scriptHash; - - const sequence = parseConnectionSequence(id); - - const tokenName = await generateTokenName( - handlerToken, - fromText("connection"), - sequence - ); - - const lucid = await setupLucid(kupo, ogmios); - - try { - const utxo = await lucid.utxoByUnit(tokenPolicyId + tokenName); - - const datum = Data.from(utxo.datum!, ConnectionDatum); - console.dir(datum, { depth: 100 }); - } catch (_error) { - console.log("Failed to query connection"); - } - }) - .command("channel", "Query channel, eg: channel-0") - .arguments("") - .action(async ({ handler, kupo, ogmios }, id) => { - console.log("Query channel with id:", id); - const deploymentInfo = await loadDeploymentInfo(handler); - - const handlerToken: AuthToken = { - policy_id: deploymentInfo.handlerAuthToken.policyId, - name: deploymentInfo.handlerAuthToken.name, - }; - - const tokenPolicyId = deploymentInfo.validators.mintChannel.scriptHash; - - const sequence = parseChannelSequence(id); - - const tokenName = await generateTokenName( - handlerToken, - fromText("channel"), - sequence - ); - - const lucid = await setupLucid(kupo, ogmios); - - try { - const utxo = await lucid.utxoByUnit(tokenPolicyId + tokenName); - - const datum = Data.from(utxo.datum!, ChannelDatum); - console.dir(datum, { depth: 100 }); - } catch (_error) { - console.log("Failed to query channel"); - } - }) - .command("balance", "Query balance of an address or public key hash") - .arguments("") - .action(async ({ kupo, ogmios }, id) => { - const isAddress = id.startsWith("addr"); - - console.log( - `Query balance of ${isAddress ? "address" : "public key hash"}:`, - id - ); - const lucid = await setupLucid(kupo, ogmios); - - try { - const address = isAddress - ? id - : credentialToAddress('Preview', { hash: id, type: "Key" }); - - const utxos = await lucid.utxosAt(address); - - const tokens: Map = new Map(); - - for (const utxo of utxos) { - for (const [name, quantity] of Object.entries(utxo.assets)) { - const prevAmount = tokens.get(name); - - if (prevAmount === undefined) { - tokens.set(name, quantity); - } else { - tokens.set(name, prevAmount + quantity); - } - } - } - - console.log("Balances:"); - for (const [name, amount] of tokens.entries()) { - console.log(`${name}: ${amount}`); - } - } catch (_error) { - console.log("Failed to query channel"); - } - }) - .parse(Deno.args); - -async function setupLucid(kupoUrl: string, ogmiosUrl: string) { - if (!kupoUrl || !ogmiosUrl) { - throw new Error(`Invalid provider url: ${kupoUrl} ${ogmiosUrl}`); - } - - console.log("Provider:", `Kupo->${kupoUrl}`, `Ogmios->${ogmiosUrl}`); - - return await Lucid(new Kupmios(kupoUrl, ogmiosUrl), "Preview"); -} - -async function loadDeploymentInfo(handler: string) { - const deploymentInfo: DeploymentTemplate = JSON.parse( - await Deno.readTextFile(handler) - ); - return deploymentInfo; -} diff --git a/cardano/offchain/src/create_deployment.ts b/cardano/offchain/src/deployment.ts similarity index 78% rename from cardano/offchain/src/create_deployment.ts rename to cardano/offchain/src/deployment.ts index 6e346a68c..fb1b0421e 100644 --- a/cardano/offchain/src/create_deployment.ts +++ b/cardano/offchain/src/deployment.ts @@ -1,15 +1,12 @@ +import { ensureDir } from "@std/fs"; import { credentialToAddress, validatorToScriptHash, validatorToAddress, - generateSeedPhrase, Data, fromText, - Lucid, type MintingPolicy, - OutRef, PolicyId, - Provider, type Script, ScriptHash, type SpendingValidator, @@ -22,7 +19,8 @@ import { generateTokenName, getNonceOutRef, readValidator, - setUp, + DeploymentTemplate, + submitTx } from "./utils.ts"; import { EMULATOR_ENV, @@ -30,20 +28,7 @@ import { PORT_PREFIX, TRANSFER_MODULE_PORT, } from "./constants.ts"; -import { DeploymentTemplate } from "./template.ts"; -import { ensureDir } from "@std/fs"; -import { submitTx } from "./utils.ts"; -import { - AuthToken, - AuthTokenSchema, -} from "../lucid-types/ibc/auth/AuthToken.ts"; -import { HandlerDatum } from "../lucid-types/ibc/core/ics_025_handler_interface/handler_datum/HandlerDatum.ts"; -import { HandlerOperator } from "../lucid-types/ibc/core/ics_025_handler_interface/handler_redeemer/HandlerOperator.ts"; -import { - OutputReference, - OutputReferenceSchema, -} from "../lucid-types/cardano/transaction/OutputReference.ts"; -import { MintPortRedeemer } from "../lucid-types/ibc/core/ics_005/port_redeemer/MintPortRedeemer.ts"; +import { AuthToken, AuthTokenSchema, HandlerDatum, HandlerOperator, MintPortRedeemer, OutputReference, OutputReferenceSchema } from "../types/index.ts"; // deno-lint-ignore no-explicit-any (BigInt.prototype as any).toJSON = function () { @@ -53,7 +38,6 @@ import { MintPortRedeemer } from "../lucid-types/ibc/core/ics_005/port_redeemer/ export const createDeployment = async ( lucid: LucidEvolution, - provider: Provider, mode?: string ) => { console.log("Create deployment info"); @@ -112,9 +96,10 @@ export const createDeployment = async ( mintPortPolicyId, verifyProofPolicyId ); + referredValidators.push( spendingChannel.base.script, - ...Object.values(spendingChannel.referredValidators).map( + ...Object.values(spendingChannel.referredScripts).map( (val) => val.script ) ); @@ -160,7 +145,6 @@ export const createDeployment = async ( "minting_identifier.minting_identifier.mint", lucid ); - referredValidators.push(mintIdentifierValidator); const { identifierTokenUnit: transferModuleIdentifier, @@ -177,27 +161,15 @@ export const createDeployment = async ( ); referredValidators.push(mintVoucher.validator, spendTransferModule.validator); - // const { identifierTokenUnit: mockModuleIdentifier, spendMockModule } = - // await deployMockModule( - // lucid, - // handlerToken, - // spendHandlerValidator, - // mintPortValidator, - // mintIdentifierValidator, - // MOCK_MODULE_PORT - // ); - // referredValidators.push(spendMockModule.validator); - const refUtxosInfo = await createReferenceUtxos( lucid, - provider, referredValidators ); const [mockTokenPolicyId, mockTokenName] = await mintMockToken(lucid); const spendChannelRefValidator = Object.entries( - spendingChannel.referredValidators + spendingChannel.referredScripts ).reduce< Record >((acc, [name, val]) => { @@ -212,10 +184,6 @@ export const createDeployment = async ( console.log("Deployment info created!"); - console.log('refUtxos', refUtxosInfo) - console.log('spendHandlerScriptHash', spendHandlerScriptHash) - - const deploymentInfo: DeploymentTemplate = { validators: { spendHandler: { @@ -374,26 +342,10 @@ async function mintMockToken(lucid: LucidEvolution) { async function createReferenceUtxos( lucid: LucidEvolution, - provider: Provider, referredValidators: Script[] ) { try { console.log("Create reference utxos starting ..."); - const deployLucids: LucidEvolution[] = []; - for (const _ of referredValidators) { - const newLucid = await Lucid(provider, "Preview"); - newLucid.selectWallet.fromSeed(generateSeedPhrase()); - deployLucids.push(newLucid); - } - - const fundDeployAccTx = lucid.newTx(); - await Promise.all( - deployLucids.map(async (inst) => { - const address = await inst.wallet().address(); - fundDeployAccTx.pay.ToAddress(address, { lovelace: 500_000_000n }); - }) - ); - await submitTx(fundDeployAccTx, lucid, "Fund Deploy Account", false); const [, , referenceAddress] = await readValidator( "reference_validator.refer_only.else", @@ -403,45 +355,36 @@ async function createReferenceUtxos( console.log( "Submitting transactions for", referredValidators.length, - "validators. This might take a while." + "validators ..." ); - const createRefUtxoTxs: string[] = []; - let index = 0; + const result: { [x: string]: UTxO } = {}; + for (const validator of referredValidators) { - const curLucid = deployLucids[index]; - const tx = curLucid.newTx().pay.ToContract( + const tx = lucid.newTx().pay.ToContract( referenceAddress, { kind: "inline", value: Data.void(), }, - {}, + { lovelace: 1_000_000n }, validator ); - const txHash = await submitTx( - tx, - curLucid, - validatorToScriptHash(validator), - true - ); - createRefUtxoTxs.push(txHash); - index++; + const [newWalletUTxOs, derivedOutputs, txSignBuilder] = await tx.chain(); + const signedTx = await txSignBuilder.sign.withWallet().complete(); + await signedTx.submit(); + + lucid.overrideUTxOs(newWalletUTxOs); + + for (const output of derivedOutputs) { + if (output.scriptRef) { + const scriptHash = validatorToScriptHash(output.scriptRef); + result[scriptHash] = output; + } + } } - const txHash = createRefUtxoTxs; - const outRef: OutRef[] = txHash.map((hash) => ({ - txHash: hash, - outputIndex: 0, - })); - const refUtxos = await lucid.utxosByOutRef(outRef); - const result: { [x: string]: UTxO } = {}; - refUtxos.forEach((utxo) => { - const scriptHash = validatorToScriptHash(utxo.scriptRef!); - result[scriptHash] = { ...utxo, datumHash: "" }; - }); - return result; } catch (error) { console.error("createReferenceUtxos ERR: ", error); @@ -489,7 +432,7 @@ const deployHandler = async ( token: { name: HANDLER_TOKEN_NAME, policy_id: mintHandlerPolicyId }, }; - const spendHandlerAddress = credentialToAddress(lucid.config().network || 'Preview', { + const spendHandlerAddress = credentialToAddress(lucid.config().network || 'Custom', { type: "Script", hash: spendHandlerScriptHash, }); @@ -632,7 +575,7 @@ const deployTransferModule = async ( Data.to(outputReference, OutputReference) ) .pay.ToContract( - validatorToAddress(lucid.config().network || 'Preview', spendHandlerValidator), + validatorToAddress(lucid.config().network || 'Custom', spendHandlerValidator), { kind: "inline", value: Data.to(updatedHandlerDatum, HandlerDatum), @@ -673,59 +616,34 @@ const deploySpendChannel = async ( mintPortPolicyId: PolicyId, verifyProofScriptHash: PolicyId ) => { - const knownReferredValidatorsName = [ - "chan_open_ack.mint", - "chan_open_confirm.spend", - "chan_close_init.spend", - "chan_close_confirm.spend", - "recv_packet.mint", - "send_packet.spend", - "timeout_packet.spend", - "acknowledge_packet.spend", - ] as const; - - const moduleNamesToIgnore = [ - "spending_channel_fixture.ak", - ]; - - const referredValidatorsName = ( - await Array.fromAsync(Deno.readDir("../onchain/validators/spending_channel")) - ) - .filter((val) => val.isFile) - // Filtering out test modules - .filter((val) => !val.name.endsWith(".test.ak")) - // Filter out modules to ignore - .filter((val) => moduleNamesToIgnore.indexOf(val.name) == -1) - .map((val) => { - const name = val.name.split(".").slice(0, -1).join("."); - // deno-lint-ignore no-explicit-any - if (!knownReferredValidatorsName.map(name => name.split(".")[0]).includes(name as any)) { - throw new Error( - `Unknown referred validator of spending_channel, expected ${knownReferredValidatorsName}, found: ${name}` - ); - } - return name; - }); + const referredValidators = { + chan_open_ack: "chan_open_ack.mint", + chan_open_confirm: "chan_open_confirm.spend", + chan_close_init: "chan_close_init.spend", + chan_close_confirm: "chan_close_confirm.spend", + recv_packet: "recv_packet.mint", + send_packet: "send_packet.spend", + timeout_packet: "timeout_packet.spend", + acknowledge_packet: "acknowledge_packet.spend", + }; - const referredValidators: Record = + const referredScripts: Record = {}; - for (const name of referredValidatorsName) { + for (const [name, validator] of Object.entries(referredValidators)) { const args = [mintClientPolicyId, mintConnectionPolicyId, mintPortPolicyId]; if (name !== "send_packet" && name !== "chan_close_init") { args.push(verifyProofScriptHash); } - const validator_name = knownReferredValidatorsName.find(fullName => fullName.split(".")[0] === name); - const [script, hash] = await readValidator( - `spending_channel/${name}.${validator_name}`, + `spending_channel/${name}.${validator}`, lucid, args ); - referredValidators[name] = { + referredScripts[name] = { script, hash, }; @@ -734,7 +652,7 @@ const deploySpendChannel = async ( const [script, hash, address] = await readValidator( "spending_channel.spend_channel.spend", lucid, - knownReferredValidatorsName.map((name) => referredValidators[name.split(".")[0]].hash) + Object.keys(referredValidators).map((name) => referredScripts[name].hash) ); return { @@ -743,22 +661,6 @@ const deploySpendChannel = async ( hash, address, }, - referredValidators, + referredScripts, }; }; - -const main = async () => { - if (Deno.args.length < 1) throw new Error("Missing script params"); - - const MODE = Deno.args[0]; - - const { lucid, provider } = await setUp(MODE); - - const deploymentInfo = await createDeployment(lucid, provider, MODE); - - console.log(deploymentInfo); -}; - -if (import.meta.main) { - main(); -} diff --git a/cardano/offchain/src/template.ts b/cardano/offchain/src/template.ts deleted file mode 100644 index 5cc7c6c04..000000000 --- a/cardano/offchain/src/template.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { UTxO } from "npm:@lucid-evolution/lucid@0.4.18"; - -type Validator = - | "spendHandler" - | "mintClient" - | "spendClient" - | "mintConnection" - | "spendConnection" - | "mintChannel" - | "spendChannel" - | "mintPort" - | "mintIdentifier" - | "spendTransferModule" - | "mintVoucher" - | "verifyProof"; - -type Module = "handler" | "transfer"; - -type Tokens = "mock"; - -export type DeploymentTemplate = { - validators: Record< - Validator, - { - title: string; - script: string; - scriptHash: string; - address: string; - refUtxo: UTxO; - refValidator?: Record< - string, - { script: string; scriptHash: string; refUtxo: UTxO } - >; - } - >; - handlerAuthToken: { - policyId: string; - name: string; - }; - modules: Record< - Module, - { - identifier: string; - address: string; - } - >; - tokens: Record; -}; diff --git a/cardano/offchain/src/utils.ts b/cardano/offchain/src/utils.ts index c5daf422a..bebb790ae 100644 --- a/cardano/offchain/src/utils.ts +++ b/cardano/offchain/src/utils.ts @@ -1,36 +1,22 @@ import blueprint from "../../onchain/plutus.json" with { type: "json" }; +import { crypto } from "@std/crypto"; import { validatorToScriptHash, validatorToAddress, Address, applyParamsToScript, - Blockfrost, Data, - Emulator, Exact, fromHex, fromText, - Kupmios, - Lucid, - PROTOCOL_PARAMETERS_DEFAULT, - Provider, Script, ScriptHash, - SLOT_CONFIG_NETWORK, toHex, TxBuilder, UTxO, LucidEvolution, } from "@lucid-evolution/lucid"; -import { - BLOCKFROST_ENV, - EMULATOR_ENV, - KUPMIOS_ENV, - LOCAL_ENV, -} from "./constants.ts"; -import { AuthToken } from "../lucid-types/ibc/auth/AuthToken.ts"; -import { OutputReference } from "../lucid-types/cardano/transaction/OutputReference.ts"; -import { crypto } from "@std/crypto"; +import { AuthToken, OutputReference } from "../types/index.ts"; export const readValidator = ( title: string, @@ -56,7 +42,7 @@ export const readValidator = ( }; } - return [validator, validatorToScriptHash(validator), validatorToAddress(lucid.config().network || 'Preview', validator)]; + return [validator, validatorToScriptHash(validator), validatorToAddress(lucid.config().network || 'Custom', validator)]; }; export const submitTx = async ( @@ -78,7 +64,7 @@ export const submitTx = async ( const txHash = await signedTx.submit(); console.log("Submitting tx [", txName, "]: tx hash is", txHash); console.log("Submitting tx [", txName, "]: waiting for adoption ..."); - await lucid.awaitTx(txHash, 2000); + await lucid.awaitTx(txHash, 1000); console.log("Submitting tx [", txName, "]: done"); return txHash; }; @@ -99,66 +85,6 @@ export const formatTimestamp = (timestampInMilliseconds: number): string => { return formattedDate; }; -export type Signer = { - sk: string; - address: string; -}; - -export const setUp = async ( - mode: string -): Promise<{ lucid: LucidEvolution; signer: Signer; provider: Provider }> => { - const signer = { - sk: "ed25519_sk1rvgjxs8sddhl46uqtv862s53vu4jf6lnk63rcn7f0qwzyq85wnlqgrsx42", - address: "addr_test1vz8nzrmel9mmmu97lm06uvm55cj7vny6dxjqc0y0efs8mtqsd8r5m", - }; - let provider: Provider; - let lucid: LucidEvolution; - if (mode == EMULATOR_ENV) { - console.log("Deploy in Emulator env"); - provider = new Emulator( - [ - { address: signer.address, assets: { lovelace: 3000000000000n }, privateKey: signer.sk, seedPhrase: '' }, - { address: signer.address, assets: { lovelace: 3000000000000n }, privateKey: signer.sk, seedPhrase: '' }, - ], - { ...PROTOCOL_PARAMETERS_DEFAULT, maxTxSize: 900000 } - ); - lucid = await Lucid(provider, "Preview"); - } else if (mode == KUPMIOS_ENV) { - const kupo = "http://192.168.10.136:1442"; - const ogmios = "http://192.168.10.136:1337"; - console.log("Deploy in Kupmios", kupo, ogmios); - provider = new Kupmios(kupo, ogmios); - const chainZeroTime = await querySystemStart(ogmios); - SLOT_CONFIG_NETWORK.Preview.zeroTime = chainZeroTime; - lucid = await Lucid(provider, "Preview"); - } else if (mode == LOCAL_ENV) { - const kupo = "http://localhost:1442"; - const ogmios = "http://localhost:1337"; - console.log("Deploy in local", kupo, ogmios); - provider = new Kupmios(kupo, ogmios); - - const chainZeroTime = await querySystemStart(ogmios); - SLOT_CONFIG_NETWORK.Preview.zeroTime = chainZeroTime; - lucid = await Lucid(provider, "Custom"); - } else if (mode == BLOCKFROST_ENV) { - provider = new Blockfrost( - "https://cardano-preview.blockfrost.io/api/v0", - "preview2fjKEg2Zh687WPUwB8eljT2Mz2q045GC" - ); - lucid = await Lucid(provider, "Preview"); - } else { - throw new Error("Invalid provider type"); - } - - lucid.selectWallet.fromPrivateKey(signer.sk); - - return { - lucid, - signer, - provider, - }; -}; - export const generateTokenName = async ( baseToken: AuthToken, prefix: string, @@ -212,11 +138,13 @@ export const querySystemStart = async (ogmiosUrl: string) => { client.addEventListener('open', () => console.log('WebSocket connection opened.')); client.addEventListener('close', (event) => { - console.log('WebSocket connection closed.', { - code: event.code, - reason: event.reason, - wasClean: event.wasClean, - }); + if (!event.wasClean) { + console.log('WebSocket connection closed.', { + code: event.code, + reason: event.reason, + wasClean: event.wasClean, + }); + } }); client.addEventListener('error', (err) => console.log('WebSocket error:', err)); @@ -242,152 +170,11 @@ export const querySystemStart = async (ogmiosUrl: string) => { return parsedSystemTime; }; -export const delay = (duration: number) => { - let elapsedSeconds = 1; - - const logElapsedTime = () => { - Deno.stdout.writeSync( - new TextEncoder().encode(`\rElapsed time: ${elapsedSeconds}s`) - ); - elapsedSeconds++; - }; - - const intervalId = setInterval(logElapsedTime, 1000); - - console.log(`Delay ${duration}s`); - - return new Promise((resolve) => { - setTimeout(() => { - clearInterval(intervalId); - Deno.stdout.writeSync( - new TextEncoder().encode(`\rElapsed time: ${elapsedSeconds}s`) - ); - Deno.stdout.writeSync(new TextEncoder().encode(`\r`)); - resolve(); - }, duration * 1000); - }); -}; - -export const parseClientSequence = (clientId: string): bigint => { - const fragments = clientId.split("-"); - - if (fragments.length < 2) throw new Error("Invalid client id format"); - - if (!(fragments.slice(0, -1).join("") === "ibc_client")) { - throw new Error("Invalid client id format"); - } - - return BigInt(fragments.pop()!); -}; - -export const parseConnectionSequence = (connectionId: string): bigint => { - const fragments = connectionId.split("-"); - - if (fragments.length != 2) throw new Error("Invalid connection id format"); - - if (!(fragments.slice(0, -1).join("") === "connection")) { - throw new Error("Invalid connection id format"); - } - - return BigInt(fragments.pop()!); -}; -export const parseChannelSequence = (channelId: string): bigint => { - const fragments = channelId.split("-"); - - if (fragments.length != 2) throw new Error("Invalid channel id format"); - - if (!(fragments.slice(0, -1).join("") === "channel")) { - throw new Error("Invalid channel id format"); - } - - return BigInt(fragments.pop()!); -}; - -export const createReferenceScriptUtxo = async ( - lucid: LucidEvolution, - referredScript: Script -) => { - const [, , referenceAddress] = readValidator( - "reference_validator.refer_only.else", - lucid - ); - - const tx = lucid.newTx().pay.ToContract( - referenceAddress, - { - kind: 'inline', - value: Data.void(), - }, - {}, - referredScript, - ); - const completedTx = await tx.complete(); - const signedTx = await completedTx.sign.withWallet().complete(); - const txHash = await signedTx.submit(); - - await lucid.awaitTx(txHash, 2000); - - const referenceUtxo = ( - await lucid.utxosByOutRef([{ txHash, outputIndex: 0 }]) - )[0]; - - return referenceUtxo; -}; - export const generateIdentifierTokenName = (outRef: OutputReference) => { const serializedData = Data.to(outRef, OutputReference); return hashSha3_256(serializedData); }; -export const insertSortMap = ( - inputMap: Map, - newKey: K, - newValue: V, - keyComparator?: (a: K, b: K) => number -): Map => { - // Convert the Map to an array of key-value pairs - const entriesArray: [K, V][] = Array.from(inputMap.entries()); - - // Add the new key-value pair to the array - entriesArray.push([newKey, newValue]); - - // Sort the array based on the keys using the provided comparator function - entriesArray.sort((entry1, entry2) => - keyComparator - ? keyComparator(entry1[0], entry2[0]) - : Number(entry1[0]) - Number(entry2[0]) - ); - - // Create a new Map from the sorted array - const sortedMap = new Map(entriesArray); - - return sortedMap; -}; - -export const deleteSortMap = ( - sortedMap: Map, - keyToDelete: K, - keyComparator?: (a: K, b: K) => number -): Map => { - // Convert the sorted map to an array of key-value pairs - const entriesArray: [K, V][] = Array.from(sortedMap.entries()); - - // Find the index of the key to delete - const indexToDelete = entriesArray.findIndex(([key]) => - keyComparator ? keyComparator(key, keyToDelete) === 0 : key === keyToDelete - ); - - // If the key is found, remove it from the array - if (indexToDelete !== -1) { - entriesArray.splice(indexToDelete, 1); - } - - // Create a new Map from the modified array - const updatedMap = new Map(entriesArray); - - return updatedMap; -}; - export const getNonceOutRef = async ( lucid: LucidEvolution ): Promise<[UTxO, OutputReference]> => { @@ -401,3 +188,50 @@ export const getNonceOutRef = async ( return [NONCE_UTXO, outputReference]; }; + +type Validator = + | "spendHandler" + | "mintClient" + | "spendClient" + | "mintConnection" + | "spendConnection" + | "mintChannel" + | "spendChannel" + | "mintPort" + | "mintIdentifier" + | "spendTransferModule" + | "mintVoucher" + | "verifyProof"; + +type Module = "handler" | "transfer"; + +type Tokens = "mock"; + +export type DeploymentTemplate = { + validators: Record< + Validator, + { + title: string; + script: string; + scriptHash: string; + address: string; + refUtxo: UTxO; + refValidator?: Record< + string, + { script: string; scriptHash: string; refUtxo: UTxO } + >; + } + >; + handlerAuthToken: { + policyId: string; + name: string; + }; + modules: Record< + Module, + { + identifier: string; + address: string; + } + >; + tokens: Record; +}; diff --git a/cardano/offchain/types/index.ts b/cardano/offchain/types/index.ts new file mode 100644 index 000000000..447362dcd --- /dev/null +++ b/cardano/offchain/types/index.ts @@ -0,0 +1 @@ +export * from './plutus/index.ts' \ No newline at end of file diff --git a/cardano/offchain/types/plutus/AuthToken.ts b/cardano/offchain/types/plutus/AuthToken.ts new file mode 100644 index 000000000..f4b24ab52 --- /dev/null +++ b/cardano/offchain/types/plutus/AuthToken.ts @@ -0,0 +1,8 @@ +import { Data } from "@lucid-evolution/lucid"; + +export const AuthTokenSchema = Data.Object({ + policy_id: Data.Bytes(), + name: Data.Bytes(), +}); +export type AuthToken = Data.Static; +export const AuthToken = AuthTokenSchema as unknown as AuthToken; diff --git a/cardano/offchain/types/plutus/HandlerDatum.ts b/cardano/offchain/types/plutus/HandlerDatum.ts new file mode 100644 index 000000000..633c94718 --- /dev/null +++ b/cardano/offchain/types/plutus/HandlerDatum.ts @@ -0,0 +1,10 @@ +import { Data } from "@lucid-evolution/lucid"; +import { HandlerStateSchema } from "./HandlerState.ts"; +import { AuthTokenSchema } from "./AuthToken.ts"; + +export const HandlerDatumSchema = Data.Object({ + state: HandlerStateSchema, + token: AuthTokenSchema, +}); +export type HandlerDatum = Data.Static; +export const HandlerDatum = HandlerDatumSchema as unknown as HandlerDatum; diff --git a/cardano/offchain/types/plutus/HandlerOperator.ts b/cardano/offchain/types/plutus/HandlerOperator.ts new file mode 100644 index 000000000..0ff07dc98 --- /dev/null +++ b/cardano/offchain/types/plutus/HandlerOperator.ts @@ -0,0 +1,13 @@ +import { Data } from "@lucid-evolution/lucid"; + +export const HandlerOperatorSchema = Data.Enum([ + Data.Literal("CreateClient"), + Data.Literal("HandlerConnOpenInit"), + Data.Literal("HandlerConnOpenTry"), + Data.Literal("HandlerChanOpenInit"), + Data.Literal("HandlerChanOpenTry"), + Data.Literal("HandlerBindPort"), +]); +export type HandlerOperator = Data.Static; +export const HandlerOperator = + HandlerOperatorSchema as unknown as HandlerOperator; diff --git a/cardano/offchain/types/plutus/HandlerState.ts b/cardano/offchain/types/plutus/HandlerState.ts new file mode 100644 index 000000000..8b97e6d3b --- /dev/null +++ b/cardano/offchain/types/plutus/HandlerState.ts @@ -0,0 +1,10 @@ +import { Data } from "@lucid-evolution/lucid"; + +export const HandlerStateSchema = Data.Object({ + next_client_sequence: Data.Integer(), + next_connection_sequence: Data.Integer(), + next_channel_sequence: Data.Integer(), + bound_port: Data.Array(Data.Integer()), +}); +export type HandlerState = Data.Static; +export const HandlerState = HandlerStateSchema as unknown as HandlerState; diff --git a/cardano/offchain/types/plutus/MintPortRedeemer.ts b/cardano/offchain/types/plutus/MintPortRedeemer.ts new file mode 100644 index 000000000..4ff0df6be --- /dev/null +++ b/cardano/offchain/types/plutus/MintPortRedeemer.ts @@ -0,0 +1,11 @@ +import { Data } from "@lucid-evolution/lucid"; +import { AuthTokenSchema } from "./AuthToken.ts"; + +export const MintPortRedeemerSchema = Data.Object({ + handler_token: AuthTokenSchema, + spend_module_script_hash: Data.Bytes(), + port_number: Data.Integer(), +}); +export type MintPortRedeemer = Data.Static; +export const MintPortRedeemer = + MintPortRedeemerSchema as unknown as MintPortRedeemer; diff --git a/cardano/offchain/types/plutus/OutputReference.ts b/cardano/offchain/types/plutus/OutputReference.ts new file mode 100644 index 000000000..5536562f9 --- /dev/null +++ b/cardano/offchain/types/plutus/OutputReference.ts @@ -0,0 +1,8 @@ +import { Data } from "@lucid-evolution/lucid"; +export const OutputReferenceSchema = Data.Object({ + transaction_id: Data.Bytes(), + output_index: Data.Integer(), +}); +export type OutputReference = Data.Static; +export const OutputReference = + OutputReferenceSchema as unknown as OutputReference; diff --git a/cardano/offchain/types/plutus/index.ts b/cardano/offchain/types/plutus/index.ts new file mode 100644 index 000000000..e8f6dcc00 --- /dev/null +++ b/cardano/offchain/types/plutus/index.ts @@ -0,0 +1,6 @@ +export * from './HandlerDatum.ts'; +export * from './HandlerState.ts'; +export * from './HandlerOperator.ts'; +export * from './AuthToken.ts'; +export * from './MintPortRedeemer.ts'; +export * from './OutputReference.ts'; \ No newline at end of file diff --git a/cardano/onchain/validators/spending_transfer_module.ak b/cardano/onchain/validators/spending_transfer_module.ak index bc9bf60c8..e47c834c4 100644 --- a/cardano/onchain/validators/spending_transfer_module.ak +++ b/cardano/onchain/validators/spending_transfer_module.ak @@ -117,8 +117,11 @@ fn validate_output_amount( locked_input.output.value |> assets.merge(additional_value) trace @"expected_output": expected_output + + let expected_lovelace_output = assets.lovelace_of(expected_output) + trace @"expected_lovelace_output": expected_lovelace_output and { - (lovelace_output - lovelace_input >= 0)?, + (lovelace_output - expected_lovelace_output >= 0)?, (assets.without_lovelace(output.value) == assets.without_lovelace( expected_output, ))?, diff --git a/caribic/src/config.rs b/caribic/src/config.rs index 5e2b708d9..e7d31e2a4 100644 --- a/caribic/src/config.rs +++ b/caribic/src/config.rs @@ -187,10 +187,10 @@ impl Config { genesis_secret_key: "5b3131382c3138342c3232342c3137332c3136302c3234312c36312c3134342c36342c39332c3130362c3232392c38332c3133342c3138392c34302c3138392c3231302c32352c3138342c3136302c3134312c3233372c32362c3136382c35342c3233392c3230342c3133392c3131392c31332c3139395d".to_string(), chain_observer_type: "pallas".to_string(), cardano_node_dir: "/root/.caribic/cardano-ibc-incubator/chains/cardano/devnet".to_string(), - cardano_node_version: "9.1.1".to_string(), - aggregator_image: "ghcr.io/input-output-hk/mithril-aggregator:main-9fd9ae8".to_string(), - client_image: "ghcr.io/input-output-hk/mithril-client:main-9fd9ae8".to_string(), - signer_image: "ghcr.io/input-output-hk/mithril-signer:main-9fd9ae8".to_string(), + cardano_node_version: "9.1.4".to_string(), + aggregator_image: "ghcr.io/input-output-hk/mithril-aggregator:2450.0-c6c7eba".to_string(), + signer_image: "ghcr.io/input-output-hk/mithril-signer:2450.0-c6c7eba".to_string(), + client_image: "ghcr.io/input-output-hk/mithril-client:2450.0-c6c7eba".to_string(), } }, local_osmosis: true, diff --git a/caribic/src/main.rs b/caribic/src/main.rs index b0e8f0c84..83c40cc03 100644 --- a/caribic/src/main.rs +++ b/caribic/src/main.rs @@ -287,7 +287,7 @@ async fn main() { if target == StartTarget::Network || target == StartTarget::All { // Start the local Cardano network and its services - match start_local_cardano_network(&project_root_path).await { + match start_local_cardano_network(&project_root_path, clean).await { Ok(_) => logger::log("✅ Local Cardano network has been started and prepared"), Err(error) => network_down_with_error(&format!( "❌ Failed to start local Cardano network: {}", @@ -322,7 +322,7 @@ async fn main() { project_root_path, "addr_test1vz8nzrmel9mmmu97lm06uvm55cj7vny6dxjqc0y0efs8mtqsd8r5m", ); - logger::log(&format!( + logger::info(&format!( "Initial balance {}", &balance.to_string().as_str() )); @@ -340,7 +340,7 @@ async fn main() { project_root_path, "addr_test1vz8nzrmel9mmmu97lm06uvm55cj7vny6dxjqc0y0efs8mtqsd8r5m", ); - logger::log(&format!( + logger::info(&format!( "Post deploy contract balance {}", &balance.to_string().as_str() )); diff --git a/caribic/src/setup.rs b/caribic/src/setup.rs index 77d7372bb..902cebc44 100644 --- a/caribic/src/setup.rs +++ b/caribic/src/setup.rs @@ -479,7 +479,10 @@ fn get_genesis_hash(era: String, script_dir: &Path) -> Result Result<(), Box> { +pub fn prepare_db_sync_and_gateway( + cardano_dir: &Path, + clean: bool, +) -> Result<(), Box> { let devnet_dir = cardano_dir.join("devnet"); let cardano_node_db = devnet_dir.join("cardano-node-db.json"); @@ -562,7 +565,12 @@ pub fn prepare_db_sync(cardano_dir: &Path) -> Result<(), Box Result<(), Box> { let optional_progress_bar = match logger::get_verbosity() { logger::Verbosity::Verbose => None, @@ -100,7 +101,7 @@ pub async fn start_local_cardano_network( log_or_show_progress( &format!( "{} 🛠️ Configuring local Cardano devnet", - style("Step 1/5").bold().dim(), + style("Step 1/3").bold().dim(), ), &optional_progress_bar, ); @@ -108,7 +109,7 @@ pub async fn start_local_cardano_network( log_or_show_progress( &format!( "{} 🚀 Starting Cardano services", - style("Step 2/5").bold().dim(), + style("Step 2/3").bold().dim(), ), &optional_progress_bar, ); @@ -195,7 +196,7 @@ pub async fn start_local_cardano_network( ); if config::get_config().cardano.services.db_sync { - prepare_db_sync(cardano_dir.as_path())?; + prepare_db_sync_and_gateway(cardano_dir.as_path(), clean)?; execute_script( &cardano_dir, "docker", @@ -207,7 +208,7 @@ pub async fn start_local_cardano_network( log_or_show_progress( &format!( "{} 📝 Copying Cardano environment file", - style("Step 3/5").bold().dim(), + style("Step 3/3").bold().dim(), ), &optional_progress_bar, ); @@ -226,6 +227,7 @@ pub async fn deploy_contracts( }; let is_verbose = logger::get_verbosity() == logger::Verbosity::Verbose; + let mut validators_rebuild = false; if !project_root_path .join("cardano") @@ -238,7 +240,7 @@ pub async fn deploy_contracts( log_or_show_progress( &format!( "{} 🛠️ Building Aiken validators", - style("Step 4/5").bold().dim() + style("Step 1/2").bold().dim() ), &optional_progress_bar, ); @@ -255,63 +257,64 @@ pub async fn deploy_contracts( build_args, None, )?; + validators_rebuild = true; } else { log_or_show_progress( &format!( "{} 🛠️ Aiken validators already built", - style("Step 4/5").bold().dim() + style("Step 1/2").bold().dim() ), &optional_progress_bar, ); } - log_or_show_progress( - &format!( - "{} 🤖 Generating validator off-chain types", - style("Step 5/5").bold().dim(), - ), - &optional_progress_bar, - ); - execute_script( - project_root_path.join("cardano").as_path(), - "deno", - Vec::from(["run", "-A", "./aiken-type-conversion/main.ts"]), - None, - )?; + if validators_rebuild { + let _ = execute_script( + project_root_path.join("cardano").join("offchain").as_path(), + "deno", + Vec::from(["task", "clean"]), + None, + ); + } // Remove the old handler file - if project_root_path + if !project_root_path .join("cardano/offchain/deployments/handler.json") .exists() { - fs::remove_file(project_root_path.join("cardano/offchain/deployments/handler.json")) - .expect("Failed to cleanup cardano/offchain/deployments/handler.json"); - } - - let handler_json_exists = wait_until_file_exists( - project_root_path - .join("cardano/offchain/deployments/handler.json") - .as_path(), - 20, - 5000, - || { - let _ = execute_script( - project_root_path.join("cardano").join("offchain").as_path(), - "deno", - Vec::from(["task", "start"]), - None, - ); - }, - ); - - if let Some(progress_bar) = &optional_progress_bar { - progress_bar.finish_and_clear(); - } + let handler_json_exists = wait_until_file_exists( + project_root_path + .join("cardano/offchain/deployments/handler.json") + .as_path(), + 20, + 5000, + || { + let _ = execute_script( + project_root_path.join("cardano").join("offchain").as_path(), + "deno", + Vec::from(["task", "start"]), + None, + ); + }, + ); - if handler_json_exists.is_ok() { - Ok(()) + if let Some(progress_bar) = &optional_progress_bar { + progress_bar.finish_and_clear(); + } + if handler_json_exists.is_ok() { + Ok(()) + } else { + Err("❌ Failed to start Cardano services. The handler.json file should have been created, but it doesn't exist. Consider running the start command again using --verbose 5.".into()) + } } else { - Err("❌ Failed to start Cardano services. The handler.json file should have been created, but it doesn't exist. Consider running the start command again using --verbose 5.".into()) + log_or_show_progress( + "✅ The handler.json file already exists. Skipping the deployment.", + &optional_progress_bar, + ); + if let Some(progress_bar) = &optional_progress_bar { + progress_bar.finish_and_clear(); + } + Ok(()) } } @@ -437,12 +440,7 @@ pub async fn start_osmosis(osmosis_dir: &Path) -> Result<(), Box Result<(), Box Result<(), Box> { - if (gateway_dir.join(".env").exists() && clean) || !gateway_dir.join(".env").exists() { - let options = fs_extra::file::CopyOptions::new().overwrite(true); - copy( - gateway_dir.join(".env.example"), - gateway_dir.join(".env"), - &options, - )?; - } - let mut script_args = vec!["compose", "up", "-d"]; if clean { script_args.push("--build"); diff --git a/caribic/src/stop.rs b/caribic/src/stop.rs index ec906cea2..c466a87fc 100644 --- a/caribic/src/stop.rs +++ b/caribic/src/stop.rs @@ -41,13 +41,16 @@ pub fn stop_cardano_network(project_root_path: &Path) { } pub fn stop_cosmos(cosmos_path: &Path) { - let cosmos_result = execute_script(cosmos_path, "docker", Vec::from(["compose", "down"]), None); - match cosmos_result { - Ok(_) => { - log("❎ Cosmos stopped successfully"); - } - Err(e) => { - error(&format!("❌ Failed to stop Cosmos: {}", e)); + if cosmos_path.exists() { + let cosmos_result = + execute_script(cosmos_path, "docker", Vec::from(["compose", "down"]), None); + match cosmos_result { + Ok(_) => { + log("❎ Cosmos stopped successfully"); + } + Err(e) => { + error(&format!("❌ Failed to stop Cosmos: {}", e)); + } } } } diff --git a/chains/cardano/config/protocol-parameters.json b/chains/cardano/config/protocol-parameters.json deleted file mode 100644 index 3a95d3c00..000000000 --- a/chains/cardano/config/protocol-parameters.json +++ /dev/null @@ -1,386 +0,0 @@ -{ - "collateralPercentage": 150, - "costModels": { - "PlutusV1": [ - 205665, - 812, - 1, - 1, - 1000, - 571, - 0, - 1, - 1000, - 24177, - 4, - 1, - 1000, - 32, - 117366, - 10475, - 4, - 23000, - 100, - 23000, - 100, - 23000, - 100, - 23000, - 100, - 23000, - 100, - 23000, - 100, - 100, - 100, - 23000, - 100, - 19537, - 32, - 175354, - 32, - 46417, - 4, - 221973, - 511, - 0, - 1, - 89141, - 32, - 497525, - 14068, - 4, - 2, - 196500, - 453240, - 220, - 0, - 1, - 1, - 1000, - 28662, - 4, - 2, - 245000, - 216773, - 62, - 1, - 1060367, - 12586, - 1, - 208512, - 421, - 1, - 187000, - 1000, - 52998, - 1, - 80436, - 32, - 43249, - 32, - 1000, - 32, - 80556, - 1, - 57667, - 4, - 1000, - 10, - 197145, - 156, - 1, - 197145, - 156, - 1, - 204924, - 473, - 1, - 208896, - 511, - 1, - 52467, - 32, - 64832, - 32, - 65493, - 32, - 22558, - 32, - 16563, - 32, - 76511, - 32, - 196500, - 453240, - 220, - 0, - 1, - 1, - 69522, - 11687, - 0, - 1, - 60091, - 32, - 196500, - 453240, - 220, - 0, - 1, - 1, - 196500, - 453240, - 220, - 0, - 1, - 1, - 806990, - 30482, - 4, - 1927926, - 82523, - 4, - 265318, - 0, - 4, - 0, - 85931, - 32, - 205665, - 812, - 1, - 1, - 41182, - 32, - 212342, - 32, - 31220, - 32, - 32696, - 32, - 43357, - 32, - 32247, - 32, - 38314, - 32, - 57996947, - 18975, - 10 - ], - "PlutusV2": [ - 205665, - 812, - 1, - 1, - 1000, - 571, - 0, - 1, - 1000, - 24177, - 4, - 1, - 1000, - 32, - 117366, - 10475, - 4, - 23000, - 100, - 23000, - 100, - 23000, - 100, - 23000, - 100, - 23000, - 100, - 23000, - 100, - 100, - 100, - 23000, - 100, - 19537, - 32, - 175354, - 32, - 46417, - 4, - 221973, - 511, - 0, - 1, - 89141, - 32, - 497525, - 14068, - 4, - 2, - 196500, - 453240, - 220, - 0, - 1, - 1, - 1000, - 28662, - 4, - 2, - 245000, - 216773, - 62, - 1, - 1060367, - 12586, - 1, - 208512, - 421, - 1, - 187000, - 1000, - 52998, - 1, - 80436, - 32, - 43249, - 32, - 1000, - 32, - 80556, - 1, - 57667, - 4, - 1000, - 10, - 197145, - 156, - 1, - 197145, - 156, - 1, - 204924, - 473, - 1, - 208896, - 511, - 1, - 52467, - 32, - 64832, - 32, - 65493, - 32, - 22558, - 32, - 16563, - 32, - 76511, - 32, - 196500, - 453240, - 220, - 0, - 1, - 1, - 69522, - 11687, - 0, - 1, - 60091, - 32, - 196500, - 453240, - 220, - 0, - 1, - 1, - 196500, - 453240, - 220, - 0, - 1, - 1, - 1159724, - 392670, - 0, - 2, - 806990, - 30482, - 4, - 1927926, - 82523, - 4, - 265318, - 0, - 4, - 0, - 85931, - 32, - 205665, - 812, - 1, - 1, - 41182, - 32, - 212342, - 32, - 31220, - 32, - 32696, - 32, - 43357, - 32, - 32247, - 32, - 38314, - 32, - 35892428, - 10, - 57996947, - 18975, - 10, - 38887044, - 32947, - 10 - ] - }, - "decentralization": null, - "executionUnitPrices": { - "priceMemory": 0, - "priceSteps": 0 - }, - "extraPraosEntropy": null, - "maxBlockBodySize": 65536, - "maxBlockExecutionUnits": { - "memory": 620000000, - "steps": 400000000000 - }, - "maxBlockHeaderSize": 1100, - "maxCollateralInputs": 3, - "maxTxExecutionUnits": { - "memory": 140000000, - "steps": 100000000000 - }, - "maxTxSize": 56000, - "maxValueSize": 5000, - "minPoolCost": 0, - "minUTxOValue": null, - "monetaryExpansion": 0.1, - "poolPledgeInfluence": 0, - "poolRetireMaxEpoch": 18, - "protocolVersion": { - "major": 7, - "minor": 0 - }, - "stakeAddressDeposit": 0, - "stakePoolDeposit": 0, - "stakePoolTargetNum": 100, - "treasuryCut": 0.1, - "txFeeFixed": 0, - "txFeePerByte": 0, - "utxoCostPerByte": 0, - "utxoCostPerWord": 0 -} diff --git a/cosmos/ibcclientest/go.mod b/cosmos/ibcclientest/go.mod index 07dbbed3e..f5992ed27 100644 --- a/cosmos/ibcclientest/go.mod +++ b/cosmos/ibcclientest/go.mod @@ -1,25 +1,25 @@ module ibcclient -go 1.21.1 +go 1.23.0 -toolchain go1.21.3 +toolchain go1.24.1 require ( - github.com/cometbft/cometbft v0.38.5 + github.com/cometbft/cometbft v0.38.12 + github.com/cosmos/cosmos-sdk v0.50.13 github.com/ignite/cli/v28 v28.2.0 ) require ( - cosmossdk.io/api v0.7.2 // indirect + cosmossdk.io/api v0.7.6 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/core v0.11.0 // indirect - cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/depinject v1.1.0 // indirect cosmossdk.io/errors v1.0.1 // indirect - cosmossdk.io/log v1.3.0 // indirect - cosmossdk.io/math v1.2.0 // indirect - cosmossdk.io/store v1.0.2 // indirect - cosmossdk.io/x/tx v0.13.0 // indirect - cosmossdk.io/x/upgrade v0.1.1 // indirect + cosmossdk.io/log v1.4.1 // indirect + cosmossdk.io/math v1.4.0 // indirect + cosmossdk.io/store v1.1.1 // indirect + cosmossdk.io/x/tx v0.13.7 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.2 // indirect @@ -28,30 +28,30 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/cockroachdb/errors v1.11.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20231102162011-844f0582c2eb // indirect + github.com/cockroachdb/pebble v1.1.2 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cometbft/cometbft-db v0.9.1 // indirect + github.com/cometbft/cometbft-db v0.11.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect - github.com/cosmos/cosmos-db v1.0.0 // indirect - github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect - github.com/cosmos/cosmos-sdk v0.50.3 // indirect + github.com/cosmos/cosmos-db v1.1.1 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/gogoproto v1.4.11 // indirect - github.com/cosmos/iavl v1.0.0 // indirect + github.com/cosmos/gogoproto v1.7.0 // indirect + github.com/cosmos/iavl v1.2.2 // indirect github.com/cosmos/ibc-go/modules/capability v1.0.0 // indirect github.com/cosmos/ibc-go/v8 v8.0.0 // indirect - github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect - github.com/danieljoos/wincred v1.2.0 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.14.0 // indirect + github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect @@ -60,31 +60,31 @@ require ( github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect - github.com/emicklei/dot v1.6.0 // indirect + github.com/emicklei/dot v1.6.2 // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/getsentry/sentry-go v0.25.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect - github.com/gogo/protobuf v1.3.3 // indirect - github.com/golang/glog v1.2.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/glog v1.2.2 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/btree v1.1.2 // indirect + github.com/google/btree v1.1.3 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/mux v1.8.1 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect - github.com/hashicorp/go-metrics v0.5.2 // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect @@ -95,63 +95,62 @@ require ( github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.17.4 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.6 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.0 // indirect - github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect + github.com/pelletier/go-toml/v2 v2.2.2 // indirect + github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.17.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.45.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/client_golang v1.20.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/rs/cors v1.10.1 // indirect - github.com/rs/zerolog v1.31.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/cors v1.11.1 // indirect + github.com/rs/zerolog v1.33.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/cast v1.6.0 // indirect - github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/cast v1.7.1 // indirect + github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/spf13/viper v1.18.2 // indirect - github.com/stretchr/testify v1.8.4 // indirect + github.com/spf13/viper v1.19.0 // indirect + github.com/stretchr/testify v1.10.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.7.0 // indirect github.com/zondax/hid v0.9.2 // indirect github.com/zondax/ledger-go v0.14.3 // indirect - go.etcd.io/bbolt v1.3.8 // indirect - go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.18.0 // indirect - golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/term v0.16.0 // indirect - golang.org/x/text v0.14.0 // indirect - google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect - google.golang.org/grpc v1.60.1 // indirect - google.golang.org/protobuf v1.32.0 // indirect + go.etcd.io/bbolt v1.3.10 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/crypto v0.36.0 // indirect + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect + golang.org/x/mod v0.17.0 // indirect + golang.org/x/net v0.38.0 // indirect + golang.org/x/sync v0.12.0 // indirect + golang.org/x/sys v0.31.0 // indirect + golang.org/x/term v0.30.0 // indirect + golang.org/x/text v0.23.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect @@ -159,7 +158,3 @@ require ( pgregory.net/rapid v1.1.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) - -replace sidechain => ../../sidechain - -replace github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 diff --git a/cosmos/ibcclientest/go.sum b/cosmos/ibcclientest/go.sum index 263cd8a6d..44be095f6 100644 --- a/cosmos/ibcclientest/go.sum +++ b/cosmos/ibcclientest/go.sum @@ -1,25 +1,25 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= -cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.6 h1:PC20PcXy1xYKH2KU4RMurVoFjjKkCgYRbVAD4PdqUuY= +cosmossdk.io/api v0.7.6/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= -cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= -cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= +cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= -cosmossdk.io/log v1.3.0 h1:L0Z0XstClo2kOU4h3V1iDoE5Ji64sg5HLOogzGg67Oo= -cosmossdk.io/log v1.3.0/go.mod h1:HIDyvWLqZe2ovlWabsDN4aPMpY/nUEquAhgfTf2ZzB8= -cosmossdk.io/math v1.2.0 h1:8gudhTkkD3NxOP2YyyJIYYmt6dQ55ZfJkDOaxXpy7Ig= -cosmossdk.io/math v1.2.0/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= -cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= -cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= -cosmossdk.io/x/tx v0.13.0 h1:8lzyOh3zONPpZv2uTcUmsv0WTXy6T1/aCVDCqShmpzU= -cosmossdk.io/x/tx v0.13.0/go.mod h1:CpNQtmoqbXa33/DVxWQNx5Dcnbkv2xGUhL7tYQ5wUsY= -cosmossdk.io/x/upgrade v0.1.1 h1:aoPe2gNvH+Gwt/Pgq3dOxxQVU3j5P6Xf+DaUJTDZATc= -cosmossdk.io/x/upgrade v0.1.1/go.mod h1:MNLptLPcIFK9CWt7Ra//8WUZAxweyRDNcbs5nkOcQy0= +cosmossdk.io/log v1.4.1 h1:wKdjfDRbDyZRuWa8M+9nuvpVYxrEOwbD/CA8hvhU8QM= +cosmossdk.io/log v1.4.1/go.mod h1:k08v0Pyq+gCP6phvdI6RCGhLf/r425UT6Rk/m+o74rU= +cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= +cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= +cosmossdk.io/store v1.1.1 h1:NA3PioJtWDVU7cHHeyvdva5J/ggyLDkyH0hGHl2804Y= +cosmossdk.io/store v1.1.1/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= +cosmossdk.io/x/tx v0.13.7 h1:8WSk6B/OHJLYjiZeMKhq7DK7lHDMyK0UfDbBMxVmeOI= +cosmossdk.io/x/tx v0.13.7/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= +cosmossdk.io/x/upgrade v0.1.0 h1:z1ZZG4UL9ICTNbJDYZ6jOnF9GdEK9wyoEFi4BUScHXE= +cosmossdk.io/x/upgrade v0.1.0/go.mod h1:/6jjNGbiPCNtmA1N+rBtP601sr0g4ZXuj3yC6ClPCGY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -70,10 +70,10 @@ github.com/bits-and-blooms/bitset v1.8.0 h1:FD+XqgOZDUxxZ8hzoBFuV9+cGWY9CslN6d5M github.com/bits-and-blooms/bitset v1.8.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= -github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= -github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 h1:KdUfX2zKommPRa+PD0sWZUyXe9w277ABlgELO7H04IM= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= @@ -88,8 +88,8 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= @@ -109,21 +109,23 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= -github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZazG8= -github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20231102162011-844f0582c2eb h1:6Po+YYKT5B5ZXN0wd2rwFBaebM0LufPf8p4zxOd48Kg= -github.com/cockroachdb/pebble v0.0.0-20231102162011-844f0582c2eb/go.mod h1:acMRUGd/BK8AUmQNK3spUCCGzFLZU2bSST3NMXSq2Kc= +github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA= +github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= -github.com/cometbft/cometbft v0.38.5 h1:4lOcK5VTPrfbLOhNHmPYe6c7eDXHtBdMCQuKbAfFJdU= -github.com/cometbft/cometbft v0.38.5/go.mod h1:0tqKin+KQs8zDwzYD8rPHzSBIDNPuB4NrwwGDNb/hUg= -github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= -github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= +github.com/cometbft/cometbft v0.38.12 h1:OWsLZN2KcSSFe8bet9xCn07VwhBnavPea3VyPnNq1bg= +github.com/cometbft/cometbft v0.38.12/go.mod h1:GPHp3/pehPqgX1930HmK1BpBLZPxB75v/dZg8Viwy+o= +github.com/cometbft/cometbft-db v0.11.0 h1:M3Lscmpogx5NTbb1EGyGDaFRdsoLWrUWimFEyf7jej8= +github.com/cometbft/cometbft-db v0.11.0/go.mod h1:GDPJAC/iFHNjmZZPN8V8C1yr/eyityhi2W1hz2MGKSc= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -132,36 +134,36 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= -github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0E= -github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= -github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= -github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.50.3 h1:zP0AXm54ws2t2qVWvcQhEYVafhOAREU2QL0gnbwjvXw= -github.com/cosmos/cosmos-sdk v0.50.3/go.mod h1:tlrkY1sntOt1q0OX/rqF0zRJtmXNoffAS6VFTcky+w8= +github.com/cosmos/cosmos-db v1.1.1 h1:FezFSU37AlBC8S98NlSagL76oqBRWq/prTPvFcEJNCM= +github.com/cosmos/cosmos-db v1.1.1/go.mod h1:AghjcIPqdhSLP/2Z0yha5xPH3nLnskz81pBx3tcVSAw= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/cosmos-sdk v0.50.13 h1:xQ32hhzVy7agEe7behMdZN0ezWhPss3KoLZsF9KoBnw= +github.com/cosmos/cosmos-sdk v0.50.13/go.mod h1:hrWEFMU1eoXqLJeE6VVESpJDQH67FS1nnMrQIjO2daw= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= -github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= -github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.2.2 h1:qHhKW3I70w+04g5KdsdVSHRbFLgt3yY3qTMd4Xa4rC8= +github.com/cosmos/iavl v1.2.2/go.mod h1:GiM43q0pB+uG53mLxLDzimxM9l/5N9UuSY3/D0huuVw= github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= github.com/cosmos/ibc-go/v8 v8.0.0 h1:QKipnr/NGwc+9L7NZipURvmSIu+nw9jOIWTJuDBqOhg= github.com/cosmos/ibc-go/v8 v8.0.0/go.mod h1:C6IiJom0F3cIQCD5fKwVPDrDK9j/xTu563AWuOmXois= -github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= -github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= -github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= -github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.14.0 h1:WfCHricT3rPbkPSVKRH+L4fQGKYHuGOK9Edpel8TYpE= +github.com/cosmos/ledger-cosmos-go v0.14.0/go.mod h1:E07xCWSBl3mTGofZ2QnL4cIUzMbbGVyik84QYKbX3RA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/danieljoos/wincred v1.2.0 h1:ozqKHaLK0W/ii4KVbbvluM91W2H3Sh0BncbUNPS7jLE= -github.com/danieljoos/wincred v1.2.0/go.mod h1:FzQLLMKBFdvu+osBrnFODiv32YGwCfx0SkRa/eYHgec= +github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= +github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -191,8 +193,8 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/emicklei/dot v1.6.0 h1:vUzuoVE8ipzS7QkES4UfxdpCwdU2U97m2Pb2tQCoYRY= -github.com/emicklei/dot v1.6.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A= +github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -218,8 +220,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI= -github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= @@ -270,9 +272,15 @@ github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFG github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY= +github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -294,16 +302,16 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= -github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -334,8 +342,8 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= @@ -356,8 +364,8 @@ github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVH github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-metrics v0.5.2 h1:ErEYO2f//CjKsUDw4SmLzelsK6L3ZmOAR/4P9iS7ruY= -github.com/hashicorp/go-metrics v0.5.2/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= @@ -376,6 +384,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -420,13 +430,15 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= -github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= @@ -442,12 +454,10 @@ github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= -github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.6 h1:O7I6SIGPrypf3f/gmrrLUBQDKfO8uOoYdWf4gLS06tc= -github.com/linxGnu/grocksdb v1.8.6/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -469,8 +479,6 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= -github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -495,6 +503,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= @@ -546,12 +556,12 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6/MHO4= -github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= +github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc h1:8bQZVK1X6BJR/6nYUPxQEP+ReTsceJTKizeuwjWOPUA= -github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= +github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -572,49 +582,47 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= -github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= +github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8= +github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= -github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= -github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= -github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= -github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= -github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= -github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -645,28 +653,29 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= -github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= +github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.18.2 h1:LUXCnvUvSM6FXAsj6nnfc8Q2tp1dIgUfY9Kc8GsSOiQ= -github.com/spf13/viper v1.18.2/go.mod h1:EKmWIqdnk5lOcmR72yw6hS+8OPYcwD0jteitLMVB+yk= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -676,8 +685,10 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= @@ -705,8 +716,8 @@ github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWp github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.8 h1:xs88BrvEv273UsB79e0hcVrlUWmS0a8upikMFhSyAtA= -go.etcd.io/bbolt v1.3.8/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0= +go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -720,8 +731,8 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -735,13 +746,13 @@ golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= +golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 h1:mchzmB1XO2pMaKFRqk/+MV3mgGG96aqaPXaMifQU47w= -golang.org/x/exp v0.0.0-20231108232855-2478ac86f678/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -755,8 +766,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -774,7 +785,6 @@ golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -785,8 +795,8 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8= +golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -797,8 +807,8 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= +golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -841,6 +851,7 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -852,24 +863,26 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= +golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -901,18 +914,17 @@ google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRn google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3 h1:1hfbdAfFbkmpg41000wDVqr7jUpK/Yo+LPnIxxGzmkg= -google.golang.org/genproto v0.0.0-20231211222908-989df2bf70f3/go.mod h1:5RBcpGRxr25RbDzY5w+dmaqpSEvl8Gwl1x2CICf60ic= -google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f h1:2yNACc1O40tTnrsbk9Cv6oxiW8pxI/pXj0wRtdlYmgY= -google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f/go.mod h1:Uy9bTZJqmfrw2rIBxgGLnamc78euZULUBrLZ9XTITKI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 h1:/jFB8jK5R3Sq3i/lmeZO0cATSzFfZaJq1J2Euan3XKU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= +google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f h1:cUMEy+8oS78BWIH9OWazBkzbr090Od9tWBNtZHkOhf0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240930140551-af27646dc61f/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -924,15 +936,14 @@ google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU= -google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -947,8 +958,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/cosmos/sidechain/go.mod b/cosmos/sidechain/go.mod index f8d782783..67bb79d5c 100644 --- a/cosmos/sidechain/go.mod +++ b/cosmos/sidechain/go.mod @@ -76,8 +76,9 @@ require ( github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect - github.com/btcsuite/btcd v0.20.1-beta // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect + github.com/btcsuite/btcd/btcutil v1.1.5 // indirect + github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect github.com/bufbuild/protocompile v0.9.0 // indirect github.com/bufbuild/protovalidate-go v0.6.2 // indirect github.com/bufbuild/protoyaml-go v0.1.9 // indirect diff --git a/cosmos/sidechain/go.sum b/cosmos/sidechain/go.sum index 0835d0a3f..d7a932e86 100644 --- a/cosmos/sidechain/go.sum +++ b/cosmos/sidechain/go.sum @@ -285,17 +285,28 @@ github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsy github.com/bits-and-blooms/bitset v1.10.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/blinklabs-io/gouroboros v0.89.1 h1:pcD9hc2EkiPkq915aMDBAbgQZTX4I73gUzZf2UUcggs= github.com/blinklabs-io/gouroboros v0.89.1/go.mod h1:l6G9mwAa/p0CBGCZBjK1W67815gWrRlmcGl6fccbt4U= -github.com/btcsuite/btcd v0.20.1-beta h1:Ik4hyJqN8Jfyv3S4AGBOmyouMsYE3EdYODkMbQjwPGw= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= +github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= +github.com/btcsuite/btcd v0.23.5-0.20231215221805-96c9fd8078fd/go.mod h1:nm3Bko6zh6bWP60UxwoT5LzdGJsQJaPo6HjduXq9p6A= +github.com/btcsuite/btcd/btcec/v2 v2.1.0/go.mod h1:2VzYrv4Gm4apmbVVsSq5bqf1Ec8v56E48Vt0Y/umPgA= +github.com/btcsuite/btcd/btcec/v2 v2.1.3/go.mod h1:ctjw4H1kknNJmRN4iP1R7bTQ+v3GJkZBd6mui8ZsAZE= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= -github.com/btcsuite/btcd/btcutil v1.1.3 h1:xfbtw8lwpp0G6NwSHb+UE67ryTFHJAiNuipusjXSohQ= -github.com/btcsuite/btcd/btcutil v1.1.3/go.mod h1:UR7dsSJzJUfMmFiiLlIrMq1lS9jh9EdCV7FStZSnpi0= +github.com/btcsuite/btcd/btcutil v1.0.0/go.mod h1:Uoxwv0pqYWhD//tfTiipkxNfdhG9UrLwaeswfjfdF0A= +github.com/btcsuite/btcd/btcutil v1.1.0/go.mod h1:5OapHB7A2hBBWLm48mmw4MOHNJCcUBTwmWH/0Jn8VHE= +github.com/btcsuite/btcd/btcutil v1.1.5 h1:+wER79R5670vs/ZusMTF1yTcRYE5GUsFbdjdisflzM8= +github.com/btcsuite/btcd/btcutil v1.1.5/go.mod h1:PSZZ4UitpLBWzxGd5VGOrLnmOjtPP/a6HaFo12zMs00= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= +github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 h1:59Kx4K6lzOW5w6nFlA0v5+lk/6sjybR934QNHSJZPTQ= +github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= +github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= +github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bufbuild/buf v1.31.0 h1:YHLGIr8bjcLaTCIw0+/bCAvJLiR8u46QTwKvn7miSEg= @@ -423,10 +434,13 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= @@ -795,6 +809,7 @@ github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod github.com/jdx/go-netrc v1.0.0 h1:QbLMLyCZGj0NA8glAhxUpf1zDg6cxnWgMBbjq40W0gQ= github.com/jdx/go-netrc v1.0.0/go.mod h1:Gh9eFQJnoTNIRHXl2j5bJXA1u84hQWJWgGh569zF3v8= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.15.6 h1:WMYJbw2Wo+KOWwZFvgY0jMoVHM6i4XIvRs2RcBj5VmI= github.com/jhump/protoreflect v1.15.6/go.mod h1:jCHoyYQIJnaabEYnbGwyo9hUqfyUMTbJw/tAut5t97E= github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8= @@ -939,6 +954,7 @@ github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108 github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= @@ -1264,6 +1280,7 @@ golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= diff --git a/dapps/ibc-explorer/src/containers/TransactionDetail/Packets/PacketDisplay/PacketTransfer/index.tsx b/dapps/ibc-explorer/src/containers/TransactionDetail/Packets/PacketDisplay/PacketTransfer/index.tsx index 77acf45f0..74e0f96d3 100644 --- a/dapps/ibc-explorer/src/containers/TransactionDetail/Packets/PacketDisplay/PacketTransfer/index.tsx +++ b/dapps/ibc-explorer/src/containers/TransactionDetail/Packets/PacketDisplay/PacketTransfer/index.tsx @@ -19,7 +19,6 @@ const PacketTransfer = ({ const currentPacketData = packetsData?.[packetId]; if (!currentPacketData) return <>; const packetMsgs = packetDataMgs?.[packetId]; - // console.log(packetMsgs); const relayerChain1Address = packetMsgs?.AcknowledgePacket?.sender || ''; const relayerChain2Address = packetMsgs?.RecvPacket?.sender || ''; const sender = packetMsgs?.SendPacket?.sender; diff --git a/relayer/go.mod b/relayer/go.mod index 7bf3f6d27..758101ef3 100644 --- a/relayer/go.mod +++ b/relayer/go.mod @@ -1,14 +1,17 @@ module github.com/cardano/relayer/v1 -go 1.21 +go 1.22.2 require ( cosmossdk.io/api v0.3.1 cosmossdk.io/errors v1.0.0 cosmossdk.io/math v1.1.2 + github.com/DATA-DOG/go-sqlmock v1.5.2 github.com/avast/retry-go/v4 v4.3.4 + github.com/blinklabs-io/gouroboros v0.105.0 github.com/btcsuite/btcd v0.23.4 github.com/btcsuite/btcd/btcutil v1.1.3 + github.com/cardano/proto-types v0.0.0-00010101000000-000000000000 github.com/cometbft/cometbft v0.37.2 github.com/cosmos/cosmos-proto v1.0.0-beta.2 github.com/cosmos/cosmos-sdk v0.47.5 @@ -19,12 +22,17 @@ require ( github.com/cosmos/ics23/go v0.10.0 github.com/echovl/cardano-go v0.1.14 github.com/ethereum/go-ethereum v1.10.26 + github.com/fxamacker/cbor/v2 v2.7.0 github.com/gofrs/flock v0.8.1 + github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.4 github.com/google/go-cmp v0.6.0 github.com/google/go-github/v43 v43.0.0 + github.com/gorilla/websocket v1.5.1 github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/h2non/gock v1.2.0 github.com/joho/godotenv v1.5.1 + github.com/jsambuo/go-cardano-serialization v0.0.4 github.com/jsternberg/zap-logfmt v1.3.0 github.com/prometheus/client_golang v1.15.0 github.com/spf13/cobra v1.7.0 @@ -33,15 +41,17 @@ require ( github.com/tyler-smith/go-bip39 v1.1.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.24.0 + golang.org/x/crypto v0.29.0 + golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb golang.org/x/mod v0.17.0 - golang.org/x/sync v0.8.0 - golang.org/x/text v0.19.0 - google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 + golang.org/x/sync v0.9.0 + golang.org/x/text v0.20.0 google.golang.org/grpc v1.56.2 google.golang.org/protobuf v1.35.1 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 - github.com/blinklabs-io/gouroboros v0.105.0 + gorm.io/driver/postgres v1.5.7 + gorm.io/gorm v1.25.10 ) require ( @@ -58,12 +68,6 @@ require ( github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect - github.com/DATA-DOG/go-sqlmock v1.5.2 // indirect - github.com/Salvionied/apollo v1.0.11 // indirect - github.com/Salvionied/cbor/v2 v2.6.0 // indirect - github.com/SundaeSwap-finance/kugo v1.0.5 // indirect - github.com/SundaeSwap-finance/ogmigo v0.8.1 // indirect - github.com/SundaeSwap-finance/ogmigo/v6 v6.0.0-20231128043329-e8ced51013a1 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.48.7 // indirect github.com/benbjohnson/clock v1.3.0 // indirect @@ -73,7 +77,6 @@ require ( github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect - github.com/buger/jsonparser v1.1.1 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect @@ -102,8 +105,6 @@ require ( github.com/echovl/ed25519 v0.2.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/fxamacker/cbor v1.5.1 // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/getsentry/sentry-go v0.23.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect @@ -111,7 +112,6 @@ require ( github.com/go-stack/stack v1.8.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect - github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.1.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect @@ -125,12 +125,10 @@ require ( github.com/googleapis/gax-go/v2 v2.11.0 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 // indirect - github.com/gorilla/websocket v1.5.1 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect - github.com/h2non/gock v1.2.0 // indirect github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-getter v1.7.1 // indirect @@ -152,7 +150,6 @@ require ( github.com/jinzhu/now v1.1.5 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/jsambuo/go-cardano-serialization v0.0.4 // indirect github.com/klauspost/compress v1.16.3 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect @@ -184,39 +181,38 @@ require ( github.com/rs/cors v1.8.3 // indirect github.com/rs/zerolog v1.30.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect - github.com/savaki/ogmigo v0.7.4 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/cast v1.5.1 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.4.2 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect github.com/tidwall/btree v1.6.0 // indirect github.com/tklauser/numcpus v0.4.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect - github.com/utxorpc/go-codegen v0.11.0 // indirect + github.com/utxorpc/go-codegen v0.12.0 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/zondax/hid v0.9.1 // indirect github.com/zondax/ledger-go v0.14.1 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect go.uber.org/atomic v1.10.0 // indirect - golang.org/x/crypto v0.28.0 // indirect - golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect golang.org/x/net v0.25.0 // indirect golang.org/x/oauth2 v0.8.0 // indirect - golang.org/x/sys v0.26.0 // indirect - golang.org/x/term v0.25.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/term v0.26.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.126.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gorm.io/driver/postgres v1.5.7 // indirect - gorm.io/gorm v1.25.10 // indirect nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v0.5.5 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) + +replace github.com/cardano/proto-types => ../proto-types diff --git a/relayer/go.sum b/relayer/go.sum index 5dc5758eb..a1fbb2a4e 100644 --- a/relayer/go.sum +++ b/relayer/go.sum @@ -202,8 +202,8 @@ cosmossdk.io/math v1.1.2/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= -filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/99designs/keyring v1.2.1 h1:tYLp1ULvO7i3fI5vE21ReQuj99QFSs7lGm0xWyJo87o= @@ -224,20 +224,10 @@ github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEV github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/Salvionied/apollo v1.0.11 h1:D24umErYZD/tjpHZl6IFZQCuj66fyfRE2YQx49EXme0= -github.com/Salvionied/apollo v1.0.11/go.mod h1:5hgk1k4EiWmAoy2yU3q6+clmA4tgnHC4X23RtMJh4Ao= -github.com/Salvionied/cbor/v2 v2.6.0 h1:OEwlZLiodLdNeM9wFoSydLvj6/rHRaxu5G8VzwXSeuY= -github.com/Salvionied/cbor/v2 v2.6.0/go.mod h1:oFxaUo/mQ5sG1k459nzctGdYa80jy0ZqZ9pln9C/fGw= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= -github.com/SundaeSwap-finance/kugo v1.0.5 h1:GWUbHkAIIMh1SmGMCw5r0rpOvriRsEoLpp5ofufWRvs= -github.com/SundaeSwap-finance/kugo v1.0.5/go.mod h1:jkNGTmwLRdUPKVzkOOQjxqkpPTDw5gJ2hkJi3zUF9tA= -github.com/SundaeSwap-finance/ogmigo v0.8.1 h1:+oMCEorlqkcFj9XR9wPxJzzm7NfGa4RqI8TgzR14Qy0= -github.com/SundaeSwap-finance/ogmigo v0.8.1/go.mod h1:Zuywifig7DQb5sEBrXsE44tv7fIm3fa9izKihtaez1I= -github.com/SundaeSwap-finance/ogmigo/v6 v6.0.0-20231128043329-e8ced51013a1 h1:Lfw4vCNhm5Ik5wdbPsCK8k4gphhCB2/jtLxY5s/EifA= -github.com/SundaeSwap-finance/ogmigo/v6 v6.0.0-20231128043329-e8ced51013a1/go.mod h1:CsDGcgbkKoz6S4h0RJ30go7oXG+KhGE2KLhBpRFnEqA= github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= @@ -261,13 +251,11 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= -github.com/avast/retry-go/v4 v4.3.2 h1:x4sTEu3jSwr7zNjya8NTdIN+U88u/jtO/q3OupBoDtM= -github.com/avast/retry-go/v4 v4.3.2/go.mod h1:rg6XFaiuFYII0Xu3RDbZQkxCofFwruZKW8oEF1jpWiU= +github.com/avast/retry-go/v4 v4.3.4 h1:pHLkL7jvCvP317I8Ge+Km2Yhntv3SdkJm7uekkqbKhM= +github.com/avast/retry-go/v4 v4.3.4/go.mod h1:rv+Nla6Vk3/ilU0H51VHddWHiwimzX66yZ0JT6T+UvE= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.44.122/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.203 h1:pcsP805b9acL3wUqa4JR2vg1k2wnItkDYNvfmcy6F+U= -github.com/aws/aws-sdk-go v1.44.203/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go v1.48.7 h1:gDcOhmkohlNk20j0uWpko5cLBbwSkB+xpkshQO45F7Y= github.com/aws/aws-sdk-go v1.48.7/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= @@ -282,8 +270,8 @@ github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/blinklabs-io/gouroboros v0.81.0 h1:9iuXxM+Dr6+V/FtZyleUgIWs15A36mheJWHXJbzYGnU= -github.com/blinklabs-io/gouroboros v0.81.0/go.mod h1:uBExUfgZvhPqiur3N9ReoXv4LpqGmR9jSZjolr1nZ2w= +github.com/blinklabs-io/gouroboros v0.105.0 h1:8/uo7mtijJrbS1mNP0KRCzdZm+lWuTGhWuA8Y40EsDU= +github.com/blinklabs-io/gouroboros v0.105.0/go.mod h1:nW0/J6Zv5Oupr4MHehfJ3noSXu7VSxKWusFRNKo0nhI= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c/go.mod h1:tjmYdS6MLJ5/s0Fj4DbLgSbDHbEqLJrtnHecBFkdz5M= github.com/btcsuite/btcd v0.23.0/go.mod h1:0QJIIN1wwIXF/3G/m87gIwGniDMDQqjVn4SZgnFpsYY= @@ -302,8 +290,8 @@ github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOF github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= @@ -313,8 +301,6 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= -github.com/buger/jsonparser v1.1.1 h1:2PnMjfWD7wBILjqQbt530v576A/cAbQvEW9gGIpYMUs= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= @@ -413,8 +399,9 @@ github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuA github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK09Y2A4Xv7EE0= github.com/decred/dcrd/crypto/blake256 v1.0.0/go.mod h1:sQl2p6Y26YV+ZOcSTP6thNdn47hh8kt6rqSlvmrXFAc= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1/go.mod h1:hyedUtir6IdtD/7lIxGeCxkaw7y45JueMRL4DIyJDKs= @@ -478,12 +465,8 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/fxamacker/cbor v1.5.1 h1:XjQWBgdmQyqimslUh5r4tUGmoqzHmBFQOImkWGi2awg= -github.com/fxamacker/cbor v1.5.1/go.mod h1:3aPGItF174ni7dDzd6JZ206H8cmr4GDNBGpPa971zsU= -github.com/fxamacker/cbor/v2 v2.4.0 h1:ri0ArlOR+5XunOP8CRUowT0pSJOwhW098ZCUyskZD88= -github.com/fxamacker/cbor/v2 v2.4.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo= -github.com/fxamacker/cbor/v2 v2.6.0 h1:sU6J2usfADwWlYDAFhZBQ6TnLFBHxgesMrQfQgk1tWA= -github.com/fxamacker/cbor/v2 v2.6.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= +github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E= +github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ= github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -585,8 +568,7 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -610,8 +592,9 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github/v43 v43.0.0 h1:y+GL7LIsAIF2NZlJ46ZoC/D1W1ivZasT0lnWHMYPZ+U= github.com/google/go-github/v43 v43.0.0/go.mod h1:ZkTvvmCXBvsfPpTHXnH/d2hP9Y0cTbvN9kr5xqyXOIc= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= @@ -680,8 +663,6 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -864,8 +845,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zk github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= -github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b h1:QrHweqAtyJ9EwCaGHBu1fghwxIPiopAHV06JlXrMHjk= +github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b/go.mod h1:xxLb2ip6sSUts3g1irPVHyk/DGslwQsNOo9I7smJfNU= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= @@ -901,6 +882,7 @@ github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzE github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4= github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -967,8 +949,9 @@ github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= @@ -976,8 +959,8 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM= +github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1030,8 +1013,6 @@ github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= -github.com/savaki/ogmigo v0.7.4 h1:QxW535/M9pM3UFSoulkJsTP9VLNw22ut+4lc+4HgaO4= -github.com/savaki/ogmigo v0.7.4/go.mod h1:tsqAhr27MPOdZDZdi71zQ6w1ILB2fY6aRjnnncs86To= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= @@ -1075,8 +1056,9 @@ github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1087,9 +1069,10 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= @@ -1118,8 +1101,8 @@ github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/utxorpc/go-codegen v0.5.1 h1:Xhq3CdWAQEJgi46Naq7epeO4G5EyGApP38yNxMCqCbY= -github.com/utxorpc/go-codegen v0.5.1/go.mod h1:sEfglXN19j3cq0qQvb2NS4IcxUSrK1crYXbsVf11SGM= +github.com/utxorpc/go-codegen v0.12.0 h1:uSmJ4jTQpFbPaq8zCdYJi1/pnJmoCLFCcBitybjH+gQ= +github.com/utxorpc/go-codegen v0.12.0/go.mod h1:NHXsykQWNetMMm2Kak+PfqmEY9Htgs6unJENPC4Kobs= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= @@ -1153,15 +1136,14 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= -go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -1184,10 +1166,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= -golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= +golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= +golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1227,8 +1207,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= -golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1292,10 +1272,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50= -golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= -golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= -golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1337,10 +1315,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI= -golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= +golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1440,16 +1416,13 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= -golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= +golang.org/x/term v0.26.0 h1:WEQa6V3Gja/BhNxg540hBip/kkaYtRg3cxg4oXSw4AU= +golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1461,10 +1434,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.12.0 h1:k+n5B8goJNdU7hSvEtMUz3d1Q6D/XW4COJSJR6fN0mc= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1532,8 +1503,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1776,10 +1747,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1814,8 +1783,6 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/postgres v1.5.7 h1:8ptbNJTDbEmhdr62uReG5BGkdQyeasu/FZHxI0IMGnM= gorm.io/driver/postgres v1.5.7/go.mod h1:3e019WlBaYI5o5LIdNV+LyxCMNtLOQETBXL2h4chKpA= -gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde h1:9DShaph9qhkIYw7QF91I/ynrr4cOO2PZra2PFD7Mfeg= -gorm.io/gorm v1.25.7-0.20240204074919-46816ad31dde/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= gorm.io/gorm v1.25.10 h1:dQpO+33KalOA+aFYGlK+EfxcI5MbO7EP2yYygwh9h+s= gorm.io/gorm v1.25.10/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= diff --git a/relayer/relayer/chains/cardano/tx.go b/relayer/relayer/chains/cardano/tx.go index 49efe7eda..a16ccbd1d 100644 --- a/relayer/relayer/chains/cardano/tx.go +++ b/relayer/relayer/chains/cardano/tx.go @@ -51,11 +51,11 @@ import ( var ( rtyAttNum = uint(5) rtyAtt = retry.Attempts(rtyAttNum) - rtyDel = retry.Delay(time.Millisecond * 400) - rtyDelMax = retry.Delay(time.Minute * 2) + rtyDel = retry.Delay(time.Millisecond * 200) + rtyDelMax = retry.Delay(time.Minute * 1) rtyErr = retry.LastErrorOnly(true) accountSeqRegex = regexp.MustCompile("account sequence mismatch, expected ([0-9]+), got ([0-9]+)") - defaultBroadcastWaitTimeout = 10 * time.Minute + defaultBroadcastWaitTimeout = 5 * time.Minute errUnknown = "unknown" ) diff --git a/relayer/relayer/channel.go b/relayer/relayer/channel.go index 76c07c33f..fa84fb174 100644 --- a/relayer/relayer/channel.go +++ b/relayer/relayer/channel.go @@ -47,7 +47,6 @@ func (c *Chain) CreateOpenChannels( } // Timeout is per message. Four channel handshake messages, allowing maxRetries for each. - timeout = 4 * time.Minute processorTimeout := timeout * 4 * time.Duration(maxRetries) ctx, cancel := context.WithTimeout(ctx, processorTimeout)