Skip to content

Conversation

@Thaleszh
Copy link
Contributor

@Thaleszh Thaleszh commented Jul 4, 2025

Description

Creates the flow for a new T-REX including a liquidity pool midway.
Also adds a compliance wrapper that allows whitelisting an address. This way we can use token pairs to do transfers.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation (updates documentation on the project)
  • test (For updates on tests)

How Has This Been Tested?

Tested manually

Copy link
Collaborator

@jhelison jhelison left a comment

Choose a reason for hiding this comment

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

We should one of:

  • The word whitelist on the contract name
    Or/And
  • Have simple docs
    This wrapper stuff can be quite confusing until people check the states and the execution

Comment on lines 170 to 180
let module_address = COMPLIANCE_MODULE_ADDRESS.load(deps.storage)?;

// Replace whitelisted addrs with None
let from = if is_whitelisted(deps, from.clone()) {
None
} else {
from
};
let to = if is_whitelisted(deps, to.clone()) {
None
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is interesting, good job. 100% sure that current compliance modules handle well from and to as None?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, I checked them both. They were already ready to handle calls that were missing one or the other and checked it individually.

Comment on lines 170 to 180
let module_address = COMPLIANCE_MODULE_ADDRESS.load(deps.storage)?;

// Replace whitelisted addrs with None
let from = if is_whitelisted(deps, from.clone()) {
None
} else {
from
};
let to = if is_whitelisted(deps, to.clone()) {
None
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Da heck is going on here? Are we not setting the option above on line 171?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh shit, I must have gotten something in my head mid implementation. Yes, it is duplicated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed it, it doesn't change how it works but for a future deploy it won't have that

@Thaleszh
Copy link
Contributor Author

Thaleszh commented Jul 4, 2025

We should one of:

* The word whitelist on the contract name
  Or/And

* Have simple docs
  This wrapper stuff can be quite confusing until people check the states and the execution

I renamed the contract and added a simple readme.

@Thaleszh Thaleszh merged commit bac2cca into main Jul 4, 2025
5 checks 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

Development

Successfully merging this pull request may close these issues.

3 participants