Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Akash leverj pyexchange changes20191206 #104

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mitakash
Copy link
Contributor

@mitakash mitakash commented Dec 6, 2019

No description provided.

@EdNoepel
Copy link
Contributor

EdNoepel commented Dec 6, 2019

pyexchange has some serious unit test deficiencies. I assume the cost of implementing tests (which properly recreate relevant exchange contracts and sidechain) outweighs the benefits of improving code coverage.

Transact(self, self.web3, self.abi, self.address, self._contract, "depositEther",[app_id], {'value': int(amount.value)}).transact()
return gluon_block_number
gluon_block_number = leverjobj._http_authenticated("GET", "/api/v1", f"/plasma/{app_id}", None)['number'] + 2
receipt = Transact(self, self.web3, self.abi, self.address, self._contract, "depositEther",[app_id], {'value': int(amount.value)}).transact()
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 want just to return receipt or to check here if transaction completed ok / other details?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we need to return receipt in it's full form to be checked by inventory service with gluon block to know where we are in the processing

Transact(self, self.web3, self.abi, self.address, self._contract, "depositToken",[app_id, token_address, amount], {}).transact()
return gluon_block_number
gluon_block_number = leverjobj._http_authenticated("GET", "/api/v1", f"/plasma/{app_id}", None)['number'] + 2
receipt = Transact(self, self.web3, self.abi, self.address, self._contract, "depositToken",[app_id, token_address, amount], {}).transact()
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above, should we just return receipt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need to return both, gluon_block_number tells us where we are in the process, the hash in the receipt is eventually sent back into post_pending_tx_hash to let let leverj know we just sent something and to look for that transaction hash in pending transactions on ethereum block chain.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants