refactor(configuration): Support Bridgechains & Custom Configurations#105
refactor(configuration): Support Bridgechains & Custom Configurations#105faustbrian merged 4 commits intoArkEcosystemArchive:developfrom sleepdefic1t:refactor(configuration)/support-bridgechains
Conversation
The current implementation only allows use with Devnet unless values are manually changed in `/src`. This PR enables network configuration via the public api. (Devnet, Mainnet, Testnet, and Custom Networks (bridgechains). Specifically this PR does the following: - Creates a Configuration class. - Creates Fee and Network Manager children for the Configuration class. - Allows passing a `Configuration to` Transaction Builder with a default value of `Devnet` & `StaticFees` (non-breaking). - Adds a FeePolicy-type. - Adds a Fee class (container for fee policies). - Adds a Networks class (container for preset networks). - Updates the TransactionTypes enum. - Improves the `Network` class and Network implementions. - Updates the `Slot` class to reflect changes (non-breaking). - Updates Transaction-related classes to reflect updates (non-breaking). - Adds tests for all changes. - Updates the Arduino IDE script. - Updates `.ino` Arduino sketches with Configuration examples. - Updates documentation with Configuration examples. - Updates the `keywords.txt` file to reflect changes. - Updates the changelog. - Updates version to `v.0.6.0`. Some small changes are technically breaking-changes. (e.g. `Devnet` vs `Devnet()`, and `Fees` vs `Fees::StaticFeePolicy`)
Codecov Report
@@ Coverage Diff @@
## develop #105 +/- ##
===========================================
+ Coverage 91.14% 91.52% +0.37%
===========================================
Files 27 30 +3
Lines 836 861 +25
===========================================
+ Hits 762 788 +26
+ Misses 74 73 -1
Continue to review full report at Codecov.
|
|
I will take a look when I am back in a few days but just a quick note on the public API part (disregard if not relevant) All our crypto packages are being built with the lack of any knowledge about networking as that isn't and shouldn't be of any concern for crypto to work. How the developer decides to feed the configuration to the package is also not the concern of the crypto package, the only concern it has is to receive the configuration in a specific format. If that configuration came from a remote API, file or function that just generated an object isn't our concern and we shouldn't be involved in that process. |
|
@faustbrian |
|
All good then, get paranoid when people submit PRs with the words Will be back normal around thursday/friday and then take a look at the whole PR. |
|
The ci/circleci: build-macos-9-2 job is failing as of 2510281468e9ea2a7bbf41ae56d5611520d65c65. Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
1 similar comment
|
The ci/circleci: build-macos-9-2 job is failing as of 2510281468e9ea2a7bbf41ae56d5611520d65c65. Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
chore(arduino): merge changes at #105 for Arduino. Co-authored-by: Chris Johnson <chrisjohnsonmail@gmail.com> Co-authored-by: Brian Faust <faustbrian@users.noreply.github.com>
The current implementation only allows use with Devnet unless values are manually changed in
/src.This was never fully intended, as such this is submitted as a
refactoras opposed to afeaturePR.These changes enable network configuration via the ARK Crypto library api.
(Devnet, Mainnet, Testnet, and Custom Networks (bridgechains).
Specifically this PR does the following:
Configurationto Transaction Builder with a default value ofDevnet&StaticFees(non-breaking).NetworkandNetworksclasses (breaking).Slotclass to reflect changes (non-breaking)..inoArduino sketches with Configuration examples.keywords.txtfile to reflect changes.v.0.6.0.What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Does this PR release a new version?
There are two breaking changes in this PR.
(e.g.
DevnetvsDevnet(), andFeesvsFees::StaticFeePolicy)The PR fulfills these requirements:
developbranch, not themasterbranch