Skip to content

Commit

Permalink
Merge pull request #33 from radianceteam/develop
Browse files Browse the repository at this point in the history
1.37.0 implementation
  • Loading branch information
sdvornik authored Aug 13, 2022
2 parents 31fba6e + 9ba9b7c commit 38fe74f
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 23 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
**Community links:**

[![Chat on Telegram](https://img.shields.io/badge/chat-on%20telegram-9cf.svg)](https://t.me/RADIANCE_TON_SDK)
[![SDK version](https://img.shields.io/badge/TON%20SDK%20version-1.35.0-green)](https://github.com/tonlabs/ever-sdk/tree/1.35.0)
[![SDK version](https://img.shields.io/badge/TON%20SDK%20version-1.37.0-green)](https://github.com/tonlabs/ever-sdk/tree/1.37.0)

**Everscale scala client** is a simple scala binding to the [ever-sdk](https://github.com/tonlabs/ever-sdk).

Features:
* All methods of the ever-sdk v 1.35.0
* All methods of the ever-sdk v 1.37.0
* Interaction with the ever-sdk through synchronous an asynchronous calls
* The every method contains inline-doc
* The automatic download of the ever-sdk library for the current environment
Expand Down Expand Up @@ -100,7 +100,7 @@ Project contains several subprojects:

```buildBridge```

* Select sbt project __ton_client_scala__ and run sbt command
* Select sbt project __everscale-client-scala__ and run sbt command

```compile```

Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ val root = project in file(".")
lazy val `everscale-client-scala` = project
.settings(
scalaVersion := "2.13.4",
version := "1.35.0",
version := "1.37.0",
libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-derivation" % circeDerivationVersion,
Expand Down
2 changes: 1 addition & 1 deletion ever-sdk
Original file line number Diff line number Diff line change
Expand Up @@ -388,35 +388,34 @@ class AbiModule(ctx: Context) {
/**
* Encodes message body according to ABI function call.
* @param abi
* Contract ABI.
*
* abi
* @param call_set
* Function call parameters.
*
* Must be specified in non deploy message.
* Must be specified in non deploy message.
*
* In case of deploy message contains parameters of constructor.
* @param is_internal
* True if internal message body must be encoded.
* is_internal
* @param signer
* Signing parameters.
* signer
* @param processing_try_index
* Processing try index.
*
* Used in message processing with retries.
* Used in message processing with retries.
*
* Encoder uses the provided try index to calculate message expiration time.
*
* Expiration timeouts will grow with every retry.
*
* Default value is 0.
* @param address
* Since ABI version 2.3 destination address of external inbound message is used in message body signature
* calculation. Should be provided when signed external inbound message body is created. Otherwise can be omitted.
*/
def encodeMessageBody(
abi: AbiADT.Abi,
call_set: CallSet,
is_internal: Boolean,
signer: SignerADT.Signer,
processing_try_index: Option[Long]
processing_try_index: Option[Long],
address: Option[String]
): Future[Either[Throwable, ResultOfEncodeMessageBody]] = {
ctx.execAsync[ParamsOfEncodeMessageBody, ResultOfEncodeMessageBody](
"abi.encode_message_body",
Expand All @@ -425,7 +424,8 @@ class AbiModule(ctx: Context) {
call_set,
is_internal,
signer,
processing_try_index
processing_try_index,
address
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,8 @@ case class ParamsOfEncodeMessageBody(
call_set: CallSet,
is_internal: Boolean,
signer: SignerADT.Signer,
processing_try_index: Option[Long]
processing_try_index: Option[Long],
address: Option[String]
)

object ParamsOfEncodeMessageBody {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ class AbiModuleTest extends AnyFlatSpec with TestUtils {
run_params.call_set.get,
false,
run_params.signer,
run_params.processing_try_index
run_params.processing_try_index,
None
)

def extract_body(message: String): Value = {
Expand Down
13 changes: 11 additions & 2 deletions everscale-codegen/src/main/resources/api.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.35.0",
"version": "1.37.0",
"modules": [
{
"name": "client",
Expand Down Expand Up @@ -540,7 +540,7 @@
"type": "String"
},
"summary": "Access key to GraphQL API.",
"description": "At the moment is not used in production."
"description": "You can specify here Evercloud project secret ot serialized JWT."
}
],
"summary": null,
Expand Down Expand Up @@ -6118,6 +6118,15 @@
},
"summary": "Processing try index.",
"description": "Used in message processing with retries.\n\nEncoder uses the provided try index to calculate message\nexpiration time.\n\nExpiration timeouts will grow with every retry.\n\nDefault value is 0."
},
{
"name": "address",
"type": "Optional",
"optional_inner": {
"type": "String"
},
"summary": "Destination address of the message",
"description": "Since ABI version 2.3 destination address of external inbound message is used in message\nbody signature calculation. Should be provided when signed external inbound message body is\ncreated. Otherwise can be omitted."
}
],
"summary": null,
Expand Down
7 changes: 5 additions & 2 deletions everscale-codegen/src/main/resources/prototypes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ package abi {
case class ParamsOfEncodeInitialData(abi: Option[Abi], initial_data: Option[Value], initial_pubkey: Option[String], boc_cache: Option[BocCacheType])
case class ParamsOfEncodeInternalMessage(abi: Option[Abi], address: Option[String], src_address: Option[String], deploy_set: Option[DeploySet], call_set: Option[CallSet], value: String, bounce: Option[Boolean], enable_ihr: Option[Boolean])
case class ParamsOfEncodeMessage(abi: Abi, address: Option[String], deploy_set: Option[DeploySet], call_set: Option[CallSet], signer: Signer, processing_try_index: Option[Long])
case class ParamsOfEncodeMessageBody(abi: Abi, call_set: CallSet, is_internal: Boolean, signer: Signer, processing_try_index: Option[Long])
case class ParamsOfEncodeMessageBody(abi: Abi, call_set: CallSet, is_internal: Boolean, signer: Signer, processing_try_index: Option[Long], address: Option[String])
case class ParamsOfUpdateInitialData(abi: Option[Abi], data: String, initial_data: Option[Value], initial_pubkey: Option[String], boc_cache: Option[BocCacheType])
case class ResultOfAbiEncodeBoc(boc: String)
case class ResultOfAttachSignature(message: String, message_id: String)
Expand Down Expand Up @@ -1138,8 +1138,11 @@ package abi {
* Expiration timeouts will grow with every retry.
*
* Default value is 0.
* @param address Since ABI version 2.3 destination address of external inbound message is used in message
* body signature calculation. Should be provided when signed external inbound message body is
* created. Otherwise can be omitted.
*/
def encodeMessageBody(abi: Abi, call_set: CallSet, is_internal: Boolean, signer: Signer, processing_try_index: Option[Long]): Future[Either[Throwable, ResultOfEncodeMessageBody]]
def encodeMessageBody(abi: Abi, call_set: CallSet, is_internal: Boolean, signer: Signer, processing_try_index: Option[Long], address: Option[String]): Future[Either[Throwable, ResultOfEncodeMessageBody]]
/**
* Updates initial account data with initial values for the contract's static variables and owner's public key. This operation is applicable only for initial account data (before deploy). If the contract is already deployed, its data doesn't contain this data section any more.
* @param abi abi
Expand Down

0 comments on commit 38fe74f

Please sign in to comment.