hyperledger / firefly

Hyperledger FireFly is the first open source Supernode: a complete stack for enterprises to build and scale secure Web3 applications. The FireFly API for digital assets, data flows, and blockchain transactions makes it radically faster to build production-ready apps on popular chains and protocols.
https://hyperledger.github.io/firefly
Apache License 2.0
508 stars 209 forks source link

DeployContract implementation for Tezos connector #1481

Closed alex-semenyuk closed 7 months ago

alex-semenyuk commented 8 months ago

Related PRs to firefly-tezosconnect and firefly-cli

Request example

{
   "key":"tz1V3spuktTP2wuEZP7D2hJruLZ5uJTuJk31",
   "contract":{
      "code":[
         {
            "args":[
               {
                  "prim":"string"
               }
            ],
            "prim":"parameter"
         },
         {
            "args":[
               {
                  "prim":"string"
               }
            ],
            "prim":"storage"
         },
         {
            "args":[
               [
                  {
                     "prim":"CAR"
                  },
                  {
                     "args":[
                        {
                           "prim":"operation"
                        }
                     ],
                     "prim":"NIL"
                  },
                  {
                     "prim":"PAIR"
                  }
               ]
            ],
            "prim":"code"
         }
      ],
      "storage":{
         "string":"hello world"
      }
   }
}

Response

{
  "id": "3caf86b2-be4d-40c2-9450-bd4af5340e4a",
  "namespace": "default",
  "tx": "b492cd22-2eff-4b78-a9f2-95da5db58e9b",
  "type": "blockchain_deploy",
  "status": "Pending",
  "plugin": "tezos",
  "input": {
    "contract": {
      "code": [
        {
          "args": [
            {
              "prim": "string"
            }
          ],
          "prim": "parameter"
        },
        {
          "args": [
            {
              "prim": "string"
            }
          ],
          "prim": "storage"
        },
        {
          "args": [
            [
              {
                "prim": "CAR"
              },
              {
                "args": [
                  {
                    "prim": "operation"
                  }
                ],
                "prim": "NIL"
              },
              {
                "prim": "PAIR"
              }
            ]
          ],
          "prim": "code"
        }
      ],
      "storage": {
        "string": "hello world!!!!"
      }
    },
    "definition": null,
    "input": null,
    "key": "tz1V3spuktTP2wuEZP7D2hJruLZ5uJTuJk31",
    "options": null
  },
  "created": "2024-03-19T21:06:22.871702Z",
  "updated": "2024-03-19T21:06:22.871702Z"
}
codecov-commenter commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.99%. Comparing base (577e8c4) to head (f4be7bf).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1481 +/- ## ======================================= Coverage 99.99% 99.99% ======================================= Files 322 322 Lines 23406 23424 +18 ======================================= + Hits 23404 23422 +18 Misses 1 1 Partials 1 1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.