🎨 Macros update and documentation - #483
Merged
Merged
Conversation
Member
Author
lrazovic
force-pushed
the
05-08-chore_bump_to_stable_2503-2
branch
from
May 8, 2025 09:45
1ec8417 to
c76355c
Compare
lrazovic
force-pushed
the
05-08-feat_macros_update_and_documentation
branch
from
May 8, 2025 09:45
86ad07e to
382f61e
Compare
This was referenced May 8, 2025
lrazovic
force-pushed
the
05-08-feat_macros_update_and_documentation
branch
from
May 9, 2025 15:44
382f61e to
91611a0
Compare
This was referenced May 9, 2025
Merged
lrazovic
marked this pull request as ready for review
May 16, 2025 14:44
There was a problem hiding this comment.
Pull Request Overview
This PR updates macros in the funding instantiator to improve runtime event assertions and introduce new functionality.
- Enhances the assert_close_enough! macro with clearer intermediate variables and a unified edge-case handling.
- Adds the new is_close_enough! macro for boolean checks based on closeness.
- Overhauls the find_event! macro to support advanced event filtering with field checks.
lrazovic
force-pushed
the
05-08-chore_bump_to_stable_2503-2
branch
from
May 19, 2025 06:15
c76355c to
c66702c
Compare
lrazovic
force-pushed
the
05-08-feat_macros_update_and_documentation
branch
2 times, most recently
from
May 19, 2025 06:48
6c2a7dd to
eb49fc8
Compare
lrazovic
force-pushed
the
05-08-chore_bump_to_stable_2503-2
branch
from
May 19, 2025 06:48
c66702c to
26a2f51
Compare
lrazovic
force-pushed
the
05-08-feat_macros_update_and_documentation
branch
from
May 20, 2025 06:21
eb49fc8 to
5abd90d
Compare
Closed
lrazovic
force-pushed
the
05-08-chore_bump_to_stable_2503-2
branch
from
May 28, 2025 13:35
26a2f51 to
65f2ce3
Compare
lrazovic
force-pushed
the
05-08-feat_macros_update_and_documentation
branch
from
May 28, 2025 13:35
5abd90d to
14b0f58
Compare
lrazovic
changed the base branch from
05-08-chore_bump_to_stable_2503-2
to
graphite-base/483
May 28, 2025 13:38
lrazovic
force-pushed
the
05-08-feat_macros_update_and_documentation
branch
from
May 28, 2025 13:38
14b0f58 to
2fa24d7
Compare
lrazovic
changed the base branch from
graphite-base/483
to
05-19-bid_with_receiving_account_xcm_support
May 28, 2025 13:38
dastansam
changed the base branch from
05-19-bid_with_receiving_account_xcm_support
to
graphite-base/483
July 9, 2025 06:37
dastansam
force-pushed
the
05-08-feat_macros_update_and_documentation
branch
from
July 9, 2025 06:38
2fa24d7 to
60e9f36
Compare
dastansam
force-pushed
the
graphite-base/483
branch
from
July 9, 2025 06:38
b37298c to
65f2ce3
Compare
dastansam
changed the base branch from
graphite-base/483
to
05-08-chore_bump_to_stable_2503-2
July 9, 2025 06:38
dastansam
approved these changes
Jul 28, 2025
| // You should have received a copy of the GNU General Public License | ||
| // along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
|
||
| #[macro_export] |
Contributor
There was a problem hiding this comment.
Suggested change
| #[macro_export] |
doesn't need to be exported? (not sure if it works though)
Member
Author
lrazovic
changed the base branch from
05-08-chore_bump_to_stable_2503-2
to
graphite-base/483
August 4, 2025 07:49
lrazovic
force-pushed
the
05-08-feat_macros_update_and_documentation
branch
from
August 4, 2025 07:50
60e9f36 to
45a3925
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This pull request introduces significant improvements and new features to macros in the
pallets/funding/src/instantiator/macros.rsfile. The changes include enhancements to theassert_close_enough!macro, the addition of a newis_close_enough!macro, and a comprehensive overhaul of thefind_event!macro to support more advanced use cases. These updates improve functionality, readability, and flexibility when working with runtime events and assertions in the Substrate framework.Enhancements to
assert_close_enough!macro:Perquintill::one()is returned in such scenarios.Addition of
is_close_enough!macro:is_close_enough!to check if two values are close enough based on a minimum percentage, returning a boolean instead of asserting.assert_close_enough!for consistency.