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

[r2r] gui-auth & enable_v2 rpc implementation #1335

Merged
merged 71 commits into from
Aug 5, 2022
Merged

Conversation

onur-ozkan
Copy link
Member

@onur-ozkan onur-ozkan commented Jul 8, 2022

  • gui-auth implementation
  • enable_eth_with_tokens and enable_erc20 rpc implementations

example: enable_eth_with_tokens payload:

curl -v --url "http://127.0.0.1:7783" -s --data '{
	"userpass": "'$userpass'",
	"mmrpc": "2.0",
	"method": "enable_eth_with_tokens",
	"params": {
		"ticker": "ETH",
		"nodes": [
			{"url": "https://auth.defimania.live/ethereum", "gui_auth": true }
		],
		"swap_contract_address": "0x24ABE4c71FC658C91313b6552cd40cD808b3Ea80",
		"erc20_tokens_requests": [
			{
				"ticker": "USDC-ERC20"
			},
			{
				"ticker": "SHIB-ERC20"
			}
		]
	},
	"id": 0
}'

example: enable_erc20 payload:

curl -v --url "http://127.0.0.1:7783" -s --data '{
	"userpass": "'$userpass'",
	"mmrpc": "2.0",
	"method": "enable_erc20",
	"params": {
		"ticker": "USDT-ERC20",
		"activation_params": {}
	},
	"id": 0
}'

future tasks:

  • writing tests for enable_eth_with_tokens and enable_erc20

onur-ozkan and others added 26 commits July 5, 2022 19:36
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
…i-auth-implementation

Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
…pping

Signed-off-by: Onur Özkan <work@onurozkan.dev>
…Impl`

Signed-off-by: ozkanonur <work@onurozkan.dev>
@onur-ozkan onur-ozkan changed the title [wip] gui-auth & enable_v2 rpc implementation [r2r] gui-auth & enable_v2 rpc implementation Jul 30, 2022
artemii235
artemii235 previously approved these changes Aug 2, 2022
Copy link
Member

@artemii235 artemii235 left a comment

Choose a reason for hiding this comment

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

🔥

@artemii235
Copy link
Member

@sergeyboyko0791 @shamardy Please take a look too 🙂

Copy link

@sergeyboyko0791 sergeyboyko0791 left a comment

Choose a reason for hiding this comment

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

Great enhancement!
First review iteration.

mm2src/coins/eth.rs Outdated Show resolved Hide resolved
mm2src/coins/eth.rs Outdated Show resolved Hide resolved
mm2src/coins/eth.rs Outdated Show resolved Hide resolved
mm2src/coins/eth.rs Outdated Show resolved Hide resolved
mm2src/coins/eth.rs Outdated Show resolved Hide resolved
mm2src/coins/eth/eth_tests.rs Outdated Show resolved Hide resolved
mm2src/coins/eth/web3_transport.rs Outdated Show resolved Hide resolved
mm2src/coins/eth/web3_transport.rs Outdated Show resolved Hide resolved
Signed-off-by: ozkanonur <work@onurozkan.dev>
Copy link
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

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

Great Work! Only 2 comments :)

mm2src/coins_activation/src/eth_with_token_activation.rs Outdated Show resolved Hide resolved
mm2src/coins/eth/web3_transport.rs Outdated Show resolved Hide resolved
mm2src/coins/eth/web3_transport.rs Outdated Show resolved Hide resolved
Copy link

@sergeyboyko0791 sergeyboyko0791 left a comment

Choose a reason for hiding this comment

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

Finished the previous review iteration

mm2src/coins/eth/v2_activation.rs Outdated Show resolved Hide resolved
mm2src/coins/eth/v2_activation.rs Outdated Show resolved Hide resolved
mm2src/coins/eth/web3_transport.rs Outdated Show resolved Hide resolved
mm2src/coins/eth/web3_transport.rs Outdated Show resolved Hide resolved
mm2src/coins/lp_coins.rs Show resolved Hide resolved
mm2src/coins_activation/src/eth_with_token_activation.rs Outdated Show resolved Hide resolved
mm2src/common/common.rs Show resolved Hide resolved
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
Copy link
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

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

Thanks for the fixes! Only one more comment :)

mm2src/coins_activation/src/eth_with_token_activation.rs Outdated Show resolved Hide resolved
Signed-off-by: ozkanonur <work@onurozkan.dev>
Signed-off-by: ozkanonur <work@onurozkan.dev>
sergeyboyko0791
sergeyboyko0791 previously approved these changes Aug 4, 2022
Copy link

@sergeyboyko0791 sergeyboyko0791 left a comment

Choose a reason for hiding this comment

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

Thank you for the fixes!
LGTM

Signed-off-by: Onur Özkan <work@onurozkan.dev>
@@ -29,7 +29,6 @@ pub struct EthActivationV2Request {
pub gas_station_policy: GasStationPricePolicy,
pub mm2: Option<u8>,
#[serde(default)]
Copy link
Collaborator

@shamardy shamardy Aug 4, 2022

Choose a reason for hiding this comment

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

I guess this #[serde(default)] is not needed anymore.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I missed it, thanks!

Signed-off-by: Onur Özkan <work@onurozkan.dev>
Copy link
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

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

LGTM!

@artemii235 artemii235 merged commit 6631a20 into dev Aug 5, 2022
@artemii235 artemii235 deleted the gui-auth-implementation branch August 5, 2022 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants