Moved MixinAuthorizable to Authorizable and fixed imports
This commit is contained in:
@@ -24,11 +24,11 @@
|
||||
}
|
||||
},
|
||||
"contracts": [
|
||||
"src/Authorizable.sol",
|
||||
"src/LibAddress.sol",
|
||||
"src/LibBytes.sol",
|
||||
"src/LibEIP1271.sol",
|
||||
"src/LibEIP712.sol",
|
||||
"src/MixinAuthorizable.sol",
|
||||
"src/Ownable.sol",
|
||||
"src/ReentrancyGuard.sol",
|
||||
"src/SafeMath.sol",
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
|
||||
pragma solidity ^0.5.9;
|
||||
|
||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
||||
import "./Ownable.sol";
|
||||
import "./interfaces/IAuthorizable.sol";
|
||||
|
||||
|
||||
contract MixinAuthorizable is
|
||||
contract Authorizable is
|
||||
Ownable,
|
||||
IAuthorizable
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
|
||||
Copyright 2018 ZeroEx Intl.
|
||||
Copyright 2019 ZeroEx Intl.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
pragma solidity ^0.5.9;
|
||||
|
||||
import "@0x/contracts-utils/contracts/src/interfaces/IOwnable.sol";
|
||||
import "./IOwnable.sol";
|
||||
|
||||
|
||||
contract IAuthorizable is
|
||||
@@ -54,7 +54,7 @@ contract IAuthorizable is
|
||||
uint256 index
|
||||
)
|
||||
external;
|
||||
|
||||
|
||||
/// @dev Gets all authorized addresses.
|
||||
/// @return Array of authorized addresses.
|
||||
function getAuthorizedAddresses()
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
|
||||
},
|
||||
"config": {
|
||||
"abis": "./generated-artifacts/@(IOwnable|LibAddress|LibBytes|LibEIP1271|LibEIP712|MixinAuthorizable|Ownable|ReentrancyGuard|SafeMath|TestConstants|TestLibAddress|TestLibAddressArray|TestLibBytes|TestLibEIP712|TestLibRichErrors|TestOwnable|TestReentrancyGuard|TestSafeMath).json",
|
||||
"abis": "./generated-artifacts/@(Authorizable|IOwnable|LibAddress|LibBytes|LibEIP1271|LibEIP712|Ownable|ReentrancyGuard|SafeMath|TestConstants|TestLibAddress|TestLibAddressArray|TestLibBytes|TestLibEIP712|TestLibRichErrors|TestOwnable|TestReentrancyGuard|TestSafeMath).json",
|
||||
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||
},
|
||||
"repository": {
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
*/
|
||||
import { ContractArtifact } from 'ethereum-types';
|
||||
|
||||
import * as Authorizable from '../generated-artifacts/Authorizable.json';
|
||||
import * as IOwnable from '../generated-artifacts/IOwnable.json';
|
||||
import * as LibAddress from '../generated-artifacts/LibAddress.json';
|
||||
import * as LibBytes from '../generated-artifacts/LibBytes.json';
|
||||
import * as LibEIP1271 from '../generated-artifacts/LibEIP1271.json';
|
||||
import * as LibEIP712 from '../generated-artifacts/LibEIP712.json';
|
||||
import * as MixinAuthorizable from '../generated-artifacts/MixinAuthorizable.json';
|
||||
import * as Ownable from '../generated-artifacts/Ownable.json';
|
||||
import * as ReentrancyGuard from '../generated-artifacts/ReentrancyGuard.json';
|
||||
import * as SafeMath from '../generated-artifacts/SafeMath.json';
|
||||
@@ -24,11 +24,11 @@ import * as TestOwnable from '../generated-artifacts/TestOwnable.json';
|
||||
import * as TestReentrancyGuard from '../generated-artifacts/TestReentrancyGuard.json';
|
||||
import * as TestSafeMath from '../generated-artifacts/TestSafeMath.json';
|
||||
export const artifacts = {
|
||||
Authorizable: Authorizable as ContractArtifact,
|
||||
LibAddress: LibAddress as ContractArtifact,
|
||||
LibBytes: LibBytes as ContractArtifact,
|
||||
LibEIP1271: LibEIP1271 as ContractArtifact,
|
||||
LibEIP712: LibEIP712 as ContractArtifact,
|
||||
MixinAuthorizable: MixinAuthorizable as ContractArtifact,
|
||||
Ownable: Ownable as ContractArtifact,
|
||||
ReentrancyGuard: ReentrancyGuard as ContractArtifact,
|
||||
SafeMath: SafeMath as ContractArtifact,
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
|
||||
* -----------------------------------------------------------------------------
|
||||
*/
|
||||
export * from '../generated-wrappers/authorizable';
|
||||
export * from '../generated-wrappers/i_ownable';
|
||||
export * from '../generated-wrappers/lib_address';
|
||||
export * from '../generated-wrappers/lib_bytes';
|
||||
export * from '../generated-wrappers/lib_e_i_p1271';
|
||||
export * from '../generated-wrappers/lib_e_i_p712';
|
||||
export * from '../generated-wrappers/mixin_authorizable';
|
||||
export * from '../generated-wrappers/ownable';
|
||||
export * from '../generated-wrappers/reentrancy_guard';
|
||||
export * from '../generated-wrappers/safe_math';
|
||||
|
||||
@@ -12,7 +12,7 @@ import { BigNumber, OwnableRevertErrors } from '@0x/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts, MixinAuthorizableContract } from '../src';
|
||||
import { artifacts, AuthorizableContract } from '../src';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
@@ -22,7 +22,7 @@ describe('Authorizable', () => {
|
||||
let owner: string;
|
||||
let notOwner: string;
|
||||
let address: string;
|
||||
let authorizable: MixinAuthorizableContract;
|
||||
let authorizable: AuthorizableContract;
|
||||
|
||||
before(async () => {
|
||||
await blockchainLifecycle.startAsync();
|
||||
@@ -35,8 +35,8 @@ describe('Authorizable', () => {
|
||||
before(async () => {
|
||||
const accounts = await web3Wrapper.getAvailableAddressesAsync();
|
||||
[owner, address, notOwner] = _.slice(accounts, 0, 3);
|
||||
authorizable = await MixinAuthorizableContract.deployFrom0xArtifactAsync(
|
||||
artifacts.MixinAuthorizable,
|
||||
authorizable = await AuthorizableContract.deployFrom0xArtifactAsync(
|
||||
artifacts.Authorizable,
|
||||
provider,
|
||||
txDefaults,
|
||||
);
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
|
||||
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
|
||||
"files": [
|
||||
"generated-artifacts/Authorizable.json",
|
||||
"generated-artifacts/IOwnable.json",
|
||||
"generated-artifacts/LibAddress.json",
|
||||
"generated-artifacts/LibBytes.json",
|
||||
"generated-artifacts/LibEIP1271.json",
|
||||
"generated-artifacts/LibEIP712.json",
|
||||
"generated-artifacts/MixinAuthorizable.json",
|
||||
"generated-artifacts/Ownable.json",
|
||||
"generated-artifacts/ReentrancyGuard.json",
|
||||
"generated-artifacts/SafeMath.json",
|
||||
|
||||
Reference in New Issue
Block a user