Skip to content

Conversation

@andreibancioiu
Copy link

No description provided.

@andreibancioiu andreibancioiu self-assigned this May 10, 2024
return ""
return event.address.to_bech32()

def get_deployed_address_given_deployer(deployer: Account) -> str:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't particularly like relying on this precalculated address rather than fetching it from the transaction itself due to the fact that it doesn't provide any indication whether the deploy really passed. We had too many surprises relying on the precalculated method only to find out too late that the original deploy transaction failed for whatever completely unexpected reason.
In the entire flow of the environment, relying blindly on the address without checking the operation can result in very bad configs.
Checking now would need to separately fetch the final status of the transaction and that is either painfully unreliable or time consuming, so in this case, if I have to have this check anyway because I cannot rely on the address only, I might as well directly rely on the SCDeploy event of the transaction itself which is a solid indicator whether it worked or not. If it didn't, program should just crash 'cause there's no reason to continue without it.
In the economics of actual code, I know it's time and resource consuming to fetch the tx again from the network after deploying it, but I have to do it in any case due to the above reasons.
The only difference is whether I directly do it at the atomic deploy level or should I do this check separately every time I deploy something. Since I don't have cases in which I don't care whether it worked or not, I would rather enforce it at this level and save me the headache of forgetting the check and actually failing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unfortunately a no go for me in this state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants