While deploying the contract I am getting this error error: provider: Server returned 404 Not Found:

Topic discussion checklist

  • Run $ fuelup show and add the output below
  • Detailed steps to recreate issue
    I tried deploying a simple src20 asset contract but got this error

I tried to deploy the contract using forc deploy --testnet.

  • Link full scope of the codebase pertaining to your issue
  • Any other relevant information
1 Like

can you run fuelup show, and paste output here?

1 Like

Just want to chime in here as I suspect you are trying to use a custom toolchain for forc v0.55.0.

TLDR;
Theres a version mismatch of using the latest vesrion of Sway as the devnet is not ready yet.

Please let us know how we can help further :slight_smile:

okay got it! so what i want is to deploy an asset contract. we are using the standard blueprint provided in the github repo: sway-applications/native-asset at master · FuelLabs/sway-applications · GitHub

But on running forc build we run into this error:

Let me know if i am doing anything wrong over here. Thanks! :))

Do i need to revert back to beta-4?

No need to revert back to beta-4. What is happening is that sway-applications is bumped up to devnet version and is incompatible with beta-5.

What you need to do is bump DOWN the sway-standards version back to beta-5 in your ‘forc.toml’ which is where you declare dependancies.

For example
standards = { git = "https://github.com/FuelLabs/sway-standards", tag = "beta-5" }

Yeah,


tried that but the issue persists.

Can you try this instead?

asset = { git = "https://github.com/FuelLabs/sway-libs", tag = "v0.18.0" }
src20 = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.3.3" }
src3 = { git = "https://github.com/FuelLabs/sway-standards", tag = "v0.3.3" }

Now, I’m getting these errors

You have to bump the code as well down to beta-5 compatibility

Try using the repo at this commit

Yep, Successfully Deployed. Thanks a lot.

1 Like

Hey, I had one more question, I am a bit unfamiliar with Sway syntax and want to understand what does the process of creating your own token look like. I tried going through the contract but couldn’t find the answer to this:

  1. Where will i get the Asset_ID from?
  2. Do I have to add the Token Details in here, and if yes how do i add supply in StorageMap?
storage {
    /// The total number of unique assets minted by this contract.
    total_assets: u64 = 0,
    /// The total number of coins minted for a particular asset.
    total_supply: StorageMap<AssetId, u64> = StorageMap {},
    /// The name associated with a particular asset.
    name: StorageMap<AssetId, StorageString> = StorageMap {},
    /// The symbol associated with a particular asset.
    symbol: StorageMap<AssetId, StorageString> = StorageMap {},
    /// The decimals associated with a particular asset.
    decimals: StorageMap<AssetId, u8> = StorageMap {},
}```

Hello @sarthak good questions

  1. asset_id is derived form sha256((contract_id, sub_id)). Where contract id is the contract address and sub id is the unique id of one of the tokens within that contract since contracts can have multiple tokens derived from it.
    You can read more here in the standard library
  2. The same way you would set symbols for multiple assets like so or using configurable like you would with single assets.
    a. tests
    b. functions
    c. single asset

Not able to deploy this. I tried to build but ran into compile time errors.

@shivamlync are you in the Fuel builder’s discord? Send me a DM if you are not theres going to be more information about the devnet coming next week :no_mouth:

What is your userbname in discord?

Added you discord. Please check