Interacting with contracts

If you already have a deployed contract and want to call its methods using the SDK, but without deploying it again, all you need is the contract ID of your deployed contract. You can skip the whole deployment setup and call ::new(contract_id, wallet) directly. For example:

        // Replace with your contract ABI.json path
        abigen!(
            MyContract,
            "packages/fuels/tests/test_projects/contract_test/out/debug/contract_test-abi.json"
        );
        let wallet = launch_provider_and_get_wallet().await;
        // Your contract ID as a String.
        let contract_id =
            "fuel1vkm285ypjesypw7vhdlhnty3kjxxx4efckdycqh3ttna4xvmxtfs6murwy".to_string();

        let connected_contract_instance = MyContractBuilder::new(contract_id, wallet).build();
        // You can now use the `connected_contract_instance` just as you did above!