Skip to content

Commit

Permalink
fix contract ids
Browse files Browse the repository at this point in the history
  • Loading branch information
xunilrj committed Jul 25, 2023
1 parent 6f6cbc9 commit dd9716a
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 13 deletions.
3 changes: 2 additions & 1 deletion test/src/e2e_vm_tests/harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ pub(crate) fn test_json_abi(file_name: &str, built_package: &BuiltPackage) -> Re
let output_contents =
fs::read_to_string(output_path).expect("Something went wrong reading the file.");
if oracle_contents != output_contents {
bail!("Mismatched ABI JSON output.");
let diffs = prettydiff::diff_words(&oracle_contents, &output_contents);
bail!("Mismatched ABI JSON output: {}", diffs.to_string());
}
Ok(())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"types": [
{
"components": null,
"type": "u256",
"type": "bool",
"typeId": 0,
"typeParameters": null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use array_of_structs_abi::{Id, TestContract, Wrapper};
use std::hash::sha256;

fn main() -> u64 {
let addr = abi(TestContract, 0x6f21fe2568822746d1e6a3c2fc4ad1b010f43f8487ba130768b0f34c9ecb9da7);
let addr = abi(TestContract, 0x8be98f018738eb6e554372cc3e57c24475662e6eeff9781be50b146c41e72d05);

let input = [Wrapper {
id: Id {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use balance_test_abi::BalanceTest;

fn main() -> bool {
// @todo switch to using ContractId when abi signature changes.
let balance_test_contract_id = 0xd54323a3316a7cfd26a3bab076a0194dfffbcc9a583d152043f5237fa60753ed;
let balance_test_contract_id = 0x4a00baa517980432b9274a0e2f03c88735bdb483730816679c6eb37b4046d060;

let balance_test_contract = abi(BalanceTest, balance_test_contract_id);
let number = balance_test_contract.get_42 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ script;
use abi_with_tuples::*;

fn main() -> bool {
let the_abi = abi(MyContract, 0xae6af2e324ada9943f1c9b3d6ea2db1b9f9bb1cd1732321877b59bd75b6821fd);
let the_abi = abi(MyContract, 0x7376aa3e846e8cefcd6e8c2dfea32e15cc8fef3bbdc67ef115897e0f09391cfc);

let param1 = (
Person {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ script;
use basic_storage_abi::{BasicStorage, Quad};

fn main() -> u64 {
let addr = abi(BasicStorage, 0x346251fd98fc1495c415daa4cf1d80281e7fbe5353e51125bbed63637fc1cd9b);
let addr = abi(BasicStorage, 0xceb326912590088f7eb8659b2aaa9cf3519bfdb8e50a85a6e85650b143ab048a);
let key = 0x0fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff;
let value = 4242;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ script;
use contract_with_type_aliases_abi::*;

fn main() {
let caller = abi(MyContract, 0xfcb02d42c5e47a434798b1ec463f9fea652fbb47d2f99e9919650ceceb013799);
let caller = abi(MyContract, 0xbd6247bd39fdb5659cfe97f377ab76bc408f79d916846e8f572067eae863686c);

let x = AssetId::from(0x0101010101010101010101010101010101010101010101010101010101010101);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ script;
use increment_abi::Incrementor;

fn main() -> bool {
let the_abi = abi(Incrementor, 0x1ed1f82d3114e974dc70f82d8e425e28cc5fa4fcbc8458d602bc213bcedbc883);
let the_abi = abi(Incrementor, 0x8d7fecc21740f83bf8fa26f53c8f389681e728bd2917a978716d7b8a34f9f826);
the_abi.increment(5);
the_abi.increment(5);
let result = the_abi.get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fn main() -> bool {
let zero = b256::min();
let gas: u64 = u64::max();
let amount: u64 = 11;
let other_contract_id = ContractId::from(0x248afda385f2763d12712f668c52b78a928b7fdc848b67ae3c4fb12efd89ce94);
let other_contract_id = ContractId::from(0x419a6e9cbe1fc4122755f7aea3403331216b34a5fbd85a2388055bcc5cceb936);
let base_asset_id = BASE_ASSET_ID;

let test_contract = abi(ContextTesting, other_contract_id.into());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ script;
use nested_struct_args_abi::*;

fn main() -> bool {
let contract_id = 0xbc305fb5e79e14f1cbd578ec5661686610720b6fe3117ffd54f49ef00bd4b011;
let contract_id = 0xfa4bb608c7de0db473862926816eb23d17469ec2ef08685aab3c4ddd1892f9a8;
let caller = abi(NestedStructArgs, contract_id);

let param_one = StructOne {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use storage_access_abi::*;
use std::hash::sha256;

fn main() -> bool {
let contract_id = 0x2a63e216624d51ad41942c40f5da7c932caa7b2d531b9ef0a6f4e517e860b6f8;
let contract_id = 0x21519bb45315d4918b4ffb9c579626d64bdbd0948e257dd192dc082af9087055;
let caller = abi(StorageAccess, contract_id);

// Test initializers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ fn main() -> bool {
let default_gas = 1_000_000_000_000;

// the deployed fuel_coin Contract_Id:
let fuelcoin_id = ContractId::from(0x2eac4ac4fbff902244be04d8d60be35e5fd6e29cbab5c8ad7b6905c60ce921bf);
let fuelcoin_id = ContractId::from(0x65a04f8f865d98dd97ea638d7c1ea7b807670226a5091ccd38bae3f2eeead286);

// contract ID for sway/test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/balance_test_contract/
let balance_test_id = ContractId::from(0xd54323a3316a7cfd26a3bab076a0194dfffbcc9a583d152043f5237fa60753ed);
let balance_test_id = ContractId::from(0x4a00baa517980432b9274a0e2f03c88735bdb483730816679c6eb37b4046d060);

// todo: use correct type ContractId
let fuel_coin = abi(TestFuelCoin, fuelcoin_id.into());
Expand Down

0 comments on commit dd9716a

Please sign in to comment.