-
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
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,10 @@ | ||
| // SPDX-License-Identifier: MIT | ||
|
|
||
| const ERROR_INVALID_OP = 72 | ||
| const ERROR_WRONG_OP = 0xffff | ||
|
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. Unused |
||
| 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 | ||
| const ERROR_INVALID_MESSAGE = 49 | ||
|
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. Unused |
||
| 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, | ||
| jettonBalance: 0, | ||
| ownerAddress, | ||
| minterAddress, | ||
| }; | ||
|
|
||
| return { | ||
| workchain: BASECHAIN, | ||
| stateInit: { | ||
| code: jettonWalletCode, | ||
|
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. I wonder if there's a way to use the hash of the code instead to save on storage and compute fees. IIUC the hash is computed from leaves to root, so the hash of the code should always result in the same. |
||
| 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.