Bot releases are hidden (Show)
Published by digorithm about 2 years ago
json_abi
by @iqdecay in https://github.com/FuelLabs/fuels-rs/pull/466
transaction_parameters
to config json by @Salka1988 in https://github.com/FuelLabs/fuels-rs/pull/419
--no-default-features
flag for running tests by @iqdecay in https://github.com/FuelLabs/fuels-rs/pull/483
TryFrom
trait for Property->ParamType conversion by @iqdecay in https://github.com/FuelLabs/fuels-rs/pull/469
ABIParser
struct by @iqdecay in https://github.com/FuelLabs/fuels-rs/pull/492
Tokenizer
struct type by @iqdecay in https://github.com/FuelLabs/fuels-rs/pull/494
produce_blocks
API by @iqdecay in https://github.com/FuelLabs/fuels-rs/pull/478
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.18.0...v0.19.0
You can now configure the consensus parameters for a test node. For example:
// configure the gas limit
let consensus_parameters_config = ConsensusParameters::DEFAULT.with_max_gas_per_tx(1000000000);
let (client, addr) = setup_test_client(coins, None, Some(consensus_parameters_config)).await;
Note that, now, setup_test_client
will take an additional parameter: an option of the consensus parameters. If you want the default values, pass a None
to it.
Now you can create test wallets with multiple custom assets. You can do so through WalletsConfig
:
WalletsConfig::new_multiple_assets([(asset_id_1, 100, 23), (asset_id_2, 100, 42), ...])
Bech32
supportWe now support Bech32
addresses! This means some of your functions now might return a Bech32
-type of address instead of the expected ContractId
or Address
. Here's how to convert them:
use fuels::prelude::Bech32Address;
use fuels::tx::{Address, Bytes32};
// New from HRP string and a hash
let hrp = "fuel";
let my_slice = [1u8; 32];
let _bech32_address = Bech32Address::new(hrp, my_slice);
// Note that you can also pass a hash stored as Bytes32 to new:
let my_hash = Bytes32::new([1u8; 32]);
let _bech32_address = Bech32Address::new(hrp, my_hash);
// From a string.
let string = "fuel1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqsx2mt2";
let bech32_address =
Bech32Address::from_str(string).expect("failed to create Bech32 address from string");
assert_eq!([0u8; 32], *bech32_address.hash());
// From Address
let plain_address = Address::new([0u8; 32]);
let bech32_address = Bech32Address::from(plain_address);
assert_eq!([0u8; 32], *bech32_address.hash());
// Convert to Address
let _plain_address: Address = bech32_address.into();
CallResponse
The amount of gas used can now be found in your CallResponse
object:
pub struct CallResponse<D> {
pub value: D,
pub receipts: Vec<Receipt>,
pub gas_used: u64,
pub logs: Vec<String>,
}
Contract instances now have a contract ID and wallet getter. I.e., you can easily retrieve which wallet was used to create a contract instance and its ID.
Published by digorithm over 2 years ago
ParamType
type inside fuels-types
by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/457
abigen!
by @segfault-magnet in https://github.com/FuelLabs/fuels-rs/pull/471
fuels
by @Salka1988 in https://github.com/FuelLabs/fuels-rs/pull/455
new
by @segfault-magnet in https://github.com/FuelLabs/fuels-rs/pull/458
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.17.0...v0.18.0
ParamType
moved to fuels-type
No changes in the API or the behavior related to ParamType
, but if you were importing ParamType
from fuels-core
, now you have to import it from fuels-types
.
fuels
The main test suite (a.k.a harness.rs
) was moved from fuels-abigen-macro
to fuels
, the root crate.
The SDK book underwent a major re-organization and re-write; check it out at https://fuellabs.github.io/fuels-rs/latest/.
Published by iqdecay over 2 years ago
setup_test_provider
not working with Config::local_node
by @Salka1988 in https://github.com/FuelLabs/fuels-rs/pull/425
InstantiationError
as a variant of Error
by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/443
--no-default-features
flag by @Salka1988 in https://github.com/FuelLabs/fuels-rs/pull/440
concurrency
to cancel previous CI runs by @AlicanC in https://github.com/FuelLabs/fuels-rs/pull/445
Error
type inside fuels-types
workspace by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/444
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.16.1...v0.17.0
Published by digorithm over 2 years ago
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.16.0...v0.16.1
Published by digorithm over 2 years ago
fuel-core
binary instead of fuel-core
library by @Salka1988 in https://github.com/FuelLabs/fuels-rs/pull/355
result
variables to response
by @thdaraujo in https://github.com/FuelLabs/fuels-rs/pull/400
Introduced in https://github.com/FuelLabs/fuels-rs/pull/404, we no longer support functions or arguments without explicit name.
fuels-abigen-macro
import no longer neededIntroduced in https://github.com/FuelLabs/fuels-rs/pull/393, you no longer need to import fuels-abigen-macro
, it all comes bundled in fuels
. This means that all you need in your Cargo.toml
is fuels
:
[dependencies]
fuels = "0.16"
And, in your Rust code:
use fuels::prelude::{
abigen, ...
};
// or
use fuels::prelude::*;
fuel-core
binary by defaultInstead of using the fuel-core
library by default when you use the SDK, your SDK code now will run against an instance of fuel-core
, the binary. All you have to do is set up your environment:
export FUEL_CORE_BIN = " fuel-core"
export FUEL_CORE_CONFIG = " /config.json"
However, you can still test against the fuel-core
library by passing the flag:--features=fuel-core-lib
.
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.15.3...v0.16.0
Published by digorithm over 2 years ago
No breaking changes in this release.
Option<T>
supportYou can now make use of Sway's Option<T>
in the SDK since an Option<T>
is a nested enum itself. So, now, something like this, in Sway, is possible and supported by the SDK:
contract;
use std::{
address::Address,
constants::NATIVE_ASSET_ID,
identity::Identity,
option::Option,
};
abi MyContract {
fn test_ouput() -> Option<Identity>;
}
impl MyContract for Contract {
fn test_ouput() -> Option<Identity> {
Option::Some(Identity::Address(~Address::from(NATIVE_ASSET_ID)))
}
}
ContractCallHandler
It is possible now to interact with a contract method call's built transaction before running it. Instead of:
// ...
let response = contract_instance.initialize_counter(42).call().await.unwrap();
You can:
// ...
let call_handler = contract_instance.initialize_counter(42);
let script = Script::from_call(&call_handler.contract_call).await;
// interact with script.tx ...
let receipts = script.call(client).await.unwrap();
let response = call_handler.build_response(receipts).unwrap();
Note that the first option stills works; we're just giving you a more granular option. This is useful when you want to inspect the Transaction
or modify it before sending it.
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.15.2...v0.15.3
Published by digorithm over 2 years ago
fuels_contract::errors
mod by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/370
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.15.1...v0.15.2
Published by digorithm over 2 years ago
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.15.0...v0.15.1
Published by digorithm over 2 years ago
examples/
directory and include examples in docs by @Br1ght0ne in https://github.com/FuelLabs/fuels-rs/pull/202
get_spendable_coins
functions by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/349
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.14.1...v0.15.0
Published by adlerjohn over 2 years ago
fuels
by @adlerjohn in https://github.com/FuelLabs/fuels-rs/pull/334
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.14.0...v0.14.1
Published by iqdecay over 2 years ago
fuel-*
versions by @digorithm in https://github.com/FuelLabs/fuels-rs/pull/299
deploy_with_salt
function by @Braqzen in https://github.com/FuelLabs/fuels-rs/pull/305
fuels-*
version in the book by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/310
test-helpers
feature in Wallet
tests by @Salka1988 in https://github.com/FuelLabs/fuels-rs/pull/320
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.13.0...v0.14.0
Published by iqdecay over 2 years ago
Enum
type as function argument by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/275
sway-std-lib
dependency in tests projects by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/280
Enum
by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/283
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.12.0...v0.13.0
Published by digorithm over 2 years ago
TxParameters
to transfer functionality by @digorithm in https://github.com/FuelLabs/fuels-rs/pull/271
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.11.0...v0.12.0
Published by digorithm over 2 years ago
LOGD
data in CallResponse
by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/238
fuels-rs
manifest by @mitchmindtree in https://github.com/FuelLabs/fuels-rs/pull/243
0.12.x
by @digorithm in https://github.com/FuelLabs/fuels-rs/pull/261
LOGD
decoding in harness by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/263
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.10.1...v0.11.0
Published by digorithm over 2 years ago
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.10.0...v0.10.1
Published by digorithm over 2 years ago
Errors
inside fuels-core
by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/198
maturity
field to TxParameters
struct by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/199
B256
argument by @digorithm in https://github.com/FuelLabs/fuels-rs/pull/203
fuels-types
minimal crate for declaring serializable ABI types. Resolves the cycle between fuels-rs
and sway
repos. by @mitchmindtree in https://github.com/FuelLabs/fuels-rs/pull/219
fuels-test-helpers
crate by @tedbyron in https://github.com/FuelLabs/fuels-rs/pull/228
Tuple
in Enum
and Enum
in Tuple
by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/213
Property
types by @vnepveu in https://github.com/FuelLabs/fuels-rs/pull/229
fuel-core
to 0.6 by @digorithm in https://github.com/FuelLabs/fuels-rs/pull/245
fuels-rs
crate to fuels
by @mitchmindtree in https://github.com/FuelLabs/fuels-rs/pull/242
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.9.1...v0.10.0
Published by digorithm over 2 years ago
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.9.0...v0.9.1
Published by digorithm over 2 years ago
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.8.1...v0.9.0
Published by digorithm over 2 years ago
u64
in contract calls by @luizstacio in https://github.com/FuelLabs/fuels-rs/pull/175
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.8.0...v0.8.1
Published by adlerjohn over 2 years ago
Full Changelog: https://github.com/FuelLabs/fuels-rs/compare/v0.7.1...v0.8.0