diff --git a/README.md b/README.md index 0fcc869..048e412 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,23 @@ Let's all post our meta transaction formats here in a digestible format. The TL;DR here is to communicate how someone else could execute your meta transaction for you. -### Format +## Implementations + +[uport](https://github.com/austintgriffith/meta-transaction-format-share/blob/master/uport.org.md) + +[tenzorum](https://github.com/austintgriffith/meta-transaction-format-share/blob/master/tenzorum.org.md) + +[tokenubscription](https://github.com/austintgriffith/meta-transaction-format-share/blob/master/tokensubscription.com.md) + + +## Important problems to solve + +[relay collisions](https://github.com/austintgriffith/meta-transaction-format-share/issues/3) + +[dynamic gas rewards](https://github.com/austintgriffith/meta-transaction-format-share/issues/4) + + +## Format ``` { This is the format of my meta transaction @@ -21,10 +37,8 @@ Let's all post our meta transaction formats here in a digestible format. The TL; ### Tx ``` { - Here is my (pseudo?)code for getting transactions on chain + Here is my (pseudo?)code for putting transactions on chain } ``` -### Example Implementation Links -[TokenSubscription](https://github.com/austintgriffith/meta-transaction-format-share/blob/master/tokensubscription.com) diff --git a/tenzorum.org.md b/tenzorum.org.md new file mode 100644 index 0000000..8addf06 --- /dev/null +++ b/tenzorum.org.md @@ -0,0 +1,48 @@ +# Tenzorum Gasless TXs + +### Format + +``` +{ + uint8 _v, bytes32 _r, bytes32 _s, + address _from, //the subscriber + address _to, //the publisher + uint _value, //wei value of transfer + bytes _data, //data input + address _rewardType, //reward relayers in tokens or ETH + uint _rewardAmount //amount to reward +} +``` + +### Rx +``` + ##Client SDK + + HTTP POST https://login.tenzorum.app/execute + {payload} + GRAPHQL endpoint mutation ExecuteGaslessTx($from: $WalletAddress!, $to: $WalletAddress!, $amount: Int!) { + executeTransaction(from: $from, to: $to) { + amount + } + } + + ##Relay RPG + - Coming +``` + +### Tx +``` +{ + function execute( + uint8 _v, bytes32 _r, bytes32 _s, + address _from, + address _to, + uint _value, + bytes _data, + address _rewardType, uint _rewardAmount) public +} +``` + +### Example Implementation Links +- Coming + +[Tenzorum](https://github.com/austintgriffith/meta-transaction-format-share/blob/master/tenzorum.org.md) diff --git a/tokensubscription.com b/tokensubscription.com.md similarity index 100% rename from tokensubscription.com rename to tokensubscription.com.md diff --git a/uport.org.md b/uport.org.md new file mode 100644 index 0000000..66808dd --- /dev/null +++ b/uport.org.md @@ -0,0 +1,39 @@ +### Format +``` +{ + uint8 sigV, + bytes32 sigR, + bytes32 sigS, + address destination, + bytes data, + address listOwner +} +``` + +### Rx +``` +{ + Coming Soon +} +``` + +### Tx +``` +{ + // only allow senders from the whitelist specified by the user, + // 0x0 means no whitelist. + require(listOwner == 0x0 || whitelist[listOwner][msg.sender]); + + address claimedSender = getAddress(data); + // use EIP 191 + // 0x19 :: version :: relay :: whitelistOwner :: nonce :: destination :: data + bytes32 h = keccak256(byte(0x19), byte(0), this, listOwner, nonce[claimedSender], destination, data); + address addressFromSig = ecrecover(h, sigV, sigR, sigS); + + require(claimedSender == addressFromSig); + + nonce[claimedSender]++; //if we are going to do tx, update nonce + + require(destination.call(data)); +} +```