I Soroban contract bidings are great! However I would like to see more flexbility.
I didn't know if to post this here or in Github... well...
After changing from @soroban-react to the soroban contract binding, there are less flexibility in the soroban-example-dapp.
Specifically:
- The generated libs are fixed to an specific network
- Fixed with an specific contract id
- Are fixed with an specific wallet (Freigher)
What if we give some flexibility, there we could generate "general" contract bindings that will work:
- regardless on where the contract has been deployed,
- regardless on the wallet that will be used
- regardless on the network that has been deployed
I want to use multichain dapps. This is the same contract that has been deployed in more than one chain (mainnet, testnet), without needing to bind twice, managing twice the amount of typescript packages.
And of course, I want to give the user the ability to choose the wallet
As a supporter of the @soroban-react library I would like to use the power of contract bindings at the same time of the ability of the React dapp to follow the user change of wallet, change of address and change of network
What do you think @brittle imp @hushed yew @wanton folio ?
Maybe we can still set a default network and default contract id
But I want to have the possibility to do crowdfundContract.deadline(network, contractid)
And instead of
await deposit({
user: props.account,
amount: BigInt(amount * 10**decimals),
}
I want to have the possibility to do:
await deposit(
userWalletSignMessageFunction,
userNetwork,
contractId
{
user: props.account,
amount: BigInt(amount * 10**decimals),
}