Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
cca71ab7
Unverified
Commit
cca71ab7
authored
Apr 16, 2020
by
Nicolás Venturo
Committed by
GitHub
Apr 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix deprecation warnings (#2115)
* Fix deprecation warnings * Workaround linter bug
parent
8b10cb38
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
ERC165Checker.sol
contracts/introspection/ERC165Checker.sol
+2
-2
PullPayment.sol
contracts/payment/PullPayment.sol
+6
-2
Address.sol
contracts/utils/Address.sol
+2
-2
No files found.
contracts/introspection/ERC165Checker.sol
View file @
cca71ab7
pragma solidity ^0.6.
0
;
pragma solidity ^0.6.
2
;
/**
/**
* @dev Library used to query support of an interface declared via {IERC165}.
* @dev Library used to query support of an interface declared via {IERC165}.
...
@@ -97,7 +97,7 @@ library ERC165Checker {
...
@@ -97,7 +97,7 @@ library ERC165Checker {
returns (bool, bool)
returns (bool, bool)
{
{
bytes memory encodedParams = abi.encodeWithSelector(_INTERFACE_ID_ERC165, interfaceId);
bytes memory encodedParams = abi.encodeWithSelector(_INTERFACE_ID_ERC165, interfaceId);
(bool success, bytes memory result) = account.staticcall
.gas(30000)
(encodedParams);
(bool success, bytes memory result) = account.staticcall
{ gas: 30000 }
(encodedParams);
if (result.length < 32) return (false, false);
if (result.length < 32) return (false, false);
return (success, abi.decode(result, (bool)));
return (success, abi.decode(result, (bool)));
}
}
...
...
contracts/payment/PullPayment.sol
View file @
cca71ab7
pragma solidity ^0.6.
0
;
pragma solidity ^0.6.
2
;
import "./escrow/Escrow.sol";
import "./escrow/Escrow.sol";
...
@@ -62,6 +62,10 @@ contract PullPayment {
...
@@ -62,6 +62,10 @@ contract PullPayment {
* @param amount The amount to transfer.
* @param amount The amount to transfer.
*/
*/
function _asyncTransfer(address dest, uint256 amount) internal virtual {
function _asyncTransfer(address dest, uint256 amount) internal virtual {
_escrow.deposit.value(amount)(dest);
// solhint-disable-previous-line no-unused-vars
// TODO: remove the previous linter directive once
// https://github.com/protofire/solhint/issues/170 is fixed
_escrow.deposit{ value: amount }(dest);
}
}
}
}
contracts/utils/Address.sol
View file @
cca71ab7
pragma solidity ^0.6.
0
;
pragma solidity ^0.6.
2
;
/**
/**
* @dev Collection of functions related to the address type
* @dev Collection of functions related to the address type
...
@@ -52,7 +52,7 @@ library Address {
...
@@ -52,7 +52,7 @@ library Address {
require(address(this).balance >= amount, "Address: insufficient balance");
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call
.value(amount)
("");
(bool success, ) = recipient.call
{ value: amount }
("");
require(success, "Address: unable to send value, recipient may have reverted");
require(success, "Address: unable to send value, recipient may have reverted");
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment