-
Notifications
You must be signed in to change notification settings - Fork 6
Add Wrapped TON (wTON) #746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7eace49
1c8e98e
ad06d92
c9268c8
0de29f1
8e0ea90
d5e7e6f
54d6b92
95237a1
bf7054a
494093f
ade0133
f2a24a9
b1258df
84e10d0
29a568b
449378d
c1c2283
079a20e
0142a19
5acd17b
8e6f43f
38feac3
8c2e2b2
a01efad
b7aa74c
7951ea4
dd85e20
156c67e
54aae5d
4508733
5b28f2d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| watch_file shell.nix | ||
| use flake .#contracts || use nix |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| // SPDX-License-Identifier: MIT | ||
|
|
||
| const ERROR_INVALID_OP = 72 | ||
| const ERROR_NOT_OWNER = 73 | ||
|
krebernisak marked this conversation as resolved.
|
||
| const ERROR_NOT_VALID_WALLET = 74 | ||
| const ERROR_WRONG_WORKCHAIN = 333 | ||
| const ERROR_BALANCE_ERROR = 47 | ||
| const ERROR_NOT_ENOUGH_GAS = 48 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| // SPDX-License-Identifier: MIT | ||
| import "storage" | ||
|
|
||
| fun calcDeployedJettonWallet(ownerAddress: address, minterAddress: address, jettonWalletCode: cell): AutoDeployAddress { | ||
| val emptyWalletStorage: WalletStorage = { | ||
| status: 0, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this status for?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is also defined in notcoin but not mentioned in docs
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's used to lock outgoing and incoming transfers in the original notcoin impl here: https://github.com/OpenBuilders/notcoin-contract/blob/c9992514b71f1775cec5df49fbea31a85ddd87f9/contracts/jetton-wallet.fc#L44C5-L44C62 We keep it in ther ref implementation for consistent addr derivation and |
||
| jettonBalance: 0, | ||
| ownerAddress, | ||
| minterAddress, | ||
| }; | ||
|
|
||
| return { | ||
| workchain: BASECHAIN, | ||
| stateInit: { | ||
| code: jettonWalletCode, | ||
|
patricios-space marked this conversation as resolved.
|
||
| data: emptyWalletStorage.toCell() | ||
| } | ||
| } | ||
| } | ||
|
|
||
| fun calcAddressOfJettonWallet(ownerAddress: address, minterAddress: address, jettonWalletCode: cell) { | ||
| val jwDeployed = calcDeployedJettonWallet(ownerAddress, minterAddress, jettonWalletCode); | ||
| return jwDeployed.calculateAddress(); | ||
| } | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.