Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use strictMode during deploy #2849

Merged
merged 5 commits into from
Apr 10, 2023
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Neo/SmartContract/Native/ContractManagement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ private async ContractTask<ContractState> Deploy(ApplicationEngine engine, byte[

NefFile nef = nefFile.AsSerializable<NefFile>();
ContractManifest parsedManifest = ContractManifest.Parse(manifest);
Helper.Check(nef.Script, parsedManifest.Abi);
Helper.Check(new VM.Script(nef.Script, true), parsedManifest.Abi);
shargon marked this conversation as resolved.
Show resolved Hide resolved
UInt160 hash = Helper.GetContractHash(tx.Sender, nef.CheckSum, parsedManifest.Name);

if (Policy.IsBlocked(engine.Snapshot, hash))
Expand Down Expand Up @@ -295,7 +295,7 @@ private ContractTask Update(ApplicationEngine engine, byte[] nefFile, byte[] man
throw new InvalidOperationException($"Invalid Manifest Hash: {contract.Hash}");
contract.Manifest = manifest_new;
}
Helper.Check(contract.Nef.Script, contract.Manifest.Abi);
Helper.Check(new VM.Script(contract.Nef.Script, true), contract.Manifest.Abi);
contract.UpdateCounter++; // Increase update counter
return OnDeploy(engine, contract, data, true);
}
Expand Down