In this article, we introduce an exciting new feature of Bako Safe. You can now create an API token in your vault wallet, and visualize contract deployments directly within the app. This feature, together with the SDK and the Connector, significantly improves the developer experience and moves us closer to being a complete asset management solution for the Fuel ecosystem.
Follow the steps below for the full process.
Open your terminal and run:
curl https://install.fuel.network | sh
fuelup self update
fuelup update
fuelup default latest
Go to Bako Safe and select a vault. If you don’t have a vault with funds, you will need to create one using the Create Vault
button, go to the new vault dashboard, and click on +Faucet
to add funds.
Under Settings
, navigate to API Token
on the right side menu and create a new API token for the vault.
Example token:
f8da721c83c5da37000691027ccb4d629128ffe4071bd044af2d9c8052da7811dc8349c006173cdf05f265f7717d0010ea406ae74d0f0969359e97554d991d791786777f7c21a866dc1c3538defe5875
Copy the API token.
For this tutorial, we've prepared a zip file with three contracts of varying bytecode sizes. You can download it, or write your own contract.
Navigate to the folder of the contract you want to deploy:
# Small bytecode contract
cd ./contract
# Medium bytecode contract
cd ./string-list
# Large bytecode contract
cd ./nft
Within the desired contract folder, open your terminal and deploy the contract using the gateway URL:
forc deploy --default-signer --node-url 'https://api.bako.global/v1/graphql?api_token=APITOKEN'
Replace APITOKEN
with your actual API token, and hit Enter. If everything works correctly, the terminal will display something like this:
Contract contract Deployed!
Network: https://api.bako.global/v1/graphql?api_token=f8da721c83c5da37000691027ccb4d629128ffe4071bd044af2d9c8052da7811dc8349c006173cdf05f265f7717d0010ea406ae74d0f0969359e97554d991d791786777f7c21a866dc1c3538defe5875
Contract ID: 0x21edbc61306958039c28e8076bc21279b800b0fa188c8d9feec72f946b8cd520
Deployed in block 00000000
Now, you will be able to see the deployment within the Bako Safe app and sign accordingly with the vault conditions.
In order to sign the transaction just make shure you have enough balance in your vault to pay for the gas fees. You can add token from the Fuel Faucet by clicking the Faucet button on the Vault home.
By following these steps, you can streamline your contract deployment process with the new API token feature in Bako Safe. This enhancement not only simplifies deployment but also ensures better integration and management of assets within the Fuel ecosystem. Happy coding!
We invite you to join us on our social networks to stay updated and connect with the community: