Skip to content

Commit

Permalink
[mpm] Support hack any account in integration-test
Browse files Browse the repository at this point in the history
  • Loading branch information
jolestar committed Jul 22, 2022
1 parent a1442a9 commit c795122
Show file tree
Hide file tree
Showing 21 changed files with 8,012 additions and 8,158 deletions.
15,748 changes: 7,874 additions & 7,874 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion abi/decoder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ anyhow = "1.0.41"
bcs = "0.1"
bcs-ext = {path = "../../commons/bcs_ext"}
hex = "0.4.3"
move-binary-format = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-binary-format = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
ordinal = "0.3.1"
schemars = {git = "https://github.com/starcoinorg/schemars", rev = "6972da92f4360e1779168bb3fe0274c521d324e2"}
serde = {version = "1.0.130", features = ["derive", "rc"]}
Expand Down
2 changes: 1 addition & 1 deletion abi/resolver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.11.11"

[dependencies]
anyhow = "~1"
move-model = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-model = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
starcoin-abi-types = {path = "../types"}
starcoin-resource-viewer = {path = "../../vm/resource-viewer"}
starcoin-vm-types = {path = "../../vm/types"}
Expand Down
4 changes: 2 additions & 2 deletions cmd/starcoin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ forkable-jellyfish-merkle = {path = "../../commons/forkable-jellyfish-merkle"}
futures = "0.3.12"
hex = {version = "0.4.3", default-features = false}
itertools = "0.10.3"
move-command-line-common = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-errmapgen = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-command-line-common = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-errmapgen = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
network-api = {path = "../../network/api", package = "network-api"}
network-p2p-types = {path = "../../network-p2p/types"}
rand = "0.8.5"
Expand Down
2 changes: 1 addition & 1 deletion commons/proptest-helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.11.11"

