Skip to content

Commit

Permalink
Add v2 flattened
Browse files Browse the repository at this point in the history
  • Loading branch information
pooleja committed Dec 9, 2020
1 parent 43e292a commit d03995c
Show file tree
Hide file tree
Showing 23 changed files with 1,722 additions and 21 deletions.
2 changes: 1 addition & 1 deletion build/contracts/Blacklistable.json
Original file line number Diff line number Diff line change
Expand Up @@ -5084,7 +5084,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.184Z",
"updatedAt": "2020-12-09T02:03:40.419Z",
"devdoc": {
"kind": "dev",
"methods": {},
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/BlacklisterRole.json
Original file line number Diff line number Diff line change
Expand Up @@ -2798,7 +2798,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.199Z",
"updatedAt": "2020-12-09T02:03:40.434Z",
"devdoc": {
"kind": "dev",
"methods": {},
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/Burnable.json
Original file line number Diff line number Diff line change
Expand Up @@ -2112,7 +2112,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.185Z",
"updatedAt": "2020-12-09T02:03:40.421Z",
"devdoc": {
"kind": "dev",
"methods": {
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/BurnerRole.json
Original file line number Diff line number Diff line change
Expand Up @@ -2798,7 +2798,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.201Z",
"updatedAt": "2020-12-09T02:03:40.435Z",
"devdoc": {
"kind": "dev",
"methods": {},
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/Escrowable.json
Original file line number Diff line number Diff line change
Expand Up @@ -10925,7 +10925,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.215Z",
"updatedAt": "2020-12-09T02:03:40.447Z",
"devdoc": {
"kind": "dev",
"methods": {
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/EscrowerRole.json
Original file line number Diff line number Diff line change
Expand Up @@ -3054,7 +3054,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.219Z",
"updatedAt": "2020-12-09T02:03:40.454Z",
"devdoc": {
"kind": "dev",
"methods": {},
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/Mintable.json
Original file line number Diff line number Diff line change
Expand Up @@ -2138,7 +2138,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.187Z",
"updatedAt": "2020-12-09T02:03:40.423Z",
"devdoc": {
"kind": "dev",
"methods": {
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/MinterRole.json
Original file line number Diff line number Diff line change
Expand Up @@ -2798,7 +2798,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.206Z",
"updatedAt": "2020-12-09T02:03:40.437Z",
"devdoc": {
"kind": "dev",
"methods": {},
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/OwnerRole.json
Original file line number Diff line number Diff line change
Expand Up @@ -2729,7 +2729,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.207Z",
"updatedAt": "2020-12-09T02:03:40.438Z",
"devdoc": {
"kind": "dev",
"methods": {},
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/Pausable.json
Original file line number Diff line number Diff line change
Expand Up @@ -2483,7 +2483,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.188Z",
"updatedAt": "2020-12-09T02:03:40.424Z",
"devdoc": {
"details": "Contract module which allows children to implement an emergency stop mechanism that can be triggered by an authorized account. This module is used through inheritance. It will make available the modifiers `whenNotPaused` and `whenPaused`, which can be applied to the functions of your contract. Note that they will not be pausable by simply including this module, only once the modifiers are put in place.",
"events": {
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/PauserRole.json
Original file line number Diff line number Diff line change
Expand Up @@ -2798,7 +2798,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.209Z",
"updatedAt": "2020-12-09T02:03:40.440Z",
"devdoc": {
"kind": "dev",
"methods": {},
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/Revocable.json
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.192Z",
"updatedAt": "2020-12-09T02:03:40.426Z",
"devdoc": {
"kind": "dev",
"methods": {
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/RevocableToAddress.json
Original file line number Diff line number Diff line change
Expand Up @@ -2303,7 +2303,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.194Z",
"updatedAt": "2020-12-09T02:03:40.427Z",
"devdoc": {
"kind": "dev",
"methods": {
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/RevokerRole.json
Original file line number Diff line number Diff line change
Expand Up @@ -2798,7 +2798,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.210Z",
"updatedAt": "2020-12-09T02:03:40.442Z",
"devdoc": {
"kind": "dev",
"methods": {},
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/Roles.json
Original file line number Diff line number Diff line change
Expand Up @@ -2605,7 +2605,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.154Z",
"updatedAt": "2020-12-09T02:03:40.405Z",
"devdoc": {
"details": "Library for managing addresses assigned to a Role.",
"kind": "dev",
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/TokenSoftToken.json
Original file line number Diff line number Diff line change
Expand Up @@ -8247,7 +8247,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.177Z",
"updatedAt": "2020-12-09T02:03:40.409Z",
"devdoc": {
"kind": "dev",
"methods": {
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/TokenSoftTokenEscrow.json
Original file line number Diff line number Diff line change
Expand Up @@ -6354,7 +6354,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.222Z",
"updatedAt": "2020-12-09T02:03:40.457Z",
"devdoc": {
"kind": "dev",
"methods": {
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/TokenSoftTokenEscrowNotProxiable.json
Original file line number Diff line number Diff line change
Expand Up @@ -5918,7 +5918,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.226Z",
"updatedAt": "2020-12-09T02:03:40.462Z",
"devdoc": {
"kind": "dev",
"methods": {
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/TokenSoftTokenV2.json
Original file line number Diff line number Diff line change
Expand Up @@ -5010,7 +5010,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.181Z",
"updatedAt": "2020-12-09T02:03:40.415Z",
"devdoc": {
"kind": "dev",
"methods": {
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/Whitelistable.json
Original file line number Diff line number Diff line change
Expand Up @@ -8547,7 +8547,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.196Z",
"updatedAt": "2020-12-09T02:03:40.430Z",
"devdoc": {
"kind": "dev",
"methods": {},
Expand Down
2 changes: 1 addition & 1 deletion build/contracts/WhitelisterRole.json
Original file line number Diff line number Diff line change
Expand Up @@ -2798,7 +2798,7 @@
},
"networks": {},
"schemaVersion": "3.3.1",
"updatedAt": "2020-12-07T21:35:30.212Z",
"updatedAt": "2020-12-09T02:03:40.443Z",
"devdoc": {
"kind": "dev",
"methods": {},
Expand Down
37 changes: 37 additions & 0 deletions flattened/v2.0/Proxy.v.2.0-flat.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

// File: contracts/Proxy.sol

pragma solidity 0.6.12;

contract Proxy {
// Code position in storage is keccak256("PROXIABLE") = "0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7"
uint256 constant PROXIABLE_MEM_SLOT = 0xc5f16f0fcc639fa48a6947836d9850f504798523bf8c9a3a87d5876cf622bcf7;
// constructor(bytes memory constructData, address contractLogic) public {
constructor(address contractLogic) public {
// Verify a valid address was passed in
require(contractLogic != address(0), "Contract Logic cannot be 0x0");

// save the code address
assembly { // solium-disable-line
sstore(PROXIABLE_MEM_SLOT, contractLogic)
}
}

fallback() external payable {
assembly { // solium-disable-line
let contractLogic := sload(PROXIABLE_MEM_SLOT)
let ptr := mload(0x40)
calldatacopy(ptr, 0x0, calldatasize())
let success := delegatecall(gas(), contractLogic, ptr, calldatasize(), 0, 0)
let retSz := returndatasize()
returndatacopy(ptr, 0, retSz)
switch success
case 0 {
revert(ptr, retSz)
}
default {
return(ptr, retSz)
}
}
}
}
Loading

0 comments on commit d03995c

Please sign in to comment.