Rename remaining inconsistencies
This commit is contained in:
parent
0cfcb6aa37
commit
8bd29596c4
@ -19,7 +19,7 @@
|
|||||||
pragma solidity ^0.5.5;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "@0x/contracts-utils/contracts/src/SafeMath.sol";
|
import "@0x/contracts-utils/contracts/src/SafeMath.sol";
|
||||||
import "@0x/contracts-utils/contracts/src/Address.sol";
|
import "@0x/contracts-utils/contracts/src/LibAddress.sol";
|
||||||
import "./interfaces/IERC1155.sol";
|
import "./interfaces/IERC1155.sol";
|
||||||
import "./interfaces/IERC1155Receiver.sol";
|
import "./interfaces/IERC1155Receiver.sol";
|
||||||
import "./MixinNonFungibleToken.sol";
|
import "./MixinNonFungibleToken.sol";
|
||||||
@ -30,7 +30,7 @@ contract ERC1155 is
|
|||||||
IERC1155,
|
IERC1155,
|
||||||
MixinNonFungibleToken
|
MixinNonFungibleToken
|
||||||
{
|
{
|
||||||
using Address for address;
|
using LibAddress for address;
|
||||||
|
|
||||||
// selectors for receiver callbacks
|
// selectors for receiver callbacks
|
||||||
bytes4 constant public ERC1155_RECEIVED = 0xf23a6e61;
|
bytes4 constant public ERC1155_RECEIVED = 0xf23a6e61;
|
||||||
@ -97,7 +97,7 @@ contract ERC1155 is
|
|||||||
emit TransferSingle(msg.sender, from, to, id, value);
|
emit TransferSingle(msg.sender, from, to, id, value);
|
||||||
|
|
||||||
// if `to` is a contract then trigger its callback
|
// if `to` is a contract then trigger its callback
|
||||||
if (to._isContract()) {
|
if (to.isContract()) {
|
||||||
bytes4 callbackReturnValue = IERC1155Receiver(to).onERC1155Received(
|
bytes4 callbackReturnValue = IERC1155Receiver(to).onERC1155Received(
|
||||||
msg.sender,
|
msg.sender,
|
||||||
from,
|
from,
|
||||||
@ -177,7 +177,7 @@ contract ERC1155 is
|
|||||||
emit TransferBatch(msg.sender, from, to, ids, values);
|
emit TransferBatch(msg.sender, from, to, ids, values);
|
||||||
|
|
||||||
// if `to` is a contract then trigger its callback
|
// if `to` is a contract then trigger its callback
|
||||||
if (to._isContract()) {
|
if (to.isContract()) {
|
||||||
bytes4 callbackReturnValue = IERC1155Receiver(to).onERC1155BatchReceived(
|
bytes4 callbackReturnValue = IERC1155Receiver(to).onERC1155BatchReceived(
|
||||||
msg.sender,
|
msg.sender,
|
||||||
from,
|
from,
|
||||||
|
@ -128,7 +128,7 @@ contract ERC1155Mintable is
|
|||||||
);
|
);
|
||||||
|
|
||||||
// if `to` is a contract then trigger its callback
|
// if `to` is a contract then trigger its callback
|
||||||
if (dst._isContract()) {
|
if (dst.isContract()) {
|
||||||
bytes4 callbackReturnValue = IERC1155Receiver(dst).onERC1155Received(
|
bytes4 callbackReturnValue = IERC1155Receiver(dst).onERC1155Received(
|
||||||
msg.sender,
|
msg.sender,
|
||||||
msg.sender,
|
msg.sender,
|
||||||
@ -177,7 +177,7 @@ contract ERC1155Mintable is
|
|||||||
emit TransferSingle(msg.sender, address(0x0), dst, id, 1);
|
emit TransferSingle(msg.sender, address(0x0), dst, id, 1);
|
||||||
|
|
||||||
// if `to` is a contract then trigger its callback
|
// if `to` is a contract then trigger its callback
|
||||||
if (dst._isContract()) {
|
if (dst.isContract()) {
|
||||||
bytes4 callbackReturnValue = IERC1155Receiver(dst).onERC1155Received(
|
bytes4 callbackReturnValue = IERC1155Receiver(dst).onERC1155Received(
|
||||||
msg.sender,
|
msg.sender,
|
||||||
msg.sender,
|
msg.sender,
|
||||||
|
@ -98,7 +98,7 @@ contract AssetProxyOwner is
|
|||||||
{
|
{
|
||||||
Transaction storage txn = transactions[transactionId];
|
Transaction storage txn = transactions[transactionId];
|
||||||
txn.executed = true;
|
txn.executed = true;
|
||||||
if (_external_call(txn.destination, txn.value, txn.data.length, txn.data)) {
|
if (_externalCall(txn.destination, txn.value, txn.data.length, txn.data)) {
|
||||||
emit Execution(transactionId);
|
emit Execution(transactionId);
|
||||||
} else {
|
} else {
|
||||||
emit ExecutionFailure(transactionId);
|
emit ExecutionFailure(transactionId);
|
||||||
|
@ -231,7 +231,7 @@ contract MultiSigWallet {
|
|||||||
if (isConfirmed(transactionId)) {
|
if (isConfirmed(transactionId)) {
|
||||||
Transaction storage txn = transactions[transactionId];
|
Transaction storage txn = transactions[transactionId];
|
||||||
txn.executed = true;
|
txn.executed = true;
|
||||||
if (_external_call(txn.destination, txn.value, txn.data.length, txn.data))
|
if (_externalCall(txn.destination, txn.value, txn.data.length, txn.data))
|
||||||
Execution(transactionId);
|
Execution(transactionId);
|
||||||
else {
|
else {
|
||||||
ExecutionFailure(transactionId);
|
ExecutionFailure(transactionId);
|
||||||
@ -242,7 +242,7 @@ contract MultiSigWallet {
|
|||||||
|
|
||||||
// call has been separated into its own function in order to take advantage
|
// call has been separated into its own function in order to take advantage
|
||||||
// of the Solidity's code generator to produce a loop that copies tx.data into memory.
|
// of the Solidity's code generator to produce a loop that copies tx.data into memory.
|
||||||
function _external_call(address destination, uint value, uint dataLength, bytes data) internal returns (bool) {
|
function _externalCall(address destination, uint value, uint dataLength, bytes data) internal returns (bool) {
|
||||||
bool result;
|
bool result;
|
||||||
assembly {
|
assembly {
|
||||||
let x := mload(0x40) // "Allocate" memory for output (0x40 is where "free memory" pointer is stored by convention)
|
let x := mload(0x40) // "Allocate" memory for output (0x40 is where "free memory" pointer is stored by convention)
|
||||||
|
@ -109,7 +109,7 @@ contract MultiSigWalletWithTimeLock is
|
|||||||
{
|
{
|
||||||
Transaction storage txn = transactions[transactionId];
|
Transaction storage txn = transactions[transactionId];
|
||||||
txn.executed = true;
|
txn.executed = true;
|
||||||
if (_external_call(txn.destination, txn.value, txn.data.length, txn.data)) {
|
if (_externalCall(txn.destination, txn.value, txn.data.length, txn.data)) {
|
||||||
emit Execution(transactionId);
|
emit Execution(transactionId);
|
||||||
} else {
|
} else {
|
||||||
emit ExecutionFailure(transactionId);
|
emit ExecutionFailure(transactionId);
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contracts": [
|
"contracts": [
|
||||||
"src/Address.sol",
|
"src/LibAddress.sol",
|
||||||
"src/LibBytes.sol",
|
"src/LibBytes.sol",
|
||||||
"src/LibEIP712.sol",
|
"src/LibEIP712.sol",
|
||||||
"src/Ownable.sol",
|
"src/Ownable.sol",
|
||||||
|
@ -22,7 +22,7 @@ pragma solidity ^0.5.5;
|
|||||||
/**
|
/**
|
||||||
* Utility library of inline functions on addresses
|
* Utility library of inline functions on addresses
|
||||||
*/
|
*/
|
||||||
library Address {
|
library LibAddress {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether the target address is a contract
|
* Returns whether the target address is a contract
|
||||||
@ -31,7 +31,7 @@ library Address {
|
|||||||
* @param account address of the account to check
|
* @param account address of the account to check
|
||||||
* @return whether the target address is a contract
|
* @return whether the target address is a contract
|
||||||
*/
|
*/
|
||||||
function _isContract(address account) internal view returns (bool) {
|
function isContract(address account) internal view returns (bool) {
|
||||||
uint256 size;
|
uint256 size;
|
||||||
// XXX Currently there is no better way to check if there is a contract in an address
|
// XXX Currently there is no better way to check if there is a contract in an address
|
||||||
// than to check the size of the code at that address.
|
// than to check the size of the code at that address.
|
@ -34,7 +34,7 @@
|
|||||||
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
|
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"abis": "./generated-artifacts/@(Address|IOwnable|LibBytes|LibEIP712|Ownable|ReentrancyGuard|RichErrors|SafeMath|TestConstants|TestLibAddressArray|TestLibBytes).json",
|
"abis": "./generated-artifacts/@(LibAddress|IOwnable|LibBytes|LibEIP712|Ownable|ReentrancyGuard|RichErrors|SafeMath|TestConstants|TestLibAddressArray|TestLibBytes).json",
|
||||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
import { ContractArtifact } from 'ethereum-types';
|
import { ContractArtifact } from 'ethereum-types';
|
||||||
|
|
||||||
import * as Address from '../generated-artifacts/Address.json';
|
import * as LibAddress from '../generated-artifacts/LibAddress.json';
|
||||||
import * as IOwnable from '../generated-artifacts/IOwnable.json';
|
import * as IOwnable from '../generated-artifacts/IOwnable.json';
|
||||||
import * as LibBytes from '../generated-artifacts/LibBytes.json';
|
import * as LibBytes from '../generated-artifacts/LibBytes.json';
|
||||||
import * as LibEIP712 from '../generated-artifacts/LibEIP712.json';
|
import * as LibEIP712 from '../generated-artifacts/LibEIP712.json';
|
||||||
@ -17,7 +17,7 @@ import * as TestConstants from '../generated-artifacts/TestConstants.json';
|
|||||||
import * as TestLibAddressArray from '../generated-artifacts/TestLibAddressArray.json';
|
import * as TestLibAddressArray from '../generated-artifacts/TestLibAddressArray.json';
|
||||||
import * as TestLibBytes from '../generated-artifacts/TestLibBytes.json';
|
import * as TestLibBytes from '../generated-artifacts/TestLibBytes.json';
|
||||||
export const artifacts = {
|
export const artifacts = {
|
||||||
Address: Address as ContractArtifact,
|
LibAddress: LibAddress as ContractArtifact,
|
||||||
LibBytes: LibBytes as ContractArtifact,
|
LibBytes: LibBytes as ContractArtifact,
|
||||||
Ownable: Ownable as ContractArtifact,
|
Ownable: Ownable as ContractArtifact,
|
||||||
ReentrancyGuard: ReentrancyGuard as ContractArtifact,
|
ReentrancyGuard: ReentrancyGuard as ContractArtifact,
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
|
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
|
||||||
* -----------------------------------------------------------------------------
|
* -----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
export * from '../generated-wrappers/address';
|
export * from '../generated-wrappers/lib_address';
|
||||||
export * from '../generated-wrappers/i_ownable';
|
export * from '../generated-wrappers/i_ownable';
|
||||||
export * from '../generated-wrappers/lib_bytes';
|
export * from '../generated-wrappers/lib_bytes';
|
||||||
export * from '../generated-wrappers/lib_e_i_p712';
|
export * from '../generated-wrappers/lib_e_i_p712';
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
|
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
|
||||||
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
|
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
|
||||||
"files": [
|
"files": [
|
||||||
"generated-artifacts/Address.json",
|
"generated-artifacts/LibAddress.json",
|
||||||
"generated-artifacts/IOwnable.json",
|
"generated-artifacts/IOwnable.json",
|
||||||
"generated-artifacts/LibBytes.json",
|
"generated-artifacts/LibBytes.json",
|
||||||
"generated-artifacts/LibEIP712.json",
|
"generated-artifacts/LibEIP712.json",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user