This is my SRC20 contract:
contract;
use standards::{src20::SRC20, src3::SRC3};
use std::{
asset::{
burn,
mint_to,
This is my SRC20 contract:
contract;
use standards::{src20::SRC20, src3::SRC3};
use std::{
asset::{
burn,
mint_to,
If you want to test Sway smart contracts on your local Fuel node, you will probably encounter the following instruction: https://docs.fuel.network/docs/fuels-rs/connecting/external-node/ to modify your harness.rs test file.
You will most likely encounter two issues:
SecrteKey::from_str()
return value is of Result
type and cannot be handled using ?
because of how get_contract_instance()
is defined.salt
of Create
transaction is by default set to 0
and hence deploy()
will try to deploy the contract using already existing contractId
.To solve those issues use the following.