Skip to content

Commit

Permalink
Merge pull request #1224 from multiversx/MEX-410-position-creator-gen…
Browse files Browse the repository at this point in the history
…eral-information

[MEX-410] position creator general information
  • Loading branch information
claudiulataretu authored Dec 4, 2023
2 parents e22b72e + 497a860 commit db93669
Show file tree
Hide file tree
Showing 16 changed files with 2,137 additions and 17 deletions.
339 changes: 339 additions & 0 deletions src/abis/auto-pos-creator.abi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,339 @@
{
"buildInfo": {
"rustc": {
"version": "1.73.0-nightly",
"commitHash": "4c8bb79d9f565115637cc6da739f8389e79f3a29",
"commitDate": "2023-07-15",
"channel": "Nightly",
"short": "rustc 1.73.0-nightly (4c8bb79d9 2023-07-15)"
},
"contractCrate": {
"name": "auto-pos-creator",
"version": "0.0.0"
},
"framework": {
"name": "multiversx-sc",
"version": "0.44.0"
}
},
"name": "AutoPosCreator",
"constructor": {
"inputs": [
{
"name": "egld_wrapper_address",
"type": "Address"
},
{
"name": "router_address",
"type": "Address"
}
],
"outputs": []
},
"endpoints": [
{
"name": "upgrade",
"mutability": "mutable",
"inputs": [],
"outputs": []
},
{
"name": "createLpPosFromSingleToken",
"mutability": "mutable",
"payableInTokens": [
"*"
],
"inputs": [
{
"name": "pair_address",
"type": "Address"
},
{
"name": "add_liq_first_token_min_amount_out",
"type": "BigUint"
},
{
"name": "add_liq_second_token_min_amount_out",
"type": "BigUint"
},
{
"name": "swap_operations",
"type": "variadic<multi<Address,bytes,TokenIdentifier,BigUint>>",
"multi_arg": true
}
],
"outputs": [
{
"type": "List<EsdtTokenPayment>"
}
]
},
{
"name": "createLpPosFromTwoTokens",
"mutability": "mutable",
"payableInTokens": [
"*"
],
"inputs": [
{
"name": "pair_address",
"type": "Address"
},
{
"name": "add_liq_first_token_min_amount_out",
"type": "BigUint"
},
{
"name": "add_liq_second_token_min_amount_out",
"type": "BigUint"
}
],
"outputs": [
{
"type": "List<EsdtTokenPayment>"
}
]
},
{
"name": "createFarmPosFromSingleToken",
"mutability": "mutable",
"payableInTokens": [
"*"
],
"inputs": [
{
"name": "farm_address",
"type": "Address"
},
{
"name": "add_liq_first_token_min_amount_out",
"type": "BigUint"
},
{
"name": "add_liq_second_token_min_amount_out",
"type": "BigUint"
},
{
"name": "swap_operations",
"type": "variadic<multi<Address,bytes,TokenIdentifier,BigUint>>",
"multi_arg": true
}
],
"outputs": [
{
"type": "List<EsdtTokenPayment>"
}
]
},
{
"name": "createFarmPosFromTwoTokens",
"mutability": "mutable",
"payableInTokens": [
"*"
],
"inputs": [
{
"name": "farm_address",
"type": "Address"
},
{
"name": "add_liq_first_token_min_amount_out",
"type": "BigUint"
},
{
"name": "add_liq_second_token_min_amount_out",
"type": "BigUint"
}
],
"outputs": [
{
"type": "List<EsdtTokenPayment>"
}
]
},
{
"name": "createMetastakingPosFromSingleToken",
"mutability": "mutable",
"payableInTokens": [
"*"
],
"inputs": [
{
"name": "metastaking_address",
"type": "Address"
},
{
"name": "add_liq_first_token_min_amount_out",
"type": "BigUint"
},
{
"name": "add_liq_second_token_min_amount_out",
"type": "BigUint"
},
{
"name": "swap_operations",
"type": "variadic<multi<Address,bytes,TokenIdentifier,BigUint>>",
"multi_arg": true
}
],
"outputs": [
{
"type": "List<EsdtTokenPayment>"
}
]
},
{
"name": "createMetastakingPosFromTwoTokens",
"mutability": "mutable",
"payableInTokens": [
"*"
],
"inputs": [
{
"name": "metastaking_address",
"type": "Address"
},
{
"name": "add_liq_first_token_min_amount_out",
"type": "BigUint"
},
{
"name": "add_liq_second_token_min_amount_out",
"type": "BigUint"
}
],
"outputs": [
{
"type": "List<EsdtTokenPayment>"
}
]
},
{
"name": "createFarmStakingPosFromSingleToken",
"mutability": "mutable",
"payableInTokens": [
"*"
],
"inputs": [
{
"name": "farm_staking_address",
"type": "Address"
},
{
"name": "min_amount_out",
"type": "BigUint"
},
{
"name": "swap_operations",
"type": "variadic<multi<Address,bytes,TokenIdentifier,BigUint>>",
"multi_arg": true
}
],
"outputs": [
{
"type": "List<EsdtTokenPayment>"
}
]
},
{
"name": "exitMetastakingPos",
"mutability": "mutable",
"payableInTokens": [
"*"
],
"inputs": [
{
"name": "metastaking_address",
"type": "Address"
},
{
"name": "first_token_min_amount_out",
"type": "BigUint"
},
{
"name": "second_token_min_amont_out",
"type": "BigUint"
}
],
"outputs": [
{
"type": "List<EsdtTokenPayment>"
}
]
},
{
"name": "exitFarmPos",
"mutability": "mutable",
"payableInTokens": [
"*"
],
"inputs": [
{
"name": "farm_address",
"type": "Address"
},
{
"name": "first_token_min_amount_out",
"type": "BigUint"
},
{
"name": "second_token_min_amont_out",
"type": "BigUint"
}
],
"outputs": [
{
"type": "List<EsdtTokenPayment>"
}
]
},
{
"name": "exitLpPos",
"mutability": "mutable",
"payableInTokens": [
"*"
],
"inputs": [
{
"name": "pair_address",
"type": "Address"
},
{
"name": "first_token_min_amount_out",
"type": "BigUint"
},
{
"name": "second_token_min_amont_out",
"type": "BigUint"
}
],
"outputs": [
{
"type": "List<EsdtTokenPayment>"
}
]
}
],
"events": [],
"esdtAttributes": [],
"hasCallback": false,
"types": {
"EsdtTokenPayment": {
"type": "struct",
"fields": [
{
"name": "token_identifier",
"type": "TokenIdentifier"
},
{
"name": "token_nonce",
"type": "u64"
},
{
"name": "amount",
"type": "BigUint"
}
]
}
}
}
9 changes: 7 additions & 2 deletions src/config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"energyUpdate": "erd1qqqqqqqqqqqqqpgqqns0u3hw0e3j0km9h77emuear4xq7k7fd8ss0cwgja",
"tokenUnstake": "erd1qqqqqqqqqqqqqpgqnysvq99c2t4a9pvvv22elnl6p73el8vw0n4spyfv7p",
"lockedTokenWrapper": "erd1qqqqqqqqqqqqqpgq9ej9vcnr38l69rgkc735kgv0qlu2ptrsd8ssu9rwtu",
"escrow": "erd1qqqqqqqqqqqqqpgqz0wkk0j6y4h0mcxfxsg023j4x5sfgrmz0n4s4swp7a"
"escrow": "erd1qqqqqqqqqqqqqpgqz0wkk0j6y4h0mcxfxsg023j4x5sfgrmz0n4s4swp7a",
"positionCreator": "erd1qqqqqqqqqqqqqpgqh3zcutxk3wmfvevpyymaehvc3k0knyq70n4sg6qcj6"
},
"tokenProviderUSD": "WEGLD-71e90a",
"tokensSupply": ["MEX-27f4cd"],
Expand Down Expand Up @@ -493,6 +494,9 @@
"governance": {
"vote": 50000000
},
"positionCreator": {
"singleToken": 50000000
},
"lockedAssetCreate": 5000000,
"wrapeGLD": 4200000,
"claimLockedAssets": 45500000
Expand Down Expand Up @@ -533,7 +537,8 @@
"governance": {
"energy": "./src/abis/governance-v2.abi.json",
"tokenSnapshot": "./src/abis/governance-v2-merkle-proof.abi.json"
}
},
"positionCreator": "./src/abis/auto-pos-creator.abi.json"
},
"cron": {
"transactionCollectorMaxHyperblocks": 10,
Expand Down
3 changes: 2 additions & 1 deletion src/config/devnet2.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"energyUpdate": "erd1qqqqqqqqqqqqqpgqz2ctz77j9we0r99mnhehv24he3pxmsmq0n4sntf4n7",
"tokenUnstake": "erd1qqqqqqqqqqqqqpgqu6s4e5mndgf37psxw9mdlmjavp2er3f00n4snwyk3q",
"lockedTokenWrapper": "erd1qqqqqqqqqqqqqpgqasr2asq07e6ur274eecx3vd0pnej2vxs0n4sqqyp52",
"escrow": "erd1qqqqqqqqqqqqqpgqnx4t9kwy5n9atuumvnrluv5yrwmpxzx60n4sj497ms"
"escrow": "erd1qqqqqqqqqqqqqpgqnx4t9kwy5n9atuumvnrluv5yrwmpxzx60n4sj497ms",
"positionCreator": "erd1qqqqqqqqqqqqqpgqh3zcutxk3wmfvevpyymaehvc3k0knyq70n4sg6qcj6"
},
"governance": {
"oldEnergy": {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/auto-router/auto-router.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ import { TokenModule } from '../tokens/token.module';
AutoRouterTransactionService,
PairTransactionService,
],
exports: [],
exports: [AutoRouterService, AutoRouterTransactionService],
})
export class AutoRouterModule {}
Loading

0 comments on commit db93669

Please sign in to comment.