-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reverse import of fil_actors_runtime and vm_api (#1359)
* amend actor type to match fvm impl * reverse builtin <-> runtime dependency * hide testing utils behind feature flag
- Loading branch information
Showing
12 changed files
with
161 additions
and
132 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 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 |
---|---|---|
@@ -1,50 +1 @@ | ||
use num_derive::FromPrimitive; | ||
|
||
/// Identifies the builtin actor types for usage with the | ||
/// actor::resolve_builtin_actor_type syscall. | ||
/// Note that there is a mirror of this enum in the FVM SDK src/actors/builtins.rs. | ||
/// These must be kept in sync for the syscall to work correctly, without either side | ||
/// importing the other. | ||
#[derive(PartialEq, Eq, Clone, Copy, PartialOrd, Ord, FromPrimitive, Debug)] | ||
#[repr(i32)] | ||
pub enum Type { | ||
System = 1, | ||
Init = 2, | ||
Cron = 3, | ||
Account = 4, | ||
Power = 5, | ||
Miner = 6, | ||
Market = 7, | ||
PaymentChannel = 8, | ||
Multisig = 9, | ||
Reward = 10, | ||
VerifiedRegistry = 11, | ||
DataCap = 12, | ||
Placeholder = 13, | ||
EVM = 14, | ||
EAM = 15, | ||
EthAccount = 16, | ||
} | ||
|
||
impl Type { | ||
pub fn name(&self) -> &'static str { | ||
match *self { | ||
Type::System => "system", | ||
Type::Init => "init", | ||
Type::Cron => "cron", | ||
Type::Account => "account", | ||
Type::Power => "storagepower", | ||
Type::Miner => "storageminer", | ||
Type::Market => "storagemarket", | ||
Type::PaymentChannel => "paymentchannel", | ||
Type::Multisig => "multisig", | ||
Type::Reward => "reward", | ||
Type::VerifiedRegistry => "verifiedregistry", | ||
Type::DataCap => "datacap", | ||
Type::Placeholder => "placeholder", | ||
Type::EVM => "evm", | ||
Type::EAM => "eam", | ||
Type::EthAccount => "ethaccount", | ||
} | ||
} | ||
} | ||
pub use vm_api::builtin::Type; |
This file contains 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 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 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 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 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.