The recent version 0.50.0 of mx-sdk-rs removes support for defining upgrade as an endpoint, and instead enforces annotation with #[upgrade] which produces the field upgradeConstructor in the ABI JSON file.
However, in the method getEndpointForUpgrade of SmartContractTransactionsFactory we assume an endpoint upgrade exists and use constructorDefinition (which refers to the init function in the smart contract) as a fallback.
As a result, attempting to upgrade smart contracts with sdk-rs framework version >= 0.50.0 fails if theinit and upgrade arguments differ.
The recent version
0.50.0
of mx-sdk-rs removes support for definingupgrade
as an endpoint, and instead enforces annotation with#[upgrade]
which produces the fieldupgradeConstructor
in the ABI JSON file.However, in the method
getEndpointForUpgrade
ofSmartContractTransactionsFactory
we assume an endpointupgrade
exists and useconstructorDefinition
(which refers to theinit
function in the smart contract) as a fallback.As a result, attempting to upgrade smart contracts with sdk-rs framework version >=
0.50.0
fails if theinit
andupgrade
arguments differ.