Skip to content

Commit af4e7b7

Browse files
authored
chore: Update fuel-vm to 0.61.1 (#3002)
1 parent 36ee0ca commit af4e7b7

19 files changed

Lines changed: 88 additions & 73 deletions

File tree

.changes/breaking/3002.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update `fuel-vm` to `0.61.1`. In doing this, we've changed Receipts to use the `SubId` scalar type for sub asset IDs.

Cargo.lock

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ fuel-core-xtask = { version = "0.0.0", path = "./xtask" }
101101
fuel-gas-price-algorithm = { version = "0.43.1", path = "crates/fuel-gas-price-algorithm" }
102102

103103
# Fuel dependencies
104-
fuel-vm-private = { version = "0.60.2", package = "fuel-vm", default-features = false }
104+
fuel-vm-private = { version = "0.61.1", package = "fuel-vm", default-features = false }
105105

106106
# Common dependencies
107107
anyhow = "1.0"

benches/benches/block_target_gas.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ use fuel_core_types::{
9494
},
9595
services::executor::TransactionExecutionResult,
9696
};
97+
use fuel_types::SubAssetId;
9798
use rand::SeedableRng;
9899
use utils::{
99100
make_u128,
@@ -332,7 +333,7 @@ fn service_with_many_contracts(
332333
.unwrap();
333334

334335
let mut storage_key = primitive_types::U256::zero();
335-
let mut sub_id = Bytes32::zeroed();
336+
let mut sub_id = SubAssetId::zeroed();
336337
database
337338
.init_contract_balances(
338339
contract_id,

benches/benches/vm_set/blockchain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl BenchDb {
108108
)?;
109109

110110
let mut storage_key = primitive_types::U256::zero();
111-
let mut sub_id = Bytes32::zeroed();
111+
let mut sub_id = SubAssetId::zeroed();
112112
database.init_contract_balances(
113113
contract_id,
114114
(0..state_size).map(|k| {

crates/client/assets/schema.sdl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ type Receipt {
12011201
Set in the case of a Panic receipt to indicate a missing contract input id
12021202
"""
12031203
contractId: ContractId
1204-
subId: Bytes32
1204+
subId: SubId
12051205
}
12061206

12071207
enum ReceiptType {

crates/client/src/client/schema/primitives.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ fuel_type_scalar!(BlockId, Bytes32);
111111
fuel_type_scalar!(AssetId, AssetId);
112112
fuel_type_scalar!(BlobId, BlobId);
113113
fuel_type_scalar!(ContractId, ContractId);
114-
fuel_type_scalar!(SubId, Bytes32);
114+
fuel_type_scalar!(SubId, SubAssetId);
115115
fuel_type_scalar!(Salt, Salt);
116116
fuel_type_scalar!(TransactionId, Bytes32);
117117
fuel_type_scalar!(RelayedTransactionId, Bytes32);

crates/client/src/client/schema/tx/transparent_receipt.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@ use crate::client::schema::{
33
AssetId,
44
Bytes32,
55
ContractId,
6-
ConversionError,
7-
ConversionError::MissingField,
6+
ConversionError::{
7+
self,
8+
MissingField,
9+
},
810
HexString,
911
Nonce,
12+
SubId,
1013
U64,
1114
schema,
1215
};
@@ -45,7 +48,7 @@ pub struct Receipt {
4548
pub recipient: Option<Address>,
4649
pub nonce: Option<Nonce>,
4750
pub contract_id: Option<ContractId>,
48-
pub sub_id: Option<Bytes32>,
51+
pub sub_id: Option<SubId>,
4952
}
5053

5154
#[derive(cynic::Enum, Clone, Copy, Debug)]

crates/client/src/client/types/asset.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
use crate::client::schema;
22
use fuel_core_types::{
3-
fuel_tx::Bytes32,
3+
fuel_tx::SubAssetId,
44
fuel_types::ContractId,
55
};
66

77
#[derive(Clone, Copy, Debug, PartialEq)]
88
pub struct AssetDetail {
99
pub contract_id: ContractId,
10-
pub sub_id: Bytes32,
10+
pub sub_id: SubAssetId,
1111
pub total_supply: u128,
1212
}
1313

crates/fuel-core/src/graphql_api/indexation/asset_metadata.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ where
9797
receipt => {
9898
return Err(IndexationError::UnexpectedReceipt {
9999
receipt: receipt.to_string(),
100-
})
100+
});
101101
}
102102
};
103103
Ok(new_supply)
@@ -110,10 +110,10 @@ mod tests {
110110
transactional::WriteTransaction,
111111
};
112112
use fuel_core_types::fuel_tx::{
113-
Bytes32,
114113
ContractId,
115114
ContractIdExt,
116115
Receipt,
116+
SubAssetId,
117117
};
118118

119119
use crate::{
@@ -145,7 +145,7 @@ mod tests {
145145

146146
const ASSET_METADATA_IS_ENABLED: bool = true;
147147

148-
let sub_id: Bytes32 = Bytes32::from([1u8; 32]);
148+
let sub_id = SubAssetId::from([1u8; 32]);
149149
let contract_id: ContractId = ContractId::from([2u8; 32]);
150150
let contract_asset_id = contract_id.asset_id(&sub_id);
151151
const MINT_AMOUNT: u64 = 3;
@@ -189,7 +189,7 @@ mod tests {
189189

190190
const ASSET_METADATA_IS_DISABLED: bool = false;
191191

192-
let sub_id: Bytes32 = Bytes32::from([1u8; 32]);
192+
let sub_id = SubAssetId::from([1u8; 32]);
193193
let contract_id: ContractId = ContractId::from([2u8; 32]);
194194
let contract_asset_id = contract_id.asset_id(&sub_id);
195195
const MINT_AMOUNT: u64 = 3;

0 commit comments

Comments
 (0)