-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from amazingdatamachine/v12.0.0+adm
V12.0.0+adm
- Loading branch information
Showing
30 changed files
with
712 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[package] | ||
name = "fil_actor_adm" | ||
description = "Builtin machines address manager actor for ADM" | ||
version = "12.0.0" | ||
license = "MIT OR Apache-2.0" | ||
authors = ["ADM"] | ||
edition = "2021" | ||
repository = "https://github.com/filecoin-project/builtin-actors" | ||
keywords = ["filecoin", "web3", "wasm", "adm"] | ||
|
||
[lib] | ||
## lib is necessary for integration tests | ||
## cdylib is necessary for Wasm build | ||
crate-type = ["cdylib", "lib"] | ||
|
||
[dependencies] | ||
anyhow = { workspace = true } | ||
cid = { workspace = true } | ||
fil_actors_runtime = { workspace = true } | ||
fvm_ipld_blockstore = { workspace = true } | ||
fvm_ipld_encoding = { workspace = true } | ||
fvm_shared = { workspace = true } | ||
hex-literal = { workspace = true } | ||
integer-encoding = { workspace = true } | ||
log = { workspace = true } | ||
multihash = { workspace = true } | ||
num-derive = { workspace = true } | ||
num-traits = { workspace = true } | ||
serde = { workspace = true } | ||
|
||
[dev-dependencies] | ||
fil_actors_runtime = { workspace = true, features = ["test_utils"] } | ||
|
||
[features] | ||
fil-actor = ["fil_actors_runtime/fil-actor"] |
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,57 @@ | ||
// Copyright 2024 ADM Contributors | ||
// Copyright 2022-2024 Protocol Labs | ||
// SPDX-License-Identifier: Apache-2.0, MIT | ||
|
||
use fvm_ipld_encoding::tuple::*; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
pub mod init { | ||
use super::*; | ||
use cid::Cid; | ||
use fvm_ipld_encoding::RawBytes; | ||
use fvm_shared::address::Address; | ||
|
||
pub const EXEC_METHOD: u64 = 2; | ||
|
||
/// Init actor Exec Params. | ||
#[derive(Serialize_tuple, Deserialize_tuple)] | ||
pub struct ExecParams { | ||
pub code_cid: Cid, | ||
pub constructor_params: RawBytes, | ||
} | ||
|
||
/// Init actor Exec Return value. | ||
#[derive(Debug, Serialize_tuple, Deserialize_tuple)] | ||
pub struct ExecReturn { | ||
/// ID based address for created actor. | ||
pub id_address: Address, | ||
/// Reorg safe address for actor. | ||
pub robust_address: Address, | ||
} | ||
} | ||
|
||
pub mod account { | ||
pub const PUBKEY_ADDRESS_METHOD: u64 = 2; | ||
} | ||
|
||
pub mod machine { | ||
use super::*; | ||
use fvm_shared::address::Address; | ||
|
||
#[derive(Debug, Serialize_tuple, Deserialize_tuple)] | ||
pub struct ConstructorParams { | ||
/// The machine creator robust address. | ||
pub creator: Address, | ||
/// Write access dictates who can write to the machine. | ||
pub write_access: WriteAccess, | ||
} | ||
|
||
/// The different types of machine write access. | ||
#[derive(Debug, Serialize, Deserialize)] | ||
pub enum WriteAccess { | ||
/// Only the owner can write to the machine. | ||
OnlyOwner, | ||
/// Any valid account can write to the machine. | ||
Public, | ||
} | ||
} |
Oops, something went wrong.