-
Notifications
You must be signed in to change notification settings - Fork 11
refactor: replace builders with evm #134
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
Merged
ItsANameToo
merged 32 commits into
feat/mainsail
from
refactor/replace-builders-with-evm
Oct 31, 2024
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
c49cdc7
evm call builder is now the main transaction
alfonsobries 2faf459
formatting
alfonsobries b24292a
cleanup evm builder
alfonsobries 4058542
add gasPrice alias for fee
alfonsobries 6366771
remove vendor field serialization
alfonsobries 1b26027
cleanup to be in match with js version
alfonsobries 3352037
wip
alfonsobries 3feb2c5
add test for deserializer
alfonsobries 210a291
replace transfer test with serializer deserializer
alfonsobries 5ba1431
Delete TransferTest.php
alfonsobries 96f0609
formatting
alfonsobries b9dbd46
transaction is now the evm call
alfonsobries 7fe53ce
remove enums
alfonsobries 4ef035f
style: resolve style guide violations
alfonsobries 384453a
rollback fee
alfonsobries a555a4b
Merge branch 'refactor/replace-builders-with-evm' of github.com:ArkEc…
alfonsobries 8860a68
remove deprecated transactions types & builders
alfonsobries 420bf91
abi encoder
alfonsobries db5291f
add abi decoder
alfonsobries b3623fb
Create AbiDecoderTest.php
alfonsobries 8744c1e
wip
alfonsobries a5cf18a
style: resolve style guide violations
alfonsobries 5c924f2
wip
alfonsobries 73c0166
Merge branch 'refactor/replace-builders-with-evm' of github.com:ArkEc…
alfonsobries 4a53f5f
wip
alfonsobries 8bde0d5
style: resolve style guide violations
alfonsobries 19a5dd9
wip
alfonsobries c0c0d3c
Merge branch 'refactor/replace-builders-with-evm' of github.com:ArkEc…
alfonsobries e02a5d8
wip
alfonsobries df1822b
add validator registration
alfonsobries b772050
add validator resignation
alfonsobries a7fadb8
style: resolve style guide violations
alfonsobries File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace ArkEcosystem\Crypto\Enums; | ||
|
||
use ArkEcosystem\Crypto\Transactions\Types\Unvote; | ||
use ArkEcosystem\Crypto\Transactions\Types\ValidatorRegistration; | ||
use ArkEcosystem\Crypto\Transactions\Types\ValidatorResignation; | ||
use ArkEcosystem\Crypto\Transactions\Types\Vote; | ||
|
||
enum AbiFunction: string | ||
{ | ||
case VOTE = 'vote'; | ||
case UNVOTE = 'unvote'; | ||
case VALIDATOR_REGISTRATION = 'registerValidator'; | ||
case VALIDATOR_RESIGNATION = 'resignValidator'; | ||
|
||
public function transactionClass(): string | ||
{ | ||
return match ($this) { | ||
self::VOTE => Vote::class, | ||
self::UNVOTE => Unvote::class, | ||
self::VALIDATOR_REGISTRATION => ValidatorRegistration::class, | ||
self::VALIDATOR_RESIGNATION => ValidatorResignation::class, | ||
}; | ||
} | ||
} |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EVM fees will be based on network usage, similar to ethereum. In that case we will need a method to define a given fee, and the client (most likely) should get a method to retrieve network based fees (slow/avg/fast) that can then be passed to the crypto library after the user selects one of them