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

update doc and readme #326

Merged
merged 3 commits into from
Aug 20, 2024
Merged

update doc and readme #326

merged 3 commits into from
Aug 20, 2024

Conversation

alex0207s
Copy link
Contributor

  • Add Tokenlon Architecture image
  • Update Tokenlon documents
  • Update README

@alex0207s alex0207s requested a review from NIC619 August 5, 2024 10:17
doc/GenericSwap.md Outdated Show resolved Hide resolved
doc/RFQ.md Outdated Show resolved Hide resolved
doc/RFQ.md Outdated
- Partial fill : Whether the Offer can be filled partially or not (but once).
- Contract call : Whether the Offer can be filled by a contract or not.
- `FLG_ALLOW_CONTRACT_SENDER` : Determines whether the RFQ offer can be filled by a contract.
- `FLG_ALLOW_PARTIAL_FILL` : Whether a RFQ offer can be filled partially or not (but once).
Copy link
Contributor

Choose a reason for hiding this comment

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

What does (but once) mean here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it indicates an RFQ order can be partial filled, but can only be filled once, regardless of any remaining quantity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Revised version: Determines whether an RFQ offer can be partially filled. However, each RFQ order can only be filled once, regardless of whether it's fully or partially filled.

doc/RFQ.md Outdated
- Contract call : Whether the Offer can be filled by a contract or not.
- `FLG_ALLOW_CONTRACT_SENDER` : Determines whether the RFQ offer can be filled by a contract.
- `FLG_ALLOW_PARTIAL_FILL` : Whether a RFQ offer can be filled partially or not (but once).
- `FLG_MAKER_RECEIVES_WETH` : Specifies whether a market maker is willing to receive WETH from a RFQ offer.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- `FLG_MAKER_RECEIVES_WETH` : Specifies whether a market maker is willing to receive WETH from a RFQ offer.
- `FLG_MAKER_RECEIVES_WETH` : Specifies whether a market maker wants the RFQ contract to wrap the ETH he received into WETH for him.

doc/RFQ.md Outdated Show resolved Hide resolved
doc/RFQ.md Outdated Show resolved Hide resolved
doc/SmartOrderStrategy.md Outdated Show resolved Hide resolved
doc/SmartOrderStrategy.md Outdated Show resolved Hide resolved
@@ -1,6 +1,8 @@
# TokenCollector

In Tokenlon V6, multiple schemes of token approval is supported. TokenCollector is an abstract contract that handles different ways of token transfering. When interacting with Tokenlon, user can choose one of supported approving scheme and prepare the corresponded Tokenlon permit parameter (in bytes). The first byte of the permit indicate the type and the rest are encoded data with type specific structure.
`TokenCollector` is an abstract contract designed to handle various token collection mechanisms. It supports different methods of token transfer, allowing flexibility in interacting with Tokenlon and other token standards.
Copy link
Contributor

Choose a reason for hiding this comment

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

... allowing flexibility in interacting with Tokenlon and other token standards

What does this mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This means:

  • Tokenlon uses TokenCollector to collect user's tokens.

  • It supports multiple schemes to interact with various token types.

This flexibility allows TokenCollector to handle different token standards and transfer methods efficiently.

Copy link
Contributor

Choose a reason for hiding this comment

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

The flexibility is used to describe "TokenCollector" however "users" are the ones "interacting with" Tokenlon so it's better to differentiate them in your sentence. For example:

Suggested change
`TokenCollector` is an abstract contract designed to handle various token collection mechanisms. It supports different methods of token transfer, allowing flexibility in interacting with Tokenlon and other token standards.
`TokenCollector` is an abstract contract designed to handle various token collection mechanisms. It supports different methods of token transfer, giving users flexibility when interacting with Tokenlon and other token standards.

Or

Suggested change
`TokenCollector` is an abstract contract designed to handle various token collection mechanisms. It supports different methods of token transfer, allowing flexibility in interacting with Tokenlon and other token standards.
`TokenCollector` is an abstract contract designed to handle various token collection mechanisms. It supports different methods of token transfer across different token standards. Users have great flexibility in token authorization when interacting with Tokenlon.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also it seems TokenCollector should be a base contract instead of an abstract contract as it does not have any virtual functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It simply describes that we actually define TokenCollector as an abstract contract.

doc/TokenCollector.md Outdated Show resolved Hide resolved
doc/RFQ.md Outdated Show resolved Hide resolved
@@ -1,6 +1,8 @@
# TokenCollector

In Tokenlon V6, multiple schemes of token approval is supported. TokenCollector is an abstract contract that handles different ways of token transfering. When interacting with Tokenlon, user can choose one of supported approving scheme and prepare the corresponded Tokenlon permit parameter (in bytes). The first byte of the permit indicate the type and the rest are encoded data with type specific structure.
`TokenCollector` is an abstract contract designed to handle various token collection mechanisms. It supports different methods of token transfer, allowing flexibility in interacting with Tokenlon and other token standards.
Copy link
Contributor

Choose a reason for hiding this comment

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

The flexibility is used to describe "TokenCollector" however "users" are the ones "interacting with" Tokenlon so it's better to differentiate them in your sentence. For example:

Suggested change
`TokenCollector` is an abstract contract designed to handle various token collection mechanisms. It supports different methods of token transfer, allowing flexibility in interacting with Tokenlon and other token standards.
`TokenCollector` is an abstract contract designed to handle various token collection mechanisms. It supports different methods of token transfer, giving users flexibility when interacting with Tokenlon and other token standards.

Or

Suggested change
`TokenCollector` is an abstract contract designed to handle various token collection mechanisms. It supports different methods of token transfer, allowing flexibility in interacting with Tokenlon and other token standards.
`TokenCollector` is an abstract contract designed to handle various token collection mechanisms. It supports different methods of token transfer across different token standards. Users have great flexibility in token authorization when interacting with Tokenlon.

@@ -1,6 +1,8 @@
# TokenCollector

In Tokenlon V6, multiple schemes of token approval is supported. TokenCollector is an abstract contract that handles different ways of token transfering. When interacting with Tokenlon, user can choose one of supported approving scheme and prepare the corresponded Tokenlon permit parameter (in bytes). The first byte of the permit indicate the type and the rest are encoded data with type specific structure.
`TokenCollector` is an abstract contract designed to handle various token collection mechanisms. It supports different methods of token transfer, allowing flexibility in interacting with Tokenlon and other token standards.
Copy link
Contributor

Choose a reason for hiding this comment

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

Also it seems TokenCollector should be a base contract instead of an abstract contract as it does not have any virtual functions.

@alex0207s alex0207s merged commit 205af4b into master Aug 20, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants