Skip to content

Commit

Permalink
feat: external messages support
Browse files Browse the repository at this point in the history
  • Loading branch information
ex3ndr committed Apr 2, 2023
1 parent 3741345 commit a2dd3f4
Show file tree
Hide file tree
Showing 149 changed files with 2,616 additions and 730 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## Added
- Opt-in external messages support

## [1.1.0-beta.8] - 2023-04-02

## Fixed
Expand Down
22 changes: 22 additions & 0 deletions examples/external.tact
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import "@stdlib/deploy";
import "@stdlib/ownable";

contract External with Deployable, Ownable {
owner: Address;
timeout: Int;

init(owner: Address) {
self.owner = owner;
self.timeout = now() + 5 * 60; // 5 minutes
}

receive("Topup") {
// Do nothing
}

external("Timeout") {
if (now() > self.timeout) {
acceptMessage();
}
}
}
12 changes: 6 additions & 6 deletions examples/output/echo_Echo.code.fc
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ tuple $Echo$_contract_init(int $a) impure inline_ref {
;; Receivers of a Contract Echo
;;

(tuple, ()) $Echo$_receive_any_text(tuple $self, slice $msg) impure inline {
(tuple, ()) $Echo$_internal_any_text(tuple $self, slice $msg) impure inline {
var $self = $self;
$global_reply($String$_fun_asComment($msg));
return ($self, ());
}

(tuple, ()) $Echo$_receive_any(tuple $self, slice $msg) impure inline {
(tuple, ()) $Echo$_internal_any(tuple $self, slice $msg) impure inline {
var $self = $self;
$global_reply($Slice$_fun_asCell($msg));
return ($self, ());
Expand Down Expand Up @@ -68,7 +68,7 @@ _ lazy_deployment_completed() method_id {
;; Routing of a Contract Echo
;;

(tuple, int) $Echo$_contract_router(tuple self, int msg_bounced, slice in_msg) impure inline_ref {
(tuple, int) $Echo$_contract_router_internal(tuple self, int msg_bounced, slice in_msg) impure inline_ref {

;; Parse incoming message
int op = 0;
Expand All @@ -84,13 +84,13 @@ _ lazy_deployment_completed() method_id {
;; Text Receivers
if (op == 0) {
if (slice_bits(in_msg) >= 32) {
self~$Echo$_receive_any_text(in_msg.skip_bits(32));
self~$Echo$_internal_any_text(in_msg.skip_bits(32));
return (self, true);
}
}

;; Receiver fallback
self~$Echo$_receive_any(in_msg);
self~$Echo$_internal_any(in_msg);
return (self, true);
}

Expand All @@ -108,7 +108,7 @@ _ lazy_deployment_completed() method_id {
var self = $Echo$_contract_load();

;; Handle operation
int handled = self~$Echo$_contract_router(msg_bounced, in_msg);
int handled = self~$Echo$_contract_router_internal(msg_bounced, in_msg);

;; Throw if not handled
throw_unless(handled, 130);
Expand Down
18 changes: 9 additions & 9 deletions examples/output/echo_Echo.code.fif
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ PROGRAM{
DECLPROC $Slice$_fun_asCell
DECLPROC $String$_fun_asComment
DECLPROC $Echo$_fun_hello
DECLPROC $Echo$_receive_any_text
DECLPROC $Echo$_receive_any
DECLPROC $Echo$_internal_any_text
DECLPROC $Echo$_internal_any
115554 DECLMETHOD %hello
113617 DECLMETHOD supported_interfaces
121275 DECLMETHOD get_abi_ipfs
115390 DECLMETHOD lazy_deployment_completed
DECLPROC $Echo$_contract_router
DECLPROC $Echo$_contract_router_internal
DECLPROC recv_internal
DECLGLOBVAR __tact_context
DECLGLOBVAR __tact_context_sender
Expand Down Expand Up @@ -349,11 +349,11 @@ PROGRAM{
__tact_string_builder_append INLINECALLDICT
__tact_string_builder_end_slice INLINECALLDICT
}>
$Echo$_receive_any_text PROCINLINE:<{
$Echo$_internal_any_text PROCINLINE:<{
$String$_fun_asComment INLINECALLDICT
$global_reply INLINECALLDICT
}>
$Echo$_receive_any PROCINLINE:<{
$Echo$_internal_any PROCINLINE:<{
$Slice$_fun_asCell INLINECALLDICT
$global_reply INLINECALLDICT
}>
Expand All @@ -378,7 +378,7 @@ PROGRAM{
1 LDI
SWAP
}>
$Echo$_contract_router PROCREF:<{
$Echo$_contract_router_internal PROCREF:<{
c2 SAVE
SAMEALTSAVE
0 PUSHINT
Expand All @@ -404,12 +404,12 @@ PROGRAM{
IFJMP:<{
32 PUSHINT
SDSKIPFIRST
$Echo$_receive_any_text INLINECALLDICT
$Echo$_internal_any_text INLINECALLDICT
TRUE
RETALT
}>
}>
$Echo$_receive_any INLINECALLDICT
$Echo$_internal_any INLINECALLDICT
TRUE
}>
recv_internal PROC:<{
Expand All @@ -432,7 +432,7 @@ PROGRAM{
__tact_context_sender SETGLOB
$Echo$_contract_load INLINECALLDICT
-ROT
$Echo$_contract_router INLINECALLDICT
$Echo$_contract_router_internal INLINECALLDICT
DROP
$Echo$_contract_store INLINECALLDICT
}>
Expand Down
2 changes: 1 addition & 1 deletion examples/output/echo_Echo.pkg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"Echo","code":"te6ccgECEgEAAu4AART/APSkE/S88sgLAQIBYgIDAo7QAdDTAwFxsKMB+kABINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiFRQUwNvBPhhAvhi2zxZ2zwwMMj4QwHMfwHKAMntVA4EAgFYCAkDmu2i7ftwIddJwh+VMCDXCx/eApJbf+ABwACPHiDXScIfjxaAINch2zx/+EJwWAOAQgFtbds8f9sx4N7IAc8WyX/4QnBYA4BCAW1t2zx/BQYGAULIcAHLH28AAW+MbW+MAds8byIByZMhbrOWAW8iWczJ6DERAcrIcQHKAVAHAcoAcAHKAlAFINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiM8WUAP6AnABymgjbrORf5MkbrPilzMzAXABygDjDSFus5x/AcoAASBu8tCAAcyVMXABygDiyQH7AAcAmH8BygDIcAHKAHABygAkbrOdfwHKAAQgbvLQgFAEzJY0A3ABygDiJG6znX8BygAEIG7y0IBQBMyWNANwAcoA4nABygACfwHKAALJWMwAlbu9GCcFzsPV0srnsehOw51kqFG2aCcJ3WNS0rZHyzItOvLf3xYjmCcCBVwBuAZ2OUzlg6rkclssOCcJ2XTlqzTstzOg6WbZRm6KSAIBSAoLAgJxDA0AdbJu40NWlwZnM6Ly9RbWV4ZUZ4emMyNVI2NmdWdzJZajlvaWY4b0dkNWl2S2lYQWMxUGtuWEZXTlRtggAA+i+7UTQ0gABgIPoYts8Ads8MYODwFG7UTQ1AH4Y9IAAZIwbeD4KNcLCoMJuvLgiYEBAdcAAQHR2zwQAlLIbwABb4xtb4yLdIZWxsbywgjbPAHbPG8iAcmTIW6zlgFvIlnMyegx0BERAAQwbQC6INdKIddJlyDCACLCALGOSgNvIoB/Is8xqwKhBasCUVW2CCDCAJwgqgIV1xhQM88WQBTeWW8CU0GhwgCZyAFvAlBEoaoCjhIxM8IAmdQw0CDXSiHXSZJwIOLi6F8D","abi":"{\"name\":\"Echo\",\"types\":[{\"name\":\"StateInit\",\"header\":null,\"fields\":[{\"name\":\"code\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":false}},{\"name\":\"data\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":false}}]},{\"name\":\"Context\",\"header\":null,\"fields\":[{\"name\":\"bounced\",\"type\":{\"kind\":\"simple\",\"type\":\"bool\",\"optional\":false}},{\"name\":\"sender\",\"type\":{\"kind\":\"simple\",\"type\":\"address\",\"optional\":false}},{\"name\":\"value\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"raw\",\"type\":{\"kind\":\"simple\",\"type\":\"slice\",\"optional\":false}}]},{\"name\":\"SendParameters\",\"header\":null,\"fields\":[{\"name\":\"bounce\",\"type\":{\"kind\":\"simple\",\"type\":\"bool\",\"optional\":false}},{\"name\":\"to\",\"type\":{\"kind\":\"simple\",\"type\":\"address\",\"optional\":false}},{\"name\":\"value\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"mode\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"body\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}},{\"name\":\"code\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}},{\"name\":\"data\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}}]}],\"receivers\":[{\"receiver\":\"internal\",\"message\":{\"kind\":\"text\"}},{\"receiver\":\"internal\",\"message\":{\"kind\":\"any\"}}],\"getters\":[{\"name\":\"hello\",\"arguments\":[{\"name\":\"src\",\"type\":{\"kind\":\"simple\",\"type\":\"string\",\"optional\":false}}],\"returnType\":{\"kind\":\"simple\",\"type\":\"string\",\"optional\":false}}],\"errors\":{\"2\":{\"message\":\"Stack undeflow\"},\"3\":{\"message\":\"Stack overflow\"},\"4\":{\"message\":\"Integer overflow\"},\"5\":{\"message\":\"Integer out of expected range\"},\"6\":{\"message\":\"Invalid opcode\"},\"7\":{\"message\":\"Type check error\"},\"8\":{\"message\":\"Cell overflow\"},\"9\":{\"message\":\"Cell underflow\"},\"10\":{\"message\":\"Dictionary error\"},\"13\":{\"message\":\"Out of gas error\"},\"32\":{\"message\":\"Method ID not found\"},\"34\":{\"message\":\"Action is invalid or not supported\"},\"37\":{\"message\":\"Not enough TON\"},\"38\":{\"message\":\"Not enough extra-currencies\"},\"128\":{\"message\":\"Null reference exception\"},\"129\":{\"message\":\"Invalid serialization prefix\"},\"130\":{\"message\":\"Invalid incoming message\"},\"131\":{\"message\":\"Constraints error\"},\"132\":{\"message\":\"Access denied\"},\"133\":{\"message\":\"Contract stopped\"},\"134\":{\"message\":\"Invalid argument\"},\"135\":{\"message\":\"Code of a contract was not found\"},\"136\":{\"message\":\"Invalid address\"},\"137\":{\"message\":\"Masterchain support is not enabled for this contract\"}},\"interfaces\":[\"org.ton.introspection.v0\",\"org.ton.abi.ipfs.v0\",\"org.ton.deploy.lazy.v0\",\"org.ton.chain.workchain.v0\"]}","init":{"kind":"direct","args":[{"name":"a","type":{"kind":"simple","type":"int","optional":false,"format":257}}],"prefix":{"bits":1,"value":0},"deployment":{"kind":"system-cell","system":"te6cckECFAEAAvgAAQHAAQEFoB5RAgEU/wD0pBP0vPLICwMCAWIMBAIBWAsFAgFIBwYAdbJu40NWlwZnM6Ly9RbWV4ZUZ4emMyNVI2NmdWdzJZajlvaWY4b0dkNWl2S2lYQWMxUGtuWEZXTlRtggAgJxCggCD6GLbPAHbPDGEgkCUshvAAFvjG1vjIt0hlbGxvLCCNs8Ads8byIByZMhbrOWAW8iWczJ6DHQEREAD6L7tRNDSAAGAJW7vRgnBc7D1dLK57HoTsOdZKhRtmgnCd1jUtK2R8syLTry398WI5gnAgVcAbgGdjlM5YOq5HJbLDgnCdl05as07LczoOlm2UZuikgCjtAB0NMDAXGwowH6QAEg10mBAQu68uCIINcLCiCBBP+68tCJgwm68uCIVFBTA28E+GEC+GLbPFnbPDAwyPhDAcx/AcoAye1UEg0Dmu2i7ftwIddJwh+VMCDXCx/eApJbf+ABwACPHiDXScIfjxaAINch2zx/+EJwWAOAQgFtbds8f9sx4N7IAc8WyX/4QnBYA4BCAW1t2zx/EA4OAcrIcQHKAVAHAcoAcAHKAlAFINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiM8WUAP6AnABymgjbrORf5MkbrPilzMzAXABygDjDSFus5x/AcoAASBu8tCAAcyVMXABygDiyQH7AA8AmH8BygDIcAHKAHABygAkbrOdfwHKAAQgbvLQgFAEzJY0A3ABygDiJG6znX8BygAEIG7y0IBQBMyWNANwAcoA4nABygACfwHKAALJWMwBQshwAcsfbwABb4xtb4wB2zxvIgHJkyFus5YBbyJZzMnoMREAuiDXSiHXSZcgwgAiwgCxjkoDbyKAfyLPMasCoQWrAlFVtgggwgCcIKoCFdcYUDPPFkAU3llvAlNBocIAmcgBbwJQRKGqAo4SMTPCAJnUMNAg10oh10mScCDi4uhfAwFG7UTQ1AH4Y9IAAZIwbeD4KNcLCoMJuvLgiYEBAdcAAQHR2zwTAAQwbbHLylw="}},"sources":{"examples/echo.tact":"Y29udHJhY3QgRWNobyB7CgogICAgaW5pdChhOiBJbnQpIHsKICAgICAgICAKICAgIH0KICAgIAogICAgcmVjZWl2ZShtc2c6IFN0cmluZykgewogICAgICAgIHJlcGx5KG1zZy5hc0NvbW1lbnQoKSk7CiAgICB9CiAgICAKICAgIHJlY2VpdmUobXNnOiBTbGljZSkgewogICAgICAgIHJlcGx5KG1zZy5hc0NlbGwoKSk7CiAgICB9CgogICAgZ2V0IGZ1biBoZWxsbyhzcmM6IFN0cmluZyk6IFN0cmluZyB7CiAgICAgICAgbGV0IGJ1aWxkZXI6IFN0cmluZ0J1aWxkZXIgPSBiZWdpblN0cmluZygpOwogICAgICAgIGJ1aWxkZXIuYXBwZW5kKCJIZWxsbywgIik7CiAgICAgICAgYnVpbGRlci5hcHBlbmQoc3JjKTsKICAgICAgICByZXR1cm4gYnVpbGRlci50b1N0cmluZygpOwogICAgfQp9"},"compiler":{"name":"tact","version":"1.1.0-beta.7","parameters":"{\"entrypoint\":\"./examples/echo.tact\",\"options\":{}}"}}
{"name":"Echo","code":"te6ccgECEgEAAu4AART/APSkE/S88sgLAQIBYgIDAo7QAdDTAwFxsKMB+kABINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiFRQUwNvBPhhAvhi2zxZ2zwwMMj4QwHMfwHKAMntVA4EAgFYCAkDmu2i7ftwIddJwh+VMCDXCx/eApJbf+ABwACPHiDXScIfjxaAINch2zx/+EJwWAOAQgFtbds8f9sx4N7IAc8WyX/4QnBYA4BCAW1t2zx/BQYGAULIcAHLH28AAW+MbW+MAds8byIByZMhbrOWAW8iWczJ6DERAcrIcQHKAVAHAcoAcAHKAlAFINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiM8WUAP6AnABymgjbrORf5MkbrPilzMzAXABygDjDSFus5x/AcoAASBu8tCAAcyVMXABygDiyQH7AAcAmH8BygDIcAHKAHABygAkbrOdfwHKAAQgbvLQgFAEzJY0A3ABygDiJG6znX8BygAEIG7y0IBQBMyWNANwAcoA4nABygACfwHKAALJWMwAlbu9GCcFzsPV0srnsehOw51kqFG2aCcJ3WNS0rZHyzItOvLf3xYjmCcCBVwBuAZ2OUzlg6rkclssOCcJ2XTlqzTstzOg6WbZRm6KSAIBSAoLAgJxDA0AdbJu40NWlwZnM6Ly9RbWV4ZUZ4emMyNVI2NmdWdzJZajlvaWY4b0dkNWl2S2lYQWMxUGtuWEZXTlRtggAA+i+7UTQ0gABgIPoYts8Ads8MYODwFG7UTQ1AH4Y9IAAZIwbeD4KNcLCoMJuvLgiYEBAdcAAQHR2zwQAlLIbwABb4xtb4yLdIZWxsbywgjbPAHbPG8iAcmTIW6zlgFvIlnMyegx0BERAAQwbQC6INdKIddJlyDCACLCALGOSgNvIoB/Is8xqwKhBasCUVW2CCDCAJwgqgIV1xhQM88WQBTeWW8CU0GhwgCZyAFvAlBEoaoCjhIxM8IAmdQw0CDXSiHXSZJwIOLi6F8D","abi":"{\"name\":\"Echo\",\"types\":[{\"name\":\"StateInit\",\"header\":null,\"fields\":[{\"name\":\"code\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":false}},{\"name\":\"data\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":false}}]},{\"name\":\"Context\",\"header\":null,\"fields\":[{\"name\":\"bounced\",\"type\":{\"kind\":\"simple\",\"type\":\"bool\",\"optional\":false}},{\"name\":\"sender\",\"type\":{\"kind\":\"simple\",\"type\":\"address\",\"optional\":false}},{\"name\":\"value\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"raw\",\"type\":{\"kind\":\"simple\",\"type\":\"slice\",\"optional\":false}}]},{\"name\":\"SendParameters\",\"header\":null,\"fields\":[{\"name\":\"bounce\",\"type\":{\"kind\":\"simple\",\"type\":\"bool\",\"optional\":false}},{\"name\":\"to\",\"type\":{\"kind\":\"simple\",\"type\":\"address\",\"optional\":false}},{\"name\":\"value\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"mode\",\"type\":{\"kind\":\"simple\",\"type\":\"int\",\"optional\":false,\"format\":257}},{\"name\":\"body\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}},{\"name\":\"code\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}},{\"name\":\"data\",\"type\":{\"kind\":\"simple\",\"type\":\"cell\",\"optional\":true}}]}],\"receivers\":[{\"receiver\":\"internal\",\"message\":{\"kind\":\"text\"}},{\"receiver\":\"internal\",\"message\":{\"kind\":\"any\"}}],\"getters\":[{\"name\":\"hello\",\"arguments\":[{\"name\":\"src\",\"type\":{\"kind\":\"simple\",\"type\":\"string\",\"optional\":false}}],\"returnType\":{\"kind\":\"simple\",\"type\":\"string\",\"optional\":false}}],\"errors\":{\"2\":{\"message\":\"Stack undeflow\"},\"3\":{\"message\":\"Stack overflow\"},\"4\":{\"message\":\"Integer overflow\"},\"5\":{\"message\":\"Integer out of expected range\"},\"6\":{\"message\":\"Invalid opcode\"},\"7\":{\"message\":\"Type check error\"},\"8\":{\"message\":\"Cell overflow\"},\"9\":{\"message\":\"Cell underflow\"},\"10\":{\"message\":\"Dictionary error\"},\"13\":{\"message\":\"Out of gas error\"},\"32\":{\"message\":\"Method ID not found\"},\"34\":{\"message\":\"Action is invalid or not supported\"},\"37\":{\"message\":\"Not enough TON\"},\"38\":{\"message\":\"Not enough extra-currencies\"},\"128\":{\"message\":\"Null reference exception\"},\"129\":{\"message\":\"Invalid serialization prefix\"},\"130\":{\"message\":\"Invalid incoming message\"},\"131\":{\"message\":\"Constraints error\"},\"132\":{\"message\":\"Access denied\"},\"133\":{\"message\":\"Contract stopped\"},\"134\":{\"message\":\"Invalid argument\"},\"135\":{\"message\":\"Code of a contract was not found\"},\"136\":{\"message\":\"Invalid address\"},\"137\":{\"message\":\"Masterchain support is not enabled for this contract\"}},\"interfaces\":[\"org.ton.introspection.v0\",\"org.ton.abi.ipfs.v0\",\"org.ton.deploy.lazy.v0\",\"org.ton.chain.workchain.v0\"]}","init":{"kind":"direct","args":[{"name":"a","type":{"kind":"simple","type":"int","optional":false,"format":257}}],"prefix":{"bits":1,"value":0},"deployment":{"kind":"system-cell","system":"te6cckECFAEAAvgAAQHAAQEFoB5RAgEU/wD0pBP0vPLICwMCAWIMBAIBWAsFAgFIBwYAdbJu40NWlwZnM6Ly9RbWV4ZUZ4emMyNVI2NmdWdzJZajlvaWY4b0dkNWl2S2lYQWMxUGtuWEZXTlRtggAgJxCggCD6GLbPAHbPDGEgkCUshvAAFvjG1vjIt0hlbGxvLCCNs8Ads8byIByZMhbrOWAW8iWczJ6DHQEREAD6L7tRNDSAAGAJW7vRgnBc7D1dLK57HoTsOdZKhRtmgnCd1jUtK2R8syLTry398WI5gnAgVcAbgGdjlM5YOq5HJbLDgnCdl05as07LczoOlm2UZuikgCjtAB0NMDAXGwowH6QAEg10mBAQu68uCIINcLCiCBBP+68tCJgwm68uCIVFBTA28E+GEC+GLbPFnbPDAwyPhDAcx/AcoAye1UEg0Dmu2i7ftwIddJwh+VMCDXCx/eApJbf+ABwACPHiDXScIfjxaAINch2zx/+EJwWAOAQgFtbds8f9sx4N7IAc8WyX/4QnBYA4BCAW1t2zx/EA4OAcrIcQHKAVAHAcoAcAHKAlAFINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiM8WUAP6AnABymgjbrORf5MkbrPilzMzAXABygDjDSFus5x/AcoAASBu8tCAAcyVMXABygDiyQH7AA8AmH8BygDIcAHKAHABygAkbrOdfwHKAAQgbvLQgFAEzJY0A3ABygDiJG6znX8BygAEIG7y0IBQBMyWNANwAcoA4nABygACfwHKAALJWMwBQshwAcsfbwABb4xtb4wB2zxvIgHJkyFus5YBbyJZzMnoMREAuiDXSiHXSZcgwgAiwgCxjkoDbyKAfyLPMasCoQWrAlFVtgggwgCcIKoCFdcYUDPPFkAU3llvAlNBocIAmcgBbwJQRKGqAo4SMTPCAJnUMNAg10oh10mScCDi4uhfAwFG7UTQ1AH4Y9IAAZIwbeD4KNcLCoMJuvLgiYEBAdcAAQHR2zwTAAQwbbHLylw="}},"sources":{"examples/echo.tact":"Y29udHJhY3QgRWNobyB7CgogICAgaW5pdChhOiBJbnQpIHsKICAgICAgICAKICAgIH0KICAgIAogICAgcmVjZWl2ZShtc2c6IFN0cmluZykgewogICAgICAgIHJlcGx5KG1zZy5hc0NvbW1lbnQoKSk7CiAgICB9CiAgICAKICAgIHJlY2VpdmUobXNnOiBTbGljZSkgewogICAgICAgIHJlcGx5KG1zZy5hc0NlbGwoKSk7CiAgICB9CgogICAgZ2V0IGZ1biBoZWxsbyhzcmM6IFN0cmluZyk6IFN0cmluZyB7CiAgICAgICAgbGV0IGJ1aWxkZXI6IFN0cmluZ0J1aWxkZXIgPSBiZWdpblN0cmluZygpOwogICAgICAgIGJ1aWxkZXIuYXBwZW5kKCJIZWxsbywgIik7CiAgICAgICAgYnVpbGRlci5hcHBlbmQoc3JjKTsKICAgICAgICByZXR1cm4gYnVpbGRlci50b1N0cmluZygpOwogICAgfQp9"},"compiler":{"name":"tact","version":"1.1.0-beta.8","parameters":"{\"entrypoint\":\"./examples/echo.tact\",\"options\":{}}"}}
1 change: 1 addition & 0 deletions examples/output/external_External.abi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"External","types":[{"name":"StateInit","header":null,"fields":[{"name":"code","type":{"kind":"simple","type":"cell","optional":false}},{"name":"data","type":{"kind":"simple","type":"cell","optional":false}}]},{"name":"Context","header":null,"fields":[{"name":"bounced","type":{"kind":"simple","type":"bool","optional":false}},{"name":"sender","type":{"kind":"simple","type":"address","optional":false}},{"name":"value","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"raw","type":{"kind":"simple","type":"slice","optional":false}}]},{"name":"SendParameters","header":null,"fields":[{"name":"bounce","type":{"kind":"simple","type":"bool","optional":false}},{"name":"to","type":{"kind":"simple","type":"address","optional":false}},{"name":"value","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"mode","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"body","type":{"kind":"simple","type":"cell","optional":true}},{"name":"code","type":{"kind":"simple","type":"cell","optional":true}},{"name":"data","type":{"kind":"simple","type":"cell","optional":true}}]},{"name":"Deploy","header":2490013878,"fields":[{"name":"queryId","type":{"kind":"simple","type":"uint","optional":false,"format":64}}]},{"name":"DeployOk","header":2952335191,"fields":[{"name":"queryId","type":{"kind":"simple","type":"uint","optional":false,"format":64}}]},{"name":"ChangeOwner","header":256331011,"fields":[{"name":"newOwner","type":{"kind":"simple","type":"address","optional":false}}]}],"receivers":[{"receiver":"internal","message":{"kind":"text","text":"Topup"}},{"receiver":"internal","message":{"kind":"typed","type":"Deploy"}}],"getters":[{"name":"owner","arguments":[],"returnType":{"kind":"simple","type":"address","optional":false}}],"errors":{"2":{"message":"Stack undeflow"},"3":{"message":"Stack overflow"},"4":{"message":"Integer overflow"},"5":{"message":"Integer out of expected range"},"6":{"message":"Invalid opcode"},"7":{"message":"Type check error"},"8":{"message":"Cell overflow"},"9":{"message":"Cell underflow"},"10":{"message":"Dictionary error"},"13":{"message":"Out of gas error"},"32":{"message":"Method ID not found"},"34":{"message":"Action is invalid or not supported"},"37":{"message":"Not enough TON"},"38":{"message":"Not enough extra-currencies"},"128":{"message":"Null reference exception"},"129":{"message":"Invalid serialization prefix"},"130":{"message":"Invalid incoming message"},"131":{"message":"Constraints error"},"132":{"message":"Access denied"},"133":{"message":"Contract stopped"},"134":{"message":"Invalid argument"},"135":{"message":"Code of a contract was not found"},"136":{"message":"Invalid address"},"137":{"message":"Masterchain support is not enabled for this contract"}},"interfaces":["org.ton.introspection.v0","org.ton.abi.ipfs.v0","org.ton.deploy.lazy.v0","org.ton.chain.workchain.v0","org.ton.ownable"]}
Binary file added examples/output/external_External.code.boc
Binary file not shown.
Loading

0 comments on commit a2dd3f4

Please sign in to comment.