-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Hubert Bugaj <[email protected]>
- Loading branch information
1 parent
11b28c5
commit 7e1d60a
Showing
149 changed files
with
16,712 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,6 @@ | |
|
||
pub mod v10; | ||
pub mod v11; | ||
pub mod v12; | ||
pub mod v8; | ||
pub mod v9; |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2019-2022 ChainSafe Systems | ||
// SPDX-License-Identifier: Apache-2.0, MIT | ||
|
||
use fvm_shared4::METHOD_CONSTRUCTOR; | ||
use num_derive::FromPrimitive; | ||
|
||
pub use self::state::State; | ||
pub use types::*; | ||
|
||
mod state; | ||
mod types; | ||
|
||
/// Account actor methods available | ||
#[derive(FromPrimitive)] | ||
#[repr(u64)] | ||
pub enum Method { | ||
Constructor = METHOD_CONSTRUCTOR, | ||
PubkeyAddress = 2, | ||
// Deprecated in v10 | ||
// AuthenticateMessage = 3, | ||
AuthenticateMessageExported = frc42_macros::method_hash!("AuthenticateMessage"), | ||
} |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright 2019-2022 ChainSafe Systems | ||
// SPDX-License-Identifier: Apache-2.0, MIT | ||
|
||
use fvm_ipld_encoding::tuple::*; | ||
use fvm_shared4::address::Address; | ||
|
||
/// State includes the address for the actor | ||
#[derive(Serialize_tuple, Deserialize_tuple, Debug, Clone)] | ||
pub struct State { | ||
pub address: Address, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2019-2022 ChainSafe Systems | ||
// SPDX-License-Identifier: Apache-2.0, MIT | ||
|
||
use fvm_ipld_encoding::strict_bytes; | ||
use fvm_ipld_encoding::tuple::*; | ||
use fvm_shared4::address::Address; | ||
|
||
#[derive(Debug, Serialize_tuple, Deserialize_tuple)] | ||
#[serde(transparent)] | ||
pub struct ConstructorParams { | ||
pub address: Address, | ||
} | ||
|
||
#[derive(Debug, Serialize_tuple, Deserialize_tuple)] | ||
#[serde(transparent)] | ||
pub struct PubkeyAddressReturn { | ||
pub address: Address, | ||
} | ||
|
||
#[derive(Debug, Serialize_tuple, Deserialize_tuple)] | ||
pub struct AuthenticateMessageParams { | ||
#[serde(with = "strict_bytes")] | ||
pub signature: Vec<u8>, | ||
#[serde(with = "strict_bytes")] | ||
pub message: Vec<u8>, | ||
} | ||
|
||
#[derive(Debug, Serialize_tuple, Deserialize_tuple)] | ||
#[serde(transparent)] | ||
pub struct AuthenticateMessageReturn { | ||
pub authenticated: bool, | ||
} |
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 |
---|---|---|
|
@@ -3,5 +3,6 @@ | |
|
||
pub mod v10; | ||
pub mod v11; | ||
pub mod v12; | ||
pub mod v8; | ||
pub mod v9; |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2019-2022 ChainSafe Systems | ||
// SPDX-License-Identifier: Apache-2.0, MIT | ||
|
||
use fvm_ipld_encoding::tuple::*; | ||
|
||
use fvm_shared4::METHOD_CONSTRUCTOR; | ||
use num_derive::FromPrimitive; | ||
|
||
pub use self::state::{Entry, State}; | ||
|
||
mod state; | ||
|
||
// * Updated to specs-actors commit: 845089a6d2580e46055c24415a6c32ee688e5186 (v3.0.0) | ||
|
||
/// Cron actor methods available | ||
#[derive(FromPrimitive)] | ||
#[repr(u64)] | ||
pub enum Method { | ||
Constructor = METHOD_CONSTRUCTOR, | ||
EpochTick = 2, | ||
} | ||
|
||
/// Constructor parameters for Cron actor, contains entries | ||
/// of actors and methods to call on each epoch | ||
#[derive(Default, Debug, Serialize_tuple, Deserialize_tuple)] | ||
pub struct ConstructorParams { | ||
/// Entries is a set of actors (and corresponding methods) to call during EpochTick. | ||
pub entries: Vec<Entry>, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2019-2022 ChainSafe Systems | ||
// SPDX-License-Identifier: Apache-2.0, MIT | ||
|
||
use fvm_ipld_encoding::tuple::*; | ||
use fvm_shared4::address::Address; | ||
use fvm_shared4::MethodNum; | ||
|
||
/// Cron actor state which holds entries to call during epoch tick | ||
#[derive(Default, Serialize_tuple, Deserialize_tuple, Clone, Debug)] | ||
pub struct State { | ||
/// Entries is a set of actors (and corresponding methods) to call during EpochTick. | ||
pub entries: Vec<Entry>, | ||
} | ||
|
||
#[derive(Clone, PartialEq, Eq, Debug, Serialize_tuple, Deserialize_tuple)] | ||
pub struct Entry { | ||
/// The actor to call (ID address) | ||
pub receiver: Address, | ||
/// The method number to call (must accept empty parameters) | ||
pub method_num: MethodNum, | ||
} |
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 |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
|
||
pub mod v10; | ||
pub mod v11; | ||
pub mod v12; | ||
pub mod v9; |
Oops, something went wrong.