Skip to content

Commit

Permalink
feat(compiler): update to 7.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Jul 3, 2023
1 parent b5746a1 commit ac872b9
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 360 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
TAG=v6.0.0
COMPILER_TAG=v6.0.0
COMPILER_TAG=v7.3.0
37 changes: 0 additions & 37 deletions api/compiler.json
Original file line number Diff line number Diff line change
Expand Up @@ -850,43 +850,6 @@
}
}
},
"/decode-data": {
"post": {
"consumes": [
"application/json"
],
"description": "Decode data as retuned by a contract call. - Legacy decoding",
"operationId": "DecodeData",
"parameters": [
{
"description": "Binary data in Sophia ABI format",
"in": "body",
"name": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SophiaBinaryData"
}
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "Json encoded data",
"schema": {
"$ref": "#/definitions/SophiaJsonData"
}
},
"400": {
"description": "Invalid data",
"schema": {
"$ref": "#/definitions/CompilerErrors"
}
}
}
}
},
"/encode-calldata": {
"post": {
"consumes": [
Expand Down
7 changes: 0 additions & 7 deletions integration_test/compiler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,6 @@ func TestCompiler(t *testing.T) {
t.Error(err)
}
})
t.Run("DecodeData", func(t *testing.T) {
// taken from testnet Contract Call Tx th_toPLrggySMKVecSkEdy7QYF7VEQ4nANAdSiwNXomtwhdp6ZNw
_, err := c.DecodeData("cb_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArMtts", "int")
if err != nil {
t.Error(err)
}
})
t.Run("EncodeCalldata SimpleStorage set(123)", func(t *testing.T) {
encodedCalldata, err := c.EncodeCalldata(string(golden.Get(t, simplestorageSource)), "set", []string{"123"})
if err != nil {
Expand Down
21 changes: 0 additions & 21 deletions naet/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,27 +149,6 @@ func (c *Compiler) DecodeCalldataSource(source string, function string, callData
return result.Payload, err
}

// DecodeDataer guarantees that one can run a DecodeData() method on the
// mocked/real network connection to the aesophia compiler
type DecodeDataer interface {
DecodeData(data string, sophiaType string) (decodedData *models.SophiaJSONData, err error)
}

// DecodeData abstracts away the swagger specifics of posting to /decode-data
func (c *Compiler) DecodeData(data string, sophiaType string) (decodedData *models.SophiaJSONData, err error) {
p := &models.SophiaBinaryData{
Data: &data,
SophiaType: &sophiaType,
}
params := operations.NewDecodeDataParams().WithBody(p)
result, err := c.Compiler.Operations.DecodeData(params)
if err != nil {
return
}

return result.Payload, err
}

// EncodeCalldataer guarantees that one can run a EncodeCalldata() method on the
// mocked/real network connection to the aesophia compiler
type EncodeCalldataer interface {
Expand Down
151 changes: 0 additions & 151 deletions swagguard/compiler/client/operations/decode_data_parameters.go

This file was deleted.

103 changes: 0 additions & 103 deletions swagguard/compiler/client/operations/decode_data_responses.go

This file was deleted.

40 changes: 0 additions & 40 deletions swagguard/compiler/client/operations/operations_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ac872b9

Please sign in to comment.