Skip to content

Commit

Permalink
better gas handling
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed Apr 30, 2020
1 parent 5bba4d2 commit 5b5585b
Show file tree
Hide file tree
Showing 44 changed files with 47,475 additions and 35,839 deletions.
22,645 changes: 15,032 additions & 7,613 deletions build/contracts/BytesToTypes.json

Large diffs are not rendered by default.

300 changes: 153 additions & 147 deletions build/contracts/DummyContract.json

Large diffs are not rendered by default.

2,546 changes: 953 additions & 1,593 deletions build/contracts/DummyToken.json

Large diffs are not rendered by default.

1,068 changes: 297 additions & 771 deletions build/contracts/Migrations.json

Large diffs are not rendered by default.

12,892 changes: 3,046 additions & 9,846 deletions build/contracts/NFTBalances.json

Large diffs are not rendered by default.

5,739 changes: 3,090 additions & 2,649 deletions build/contracts/PublicTokens.json

Large diffs are not rendered by default.

263 changes: 131 additions & 132 deletions build/contracts/Seriality.json

Large diffs are not rendered by default.

4,071 changes: 3,164 additions & 907 deletions build/contracts/SizeOf.json

Large diffs are not rendered by default.

14,856 changes: 6,869 additions & 7,987 deletions build/contracts/TokenBalances.json

Large diffs are not rendered by default.

3,696 changes: 2,086 additions & 1,610 deletions build/contracts/TypesToBytes.json

Large diffs are not rendered by default.

8,546 changes: 8,546 additions & 0 deletions build/contracts/Utils.json

Large diffs are not rendered by default.

18 changes: 7 additions & 11 deletions contracts/Migrations.sol
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
pragma solidity ^0.4.17;
pragma solidity >=0.4.21 <0.7.0;


contract Migrations {
address public owner;
uint public last_completed_migration;

modifier restricted() {
if (msg.sender == owner) _;
}
uint256 public last_completed_migration;

constructor() public {
owner = msg.sender;
}

function setCompleted(uint completed) public restricted {
last_completed_migration = completed;
modifier restricted() {
if (msg.sender == owner) _;
}

function upgrade(address new_address) public restricted {
Migrations upgraded = Migrations(new_address);
upgraded.setCompleted(last_completed_migration);
function setCompleted(uint256 completed) public restricted {
last_completed_migration = completed;
}
}
Loading

0 comments on commit 5b5585b

Please sign in to comment.