Skip to content
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

feat(gateway): improve Gateway contract #15

Merged
merged 8 commits into from
Oct 10, 2024
Merged

Conversation

swift1337
Copy link
Contributor

@swift1337 swift1337 commented Oct 8, 2024

Changes

  • Introduce authority concept. Move the following messages from TSS to authority
    • set_deposits_enabled
    • update_code
    • update_tss
  • Add update_authority message
  • Optimize gas usage by removing fields from outbound deposit log. Keep only "deposited" and "deposit gas fee" fields
  • Add explanatory description of gateway messages in README
  • Add code owners

Closes #5, #11, #13, #14

@swift1337 swift1337 self-assigned this Oct 8, 2024
@swift1337 swift1337 marked this pull request as ready for review October 8, 2024 14:34
@swift1337 swift1337 force-pushed the feat/batch-improvements branch from de845d7 to f2c3b17 Compare October 8, 2024 14:39
@lumtis lumtis linked an issue Oct 8, 2024 that may be closed by this pull request
.github/CODEOWNERS Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
contracts/gateway.fc Show resolved Hide resolved
tests/Gateway.spec.ts Show resolved Hide resolved
@swift1337 swift1337 requested a review from lumtis October 8, 2024 17:40
Copy link
Member

@lumtis lumtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT
Just one comment to precise what run is, this is not clear for someone not familiar with TON

README.md Outdated Show resolved Hide resolved
contracts/gateway.fc Show resolved Hide resolved
contracts/gateway.fc Show resolved Hide resolved
Copy link

@skosito skosito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just some minor comments feel free to apply what makes sense since it is first time i am checking ton codebase

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
scripts/deployGateway.ts Outdated Show resolved Hide resolved
scripts/deployGateway.ts Outdated Show resolved Hide resolved
@@ -216,14 +209,20 @@ export class Gateway implements Contract {
return state.balance;
}

async getQueryState(provider: ContractProvider): Promise<[boolean, bigint, string]> {
async getGatewayState(provider: ContractProvider): Promise<GatewayState> {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, can be called getState since gateway.getGatewayState seems redundant, but up to you

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, getState() is reserved by TON which returns TON balance and last tx hash thus I chose this name

tests/Gateway.spec.ts Outdated Show resolved Hide resolved
tests/Gateway.spec.ts Show resolved Hide resolved
@swift1337 swift1337 merged commit 5f108f9 into main Oct 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants