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

[MEX-410] position creator general information #1224

Merged

Conversation

claudiulataretu
Copy link
Collaborator

Reasoning

  • integrate position creator smart contract

Proposed Changes

  • added new module for position creator smart contract
  • added transaction generators for position creator endpoints
  • added unit tests for transaction generators

How to test

query CreatePositionSingleToken {
	createPositionSingleToken(
		pairAddress: <pair_address>,
		payment: {
			tokenID: <token_id>,
			nonce: 0,
			amount: <amount>
		},
		tolerance: 0.1
	) {
		receiver
		data
	}
}

query CreateFarmPositionSingleToken {
	createFarmPositionSingleToken(
		farmAddress: <farm_address>,
		payments: [{
			tokenID: <token_id>,
			nonce: 0,
			amount: <amount>
		}],
		tolerance: 0.01
	) {
		receiver
		data
	}
}

query CreateDualFarmPositionSingleToken {
	createDualFarmPositionSingleToken(
		dualFarmAddress: <staking_proxy_address>,
		payments: [{
			tokenID: <token_id>,
			nonce: 0,
			amount: <amount>
		}],
		tolerance: 0.01
	) {
		receiver
		data
	}
}

query CreateStakingPositionSingleToken {
	createStakingPositionSingleToken(
		stakingAddress: <staking_address>,
		payments: [{
			tokenID: <token_id>,
			nonce: 0,
			amount: <amount>
		}],
		tolerance: 0.01
	) {
		receiver
		data
	}
}

query CreateFarmPositionDualTokens {
	createFarmPositionDualTokens(
		farmAddress: <farm_address>,
		tolerance: 0.01,
		payments: [
			{
			        tokenID: <token_id>,
			        nonce: 0,
			        amount: <amount>
		        },
			{
			        tokenID: <token_id>,
			        nonce: 0,
			        amount: <amount>
		        }
		]
	) {
		receiver
		data
	}
}

query CreateDualFarmPositionDualTokens {
	createDualFarmPositionDualTokens(
		dualFarmAddress: <staking_proxy_address>,
		tolerance: 0.01,
		payments: [
			{
			        tokenID: <token_id>,
			        nonce: 0,
			        amount: <amount>
		        },
			{
			        tokenID: <token_id>,
			        nonce: 0,
			        amount: <amount>
		        }
		]
	) {
		receiver
		data
	}
}

query ExitFarmPositionDualTokens {
	exitFarmPositionDualTokens(
		farmAddress: <farm_address>,
		payment: {
			tokenID: <token_id>,
			nonce: 0,
			amount: <amount>
		},
		tolerance: 0.01
	) {
		receiver
		data
	}
}

Copy link

codecov bot commented Nov 23, 2023

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (f9d849b) 56.16% compared to head (497a860) 56.93%.
Report is 9 commits behind head on feat/xexchange-v3.

Files Patch % Lines
...n-creator/services/position.creator.transaction.ts 87.87% 0 Missing and 12 partials ⚠️
...ition-creator/services/position.creator.compute.ts 96.96% 0 Missing and 1 partial ⚠️
...c/modules/tokens/services/token.compute.service.ts 80.00% 1 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           feat/xexchange-v3    #1224      +/-   ##
=====================================================
+ Coverage              56.16%   56.93%   +0.76%     
=====================================================
  Files                    235      237       +2     
  Lines                   7846     7979     +133     
  Branches                 522      538      +16     
=====================================================
+ Hits                    4407     4543     +136     
+ Misses                  2994     2976      -18     
- Partials                 445      460      +15     
Flag Coverage Δ
unittests 56.93% <90.60%> (+0.76%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

cfaur09
cfaur09 previously approved these changes Nov 27, 2023
@claudiulataretu claudiulataretu merged commit db93669 into feat/xexchange-v3 Dec 4, 2023
3 checks passed
@claudiulataretu claudiulataretu deleted the MEX-410-position-creator-general-information branch December 4, 2023 10:55
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.

3 participants