Skip to content

Commit

Permalink
Fix permission assertion of UpdateUserSmartContract
Browse files Browse the repository at this point in the history
  • Loading branch information
eanzhao committed Jul 24, 2024
1 parent 96ad4b1 commit 6612407
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion contract/AElf.Contracts.Genesis/BasicContractZero.cs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,6 @@ public override Empty UpdateUserSmartContract(UserContractUpdateInput input)
var info = State.ContractInfos[input.Address];
Assert(info != null, "Contract not found.");
Assert(Context.Sender == info.Author, "No permission.");
Assert(info.Deployer == null || info.Deployer == Context.Sender, "No permission to update.");
var codeHash = HashHelper.ComputeFrom(input.Code.ToByteArray());
Assert(info.CodeHash != codeHash, "Code is not changed.");
AssertContractNotExists(codeHash);
Expand Down

0 comments on commit 6612407

Please sign in to comment.