Skip to content

Commit

Permalink
Merge branch 'main' into pr-template
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-trunov authored Mar 27, 2024
2 parents 36c39ad + 79222d9 commit 2ec77eb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Update the `dump` function to handle addresses: PR [#175](https://github.com/tact-lang/tact/pull/175)
- The implicit empty `init` function is now present by default in the contract if not declared: PR [#167](https://github.com/tact-lang/tact/pull/167)
- `@stdlib/stoppable` now imports `@stdlib/ownable` so the programmer does not have to do it separately: PR [#193](https://github.com/tact-lang/tact/pull/193)

### Fixed

Expand Down
1 change: 0 additions & 1 deletion examples/rugpull.tact
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "@stdlib/ownable";
import "@stdlib/stoppable";

struct RugParams {
Expand Down
18 changes: 9 additions & 9 deletions src/imports/stdlib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ files['libs/ownable.tact'] =
'ZXBseSByZXN1bHQKICAgICAgICBzZWxmLnJlcGx5KENoYW5nZU93bmVyT2t7IHF1ZXJ5SWQ6IG1zZy5xdWVyeUlkLCBuZXdPd25lcjptc2cubmV3T3duZXIgfS50b0Nl' +
'bGwoKSk7CiAgICB9Cn0=';
files['libs/stoppable.tact'] =
'QGludGVyZmFjZSgib3JnLnRvbi5zdG9wcGFibGUiKQp0cmFpdCBTdG9wcGFibGUgd2l0aCBPd25hYmxlIHsKICAgIAogICAgc3RvcHBlZDogQm9vbDsKICAgIG93bmVy' +
'OiBBZGRyZXNzOwoKICAgIGZ1biByZXF1aXJlTm90U3RvcHBlZCgpIHsKICAgICAgICByZXF1aXJlKCFzZWxmLnN0b3BwZWQsICJDb250cmFjdCBzdG9wcGVkIik7CiAg' +
'ICB9CgogICAgZnVuIHJlcXV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cXVpcmVTdG9wcGVkKCkgewogICAgICAgIHJlcXVpcmUoc2VsZi5zdG9wcGVkLCAiQ29udHJhY3Qgbm90' +
'IHN0b3BwZWQiKTsKICAgIH0KCiAgICByZWNlaXZlKCJTdG9wIikgewogICAgICAgIHNlbGYucmVxdWlyZU93bmVyKCk7CiAgICAgICAgc2VsZi5yZXF1aXJlTm90U3Rv' +
'cHBlZCgpOwogICAgICAgIHNlbGYuc3RvcHBlZCA9IHRydWU7CiAgICAgICAgc2VsZi5yZXBseSgiU3RvcHBlZCIuYXNDb21tZW50KCkpOwogICAgfQoKICAgIGdldCBm' +
'dW4gc3RvcHBlZCgpOiBCb29sIHsKICAgICAgICByZXR1cm4gc2VsZi5zdG9wcGVkOwogICAgfQp9CgpAaW50ZXJmYWNlKCJvcmcudG9uLnJlc3VtYWJsZSIpCnRyYWl0' +
'IFJlc3VtYWJsZSB3aXRoIFN0b3BwYWJsZSB7CiAgICBzdG9wcGVkOiBCb29sOwogICAgb3duZXI6IEFkZHJlc3M7CgogICAgcmVjZWl2ZSgiUmVzdW1lIikgewogICAg' +
'ICAgIHNlbGYucmVxdWlyZU93bmVyKCk7CiAgICAgICAgc2VsZi5yZXF1aXJlU3RvcHBlZCgpOwogICAgICAgIHNlbGYuc3RvcHBlZCA9IGZhbHNlOwogICAgICAgIHNl' +
'bGYucmVwbHkoIlJlc3VtZWQiLmFzQ29tbWVudCgpKTsKICAgIH0KfQ==';
files['std/base.tact'] =
'dHJhaXQgQmFzZVRyYWl0IHsKICAgIHZpcnR1YWwgY29uc3Qgc3RvcmFnZVJlc2VydmU6IEludCA9IDA7CiAgICAKICAgIHZpcnR1YWwgaW5saW5lIGZ1biByZXBseShi' +
'b2R5OiBDZWxsPykgewogICAgICAgIHNlbGYuZm9yd2FyZChzZW5kZXIoKSwgYm9keSwgdHJ1ZSwgbnVsbCk7CiAgICB9CgogICAgdmlydHVhbCBpbmxpbmUgZnVuIG5v' +
Expand Down
2 changes: 2 additions & 0 deletions stdlib/libs/stoppable.tact
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import "./ownable";

@interface("org.ton.stoppable")
trait Stoppable with Ownable {

Expand Down

0 comments on commit 2ec77eb

Please sign in to comment.