This repository has been archived by the owner on Jun 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 74
Update tokens, prepare blockchain integration #1081
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
759dd6d
to
7eaa84d
Compare
115719a
to
7109f31
Compare
2c948a0
to
e63813a
Compare
unnawut
reviewed
Jul 11, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1st batch at ~46/66 files
unnawut
reviewed
Jul 11, 2019
apps/admin_api/test/admin_api/v1/controllers/token_controller_test.exs
Outdated
Show resolved
Hide resolved
unnawut
reviewed
Jul 11, 2019
T-Dnzt
suggested changes
Jul 12, 2019
end | ||
|
||
def run(writer, _args) do | ||
{:ok, {address, public_key}} = Wallet.generate() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will create a new Keychain wallet everytime we run the seeds :)
unnawut
approved these changes
Jul 22, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎖🥇🍾🌟❤️
T-Dnzt
approved these changes
Jul 24, 2019
@@ -107,8 +109,10 @@ defmodule AdminAPI.V1.BlockchainWalletController do | |||
defp paginated_tokens(attrs), do: paginated_blockchain_tokens(Token, attrs) | |||
|
|||
defp paginated_blockchain_tokens(query, attrs) do | |||
query | |||
|> Token.query_all_blockchain() | |||
identifier = BlockchainHelper.identifier() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could just put it directly in line 114? Since identifier
isn't used anywhere else in this function.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue/Task Number: 695
Closes #695, #1061, #701, #704
Overview
This PR adds the logic to create/update blockchain tokens.
It also adds a new command to the seeds in order to seed the primary hot wallet and the default token for current the blockchain (Eth for now).
Changes
token.get_erc20_capabilities
to retrieve attributes of a given ERC20 tokentoken.set_blockchain_address
to set the blockchain address of a token.token.create
to allow ablockchain_address
.mix seed --blockchain
to generate the default blockchain token and the primary hot wallet.Implementation Details
Usage
The easiest is to try the new endpoints in swagger.
For the seeds:
First run the normal seeds:
mix seed
, then runmix seed --blockchain
.