Diff
checker
文本
文本
图像
文档
Excel
文件夹
Legal
Enterprise
桌面版
定价
登录
下载 Diffchecker 桌面版
比较文本
查找两个文本文件之间的差异
工具
历史
实时编辑器
折叠未更改行
关闭换行
视图
拆分
统一
比对精度
智能
单词
字符
语法高亮
选择语法
忽略
文本转换
转到第一个差异
编辑输入
Diffchecker Desktop
运行Diffchecker最安全的方式。获取Diffchecker桌面应用:您的差异永远不会离开您的电脑!
获取桌面版
Untitled Diff
创建于
5年前
差异永不过期
清除
导出
分享
两个文本完全相同
这两个文本之间没有差异
0 删除
行
总计
删除
字符
总计
删除
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
62 行
全部复制
0 添加
行
总计
添加
字符
总计
添加
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
62 行
全部复制
// SPDX-License-Identifier: AGPL-3.0-or-later
// SPDX-License-Identifier: AGPL-3.0-or-later
// Copyright (C) 2021 Dai Foundation
// Copyright (C) 2021 Dai Foundation
// This program is free software: you can redistribute it and/or modify
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// (at your option) any later version.
//
//
// This program is distributed in the hope that it will be useful,
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
// GNU Affero General Public License for more details.
//
//
// You should have received a copy of the GNU Affero General Public License
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
// along with this program. If not, see <https://www.gnu.org/licenses/>.
pragma solidity ^0.6.11;
pragma solidity ^0.6.11;
interface ApproveLike {
interface ApproveLike {
function approve(address, uint256) external;
function approve(address, uint256) external;
}
}
// Escrow funds on L1, manage approval rights
// Escrow funds on L1, manage approval rights
contract L1Escrow {
contract L1Escrow {
// --- Auth ---
// --- Auth ---
mapping(address => uint256) public wards;
mapping(address => uint256) public wards;
function rely(address usr) external auth {
function rely(address usr) external auth {
wards[usr] = 1;
wards[usr] = 1;
emit Rely(usr);
emit Rely(usr);
}
}
function deny(address usr) external auth {
function deny(address usr) external auth {
wards[usr] = 0;
wards[usr] = 0;
emit Deny(usr);
emit Deny(usr);
}
}
modifier auth() {
modifier auth() {
require(wards[msg.sender] == 1, "L1Escrow/not-authorized");
require(wards[msg.sender] == 1, "L1Escrow/not-authorized");
_;
_;
}
}
event Rely(address indexed usr);
event Rely(address indexed usr);
event Deny(address indexed usr);
event Deny(address indexed usr);
event Approve(address indexed token, address indexed spender, uint256 value);
event Approve(address indexed token, address indexed spender, uint256 value);
constructor() public {
constructor() public {
wards[msg.sender] = 1;
wards[msg.sender] = 1;
emit Rely(msg.sender);
emit Rely(msg.sender);
}
}
function approve(
function approve(
address token,
address token,
address spender,
address spender,
uint256 value
uint256 value
) external auth {
) external auth {
emit Approve(token, spender, value);
emit Approve(token, spender, value);
ApproveLike(token).approve(spender, value);
ApproveLike(token).approve(spender, value);
}
}
}
}
已保存差异
原始文本
打开文件
// SPDX-License-Identifier: AGPL-3.0-or-later // Copyright (C) 2021 Dai Foundation // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. pragma solidity ^0.6.11; interface ApproveLike { function approve(address, uint256) external; } // Escrow funds on L1, manage approval rights contract L1Escrow { // --- Auth --- mapping(address => uint256) public wards; function rely(address usr) external auth { wards[usr] = 1; emit Rely(usr); } function deny(address usr) external auth { wards[usr] = 0; emit Deny(usr); } modifier auth() { require(wards[msg.sender] == 1, "L1Escrow/not-authorized"); _; } event Rely(address indexed usr); event Deny(address indexed usr); event Approve(address indexed token, address indexed spender, uint256 value); constructor() public { wards[msg.sender] = 1; emit Rely(msg.sender); } function approve( address token, address spender, uint256 value ) external auth { emit Approve(token, spender, value); ApproveLike(token).approve(spender, value); } }
更改后文本
打开文件
// SPDX-License-Identifier: AGPL-3.0-or-later // Copyright (C) 2021 Dai Foundation // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. pragma solidity ^0.6.11; interface ApproveLike { function approve(address, uint256) external; } // Escrow funds on L1, manage approval rights contract L1Escrow { // --- Auth --- mapping(address => uint256) public wards; function rely(address usr) external auth { wards[usr] = 1; emit Rely(usr); } function deny(address usr) external auth { wards[usr] = 0; emit Deny(usr); } modifier auth() { require(wards[msg.sender] == 1, "L1Escrow/not-authorized"); _; } event Rely(address indexed usr); event Deny(address indexed usr); event Approve(address indexed token, address indexed spender, uint256 value); constructor() public { wards[msg.sender] = 1; emit Rely(msg.sender); } function approve( address token, address spender, uint256 value ) external auth { emit Approve(token, spender, value); ApproveLike(token).approve(spender, value); } }
查找差异