Skip to content

Commit 7433429

Browse files
add a disassemble_code field to the blockchainAccountInspect method
1 parent 39d6c89 commit 7433429

7 files changed

+72
-20
lines changed

api/openapi.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -1548,6 +1548,10 @@
15481548
],
15491549
"type": "string"
15501550
},
1551+
"disassemble_code": {
1552+
"format": "cell",
1553+
"type": "string"
1554+
},
15511555
"methods": {
15521556
"items": {
15531557
"$ref": "#/components/schemas/Method"
@@ -2668,7 +2672,8 @@
26682672
"enum": [
26692673
"cskip_no_state",
26702674
"cskip_bad_state",
2671-
"cskip_no_gas"
2675+
"cskip_no_gas",
2676+
"cskip_suspended"
26722677
],
26732678
"example": "cskip_no_state",
26742679
"type": "string"

api/openapi.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ paths:
11051105
example: 1000000000
11061106
'default':
11071107
$ref: '#/components/responses/Error'
1108-
1108+
11091109
/v2/accounts/{account_id}/extra-currency/{id}/history:
11101110
get:
11111111
description: Get the transfer history of extra currencies for an account.
@@ -7515,6 +7515,9 @@ components:
75157515
code:
75167516
type: string
75177517
format: cell
7518+
disassemble_code:
7519+
type: string
7520+
format: cell
75187521
code_hash:
75197522
type: string
75207523
methods:

pkg/api/account_handlers.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ import (
88
"encoding/json"
99
"errors"
1010
"fmt"
11-
"go.uber.org/zap"
1211
"net/http"
1312
"sort"
1413
"strings"
1514
"sync"
1615
"time"
1716

17+
"go.uber.org/zap"
18+
1819
"github.com/tonkeeper/opentonapi/pkg/addressbook"
1920
"golang.org/x/exp/slices"
2021

@@ -527,6 +528,9 @@ func (h *Handler) BlockchainAccountInspect(ctx context.Context, params oas.Block
527528
CodeHash: hex.EncodeToString(codeHash),
528529
Compiler: compiler,
529530
}
531+
if source.DisassembleCode != "" {
532+
resp.DisassembleCode = oas.NewOptString(source.DisassembleCode)
533+
}
530534
if len(sourceFiles) > 0 {
531535
resp.Source = oas.NewOptSource(oas.Source{Files: sourceFiles})
532536
}

pkg/oas/oas_json_gen.go

+28-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/oas/oas_schemas_gen.go

+26-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/oas/oas_validators_gen.go

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/verifier/verifier.go

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ type File struct {
2222

2323
type Source struct {
2424
Code string `json:"code"`
25+
DisassembleCode string `json:"disassemble_code"`
2526
Files []File `json:"files"`
2627
Compiler SourceCompiler `json:"compiler"`
2728
DateVerification int64 `json:"date_verification"`

0 commit comments

Comments
 (0)