Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ownership transaction predicate #290

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
293975c
Change style to conform to solhint
karlfloersch May 25, 2019
0e9c0d7
Test Deposit.deposit
karlfloersch May 25, 2019
16c09e4
Make small edits to the contracts
karlfloersch May 25, 2019
6ad8b2e
Add ownership predicate skeleton
karlfloersch May 29, 2019
7104567
Add temp encoding tests
karlfloersch Jun 1, 2019
bfb97b3
Add & test startExit logic
karlfloersch Jun 2, 2019
64cc3e9
Add AbiRange type
karlfloersch Jun 2, 2019
33ed853
Change variable name
karlfloersch Jun 2, 2019
ecb2edf
Fix test & stub deposit functions
karlfloersch Jun 3, 2019
4ca22d6
Change plasmaContract -> depositAddress
karlfloersch Jun 3, 2019
c00d377
Add and test finalizeExit
karlfloersch Jun 9, 2019
9aa5f43
Add startCheckpoint
karlfloersch Jun 9, 2019
69255fe
Add deleteOutdatedExit()
karlfloersch Jun 9, 2019
cc0c03c
Add challenge logic & basic test
karlfloersch Jun 9, 2019
a16354e
Merge branch 'master' into feat/contracts/ownership_predicate
karlfloersch Jun 11, 2019
235de63
Fix broken import in utils
karlfloersch Jun 11, 2019
e529014
rename commitmentchain
ben-chain Jun 11, 2019
29713f9
rename dt->types
ben-chain Jun 11, 2019
4a453ae
make deposits finalized checkpoints
ben-chain Jun 11, 2019
2fc0f12
small depositedRange logic improvements
ben-chain Jun 11, 2019
d12a19a
simplify ==true assertions
ben-chain Jun 11, 2019
57354bd
add checkpointFinalized helper
ben-chain Jun 11, 2019
59067c6
Merge pull request #1 from ben-chain/master
karlfloersch Jun 11, 2019
b50d973
rename solidity to match contract
ben-chain Jun 11, 2019
8da7a46
fix rename path
ben-chain Jun 11, 2019
dfb25ff
Merge pull request #2 from ben-chain/master
karlfloersch Jun 11, 2019
3283ece
Fix broken import
karlfloersch Jun 11, 2019
8c07093
rename dt -> types
ben-chain Jun 12, 2019
532ad93
remove unnecessary constructor
ben-chain Jun 12, 2019
113cb44
add transaction to types
ben-chain Jun 12, 2019
7738efe
first pass generic Transaction predicate
ben-chain Jun 12, 2019
0df1ee8
basic ownership inheritance from txpredicate
ben-chain Jun 13, 2019
ad60178
merge master
ben-chain Jun 15, 2019
d994709
fix merge
ben-chain Jun 15, 2019
ebe05a1
fix state interface naming
ben-chain Jun 18, 2019
bd65b29
first pass ownership transaction encoding
ben-chain Jun 19, 2019
2f34dca
fix SU naming, add .jsonify
ben-chain Jun 19, 2019
3fa77c7
deposit ct tests with inherited own predicate
ben-chain Jun 19, 2019
3a8b472
first pass working ownership predicate
ben-chain Jun 20, 2019
a55b606
update state types
ben-chain Jun 20, 2019
dfae29b
Merge branch 'master' into feat/ownership-transaction-predicate
ben-chain Jun 20, 2019
062f238
remove outdated transaction type
ben-chain Jun 21, 2019
935d199
remove outdated references
ben-chain Jun 21, 2019
f63c04c
remove more refs
ben-chain Jun 21, 2019
3dc4442
remove more refs
ben-chain Jun 21, 2019
f778b7c
remove .only
ben-chain Jun 21, 2019
c45053f
fix linting
ben-chain Jun 21, 2019
9ccddf9
fix broken abiStateUpdate encoding
ben-chain Jun 21, 2019
43608be
fix linting
ben-chain Jun 21, 2019
0f0bb61
Merge remote-tracking branch 'upstream/master' into feat/ownership-tr…
ben-chain Jun 21, 2019
0817582
fix outdated typechecking
ben-chain Jun 21, 2019
c9b97cc
Merge branch 'feat/ownership-transaction-predicate' of github.com:ben…
ben-chain Jun 21, 2019
debbccc
uncomment accidental lines
ben-chain Jun 21, 2019
4c487d3
add extra error checking
ben-chain Jun 21, 2019
876654d
fix commented line
ben-chain Jun 21, 2019
c4d61b4
fix comment naming
ben-chain Jun 21, 2019
d6607c1
fix wallet test timeout
ben-chain Jun 21, 2019
04a571d
small lint fixes
ben-chain Jun 21, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/contracts/.solhint.json
@@ -0,0 +1,3 @@
{
"extends": "solhint:default"
}
6 changes: 3 additions & 3 deletions packages/contracts/contracts/BasicTokenMock.sol
Expand Up @@ -5,7 +5,7 @@ import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";

// Example class - a mock class using delivering from ERC20
contract BasicTokenMock is ERC20 {
constructor(address initialAccount, uint256 initialBalance) public {
super._mint(initialAccount, initialBalance);
}
constructor(address initialAccount, uint256 initialBalance) public {
super._mint(initialAccount, initialBalance);
}
}
22 changes: 0 additions & 22 deletions packages/contracts/contracts/Commitment.sol

This file was deleted.

12 changes: 12 additions & 0 deletions packages/contracts/contracts/CommitmentChain.sol
@@ -0,0 +1,12 @@
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;

/* Internal Imports */
import {DataTypes as dt} from "./DataTypes.sol";

contract CommitmentChain {
function verifyInclusion(dt.StateUpdate memory _stateUpdate, bytes memory _inclusionProof) public returns (bool) {
// Always return true for now until we can verify inclusion proofs.
return true;
}
}
39 changes: 39 additions & 0 deletions packages/contracts/contracts/DataTypes.sol
@@ -0,0 +1,39 @@
pragma solidity ^0.5.0;
pragma experimental ABIEncoderV2;

/**
* @title DataTypes
* @notice TODO
*/
contract DataTypes {

/*** Structs ***/
struct Range {
uint256 start;
uint256 end;
}

struct StateObject {
address predicateAddress;
bytes data;
}

struct StateUpdate {
StateObject stateObject;
Range range;
uint256 plasmaBlockNumber;
address depositAddress;
}

struct Checkpoint {
StateUpdate stateUpdate;
Range subrange;
}

struct Transaction {
address depositAddress;
bytes32 methodId;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we remove methodId?

bytes parameters;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another name for this could be body -- eg. transaction.body

That said parameters is fine as well, just slightly confuses my intuitions if we were to add transaction.parameters.methodId vs transaction.body.methodId ... Not a big deal either way though.

Range range;
}
}