[dependencies]
crossbeam = "0.7.3"
diem-proptest-helpers = {package = "diem-proptest-helpers", git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
diem-proptest-helpers = {package = "diem-proptest-helpers", git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}

proptest = "1.0.0"
proptest-derive = "0.3.0"
6 changes: 3 additions & 3 deletions devtools/x/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ regex = "1.6.0"
serde = {version = "1.0.130", features = ["derive"]}
serde_json = "1.0.61"
toml = "0.5.9"
x = {package = "x", git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
x-core = {package = "x-core", git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
x-lint = {package = "x-lint", git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
x = {package = "x", git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
x-core = {package = "x-core", git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
x-lint = {package = "x-lint", git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
12 changes: 6 additions & 6 deletions types/src/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,22 @@ impl Account {
/// This function returns distinct values upon every call.
pub fn new() -> Self {
let (privkey, pubkey) = KeyGen::from_os_rng().generate_keypair();
Self::with_keypair(privkey, pubkey, None)
Self::with_keypair(privkey.into(), pubkey.into(), None)
}

/// Creates a new account with the given keypair.
///
/// Like with [`Account::new`], the account returned by this constructor is a purely logical
/// entity.
pub fn with_keypair(
privkey: Ed25519PrivateKey,
pubkey: Ed25519PublicKey,
privkey: AccountPrivateKey,
pubkey: AccountPublicKey,
addr: Option<AccountAddress>,
) -> Self {
let addr = addr.unwrap_or_else(|| crate::account_address::from_public_key(&pubkey));
let addr = addr.unwrap_or_else(|| pubkey.derived_address());
Account {
addr,
private_key: Arc::new(AccountPrivateKey::Single(privkey)),
private_key: Arc::new(privkey),
}
}

Expand Down Expand Up @@ -354,7 +354,7 @@ impl AccountData {
balance_token_code: &str,
sequence_number: u64,
) -> Self {
let account = Account::with_keypair(privkey, pubkey, addr);
let account = Account::with_keypair(privkey.into(), pubkey.into(), addr);
Self::with_account(account, balance, balance_token_code, sequence_number)
}

Expand Down
6 changes: 3 additions & 3 deletions vm/compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ version = "1.11.11"
[dependencies]
anyhow = "1.0.41"
itertools = "0.10.3"
move-binary-format = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-command-line-common = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-compiler = {package = "move-compiler", git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-binary-format = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-command-line-common = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-compiler = {package = "move-compiler", git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
once_cell = "1.13.0"
petgraph = "0.5.1"
rayon = "1.5.1"
Expand Down
8 changes: 4 additions & 4 deletions vm/move-coverage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ colored = "2.0.0"
petgraph = "0.5.1"
serde = {version = "1.0.130", default-features = false}

move-binary-format = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-bytecode-source-map = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-command-line-common = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-coverage = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-binary-format = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-bytecode-source-map = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-command-line-common = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-coverage = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
[features]
default = []
2 changes: 1 addition & 1 deletion vm/move-explain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ version = "1.11.11"
[dependencies]
bcs-ext = {package = "bcs-ext", path = "../../commons/bcs_ext"}
clap = {version = "3", features = ["derive"]}
move-core-types = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-core-types = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
stdlib = {package = "stdlib", path = "../stdlib"}

[features]
Expand Down
24 changes: 12 additions & 12 deletions vm/move-package-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ tokio = {version = "^1", features = ["full"]}

bcs-ext = {package = "bcs-ext", path = "../../commons/bcs_ext"}
datatest-stable = {git = "https://github.com/starcoinorg/diem-devtools", branch = "feature/pub-test-opts"}
move-binary-format = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-bytecode-verifier = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-cli = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-command-line-common = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-compiler = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-core-types = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-coverage = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-disassembler = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-errmapgen = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-package = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-unit-test = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-vm-runtime = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-binary-format = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-bytecode-verifier = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-cli = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-command-line-common = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-compiler = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-core-types = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-coverage = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-disassembler = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-errmapgen = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-package = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-unit-test = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-vm-runtime = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
resource-viewer = {path = "../resource-viewer", package = "starcoin-resource-viewer"}
starcoin-account-provider = {path = "../../account/provider"}
starcoin-cmd = {path = "../../cmd/starcoin"}
Expand Down
6 changes: 3 additions & 3 deletions vm/move-prover/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version = "1.11.11"

[dependencies]
## move dependencies
move-prover = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-prover = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}

# external dependencies
anyhow = "1.0.41"
Expand All @@ -18,8 +18,8 @@ tempfile = "3.2.0"

[dev-dependencies]
datatest-stable = "0.1.1"
move-command-line-common = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-prover-test-utils = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-command-line-common = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-prover-test-utils = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
once_cell = "1.13.0"
shell-words = "1.0.0"
tempfile = "3.2"
Expand Down
18 changes: 9 additions & 9 deletions vm/natives/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ version = "1.11.11"
arrayref = "0.3"
libsecp256k1 = "0.7.1"
log = "0.4.14"
move-binary-format = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-command-line-common = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-core-types = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-docgen = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-errmapgen = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-prover = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-stdlib = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-vm-runtime = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-vm-types = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-binary-format = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-command-line-common = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-core-types = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-docgen = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-errmapgen = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-prover = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-stdlib = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-vm-runtime = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-vm-types = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
num_enum = "0.5.7"
ripemd160 = "0.9.1"
smallvec = "1.8.1"
Expand Down
4 changes: 2 additions & 2 deletions vm/resource-viewer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ version = "1.11.11"
[dependencies]
anyhow = "1.0.41"
hex = "0.4.3"
move-binary-format = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-core-types = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-binary-format = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-core-types = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
serde = {version = "1.0.130", features = ["derive", "rc"]}
serde_json = "1.0"
starcoin-vm-types = {path = "../types"}
12 changes: 6 additions & 6 deletions vm/starcoin-transactional-test-harness/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ itertools = "~0.10"
jsonrpc-client-transports = {version = "18", features = ["http", "ipc", "ws", "arbitrary_precision"]}
jsonrpc-core-client = {version = "18", features = ["http", "ipc", "ws", "arbitrary_precision"]}
log = {version = "0.4.16"}
move-binary-format = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-command-line-common = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-compiler = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-core-types = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-transactional-test-runner = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-binary-format = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-command-line-common = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-compiler = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-core-types = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
move-transactional-test-runner = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
once_cell = "~1"
serde = {version = "1"}
serde_json = {version = "1"}
tokio = {version = "^1", features = ["full"]}

bcs-ext = {path = "../../commons/bcs_ext"}
move-resource-viewer = {git = "https://github.com/starcoinorg/move", rev = "09e1a360c9749c8c58fe33ec6f312adab0541e9b"}
move-resource-viewer = {git = "https://github.com/starcoinorg/move", rev = "04b173c834732ac8acf3bea49342c02520925dc6"}
starcoin-abi-decoder = {path = "../../abi/decoder"}
starcoin-config = {path = "../../config"}
starcoin-crypto = {git = "https://github.com/starcoinorg/starcoin-crypto", rev = "d871dfb4216f034ee334a575926c101574d9d6dc"}
Expand Down
Loading

0 comments on commit c795122

Please sign in to comment.