diff --git a/Documentation.md b/Documentation.md index c047df3..c69db01 100644 --- a/Documentation.md +++ b/Documentation.md @@ -1,5 +1,7 @@ # How to launch the App + ## Requirements + - NET .Core framework - MongoDb - Node.JS @@ -8,28 +10,31 @@ # First setup - ## Generate dev certificate + - ```dotnet dev-certs https -ep \.aspnet\https\aspnetapp.pfx -p password``` - ```dotnet dev-certs https --trust``` ## Setup docker + - Update ```apps\src\Managing.Api\appsettings.MYNAME.json``` with your configuration settings - Update ```apps\src\Managing.Api.Workers\appsettings.MYNAME.json``` with your configuration settings - Then execute from the root of the project : ```.\scripts\docker-deploy-sandbox.cmd``` - At this point, only Managing.Api.Workers should be NOT running. It because we didn't create an account. - + ## Setup an account + - ```cd src/Managing.WebApp``` - ```npm run dev``` - Go to front-end app ```http://localhost:3000/``` -- If request end up with a 500 error, you should open the url of the container and validate the certificate. +- If request end up with a 500 error, you should open the url of the container and validate the certificate. - Connect your ETH account - Setup a username for your account - On Account page : Create an EVM account for trading (Not necessary if you don't want to trade) ## Setup InfluxDb + - Go to http://localhost:8086/ - Then initialize InfluxDb @@ -38,9 +43,11 @@ - Go to api keys ![InfluxDb Api](assets/img/doc-influxdb-apikeys-1.png) -- Create an apikey and update the ```apps\src\Managing.Api.Workers\appsettings.MYNAME.json``` file with the api key + +- Create an apikey and update the ```apps\src\Managing.Api.Workers\appsettings.MYNAME.json``` file with the api key ![InfluxDb Api](assets/img/doc-influxdb-apikeys-2.png) + - Then redeploy by executing : ```.\scripts\docker-deploy-sandbox.cmd``` - Check influxdb > buckets > prices-bucket > if there is data @@ -50,12 +57,17 @@ - It may take some time to see the candles in the front-end ## Setup default strategies, scenario and money management + - Go to Managing.Api swagger ```https://localhost/index.html``` - Execute ```POST /settings``` -![Api Settings](assets/img/doc-settings.png) + ![Api Settings](assets/img/doc-settings.png) + +# Dev -# Dev ## Generate Api Client + - Use [NSwag](https://github.com/RicoSuter/NSwag) -- Generate a Typescript client with Fetch template +- Generate a Typescript client with Fetch template - Deposit the file in ```Managing.WebApp\src\generated\``` +- Generatet ABI + service ```Nethereum.Generator.Console generate from-abi -abi ./DataStore/DataStore.abi -o . -ns Managing.Tools``` \ No newline at end of file diff --git a/README.md b/README.md index ffcc224..5b2df82 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ It contains bot management, backtesting, scenario management and money managemen - [x] Adaptive trading - [x] Account management - [x] Workers (prices, backtests, volumes) +- [x] Bot backup ## v2 - The custody back @@ -39,6 +40,7 @@ It contains bot management, backtesting, scenario management and money managemen - [ ] Address tracking - [ ] Trading desk - [ ] Metrics (backtests, portofolio) +- [ ] Account Abstraction Layer - [ ] Enhance performances - [ ] Dockerize everything diff --git a/src/Managing.ABI.GmxV2/Contracts/DataStore.abi b/src/Managing.ABI.GmxV2/Contracts/DataStore.abi new file mode 100644 index 0000000..5070df5 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Contracts/DataStore.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"contract RoleStore","name":"_roleStore","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"msgSender","type":"address"},{"internalType":"string","name":"role","type":"string"}],"name":"Unauthorized","type":"error"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"},{"internalType":"address","name":"value","type":"address"}],"name":"addAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"},{"internalType":"bytes32","name":"value","type":"bytes32"}],"name":"addBytes32","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"addUint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"addressArrayValues","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"addressValues","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"int256","name":"value","type":"int256"}],"name":"applyBoundedDeltaToUint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"int256","name":"value","type":"int256"}],"name":"applyDeltaToInt","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"int256","name":"value","type":"int256"},{"internalType":"string","name":"errorMessage","type":"string"}],"name":"applyDeltaToUint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"applyDeltaToUint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"boolArrayValues","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"boolValues","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"bytes32ArrayValues","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"bytes32Values","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"},{"internalType":"address","name":"value","type":"address"}],"name":"containsAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"},{"internalType":"bytes32","name":"value","type":"bytes32"}],"name":"containsBytes32","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"containsUint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"int256","name":"value","type":"int256"}],"name":"decrementInt","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"decrementUint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getAddressArray","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"}],"name":"getAddressCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getAddressValuesAt","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getBool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getBoolArray","outputs":[{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getBytes32","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getBytes32Array","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"}],"name":"getBytes32Count","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getBytes32ValuesAt","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getInt","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getIntArray","outputs":[{"internalType":"int256[]","name":"","type":"int256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getString","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getStringArray","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getUint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getUintArray","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"}],"name":"getUintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getUintValuesAt","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"int256","name":"value","type":"int256"}],"name":"incrementInt","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"incrementUint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"intArrayValues","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"intValues","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"},{"internalType":"address","name":"value","type":"address"}],"name":"removeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"removeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"removeAddressArray","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"removeBool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"removeBoolArray","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"},{"internalType":"bytes32","name":"value","type":"bytes32"}],"name":"removeBytes32","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"removeBytes32","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"removeBytes32Array","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"removeInt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"removeIntArray","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"removeString","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"removeStringArray","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"removeUint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"setKey","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"removeUint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"removeUintArray","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"roleStore","outputs":[{"internalType":"contract RoleStore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"address","name":"value","type":"address"}],"name":"setAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"address[]","name":"value","type":"address[]"}],"name":"setAddressArray","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setBool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"bool[]","name":"value","type":"bool[]"}],"name":"setBoolArray","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"bytes32","name":"value","type":"bytes32"}],"name":"setBytes32","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"bytes32[]","name":"value","type":"bytes32[]"}],"name":"setBytes32Array","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"int256","name":"value","type":"int256"}],"name":"setInt","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"int256[]","name":"value","type":"int256[]"}],"name":"setIntArray","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"string","name":"value","type":"string"}],"name":"setString","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"string[]","name":"value","type":"string[]"}],"name":"setStringArray","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setUint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"uint256[]","name":"value","type":"uint256[]"}],"name":"setUintArray","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stringArrayValues","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"stringValues","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"uintArrayValues","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"uintValues","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}] \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Contracts/DataStore.bin b/src/Managing.ABI.GmxV2/Contracts/DataStore.bin new file mode 100644 index 0000000..9398171 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Contracts/DataStore.bin @@ -0,0 +1 @@ +60a06040523480156200001157600080fd5b506040516200296638038062002966833981016040819052620000349162000046565b6001600160a01b031660805262000078565b6000602082840312156200005957600080fd5b81516001600160a01b03811681146200007157600080fd5b9392505050565b6080516128cb6200009b6000396000818161054c01526117c001526128cb6000f3fe608060405234801561001057600080fd5b50600436106103485760003560e01c80639921c3cc116101bb5780639921c3cc146106e85780639faf6fb6146106fb5780639fe7ac121461070e578063a6ed563e14610721578063a9fcf76b14610741578063abfdcced14610754578063adb353dc14610767578063b348e6391461077a578063b8320a081461078d578063bd02d0f5146107a0578063be43caa3146107c0578063bf498dd3146107d3578063bf7f035a146107e6578063c1dc9182146107f9578063c4f00fde1461080c578063c769d1a11461081f578063c80f4c6214610832578063ca446dd914610845578063cbb093dd14610858578063cc50eadd1461086b578063cf6a87221461087e578063d38eebc714610891578063d52852af146108b1578063dc97d962146108d1578063dd031997146108f1578063e208a70d14610904578063e2a4853a14610917578063e4e36c4e14610858578063e62461ce1461092a578063e7e4148e1461093d578063e98aabc114610950578063ec672cf614610963578063f069052a14610976578063f15caeac14610989578063f3903b9f1461099c578063f51fc0d9146109af57600080fd5b806301677da21461034d578063065f21a714610376578063116bb9291461039757806321f8a721146103b757806322538dae146103f857806322f874641461042157806326004846146104345780632d2899b614610449578063310b88821461046957806332f85bbf1461048c578063340dbab31461049f57806335d4d407146104b257806335ea8059146104c55780633dbacd1a146104d85780633e49bed0146104eb57806342c3bd96146104fe57806344a242b114610511578063499ea50e146105345780634a4a7b04146105475780634e91db081461056e5780635948f733146105815780635eb07dbd146105a15780636339734d146105b457806369721d41146105c75780636e899550146105da5780636fae54f0146105fa5780637026d42c1461060d578063743df325146106205780637ae1cfca1461064057806380aacdcd1461066357806386ac6bdf1461067657806388021a72146106895780638ca498b01461069c57806391d4403c146106af57806393266f9a146106c2578063986e791a146106d5575b600080fd5b61036061035b366004611fa9565b6109c2565b60405161036d9190612008565b60405180910390f35b610389610384366004611fa9565b610aae565b60405190815260200161036d565b6103aa6103a5366004611fa9565b610acb565b60405161036d919061206a565b6103e06103c5366004611fa9565b6000908152600260205260409020546001600160a01b031690565b6040516001600160a01b03909116815260200161036d565b6103e0610406366004611fa9565b6002602052600090815260409020546001600160a01b031681565b6103e061042f3660046120b0565b610b4d565b61044761044236600461213b565b610b85565b005b61045c610457366004611fa9565b610bf9565b60405161036d91906121dc565b61047c6104773660046120b0565b610c5a565b604051901515815260200161036d565b61038961049a366004612283565b610c79565b6103896104ad3660046120b0565b610d0a565b6104476104c03660046122e0565b610d52565b6103896104d3366004611fa9565b610d83565b6103896104e63660046120b0565b610d9a565b6103896104f93660046120b0565b610de3565b61044761050c366004611fa9565b610e0d565b61047c61051f366004611fa9565b60036020526000908152604090205460ff1681565b610447610542366004611fa9565b610e30565b6103e07f000000000000000000000000000000000000000000000000000000000000000081565b61038961057c3660046120b0565b610e5c565b61059461058f366004611fa9565b610e86565b60405161036d9190612376565b6104476105af36600461213b565b610ef1565b6103896105c23660046120b0565b610f22565b6104476105d53660046123d3565b610f53565b6105ed6105e83660046123ff565b610f7d565b60405161036d9190612445565b6103896106083660046120b0565b610fb1565b61045c61061b366004612458565b610ff9565b61038961062e366004611fa9565b60016020526000908152604090205481565b61047c61064e366004611fa9565b60009081526003602052604090205460ff1690565b61047c6106713660046120b0565b61101d565b61045c610684366004611fa9565b611060565b610447610697366004612484565b6110c0565b6103896106aa3660046120b0565b6110f1565b61047c6106bd3660046120b0565b611156565b6104476106d03660046120b0565b61116e565b6105ed6106e3366004611fa9565b611198565b6104476106f63660046120b0565b611230565b610447610709366004611fa9565b61125a565b61044761071c366004611fa9565b61128a565b61038961072f366004611fa9565b60009081526005602052604090205490565b61044761074f36600461213b565b6112b4565b61047c610762366004612540565b6112e5565b6104476107753660046120b0565b611318565b6104476107883660046123d3565b611342565b6105ed61079b3660046120b0565b61136c565b6103896107ae366004611fa9565b60009081526020819052604090205490565b6104476107ce366004611fa9565b611425565b6103896107e13660046120b0565b61144e565b6104476107f4366004611fa9565b61146a565b610447610807366004611fa9565b611493565b61038961081a3660046120b0565b6114bc565b61047c61082d3660046123d3565b6114d8565b6104476108403660046120b0565b6114f0565b6103e06108533660046123d3565b61151a565b6103896108663660046120b0565b61155a565b610447610879366004611fa9565b611588565b61044761088c366004611fa9565b6115b1565b61038961089f366004611fa9565b60006020819052908152604090205481565b6103896108bf366004611fa9565b60056020526000908152604090205481565b6103896108df366004611fa9565b60009081526001602052604090205490565b61045c6108ff366004611fa9565b6115d4565b610447610912366004611fa9565b611634565b6103896109253660046120b0565b61165d565b610447610938366004611fa9565b611687565b61059461094b366004612458565b6116aa565b61038961095e3660046120b0565b6116c6565b610447610971366004612570565b6116f4565b61045c610984366004612458565b611725565b6105ed610997366004611fa9565b611741565b6103896109aa366004611fa9565b61175a565b6104476109bd366004611fa9565b611771565b6060600a6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610aa3578382906000526020600020018054610a1690612604565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4290612604565b8015610a8f5780601f10610a6457610100808354040283529160200191610a8f565b820191906000526020600020905b815481529060010190602001808311610a7257829003601f168201915b5050505050815260200190600101906109f7565b505050509050919050565b6000818152600e60205260408120610ac59061179a565b92915050565b600081815260096020908152604091829020805483518184028101840190945280845260609392830182828015610b4157602002820191906000526020600020906000905b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411610b105790505b50505050509050919050565b60086020528160005260406000208181548110610b6957600080fd5b6000918252602090912001546001600160a01b03169150829050565b610bd5604051602001610b979061263e565b604051602081830303815290604052805190602001206040518060400160405280600a81526020016921a7a72a2927a62622a960b11b8152506117a4565b6000828152600b602090815260409091208251610bf492840190611d52565b505050565b600081815260076020908152604091829020805483518184028101840190945280845260609392830182828015610b4157602002820191906000526020600020905b815481526020019060010190808311610c3b5750505050509050919050565b6000828152600e60205260408120610c729083611858565b9392505050565b6000610c8d604051602001610b979061263e565b6000848152602081905260408120549084128015610cba575080610cb8610cb386612678565b611864565b115b15610ce2578260405162461bcd60e51b8152600401610cd99190612445565b60405180910390fd5b6000610cee82866118ba565b6000878152602081905260409020819055925050509392505050565b6000610d1e604051602001610b979061263e565b600083815260208190526040812054610d38908490612694565b600085815260208190526040902081905591505092915050565b610d64604051602001610b979061263e565b60008281526009602090815260409091208251610bf492840190611d99565b6000818152600d60205260408120610ac59061179a565b6000610dae604051602001610b979061263e565b60008381526020819052604081205490610dc88483612694565b60008681526020819052604090208190559250505092915050565b6000610df7604051602001610b979061263e565b5060009182526001602052604090912081905590565b610e1f604051602001610b979061263e565b600090815260208190526040812055565b610e42604051602001610b979061263e565b6000818152600760205260408120610e5991611e39565b50565b6000610e70604051602001610b979061263e565b5060009182526005602052604090912081905590565b600081815260086020908152604091829020805483518184028101840190945280845260609392830182828015610b4157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ec85750505050509050919050565b610f03604051602001610b979061263e565b60008281526006602090815260409091208251610bf492840190611d52565b60076020528160005260406000208181548110610f3e57600080fd5b90600052602060002001600091509150505481565b610f65604051602001610b979061263e565b6000828152600d60205260409020610bf490826118f1565b6060610f91604051602001610b979061263e565b6000838152600460205260409020610fa983826126f5565b509092915050565b6000610fc5604051602001610b979061263e565b600083815260016020526040812054610fdf9084906127b4565b600085815260016020526040902081905591505092915050565b6000838152600e60205260409020606090611015908484611906565b949350505050565b6009602052816000526040600020818154811061103957600080fd5b9060005260206000209060209182820401919006915091509054906101000a900460ff1681565b600081815260066020908152604091829020805483518184028101840190945280845260609392830182828015610b415760200282019190600052602060002090815481526020019060010190808311610c3b5750505050509050919050565b6110d2604051602001610b979061263e565b6000828152600a602090815260409091208251610bf492840190611e57565b6000611105604051602001610b979061263e565b600083815260208190526040812054908312801561112d57508061112b610cb385612678565b115b1561114a5750506000828152602081905260408120819055610ac5565b6000610dc882856118ba565b6000828152600c60205260408120610c729083611858565b611180604051602001610b979061263e565b6000828152600e60205260409020610bf490826119ea565b60008181526004602052604090208054606091906111b590612604565b80601f01602080910402602001604051908101604052809291908181526020018280546111e190612604565b8015610b415780601f1061120357610100808354040283529160200191610b41565b820191906000526020600020905b8154815290600101906020018083116112115750939695505050505050565b611242604051602001610b979061263e565b6000828152600c60205260409020610bf490826119ea565b61126c604051602001610b979061263e565b600090815260026020526040902080546001600160a01b0319169055565b61129c604051602001610b979061263e565b6000908152600360205260409020805460ff19169055565b6112c6604051602001610b979061263e565b60008281526007602090815260409091208251610bf492840190611d52565b60006112f9604051602001610b979061263e565b50600091825260036020526040909120805460ff191682151517905590565b61132a604051602001610b979061263e565b6000828152600e60205260409020610bf490826119f6565b611354604051602001610b979061263e565b6000828152600d60205260409020610bf49082611a02565b600a602052816000526040600020818154811061138857600080fd5b906000526020600020016000915091505080546113a490612604565b80601f01602080910402602001604051908101604052809291908181526020018280546113d090612604565b801561141d5780601f106113f25761010080835404028352916020019161141d565b820191906000526020600020905b81548152906001019060200180831161140057829003601f168201915b505050505081565b611437604051602001610b979061263e565b6000818152600660205260408120610e5991611e39565b600b6020528160005260406000208181548110610f3e57600080fd5b61147c604051602001610b979061263e565b6000818152600b60205260408120610e5991611e39565b6114a5604051602001610b979061263e565b6000818152600860205260408120610e5991611e39565b60066020528160005260406000208181548110610f3e57600080fd5b6000828152600d60205260408120610c729083611a17565b611502604051602001610b979061263e565b6000828152600c60205260409020610bf490826119f6565b600061152e604051602001610b979061263e565b5060009182526002602052604090912080546001600160a01b0319166001600160a01b03831617905590565b600061156e604051602001610b979061263e565b600083815260016020526040812054610fdf9084906127d4565b61159a604051602001610b979061263e565b6000818152600460205260408120610e5991611ea9565b6115c3604051602001610b979061263e565b600090815260056020526040812055565b6000818152600b6020908152604091829020805483518184028101840190945280845260609392830182828015610b415760200282019190600052602060002090815481526020019060010190808311610c3b5750505050509050919050565b611646604051602001610b979061263e565b6000818152600a60205260408120610e5991611ee3565b6000611671604051602001610b979061263e565b5060009182526020829052604090912081905590565b611699604051602001610b979061263e565b600090815260016020526040812055565b6000838152600d60205260409020606090611015908484611a2c565b60006116da604051602001610b979061263e565b600083815260208190526040812054610d389084906127fc565b611706604051602001610b979061263e565b60008281526008602090815260409091208251610bf492840190611f01565b6000838152600c60205260409020606090611015908484611aef565b600460205260009081526040902080546113a490612604565b6000818152600c60205260408120610ac59061179a565b611783604051602001610b979061263e565b6000818152600960205260408120610e5991611f56565b6000610ac5825490565b60405163ac4ab3fb60e01b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ac4ab3fb90604401602060405180830381865afa15801561180f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611833919061280f565b61185457338160405163a35b150b60e01b8152600401610cd992919061282c565b5050565b6000610c728383611ba5565b6000808212156118b65760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610cd9565b5090565b6000808213156118de576118cd82611bbd565b6118d79084612694565b9050610ac5565b6118e782611bbd565b610c7290846127fc565b6000610c72836001600160a01b038416611bd0565b60606119118461179a565b831061192c5750604080516000815260208101909152610c72565b60006119378561179a565b905080831115611945578092505b600061195185856127fc565b6001600160401b03811115611968576119686120d2565b604051908082528060200260200182016040528015611991578160200160208202803683370190505b509050845b848110156119e0576119a88782611cca565b826119b388846127fc565b815181106119c3576119c3612850565b6020908102919091010152806119d881612866565b915050611996565b5095945050505050565b6000610c728383611bd0565b6000610c728383611cd6565b6000610c72836001600160a01b038416611cd6565b6000610c72836001600160a01b038416611ba5565b60606000611a398561179a565b905080831115611a47578092505b6000611a5385856127fc565b6001600160401b03811115611a6a57611a6a6120d2565b604051908082528060200260200182016040528015611a93578160200160208202803683370190505b509050845b848110156119e057611aaa8782611cca565b82611ab588846127fc565b81518110611ac557611ac5612850565b6001600160a01b039092166020928302919091019091015280611ae781612866565b915050611a98565b60606000611afc8561179a565b905080831115611b0a578092505b6000611b1685856127fc565b6001600160401b03811115611b2d57611b2d6120d2565b604051908082528060200260200182016040528015611b56578160200160208202803683370190505b509050845b848110156119e057611b6d8782611d20565b82611b7888846127fc565b81518110611b8857611b88612850565b602090810291909101015280611b9d81612866565b915050611b5b565b60009081526001919091016020526040902054151590565b6000808212156118b65781600003610ac5565b60008181526001830160205260408120548015611cb9576000611bf46001836127fc565b8554909150600090611c08906001906127fc565b9050818114611c6d576000866000018281548110611c2857611c28612850565b9060005260206000200154905080876000018481548110611c4b57611c4b612850565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c7e57611c7e61287f565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610ac5565b6000915050610ac5565b5092915050565b6000610c728383611d28565b6000611ce28383611ba5565b611d1857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ac5565b506000610ac5565b6000610c7283835b6000826000018281548110611d3f57611d3f612850565b9060005260206000200154905092915050565b828054828255906000526020600020908101928215611d8d579160200282015b82811115611d8d578251825591602001919060010190611d72565b506118b6929150611f77565b82805482825590600052602060002090601f01602090048101928215611d8d5791602002820160005b83821115611dff57835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302611dc2565b8015611e2c5782816101000a81549060ff0219169055600101602081600001049283019260010302611dff565b50506118b6929150611f77565b5080546000825590600052602060002090810190610e599190611f77565b828054828255906000526020600020908101928215611e9d579160200282015b82811115611e9d5782518290611e8d90826126f5565b5091602001919060010190611e77565b506118b6929150611f8c565b508054611eb590612604565b6000825580601f10611ec5575050565b601f016020900490600052602060002090810190610e599190611f77565b5080546000825590600052602060002090810190610e599190611f8c565b828054828255906000526020600020908101928215611d8d579160200282015b82811115611d8d57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611f21565b50805460008255601f016020900490600052602060002090810190610e5991905b5b808211156118b65760008155600101611f78565b808211156118b6576000611fa08282611ea9565b50600101611f8c565b600060208284031215611fbb57600080fd5b5035919050565b6000815180845260005b81811015611fe857602081850181015186830182015201611fcc565b506000602082860101526020601f19601f83011685010191505092915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561205d57603f1988860301845261204b858351611fc2565b9450928501929085019060010161202f565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156120a4578351151583529284019291840191600101612086565b50909695505050505050565b600080604083850312156120c357600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612110576121106120d2565b604052919050565b60006001600160401b03821115612131576121316120d2565b5060051b60200190565b6000806040838503121561214e57600080fd5b823591506020808401356001600160401b0381111561216c57600080fd5b8401601f8101861361217d57600080fd5b803561219061218b82612118565b6120e8565b81815260059190911b820183019083810190888311156121af57600080fd5b928401925b828410156121cd578335825292840192908401906121b4565b80955050505050509250929050565b6020808252825182820181905260009190848201906040850190845b818110156120a4578351835292840192918401916001016121f8565b600082601f83011261222557600080fd5b81356001600160401b0381111561223e5761223e6120d2565b612251601f8201601f19166020016120e8565b81815284602083860101111561226657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121561229857600080fd5b833592506020840135915060408401356001600160401b038111156122bc57600080fd5b6122c886828701612214565b9150509250925092565b8015158114610e5957600080fd5b600080604083850312156122f357600080fd5b823591506020808401356001600160401b0381111561231157600080fd5b8401601f8101861361232257600080fd5b803561233061218b82612118565b81815260059190911b8201830190838101908883111561234f57600080fd5b928401925b828410156121cd578335612367816122d2565b82529284019290840190612354565b6020808252825182820181905260009190848201906040850190845b818110156120a45783516001600160a01b031683529284019291840191600101612392565b80356001600160a01b03811681146123ce57600080fd5b919050565b600080604083850312156123e657600080fd5b823591506123f6602084016123b7565b90509250929050565b6000806040838503121561241257600080fd5b8235915060208301356001600160401b0381111561242f57600080fd5b61243b85828601612214565b9150509250929050565b602081526000610c726020830184611fc2565b60008060006060848603121561246d57600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561249757600080fd5b823591506020808401356001600160401b03808211156124b657600080fd5b818601915086601f8301126124ca57600080fd5b81356124d861218b82612118565b81815260059190911b830184019084810190898311156124f757600080fd5b8585015b8381101561252f578035858111156125135760008081fd5b6125218c89838a0101612214565b8452509186019186016124fb565b508096505050505050509250929050565b6000806040838503121561255357600080fd5b823591506020830135612565816122d2565b809150509250929050565b6000806040838503121561258357600080fd5b823591506020808401356001600160401b038111156125a157600080fd5b8401601f810186136125b257600080fd5b80356125c061218b82612118565b81815260059190911b820183019083810190888311156125df57600080fd5b928401925b828410156121cd576125f5846123b7565b825292840192908401906125e4565b600181811c9082168061261857607f821691505b60208210810361263857634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600a908201526921a7a72a2927a62622a960b11b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000600160ff1b820161268d5761268d612662565b5060000390565b80820180821115610ac557610ac5612662565b601f821115610bf457600081815260208120601f850160051c810160208610156126ce5750805b601f850160051c820191505b818110156126ed578281556001016126da565b505050505050565b81516001600160401b0381111561270e5761270e6120d2565b6127228161271c8454612604565b846126a7565b602080601f831160018114612757576000841561273f5750858301515b600019600386901b1c1916600185901b1785556126ed565b600085815260208120601f198616915b8281101561278657888601518255948401946001909101908401612767565b50858210156127a45787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8181036000831280158383131683831282161715611cc357611cc3612662565b80820182811260008312801582168215821617156127f4576127f4612662565b505092915050565b81810381811115610ac557610ac5612662565b60006020828403121561282157600080fd5b8151610c72816122d2565b6001600160a01b038316815260406020820181905260009061101590830184611fc2565b634e487b7160e01b600052603260045260246000fd5b60006001820161287857612878612662565b5060010190565b634e487b7160e01b600052603160045260246000fdfea264697066735822122078fa982c04127061c9e1c94f963f87e841da3406d1c88b279897f047516f979e64736f6c634300081200330000000000000000000000003c3d99fd298f679dbc2cecd132b4ec4d0f5e6e72 \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Contracts/Multicall3.abi b/src/Managing.ABI.GmxV2/Contracts/Multicall3.abi new file mode 100644 index 0000000..19a66c8 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Contracts/Multicall3.abi @@ -0,0 +1 @@ +[{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Multicall3.Call[]","name":"calls","type":"tuple[]"}],"name":"aggregate","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"bytes[]","name":"returnData","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"allowFailure","type":"bool"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Multicall3.Call3[]","name":"calls","type":"tuple[]"}],"name":"aggregate3","outputs":[{"components":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"internalType":"struct Multicall3.Result[]","name":"returnData","type":"tuple[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"allowFailure","type":"bool"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Multicall3.Call3Value[]","name":"calls","type":"tuple[]"}],"name":"aggregate3Value","outputs":[{"components":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"internalType":"struct Multicall3.Result[]","name":"returnData","type":"tuple[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Multicall3.Call[]","name":"calls","type":"tuple[]"}],"name":"blockAndAggregate","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"components":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"internalType":"struct Multicall3.Result[]","name":"returnData","type":"tuple[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getBasefee","outputs":[{"internalType":"uint256","name":"basefee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getBlockHash","outputs":[{"internalType":"bytes32","name":"blockHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBlockNumber","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"chainid","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentBlockCoinbase","outputs":[{"internalType":"address","name":"coinbase","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentBlockGasLimit","outputs":[{"internalType":"uint256","name":"gaslimit","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentBlockTimestamp","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"getEthBalance","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastBlockHash","outputs":[{"internalType":"bytes32","name":"blockHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"requireSuccess","type":"bool"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Multicall3.Call[]","name":"calls","type":"tuple[]"}],"name":"tryAggregate","outputs":[{"components":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"internalType":"struct Multicall3.Result[]","name":"returnData","type":"tuple[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bool","name":"requireSuccess","type":"bool"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Multicall3.Call[]","name":"calls","type":"tuple[]"}],"name":"tryBlockAndAggregate","outputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"bytes32","name":"blockHash","type":"bytes32"},{"components":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"returnData","type":"bytes"}],"internalType":"struct Multicall3.Result[]","name":"returnData","type":"tuple[]"}],"stateMutability":"payable","type":"function"}] \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Contracts/Multicall3.bin b/src/Managing.ABI.GmxV2/Contracts/Multicall3.bin new file mode 100644 index 0000000..b3b28c3 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Contracts/Multicall3.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b50610c44806100206000396000f3fe6080604052600436106100b85760003560e01c80630f28c97d146100bd578063174dea71146100df578063252dba42146100ff57806327e86d6e146101205780633408e47014610138578063399542e91461014b5780633e64a6961461016d57806342cbb15c146101805780634d2301cc1461019357806382ad56cb146101bb57806386d516e8146101ce578063a8b0574e146101e1578063bce38bd7146101fc578063c3077fa91461020f578063ee82ac5e14610222575b600080fd5b3480156100c957600080fd5b50425b6040519081526020015b60405180910390f35b6100f26100ed3660046108d3565b610241565b6040516100d691906109c8565b61011261010d3660046108d3565b61041e565b6040516100d69291906109e2565b34801561012c57600080fd5b504360001901406100cc565b34801561014457600080fd5b50466100cc565b61015e610159366004610a4c565b610567565b6040516100d693929190610aa5565b34801561017957600080fd5b50486100cc565b34801561018c57600080fd5b50436100cc565b34801561019f57600080fd5b506100cc6101ae366004610acd565b6001600160a01b03163190565b6100f26101c93660046108d3565b610582565b3480156101da57600080fd5b50456100cc565b3480156101ed57600080fd5b506040514181526020016100d6565b6100f261020a366004610a4c565b6106f6565b61015e61021d3660046108d3565b610851565b34801561022e57600080fd5b506100cc61023d366004610af6565b4090565b6060600082806001600160401b0381111561025e5761025e610b0f565b60405190808252806020026020018201604052801561029757816020015b610284610870565b81526020019060019003908161027c5790505b5092503660005b828110156103c35760008582815181106102ba576102ba610b25565b602002602001015190508787838181106102d6576102d6610b25565b90506020028101906102e89190610b3b565b6040810135958601959093506103016020850185610acd565b6001600160a01b0316816103186060870187610b5b565b604051610326929190610ba1565b60006040518083038185875af1925050503d8060008114610363576040519150601f19603f3d011682016040523d82523d6000602084013e610368565b606091505b5060208085019190915290151580845290850135176103b95762461bcd60e51b6000526020600452601760245276135d5b1d1a58d85b1b0cce8818d85b1b0819985a5b1959604a1b60445260846000fd5b505060010161029e565b508234146104155760405162461bcd60e51b815260206004820152601a60248201527909aead8e8d2c6c2d8d8667440ecc2d8eaca40dad2e6dac2e8c6d60331b60448201526064015b60405180910390fd5b50505092915050565b43606082806001600160401b0381111561043a5761043a610b0f565b60405190808252806020026020018201604052801561046d57816020015b60608152602001906001900390816104585790505b5091503660005b8281101561055d57600087878381811061049057610490610b25565b90506020028101906104a29190610bb1565b92506104b16020840184610acd565b6001600160a01b03166104c76020850185610b5b565b6040516104d5929190610ba1565b6000604051808303816000865af19150503d8060008114610512576040519150601f19603f3d011682016040523d82523d6000602084013e610517565b606091505b5086848151811061052a5761052a610b25565b60209081029190910101529050806105545760405162461bcd60e51b815260040161040c90610bc7565b50600101610474565b5050509250929050565b43804060606105778686866106f6565b905093509350939050565b606081806001600160401b0381111561059d5761059d610b0f565b6040519080825280602002602001820160405280156105d657816020015b6105c3610870565b8152602001906001900390816105bb5790505b5091503660005b828110156104155760008482815181106105f9576105f9610b25565b6020026020010151905086868381811061061557610615610b25565b90506020028101906106279190610bf8565b92506106366020840184610acd565b6001600160a01b031661064c6040850185610b5b565b60405161065a929190610ba1565b6000604051808303816000865af19150503d8060008114610697576040519150601f19603f3d011682016040523d82523d6000602084013e61069c565b606091505b5060208084019190915290151580835290840135176106ed5762461bcd60e51b6000526020600452601760245276135d5b1d1a58d85b1b0cce8818d85b1b0819985a5b1959604a1b60445260646000fd5b506001016105dd565b606081806001600160401b0381111561071157610711610b0f565b60405190808252806020026020018201604052801561074a57816020015b610737610870565b81526020019060019003908161072f5790505b5091503660005b8281101561084757600084828151811061076d5761076d610b25565b6020026020010151905086868381811061078957610789610b25565b905060200281019061079b9190610bb1565b92506107aa6020840184610acd565b6001600160a01b03166107c06020850185610b5b565b6040516107ce929190610ba1565b6000604051808303816000865af19150503d806000811461080b576040519150601f19603f3d011682016040523d82523d6000602084013e610810565b606091505b50602083015215158152871561083e57805161083e5760405162461bcd60e51b815260040161040c90610bc7565b50600101610751565b5050509392505050565b600080606061086260018686610567565b919790965090945092505050565b60408051808201909152600081526060602082015290565b60008083601f84011261089a57600080fd5b5081356001600160401b038111156108b157600080fd5b6020830191508360208260051b85010111156108cc57600080fd5b9250929050565b600080602083850312156108e657600080fd5b82356001600160401b038111156108fc57600080fd5b61090885828601610888565b90969095509350505050565b6000815180845260005b8181101561093a5760208185018101518683018201520161091e565b506000602082860101526020601f19601f83011685010191505092915050565b600082825180855260208086019550808260051b84010181860160005b848110156109bb57858303601f19018952815180511515845284015160408585018190526109a781860183610914565b9a86019a9450505090830190600101610977565b5090979650505050505050565b6020815260006109db602083018461095a565b9392505050565b600060408201848352602060408185015281855180845260608601915060608160051b870101935082870160005b82811015610a3e57605f19888703018452610a2c868351610914565b95509284019290840190600101610a10565b509398975050505050505050565b600080600060408486031215610a6157600080fd5b83358015158114610a7157600080fd5b925060208401356001600160401b03811115610a8c57600080fd5b610a9886828701610888565b9497909650939450505050565b838152826020820152606060408201526000610ac4606083018461095a565b95945050505050565b600060208284031215610adf57600080fd5b81356001600160a01b03811681146109db57600080fd5b600060208284031215610b0857600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008235607e19833603018112610b5157600080fd5b9190910192915050565b6000808335601e19843603018112610b7257600080fd5b8301803591506001600160401b03821115610b8c57600080fd5b6020019150368190038213156108cc57600080fd5b8183823760009101908152919050565b60008235603e19833603018112610b5157600080fd5b602080825260179082015276135d5b1d1a58d85b1b0cce8818d85b1b0819985a5b1959604a1b604082015260600190565b60008235605e19833603018112610b5157600080fdfea26469706673582212205df1e9f2437d5feed9554be594a0f427b805703efd05baf125941b69b294ee5164736f6c63430008120033 \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Contracts/Reader.abi b/src/Managing.ABI.GmxV2/Contracts/Reader.abi new file mode 100644 index 0000000..5442eed --- /dev/null +++ b/src/Managing.ABI.GmxV2/Contracts/Reader.abi @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"address","name":"market","type":"address"}],"name":"DisabledMarket","type":"error"},{"inputs":[],"name":"EmptyMarket","type":"error"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getAccountOrders","outputs":[{"components":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"cancellationReceiver","type":"address"},{"internalType":"address","name":"callbackContract","type":"address"},{"internalType":"address","name":"uiFeeReceiver","type":"address"},{"internalType":"address","name":"market","type":"address"},{"internalType":"address","name":"initialCollateralToken","type":"address"},{"internalType":"address[]","name":"swapPath","type":"address[]"}],"internalType":"struct Order.Addresses","name":"addresses","type":"tuple"},{"components":[{"internalType":"enum Order.OrderType","name":"orderType","type":"uint8"},{"internalType":"enum Order.DecreasePositionSwapType","name":"decreasePositionSwapType","type":"uint8"},{"internalType":"uint256","name":"sizeDeltaUsd","type":"uint256"},{"internalType":"uint256","name":"initialCollateralDeltaAmount","type":"uint256"},{"internalType":"uint256","name":"triggerPrice","type":"uint256"},{"internalType":"uint256","name":"acceptablePrice","type":"uint256"},{"internalType":"uint256","name":"executionFee","type":"uint256"},{"internalType":"uint256","name":"callbackGasLimit","type":"uint256"},{"internalType":"uint256","name":"minOutputAmount","type":"uint256"},{"internalType":"uint256","name":"updatedAtBlock","type":"uint256"},{"internalType":"uint256","name":"updatedAtTime","type":"uint256"}],"internalType":"struct Order.Numbers","name":"numbers","type":"tuple"},{"components":[{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"bool","name":"shouldUnwrapNativeToken","type":"bool"},{"internalType":"bool","name":"isFrozen","type":"bool"},{"internalType":"bool","name":"autoCancel","type":"bool"}],"internalType":"struct Order.Flags","name":"flags","type":"tuple"}],"internalType":"struct Order.Props[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"contract IReferralStorage","name":"referralStorage","type":"address"},{"internalType":"bytes32[]","name":"positionKeys","type":"bytes32[]"},{"components":[{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"longTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"shortTokenPrice","type":"tuple"}],"internalType":"struct MarketUtils.MarketPrices[]","name":"prices","type":"tuple[]"},{"internalType":"address","name":"uiFeeReceiver","type":"address"}],"name":"getAccountPositionInfoList","outputs":[{"components":[{"components":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"market","type":"address"},{"internalType":"address","name":"collateralToken","type":"address"}],"internalType":"struct Position.Addresses","name":"addresses","type":"tuple"},{"components":[{"internalType":"uint256","name":"sizeInUsd","type":"uint256"},{"internalType":"uint256","name":"sizeInTokens","type":"uint256"},{"internalType":"uint256","name":"collateralAmount","type":"uint256"},{"internalType":"uint256","name":"borrowingFactor","type":"uint256"},{"internalType":"uint256","name":"fundingFeeAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"longTokenClaimableFundingAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"shortTokenClaimableFundingAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"increasedAtBlock","type":"uint256"},{"internalType":"uint256","name":"decreasedAtBlock","type":"uint256"},{"internalType":"uint256","name":"increasedAtTime","type":"uint256"},{"internalType":"uint256","name":"decreasedAtTime","type":"uint256"}],"internalType":"struct Position.Numbers","name":"numbers","type":"tuple"},{"components":[{"internalType":"bool","name":"isLong","type":"bool"}],"internalType":"struct Position.Flags","name":"flags","type":"tuple"}],"internalType":"struct Position.Props","name":"position","type":"tuple"},{"components":[{"components":[{"internalType":"bytes32","name":"referralCode","type":"bytes32"},{"internalType":"address","name":"affiliate","type":"address"},{"internalType":"address","name":"trader","type":"address"},{"internalType":"uint256","name":"totalRebateFactor","type":"uint256"},{"internalType":"uint256","name":"traderDiscountFactor","type":"uint256"},{"internalType":"uint256","name":"totalRebateAmount","type":"uint256"},{"internalType":"uint256","name":"traderDiscountAmount","type":"uint256"},{"internalType":"uint256","name":"affiliateRewardAmount","type":"uint256"}],"internalType":"struct PositionPricingUtils.PositionReferralFees","name":"referral","type":"tuple"},{"components":[{"internalType":"uint256","name":"fundingFeeAmount","type":"uint256"},{"internalType":"uint256","name":"claimableLongTokenAmount","type":"uint256"},{"internalType":"uint256","name":"claimableShortTokenAmount","type":"uint256"},{"internalType":"uint256","name":"latestFundingFeeAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"latestLongTokenClaimableFundingAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"latestShortTokenClaimableFundingAmountPerSize","type":"uint256"}],"internalType":"struct PositionPricingUtils.PositionFundingFees","name":"funding","type":"tuple"},{"components":[{"internalType":"uint256","name":"borrowingFeeUsd","type":"uint256"},{"internalType":"uint256","name":"borrowingFeeAmount","type":"uint256"},{"internalType":"uint256","name":"borrowingFeeReceiverFactor","type":"uint256"},{"internalType":"uint256","name":"borrowingFeeAmountForFeeReceiver","type":"uint256"}],"internalType":"struct PositionPricingUtils.PositionBorrowingFees","name":"borrowing","type":"tuple"},{"components":[{"internalType":"address","name":"uiFeeReceiver","type":"address"},{"internalType":"uint256","name":"uiFeeReceiverFactor","type":"uint256"},{"internalType":"uint256","name":"uiFeeAmount","type":"uint256"}],"internalType":"struct PositionPricingUtils.PositionUiFees","name":"ui","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"collateralTokenPrice","type":"tuple"},{"internalType":"uint256","name":"positionFeeFactor","type":"uint256"},{"internalType":"uint256","name":"protocolFeeAmount","type":"uint256"},{"internalType":"uint256","name":"positionFeeReceiverFactor","type":"uint256"},{"internalType":"uint256","name":"feeReceiverAmount","type":"uint256"},{"internalType":"uint256","name":"feeAmountForPool","type":"uint256"},{"internalType":"uint256","name":"positionFeeAmountForPool","type":"uint256"},{"internalType":"uint256","name":"positionFeeAmount","type":"uint256"},{"internalType":"uint256","name":"totalCostAmountExcludingFunding","type":"uint256"},{"internalType":"uint256","name":"totalCostAmount","type":"uint256"}],"internalType":"struct PositionPricingUtils.PositionFees","name":"fees","type":"tuple"},{"components":[{"internalType":"int256","name":"priceImpactUsd","type":"int256"},{"internalType":"uint256","name":"priceImpactDiffUsd","type":"uint256"},{"internalType":"uint256","name":"executionPrice","type":"uint256"}],"internalType":"struct ReaderPricingUtils.ExecutionPriceResult","name":"executionPriceResult","type":"tuple"},{"internalType":"int256","name":"basePnlUsd","type":"int256"},{"internalType":"int256","name":"uncappedBasePnlUsd","type":"int256"},{"internalType":"int256","name":"pnlAfterPriceImpactUsd","type":"int256"}],"internalType":"struct ReaderUtils.PositionInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getAccountPositions","outputs":[{"components":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"market","type":"address"},{"internalType":"address","name":"collateralToken","type":"address"}],"internalType":"struct Position.Addresses","name":"addresses","type":"tuple"},{"components":[{"internalType":"uint256","name":"sizeInUsd","type":"uint256"},{"internalType":"uint256","name":"sizeInTokens","type":"uint256"},{"internalType":"uint256","name":"collateralAmount","type":"uint256"},{"internalType":"uint256","name":"borrowingFactor","type":"uint256"},{"internalType":"uint256","name":"fundingFeeAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"longTokenClaimableFundingAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"shortTokenClaimableFundingAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"increasedAtBlock","type":"uint256"},{"internalType":"uint256","name":"decreasedAtBlock","type":"uint256"},{"internalType":"uint256","name":"increasedAtTime","type":"uint256"},{"internalType":"uint256","name":"decreasedAtTime","type":"uint256"}],"internalType":"struct Position.Numbers","name":"numbers","type":"tuple"},{"components":[{"internalType":"bool","name":"isLong","type":"bool"}],"internalType":"struct Position.Flags","name":"flags","type":"tuple"}],"internalType":"struct Position.Props[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"address","name":"market","type":"address"},{"internalType":"bool","name":"isLong","type":"bool"},{"components":[{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"longTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"shortTokenPrice","type":"tuple"}],"internalType":"struct MarketUtils.MarketPrices","name":"prices","type":"tuple"}],"name":"getAdlState","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"int256","name":"","type":"int256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getDeposit","outputs":[{"components":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"callbackContract","type":"address"},{"internalType":"address","name":"uiFeeReceiver","type":"address"},{"internalType":"address","name":"market","type":"address"},{"internalType":"address","name":"initialLongToken","type":"address"},{"internalType":"address","name":"initialShortToken","type":"address"},{"internalType":"address[]","name":"longTokenSwapPath","type":"address[]"},{"internalType":"address[]","name":"shortTokenSwapPath","type":"address[]"}],"internalType":"struct Deposit.Addresses","name":"addresses","type":"tuple"},{"components":[{"internalType":"uint256","name":"initialLongTokenAmount","type":"uint256"},{"internalType":"uint256","name":"initialShortTokenAmount","type":"uint256"},{"internalType":"uint256","name":"minMarketTokens","type":"uint256"},{"internalType":"uint256","name":"updatedAtBlock","type":"uint256"},{"internalType":"uint256","name":"updatedAtTime","type":"uint256"},{"internalType":"uint256","name":"executionFee","type":"uint256"},{"internalType":"uint256","name":"callbackGasLimit","type":"uint256"}],"internalType":"struct Deposit.Numbers","name":"numbers","type":"tuple"},{"components":[{"internalType":"bool","name":"shouldUnwrapNativeToken","type":"bool"}],"internalType":"struct Deposit.Flags","name":"flags","type":"tuple"}],"internalType":"struct Deposit.Props","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"components":[{"internalType":"address","name":"marketToken","type":"address"},{"internalType":"address","name":"indexToken","type":"address"},{"internalType":"address","name":"longToken","type":"address"},{"internalType":"address","name":"shortToken","type":"address"}],"internalType":"struct Market.Props","name":"market","type":"tuple"},{"components":[{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"longTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"shortTokenPrice","type":"tuple"}],"internalType":"struct MarketUtils.MarketPrices","name":"prices","type":"tuple"},{"internalType":"uint256","name":"longTokenAmount","type":"uint256"},{"internalType":"uint256","name":"shortTokenAmount","type":"uint256"},{"internalType":"address","name":"uiFeeReceiver","type":"address"},{"internalType":"enum ISwapPricingUtils.SwapPricingType","name":"swapPricingType","type":"uint8"},{"internalType":"bool","name":"includeVirtualInventoryImpact","type":"bool"}],"name":"getDepositAmountOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"address","name":"marketKey","type":"address"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"internalType":"uint256","name":"positionSizeInUsd","type":"uint256"},{"internalType":"uint256","name":"positionSizeInTokens","type":"uint256"},{"internalType":"int256","name":"sizeDeltaUsd","type":"int256"},{"internalType":"bool","name":"isLong","type":"bool"}],"name":"getExecutionPrice","outputs":[{"components":[{"internalType":"int256","name":"priceImpactUsd","type":"int256"},{"internalType":"uint256","name":"priceImpactDiffUsd","type":"uint256"},{"internalType":"uint256","name":"executionPrice","type":"uint256"}],"internalType":"struct ReaderPricingUtils.ExecutionPriceResult","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"address","name":"key","type":"address"}],"name":"getMarket","outputs":[{"components":[{"internalType":"address","name":"marketToken","type":"address"},{"internalType":"address","name":"indexToken","type":"address"},{"internalType":"address","name":"longToken","type":"address"},{"internalType":"address","name":"shortToken","type":"address"}],"internalType":"struct Market.Props","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"getMarketBySalt","outputs":[{"components":[{"internalType":"address","name":"marketToken","type":"address"},{"internalType":"address","name":"indexToken","type":"address"},{"internalType":"address","name":"longToken","type":"address"},{"internalType":"address","name":"shortToken","type":"address"}],"internalType":"struct Market.Props","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"components":[{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"longTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"shortTokenPrice","type":"tuple"}],"internalType":"struct MarketUtils.MarketPrices","name":"prices","type":"tuple"},{"internalType":"address","name":"marketKey","type":"address"}],"name":"getMarketInfo","outputs":[{"components":[{"components":[{"internalType":"address","name":"marketToken","type":"address"},{"internalType":"address","name":"indexToken","type":"address"},{"internalType":"address","name":"longToken","type":"address"},{"internalType":"address","name":"shortToken","type":"address"}],"internalType":"struct Market.Props","name":"market","type":"tuple"},{"internalType":"uint256","name":"borrowingFactorPerSecondForLongs","type":"uint256"},{"internalType":"uint256","name":"borrowingFactorPerSecondForShorts","type":"uint256"},{"components":[{"components":[{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"long","type":"tuple"},{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"short","type":"tuple"}],"internalType":"struct MarketUtils.PositionType","name":"fundingFeeAmountPerSize","type":"tuple"},{"components":[{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"long","type":"tuple"},{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"short","type":"tuple"}],"internalType":"struct MarketUtils.PositionType","name":"claimableFundingAmountPerSize","type":"tuple"}],"internalType":"struct ReaderUtils.BaseFundingValues","name":"baseFunding","type":"tuple"},{"components":[{"internalType":"bool","name":"longsPayShorts","type":"bool"},{"internalType":"uint256","name":"fundingFactorPerSecond","type":"uint256"},{"internalType":"int256","name":"nextSavedFundingFactorPerSecond","type":"int256"},{"components":[{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"long","type":"tuple"},{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"short","type":"tuple"}],"internalType":"struct MarketUtils.PositionType","name":"fundingFeeAmountPerSizeDelta","type":"tuple"},{"components":[{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"long","type":"tuple"},{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"short","type":"tuple"}],"internalType":"struct MarketUtils.PositionType","name":"claimableFundingAmountPerSizeDelta","type":"tuple"}],"internalType":"struct MarketUtils.GetNextFundingAmountPerSizeResult","name":"nextFunding","type":"tuple"},{"components":[{"internalType":"uint256","name":"virtualPoolAmountForLongToken","type":"uint256"},{"internalType":"uint256","name":"virtualPoolAmountForShortToken","type":"uint256"},{"internalType":"int256","name":"virtualInventoryForPositions","type":"int256"}],"internalType":"struct ReaderUtils.VirtualInventory","name":"virtualInventory","type":"tuple"},{"internalType":"bool","name":"isDisabled","type":"bool"}],"internalType":"struct ReaderUtils.MarketInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"components":[{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"longTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"shortTokenPrice","type":"tuple"}],"internalType":"struct MarketUtils.MarketPrices[]","name":"marketPricesList","type":"tuple[]"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getMarketInfoList","outputs":[{"components":[{"components":[{"internalType":"address","name":"marketToken","type":"address"},{"internalType":"address","name":"indexToken","type":"address"},{"internalType":"address","name":"longToken","type":"address"},{"internalType":"address","name":"shortToken","type":"address"}],"internalType":"struct Market.Props","name":"market","type":"tuple"},{"internalType":"uint256","name":"borrowingFactorPerSecondForLongs","type":"uint256"},{"internalType":"uint256","name":"borrowingFactorPerSecondForShorts","type":"uint256"},{"components":[{"components":[{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"long","type":"tuple"},{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"short","type":"tuple"}],"internalType":"struct MarketUtils.PositionType","name":"fundingFeeAmountPerSize","type":"tuple"},{"components":[{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"long","type":"tuple"},{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"short","type":"tuple"}],"internalType":"struct MarketUtils.PositionType","name":"claimableFundingAmountPerSize","type":"tuple"}],"internalType":"struct ReaderUtils.BaseFundingValues","name":"baseFunding","type":"tuple"},{"components":[{"internalType":"bool","name":"longsPayShorts","type":"bool"},{"internalType":"uint256","name":"fundingFactorPerSecond","type":"uint256"},{"internalType":"int256","name":"nextSavedFundingFactorPerSecond","type":"int256"},{"components":[{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"long","type":"tuple"},{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"short","type":"tuple"}],"internalType":"struct MarketUtils.PositionType","name":"fundingFeeAmountPerSizeDelta","type":"tuple"},{"components":[{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"long","type":"tuple"},{"components":[{"internalType":"uint256","name":"longToken","type":"uint256"},{"internalType":"uint256","name":"shortToken","type":"uint256"}],"internalType":"struct MarketUtils.CollateralType","name":"short","type":"tuple"}],"internalType":"struct MarketUtils.PositionType","name":"claimableFundingAmountPerSizeDelta","type":"tuple"}],"internalType":"struct MarketUtils.GetNextFundingAmountPerSizeResult","name":"nextFunding","type":"tuple"},{"components":[{"internalType":"uint256","name":"virtualPoolAmountForLongToken","type":"uint256"},{"internalType":"uint256","name":"virtualPoolAmountForShortToken","type":"uint256"},{"internalType":"int256","name":"virtualInventoryForPositions","type":"int256"}],"internalType":"struct ReaderUtils.VirtualInventory","name":"virtualInventory","type":"tuple"},{"internalType":"bool","name":"isDisabled","type":"bool"}],"internalType":"struct ReaderUtils.MarketInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"components":[{"internalType":"address","name":"marketToken","type":"address"},{"internalType":"address","name":"indexToken","type":"address"},{"internalType":"address","name":"longToken","type":"address"},{"internalType":"address","name":"shortToken","type":"address"}],"internalType":"struct Market.Props","name":"market","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"longTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"shortTokenPrice","type":"tuple"},{"internalType":"bytes32","name":"pnlFactorType","type":"bytes32"},{"internalType":"bool","name":"maximize","type":"bool"}],"name":"getMarketTokenPrice","outputs":[{"internalType":"int256","name":"","type":"int256"},{"components":[{"internalType":"int256","name":"poolValue","type":"int256"},{"internalType":"int256","name":"longPnl","type":"int256"},{"internalType":"int256","name":"shortPnl","type":"int256"},{"internalType":"int256","name":"netPnl","type":"int256"},{"internalType":"uint256","name":"longTokenAmount","type":"uint256"},{"internalType":"uint256","name":"shortTokenAmount","type":"uint256"},{"internalType":"uint256","name":"longTokenUsd","type":"uint256"},{"internalType":"uint256","name":"shortTokenUsd","type":"uint256"},{"internalType":"uint256","name":"totalBorrowingFees","type":"uint256"},{"internalType":"uint256","name":"borrowingFeePoolFactor","type":"uint256"},{"internalType":"uint256","name":"impactPoolAmount","type":"uint256"}],"internalType":"struct MarketPoolValueInfo.Props","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getMarkets","outputs":[{"components":[{"internalType":"address","name":"marketToken","type":"address"},{"internalType":"address","name":"indexToken","type":"address"},{"internalType":"address","name":"longToken","type":"address"},{"internalType":"address","name":"shortToken","type":"address"}],"internalType":"struct Market.Props[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"components":[{"internalType":"address","name":"marketToken","type":"address"},{"internalType":"address","name":"indexToken","type":"address"},{"internalType":"address","name":"longToken","type":"address"},{"internalType":"address","name":"shortToken","type":"address"}],"internalType":"struct Market.Props","name":"market","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"internalType":"bool","name":"maximize","type":"bool"}],"name":"getNetPnl","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"components":[{"internalType":"address","name":"marketToken","type":"address"},{"internalType":"address","name":"indexToken","type":"address"},{"internalType":"address","name":"longToken","type":"address"},{"internalType":"address","name":"shortToken","type":"address"}],"internalType":"struct Market.Props","name":"market","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"bool","name":"maximize","type":"bool"}],"name":"getOpenInterestWithPnl","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getOrder","outputs":[{"components":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"cancellationReceiver","type":"address"},{"internalType":"address","name":"callbackContract","type":"address"},{"internalType":"address","name":"uiFeeReceiver","type":"address"},{"internalType":"address","name":"market","type":"address"},{"internalType":"address","name":"initialCollateralToken","type":"address"},{"internalType":"address[]","name":"swapPath","type":"address[]"}],"internalType":"struct Order.Addresses","name":"addresses","type":"tuple"},{"components":[{"internalType":"enum Order.OrderType","name":"orderType","type":"uint8"},{"internalType":"enum Order.DecreasePositionSwapType","name":"decreasePositionSwapType","type":"uint8"},{"internalType":"uint256","name":"sizeDeltaUsd","type":"uint256"},{"internalType":"uint256","name":"initialCollateralDeltaAmount","type":"uint256"},{"internalType":"uint256","name":"triggerPrice","type":"uint256"},{"internalType":"uint256","name":"acceptablePrice","type":"uint256"},{"internalType":"uint256","name":"executionFee","type":"uint256"},{"internalType":"uint256","name":"callbackGasLimit","type":"uint256"},{"internalType":"uint256","name":"minOutputAmount","type":"uint256"},{"internalType":"uint256","name":"updatedAtBlock","type":"uint256"},{"internalType":"uint256","name":"updatedAtTime","type":"uint256"}],"internalType":"struct Order.Numbers","name":"numbers","type":"tuple"},{"components":[{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"bool","name":"shouldUnwrapNativeToken","type":"bool"},{"internalType":"bool","name":"isFrozen","type":"bool"},{"internalType":"bool","name":"autoCancel","type":"bool"}],"internalType":"struct Order.Flags","name":"flags","type":"tuple"}],"internalType":"struct Order.Props","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"components":[{"internalType":"address","name":"marketToken","type":"address"},{"internalType":"address","name":"indexToken","type":"address"},{"internalType":"address","name":"longToken","type":"address"},{"internalType":"address","name":"shortToken","type":"address"}],"internalType":"struct Market.Props","name":"market","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"bool","name":"maximize","type":"bool"}],"name":"getPnl","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"address","name":"marketAddress","type":"address"},{"components":[{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"longTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"shortTokenPrice","type":"tuple"}],"internalType":"struct MarketUtils.MarketPrices","name":"prices","type":"tuple"},{"internalType":"bool","name":"isLong","type":"bool"},{"internalType":"bool","name":"maximize","type":"bool"}],"name":"getPnlToPoolFactor","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getPosition","outputs":[{"components":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"market","type":"address"},{"internalType":"address","name":"collateralToken","type":"address"}],"internalType":"struct Position.Addresses","name":"addresses","type":"tuple"},{"components":[{"internalType":"uint256","name":"sizeInUsd","type":"uint256"},{"internalType":"uint256","name":"sizeInTokens","type":"uint256"},{"internalType":"uint256","name":"collateralAmount","type":"uint256"},{"internalType":"uint256","name":"borrowingFactor","type":"uint256"},{"internalType":"uint256","name":"fundingFeeAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"longTokenClaimableFundingAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"shortTokenClaimableFundingAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"increasedAtBlock","type":"uint256"},{"internalType":"uint256","name":"decreasedAtBlock","type":"uint256"},{"internalType":"uint256","name":"increasedAtTime","type":"uint256"},{"internalType":"uint256","name":"decreasedAtTime","type":"uint256"}],"internalType":"struct Position.Numbers","name":"numbers","type":"tuple"},{"components":[{"internalType":"bool","name":"isLong","type":"bool"}],"internalType":"struct Position.Flags","name":"flags","type":"tuple"}],"internalType":"struct Position.Props","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"contract IReferralStorage","name":"referralStorage","type":"address"},{"internalType":"bytes32","name":"positionKey","type":"bytes32"},{"components":[{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"longTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"shortTokenPrice","type":"tuple"}],"internalType":"struct MarketUtils.MarketPrices","name":"prices","type":"tuple"},{"internalType":"uint256","name":"sizeDeltaUsd","type":"uint256"},{"internalType":"address","name":"uiFeeReceiver","type":"address"},{"internalType":"bool","name":"usePositionSizeAsSizeDeltaUsd","type":"bool"}],"name":"getPositionInfo","outputs":[{"components":[{"components":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"market","type":"address"},{"internalType":"address","name":"collateralToken","type":"address"}],"internalType":"struct Position.Addresses","name":"addresses","type":"tuple"},{"components":[{"internalType":"uint256","name":"sizeInUsd","type":"uint256"},{"internalType":"uint256","name":"sizeInTokens","type":"uint256"},{"internalType":"uint256","name":"collateralAmount","type":"uint256"},{"internalType":"uint256","name":"borrowingFactor","type":"uint256"},{"internalType":"uint256","name":"fundingFeeAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"longTokenClaimableFundingAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"shortTokenClaimableFundingAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"increasedAtBlock","type":"uint256"},{"internalType":"uint256","name":"decreasedAtBlock","type":"uint256"},{"internalType":"uint256","name":"increasedAtTime","type":"uint256"},{"internalType":"uint256","name":"decreasedAtTime","type":"uint256"}],"internalType":"struct Position.Numbers","name":"numbers","type":"tuple"},{"components":[{"internalType":"bool","name":"isLong","type":"bool"}],"internalType":"struct Position.Flags","name":"flags","type":"tuple"}],"internalType":"struct Position.Props","name":"position","type":"tuple"},{"components":[{"components":[{"internalType":"bytes32","name":"referralCode","type":"bytes32"},{"internalType":"address","name":"affiliate","type":"address"},{"internalType":"address","name":"trader","type":"address"},{"internalType":"uint256","name":"totalRebateFactor","type":"uint256"},{"internalType":"uint256","name":"traderDiscountFactor","type":"uint256"},{"internalType":"uint256","name":"totalRebateAmount","type":"uint256"},{"internalType":"uint256","name":"traderDiscountAmount","type":"uint256"},{"internalType":"uint256","name":"affiliateRewardAmount","type":"uint256"}],"internalType":"struct PositionPricingUtils.PositionReferralFees","name":"referral","type":"tuple"},{"components":[{"internalType":"uint256","name":"fundingFeeAmount","type":"uint256"},{"internalType":"uint256","name":"claimableLongTokenAmount","type":"uint256"},{"internalType":"uint256","name":"claimableShortTokenAmount","type":"uint256"},{"internalType":"uint256","name":"latestFundingFeeAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"latestLongTokenClaimableFundingAmountPerSize","type":"uint256"},{"internalType":"uint256","name":"latestShortTokenClaimableFundingAmountPerSize","type":"uint256"}],"internalType":"struct PositionPricingUtils.PositionFundingFees","name":"funding","type":"tuple"},{"components":[{"internalType":"uint256","name":"borrowingFeeUsd","type":"uint256"},{"internalType":"uint256","name":"borrowingFeeAmount","type":"uint256"},{"internalType":"uint256","name":"borrowingFeeReceiverFactor","type":"uint256"},{"internalType":"uint256","name":"borrowingFeeAmountForFeeReceiver","type":"uint256"}],"internalType":"struct PositionPricingUtils.PositionBorrowingFees","name":"borrowing","type":"tuple"},{"components":[{"internalType":"address","name":"uiFeeReceiver","type":"address"},{"internalType":"uint256","name":"uiFeeReceiverFactor","type":"uint256"},{"internalType":"uint256","name":"uiFeeAmount","type":"uint256"}],"internalType":"struct PositionPricingUtils.PositionUiFees","name":"ui","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"collateralTokenPrice","type":"tuple"},{"internalType":"uint256","name":"positionFeeFactor","type":"uint256"},{"internalType":"uint256","name":"protocolFeeAmount","type":"uint256"},{"internalType":"uint256","name":"positionFeeReceiverFactor","type":"uint256"},{"internalType":"uint256","name":"feeReceiverAmount","type":"uint256"},{"internalType":"uint256","name":"feeAmountForPool","type":"uint256"},{"internalType":"uint256","name":"positionFeeAmountForPool","type":"uint256"},{"internalType":"uint256","name":"positionFeeAmount","type":"uint256"},{"internalType":"uint256","name":"totalCostAmountExcludingFunding","type":"uint256"},{"internalType":"uint256","name":"totalCostAmount","type":"uint256"}],"internalType":"struct PositionPricingUtils.PositionFees","name":"fees","type":"tuple"},{"components":[{"internalType":"int256","name":"priceImpactUsd","type":"int256"},{"internalType":"uint256","name":"priceImpactDiffUsd","type":"uint256"},{"internalType":"uint256","name":"executionPrice","type":"uint256"}],"internalType":"struct ReaderPricingUtils.ExecutionPriceResult","name":"executionPriceResult","type":"tuple"},{"internalType":"int256","name":"basePnlUsd","type":"int256"},{"internalType":"int256","name":"uncappedBasePnlUsd","type":"int256"},{"internalType":"int256","name":"pnlAfterPriceImpactUsd","type":"int256"}],"internalType":"struct ReaderUtils.PositionInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"components":[{"internalType":"address","name":"marketToken","type":"address"},{"internalType":"address","name":"indexToken","type":"address"},{"internalType":"address","name":"longToken","type":"address"},{"internalType":"address","name":"shortToken","type":"address"}],"internalType":"struct Market.Props","name":"market","type":"tuple"},{"components":[{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"longTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"shortTokenPrice","type":"tuple"}],"internalType":"struct MarketUtils.MarketPrices","name":"prices","type":"tuple"},{"internalType":"bytes32","name":"positionKey","type":"bytes32"},{"internalType":"uint256","name":"sizeDeltaUsd","type":"uint256"}],"name":"getPositionPnlUsd","outputs":[{"internalType":"int256","name":"","type":"int256"},{"internalType":"int256","name":"","type":"int256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getShift","outputs":[{"components":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"callbackContract","type":"address"},{"internalType":"address","name":"uiFeeReceiver","type":"address"},{"internalType":"address","name":"fromMarket","type":"address"},{"internalType":"address","name":"toMarket","type":"address"}],"internalType":"struct Shift.Addresses","name":"addresses","type":"tuple"},{"components":[{"internalType":"uint256","name":"marketTokenAmount","type":"uint256"},{"internalType":"uint256","name":"minMarketTokens","type":"uint256"},{"internalType":"uint256","name":"updatedAtTime","type":"uint256"},{"internalType":"uint256","name":"executionFee","type":"uint256"},{"internalType":"uint256","name":"callbackGasLimit","type":"uint256"}],"internalType":"struct Shift.Numbers","name":"numbers","type":"tuple"}],"internalType":"struct Shift.Props","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"components":[{"internalType":"address","name":"marketToken","type":"address"},{"internalType":"address","name":"indexToken","type":"address"},{"internalType":"address","name":"longToken","type":"address"},{"internalType":"address","name":"shortToken","type":"address"}],"internalType":"struct Market.Props","name":"market","type":"tuple"},{"components":[{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"longTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"shortTokenPrice","type":"tuple"}],"internalType":"struct MarketUtils.MarketPrices","name":"prices","type":"tuple"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"uiFeeReceiver","type":"address"}],"name":"getSwapAmountOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"int256","name":"","type":"int256"},{"components":[{"internalType":"uint256","name":"feeReceiverAmount","type":"uint256"},{"internalType":"uint256","name":"feeAmountForPool","type":"uint256"},{"internalType":"uint256","name":"amountAfterFees","type":"uint256"},{"internalType":"address","name":"uiFeeReceiver","type":"address"},{"internalType":"uint256","name":"uiFeeReceiverFactor","type":"uint256"},{"internalType":"uint256","name":"uiFeeAmount","type":"uint256"}],"internalType":"struct SwapPricingUtils.SwapFees","name":"fees","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"address","name":"marketKey","type":"address"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"tokenInPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"tokenOutPrice","type":"tuple"}],"name":"getSwapPriceImpact","outputs":[{"internalType":"int256","name":"","type":"int256"},{"internalType":"int256","name":"","type":"int256"},{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getWithdrawal","outputs":[{"components":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"callbackContract","type":"address"},{"internalType":"address","name":"uiFeeReceiver","type":"address"},{"internalType":"address","name":"market","type":"address"},{"internalType":"address[]","name":"longTokenSwapPath","type":"address[]"},{"internalType":"address[]","name":"shortTokenSwapPath","type":"address[]"}],"internalType":"struct Withdrawal.Addresses","name":"addresses","type":"tuple"},{"components":[{"internalType":"uint256","name":"marketTokenAmount","type":"uint256"},{"internalType":"uint256","name":"minLongTokenAmount","type":"uint256"},{"internalType":"uint256","name":"minShortTokenAmount","type":"uint256"},{"internalType":"uint256","name":"updatedAtBlock","type":"uint256"},{"internalType":"uint256","name":"updatedAtTime","type":"uint256"},{"internalType":"uint256","name":"executionFee","type":"uint256"},{"internalType":"uint256","name":"callbackGasLimit","type":"uint256"}],"internalType":"struct Withdrawal.Numbers","name":"numbers","type":"tuple"},{"components":[{"internalType":"bool","name":"shouldUnwrapNativeToken","type":"bool"}],"internalType":"struct Withdrawal.Flags","name":"flags","type":"tuple"}],"internalType":"struct Withdrawal.Props","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract DataStore","name":"dataStore","type":"address"},{"components":[{"internalType":"address","name":"marketToken","type":"address"},{"internalType":"address","name":"indexToken","type":"address"},{"internalType":"address","name":"longToken","type":"address"},{"internalType":"address","name":"shortToken","type":"address"}],"internalType":"struct Market.Props","name":"market","type":"tuple"},{"components":[{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"indexTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"longTokenPrice","type":"tuple"},{"components":[{"internalType":"uint256","name":"min","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"internalType":"struct Price.Props","name":"shortTokenPrice","type":"tuple"}],"internalType":"struct MarketUtils.MarketPrices","name":"prices","type":"tuple"},{"internalType":"uint256","name":"marketTokenAmount","type":"uint256"},{"internalType":"address","name":"uiFeeReceiver","type":"address"},{"internalType":"enum ISwapPricingUtils.SwapPricingType","name":"swapPricingType","type":"uint8"}],"name":"getWithdrawalAmountOut","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}] \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Contracts/Reader.bin b/src/Managing.ABI.GmxV2/Contracts/Reader.bin new file mode 100644 index 0000000..7fd6b2c --- /dev/null +++ b/src/Managing.ABI.GmxV2/Contracts/Reader.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b5061541f806100206000396000f3fe608060405234801561001057600080fd5b506004361061013e5760003560e01c80630815bce114610143578063095ce6c51461016c5780630fa8f516146102155780631485d2971461023557806324c029e0146102555780632572d8f9146102765780632b17b4fd1461029e578063409f37c7146102d157806342a6f8d31461034357806349651b6a146103635780635d2b44f9146103835780635d5c6efe146103a35780635deceb84146103c5578063714af34b146103d857806377cfb162146103f8578063847bb46914610418578063971de27d14610438578063a01409381461044b578063a4f0d5501461045e578063addac2e014610471578063b4976dae14610510578063bc7b5bba14610523578063ce3264bf14610543578063ceeea3bf14610563578063ece9e0c814610583578063fd50649d146105a3575b600080fd5b610156610151366004612d22565b6105b6565b604051610163919061305a565b60405180910390f35b61017f61017a3660046130d1565b61064f565b60405161016392919060006101808201905083825282516020830152602083015160408301526040830151606083015260608301516080830152608083015160a083015260a083015160c083015260c083015160e083015260e083015161010081818501528085015191505061012081818501528085015191505061014081818501528085015161016085015250509392505050565b61022861022336600461314e565b610743565b604051610163919061317a565b61024861024336600461314e565b6107cf565b60405161016391906131cd565b61026861026336600461330d565b610855565b604051908152602001610163565b61028961028436600461338b565b610870565b60408051928352602083019190915201610163565b6102b16102ac366004613406565b610903565b604080519485529215156020850152918301526060820152608001610163565b6102e46102df366004613462565b61099e565b604080519384526020808501939093528151848201529181015160608085019190915291810151608080850191909152918101516001600160a01b031660a0808501919091529181015160c0840152015160e082015261010001610163565b6103566103513660046134cf565b610a78565b60405161016391906136dc565b61037661037136600461314e565b610bc5565b604051610163919061373e565b610396610391366004613751565b610c4b565b60405161016391906137bc565b6103b66103b13660046137ca565b610d64565b60405161016393929190613854565b6102686103d336600461386a565b610e7f565b6103eb6103e6366004613904565b610f08565b6040516101639190613970565b61040b6104063660046134cf565b610f8a565b604051610163919061397e565b61042b6104263660046139cd565b6110c9565b6040516101639190613aea565b610268610446366004613af9565b611158565b61026861045936600461330d565b6111ef565b6103eb61046c36600461314e565b6111fe565b61048461047f36600461314e565b61123f565b60408051825180516001600160a01b0390811683526020808301518216818501528285015182168486015260608084015183168186015260808085015184168187015260a0948501519093169385019390935294850151805160c08501529485015160e08401529284015161010083015283015161012082015291015161014082015261016001610163565b6103b661051e366004613b5e565b6112c2565b610536610531366004613c52565b6113d8565b6040516101639190613cb1565b610556610551366004613cf4565b6114c5565b6040516101639190613d29565b61057661057136600461314e565b611612565b6040516101639190613d6b565b610596610591366004613e0c565b611698565b6040516101639190613efc565b6102686105b1366004613f3f565b611776565b6105be612568565b6040516306bc109960e31b815273e14f1a0387a76c6427f22945246acd40e3f59ae0906335e084c890610601908b908b908b908b908b908b908b90600401613fca565b6106a060405180830381865af415801561061f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610643919061435f565b98975050505050505050565b60006106ae60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051637d494dc360e01b81527370cb5b3a4f10a25a9b522576bbbe7b9db58d264690637d494dc3906106f1908c908c908c908c908c908c908c906004016144ad565b61018060405180830381865af415801561070f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610733919061450f565b9150915097509795505050505050565b61074b6125b0565b60405163fdfc26f360e01b8152732da2ed5c3dcd92f7797339e2cb7ae30a6dd145329063fdfc26f39061078490869086906004016145c3565b6101e060405180830381865af41580156107a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c691906145dc565b90505b92915050565b6107d7612654565b60405163fdfc26f360e01b8152733063a99d2df2a871068d47041eb8d089e5de1cdc9063fdfc26f39061081090869086906004016145c3565b600060405180830381865af415801561082d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107c691908101906146bf565b60006108648686868686611784565b90505b95945050505050565b60008073fe1531c3b27e9e882881d9917b9cae9f2082c6df63b027d32d8989898989896040518763ffffffff1660e01b81526004016108b49695949392919061481e565b6040805180830381865af41580156108d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f49190614876565b91509150965096945050505050565b6000806000806000610916898989611815565b905060006109248a8a61188f565b905060008060006109878d858c8e60405160200161096c9060208082526016908201527513505617d4139317d19050d513d497d193d497d0511360521b604082015260600190565b60405160208183030381529060405280519060200120611920565b969f919e509c50949a509398505050505050505050565b6000806109e36040518060c0016040528060008152602001600081526020016000815260200160006001600160a01b0316815260200160008152602001600081525090565b60405163dafa66bf60e01b8152738c75f9905a9fd94a0d95cb0801d7de33a432667c9063dafa66bf90610a24908c908c908c908c908c908c9060040161489a565b61010060405180830381865af4158015610a42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6691906148ec565b92509250925096509650969350505050565b60606000610a8886868686611974565b9050600081516001600160401b03811115610aa557610aa5612ade565b604051908082528060200260200182016040528015610ade57816020015b610acb6126ed565b815260200190600190039081610ac35790505b50905060005b8251811015610bba576000838281518110610b0157610b01614974565b602002602001015190507367040c411c1b3195361801e9ad8a91d1fe9c0bc263fdfc26f38a836040518363ffffffff1660e01b8152600401610b449291906145c3565b600060405180830381865af4158015610b61573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b899190810190614aa0565b838381518110610b9b57610b9b614974565b6020026020010181905250508080610bb290614bec565b915050610ae4565b509695505050505050565b610bcd6126ed565b60405163fdfc26f360e01b81527367040c411c1b3195361801e9ad8a91d1fe9c0bc29063fdfc26f390610c0690869086906004016145c3565b600060405180830381865af4158015610c23573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107c69190810190614aa0565b610c5361276e565b60405163a8d8fff560e01b815260009073bbf05cf8e1c6548092a6a02c4c5330e76bf0fe2d9063a8d8fff590610c8f908c908c90600401614c05565b608060405180830381865af4158015610cac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd09190614c7c565b604051630a37d4c760e11b8152909150738c75f9905a9fd94a0d95cb0801d7de33a432667c9063146fa98e90610d16908c9085908c908c908c908c908c90600401614c98565b606060405180830381865af4158015610d33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d579190614cec565b9998505050505050505050565b60008060008073bbf05cf8e1c6548092a6a02c4c5330e76bf0fe2d63a8d8fff58c8c6040518363ffffffff1660e01b8152600401610da3929190614c05565b608060405180830381865af4158015610dc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de49190614c7c565b6040516340f5d44f60e11b8152909150738c75f9905a9fd94a0d95cb0801d7de33a432667c906381eba89e90610e2a908e9085908e908e908e908e908e90600401614d08565b606060405180830381865af4158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6b9190614d5a565b935093509350509750975097945050505050565b604051632bf0549960e11b81526000907385fcd569577a0bb52abf9d9e691f69d94dd61af8906357e0a93290610ec7908c908c908c908c908c908c908c908c90600401614d88565b602060405180830381865af4158015610ee4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d579190614df3565b610f1061278f565b60405163a8d8fff560e01b815273bbf05cf8e1c6548092a6a02c4c5330e76bf0fe2d9063a8d8fff590610f499086908690600401614c05565b608060405180830381865af4158015610f66573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c69190614c7c565b60606000610f9a868686866119f3565b9050600081516001600160401b03811115610fb757610fb7612ade565b604051908082528060200260200182016040528015610ff057816020015b610fdd6125b0565b815260200190600190039081610fd55790505b50905060005b8251811015610bba57600083828151811061101357611013614974565b60200260200101519050732da2ed5c3dcd92f7797339e2cb7ae30a6dd1453263fdfc26f38a836040518363ffffffff1660e01b81526004016110569291906145c3565b6101e060405180830381865af4158015611074573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109891906145dc565b8383815181106110aa576110aa614974565b60200260200101819052505080806110c190614bec565b915050610ff6565b6110d16127b6565b60405163619c4ddb60e01b815273e14f1a0387a76c6427f22945246acd40e3f59ae09063619c4ddb9061110c90879087908790600401614e0c565b6103a060405180830381865af415801561112a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114e9190614ee7565b90505b9392505050565b60008073bbf05cf8e1c6548092a6a02c4c5330e76bf0fe2d63a8d8fff588886040518363ffffffff1660e01b8152600401611194929190614c05565b608060405180830381865af41580156111b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d59190614c7c565b90506111e48782878787611a0d565b979650505050505050565b60006108648686868686611a51565b61120661278f565b6040516329bc01e160e11b815273bbf05cf8e1c6548092a6a02c4c5330e76bf0fe2d9063537803c290610f4990869086906004016145c3565b611247612827565b60405163fdfc26f360e01b815273cfad9cb2a681b63884aef98af28458692137c9e39063fdfc26f39061128090869086906004016145c3565b61016060405180830381865af415801561129e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c69190614ff6565b600080600080732da2ed5c3dcd92f7797339e2cb7ae30a6dd1453263fdfc26f38a886040518363ffffffff1660e01b81526004016113019291906145c3565b6101e060405180830381865af415801561131f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134391906145dc565b60405163e22de79360e01b8152909150734fb37ea32d371fa653d644bdd1e818be5c8fa9ff9063e22de79390611385908c908c908c9087908c906004016150b3565b606060405180830381865af41580156113a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c69190614d5a565b93509350935050955095509592505050565b606060006113e7868585611a7c565b9050600081516001600160401b0381111561140457611404612ade565b60405190808252806020026020018201604052801561143d57816020015b61142a6127b6565b8152602001906001900390816114225790505b50905060005b8251811015610bba57600087828151811061146057611460614974565b60200260200101519050600084838151811061147e5761147e614974565b602002602001015190506114938a83836110c9565b8484815181106114a5576114a5614974565b6020026020010181905250505080806114bd90614bec565b915050611443565b606060006114d4858585611a7c565b9050600081516001600160401b038111156114f1576114f1612ade565b60405190808252806020026020018201604052801561152a57816020015b61151761278f565b81526020019060019003908161150f5790505b50905060005b825181101561160857600083828151811061154d5761154d614974565b60200260200101519050600073bbf05cf8e1c6548092a6a02c4c5330e76bf0fe2d63a8d8fff58a846040518363ffffffff1660e01b8152600401611592929190614c05565b608060405180830381865af41580156115af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d39190614c7c565b9050808484815181106115e8576115e8614974565b60200260200101819052505050808061160090614bec565b915050611530565b5095945050505050565b61161a612898565b60405163fdfc26f360e01b815273d521cb31b14bb9f70d9a59b47d8763336cad03959063fdfc26f39061165390869086906004016145c3565b600060405180830381865af4158015611670573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107c6919081019061511d565b6060600084516001600160401b038111156116b5576116b5612ade565b6040519080825280602002602001820160405280156116ee57816020015b6116db612568565b8152602001906001900390816116d35790505b50905060005b8551811015610bba57600086828151811061171157611711614974565b6020026020010151905061174589898389868151811061173357611733614974565b602002602001015160008a60016105b6565b83838151811061175757611757614974565b602002602001018190525050808061176e90614bec565b9150506116f4565b600061086785858585611b37565b60008061179a611795888887611b66565b611bb9565b905060006117a9888887611c2c565b90508115806117b6575080155b156117c657600092505050610867565b60006117d3878787611c73565b905060006117e46117958385615246565b90506000876117fc576117f7828661525d565b611806565b611806858361525d565b9b9a5050505050505050505050565b6000836001600160a01b031663bd02d0f56118308585611cac565b6040518263ffffffff1660e01b815260040161184e91815260200190565b602060405180830381865afa15801561186b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114e9190614df3565b61189761278f565b60405163a8d8fff560e01b815260009073bbf05cf8e1c6548092a6a02c4c5330e76bf0fe2d9063a8d8fff5906118d39087908790600401614c05565b608060405180830381865af41580156118f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119149190614c7c565b90506107c68482611d33565b600080600080611934898989896001611a0d565b905060006119488a878b600001518a611e0c565b90506000808313801561196257508161196084611e87565b115b9b929a50909850909650505050505050565b6060846001600160a01b031663f069052a61198e86611ed9565b85856040518463ffffffff1660e01b81526004016119ae93929190613854565b600060405180830381865afa1580156119cb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108679190810190615284565b6060846001600160a01b031663f069052a61198e86611f5b565b600080611a1e878787878715611f96565b905080600003611a32576000915050610867565b6000611a45888888600001518888611784565b9050610643818361200f565b600080611a5f878786611b66565b90506000611a708888888888611784565b90506106438282612056565b6060836001600160a01b031663e7e4148e604051602001611abc906020808252600b908201526a13505492d15517d31254d560aa1b604082015260600190565b6040516020818303038152906040528051906020012085856040518463ffffffff1660e01b8152600401611af293929190613854565b600060405180830381865afa158015611b0f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261114e9190810190615309565b600080611b48868686600187611784565b90506000611b5a878787600088611784565b90506111e4818361533d565b600080611b7b8460400151856060015161206c565b90506000611b948686600001518760400151878661209b565b90506000611bad8787600001518860600151888761209b565b90506111e48183615365565b60006001600160ff1b03821115611c285760405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e2061604482015267371034b73a191a9b60c11b60648201526084015b60405180910390fd5b5090565b600080611c418460400151856060015161206c565b90506000611c5a86866000015187604001518786612121565b90506000611bad87876000015188606001518887612121565b60008215611c945781611c87578351611c8d565b83602001515b9050611151565b81611ca357836020015161114e565b50509051919050565b6000604051602001611cdf906020808252600d908201526c1310551154d517d0511317d055609a1b604082015260600190565b60408051601f198184030181528282528051602091820120908301526001600160a01b0385169082015282151560608201526080015b60405160208183030381529060405280519060200120905092915050565b80516001600160a01b0316611d5b576040516302fde0d760e11b815260040160405180910390fd5b6000826001600160a01b0316637ae1cfca611d79846000015161213e565b6040518263ffffffff1660e01b8152600401611d9791815260200190565b602060405180830381865afa158015611db4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd89190615378565b90508015611e075781516040516309f8c93760e01b81526001600160a01b039091166004820152602401611c1f565b505050565b6000846001600160a01b031663bd02d0f5611e28868686612176565b6040518263ffffffff1660e01b8152600401611e4691815260200190565b602060405180830381865afa158015611e63573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108679190614df3565b600080821215611c285760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401611c1f565b6000604051602001611f11906020808252601290820152711050d0d3d5539517d3d491115497d31254d560721b604082015260600190565b60408051601f198184030181528282528051602091820120908301526001600160a01b03841690820152606001604051602081830303815290604052805190602001209050919050565b6000604051602001611f11906020808252601590820152741050d0d3d5539517d413d4d2551253d397d31254d5605a1b604082015260600190565b60008083611fa8578560600151611fae565b85604001515b90506000611fbd888884612205565b905060008415611feb5785611fda57866040015160200151611fe4565b8660200151602001515b9050612005565b85611ffb57604087015151612002565b6020870151515b90505b610d578183615246565b60008061202461201e856122a3565b846122b4565b9050600084136120455761203781611bb9565b61204090615395565b61204e565b61204e81611bb9565b949350505050565b60008161206284611bb9565b6107c6919061533d565b6000816001600160a01b0316836001600160a01b03161461208e576001612091565b60025b60ff169392505050565b600081866001600160a01b031663bd02d0f56120b88888886122c2565b6040518263ffffffff1660e01b81526004016120d691815260200190565b602060405180830381865afa1580156120f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121179190614df3565b61086491906153c7565b600081866001600160a01b031663bd02d0f56120b888888861233a565b6000604051602001611f11906020808252601290820152711254d7d3505492d15517d11254d05093115160721b604082015260600190565b60006040516020016121aa906020808252600e908201526d26a0ac2fa827262fa320a1aa27a960911b604082015260600190565b60408051601f1981840301815282825280516020918201209083015281018590526001600160a01b0384166060820152821515608082015260a0015b6040516020818303038152906040528051906020012090509392505050565b60008061221a8460400151856060015161206c565b905080856001600160a01b031663bd02d0f561223a876000015187612377565b6040518263ffffffff1660e01b815260040161225891815260200190565b602060405180830381865afa158015612275573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122999190614df3565b61086791906153c7565b600080821215611c28575060000390565b60006107c6838360006123e5565b60006040516020016122f5906020808252600d908201526c13d4115397d2539511549154d5609a1b604082015260600190565b60408051601f198184030181528282528051602091820120908301526001600160a01b038087169183019190915284166060820152821515608082015260a0016121e6565b60006040516020016122f5906020808252601790820152764f50454e5f494e5445524553545f494e5f544f4b454e5360481b604082015260600190565b60006040516020016123a8906020808252600b908201526a1413d3d317d05353d5539560aa1b604082015260600190565b60408051601f198184030181528282528051602091820120908301526001600160a01b038086169183019190915283166060820152608001611d15565b6000836000036123f757506000611151565b811561241657611c8d8468327cb2734119d3b7a9601e1b85600161242d565b61114e8468327cb2734119d3b7a9601e1b8561247e565b60008061243b86868661247e565b9050600183600281111561245157612451613515565b14801561246e575060008480612469576124696153b1565b868809115b1561086757610864600182615365565b60008080600019858709858702925082811083820303915050806000036124b8578382816124ae576124ae6153b1565b0492505050611151565b8084116124ff5760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b6044820152606401611c1f565b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b6040518060c0016040528061257b6125b0565b81526020016125886128e0565b815260200161259561276e565b81526020016000815260200160008152602001600081525090565b6040805160c081019091526000606082018181526080830182905260a08301919091528190815260200161263760405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b81526040805160208181019092526000815291015290565b905290565b604080516101808101909152600060608083018281526080840183905260a0840183905260c0840183905260e084018390526101008401839052610120840192909252610140830181905261016083015281905b81526020016126376040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516101608101909152600060608083018281526080840183905260a0840183905260c0840183905260e084018390526101008401839052610120840192909252610140830152815260208101612744612a26565b81526040805160808101825260008082526020828101829052928201819052606082015291015290565b60405180606001604052806000815260200160008152602001600081525090565b60408051608081018252600080825260208201819052918101829052606081019190915290565b6040518060e001604052806127c961278f565b815260200160008152602001600081526020016127e4612a41565b81526020016127f1612a61565b815260200161281a60405180606001604052806000815260200160008152602001600081525090565b8152600060209091015290565b60408051610100810182526000918101828152606082018390526080820183905260a0820183905260c0820183905260e0820192909252908190815260200161264f6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b604080516101408101909152600060608083018281526080840183905260a0840183905260c0840183905260e0840192909252610100830181905261012083015281906126a8565b604080516102c0810190915260006101c082018181526101e08301829052610200830182905261022083018290526102408301829052610260830182905261028083018290526102a08301919091528190815260200161296f6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b815260200161299f6040518060800160405280600081526020016000815260200160008152602001600081525090565b815260408051606081018252600080825260208281018290529282015291019081526020016129e1604051806040016040528060008152602001600081525090565b81526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516101608101909152806000815260200160006129e1565b6040518060400160405280612a54612a87565b815260200161264f612a87565b6040518060a001604052806000151581526020016000815260200160008152602001612a545b6040805160808101825260009181018281526060820192909252908190815260200161264f604051806040016040528060008152602001600081525090565b6001600160a01b0381168114612adb57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715612b1657612b16612ade565b60405290565b604051606081016001600160401b0381118282101715612b1657612b16612ade565b604051608081016001600160401b0381118282101715612b1657612b16612ade565b60405161016081016001600160401b0381118282101715612b1657612b16612ade565b60405161010081016001600160401b0381118282101715612b1657612b16612ade565b60405160c081016001600160401b0381118282101715612b1657612b16612ade565b6040516101c081016001600160401b0381118282101715612b1657612b16612ade565b60405160e081016001600160401b0381118282101715612b1657612b16612ade565b60405161012081016001600160401b0381118282101715612b1657612b16612ade565b60405160a081016001600160401b0381118282101715612b1657612b16612ade565b604051601f8201601f191681016001600160401b0381118282101715612c7a57612c7a612ade565b604052919050565b600060408284031215612c9457600080fd5b612c9c612af4565b9050813581526020820135602082015292915050565b600060c08284031215612cc457600080fd5b612ccc612b1c565b9050612cd88383612c82565b8152612ce78360408401612c82565b6020820152612cf98360808401612c82565b604082015292915050565b8035612d0f81612ac6565b919050565b8015158114612adb57600080fd5b6000806000806000806000610180888a031215612d3e57600080fd5b8735612d4981612ac6565b96506020880135612d5981612ac6565b955060408801359450612d6f8960608a01612cb2565b93506101208801359250610140880135612d8881612ac6565b9150610160880135612d9981612d14565b8091505092959891949750929550565b6001600160a01b03169052565b80516001600160a01b03908116835260208083015182169084015260409182015116910152565b805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c083015260e081015160e08301526101008082015181840152506101208082015181840152506101408082015181840152505050565b612e5a828251612db6565b6020810151612e6c6060840182612ddd565b50604001515115156101c09190910152565b80518252602090810151910152565b8051825260208082015190830152604090810151910152565b612eb1828251612e4f565b602081810151805180516101e0860152808301516001600160a01b0390811661020087015260408083015182166102208801526060808401516102408901526080808501516102608a015260a0808601516102808b015260c08601516102a08b015260e0909501516102c08a01528587015180516102e08b0152808801516103008b0152808401516103208b0152808301516103408b0152808201516103608b0152909401516103808901528185015180516103a08a0152808701516103c08a0152808301516103e08a01528101516104008901528401518051909216610420880152938101516104408701529092015161046085015290810151612fba610480850182612e7e565b5060a08101516104c084015260c08101516104e084015260e08101516105008401526101008101516105208401526101208101516105408401526101408101516105608401526101608101516105808401526101808101516105a08401526101a001516105c083015260408101516130366105e0840182612e8d565b506060810151610640830152608081015161066083015260a0015161068090910152565b6106a081016107c98284612ea6565b60006080828403121561307b57600080fd5b613083612b3e565b9050813561309081612ac6565b815260208201356130a081612ac6565b602082015260408201356130b381612ac6565b604082015260608201356130c681612ac6565b606082015292915050565b60008060008060008060006101a0888a0312156130ed57600080fd5b87356130f881612ac6565b96506131078960208a01613069565b95506131168960a08a01612c82565b94506131258960e08a01612c82565b9350613135896101208a01612c82565b92506101608801359150610180880135612d9981612d14565b6000806040838503121561316157600080fd5b823561316c81612ac6565b946020939093013593505050565b6101e081016107c98284612e4f565b600081518084526020808501945080840160005b838110156131c25781516001600160a01b03168752958201959082019060010161319d565b509495945050505050565b60208152600082516101208060208501526131ed61014085018351612da9565b6020820151613200610160860182612da9565b506040820151613214610180860182612da9565b5060608201516132286101a0860182612da9565b50608082015161323c6101c0860182612da9565b5060a08201516132506101e0860182612da9565b5060c0820151613264610200860182612da9565b5060e08201518161022086015261327f610260860182613189565b9050610100830151925061013f19858203016102408601526132a18184613189565b92505060208501516132f56040860182805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c08301525050565b50604085015180511515858301525090949350505050565b6000806000806000610120868803121561332657600080fd5b853561333181612ac6565b94506133408760208801613069565b935061334f8760a08801612c82565b925060e086013561335f81612d14565b915061010086013561337081612d14565b809150509295509295909350565b60038110612adb57600080fd5b6000806000806000806101c087890312156133a557600080fd5b86356133b081612ac6565b95506133bf8860208901613069565b94506133ce8860a08901612cb2565b935061016087013592506101808701356133e781612ac6565b91506101a08701356133f88161337e565b809150509295509295509295565b600080600080610120858703121561341d57600080fd5b843561342881612ac6565b9350602085013561343881612ac6565b9250604085013561344881612d14565b91506134578660608701612cb2565b905092959194509250565b6000806000806000806101c0878903121561347c57600080fd5b863561348781612ac6565b95506134968860208901613069565b94506134a58860a08901612cb2565b93506101608701356134b681612ac6565b925061018087013591506101a08701356133f881612ac6565b600080600080608085870312156134e557600080fd5b84356134f081612ac6565b9350602085013561350081612ac6565b93969395505050506040820135916060013590565b634e487b7160e01b600052602160045260246000fd5b6008811061353b5761353b613515565b9052565b60038110612adb57612adb613515565b61353b8161353f565b61356382825161352b565b6020810151613575602084018261354f565b5060408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c083015260e081015160e08301526101008082015181840152506101208082015181840152506101408082015181840152505050565b805161020080845281516001600160a01b03908116918501919091526020820151166102208401526040810151600091613618610240860183612da9565b6060810151915061362d610260860183612da9565b60808101519150613642610280860183612da9565b60a081015191506136576102a0860183612da9565b60c0810151915061366c6102c0860183612da9565b60e001516101006102e08601529050613689610300850182613189565b9050602083015161369d6020860182613558565b5060408381015180511515610180870152602081015115156101a08701529081015115156101c0860152606081015115156101e0860152509392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561373157603f1988860301845261371f8583516135da565b94509285019290850190600101613703565b5092979650505050505050565b6020815260006107c660208301846135da565b6000806000806000806000610100888a03121561376d57600080fd5b873561377881612ac6565b9650602088013561378881612ac6565b95506137978960408a01612c82565b94506080880135935060a0880135925060c0880135915060e0880135612d9981612d14565b606081016107c98284612e8d565b6000806000806000806000610120888a0312156137e657600080fd5b87356137f181612ac6565b9650602088013561380181612ac6565b9550604088013561381181612ac6565b9450606088013561382181612ac6565b9350608088013592506138378960a08a01612c82565b91506138468960e08a01612c82565b905092959891949750929550565b9283526020830191909152604082015260600190565b600080600080600080600080610200898b03121561388757600080fd5b883561389281612ac6565b97506138a18a60208b01613069565b96506138b08a60a08b01612cb2565b9550610160890135945061018089013593506101a08901356138d181612ac6565b92506101c08901356138e28161337e565b91506101e08901356138f381612d14565b809150509295985092959890939650565b6000806040838503121561391757600080fd5b823561392281612ac6565b9150602083013561393281612ac6565b809150509250929050565b80516001600160a01b03908116835260208083015182169084015260408083015182169084015260609182015116910152565b608081016107c9828461393d565b6020808252825182820181905260009190848201906040850190845b818110156139c1576139ad838551612e4f565b928401926101e0929092019160010161399a565b50909695505050505050565b600080600061010084860312156139e357600080fd5b83356139ee81612ac6565b92506139fd8560208601612cb2565b915060e0840135613a0d81612ac6565b809150509250925092565b613a23828251612e7e565b6020810151611e076040840182612e7e565b613a4082825161393d565b60208101516080830152604081015160a08301526060810151613a6760c084018251613a18565b60200151613a79610140840182613a18565b506080810151805115156101c084015260208101516101e084015260408101516102008401526060810151613ab2610220850182613a18565b5060800151613ac56102a0840182613a18565b5060a0810151613ad9610320840182612e8d565b5060c0015115156103809190910152565b6103a081016107c98284613a35565b60008060008060006101408688031215613b1257600080fd5b8535613b1d81612ac6565b94506020860135613b2d81612ac6565b9350613b3c8760408801612cb2565b9250610100860135613b4d81612d14565b915061012086013561337081612d14565b60008060008060006101a08688031215613b7757600080fd5b8535613b8281612ac6565b9450613b918760208801613069565b9350613ba08760a08801612cb2565b949793965093946101608101359450610180013592915050565b60006001600160401b03821115613bd357613bd3612ade565b5060051b60200190565b600082601f830112613bee57600080fd5b81356020613c03613bfe83613bba565b612c52565b82815260c09283028501820192828201919087851115613c2257600080fd5b8387015b85811015613c4557613c388982612cb2565b8452928401928101613c26565b5090979650505050505050565b60008060008060808587031215613c6857600080fd5b8435613c7381612ac6565b935060208501356001600160401b03811115613c8e57600080fd5b613c9a87828801613bdd565b949794965050505060408301359260600135919050565b6020808252825182820181905260009190848201906040850190845b818110156139c157613ce0838551613a35565b928401926103a09290920191600101613ccd565b600080600060608486031215613d0957600080fd5b8335613d1481612ac6565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b818110156139c157613d5883855161393d565b9284019260809290920191600101613d45565b602081526000825161012080602085015260018060a01b03808351166101408601528060208401511661016086015280604084015116610180860152506060820151613dbb6101a0860182612da9565b506080820151613dcf6101c0860182612da9565b5060a082015160e06101e0860152613deb610220860182613189565b905060c0830151925061013f19858203016102008601526132a18184613189565b600080600080600060a08688031215613e2457600080fd5b8535613e2f81612ac6565b9450602086810135613e4081612ac6565b945060408701356001600160401b0380821115613e5c57600080fd5b818901915089601f830112613e7057600080fd5b8135613e7e613bfe82613bba565b81815260059190911b8301840190848101908c831115613e9d57600080fd5b938501935b82851015613ebb57843582529385019390850190613ea2565b975050506060890135925080831115613ed357600080fd5b5050613ee188828901613bdd565b925050613ef060808701612d04565b90509295509295909350565b6020808252825182820181905260009190848201906040850190845b818110156139c157613f2b838551612ea6565b928401926106a09290920191600101613f18565b6000806000806101008587031215613f5657600080fd5b8435613f6181612ac6565b9350613f708660208701613069565b9250613f7f8660a08701612c82565b915060e0850135613f8f81612d14565b939692955090935050565b613fa5828251612e7e565b6020810151613fb76040840182612e7e565b506040810151611e076080840182612e7e565b6001600160a01b038881168252878116602083015260408201879052610180820190613ff96060840188613f9a565b856101208401528085166101408401525082151561016083015298975050505050505050565b8051612d0f81612ac6565b8051612d0f81612d14565b60006020828403121561404757600080fd5b604051602081016001600160401b038111828210171561406957614069612ade565b8060405250809150825161407c81612d14565b905292915050565b60008183036101e081121561409857600080fd5b6140a0612b1c565b915060608112156140b057600080fd5b6140b8612b1c565b83516140c381612ac6565b815260208401516140d381612ac6565b602082015260408401516140e681612ac6565b60408201528252610160605f19820181131561410157600080fd5b614109612b60565b9150606084015182526080840151602083015260a0840151604083015260c0840151606083015260e084015160808301526101008085015160a08401526101208086015160c08501526101408087015160e08601528387015183860152610180870151828601526101a0870151818601525050505080602083015250612cf9836101c08401614035565b600061010082840312156141a657600080fd5b6141ae612b83565b90508151815260208201516141c281612ac6565b602082015260408201516141d581612ac6565b80604083015250606082015160608201526080820151608082015260a082015160a082015260c082015160c082015260e082015160e082015292915050565b600060c0828403121561422657600080fd5b61422e612ba6565b9050815181526020820151602082015260408201516040820152606082015160608201526080820151608082015260a082015160a082015292915050565b60006080828403121561427e57600080fd5b614286612b3e565b90508151815260208201516020820152604082015160408201526060820151606082015292915050565b6000606082840312156142c257600080fd5b6142ca612b1c565b905081516142d781612ac6565b80825250602082015160208201526040820151604082015292915050565b60006040828403121561430757600080fd5b61430f612af4565b9050815181526020820151602082015292915050565b60006060828403121561433757600080fd5b61433f612b1c565b905081518152602082015160208201526040820151604082015292915050565b60008183036106a081121561437357600080fd5b61437b612ba6565b6143858585614084565b81526104006101df198301121561439b57600080fd5b6143a3612bc8565b91506143b3856101e08601614193565b82526143c3856102e08601614214565b60208301526143d6856103a0860161426c565b60408301526143e98561042086016142b0565b60608301526143fc8561048086016142f5565b60808301526104c084015160a08301526104e084015160c083015261050084015160e08301526105208401516101008301526105408401516101208301526105608401516101408301526105808401516101608301526105a08401516101808301526105c08401516101a083015281602082015261447e856105e08601614325565b6040820152610640840151606082015261066084015160808201526106809093015160a0840152509092915050565b6001600160a01b03881681526101a081016144cb602083018961393d565b6144d860a0830188612e7e565b6144e560e0830187612e7e565b6144f3610120830186612e7e565b8361016083015282151561018083015298975050505050505050565b60008082840361018081121561452457600080fd5b8351925061016080601f198301121561453c57600080fd5b614544612b60565b91506020850151825260408501516020830152606085015160408301526080850151606083015260a0850151608083015260c085015160a083015260e085015160c08301526101008086015160e08401526101208087015182850152610140915081870151818501525081860151818401525050809150509250929050565b6001600160a01b03929092168252602082015260400190565b60006101e082840312156145ef57600080fd5b6107c68383614084565b600082601f83011261460a57600080fd5b8151602061461a613bfe83613bba565b82815260059290921b8401810191818101908684111561463957600080fd5b8286015b84811015610bba57805161465081612ac6565b835291830191830161463d565b600060e0828403121561466f57600080fd5b614677612beb565b9050815181526020820151602082015260408201516040820152606082015160608201526080820151608082015260a082015160a082015260c082015160c082015292915050565b6000602082840312156146d157600080fd5b81516001600160401b03808211156146e857600080fd5b81840191506101208083870312156146ff57600080fd5b614707612b1c565b83518381111561471657600080fd5b840180880383131561472757600080fd5b61472f612c0d565b925061473a8161401f565b83526147486020820161401f565b60208401526147596040820161401f565b604084015261476a6060820161401f565b606084015261477b6080820161401f565b608084015261478c60a0820161401f565b60a084015261479d60c0820161401f565b60c084015260e0810151848111156147b457600080fd5b6147c0898284016145f9565b60e08501525061010080820151858111156147da57600080fd5b6147e68a8285016145f9565b82860152508383526147fb896020880161465d565b602084015261480c89828801614035565b60408401525090979650505050505050565b6001600160a01b0387811682526101c082019061483e602084018961393d565b61484b60a0840188613f9a565b610160830186905284166101808301526148648361353f565b826101a0830152979650505050505050565b6000806040838503121561488957600080fd5b505080516020909101519092909150565b6001600160a01b0387811682526101c08201906148ba602084018961393d565b6148c760a0840188613f9a565b808616610160840152846101808401528084166101a084015250979650505050505050565b600080600083850361010081121561490357600080fd5b845193506020850151925060c0603f198201121561492057600080fd5b50614929612ba6565b60408501518152606085015160208201526080850151604082015260a085015161495281612ac6565b606082015260c0850151608082015260e09094015160a0850152509093909250565b634e487b7160e01b600052603260045260246000fd5b805160088110612d0f57600080fd5b8051612d0f8161337e565b600061016082840312156149b757600080fd5b6149bf612b60565b90506149ca8261498a565b81526149d860208301614999565b602082015260408201516040820152606082015160608201526080820151608082015260a082015160a082015260c082015160c082015260e082015160e082015261010080830151818301525061012080830151818301525061014080830151818301525092915050565b600060808284031215614a5557600080fd5b614a5d612b3e565b90508151614a6a81612d14565b81526020820151614a7a81612d14565b60208201526040820151614a8d81612d14565b604082015260608201516130c681612d14565b600060208284031215614ab257600080fd5b81516001600160401b0380821115614ac957600080fd5b908301906102008286031215614ade57600080fd5b614ae6612b1c565b825182811115614af557600080fd5b83016101008188031215614b0857600080fd5b614b10612b83565b614b198261401f565b8152614b276020830161401f565b6020820152614b386040830161401f565b6040820152614b496060830161401f565b6060820152614b5a6080830161401f565b6080820152614b6b60a0830161401f565b60a0820152614b7c60c0830161401f565b60c082015260e082015184811115614b9357600080fd5b614b9f898285016145f9565b60e083015250825250614bb586602085016149a4565b6020820152614bc8866101808501614a43565b604082015295945050505050565b634e487b7160e01b600052601160045260246000fd5b600060018201614bfe57614bfe614bd6565b5060010190565b6001600160a01b0392831681529116602082015260400190565b600060808284031215614c3157600080fd5b614c39612b3e565b90508151614c4681612ac6565b81526020820151614c5681612ac6565b60208201526040820151614c6981612ac6565b604082015260608201516130c681612ac6565b600060808284031215614c8e57600080fd5b6107c68383614c1f565b6001600160a01b03881681526101608101614cb6602083018961393d565b614cc360a0830188612e7e565b8560e0830152846101008301528361012083015282151561014083015298975050505050505050565b600060608284031215614cfe57600080fd5b6107c68383614325565b6001600160a01b038881168252610180820190614d28602084018a61393d565b87811660a0840152861660c083015260e08201859052614d4c610100830185612e7e565b610643610140830184612e7e565b600080600060608486031215614d6f57600080fd5b8351925060208401519150604084015190509250925092565b6001600160a01b038981168252610200820190614da8602084018b61393d565b614db560a084018a613f9a565b87610160840152866101808401528086166101a084015250614dd68461353f565b836101c08301528215156101e08301529998505050505050505050565b600060208284031215614e0557600080fd5b5051919050565b6001600160a01b038481168252610100820190614e2c6020840186613f9a565b80841660e084015250949350505050565b600060808284031215614e4f57600080fd5b614e57612af4565b9050614e6383836142f5565b8152614e7283604084016142f5565b602082015292915050565b60006101608284031215614e9057600080fd5b614e98612c30565b90508151614ea581612d14565b808252506020820151602082015260408201516040820152614eca8360608401614e3d565b6060820152614edc8360e08401614e3d565b608082015292915050565b60008183036103a0811215614efb57600080fd5b614f03612beb565b614f0d8585614c1f565b81526080840151602082015260a0840151604082015261010060bf1983011215614f3657600080fd5b614f3e612af4565b9150614f4d8560c08601614e3d565b8252614f5d856101408601614e3d565b6020830152816060820152614f76856101c08601614e7d565b6080820152614f89856103208601614325565b60a0820152614f9b610380850161402a565b60c0820152949350505050565b600060a08284031215614fba57600080fd5b614fc2612c30565b9050815181526020820151602082015260408201516040820152606082015160608201526080820151608082015292915050565b600081830361016081121561500a57600080fd5b615012612af4565b60c082121561502057600080fd5b615028612ba6565b9150835161503581612ac6565b8252602084015161504581612ac6565b6020830152604084015161505881612ac6565b6040830152606084015161506b81612ac6565b6060830152608084015161507e81612ac6565b608083015260a084015161509181612ac6565b60a08301528181526150a68560c08601614fa8565b6020820152949350505050565b6001600160a01b038616815261036081016150d1602083018761393d565b6150de60a0830186613f9a565b6150ed61016083018551612db6565b60208401516151006101c0840182612ddd565b506040939093015151151561032082015261034001529392505050565b60006020828403121561512f57600080fd5b81516001600160401b038082111561514657600080fd5b90830190610120828603121561515b57600080fd5b615163612b1c565b82518281111561517257600080fd5b830160e0818803121561518457600080fd5b61518c612beb565b6151958261401f565b81526151a36020830161401f565b60208201526151b46040830161401f565b60408201526151c56060830161401f565b60608201526151d66080830161401f565b608082015260a0820151848111156151ed57600080fd5b6151f9898285016145f9565b60a08301525060c08201518481111561521157600080fd5b61521d898285016145f9565b60c083015250825250615233866020850161465d565b6020820152614bc8866101008501614035565b80820281158282048414176107c9576107c9614bd6565b818103600083128015838313168383128216171561527d5761527d614bd6565b5092915050565b6000602080838503121561529757600080fd5b82516001600160401b038111156152ad57600080fd5b8301601f810185136152be57600080fd5b80516152cc613bfe82613bba565b81815260059190911b820183019083810190878311156152eb57600080fd5b928401925b828410156111e4578351825292840192908401906152f0565b60006020828403121561531b57600080fd5b81516001600160401b0381111561533157600080fd5b61204e848285016145f9565b808201828112600083128015821682158216171561535d5761535d614bd6565b505092915050565b808201808211156107c9576107c9614bd6565b60006020828403121561538a57600080fd5b81516107c681612d14565b6000600160ff1b82016153aa576153aa614bd6565b5060000390565b634e487b7160e01b600052601260045260246000fd5b6000826153e457634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212203233d1c88e2834df509795d562a4149615b014be8640709981435c03e4b2051b64736f6c63430008120033 \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/DataStore/ContractDefinition/DataStoreDefinition.cs b/src/Managing.ABI.GmxV2/DataStore/ContractDefinition/DataStoreDefinition.cs new file mode 100644 index 0000000..63e1c41 --- /dev/null +++ b/src/Managing.ABI.GmxV2/DataStore/ContractDefinition/DataStoreDefinition.cs @@ -0,0 +1,1147 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; +using Nethereum.Contracts; + +namespace Managing.ABI.GmxV2.DataStore.ContractDefinition +{ + + + public partial class DataStoreDeployment : DataStoreDeploymentBase + { + public DataStoreDeployment() : base(BYTECODE) { } + public DataStoreDeployment(string byteCode) : base(byteCode) { } + } + + public class DataStoreDeploymentBase : ContractDeploymentMessage + { + public static string BYTECODE = "60a06040523480156200001157600080fd5b506040516200296638038062002966833981016040819052620000349162000046565b6001600160a01b031660805262000078565b6000602082840312156200005957600080fd5b81516001600160a01b03811681146200007157600080fd5b9392505050565b6080516128cb6200009b6000396000818161054c01526117c001526128cb6000f3fe608060405234801561001057600080fd5b50600436106103485760003560e01c80639921c3cc116101bb5780639921c3cc146106e85780639faf6fb6146106fb5780639fe7ac121461070e578063a6ed563e14610721578063a9fcf76b14610741578063abfdcced14610754578063adb353dc14610767578063b348e6391461077a578063b8320a081461078d578063bd02d0f5146107a0578063be43caa3146107c0578063bf498dd3146107d3578063bf7f035a146107e6578063c1dc9182146107f9578063c4f00fde1461080c578063c769d1a11461081f578063c80f4c6214610832578063ca446dd914610845578063cbb093dd14610858578063cc50eadd1461086b578063cf6a87221461087e578063d38eebc714610891578063d52852af146108b1578063dc97d962146108d1578063dd031997146108f1578063e208a70d14610904578063e2a4853a14610917578063e4e36c4e14610858578063e62461ce1461092a578063e7e4148e1461093d578063e98aabc114610950578063ec672cf614610963578063f069052a14610976578063f15caeac14610989578063f3903b9f1461099c578063f51fc0d9146109af57600080fd5b806301677da21461034d578063065f21a714610376578063116bb9291461039757806321f8a721146103b757806322538dae146103f857806322f874641461042157806326004846146104345780632d2899b614610449578063310b88821461046957806332f85bbf1461048c578063340dbab31461049f57806335d4d407146104b257806335ea8059146104c55780633dbacd1a146104d85780633e49bed0146104eb57806342c3bd96146104fe57806344a242b114610511578063499ea50e146105345780634a4a7b04146105475780634e91db081461056e5780635948f733146105815780635eb07dbd146105a15780636339734d146105b457806369721d41146105c75780636e899550146105da5780636fae54f0146105fa5780637026d42c1461060d578063743df325146106205780637ae1cfca1461064057806380aacdcd1461066357806386ac6bdf1461067657806388021a72146106895780638ca498b01461069c57806391d4403c146106af57806393266f9a146106c2578063986e791a146106d5575b600080fd5b61036061035b366004611fa9565b6109c2565b60405161036d9190612008565b60405180910390f35b610389610384366004611fa9565b610aae565b60405190815260200161036d565b6103aa6103a5366004611fa9565b610acb565b60405161036d919061206a565b6103e06103c5366004611fa9565b6000908152600260205260409020546001600160a01b031690565b6040516001600160a01b03909116815260200161036d565b6103e0610406366004611fa9565b6002602052600090815260409020546001600160a01b031681565b6103e061042f3660046120b0565b610b4d565b61044761044236600461213b565b610b85565b005b61045c610457366004611fa9565b610bf9565b60405161036d91906121dc565b61047c6104773660046120b0565b610c5a565b604051901515815260200161036d565b61038961049a366004612283565b610c79565b6103896104ad3660046120b0565b610d0a565b6104476104c03660046122e0565b610d52565b6103896104d3366004611fa9565b610d83565b6103896104e63660046120b0565b610d9a565b6103896104f93660046120b0565b610de3565b61044761050c366004611fa9565b610e0d565b61047c61051f366004611fa9565b60036020526000908152604090205460ff1681565b610447610542366004611fa9565b610e30565b6103e07f000000000000000000000000000000000000000000000000000000000000000081565b61038961057c3660046120b0565b610e5c565b61059461058f366004611fa9565b610e86565b60405161036d9190612376565b6104476105af36600461213b565b610ef1565b6103896105c23660046120b0565b610f22565b6104476105d53660046123d3565b610f53565b6105ed6105e83660046123ff565b610f7d565b60405161036d9190612445565b6103896106083660046120b0565b610fb1565b61045c61061b366004612458565b610ff9565b61038961062e366004611fa9565b60016020526000908152604090205481565b61047c61064e366004611fa9565b60009081526003602052604090205460ff1690565b61047c6106713660046120b0565b61101d565b61045c610684366004611fa9565b611060565b610447610697366004612484565b6110c0565b6103896106aa3660046120b0565b6110f1565b61047c6106bd3660046120b0565b611156565b6104476106d03660046120b0565b61116e565b6105ed6106e3366004611fa9565b611198565b6104476106f63660046120b0565b611230565b610447610709366004611fa9565b61125a565b61044761071c366004611fa9565b61128a565b61038961072f366004611fa9565b60009081526005602052604090205490565b61044761074f36600461213b565b6112b4565b61047c610762366004612540565b6112e5565b6104476107753660046120b0565b611318565b6104476107883660046123d3565b611342565b6105ed61079b3660046120b0565b61136c565b6103896107ae366004611fa9565b60009081526020819052604090205490565b6104476107ce366004611fa9565b611425565b6103896107e13660046120b0565b61144e565b6104476107f4366004611fa9565b61146a565b610447610807366004611fa9565b611493565b61038961081a3660046120b0565b6114bc565b61047c61082d3660046123d3565b6114d8565b6104476108403660046120b0565b6114f0565b6103e06108533660046123d3565b61151a565b6103896108663660046120b0565b61155a565b610447610879366004611fa9565b611588565b61044761088c366004611fa9565b6115b1565b61038961089f366004611fa9565b60006020819052908152604090205481565b6103896108bf366004611fa9565b60056020526000908152604090205481565b6103896108df366004611fa9565b60009081526001602052604090205490565b61045c6108ff366004611fa9565b6115d4565b610447610912366004611fa9565b611634565b6103896109253660046120b0565b61165d565b610447610938366004611fa9565b611687565b61059461094b366004612458565b6116aa565b61038961095e3660046120b0565b6116c6565b610447610971366004612570565b6116f4565b61045c610984366004612458565b611725565b6105ed610997366004611fa9565b611741565b6103896109aa366004611fa9565b61175a565b6104476109bd366004611fa9565b611771565b6060600a6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610aa3578382906000526020600020018054610a1690612604565b80601f0160208091040260200160405190810160405280929190818152602001828054610a4290612604565b8015610a8f5780601f10610a6457610100808354040283529160200191610a8f565b820191906000526020600020905b815481529060010190602001808311610a7257829003601f168201915b5050505050815260200190600101906109f7565b505050509050919050565b6000818152600e60205260408120610ac59061179a565b92915050565b600081815260096020908152604091829020805483518184028101840190945280845260609392830182828015610b4157602002820191906000526020600020906000905b825461010083900a900460ff161515815260206001928301818104948501949093039092029101808411610b105790505b50505050509050919050565b60086020528160005260406000208181548110610b6957600080fd5b6000918252602090912001546001600160a01b03169150829050565b610bd5604051602001610b979061263e565b604051602081830303815290604052805190602001206040518060400160405280600a81526020016921a7a72a2927a62622a960b11b8152506117a4565b6000828152600b602090815260409091208251610bf492840190611d52565b505050565b600081815260076020908152604091829020805483518184028101840190945280845260609392830182828015610b4157602002820191906000526020600020905b815481526020019060010190808311610c3b5750505050509050919050565b6000828152600e60205260408120610c729083611858565b9392505050565b6000610c8d604051602001610b979061263e565b6000848152602081905260408120549084128015610cba575080610cb8610cb386612678565b611864565b115b15610ce2578260405162461bcd60e51b8152600401610cd99190612445565b60405180910390fd5b6000610cee82866118ba565b6000878152602081905260409020819055925050509392505050565b6000610d1e604051602001610b979061263e565b600083815260208190526040812054610d38908490612694565b600085815260208190526040902081905591505092915050565b610d64604051602001610b979061263e565b60008281526009602090815260409091208251610bf492840190611d99565b6000818152600d60205260408120610ac59061179a565b6000610dae604051602001610b979061263e565b60008381526020819052604081205490610dc88483612694565b60008681526020819052604090208190559250505092915050565b6000610df7604051602001610b979061263e565b5060009182526001602052604090912081905590565b610e1f604051602001610b979061263e565b600090815260208190526040812055565b610e42604051602001610b979061263e565b6000818152600760205260408120610e5991611e39565b50565b6000610e70604051602001610b979061263e565b5060009182526005602052604090912081905590565b600081815260086020908152604091829020805483518184028101840190945280845260609392830182828015610b4157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ec85750505050509050919050565b610f03604051602001610b979061263e565b60008281526006602090815260409091208251610bf492840190611d52565b60076020528160005260406000208181548110610f3e57600080fd5b90600052602060002001600091509150505481565b610f65604051602001610b979061263e565b6000828152600d60205260409020610bf490826118f1565b6060610f91604051602001610b979061263e565b6000838152600460205260409020610fa983826126f5565b509092915050565b6000610fc5604051602001610b979061263e565b600083815260016020526040812054610fdf9084906127b4565b600085815260016020526040902081905591505092915050565b6000838152600e60205260409020606090611015908484611906565b949350505050565b6009602052816000526040600020818154811061103957600080fd5b9060005260206000209060209182820401919006915091509054906101000a900460ff1681565b600081815260066020908152604091829020805483518184028101840190945280845260609392830182828015610b415760200282019190600052602060002090815481526020019060010190808311610c3b5750505050509050919050565b6110d2604051602001610b979061263e565b6000828152600a602090815260409091208251610bf492840190611e57565b6000611105604051602001610b979061263e565b600083815260208190526040812054908312801561112d57508061112b610cb385612678565b115b1561114a5750506000828152602081905260408120819055610ac5565b6000610dc882856118ba565b6000828152600c60205260408120610c729083611858565b611180604051602001610b979061263e565b6000828152600e60205260409020610bf490826119ea565b60008181526004602052604090208054606091906111b590612604565b80601f01602080910402602001604051908101604052809291908181526020018280546111e190612604565b8015610b415780601f1061120357610100808354040283529160200191610b41565b820191906000526020600020905b8154815290600101906020018083116112115750939695505050505050565b611242604051602001610b979061263e565b6000828152600c60205260409020610bf490826119ea565b61126c604051602001610b979061263e565b600090815260026020526040902080546001600160a01b0319169055565b61129c604051602001610b979061263e565b6000908152600360205260409020805460ff19169055565b6112c6604051602001610b979061263e565b60008281526007602090815260409091208251610bf492840190611d52565b60006112f9604051602001610b979061263e565b50600091825260036020526040909120805460ff191682151517905590565b61132a604051602001610b979061263e565b6000828152600e60205260409020610bf490826119f6565b611354604051602001610b979061263e565b6000828152600d60205260409020610bf49082611a02565b600a602052816000526040600020818154811061138857600080fd5b906000526020600020016000915091505080546113a490612604565b80601f01602080910402602001604051908101604052809291908181526020018280546113d090612604565b801561141d5780601f106113f25761010080835404028352916020019161141d565b820191906000526020600020905b81548152906001019060200180831161140057829003601f168201915b505050505081565b611437604051602001610b979061263e565b6000818152600660205260408120610e5991611e39565b600b6020528160005260406000208181548110610f3e57600080fd5b61147c604051602001610b979061263e565b6000818152600b60205260408120610e5991611e39565b6114a5604051602001610b979061263e565b6000818152600860205260408120610e5991611e39565b60066020528160005260406000208181548110610f3e57600080fd5b6000828152600d60205260408120610c729083611a17565b611502604051602001610b979061263e565b6000828152600c60205260409020610bf490826119f6565b600061152e604051602001610b979061263e565b5060009182526002602052604090912080546001600160a01b0319166001600160a01b03831617905590565b600061156e604051602001610b979061263e565b600083815260016020526040812054610fdf9084906127d4565b61159a604051602001610b979061263e565b6000818152600460205260408120610e5991611ea9565b6115c3604051602001610b979061263e565b600090815260056020526040812055565b6000818152600b6020908152604091829020805483518184028101840190945280845260609392830182828015610b415760200282019190600052602060002090815481526020019060010190808311610c3b5750505050509050919050565b611646604051602001610b979061263e565b6000818152600a60205260408120610e5991611ee3565b6000611671604051602001610b979061263e565b5060009182526020829052604090912081905590565b611699604051602001610b979061263e565b600090815260016020526040812055565b6000838152600d60205260409020606090611015908484611a2c565b60006116da604051602001610b979061263e565b600083815260208190526040812054610d389084906127fc565b611706604051602001610b979061263e565b60008281526008602090815260409091208251610bf492840190611f01565b6000838152600c60205260409020606090611015908484611aef565b600460205260009081526040902080546113a490612604565b6000818152600c60205260408120610ac59061179a565b611783604051602001610b979061263e565b6000818152600960205260408120610e5991611f56565b6000610ac5825490565b60405163ac4ab3fb60e01b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ac4ab3fb90604401602060405180830381865afa15801561180f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611833919061280f565b61185457338160405163a35b150b60e01b8152600401610cd992919061282c565b5050565b6000610c728383611ba5565b6000808212156118b65760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610cd9565b5090565b6000808213156118de576118cd82611bbd565b6118d79084612694565b9050610ac5565b6118e782611bbd565b610c7290846127fc565b6000610c72836001600160a01b038416611bd0565b60606119118461179a565b831061192c5750604080516000815260208101909152610c72565b60006119378561179a565b905080831115611945578092505b600061195185856127fc565b6001600160401b03811115611968576119686120d2565b604051908082528060200260200182016040528015611991578160200160208202803683370190505b509050845b848110156119e0576119a88782611cca565b826119b388846127fc565b815181106119c3576119c3612850565b6020908102919091010152806119d881612866565b915050611996565b5095945050505050565b6000610c728383611bd0565b6000610c728383611cd6565b6000610c72836001600160a01b038416611cd6565b6000610c72836001600160a01b038416611ba5565b60606000611a398561179a565b905080831115611a47578092505b6000611a5385856127fc565b6001600160401b03811115611a6a57611a6a6120d2565b604051908082528060200260200182016040528015611a93578160200160208202803683370190505b509050845b848110156119e057611aaa8782611cca565b82611ab588846127fc565b81518110611ac557611ac5612850565b6001600160a01b039092166020928302919091019091015280611ae781612866565b915050611a98565b60606000611afc8561179a565b905080831115611b0a578092505b6000611b1685856127fc565b6001600160401b03811115611b2d57611b2d6120d2565b604051908082528060200260200182016040528015611b56578160200160208202803683370190505b509050845b848110156119e057611b6d8782611d20565b82611b7888846127fc565b81518110611b8857611b88612850565b602090810291909101015280611b9d81612866565b915050611b5b565b60009081526001919091016020526040902054151590565b6000808212156118b65781600003610ac5565b60008181526001830160205260408120548015611cb9576000611bf46001836127fc565b8554909150600090611c08906001906127fc565b9050818114611c6d576000866000018281548110611c2857611c28612850565b9060005260206000200154905080876000018481548110611c4b57611c4b612850565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611c7e57611c7e61287f565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610ac5565b6000915050610ac5565b5092915050565b6000610c728383611d28565b6000611ce28383611ba5565b611d1857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610ac5565b506000610ac5565b6000610c7283835b6000826000018281548110611d3f57611d3f612850565b9060005260206000200154905092915050565b828054828255906000526020600020908101928215611d8d579160200282015b82811115611d8d578251825591602001919060010190611d72565b506118b6929150611f77565b82805482825590600052602060002090601f01602090048101928215611d8d5791602002820160005b83821115611dff57835183826101000a81548160ff0219169083151502179055509260200192600101602081600001049283019260010302611dc2565b8015611e2c5782816101000a81549060ff0219169055600101602081600001049283019260010302611dff565b50506118b6929150611f77565b5080546000825590600052602060002090810190610e599190611f77565b828054828255906000526020600020908101928215611e9d579160200282015b82811115611e9d5782518290611e8d90826126f5565b5091602001919060010190611e77565b506118b6929150611f8c565b508054611eb590612604565b6000825580601f10611ec5575050565b601f016020900490600052602060002090810190610e599190611f77565b5080546000825590600052602060002090810190610e599190611f8c565b828054828255906000526020600020908101928215611d8d579160200282015b82811115611d8d57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611f21565b50805460008255601f016020900490600052602060002090810190610e5991905b5b808211156118b65760008155600101611f78565b808211156118b6576000611fa08282611ea9565b50600101611f8c565b600060208284031215611fbb57600080fd5b5035919050565b6000815180845260005b81811015611fe857602081850181015186830182015201611fcc565b506000602082860101526020601f19601f83011685010191505092915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561205d57603f1988860301845261204b858351611fc2565b9450928501929085019060010161202f565b5092979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156120a4578351151583529284019291840191600101612086565b50909695505050505050565b600080604083850312156120c357600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612110576121106120d2565b604052919050565b60006001600160401b03821115612131576121316120d2565b5060051b60200190565b6000806040838503121561214e57600080fd5b823591506020808401356001600160401b0381111561216c57600080fd5b8401601f8101861361217d57600080fd5b803561219061218b82612118565b6120e8565b81815260059190911b820183019083810190888311156121af57600080fd5b928401925b828410156121cd578335825292840192908401906121b4565b80955050505050509250929050565b6020808252825182820181905260009190848201906040850190845b818110156120a4578351835292840192918401916001016121f8565b600082601f83011261222557600080fd5b81356001600160401b0381111561223e5761223e6120d2565b612251601f8201601f19166020016120e8565b81815284602083860101111561226657600080fd5b816020850160208301376000918101602001919091529392505050565b60008060006060848603121561229857600080fd5b833592506020840135915060408401356001600160401b038111156122bc57600080fd5b6122c886828701612214565b9150509250925092565b8015158114610e5957600080fd5b600080604083850312156122f357600080fd5b823591506020808401356001600160401b0381111561231157600080fd5b8401601f8101861361232257600080fd5b803561233061218b82612118565b81815260059190911b8201830190838101908883111561234f57600080fd5b928401925b828410156121cd578335612367816122d2565b82529284019290840190612354565b6020808252825182820181905260009190848201906040850190845b818110156120a45783516001600160a01b031683529284019291840191600101612392565b80356001600160a01b03811681146123ce57600080fd5b919050565b600080604083850312156123e657600080fd5b823591506123f6602084016123b7565b90509250929050565b6000806040838503121561241257600080fd5b8235915060208301356001600160401b0381111561242f57600080fd5b61243b85828601612214565b9150509250929050565b602081526000610c726020830184611fc2565b60008060006060848603121561246d57600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561249757600080fd5b823591506020808401356001600160401b03808211156124b657600080fd5b818601915086601f8301126124ca57600080fd5b81356124d861218b82612118565b81815260059190911b830184019084810190898311156124f757600080fd5b8585015b8381101561252f578035858111156125135760008081fd5b6125218c89838a0101612214565b8452509186019186016124fb565b508096505050505050509250929050565b6000806040838503121561255357600080fd5b823591506020830135612565816122d2565b809150509250929050565b6000806040838503121561258357600080fd5b823591506020808401356001600160401b038111156125a157600080fd5b8401601f810186136125b257600080fd5b80356125c061218b82612118565b81815260059190911b820183019083810190888311156125df57600080fd5b928401925b828410156121cd576125f5846123b7565b825292840192908401906125e4565b600181811c9082168061261857607f821691505b60208210810361263857634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600a908201526921a7a72a2927a62622a960b11b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000600160ff1b820161268d5761268d612662565b5060000390565b80820180821115610ac557610ac5612662565b601f821115610bf457600081815260208120601f850160051c810160208610156126ce5750805b601f850160051c820191505b818110156126ed578281556001016126da565b505050505050565b81516001600160401b0381111561270e5761270e6120d2565b6127228161271c8454612604565b846126a7565b602080601f831160018114612757576000841561273f5750858301515b600019600386901b1c1916600185901b1785556126ed565b600085815260208120601f198616915b8281101561278657888601518255948401946001909101908401612767565b50858210156127a45787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8181036000831280158383131683831282161715611cc357611cc3612662565b80820182811260008312801582168215821617156127f4576127f4612662565b505092915050565b81810381811115610ac557610ac5612662565b60006020828403121561282157600080fd5b8151610c72816122d2565b6001600160a01b038316815260406020820181905260009061101590830184611fc2565b634e487b7160e01b600052603260045260246000fd5b60006001820161287857612878612662565b5060010190565b634e487b7160e01b600052603160045260246000fdfea264697066735822122078fa982c04127061c9e1c94f963f87e841da3406d1c88b279897f047516f979e64736f6c634300081200330000000000000000000000003c3d99fd298f679dbc2cecd132b4ec4d0f5e6e72"; + public DataStoreDeploymentBase() : base(BYTECODE) { } + public DataStoreDeploymentBase(string byteCode) : base(byteCode) { } + [Parameter("address", "_roleStore", 1)] + public virtual string RoleStore { get; set; } + } + + public partial class AddAddressFunction : AddAddressFunctionBase { } + + [Function("addAddress")] + public class AddAddressFunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + [Parameter("address", "value", 2)] + public virtual string Value { get; set; } + } + + public partial class AddBytes32Function : AddBytes32FunctionBase { } + + [Function("addBytes32")] + public class AddBytes32FunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + [Parameter("bytes32", "value", 2)] + public virtual byte[] Value { get; set; } + } + + public partial class AddUintFunction : AddUintFunctionBase { } + + [Function("addUint")] + public class AddUintFunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + [Parameter("uint256", "value", 2)] + public virtual BigInteger Value { get; set; } + } + + public partial class AddressArrayValuesFunction : AddressArrayValuesFunctionBase { } + + [Function("addressArrayValues", "address")] + public class AddressArrayValuesFunctionBase : FunctionMessage + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + [Parameter("uint256", "", 2)] + public virtual BigInteger ReturnValue2 { get; set; } + } + + public partial class AddressValuesFunction : AddressValuesFunctionBase { } + + [Function("addressValues", "address")] + public class AddressValuesFunctionBase : FunctionMessage + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + } + + public partial class ApplyBoundedDeltaToUintFunction : ApplyBoundedDeltaToUintFunctionBase { } + + [Function("applyBoundedDeltaToUint", "uint256")] + public class ApplyBoundedDeltaToUintFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("int256", "value", 2)] + public virtual BigInteger Value { get; set; } + } + + public partial class ApplyDeltaToIntFunction : ApplyDeltaToIntFunctionBase { } + + [Function("applyDeltaToInt", "int256")] + public class ApplyDeltaToIntFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("int256", "value", 2)] + public virtual BigInteger Value { get; set; } + } + + public partial class ApplyDeltaToUint1Function : ApplyDeltaToUint1FunctionBase { } + + [Function("applyDeltaToUint", "uint256")] + public class ApplyDeltaToUint1FunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("int256", "value", 2)] + public virtual BigInteger Value { get; set; } + [Parameter("string", "errorMessage", 3)] + public virtual string ErrorMessage { get; set; } + } + + public partial class ApplyDeltaToUintFunction : ApplyDeltaToUintFunctionBase { } + + [Function("applyDeltaToUint", "uint256")] + public class ApplyDeltaToUintFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("uint256", "value", 2)] + public virtual BigInteger Value { get; set; } + } + + public partial class BoolArrayValuesFunction : BoolArrayValuesFunctionBase { } + + [Function("boolArrayValues", "bool")] + public class BoolArrayValuesFunctionBase : FunctionMessage + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + [Parameter("uint256", "", 2)] + public virtual BigInteger ReturnValue2 { get; set; } + } + + public partial class BoolValuesFunction : BoolValuesFunctionBase { } + + [Function("boolValues", "bool")] + public class BoolValuesFunctionBase : FunctionMessage + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + } + + public partial class Bytes32ArrayValuesFunction : Bytes32ArrayValuesFunctionBase { } + + [Function("bytes32ArrayValues", "bytes32")] + public class Bytes32ArrayValuesFunctionBase : FunctionMessage + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + [Parameter("uint256", "", 2)] + public virtual BigInteger ReturnValue2 { get; set; } + } + + public partial class Bytes32ValuesFunction : Bytes32ValuesFunctionBase { } + + [Function("bytes32Values", "bytes32")] + public class Bytes32ValuesFunctionBase : FunctionMessage + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + } + + public partial class ContainsAddressFunction : ContainsAddressFunctionBase { } + + [Function("containsAddress", "bool")] + public class ContainsAddressFunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + [Parameter("address", "value", 2)] + public virtual string Value { get; set; } + } + + public partial class ContainsBytes32Function : ContainsBytes32FunctionBase { } + + [Function("containsBytes32", "bool")] + public class ContainsBytes32FunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + [Parameter("bytes32", "value", 2)] + public virtual byte[] Value { get; set; } + } + + public partial class ContainsUintFunction : ContainsUintFunctionBase { } + + [Function("containsUint", "bool")] + public class ContainsUintFunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + [Parameter("uint256", "value", 2)] + public virtual BigInteger Value { get; set; } + } + + public partial class DecrementIntFunction : DecrementIntFunctionBase { } + + [Function("decrementInt", "int256")] + public class DecrementIntFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("int256", "value", 2)] + public virtual BigInteger Value { get; set; } + } + + public partial class DecrementUintFunction : DecrementUintFunctionBase { } + + [Function("decrementUint", "uint256")] + public class DecrementUintFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("uint256", "value", 2)] + public virtual BigInteger Value { get; set; } + } + + public partial class GetAddressFunction : GetAddressFunctionBase { } + + [Function("getAddress", "address")] + public class GetAddressFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class GetAddressArrayFunction : GetAddressArrayFunctionBase { } + + [Function("getAddressArray", "address[]")] + public class GetAddressArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class GetAddressCountFunction : GetAddressCountFunctionBase { } + + [Function("getAddressCount", "uint256")] + public class GetAddressCountFunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + } + + public partial class GetAddressValuesAtFunction : GetAddressValuesAtFunctionBase { } + + [Function("getAddressValuesAt", "address[]")] + public class GetAddressValuesAtFunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + [Parameter("uint256", "start", 2)] + public virtual BigInteger Start { get; set; } + [Parameter("uint256", "end", 3)] + public virtual BigInteger End { get; set; } + } + + public partial class GetBoolFunction : GetBoolFunctionBase { } + + [Function("getBool", "bool")] + public class GetBoolFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class GetBoolArrayFunction : GetBoolArrayFunctionBase { } + + [Function("getBoolArray", "bool[]")] + public class GetBoolArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class GetBytes32Function : GetBytes32FunctionBase { } + + [Function("getBytes32", "bytes32")] + public class GetBytes32FunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class GetBytes32ArrayFunction : GetBytes32ArrayFunctionBase { } + + [Function("getBytes32Array", "bytes32[]")] + public class GetBytes32ArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class GetBytes32CountFunction : GetBytes32CountFunctionBase { } + + [Function("getBytes32Count", "uint256")] + public class GetBytes32CountFunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + } + + public partial class GetBytes32ValuesAtFunction : GetBytes32ValuesAtFunctionBase { } + + [Function("getBytes32ValuesAt", "bytes32[]")] + public class GetBytes32ValuesAtFunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + [Parameter("uint256", "start", 2)] + public virtual BigInteger Start { get; set; } + [Parameter("uint256", "end", 3)] + public virtual BigInteger End { get; set; } + } + + public partial class GetIntFunction : GetIntFunctionBase { } + + [Function("getInt", "int256")] + public class GetIntFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class GetIntArrayFunction : GetIntArrayFunctionBase { } + + [Function("getIntArray", "int256[]")] + public class GetIntArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class GetStringFunction : GetStringFunctionBase { } + + [Function("getString", "string")] + public class GetStringFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class GetStringArrayFunction : GetStringArrayFunctionBase { } + + [Function("getStringArray", "string[]")] + public class GetStringArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class GetUintFunction : GetUintFunctionBase { } + + [Function("getUint", "uint256")] + public class GetUintFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class GetUintArrayFunction : GetUintArrayFunctionBase { } + + [Function("getUintArray", "uint256[]")] + public class GetUintArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class GetUintCountFunction : GetUintCountFunctionBase { } + + [Function("getUintCount", "uint256")] + public class GetUintCountFunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + } + + public partial class GetUintValuesAtFunction : GetUintValuesAtFunctionBase { } + + [Function("getUintValuesAt", "uint256[]")] + public class GetUintValuesAtFunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + [Parameter("uint256", "start", 2)] + public virtual BigInteger Start { get; set; } + [Parameter("uint256", "end", 3)] + public virtual BigInteger End { get; set; } + } + + public partial class IncrementIntFunction : IncrementIntFunctionBase { } + + [Function("incrementInt", "int256")] + public class IncrementIntFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("int256", "value", 2)] + public virtual BigInteger Value { get; set; } + } + + public partial class IncrementUintFunction : IncrementUintFunctionBase { } + + [Function("incrementUint", "uint256")] + public class IncrementUintFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("uint256", "value", 2)] + public virtual BigInteger Value { get; set; } + } + + public partial class IntArrayValuesFunction : IntArrayValuesFunctionBase { } + + [Function("intArrayValues", "int256")] + public class IntArrayValuesFunctionBase : FunctionMessage + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + [Parameter("uint256", "", 2)] + public virtual BigInteger ReturnValue2 { get; set; } + } + + public partial class IntValuesFunction : IntValuesFunctionBase { } + + [Function("intValues", "int256")] + public class IntValuesFunctionBase : FunctionMessage + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + } + + public partial class RemoveAddress1Function : RemoveAddress1FunctionBase { } + + [Function("removeAddress")] + public class RemoveAddress1FunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + [Parameter("address", "value", 2)] + public virtual string Value { get; set; } + } + + public partial class RemoveAddressFunction : RemoveAddressFunctionBase { } + + [Function("removeAddress")] + public class RemoveAddressFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class RemoveAddressArrayFunction : RemoveAddressArrayFunctionBase { } + + [Function("removeAddressArray")] + public class RemoveAddressArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class RemoveBoolFunction : RemoveBoolFunctionBase { } + + [Function("removeBool")] + public class RemoveBoolFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class RemoveBoolArrayFunction : RemoveBoolArrayFunctionBase { } + + [Function("removeBoolArray")] + public class RemoveBoolArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class RemoveBytes321Function : RemoveBytes321FunctionBase { } + + [Function("removeBytes32")] + public class RemoveBytes321FunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + [Parameter("bytes32", "value", 2)] + public virtual byte[] Value { get; set; } + } + + public partial class RemoveBytes32Function : RemoveBytes32FunctionBase { } + + [Function("removeBytes32")] + public class RemoveBytes32FunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class RemoveBytes32ArrayFunction : RemoveBytes32ArrayFunctionBase { } + + [Function("removeBytes32Array")] + public class RemoveBytes32ArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class RemoveIntFunction : RemoveIntFunctionBase { } + + [Function("removeInt")] + public class RemoveIntFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class RemoveIntArrayFunction : RemoveIntArrayFunctionBase { } + + [Function("removeIntArray")] + public class RemoveIntArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class RemoveStringFunction : RemoveStringFunctionBase { } + + [Function("removeString")] + public class RemoveStringFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class RemoveStringArrayFunction : RemoveStringArrayFunctionBase { } + + [Function("removeStringArray")] + public class RemoveStringArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class RemoveUintFunction : RemoveUintFunctionBase { } + + [Function("removeUint")] + public class RemoveUintFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class RemoveUint1Function : RemoveUint1FunctionBase { } + + [Function("removeUint")] + public class RemoveUint1FunctionBase : FunctionMessage + { + [Parameter("bytes32", "setKey", 1)] + public virtual byte[] SetKey { get; set; } + [Parameter("uint256", "value", 2)] + public virtual BigInteger Value { get; set; } + } + + public partial class RemoveUintArrayFunction : RemoveUintArrayFunctionBase { } + + [Function("removeUintArray")] + public class RemoveUintArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + } + + public partial class RoleStoreFunction : RoleStoreFunctionBase { } + + [Function("roleStore", "address")] + public class RoleStoreFunctionBase : FunctionMessage + { + + } + + public partial class SetAddressFunction : SetAddressFunctionBase { } + + [Function("setAddress", "address")] + public class SetAddressFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("address", "value", 2)] + public virtual string Value { get; set; } + } + + public partial class SetAddressArrayFunction : SetAddressArrayFunctionBase { } + + [Function("setAddressArray")] + public class SetAddressArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("address[]", "value", 2)] + public virtual List Value { get; set; } + } + + public partial class SetBoolFunction : SetBoolFunctionBase { } + + [Function("setBool", "bool")] + public class SetBoolFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("bool", "value", 2)] + public virtual bool Value { get; set; } + } + + public partial class SetBoolArrayFunction : SetBoolArrayFunctionBase { } + + [Function("setBoolArray")] + public class SetBoolArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("bool[]", "value", 2)] + public virtual List Value { get; set; } + } + + public partial class SetBytes32Function : SetBytes32FunctionBase { } + + [Function("setBytes32", "bytes32")] + public class SetBytes32FunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("bytes32", "value", 2)] + public virtual byte[] Value { get; set; } + } + + public partial class SetBytes32ArrayFunction : SetBytes32ArrayFunctionBase { } + + [Function("setBytes32Array")] + public class SetBytes32ArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("bytes32[]", "value", 2)] + public virtual List Value { get; set; } + } + + public partial class SetIntFunction : SetIntFunctionBase { } + + [Function("setInt", "int256")] + public class SetIntFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("int256", "value", 2)] + public virtual BigInteger Value { get; set; } + } + + public partial class SetIntArrayFunction : SetIntArrayFunctionBase { } + + [Function("setIntArray")] + public class SetIntArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("int256[]", "value", 2)] + public virtual List Value { get; set; } + } + + public partial class SetStringFunction : SetStringFunctionBase { } + + [Function("setString", "string")] + public class SetStringFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("string", "value", 2)] + public virtual string Value { get; set; } + } + + public partial class SetStringArrayFunction : SetStringArrayFunctionBase { } + + [Function("setStringArray")] + public class SetStringArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("string[]", "value", 2)] + public virtual List Value { get; set; } + } + + public partial class SetUintFunction : SetUintFunctionBase { } + + [Function("setUint", "uint256")] + public class SetUintFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("uint256", "value", 2)] + public virtual BigInteger Value { get; set; } + } + + public partial class SetUintArrayFunction : SetUintArrayFunctionBase { } + + [Function("setUintArray")] + public class SetUintArrayFunctionBase : FunctionMessage + { + [Parameter("bytes32", "key", 1)] + public virtual byte[] Key { get; set; } + [Parameter("uint256[]", "value", 2)] + public virtual List Value { get; set; } + } + + public partial class StringArrayValuesFunction : StringArrayValuesFunctionBase { } + + [Function("stringArrayValues", "string")] + public class StringArrayValuesFunctionBase : FunctionMessage + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + [Parameter("uint256", "", 2)] + public virtual BigInteger ReturnValue2 { get; set; } + } + + public partial class StringValuesFunction : StringValuesFunctionBase { } + + [Function("stringValues", "string")] + public class StringValuesFunctionBase : FunctionMessage + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + } + + public partial class UintArrayValuesFunction : UintArrayValuesFunctionBase { } + + [Function("uintArrayValues", "uint256")] + public class UintArrayValuesFunctionBase : FunctionMessage + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + [Parameter("uint256", "", 2)] + public virtual BigInteger ReturnValue2 { get; set; } + } + + public partial class UintValuesFunction : UintValuesFunctionBase { } + + [Function("uintValues", "uint256")] + public class UintValuesFunctionBase : FunctionMessage + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + } + + public partial class UnauthorizedError : UnauthorizedErrorBase { } + + [Error("Unauthorized")] + public class UnauthorizedErrorBase : IErrorDTO + { + [Parameter("address", "msgSender", 1)] + public virtual string MsgSender { get; set; } + [Parameter("string", "role", 2)] + public virtual string Role { get; set; } + } + + + + + + + + public partial class AddressArrayValuesOutputDTO : AddressArrayValuesOutputDTOBase { } + + [FunctionOutput] + public class AddressArrayValuesOutputDTOBase : IFunctionOutputDTO + { + [Parameter("address", "", 1)] + public virtual string ReturnValue1 { get; set; } + } + + public partial class AddressValuesOutputDTO : AddressValuesOutputDTOBase { } + + [FunctionOutput] + public class AddressValuesOutputDTOBase : IFunctionOutputDTO + { + [Parameter("address", "", 1)] + public virtual string ReturnValue1 { get; set; } + } + + + + + + + + + + public partial class BoolArrayValuesOutputDTO : BoolArrayValuesOutputDTOBase { } + + [FunctionOutput] + public class BoolArrayValuesOutputDTOBase : IFunctionOutputDTO + { + [Parameter("bool", "", 1)] + public virtual bool ReturnValue1 { get; set; } + } + + public partial class BoolValuesOutputDTO : BoolValuesOutputDTOBase { } + + [FunctionOutput] + public class BoolValuesOutputDTOBase : IFunctionOutputDTO + { + [Parameter("bool", "", 1)] + public virtual bool ReturnValue1 { get; set; } + } + + public partial class Bytes32ArrayValuesOutputDTO : Bytes32ArrayValuesOutputDTOBase { } + + [FunctionOutput] + public class Bytes32ArrayValuesOutputDTOBase : IFunctionOutputDTO + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + } + + public partial class Bytes32ValuesOutputDTO : Bytes32ValuesOutputDTOBase { } + + [FunctionOutput] + public class Bytes32ValuesOutputDTOBase : IFunctionOutputDTO + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + } + + public partial class ContainsAddressOutputDTO : ContainsAddressOutputDTOBase { } + + [FunctionOutput] + public class ContainsAddressOutputDTOBase : IFunctionOutputDTO + { + [Parameter("bool", "", 1)] + public virtual bool ReturnValue1 { get; set; } + } + + public partial class ContainsBytes32OutputDTO : ContainsBytes32OutputDTOBase { } + + [FunctionOutput] + public class ContainsBytes32OutputDTOBase : IFunctionOutputDTO + { + [Parameter("bool", "", 1)] + public virtual bool ReturnValue1 { get; set; } + } + + public partial class ContainsUintOutputDTO : ContainsUintOutputDTOBase { } + + [FunctionOutput] + public class ContainsUintOutputDTOBase : IFunctionOutputDTO + { + [Parameter("bool", "", 1)] + public virtual bool ReturnValue1 { get; set; } + } + + + + + + public partial class GetAddressOutputDTO : GetAddressOutputDTOBase { } + + [FunctionOutput] + public class GetAddressOutputDTOBase : IFunctionOutputDTO + { + [Parameter("address", "", 1)] + public virtual string ReturnValue1 { get; set; } + } + + public partial class GetAddressArrayOutputDTO : GetAddressArrayOutputDTOBase { } + + [FunctionOutput] + public class GetAddressArrayOutputDTOBase : IFunctionOutputDTO + { + [Parameter("address[]", "", 1)] + public virtual List ReturnValue1 { get; set; } + } + + public partial class GetAddressCountOutputDTO : GetAddressCountOutputDTOBase { } + + [FunctionOutput] + public class GetAddressCountOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "", 1)] + public virtual BigInteger ReturnValue1 { get; set; } + } + + public partial class GetAddressValuesAtOutputDTO : GetAddressValuesAtOutputDTOBase { } + + [FunctionOutput] + public class GetAddressValuesAtOutputDTOBase : IFunctionOutputDTO + { + [Parameter("address[]", "", 1)] + public virtual List ReturnValue1 { get; set; } + } + + public partial class GetBoolOutputDTO : GetBoolOutputDTOBase { } + + [FunctionOutput] + public class GetBoolOutputDTOBase : IFunctionOutputDTO + { + [Parameter("bool", "", 1)] + public virtual bool ReturnValue1 { get; set; } + } + + public partial class GetBoolArrayOutputDTO : GetBoolArrayOutputDTOBase { } + + [FunctionOutput] + public class GetBoolArrayOutputDTOBase : IFunctionOutputDTO + { + [Parameter("bool[]", "", 1)] + public virtual List ReturnValue1 { get; set; } + } + + public partial class GetBytes32OutputDTO : GetBytes32OutputDTOBase { } + + [FunctionOutput] + public class GetBytes32OutputDTOBase : IFunctionOutputDTO + { + [Parameter("bytes32", "", 1)] + public virtual byte[] ReturnValue1 { get; set; } + } + + public partial class GetBytes32ArrayOutputDTO : GetBytes32ArrayOutputDTOBase { } + + [FunctionOutput] + public class GetBytes32ArrayOutputDTOBase : IFunctionOutputDTO + { + [Parameter("bytes32[]", "", 1)] + public virtual List ReturnValue1 { get; set; } + } + + public partial class GetBytes32CountOutputDTO : GetBytes32CountOutputDTOBase { } + + [FunctionOutput] + public class GetBytes32CountOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "", 1)] + public virtual BigInteger ReturnValue1 { get; set; } + } + + public partial class GetBytes32ValuesAtOutputDTO : GetBytes32ValuesAtOutputDTOBase { } + + [FunctionOutput] + public class GetBytes32ValuesAtOutputDTOBase : IFunctionOutputDTO + { + [Parameter("bytes32[]", "", 1)] + public virtual List ReturnValue1 { get; set; } + } + + public partial class GetIntOutputDTO : GetIntOutputDTOBase { } + + [FunctionOutput] + public class GetIntOutputDTOBase : IFunctionOutputDTO + { + [Parameter("int256", "", 1)] + public virtual BigInteger ReturnValue1 { get; set; } + } + + public partial class GetIntArrayOutputDTO : GetIntArrayOutputDTOBase { } + + [FunctionOutput] + public class GetIntArrayOutputDTOBase : IFunctionOutputDTO + { + [Parameter("int256[]", "", 1)] + public virtual List ReturnValue1 { get; set; } + } + + public partial class GetStringOutputDTO : GetStringOutputDTOBase { } + + [FunctionOutput] + public class GetStringOutputDTOBase : IFunctionOutputDTO + { + [Parameter("string", "", 1)] + public virtual string ReturnValue1 { get; set; } + } + + public partial class GetStringArrayOutputDTO : GetStringArrayOutputDTOBase { } + + [FunctionOutput] + public class GetStringArrayOutputDTOBase : IFunctionOutputDTO + { + [Parameter("string[]", "", 1)] + public virtual List ReturnValue1 { get; set; } + } + + public partial class GetUintOutputDTO : GetUintOutputDTOBase { } + + [FunctionOutput] + public class GetUintOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "", 1)] + public virtual BigInteger ReturnValue1 { get; set; } + } + + public partial class GetUintArrayOutputDTO : GetUintArrayOutputDTOBase { } + + [FunctionOutput] + public class GetUintArrayOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256[]", "", 1)] + public virtual List ReturnValue1 { get; set; } + } + + public partial class GetUintCountOutputDTO : GetUintCountOutputDTOBase { } + + [FunctionOutput] + public class GetUintCountOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "", 1)] + public virtual BigInteger ReturnValue1 { get; set; } + } + + public partial class GetUintValuesAtOutputDTO : GetUintValuesAtOutputDTOBase { } + + [FunctionOutput] + public class GetUintValuesAtOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256[]", "", 1)] + public virtual List ReturnValue1 { get; set; } + } + + + + + + public partial class IntArrayValuesOutputDTO : IntArrayValuesOutputDTOBase { } + + [FunctionOutput] + public class IntArrayValuesOutputDTOBase : IFunctionOutputDTO + { + [Parameter("int256", "", 1)] + public virtual BigInteger ReturnValue1 { get; set; } + } + + public partial class IntValuesOutputDTO : IntValuesOutputDTOBase { } + + [FunctionOutput] + public class IntValuesOutputDTOBase : IFunctionOutputDTO + { + [Parameter("int256", "", 1)] + public virtual BigInteger ReturnValue1 { get; set; } + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + public partial class RoleStoreOutputDTO : RoleStoreOutputDTOBase { } + + [FunctionOutput] + public class RoleStoreOutputDTOBase : IFunctionOutputDTO + { + [Parameter("address", "", 1)] + public virtual string ReturnValue1 { get; set; } + } + + + + + + + + + + + + + + + + + + + + + + + + + + public partial class StringArrayValuesOutputDTO : StringArrayValuesOutputDTOBase { } + + [FunctionOutput] + public class StringArrayValuesOutputDTOBase : IFunctionOutputDTO + { + [Parameter("string", "", 1)] + public virtual string ReturnValue1 { get; set; } + } + + public partial class StringValuesOutputDTO : StringValuesOutputDTOBase { } + + [FunctionOutput] + public class StringValuesOutputDTOBase : IFunctionOutputDTO + { + [Parameter("string", "", 1)] + public virtual string ReturnValue1 { get; set; } + } + + public partial class UintArrayValuesOutputDTO : UintArrayValuesOutputDTOBase { } + + [FunctionOutput] + public class UintArrayValuesOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "", 1)] + public virtual BigInteger ReturnValue1 { get; set; } + } + + public partial class UintValuesOutputDTO : UintValuesOutputDTOBase { } + + [FunctionOutput] + public class UintValuesOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "", 1)] + public virtual BigInteger ReturnValue1 { get; set; } + } +} diff --git a/src/Managing.ABI.GmxV2/DataStore/DataStoreService.cs b/src/Managing.ABI.GmxV2/DataStore/DataStoreService.cs new file mode 100644 index 0000000..ba5ef18 --- /dev/null +++ b/src/Managing.ABI.GmxV2/DataStore/DataStoreService.cs @@ -0,0 +1,1655 @@ +using System.Numerics; +using Managing.ABI.GmxV2.DataStore.ContractDefinition; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace Managing.ABI.GmxV2.DataStore +{ + public partial class DataStoreService: ContractWeb3ServiceBase + { + public static Task DeployContractAndWaitForReceiptAsync(Nethereum.Web3.IWeb3 web3, DataStoreDeployment dataStoreDeployment, CancellationTokenSource cancellationTokenSource = null) + { + return web3.Eth.GetContractDeploymentHandler().SendRequestAndWaitForReceiptAsync(dataStoreDeployment, cancellationTokenSource); + } + + public static Task DeployContractAsync(Nethereum.Web3.IWeb3 web3, DataStoreDeployment dataStoreDeployment) + { + return web3.Eth.GetContractDeploymentHandler().SendRequestAsync(dataStoreDeployment); + } + + public static async Task DeployContractAndGetServiceAsync(Nethereum.Web3.IWeb3 web3, DataStoreDeployment dataStoreDeployment, CancellationTokenSource cancellationTokenSource = null) + { + var receipt = await DeployContractAndWaitForReceiptAsync(web3, dataStoreDeployment, cancellationTokenSource); + return new DataStoreService(web3, receipt.ContractAddress); + } + + public DataStoreService(Nethereum.Web3.IWeb3 web3, string contractAddress) : base(web3, contractAddress) + { + } + + public Task AddAddressRequestAsync(AddAddressFunction addAddressFunction) + { + return ContractHandler.SendRequestAsync(addAddressFunction); + } + + public Task AddAddressRequestAndWaitForReceiptAsync(AddAddressFunction addAddressFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(addAddressFunction, cancellationToken); + } + + public Task AddAddressRequestAsync(byte[] setKey, string value) + { + var addAddressFunction = new AddAddressFunction(); + addAddressFunction.SetKey = setKey; + addAddressFunction.Value = value; + + return ContractHandler.SendRequestAsync(addAddressFunction); + } + + public Task AddAddressRequestAndWaitForReceiptAsync(byte[] setKey, string value, CancellationTokenSource cancellationToken = null) + { + var addAddressFunction = new AddAddressFunction(); + addAddressFunction.SetKey = setKey; + addAddressFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(addAddressFunction, cancellationToken); + } + + public Task AddBytes32RequestAsync(AddBytes32Function addBytes32Function) + { + return ContractHandler.SendRequestAsync(addBytes32Function); + } + + public Task AddBytes32RequestAndWaitForReceiptAsync(AddBytes32Function addBytes32Function, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(addBytes32Function, cancellationToken); + } + + public Task AddBytes32RequestAsync(byte[] setKey, byte[] value) + { + var addBytes32Function = new AddBytes32Function(); + addBytes32Function.SetKey = setKey; + addBytes32Function.Value = value; + + return ContractHandler.SendRequestAsync(addBytes32Function); + } + + public Task AddBytes32RequestAndWaitForReceiptAsync(byte[] setKey, byte[] value, CancellationTokenSource cancellationToken = null) + { + var addBytes32Function = new AddBytes32Function(); + addBytes32Function.SetKey = setKey; + addBytes32Function.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(addBytes32Function, cancellationToken); + } + + public Task AddUintRequestAsync(AddUintFunction addUintFunction) + { + return ContractHandler.SendRequestAsync(addUintFunction); + } + + public Task AddUintRequestAndWaitForReceiptAsync(AddUintFunction addUintFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(addUintFunction, cancellationToken); + } + + public Task AddUintRequestAsync(byte[] setKey, BigInteger value) + { + var addUintFunction = new AddUintFunction(); + addUintFunction.SetKey = setKey; + addUintFunction.Value = value; + + return ContractHandler.SendRequestAsync(addUintFunction); + } + + public Task AddUintRequestAndWaitForReceiptAsync(byte[] setKey, BigInteger value, CancellationTokenSource cancellationToken = null) + { + var addUintFunction = new AddUintFunction(); + addUintFunction.SetKey = setKey; + addUintFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(addUintFunction, cancellationToken); + } + + public Task AddressArrayValuesQueryAsync(AddressArrayValuesFunction addressArrayValuesFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(addressArrayValuesFunction, blockParameter); + } + + + public Task AddressArrayValuesQueryAsync(byte[] returnValue1, BigInteger returnValue2, BlockParameter blockParameter = null) + { + var addressArrayValuesFunction = new AddressArrayValuesFunction(); + addressArrayValuesFunction.ReturnValue1 = returnValue1; + addressArrayValuesFunction.ReturnValue2 = returnValue2; + + return ContractHandler.QueryAsync(addressArrayValuesFunction, blockParameter); + } + + public Task AddressValuesQueryAsync(AddressValuesFunction addressValuesFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(addressValuesFunction, blockParameter); + } + + + public Task AddressValuesQueryAsync(byte[] returnValue1, BlockParameter blockParameter = null) + { + var addressValuesFunction = new AddressValuesFunction(); + addressValuesFunction.ReturnValue1 = returnValue1; + + return ContractHandler.QueryAsync(addressValuesFunction, blockParameter); + } + + public Task ApplyBoundedDeltaToUintRequestAsync(ApplyBoundedDeltaToUintFunction applyBoundedDeltaToUintFunction) + { + return ContractHandler.SendRequestAsync(applyBoundedDeltaToUintFunction); + } + + public Task ApplyBoundedDeltaToUintRequestAndWaitForReceiptAsync(ApplyBoundedDeltaToUintFunction applyBoundedDeltaToUintFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(applyBoundedDeltaToUintFunction, cancellationToken); + } + + public Task ApplyBoundedDeltaToUintRequestAsync(byte[] key, BigInteger value) + { + var applyBoundedDeltaToUintFunction = new ApplyBoundedDeltaToUintFunction(); + applyBoundedDeltaToUintFunction.Key = key; + applyBoundedDeltaToUintFunction.Value = value; + + return ContractHandler.SendRequestAsync(applyBoundedDeltaToUintFunction); + } + + public Task ApplyBoundedDeltaToUintRequestAndWaitForReceiptAsync(byte[] key, BigInteger value, CancellationTokenSource cancellationToken = null) + { + var applyBoundedDeltaToUintFunction = new ApplyBoundedDeltaToUintFunction(); + applyBoundedDeltaToUintFunction.Key = key; + applyBoundedDeltaToUintFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(applyBoundedDeltaToUintFunction, cancellationToken); + } + + public Task ApplyDeltaToIntRequestAsync(ApplyDeltaToIntFunction applyDeltaToIntFunction) + { + return ContractHandler.SendRequestAsync(applyDeltaToIntFunction); + } + + public Task ApplyDeltaToIntRequestAndWaitForReceiptAsync(ApplyDeltaToIntFunction applyDeltaToIntFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(applyDeltaToIntFunction, cancellationToken); + } + + public Task ApplyDeltaToIntRequestAsync(byte[] key, BigInteger value) + { + var applyDeltaToIntFunction = new ApplyDeltaToIntFunction(); + applyDeltaToIntFunction.Key = key; + applyDeltaToIntFunction.Value = value; + + return ContractHandler.SendRequestAsync(applyDeltaToIntFunction); + } + + public Task ApplyDeltaToIntRequestAndWaitForReceiptAsync(byte[] key, BigInteger value, CancellationTokenSource cancellationToken = null) + { + var applyDeltaToIntFunction = new ApplyDeltaToIntFunction(); + applyDeltaToIntFunction.Key = key; + applyDeltaToIntFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(applyDeltaToIntFunction, cancellationToken); + } + + public Task ApplyDeltaToUintRequestAsync(ApplyDeltaToUint1Function applyDeltaToUint1Function) + { + return ContractHandler.SendRequestAsync(applyDeltaToUint1Function); + } + + public Task ApplyDeltaToUintRequestAndWaitForReceiptAsync(ApplyDeltaToUint1Function applyDeltaToUint1Function, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(applyDeltaToUint1Function, cancellationToken); + } + + public Task ApplyDeltaToUintRequestAsync(byte[] key, BigInteger value, string errorMessage) + { + var applyDeltaToUint1Function = new ApplyDeltaToUint1Function(); + applyDeltaToUint1Function.Key = key; + applyDeltaToUint1Function.Value = value; + applyDeltaToUint1Function.ErrorMessage = errorMessage; + + return ContractHandler.SendRequestAsync(applyDeltaToUint1Function); + } + + public Task ApplyDeltaToUintRequestAndWaitForReceiptAsync(byte[] key, BigInteger value, string errorMessage, CancellationTokenSource cancellationToken = null) + { + var applyDeltaToUint1Function = new ApplyDeltaToUint1Function(); + applyDeltaToUint1Function.Key = key; + applyDeltaToUint1Function.Value = value; + applyDeltaToUint1Function.ErrorMessage = errorMessage; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(applyDeltaToUint1Function, cancellationToken); + } + + public Task ApplyDeltaToUintRequestAsync(ApplyDeltaToUintFunction applyDeltaToUintFunction) + { + return ContractHandler.SendRequestAsync(applyDeltaToUintFunction); + } + + public Task ApplyDeltaToUintRequestAndWaitForReceiptAsync(ApplyDeltaToUintFunction applyDeltaToUintFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(applyDeltaToUintFunction, cancellationToken); + } + + public Task ApplyDeltaToUintRequestAsync(byte[] key, BigInteger value) + { + var applyDeltaToUintFunction = new ApplyDeltaToUintFunction(); + applyDeltaToUintFunction.Key = key; + applyDeltaToUintFunction.Value = value; + + return ContractHandler.SendRequestAsync(applyDeltaToUintFunction); + } + + public Task ApplyDeltaToUintRequestAndWaitForReceiptAsync(byte[] key, BigInteger value, CancellationTokenSource cancellationToken = null) + { + var applyDeltaToUintFunction = new ApplyDeltaToUintFunction(); + applyDeltaToUintFunction.Key = key; + applyDeltaToUintFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(applyDeltaToUintFunction, cancellationToken); + } + + public Task BoolArrayValuesQueryAsync(BoolArrayValuesFunction boolArrayValuesFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(boolArrayValuesFunction, blockParameter); + } + + + public Task BoolArrayValuesQueryAsync(byte[] returnValue1, BigInteger returnValue2, BlockParameter blockParameter = null) + { + var boolArrayValuesFunction = new BoolArrayValuesFunction(); + boolArrayValuesFunction.ReturnValue1 = returnValue1; + boolArrayValuesFunction.ReturnValue2 = returnValue2; + + return ContractHandler.QueryAsync(boolArrayValuesFunction, blockParameter); + } + + public Task BoolValuesQueryAsync(BoolValuesFunction boolValuesFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(boolValuesFunction, blockParameter); + } + + + public Task BoolValuesQueryAsync(byte[] returnValue1, BlockParameter blockParameter = null) + { + var boolValuesFunction = new BoolValuesFunction(); + boolValuesFunction.ReturnValue1 = returnValue1; + + return ContractHandler.QueryAsync(boolValuesFunction, blockParameter); + } + + public Task Bytes32ArrayValuesQueryAsync(Bytes32ArrayValuesFunction bytes32ArrayValuesFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(bytes32ArrayValuesFunction, blockParameter); + } + + + public Task Bytes32ArrayValuesQueryAsync(byte[] returnValue1, BigInteger returnValue2, BlockParameter blockParameter = null) + { + var bytes32ArrayValuesFunction = new Bytes32ArrayValuesFunction(); + bytes32ArrayValuesFunction.ReturnValue1 = returnValue1; + bytes32ArrayValuesFunction.ReturnValue2 = returnValue2; + + return ContractHandler.QueryAsync(bytes32ArrayValuesFunction, blockParameter); + } + + public Task Bytes32ValuesQueryAsync(Bytes32ValuesFunction bytes32ValuesFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(bytes32ValuesFunction, blockParameter); + } + + + public Task Bytes32ValuesQueryAsync(byte[] returnValue1, BlockParameter blockParameter = null) + { + var bytes32ValuesFunction = new Bytes32ValuesFunction(); + bytes32ValuesFunction.ReturnValue1 = returnValue1; + + return ContractHandler.QueryAsync(bytes32ValuesFunction, blockParameter); + } + + public Task ContainsAddressQueryAsync(ContainsAddressFunction containsAddressFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(containsAddressFunction, blockParameter); + } + + + public Task ContainsAddressQueryAsync(byte[] setKey, string value, BlockParameter blockParameter = null) + { + var containsAddressFunction = new ContainsAddressFunction(); + containsAddressFunction.SetKey = setKey; + containsAddressFunction.Value = value; + + return ContractHandler.QueryAsync(containsAddressFunction, blockParameter); + } + + public Task ContainsBytes32QueryAsync(ContainsBytes32Function containsBytes32Function, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(containsBytes32Function, blockParameter); + } + + + public Task ContainsBytes32QueryAsync(byte[] setKey, byte[] value, BlockParameter blockParameter = null) + { + var containsBytes32Function = new ContainsBytes32Function(); + containsBytes32Function.SetKey = setKey; + containsBytes32Function.Value = value; + + return ContractHandler.QueryAsync(containsBytes32Function, blockParameter); + } + + public Task ContainsUintQueryAsync(ContainsUintFunction containsUintFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(containsUintFunction, blockParameter); + } + + + public Task ContainsUintQueryAsync(byte[] setKey, BigInteger value, BlockParameter blockParameter = null) + { + var containsUintFunction = new ContainsUintFunction(); + containsUintFunction.SetKey = setKey; + containsUintFunction.Value = value; + + return ContractHandler.QueryAsync(containsUintFunction, blockParameter); + } + + public Task DecrementIntRequestAsync(DecrementIntFunction decrementIntFunction) + { + return ContractHandler.SendRequestAsync(decrementIntFunction); + } + + public Task DecrementIntRequestAndWaitForReceiptAsync(DecrementIntFunction decrementIntFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(decrementIntFunction, cancellationToken); + } + + public Task DecrementIntRequestAsync(byte[] key, BigInteger value) + { + var decrementIntFunction = new DecrementIntFunction(); + decrementIntFunction.Key = key; + decrementIntFunction.Value = value; + + return ContractHandler.SendRequestAsync(decrementIntFunction); + } + + public Task DecrementIntRequestAndWaitForReceiptAsync(byte[] key, BigInteger value, CancellationTokenSource cancellationToken = null) + { + var decrementIntFunction = new DecrementIntFunction(); + decrementIntFunction.Key = key; + decrementIntFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(decrementIntFunction, cancellationToken); + } + + public Task DecrementUintRequestAsync(DecrementUintFunction decrementUintFunction) + { + return ContractHandler.SendRequestAsync(decrementUintFunction); + } + + public Task DecrementUintRequestAndWaitForReceiptAsync(DecrementUintFunction decrementUintFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(decrementUintFunction, cancellationToken); + } + + public Task DecrementUintRequestAsync(byte[] key, BigInteger value) + { + var decrementUintFunction = new DecrementUintFunction(); + decrementUintFunction.Key = key; + decrementUintFunction.Value = value; + + return ContractHandler.SendRequestAsync(decrementUintFunction); + } + + public Task DecrementUintRequestAndWaitForReceiptAsync(byte[] key, BigInteger value, CancellationTokenSource cancellationToken = null) + { + var decrementUintFunction = new DecrementUintFunction(); + decrementUintFunction.Key = key; + decrementUintFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(decrementUintFunction, cancellationToken); + } + + public Task GetAddressQueryAsync(GetAddressFunction getAddressFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getAddressFunction, blockParameter); + } + + + public Task GetAddressQueryAsync(byte[] key, BlockParameter blockParameter = null) + { + var getAddressFunction = new GetAddressFunction(); + getAddressFunction.Key = key; + + return ContractHandler.QueryAsync(getAddressFunction, blockParameter); + } + + public Task> GetAddressArrayQueryAsync(GetAddressArrayFunction getAddressArrayFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync>(getAddressArrayFunction, blockParameter); + } + + + public Task> GetAddressArrayQueryAsync(byte[] key, BlockParameter blockParameter = null) + { + var getAddressArrayFunction = new GetAddressArrayFunction(); + getAddressArrayFunction.Key = key; + + return ContractHandler.QueryAsync>(getAddressArrayFunction, blockParameter); + } + + public Task GetAddressCountQueryAsync(GetAddressCountFunction getAddressCountFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getAddressCountFunction, blockParameter); + } + + + public Task GetAddressCountQueryAsync(byte[] setKey, BlockParameter blockParameter = null) + { + var getAddressCountFunction = new GetAddressCountFunction(); + getAddressCountFunction.SetKey = setKey; + + return ContractHandler.QueryAsync(getAddressCountFunction, blockParameter); + } + + public Task> GetAddressValuesAtQueryAsync(GetAddressValuesAtFunction getAddressValuesAtFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync>(getAddressValuesAtFunction, blockParameter); + } + + + public Task> GetAddressValuesAtQueryAsync(byte[] setKey, BigInteger start, BigInteger end, BlockParameter blockParameter = null) + { + var getAddressValuesAtFunction = new GetAddressValuesAtFunction(); + getAddressValuesAtFunction.SetKey = setKey; + getAddressValuesAtFunction.Start = start; + getAddressValuesAtFunction.End = end; + + return ContractHandler.QueryAsync>(getAddressValuesAtFunction, blockParameter); + } + + public Task GetBoolQueryAsync(GetBoolFunction getBoolFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getBoolFunction, blockParameter); + } + + + public Task GetBoolQueryAsync(byte[] key, BlockParameter blockParameter = null) + { + var getBoolFunction = new GetBoolFunction(); + getBoolFunction.Key = key; + + return ContractHandler.QueryAsync(getBoolFunction, blockParameter); + } + + public Task> GetBoolArrayQueryAsync(GetBoolArrayFunction getBoolArrayFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync>(getBoolArrayFunction, blockParameter); + } + + + public Task> GetBoolArrayQueryAsync(byte[] key, BlockParameter blockParameter = null) + { + var getBoolArrayFunction = new GetBoolArrayFunction(); + getBoolArrayFunction.Key = key; + + return ContractHandler.QueryAsync>(getBoolArrayFunction, blockParameter); + } + + public Task GetBytes32QueryAsync(GetBytes32Function getBytes32Function, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getBytes32Function, blockParameter); + } + + + public Task GetBytes32QueryAsync(byte[] key, BlockParameter blockParameter = null) + { + var getBytes32Function = new GetBytes32Function(); + getBytes32Function.Key = key; + + return ContractHandler.QueryAsync(getBytes32Function, blockParameter); + } + + public Task> GetBytes32ArrayQueryAsync(GetBytes32ArrayFunction getBytes32ArrayFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync>(getBytes32ArrayFunction, blockParameter); + } + + + public Task> GetBytes32ArrayQueryAsync(byte[] key, BlockParameter blockParameter = null) + { + var getBytes32ArrayFunction = new GetBytes32ArrayFunction(); + getBytes32ArrayFunction.Key = key; + + return ContractHandler.QueryAsync>(getBytes32ArrayFunction, blockParameter); + } + + public Task GetBytes32CountQueryAsync(GetBytes32CountFunction getBytes32CountFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getBytes32CountFunction, blockParameter); + } + + + public Task GetBytes32CountQueryAsync(byte[] setKey, BlockParameter blockParameter = null) + { + var getBytes32CountFunction = new GetBytes32CountFunction(); + getBytes32CountFunction.SetKey = setKey; + + return ContractHandler.QueryAsync(getBytes32CountFunction, blockParameter); + } + + public Task> GetBytes32ValuesAtQueryAsync(GetBytes32ValuesAtFunction getBytes32ValuesAtFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync>(getBytes32ValuesAtFunction, blockParameter); + } + + + public Task> GetBytes32ValuesAtQueryAsync(byte[] setKey, BigInteger start, BigInteger end, BlockParameter blockParameter = null) + { + var getBytes32ValuesAtFunction = new GetBytes32ValuesAtFunction(); + getBytes32ValuesAtFunction.SetKey = setKey; + getBytes32ValuesAtFunction.Start = start; + getBytes32ValuesAtFunction.End = end; + + return ContractHandler.QueryAsync>(getBytes32ValuesAtFunction, blockParameter); + } + + public Task GetIntQueryAsync(GetIntFunction getIntFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getIntFunction, blockParameter); + } + + + public Task GetIntQueryAsync(byte[] key, BlockParameter blockParameter = null) + { + var getIntFunction = new GetIntFunction(); + getIntFunction.Key = key; + + return ContractHandler.QueryAsync(getIntFunction, blockParameter); + } + + public Task> GetIntArrayQueryAsync(GetIntArrayFunction getIntArrayFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync>(getIntArrayFunction, blockParameter); + } + + + public Task> GetIntArrayQueryAsync(byte[] key, BlockParameter blockParameter = null) + { + var getIntArrayFunction = new GetIntArrayFunction(); + getIntArrayFunction.Key = key; + + return ContractHandler.QueryAsync>(getIntArrayFunction, blockParameter); + } + + public Task GetStringQueryAsync(GetStringFunction getStringFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getStringFunction, blockParameter); + } + + + public Task GetStringQueryAsync(byte[] key, BlockParameter blockParameter = null) + { + var getStringFunction = new GetStringFunction(); + getStringFunction.Key = key; + + return ContractHandler.QueryAsync(getStringFunction, blockParameter); + } + + public Task> GetStringArrayQueryAsync(GetStringArrayFunction getStringArrayFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync>(getStringArrayFunction, blockParameter); + } + + + public Task> GetStringArrayQueryAsync(byte[] key, BlockParameter blockParameter = null) + { + var getStringArrayFunction = new GetStringArrayFunction(); + getStringArrayFunction.Key = key; + + return ContractHandler.QueryAsync>(getStringArrayFunction, blockParameter); + } + + public Task GetUintQueryAsync(GetUintFunction getUintFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getUintFunction, blockParameter); + } + + + public Task GetUintQueryAsync(byte[] key, BlockParameter blockParameter = null) + { + var getUintFunction = new GetUintFunction(); + getUintFunction.Key = key; + + return ContractHandler.QueryAsync(getUintFunction, blockParameter); + } + + public Task> GetUintArrayQueryAsync(GetUintArrayFunction getUintArrayFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync>(getUintArrayFunction, blockParameter); + } + + + public Task> GetUintArrayQueryAsync(byte[] key, BlockParameter blockParameter = null) + { + var getUintArrayFunction = new GetUintArrayFunction(); + getUintArrayFunction.Key = key; + + return ContractHandler.QueryAsync>(getUintArrayFunction, blockParameter); + } + + public Task GetUintCountQueryAsync(GetUintCountFunction getUintCountFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getUintCountFunction, blockParameter); + } + + + public Task GetUintCountQueryAsync(byte[] setKey, BlockParameter blockParameter = null) + { + var getUintCountFunction = new GetUintCountFunction(); + getUintCountFunction.SetKey = setKey; + + return ContractHandler.QueryAsync(getUintCountFunction, blockParameter); + } + + public Task> GetUintValuesAtQueryAsync(GetUintValuesAtFunction getUintValuesAtFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync>(getUintValuesAtFunction, blockParameter); + } + + + public Task> GetUintValuesAtQueryAsync(byte[] setKey, BigInteger start, BigInteger end, BlockParameter blockParameter = null) + { + var getUintValuesAtFunction = new GetUintValuesAtFunction(); + getUintValuesAtFunction.SetKey = setKey; + getUintValuesAtFunction.Start = start; + getUintValuesAtFunction.End = end; + + return ContractHandler.QueryAsync>(getUintValuesAtFunction, blockParameter); + } + + public Task IncrementIntRequestAsync(IncrementIntFunction incrementIntFunction) + { + return ContractHandler.SendRequestAsync(incrementIntFunction); + } + + public Task IncrementIntRequestAndWaitForReceiptAsync(IncrementIntFunction incrementIntFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(incrementIntFunction, cancellationToken); + } + + public Task IncrementIntRequestAsync(byte[] key, BigInteger value) + { + var incrementIntFunction = new IncrementIntFunction(); + incrementIntFunction.Key = key; + incrementIntFunction.Value = value; + + return ContractHandler.SendRequestAsync(incrementIntFunction); + } + + public Task IncrementIntRequestAndWaitForReceiptAsync(byte[] key, BigInteger value, CancellationTokenSource cancellationToken = null) + { + var incrementIntFunction = new IncrementIntFunction(); + incrementIntFunction.Key = key; + incrementIntFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(incrementIntFunction, cancellationToken); + } + + public Task IncrementUintRequestAsync(IncrementUintFunction incrementUintFunction) + { + return ContractHandler.SendRequestAsync(incrementUintFunction); + } + + public Task IncrementUintRequestAndWaitForReceiptAsync(IncrementUintFunction incrementUintFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(incrementUintFunction, cancellationToken); + } + + public Task IncrementUintRequestAsync(byte[] key, BigInteger value) + { + var incrementUintFunction = new IncrementUintFunction(); + incrementUintFunction.Key = key; + incrementUintFunction.Value = value; + + return ContractHandler.SendRequestAsync(incrementUintFunction); + } + + public Task IncrementUintRequestAndWaitForReceiptAsync(byte[] key, BigInteger value, CancellationTokenSource cancellationToken = null) + { + var incrementUintFunction = new IncrementUintFunction(); + incrementUintFunction.Key = key; + incrementUintFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(incrementUintFunction, cancellationToken); + } + + public Task IntArrayValuesQueryAsync(IntArrayValuesFunction intArrayValuesFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(intArrayValuesFunction, blockParameter); + } + + + public Task IntArrayValuesQueryAsync(byte[] returnValue1, BigInteger returnValue2, BlockParameter blockParameter = null) + { + var intArrayValuesFunction = new IntArrayValuesFunction(); + intArrayValuesFunction.ReturnValue1 = returnValue1; + intArrayValuesFunction.ReturnValue2 = returnValue2; + + return ContractHandler.QueryAsync(intArrayValuesFunction, blockParameter); + } + + public Task IntValuesQueryAsync(IntValuesFunction intValuesFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(intValuesFunction, blockParameter); + } + + + public Task IntValuesQueryAsync(byte[] returnValue1, BlockParameter blockParameter = null) + { + var intValuesFunction = new IntValuesFunction(); + intValuesFunction.ReturnValue1 = returnValue1; + + return ContractHandler.QueryAsync(intValuesFunction, blockParameter); + } + + public Task RemoveAddressRequestAsync(RemoveAddress1Function removeAddress1Function) + { + return ContractHandler.SendRequestAsync(removeAddress1Function); + } + + public Task RemoveAddressRequestAndWaitForReceiptAsync(RemoveAddress1Function removeAddress1Function, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeAddress1Function, cancellationToken); + } + + public Task RemoveAddressRequestAsync(byte[] setKey, string value) + { + var removeAddress1Function = new RemoveAddress1Function(); + removeAddress1Function.SetKey = setKey; + removeAddress1Function.Value = value; + + return ContractHandler.SendRequestAsync(removeAddress1Function); + } + + public Task RemoveAddressRequestAndWaitForReceiptAsync(byte[] setKey, string value, CancellationTokenSource cancellationToken = null) + { + var removeAddress1Function = new RemoveAddress1Function(); + removeAddress1Function.SetKey = setKey; + removeAddress1Function.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeAddress1Function, cancellationToken); + } + + public Task RemoveAddressRequestAsync(RemoveAddressFunction removeAddressFunction) + { + return ContractHandler.SendRequestAsync(removeAddressFunction); + } + + public Task RemoveAddressRequestAndWaitForReceiptAsync(RemoveAddressFunction removeAddressFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeAddressFunction, cancellationToken); + } + + public Task RemoveAddressRequestAsync(byte[] key) + { + var removeAddressFunction = new RemoveAddressFunction(); + removeAddressFunction.Key = key; + + return ContractHandler.SendRequestAsync(removeAddressFunction); + } + + public Task RemoveAddressRequestAndWaitForReceiptAsync(byte[] key, CancellationTokenSource cancellationToken = null) + { + var removeAddressFunction = new RemoveAddressFunction(); + removeAddressFunction.Key = key; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeAddressFunction, cancellationToken); + } + + public Task RemoveAddressArrayRequestAsync(RemoveAddressArrayFunction removeAddressArrayFunction) + { + return ContractHandler.SendRequestAsync(removeAddressArrayFunction); + } + + public Task RemoveAddressArrayRequestAndWaitForReceiptAsync(RemoveAddressArrayFunction removeAddressArrayFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeAddressArrayFunction, cancellationToken); + } + + public Task RemoveAddressArrayRequestAsync(byte[] key) + { + var removeAddressArrayFunction = new RemoveAddressArrayFunction(); + removeAddressArrayFunction.Key = key; + + return ContractHandler.SendRequestAsync(removeAddressArrayFunction); + } + + public Task RemoveAddressArrayRequestAndWaitForReceiptAsync(byte[] key, CancellationTokenSource cancellationToken = null) + { + var removeAddressArrayFunction = new RemoveAddressArrayFunction(); + removeAddressArrayFunction.Key = key; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeAddressArrayFunction, cancellationToken); + } + + public Task RemoveBoolRequestAsync(RemoveBoolFunction removeBoolFunction) + { + return ContractHandler.SendRequestAsync(removeBoolFunction); + } + + public Task RemoveBoolRequestAndWaitForReceiptAsync(RemoveBoolFunction removeBoolFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeBoolFunction, cancellationToken); + } + + public Task RemoveBoolRequestAsync(byte[] key) + { + var removeBoolFunction = new RemoveBoolFunction(); + removeBoolFunction.Key = key; + + return ContractHandler.SendRequestAsync(removeBoolFunction); + } + + public Task RemoveBoolRequestAndWaitForReceiptAsync(byte[] key, CancellationTokenSource cancellationToken = null) + { + var removeBoolFunction = new RemoveBoolFunction(); + removeBoolFunction.Key = key; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeBoolFunction, cancellationToken); + } + + public Task RemoveBoolArrayRequestAsync(RemoveBoolArrayFunction removeBoolArrayFunction) + { + return ContractHandler.SendRequestAsync(removeBoolArrayFunction); + } + + public Task RemoveBoolArrayRequestAndWaitForReceiptAsync(RemoveBoolArrayFunction removeBoolArrayFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeBoolArrayFunction, cancellationToken); + } + + public Task RemoveBoolArrayRequestAsync(byte[] key) + { + var removeBoolArrayFunction = new RemoveBoolArrayFunction(); + removeBoolArrayFunction.Key = key; + + return ContractHandler.SendRequestAsync(removeBoolArrayFunction); + } + + public Task RemoveBoolArrayRequestAndWaitForReceiptAsync(byte[] key, CancellationTokenSource cancellationToken = null) + { + var removeBoolArrayFunction = new RemoveBoolArrayFunction(); + removeBoolArrayFunction.Key = key; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeBoolArrayFunction, cancellationToken); + } + + public Task RemoveBytes32RequestAsync(RemoveBytes321Function removeBytes321Function) + { + return ContractHandler.SendRequestAsync(removeBytes321Function); + } + + public Task RemoveBytes32RequestAndWaitForReceiptAsync(RemoveBytes321Function removeBytes321Function, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeBytes321Function, cancellationToken); + } + + public Task RemoveBytes32RequestAsync(byte[] setKey, byte[] value) + { + var removeBytes321Function = new RemoveBytes321Function(); + removeBytes321Function.SetKey = setKey; + removeBytes321Function.Value = value; + + return ContractHandler.SendRequestAsync(removeBytes321Function); + } + + public Task RemoveBytes32RequestAndWaitForReceiptAsync(byte[] setKey, byte[] value, CancellationTokenSource cancellationToken = null) + { + var removeBytes321Function = new RemoveBytes321Function(); + removeBytes321Function.SetKey = setKey; + removeBytes321Function.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeBytes321Function, cancellationToken); + } + + public Task RemoveBytes32RequestAsync(RemoveBytes32Function removeBytes32Function) + { + return ContractHandler.SendRequestAsync(removeBytes32Function); + } + + public Task RemoveBytes32RequestAndWaitForReceiptAsync(RemoveBytes32Function removeBytes32Function, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeBytes32Function, cancellationToken); + } + + public Task RemoveBytes32RequestAsync(byte[] key) + { + var removeBytes32Function = new RemoveBytes32Function(); + removeBytes32Function.Key = key; + + return ContractHandler.SendRequestAsync(removeBytes32Function); + } + + public Task RemoveBytes32RequestAndWaitForReceiptAsync(byte[] key, CancellationTokenSource cancellationToken = null) + { + var removeBytes32Function = new RemoveBytes32Function(); + removeBytes32Function.Key = key; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeBytes32Function, cancellationToken); + } + + public Task RemoveBytes32ArrayRequestAsync(RemoveBytes32ArrayFunction removeBytes32ArrayFunction) + { + return ContractHandler.SendRequestAsync(removeBytes32ArrayFunction); + } + + public Task RemoveBytes32ArrayRequestAndWaitForReceiptAsync(RemoveBytes32ArrayFunction removeBytes32ArrayFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeBytes32ArrayFunction, cancellationToken); + } + + public Task RemoveBytes32ArrayRequestAsync(byte[] key) + { + var removeBytes32ArrayFunction = new RemoveBytes32ArrayFunction(); + removeBytes32ArrayFunction.Key = key; + + return ContractHandler.SendRequestAsync(removeBytes32ArrayFunction); + } + + public Task RemoveBytes32ArrayRequestAndWaitForReceiptAsync(byte[] key, CancellationTokenSource cancellationToken = null) + { + var removeBytes32ArrayFunction = new RemoveBytes32ArrayFunction(); + removeBytes32ArrayFunction.Key = key; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeBytes32ArrayFunction, cancellationToken); + } + + public Task RemoveIntRequestAsync(RemoveIntFunction removeIntFunction) + { + return ContractHandler.SendRequestAsync(removeIntFunction); + } + + public Task RemoveIntRequestAndWaitForReceiptAsync(RemoveIntFunction removeIntFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeIntFunction, cancellationToken); + } + + public Task RemoveIntRequestAsync(byte[] key) + { + var removeIntFunction = new RemoveIntFunction(); + removeIntFunction.Key = key; + + return ContractHandler.SendRequestAsync(removeIntFunction); + } + + public Task RemoveIntRequestAndWaitForReceiptAsync(byte[] key, CancellationTokenSource cancellationToken = null) + { + var removeIntFunction = new RemoveIntFunction(); + removeIntFunction.Key = key; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeIntFunction, cancellationToken); + } + + public Task RemoveIntArrayRequestAsync(RemoveIntArrayFunction removeIntArrayFunction) + { + return ContractHandler.SendRequestAsync(removeIntArrayFunction); + } + + public Task RemoveIntArrayRequestAndWaitForReceiptAsync(RemoveIntArrayFunction removeIntArrayFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeIntArrayFunction, cancellationToken); + } + + public Task RemoveIntArrayRequestAsync(byte[] key) + { + var removeIntArrayFunction = new RemoveIntArrayFunction(); + removeIntArrayFunction.Key = key; + + return ContractHandler.SendRequestAsync(removeIntArrayFunction); + } + + public Task RemoveIntArrayRequestAndWaitForReceiptAsync(byte[] key, CancellationTokenSource cancellationToken = null) + { + var removeIntArrayFunction = new RemoveIntArrayFunction(); + removeIntArrayFunction.Key = key; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeIntArrayFunction, cancellationToken); + } + + public Task RemoveStringRequestAsync(RemoveStringFunction removeStringFunction) + { + return ContractHandler.SendRequestAsync(removeStringFunction); + } + + public Task RemoveStringRequestAndWaitForReceiptAsync(RemoveStringFunction removeStringFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeStringFunction, cancellationToken); + } + + public Task RemoveStringRequestAsync(byte[] key) + { + var removeStringFunction = new RemoveStringFunction(); + removeStringFunction.Key = key; + + return ContractHandler.SendRequestAsync(removeStringFunction); + } + + public Task RemoveStringRequestAndWaitForReceiptAsync(byte[] key, CancellationTokenSource cancellationToken = null) + { + var removeStringFunction = new RemoveStringFunction(); + removeStringFunction.Key = key; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeStringFunction, cancellationToken); + } + + public Task RemoveStringArrayRequestAsync(RemoveStringArrayFunction removeStringArrayFunction) + { + return ContractHandler.SendRequestAsync(removeStringArrayFunction); + } + + public Task RemoveStringArrayRequestAndWaitForReceiptAsync(RemoveStringArrayFunction removeStringArrayFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeStringArrayFunction, cancellationToken); + } + + public Task RemoveStringArrayRequestAsync(byte[] key) + { + var removeStringArrayFunction = new RemoveStringArrayFunction(); + removeStringArrayFunction.Key = key; + + return ContractHandler.SendRequestAsync(removeStringArrayFunction); + } + + public Task RemoveStringArrayRequestAndWaitForReceiptAsync(byte[] key, CancellationTokenSource cancellationToken = null) + { + var removeStringArrayFunction = new RemoveStringArrayFunction(); + removeStringArrayFunction.Key = key; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeStringArrayFunction, cancellationToken); + } + + public Task RemoveUintRequestAsync(RemoveUintFunction removeUintFunction) + { + return ContractHandler.SendRequestAsync(removeUintFunction); + } + + public Task RemoveUintRequestAndWaitForReceiptAsync(RemoveUintFunction removeUintFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeUintFunction, cancellationToken); + } + + public Task RemoveUintRequestAsync(byte[] key) + { + var removeUintFunction = new RemoveUintFunction(); + removeUintFunction.Key = key; + + return ContractHandler.SendRequestAsync(removeUintFunction); + } + + public Task RemoveUintRequestAndWaitForReceiptAsync(byte[] key, CancellationTokenSource cancellationToken = null) + { + var removeUintFunction = new RemoveUintFunction(); + removeUintFunction.Key = key; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeUintFunction, cancellationToken); + } + + public Task RemoveUintRequestAsync(RemoveUint1Function removeUint1Function) + { + return ContractHandler.SendRequestAsync(removeUint1Function); + } + + public Task RemoveUintRequestAndWaitForReceiptAsync(RemoveUint1Function removeUint1Function, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeUint1Function, cancellationToken); + } + + public Task RemoveUintRequestAsync(byte[] setKey, BigInteger value) + { + var removeUint1Function = new RemoveUint1Function(); + removeUint1Function.SetKey = setKey; + removeUint1Function.Value = value; + + return ContractHandler.SendRequestAsync(removeUint1Function); + } + + public Task RemoveUintRequestAndWaitForReceiptAsync(byte[] setKey, BigInteger value, CancellationTokenSource cancellationToken = null) + { + var removeUint1Function = new RemoveUint1Function(); + removeUint1Function.SetKey = setKey; + removeUint1Function.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeUint1Function, cancellationToken); + } + + public Task RemoveUintArrayRequestAsync(RemoveUintArrayFunction removeUintArrayFunction) + { + return ContractHandler.SendRequestAsync(removeUintArrayFunction); + } + + public Task RemoveUintArrayRequestAndWaitForReceiptAsync(RemoveUintArrayFunction removeUintArrayFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeUintArrayFunction, cancellationToken); + } + + public Task RemoveUintArrayRequestAsync(byte[] key) + { + var removeUintArrayFunction = new RemoveUintArrayFunction(); + removeUintArrayFunction.Key = key; + + return ContractHandler.SendRequestAsync(removeUintArrayFunction); + } + + public Task RemoveUintArrayRequestAndWaitForReceiptAsync(byte[] key, CancellationTokenSource cancellationToken = null) + { + var removeUintArrayFunction = new RemoveUintArrayFunction(); + removeUintArrayFunction.Key = key; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(removeUintArrayFunction, cancellationToken); + } + + public Task RoleStoreQueryAsync(RoleStoreFunction roleStoreFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(roleStoreFunction, blockParameter); + } + + + public Task RoleStoreQueryAsync(BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(null, blockParameter); + } + + public Task SetAddressRequestAsync(SetAddressFunction setAddressFunction) + { + return ContractHandler.SendRequestAsync(setAddressFunction); + } + + public Task SetAddressRequestAndWaitForReceiptAsync(SetAddressFunction setAddressFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(setAddressFunction, cancellationToken); + } + + public Task SetAddressRequestAsync(byte[] key, string value) + { + var setAddressFunction = new SetAddressFunction(); + setAddressFunction.Key = key; + setAddressFunction.Value = value; + + return ContractHandler.SendRequestAsync(setAddressFunction); + } + + public Task SetAddressRequestAndWaitForReceiptAsync(byte[] key, string value, CancellationTokenSource cancellationToken = null) + { + var setAddressFunction = new SetAddressFunction(); + setAddressFunction.Key = key; + setAddressFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(setAddressFunction, cancellationToken); + } + + public Task SetAddressArrayRequestAsync(SetAddressArrayFunction setAddressArrayFunction) + { + return ContractHandler.SendRequestAsync(setAddressArrayFunction); + } + + public Task SetAddressArrayRequestAndWaitForReceiptAsync(SetAddressArrayFunction setAddressArrayFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(setAddressArrayFunction, cancellationToken); + } + + public Task SetAddressArrayRequestAsync(byte[] key, List value) + { + var setAddressArrayFunction = new SetAddressArrayFunction(); + setAddressArrayFunction.Key = key; + setAddressArrayFunction.Value = value; + + return ContractHandler.SendRequestAsync(setAddressArrayFunction); + } + + public Task SetAddressArrayRequestAndWaitForReceiptAsync(byte[] key, List value, CancellationTokenSource cancellationToken = null) + { + var setAddressArrayFunction = new SetAddressArrayFunction(); + setAddressArrayFunction.Key = key; + setAddressArrayFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(setAddressArrayFunction, cancellationToken); + } + + public Task SetBoolRequestAsync(SetBoolFunction setBoolFunction) + { + return ContractHandler.SendRequestAsync(setBoolFunction); + } + + public Task SetBoolRequestAndWaitForReceiptAsync(SetBoolFunction setBoolFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(setBoolFunction, cancellationToken); + } + + public Task SetBoolRequestAsync(byte[] key, bool value) + { + var setBoolFunction = new SetBoolFunction(); + setBoolFunction.Key = key; + setBoolFunction.Value = value; + + return ContractHandler.SendRequestAsync(setBoolFunction); + } + + public Task SetBoolRequestAndWaitForReceiptAsync(byte[] key, bool value, CancellationTokenSource cancellationToken = null) + { + var setBoolFunction = new SetBoolFunction(); + setBoolFunction.Key = key; + setBoolFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(setBoolFunction, cancellationToken); + } + + public Task SetBoolArrayRequestAsync(SetBoolArrayFunction setBoolArrayFunction) + { + return ContractHandler.SendRequestAsync(setBoolArrayFunction); + } + + public Task SetBoolArrayRequestAndWaitForReceiptAsync(SetBoolArrayFunction setBoolArrayFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(setBoolArrayFunction, cancellationToken); + } + + public Task SetBoolArrayRequestAsync(byte[] key, List value) + { + var setBoolArrayFunction = new SetBoolArrayFunction(); + setBoolArrayFunction.Key = key; + setBoolArrayFunction.Value = value; + + return ContractHandler.SendRequestAsync(setBoolArrayFunction); + } + + public Task SetBoolArrayRequestAndWaitForReceiptAsync(byte[] key, List value, CancellationTokenSource cancellationToken = null) + { + var setBoolArrayFunction = new SetBoolArrayFunction(); + setBoolArrayFunction.Key = key; + setBoolArrayFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(setBoolArrayFunction, cancellationToken); + } + + public Task SetBytes32RequestAsync(SetBytes32Function setBytes32Function) + { + return ContractHandler.SendRequestAsync(setBytes32Function); + } + + public Task SetBytes32RequestAndWaitForReceiptAsync(SetBytes32Function setBytes32Function, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(setBytes32Function, cancellationToken); + } + + public Task SetBytes32RequestAsync(byte[] key, byte[] value) + { + var setBytes32Function = new SetBytes32Function(); + setBytes32Function.Key = key; + setBytes32Function.Value = value; + + return ContractHandler.SendRequestAsync(setBytes32Function); + } + + public Task SetBytes32RequestAndWaitForReceiptAsync(byte[] key, byte[] value, CancellationTokenSource cancellationToken = null) + { + var setBytes32Function = new SetBytes32Function(); + setBytes32Function.Key = key; + setBytes32Function.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(setBytes32Function, cancellationToken); + } + + public Task SetBytes32ArrayRequestAsync(SetBytes32ArrayFunction setBytes32ArrayFunction) + { + return ContractHandler.SendRequestAsync(setBytes32ArrayFunction); + } + + public Task SetBytes32ArrayRequestAndWaitForReceiptAsync(SetBytes32ArrayFunction setBytes32ArrayFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(setBytes32ArrayFunction, cancellationToken); + } + + public Task SetBytes32ArrayRequestAsync(byte[] key, List value) + { + var setBytes32ArrayFunction = new SetBytes32ArrayFunction(); + setBytes32ArrayFunction.Key = key; + setBytes32ArrayFunction.Value = value; + + return ContractHandler.SendRequestAsync(setBytes32ArrayFunction); + } + + public Task SetBytes32ArrayRequestAndWaitForReceiptAsync(byte[] key, List value, CancellationTokenSource cancellationToken = null) + { + var setBytes32ArrayFunction = new SetBytes32ArrayFunction(); + setBytes32ArrayFunction.Key = key; + setBytes32ArrayFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(setBytes32ArrayFunction, cancellationToken); + } + + public Task SetIntRequestAsync(SetIntFunction setIntFunction) + { + return ContractHandler.SendRequestAsync(setIntFunction); + } + + public Task SetIntRequestAndWaitForReceiptAsync(SetIntFunction setIntFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(setIntFunction, cancellationToken); + } + + public Task SetIntRequestAsync(byte[] key, BigInteger value) + { + var setIntFunction = new SetIntFunction(); + setIntFunction.Key = key; + setIntFunction.Value = value; + + return ContractHandler.SendRequestAsync(setIntFunction); + } + + public Task SetIntRequestAndWaitForReceiptAsync(byte[] key, BigInteger value, CancellationTokenSource cancellationToken = null) + { + var setIntFunction = new SetIntFunction(); + setIntFunction.Key = key; + setIntFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(setIntFunction, cancellationToken); + } + + public Task SetIntArrayRequestAsync(SetIntArrayFunction setIntArrayFunction) + { + return ContractHandler.SendRequestAsync(setIntArrayFunction); + } + + public Task SetIntArrayRequestAndWaitForReceiptAsync(SetIntArrayFunction setIntArrayFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(setIntArrayFunction, cancellationToken); + } + + public Task SetIntArrayRequestAsync(byte[] key, List value) + { + var setIntArrayFunction = new SetIntArrayFunction(); + setIntArrayFunction.Key = key; + setIntArrayFunction.Value = value; + + return ContractHandler.SendRequestAsync(setIntArrayFunction); + } + + public Task SetIntArrayRequestAndWaitForReceiptAsync(byte[] key, List value, CancellationTokenSource cancellationToken = null) + { + var setIntArrayFunction = new SetIntArrayFunction(); + setIntArrayFunction.Key = key; + setIntArrayFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(setIntArrayFunction, cancellationToken); + } + + public Task SetStringRequestAsync(SetStringFunction setStringFunction) + { + return ContractHandler.SendRequestAsync(setStringFunction); + } + + public Task SetStringRequestAndWaitForReceiptAsync(SetStringFunction setStringFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(setStringFunction, cancellationToken); + } + + public Task SetStringRequestAsync(byte[] key, string value) + { + var setStringFunction = new SetStringFunction(); + setStringFunction.Key = key; + setStringFunction.Value = value; + + return ContractHandler.SendRequestAsync(setStringFunction); + } + + public Task SetStringRequestAndWaitForReceiptAsync(byte[] key, string value, CancellationTokenSource cancellationToken = null) + { + var setStringFunction = new SetStringFunction(); + setStringFunction.Key = key; + setStringFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(setStringFunction, cancellationToken); + } + + public Task SetStringArrayRequestAsync(SetStringArrayFunction setStringArrayFunction) + { + return ContractHandler.SendRequestAsync(setStringArrayFunction); + } + + public Task SetStringArrayRequestAndWaitForReceiptAsync(SetStringArrayFunction setStringArrayFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(setStringArrayFunction, cancellationToken); + } + + public Task SetStringArrayRequestAsync(byte[] key, List value) + { + var setStringArrayFunction = new SetStringArrayFunction(); + setStringArrayFunction.Key = key; + setStringArrayFunction.Value = value; + + return ContractHandler.SendRequestAsync(setStringArrayFunction); + } + + public Task SetStringArrayRequestAndWaitForReceiptAsync(byte[] key, List value, CancellationTokenSource cancellationToken = null) + { + var setStringArrayFunction = new SetStringArrayFunction(); + setStringArrayFunction.Key = key; + setStringArrayFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(setStringArrayFunction, cancellationToken); + } + + public Task SetUintRequestAsync(SetUintFunction setUintFunction) + { + return ContractHandler.SendRequestAsync(setUintFunction); + } + + public Task SetUintRequestAndWaitForReceiptAsync(SetUintFunction setUintFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(setUintFunction, cancellationToken); + } + + public Task SetUintRequestAsync(byte[] key, BigInteger value) + { + var setUintFunction = new SetUintFunction(); + setUintFunction.Key = key; + setUintFunction.Value = value; + + return ContractHandler.SendRequestAsync(setUintFunction); + } + + public Task SetUintRequestAndWaitForReceiptAsync(byte[] key, BigInteger value, CancellationTokenSource cancellationToken = null) + { + var setUintFunction = new SetUintFunction(); + setUintFunction.Key = key; + setUintFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(setUintFunction, cancellationToken); + } + + public Task SetUintArrayRequestAsync(SetUintArrayFunction setUintArrayFunction) + { + return ContractHandler.SendRequestAsync(setUintArrayFunction); + } + + public Task SetUintArrayRequestAndWaitForReceiptAsync(SetUintArrayFunction setUintArrayFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(setUintArrayFunction, cancellationToken); + } + + public Task SetUintArrayRequestAsync(byte[] key, List value) + { + var setUintArrayFunction = new SetUintArrayFunction(); + setUintArrayFunction.Key = key; + setUintArrayFunction.Value = value; + + return ContractHandler.SendRequestAsync(setUintArrayFunction); + } + + public Task SetUintArrayRequestAndWaitForReceiptAsync(byte[] key, List value, CancellationTokenSource cancellationToken = null) + { + var setUintArrayFunction = new SetUintArrayFunction(); + setUintArrayFunction.Key = key; + setUintArrayFunction.Value = value; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(setUintArrayFunction, cancellationToken); + } + + public Task StringArrayValuesQueryAsync(StringArrayValuesFunction stringArrayValuesFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(stringArrayValuesFunction, blockParameter); + } + + + public Task StringArrayValuesQueryAsync(byte[] returnValue1, BigInteger returnValue2, BlockParameter blockParameter = null) + { + var stringArrayValuesFunction = new StringArrayValuesFunction(); + stringArrayValuesFunction.ReturnValue1 = returnValue1; + stringArrayValuesFunction.ReturnValue2 = returnValue2; + + return ContractHandler.QueryAsync(stringArrayValuesFunction, blockParameter); + } + + public Task StringValuesQueryAsync(StringValuesFunction stringValuesFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(stringValuesFunction, blockParameter); + } + + + public Task StringValuesQueryAsync(byte[] returnValue1, BlockParameter blockParameter = null) + { + var stringValuesFunction = new StringValuesFunction(); + stringValuesFunction.ReturnValue1 = returnValue1; + + return ContractHandler.QueryAsync(stringValuesFunction, blockParameter); + } + + public Task UintArrayValuesQueryAsync(UintArrayValuesFunction uintArrayValuesFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(uintArrayValuesFunction, blockParameter); + } + + + public Task UintArrayValuesQueryAsync(byte[] returnValue1, BigInteger returnValue2, BlockParameter blockParameter = null) + { + var uintArrayValuesFunction = new UintArrayValuesFunction(); + uintArrayValuesFunction.ReturnValue1 = returnValue1; + uintArrayValuesFunction.ReturnValue2 = returnValue2; + + return ContractHandler.QueryAsync(uintArrayValuesFunction, blockParameter); + } + + public Task UintValuesQueryAsync(UintValuesFunction uintValuesFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(uintValuesFunction, blockParameter); + } + + + public Task UintValuesQueryAsync(byte[] returnValue1, BlockParameter blockParameter = null) + { + var uintValuesFunction = new UintValuesFunction(); + uintValuesFunction.ReturnValue1 = returnValue1; + + return ContractHandler.QueryAsync(uintValuesFunction, blockParameter); + } + + public override List GetAllFunctionTypes() + { + return new List + { + typeof(AddAddressFunction), + typeof(AddBytes32Function), + typeof(AddUintFunction), + typeof(AddressArrayValuesFunction), + typeof(AddressValuesFunction), + typeof(ApplyBoundedDeltaToUintFunction), + typeof(ApplyDeltaToIntFunction), + typeof(ApplyDeltaToUint1Function), + typeof(ApplyDeltaToUintFunction), + typeof(BoolArrayValuesFunction), + typeof(BoolValuesFunction), + typeof(Bytes32ArrayValuesFunction), + typeof(Bytes32ValuesFunction), + typeof(ContainsAddressFunction), + typeof(ContainsBytes32Function), + typeof(ContainsUintFunction), + typeof(DecrementIntFunction), + typeof(DecrementUintFunction), + typeof(GetAddressFunction), + typeof(GetAddressArrayFunction), + typeof(GetAddressCountFunction), + typeof(GetAddressValuesAtFunction), + typeof(GetBoolFunction), + typeof(GetBoolArrayFunction), + typeof(GetBytes32Function), + typeof(GetBytes32ArrayFunction), + typeof(GetBytes32CountFunction), + typeof(GetBytes32ValuesAtFunction), + typeof(GetIntFunction), + typeof(GetIntArrayFunction), + typeof(GetStringFunction), + typeof(GetStringArrayFunction), + typeof(GetUintFunction), + typeof(GetUintArrayFunction), + typeof(GetUintCountFunction), + typeof(GetUintValuesAtFunction), + typeof(IncrementIntFunction), + typeof(IncrementUintFunction), + typeof(IntArrayValuesFunction), + typeof(IntValuesFunction), + typeof(RemoveAddress1Function), + typeof(RemoveAddressFunction), + typeof(RemoveAddressArrayFunction), + typeof(RemoveBoolFunction), + typeof(RemoveBoolArrayFunction), + typeof(RemoveBytes321Function), + typeof(RemoveBytes32Function), + typeof(RemoveBytes32ArrayFunction), + typeof(RemoveIntFunction), + typeof(RemoveIntArrayFunction), + typeof(RemoveStringFunction), + typeof(RemoveStringArrayFunction), + typeof(RemoveUintFunction), + typeof(RemoveUint1Function), + typeof(RemoveUintArrayFunction), + typeof(RoleStoreFunction), + typeof(SetAddressFunction), + typeof(SetAddressArrayFunction), + typeof(SetBoolFunction), + typeof(SetBoolArrayFunction), + typeof(SetBytes32Function), + typeof(SetBytes32ArrayFunction), + typeof(SetIntFunction), + typeof(SetIntArrayFunction), + typeof(SetStringFunction), + typeof(SetStringArrayFunction), + typeof(SetUintFunction), + typeof(SetUintArrayFunction), + typeof(StringArrayValuesFunction), + typeof(StringValuesFunction), + typeof(UintArrayValuesFunction), + typeof(UintValuesFunction) + }; + } + + public override List GetAllEventTypes() + { + return new List + { + + }; + } + + public override List GetAllErrorTypes() + { + return new List + { + typeof(UnauthorizedError) + }; + } + } +} diff --git a/src/Managing.ABI.GmxV2/Managing.ABI.GmxV2.csproj b/src/Managing.ABI.GmxV2/Managing.ABI.GmxV2.csproj new file mode 100644 index 0000000..e5d6b3e --- /dev/null +++ b/src/Managing.ABI.GmxV2/Managing.ABI.GmxV2.csproj @@ -0,0 +1,15 @@ + + + + Exe + net8.0 + enable + enable + + + + + + + + diff --git a/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Call.cs b/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Call.cs new file mode 100644 index 0000000..012e722 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Call.cs @@ -0,0 +1,14 @@ +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Multicall3.ContractDefinition +{ + public partial class Call : CallBase + { + } + + public class CallBase + { + [Parameter("address", "target", 1)] public virtual string Target { get; set; } + [Parameter("bytes", "callData", 2)] public virtual byte[] CallData { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Call3.cs b/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Call3.cs new file mode 100644 index 0000000..ea6888a --- /dev/null +++ b/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Call3.cs @@ -0,0 +1,15 @@ +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Multicall3.ContractDefinition +{ + public partial class Call3 : Call3Base + { + } + + public class Call3Base + { + [Parameter("address", "target", 1)] public virtual string Target { get; set; } + [Parameter("bool", "allowFailure", 2)] public virtual bool AllowFailure { get; set; } + [Parameter("bytes", "callData", 3)] public virtual byte[] CallData { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Call3Value.cs b/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Call3Value.cs new file mode 100644 index 0000000..afa937f --- /dev/null +++ b/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Call3Value.cs @@ -0,0 +1,17 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Multicall3.ContractDefinition +{ + public partial class Call3Value : Call3ValueBase + { + } + + public class Call3ValueBase + { + [Parameter("address", "target", 1)] public virtual string Target { get; set; } + [Parameter("bool", "allowFailure", 2)] public virtual bool AllowFailure { get; set; } + [Parameter("uint256", "value", 3)] public virtual BigInteger Value { get; set; } + [Parameter("bytes", "callData", 4)] public virtual byte[] CallData { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Multicall3Definition.cs b/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Multicall3Definition.cs new file mode 100644 index 0000000..4fc21ef --- /dev/null +++ b/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Multicall3Definition.cs @@ -0,0 +1,351 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; +using Nethereum.Contracts; + +namespace Managing.ABI.GmxV2.Multicall3.ContractDefinition +{ + public partial class Multicall3Deployment : Multicall3DeploymentBase + { + public Multicall3Deployment() : base(BYTECODE) + { + } + + public Multicall3Deployment(string byteCode) : base(byteCode) + { + } + } + + public class Multicall3DeploymentBase : ContractDeploymentMessage + { + public static string BYTECODE = + "608060405234801561001057600080fd5b50610c44806100206000396000f3fe6080604052600436106100b85760003560e01c80630f28c97d146100bd578063174dea71146100df578063252dba42146100ff57806327e86d6e146101205780633408e47014610138578063399542e91461014b5780633e64a6961461016d57806342cbb15c146101805780634d2301cc1461019357806382ad56cb146101bb57806386d516e8146101ce578063a8b0574e146101e1578063bce38bd7146101fc578063c3077fa91461020f578063ee82ac5e14610222575b600080fd5b3480156100c957600080fd5b50425b6040519081526020015b60405180910390f35b6100f26100ed3660046108d3565b610241565b6040516100d691906109c8565b61011261010d3660046108d3565b61041e565b6040516100d69291906109e2565b34801561012c57600080fd5b504360001901406100cc565b34801561014457600080fd5b50466100cc565b61015e610159366004610a4c565b610567565b6040516100d693929190610aa5565b34801561017957600080fd5b50486100cc565b34801561018c57600080fd5b50436100cc565b34801561019f57600080fd5b506100cc6101ae366004610acd565b6001600160a01b03163190565b6100f26101c93660046108d3565b610582565b3480156101da57600080fd5b50456100cc565b3480156101ed57600080fd5b506040514181526020016100d6565b6100f261020a366004610a4c565b6106f6565b61015e61021d3660046108d3565b610851565b34801561022e57600080fd5b506100cc61023d366004610af6565b4090565b6060600082806001600160401b0381111561025e5761025e610b0f565b60405190808252806020026020018201604052801561029757816020015b610284610870565b81526020019060019003908161027c5790505b5092503660005b828110156103c35760008582815181106102ba576102ba610b25565b602002602001015190508787838181106102d6576102d6610b25565b90506020028101906102e89190610b3b565b6040810135958601959093506103016020850185610acd565b6001600160a01b0316816103186060870187610b5b565b604051610326929190610ba1565b60006040518083038185875af1925050503d8060008114610363576040519150601f19603f3d011682016040523d82523d6000602084013e610368565b606091505b5060208085019190915290151580845290850135176103b95762461bcd60e51b6000526020600452601760245276135d5b1d1a58d85b1b0cce8818d85b1b0819985a5b1959604a1b60445260846000fd5b505060010161029e565b508234146104155760405162461bcd60e51b815260206004820152601a60248201527909aead8e8d2c6c2d8d8667440ecc2d8eaca40dad2e6dac2e8c6d60331b60448201526064015b60405180910390fd5b50505092915050565b43606082806001600160401b0381111561043a5761043a610b0f565b60405190808252806020026020018201604052801561046d57816020015b60608152602001906001900390816104585790505b5091503660005b8281101561055d57600087878381811061049057610490610b25565b90506020028101906104a29190610bb1565b92506104b16020840184610acd565b6001600160a01b03166104c76020850185610b5b565b6040516104d5929190610ba1565b6000604051808303816000865af19150503d8060008114610512576040519150601f19603f3d011682016040523d82523d6000602084013e610517565b606091505b5086848151811061052a5761052a610b25565b60209081029190910101529050806105545760405162461bcd60e51b815260040161040c90610bc7565b50600101610474565b5050509250929050565b43804060606105778686866106f6565b905093509350939050565b606081806001600160401b0381111561059d5761059d610b0f565b6040519080825280602002602001820160405280156105d657816020015b6105c3610870565b8152602001906001900390816105bb5790505b5091503660005b828110156104155760008482815181106105f9576105f9610b25565b6020026020010151905086868381811061061557610615610b25565b90506020028101906106279190610bf8565b92506106366020840184610acd565b6001600160a01b031661064c6040850185610b5b565b60405161065a929190610ba1565b6000604051808303816000865af19150503d8060008114610697576040519150601f19603f3d011682016040523d82523d6000602084013e61069c565b606091505b5060208084019190915290151580835290840135176106ed5762461bcd60e51b6000526020600452601760245276135d5b1d1a58d85b1b0cce8818d85b1b0819985a5b1959604a1b60445260646000fd5b506001016105dd565b606081806001600160401b0381111561071157610711610b0f565b60405190808252806020026020018201604052801561074a57816020015b610737610870565b81526020019060019003908161072f5790505b5091503660005b8281101561084757600084828151811061076d5761076d610b25565b6020026020010151905086868381811061078957610789610b25565b905060200281019061079b9190610bb1565b92506107aa6020840184610acd565b6001600160a01b03166107c06020850185610b5b565b6040516107ce929190610ba1565b6000604051808303816000865af19150503d806000811461080b576040519150601f19603f3d011682016040523d82523d6000602084013e610810565b606091505b50602083015215158152871561083e57805161083e5760405162461bcd60e51b815260040161040c90610bc7565b50600101610751565b5050509392505050565b600080606061086260018686610567565b919790965090945092505050565b60408051808201909152600081526060602082015290565b60008083601f84011261089a57600080fd5b5081356001600160401b038111156108b157600080fd5b6020830191508360208260051b85010111156108cc57600080fd5b9250929050565b600080602083850312156108e657600080fd5b82356001600160401b038111156108fc57600080fd5b61090885828601610888565b90969095509350505050565b6000815180845260005b8181101561093a5760208185018101518683018201520161091e565b506000602082860101526020601f19601f83011685010191505092915050565b600082825180855260208086019550808260051b84010181860160005b848110156109bb57858303601f19018952815180511515845284015160408585018190526109a781860183610914565b9a86019a9450505090830190600101610977565b5090979650505050505050565b6020815260006109db602083018461095a565b9392505050565b600060408201848352602060408185015281855180845260608601915060608160051b870101935082870160005b82811015610a3e57605f19888703018452610a2c868351610914565b95509284019290840190600101610a10565b509398975050505050505050565b600080600060408486031215610a6157600080fd5b83358015158114610a7157600080fd5b925060208401356001600160401b03811115610a8c57600080fd5b610a9886828701610888565b9497909650939450505050565b838152826020820152606060408201526000610ac4606083018461095a565b95945050505050565b600060208284031215610adf57600080fd5b81356001600160a01b03811681146109db57600080fd5b600060208284031215610b0857600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60008235607e19833603018112610b5157600080fd5b9190910192915050565b6000808335601e19843603018112610b7257600080fd5b8301803591506001600160401b03821115610b8c57600080fd5b6020019150368190038213156108cc57600080fd5b8183823760009101908152919050565b60008235603e19833603018112610b5157600080fd5b602080825260179082015276135d5b1d1a58d85b1b0cce8818d85b1b0819985a5b1959604a1b604082015260600190565b60008235605e19833603018112610b5157600080fdfea26469706673582212205df1e9f2437d5feed9554be594a0f427b805703efd05baf125941b69b294ee5164736f6c63430008120033"; + + public Multicall3DeploymentBase() : base(BYTECODE) + { + } + + public Multicall3DeploymentBase(string byteCode) : base(byteCode) + { + } + } + + public partial class AggregateFunction : AggregateFunctionBase + { + } + + [Function("aggregate", typeof(AggregateOutputDTO))] + public class AggregateFunctionBase : FunctionMessage + { + [Parameter("tuple[]", "calls", 1)] public virtual List Calls { get; set; } + } + + public partial class Aggregate3Function : Aggregate3FunctionBase + { + } + + [Function("aggregate3", typeof(Aggregate3OutputDTO))] + public class Aggregate3FunctionBase : FunctionMessage + { + [Parameter("tuple[]", "calls", 1)] public virtual List Calls { get; set; } + } + + public partial class Aggregate3ValueFunction : Aggregate3ValueFunctionBase + { + } + + [Function("aggregate3Value", typeof(Aggregate3ValueOutputDTO))] + public class Aggregate3ValueFunctionBase : FunctionMessage + { + [Parameter("tuple[]", "calls", 1)] public virtual List Calls { get; set; } + } + + public partial class BlockAndAggregateFunction : BlockAndAggregateFunctionBase + { + } + + [Function("blockAndAggregate", typeof(BlockAndAggregateOutputDTO))] + public class BlockAndAggregateFunctionBase : FunctionMessage + { + [Parameter("tuple[]", "calls", 1)] public virtual List Calls { get; set; } + } + + public partial class GetBasefeeFunction : GetBasefeeFunctionBase + { + } + + [Function("getBasefee", "uint256")] + public class GetBasefeeFunctionBase : FunctionMessage + { + } + + public partial class GetBlockHashFunction : GetBlockHashFunctionBase + { + } + + [Function("getBlockHash", "bytes32")] + public class GetBlockHashFunctionBase : FunctionMessage + { + [Parameter("uint256", "blockNumber", 1)] + public virtual BigInteger BlockNumber { get; set; } + } + + public partial class GetBlockNumberFunction : GetBlockNumberFunctionBase + { + } + + [Function("getBlockNumber", "uint256")] + public class GetBlockNumberFunctionBase : FunctionMessage + { + } + + public partial class GetChainIdFunction : GetChainIdFunctionBase + { + } + + [Function("getChainId", "uint256")] + public class GetChainIdFunctionBase : FunctionMessage + { + } + + public partial class GetCurrentBlockCoinbaseFunction : GetCurrentBlockCoinbaseFunctionBase + { + } + + [Function("getCurrentBlockCoinbase", "address")] + public class GetCurrentBlockCoinbaseFunctionBase : FunctionMessage + { + } + + public partial class GetCurrentBlockGasLimitFunction : GetCurrentBlockGasLimitFunctionBase + { + } + + [Function("getCurrentBlockGasLimit", "uint256")] + public class GetCurrentBlockGasLimitFunctionBase : FunctionMessage + { + } + + public partial class GetCurrentBlockTimestampFunction : GetCurrentBlockTimestampFunctionBase + { + } + + [Function("getCurrentBlockTimestamp", "uint256")] + public class GetCurrentBlockTimestampFunctionBase : FunctionMessage + { + } + + public partial class GetEthBalanceFunction : GetEthBalanceFunctionBase + { + } + + [Function("getEthBalance", "uint256")] + public class GetEthBalanceFunctionBase : FunctionMessage + { + [Parameter("address", "addr", 1)] public virtual string Addr { get; set; } + } + + public partial class GetLastBlockHashFunction : GetLastBlockHashFunctionBase + { + } + + [Function("getLastBlockHash", "bytes32")] + public class GetLastBlockHashFunctionBase : FunctionMessage + { + } + + public partial class TryAggregateFunction : TryAggregateFunctionBase + { + } + + [Function("tryAggregate", typeof(TryAggregateOutputDTO))] + public class TryAggregateFunctionBase : FunctionMessage + { + [Parameter("bool", "requireSuccess", 1)] + public virtual bool RequireSuccess { get; set; } + + [Parameter("tuple[]", "calls", 2)] public virtual List Calls { get; set; } + } + + public partial class TryBlockAndAggregateFunction : TryBlockAndAggregateFunctionBase + { + } + + [Function("tryBlockAndAggregate", typeof(TryBlockAndAggregateOutputDTO))] + public class TryBlockAndAggregateFunctionBase : FunctionMessage + { + [Parameter("bool", "requireSuccess", 1)] + public virtual bool RequireSuccess { get; set; } + + [Parameter("tuple[]", "calls", 2)] public virtual List Calls { get; set; } + } + + public partial class AggregateOutputDTO : AggregateOutputDTOBase + { + } + + [FunctionOutput] + public class AggregateOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "blockNumber", 1)] + public virtual BigInteger BlockNumber { get; set; } + + [Parameter("bytes[]", "returnData", 2)] + public virtual List ReturnData { get; set; } + } + + public partial class Aggregate3OutputDTO : Aggregate3OutputDTOBase + { + } + + [FunctionOutput] + public class Aggregate3OutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple[]", "returnData", 1)] + public virtual List ReturnData { get; set; } + } + + public partial class Aggregate3ValueOutputDTO : Aggregate3ValueOutputDTOBase + { + } + + [FunctionOutput] + public class Aggregate3ValueOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple[]", "returnData", 1)] + public virtual List ReturnData { get; set; } + } + + public partial class BlockAndAggregateOutputDTO : BlockAndAggregateOutputDTOBase + { + } + + [FunctionOutput] + public class BlockAndAggregateOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "blockNumber", 1)] + public virtual BigInteger BlockNumber { get; set; } + + [Parameter("bytes32", "blockHash", 2)] public virtual byte[] BlockHash { get; set; } + + [Parameter("tuple[]", "returnData", 3)] + public virtual List ReturnData { get; set; } + } + + public partial class GetBasefeeOutputDTO : GetBasefeeOutputDTOBase + { + } + + [FunctionOutput] + public class GetBasefeeOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "basefee", 1)] public virtual BigInteger Basefee { get; set; } + } + + public partial class GetBlockHashOutputDTO : GetBlockHashOutputDTOBase + { + } + + [FunctionOutput] + public class GetBlockHashOutputDTOBase : IFunctionOutputDTO + { + [Parameter("bytes32", "blockHash", 1)] public virtual byte[] BlockHash { get; set; } + } + + public partial class GetBlockNumberOutputDTO : GetBlockNumberOutputDTOBase + { + } + + [FunctionOutput] + public class GetBlockNumberOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "blockNumber", 1)] + public virtual BigInteger BlockNumber { get; set; } + } + + public partial class GetChainIdOutputDTO : GetChainIdOutputDTOBase + { + } + + [FunctionOutput] + public class GetChainIdOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "chainid", 1)] public virtual BigInteger Chainid { get; set; } + } + + public partial class GetCurrentBlockCoinbaseOutputDTO : GetCurrentBlockCoinbaseOutputDTOBase + { + } + + [FunctionOutput] + public class GetCurrentBlockCoinbaseOutputDTOBase : IFunctionOutputDTO + { + [Parameter("address", "coinbase", 1)] public virtual string Coinbase { get; set; } + } + + public partial class GetCurrentBlockGasLimitOutputDTO : GetCurrentBlockGasLimitOutputDTOBase + { + } + + [FunctionOutput] + public class GetCurrentBlockGasLimitOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "gaslimit", 1)] public virtual BigInteger Gaslimit { get; set; } + } + + public partial class GetCurrentBlockTimestampOutputDTO : GetCurrentBlockTimestampOutputDTOBase + { + } + + [FunctionOutput] + public class GetCurrentBlockTimestampOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "timestamp", 1)] public virtual BigInteger Timestamp { get; set; } + } + + public partial class GetEthBalanceOutputDTO : GetEthBalanceOutputDTOBase + { + } + + [FunctionOutput] + public class GetEthBalanceOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "balance", 1)] public virtual BigInteger Balance { get; set; } + } + + public partial class GetLastBlockHashOutputDTO : GetLastBlockHashOutputDTOBase + { + } + + [FunctionOutput] + public class GetLastBlockHashOutputDTOBase : IFunctionOutputDTO + { + [Parameter("bytes32", "blockHash", 1)] public virtual byte[] BlockHash { get; set; } + } + + public partial class TryAggregateOutputDTO : TryAggregateOutputDTOBase + { + } + + [FunctionOutput] + public class TryAggregateOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple[]", "returnData", 1)] + public virtual List ReturnData { get; set; } + } + + public partial class TryBlockAndAggregateOutputDTO : TryBlockAndAggregateOutputDTOBase + { + } + + [FunctionOutput] + public class TryBlockAndAggregateOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "blockNumber", 1)] + public virtual BigInteger BlockNumber { get; set; } + + [Parameter("bytes32", "blockHash", 2)] public virtual byte[] BlockHash { get; set; } + + [Parameter("tuple[]", "returnData", 3)] + public virtual List ReturnData { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Result.cs b/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Result.cs new file mode 100644 index 0000000..dd8a7a1 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Multicall3/ContractDefinition/Result.cs @@ -0,0 +1,14 @@ +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Multicall3.ContractDefinition +{ + public partial class Result : ResultBase + { + } + + public class ResultBase + { + [Parameter("bool", "success", 1)] public virtual bool Success { get; set; } + [Parameter("bytes", "returnData", 2)] public virtual byte[] ReturnData { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Multicall3/Multicall3Service.cs b/src/Managing.ABI.GmxV2/Multicall3/Multicall3Service.cs new file mode 100644 index 0000000..f437925 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Multicall3/Multicall3Service.cs @@ -0,0 +1,362 @@ +using System.Numerics; +using Managing.ABI.GmxV2.Multicall3.ContractDefinition; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace Managing.ABI.GmxV2.Multicall3 +{ + public partial class Multicall3Service : ContractWeb3ServiceBase + { + public static Task DeployContractAndWaitForReceiptAsync(Nethereum.Web3.IWeb3 web3, + Multicall3Deployment multicall3Deployment, CancellationTokenSource cancellationTokenSource = null) + { + return web3.Eth.GetContractDeploymentHandler() + .SendRequestAndWaitForReceiptAsync(multicall3Deployment, cancellationTokenSource); + } + + public static Task DeployContractAsync(Nethereum.Web3.IWeb3 web3, + Multicall3Deployment multicall3Deployment) + { + return web3.Eth.GetContractDeploymentHandler().SendRequestAsync(multicall3Deployment); + } + + public static async Task DeployContractAndGetServiceAsync(Nethereum.Web3.IWeb3 web3, + Multicall3Deployment multicall3Deployment, CancellationTokenSource cancellationTokenSource = null) + { + var receipt = + await DeployContractAndWaitForReceiptAsync(web3, multicall3Deployment, cancellationTokenSource); + return new Multicall3Service(web3, receipt.ContractAddress); + } + + public Multicall3Service(Nethereum.Web3.IWeb3 web3, string contractAddress) : base(web3, contractAddress) + { + } + + public Task AggregateRequestAsync(AggregateFunction aggregateFunction) + { + return ContractHandler.SendRequestAsync(aggregateFunction); + } + + public Task AggregateRequestAndWaitForReceiptAsync(AggregateFunction aggregateFunction, + CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(aggregateFunction, cancellationToken); + } + + public Task AggregateRequestAsync(List calls) + { + var aggregateFunction = new AggregateFunction(); + aggregateFunction.Calls = calls; + + return ContractHandler.SendRequestAsync(aggregateFunction); + } + + public Task AggregateRequestAndWaitForReceiptAsync(List calls, + CancellationTokenSource cancellationToken = null) + { + var aggregateFunction = new AggregateFunction(); + aggregateFunction.Calls = calls; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(aggregateFunction, cancellationToken); + } + + public Task Aggregate3RequestAsync(Aggregate3Function aggregate3Function) + { + return ContractHandler.SendRequestAsync(aggregate3Function); + } + + public Task Aggregate3RequestAndWaitForReceiptAsync(Aggregate3Function aggregate3Function, + CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(aggregate3Function, cancellationToken); + } + + public Task Aggregate3RequestAsync(List calls) + { + var aggregate3Function = new Aggregate3Function(); + aggregate3Function.Calls = calls; + + return ContractHandler.SendRequestAsync(aggregate3Function); + } + + public Task Aggregate3RequestAndWaitForReceiptAsync(List calls, + CancellationTokenSource cancellationToken = null) + { + var aggregate3Function = new Aggregate3Function(); + aggregate3Function.Calls = calls; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(aggregate3Function, cancellationToken); + } + + public Task Aggregate3ValueRequestAsync(Aggregate3ValueFunction aggregate3ValueFunction) + { + return ContractHandler.SendRequestAsync(aggregate3ValueFunction); + } + + public Task Aggregate3ValueRequestAndWaitForReceiptAsync( + Aggregate3ValueFunction aggregate3ValueFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(aggregate3ValueFunction, cancellationToken); + } + + public Task Aggregate3ValueRequestAsync(List calls) + { + var aggregate3ValueFunction = new Aggregate3ValueFunction(); + aggregate3ValueFunction.Calls = calls; + + return ContractHandler.SendRequestAsync(aggregate3ValueFunction); + } + + public Task Aggregate3ValueRequestAndWaitForReceiptAsync(List calls, + CancellationTokenSource cancellationToken = null) + { + var aggregate3ValueFunction = new Aggregate3ValueFunction(); + aggregate3ValueFunction.Calls = calls; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(aggregate3ValueFunction, cancellationToken); + } + + public Task BlockAndAggregateRequestAsync(BlockAndAggregateFunction blockAndAggregateFunction) + { + return ContractHandler.SendRequestAsync(blockAndAggregateFunction); + } + + public Task BlockAndAggregateRequestAndWaitForReceiptAsync( + BlockAndAggregateFunction blockAndAggregateFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(blockAndAggregateFunction, cancellationToken); + } + + public Task BlockAndAggregateRequestAsync(List calls) + { + var blockAndAggregateFunction = new BlockAndAggregateFunction(); + blockAndAggregateFunction.Calls = calls; + + return ContractHandler.SendRequestAsync(blockAndAggregateFunction); + } + + public Task BlockAndAggregateRequestAndWaitForReceiptAsync(List calls, + CancellationTokenSource cancellationToken = null) + { + var blockAndAggregateFunction = new BlockAndAggregateFunction(); + blockAndAggregateFunction.Calls = calls; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(blockAndAggregateFunction, cancellationToken); + } + + public Task GetBasefeeQueryAsync(GetBasefeeFunction getBasefeeFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getBasefeeFunction, blockParameter); + } + + + public Task GetBasefeeQueryAsync(BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(null, blockParameter); + } + + public Task GetBlockHashQueryAsync(GetBlockHashFunction getBlockHashFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getBlockHashFunction, blockParameter); + } + + + public Task GetBlockHashQueryAsync(BigInteger blockNumber, BlockParameter blockParameter = null) + { + var getBlockHashFunction = new GetBlockHashFunction(); + getBlockHashFunction.BlockNumber = blockNumber; + + return ContractHandler.QueryAsync(getBlockHashFunction, blockParameter); + } + + public Task GetBlockNumberQueryAsync(GetBlockNumberFunction getBlockNumberFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getBlockNumberFunction, + blockParameter); + } + + + public Task GetBlockNumberQueryAsync(BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(null, blockParameter); + } + + public Task GetChainIdQueryAsync(GetChainIdFunction getChainIdFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getChainIdFunction, blockParameter); + } + + + public Task GetChainIdQueryAsync(BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(null, blockParameter); + } + + public Task GetCurrentBlockCoinbaseQueryAsync( + GetCurrentBlockCoinbaseFunction getCurrentBlockCoinbaseFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getCurrentBlockCoinbaseFunction, + blockParameter); + } + + + public Task GetCurrentBlockCoinbaseQueryAsync(BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(null, blockParameter); + } + + public Task GetCurrentBlockGasLimitQueryAsync( + GetCurrentBlockGasLimitFunction getCurrentBlockGasLimitFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync( + getCurrentBlockGasLimitFunction, blockParameter); + } + + + public Task GetCurrentBlockGasLimitQueryAsync(BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(null, blockParameter); + } + + public Task GetCurrentBlockTimestampQueryAsync( + GetCurrentBlockTimestampFunction getCurrentBlockTimestampFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync( + getCurrentBlockTimestampFunction, blockParameter); + } + + + public Task GetCurrentBlockTimestampQueryAsync(BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(null, blockParameter); + } + + public Task GetEthBalanceQueryAsync(GetEthBalanceFunction getEthBalanceFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getEthBalanceFunction, blockParameter); + } + + + public Task GetEthBalanceQueryAsync(string addr, BlockParameter blockParameter = null) + { + var getEthBalanceFunction = new GetEthBalanceFunction(); + getEthBalanceFunction.Addr = addr; + + return ContractHandler.QueryAsync(getEthBalanceFunction, blockParameter); + } + + public Task GetLastBlockHashQueryAsync(GetLastBlockHashFunction getLastBlockHashFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getLastBlockHashFunction, + blockParameter); + } + + + public Task GetLastBlockHashQueryAsync(BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(null, blockParameter); + } + + public Task TryAggregateRequestAsync(TryAggregateFunction tryAggregateFunction) + { + return ContractHandler.SendRequestAsync(tryAggregateFunction); + } + + public Task TryAggregateRequestAndWaitForReceiptAsync( + TryAggregateFunction tryAggregateFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(tryAggregateFunction, cancellationToken); + } + + public Task TryAggregateRequestAsync(bool requireSuccess, List calls) + { + var tryAggregateFunction = new TryAggregateFunction(); + tryAggregateFunction.RequireSuccess = requireSuccess; + tryAggregateFunction.Calls = calls; + + return ContractHandler.SendRequestAsync(tryAggregateFunction); + } + + public Task TryAggregateRequestAndWaitForReceiptAsync(bool requireSuccess, List calls, + CancellationTokenSource cancellationToken = null) + { + var tryAggregateFunction = new TryAggregateFunction(); + tryAggregateFunction.RequireSuccess = requireSuccess; + tryAggregateFunction.Calls = calls; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(tryAggregateFunction, cancellationToken); + } + + public Task TryBlockAndAggregateRequestAsync(TryBlockAndAggregateFunction tryBlockAndAggregateFunction) + { + return ContractHandler.SendRequestAsync(tryBlockAndAggregateFunction); + } + + public Task TryBlockAndAggregateRequestAndWaitForReceiptAsync( + TryBlockAndAggregateFunction tryBlockAndAggregateFunction, CancellationTokenSource cancellationToken = null) + { + return ContractHandler.SendRequestAndWaitForReceiptAsync(tryBlockAndAggregateFunction, cancellationToken); + } + + public Task TryBlockAndAggregateRequestAsync(bool requireSuccess, List calls) + { + var tryBlockAndAggregateFunction = new TryBlockAndAggregateFunction(); + tryBlockAndAggregateFunction.RequireSuccess = requireSuccess; + tryBlockAndAggregateFunction.Calls = calls; + + return ContractHandler.SendRequestAsync(tryBlockAndAggregateFunction); + } + + public Task TryBlockAndAggregateRequestAndWaitForReceiptAsync(bool requireSuccess, + List calls, CancellationTokenSource cancellationToken = null) + { + var tryBlockAndAggregateFunction = new TryBlockAndAggregateFunction(); + tryBlockAndAggregateFunction.RequireSuccess = requireSuccess; + tryBlockAndAggregateFunction.Calls = calls; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(tryBlockAndAggregateFunction, cancellationToken); + } + + public override List GetAllFunctionTypes() + { + return new List + { + typeof(AggregateFunction), + typeof(Aggregate3Function), + typeof(Aggregate3ValueFunction), + typeof(BlockAndAggregateFunction), + typeof(GetBasefeeFunction), + typeof(GetBlockHashFunction), + typeof(GetBlockNumberFunction), + typeof(GetChainIdFunction), + typeof(GetCurrentBlockCoinbaseFunction), + typeof(GetCurrentBlockGasLimitFunction), + typeof(GetCurrentBlockTimestampFunction), + typeof(GetEthBalanceFunction), + typeof(GetLastBlockHashFunction), + typeof(TryAggregateFunction), + typeof(TryBlockAndAggregateFunction) + }; + } + + public override List GetAllEventTypes() + { + return new List + { + }; + } + + public override List GetAllErrorTypes() + { + return new List + { + }; + } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Program.cs b/src/Managing.ABI.GmxV2/Program.cs new file mode 100644 index 0000000..e5dff12 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Program.cs @@ -0,0 +1,3 @@ +// See https://aka.ms/new-console-template for more information + +Console.WriteLine("Hello, World!"); \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/Addresses.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/Addresses.cs new file mode 100644 index 0000000..b90e91a --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/Addresses.cs @@ -0,0 +1,31 @@ +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class Addresses : AddressesBase + { + } + + public class AddressesBase + { + [Parameter("address", "account", 1)] public virtual string Account { get; set; } + [Parameter("address", "receiver", 2)] public virtual string Receiver { get; set; } + + [Parameter("address", "cancellationReceiver", 3)] + public virtual string CancellationReceiver { get; set; } + + [Parameter("address", "callbackContract", 4)] + public virtual string CallbackContract { get; set; } + + [Parameter("address", "uiFeeReceiver", 5)] + public virtual string UiFeeReceiver { get; set; } + + [Parameter("address", "market", 6)] public virtual string Market { get; set; } + + [Parameter("address", "initialCollateralToken", 7)] + public virtual string InitialCollateralToken { get; set; } + + [Parameter("address[]", "swapPath", 8)] + public virtual List SwapPath { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/BaseFundingValues.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/BaseFundingValues.cs new file mode 100644 index 0000000..e28fa97 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/BaseFundingValues.cs @@ -0,0 +1,17 @@ +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class BaseFundingValues : BaseFundingValuesBase + { + } + + public class BaseFundingValuesBase + { + [Parameter("tuple", "fundingFeeAmountPerSize", 1)] + public virtual PositionType FundingFeeAmountPerSize { get; set; } + + [Parameter("tuple", "claimableFundingAmountPerSize", 2)] + public virtual PositionType ClaimableFundingAmountPerSize { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/CollateralType.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/CollateralType.cs new file mode 100644 index 0000000..0c63931 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/CollateralType.cs @@ -0,0 +1,17 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class CollateralType : CollateralTypeBase + { + } + + public class CollateralTypeBase + { + [Parameter("uint256", "longToken", 1)] public virtual BigInteger LongToken { get; set; } + + [Parameter("uint256", "shortToken", 2)] + public virtual BigInteger ShortToken { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/ExecutionPriceResult.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/ExecutionPriceResult.cs new file mode 100644 index 0000000..f4dca70 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/ExecutionPriceResult.cs @@ -0,0 +1,21 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class ExecutionPriceResult : ExecutionPriceResultBase + { + } + + public class ExecutionPriceResultBase + { + [Parameter("int256", "priceImpactUsd", 1)] + public virtual BigInteger PriceImpactUsd { get; set; } + + [Parameter("uint256", "priceImpactDiffUsd", 2)] + public virtual BigInteger PriceImpactDiffUsd { get; set; } + + [Parameter("uint256", "executionPrice", 3)] + public virtual BigInteger ExecutionPrice { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/Flags.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/Flags.cs new file mode 100644 index 0000000..c1e50bc --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/Flags.cs @@ -0,0 +1,19 @@ +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class Flags : FlagsBase + { + } + + public class FlagsBase + { + [Parameter("bool", "isLong", 1)] public virtual bool IsLong { get; set; } + + [Parameter("bool", "shouldUnwrapNativeToken", 2)] + public virtual bool ShouldUnwrapNativeToken { get; set; } + + [Parameter("bool", "isFrozen", 3)] public virtual bool IsFrozen { get; set; } + [Parameter("bool", "autoCancel", 4)] public virtual bool AutoCancel { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/GetNextFundingAmountPerSizeResult.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/GetNextFundingAmountPerSizeResult.cs new file mode 100644 index 0000000..b567a7b --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/GetNextFundingAmountPerSizeResult.cs @@ -0,0 +1,27 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class GetNextFundingAmountPerSizeResult : GetNextFundingAmountPerSizeResultBase + { + } + + public class GetNextFundingAmountPerSizeResultBase + { + [Parameter("bool", "longsPayShorts", 1)] + public virtual bool LongsPayShorts { get; set; } + + [Parameter("uint256", "fundingFactorPerSecond", 2)] + public virtual BigInteger FundingFactorPerSecond { get; set; } + + [Parameter("int256", "nextSavedFundingFactorPerSecond", 3)] + public virtual BigInteger NextSavedFundingFactorPerSecond { get; set; } + + [Parameter("tuple", "fundingFeeAmountPerSizeDelta", 4)] + public virtual PositionType FundingFeeAmountPerSizeDelta { get; set; } + + [Parameter("tuple", "claimableFundingAmountPerSizeDelta", 5)] + public virtual PositionType ClaimableFundingAmountPerSizeDelta { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/MarketInfo.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/MarketInfo.cs new file mode 100644 index 0000000..da3ee0f --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/MarketInfo.cs @@ -0,0 +1,30 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class MarketInfo : MarketInfoBase + { + } + + public class MarketInfoBase + { + [Parameter("tuple", "market", 1)] public virtual MarketsProps Market { get; set; } + + [Parameter("uint256", "borrowingFactorPerSecondForLongs", 2)] + public virtual BigInteger BorrowingFactorPerSecondForLongs { get; set; } + + [Parameter("uint256", "borrowingFactorPerSecondForShorts", 3)] + public virtual BigInteger BorrowingFactorPerSecondForShorts { get; set; } + + [Parameter("tuple", "baseFunding", 4)] public virtual BaseFundingValues BaseFunding { get; set; } + + [Parameter("tuple", "nextFunding", 5)] + public virtual GetNextFundingAmountPerSizeResult NextFunding { get; set; } + + [Parameter("tuple", "virtualInventory", 6)] + public virtual VirtualInventory VirtualInventory { get; set; } + + [Parameter("bool", "isDisabled", 7)] public virtual bool IsDisabled { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/MarketPrices.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/MarketPrices.cs new file mode 100644 index 0000000..aa40ff6 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/MarketPrices.cs @@ -0,0 +1,27 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class MarketPrices : MarketPricesBase + { + } + + public class MarketPricesBase + { + [Parameter("tuple", "indexTokenPrice", 1)] + public virtual MarketPrice IndexTokenPrice { get; set; } + + [Parameter("tuple", "longTokenPrice", 2)] + public virtual MarketPrice LongTokenPrice { get; set; } + + [Parameter("tuple", "shortTokenPrice", 3)] + public virtual MarketPrice ShortTokenPrice { get; set; } + } + + public class MarketPrice + { + [Parameter("uint256", "min", 1)] public BigInteger Min { get; set; } + [Parameter("uint256", "max", 2)] public BigInteger Max { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/Numbers.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/Numbers.cs new file mode 100644 index 0000000..88e0f11 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/Numbers.cs @@ -0,0 +1,44 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class Numbers : NumbersBase + { + } + + public class NumbersBase + { + [Parameter("uint8", "orderType", 1)] public virtual byte OrderType { get; set; } + + [Parameter("uint8", "decreasePositionSwapType", 2)] + public virtual byte DecreasePositionSwapType { get; set; } + + [Parameter("uint256", "sizeDeltaUsd", 3)] + public virtual BigInteger SizeDeltaUsd { get; set; } + + [Parameter("uint256", "initialCollateralDeltaAmount", 4)] + public virtual BigInteger InitialCollateralDeltaAmount { get; set; } + + [Parameter("uint256", "triggerPrice", 5)] + public virtual BigInteger TriggerPrice { get; set; } + + [Parameter("uint256", "acceptablePrice", 6)] + public virtual BigInteger AcceptablePrice { get; set; } + + [Parameter("uint256", "executionFee", 7)] + public virtual BigInteger ExecutionFee { get; set; } + + [Parameter("uint256", "callbackGasLimit", 8)] + public virtual BigInteger CallbackGasLimit { get; set; } + + [Parameter("uint256", "minOutputAmount", 9)] + public virtual BigInteger MinOutputAmount { get; set; } + + [Parameter("uint256", "updatedAtBlock", 10)] + public virtual BigInteger UpdatedAtBlock { get; set; } + + [Parameter("uint256", "updatedAtTime", 11)] + public virtual BigInteger UpdatedAtTime { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionBorrowingFees.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionBorrowingFees.cs new file mode 100644 index 0000000..ef14449 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionBorrowingFees.cs @@ -0,0 +1,24 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class PositionBorrowingFees : PositionBorrowingFeesBase + { + } + + public class PositionBorrowingFeesBase + { + [Parameter("uint256", "borrowingFeeUsd", 1)] + public virtual BigInteger BorrowingFeeUsd { get; set; } + + [Parameter("uint256", "borrowingFeeAmount", 2)] + public virtual BigInteger BorrowingFeeAmount { get; set; } + + [Parameter("uint256", "borrowingFeeReceiverFactor", 3)] + public virtual BigInteger BorrowingFeeReceiverFactor { get; set; } + + [Parameter("uint256", "borrowingFeeAmountForFeeReceiver", 4)] + public virtual BigInteger BorrowingFeeAmountForFeeReceiver { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionFees.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionFees.cs new file mode 100644 index 0000000..14716da --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionFees.cs @@ -0,0 +1,47 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class PositionFees : PositionFeesBase + { + } + + public class PositionFeesBase + { + [Parameter("tuple", "referral", 1)] public virtual PositionReferralFees Referral { get; set; } + [Parameter("tuple", "funding", 2)] public virtual PositionFundingFees Funding { get; set; } + [Parameter("tuple", "borrowing", 3)] public virtual PositionBorrowingFees Borrowing { get; set; } + [Parameter("tuple", "ui", 4)] public virtual PositionUiFees Ui { get; set; } + + [Parameter("tuple", "collateralTokenPrice", 5)] + public virtual Props CollateralTokenPrice { get; set; } + + [Parameter("uint256", "positionFeeFactor", 6)] + public virtual BigInteger PositionFeeFactor { get; set; } + + [Parameter("uint256", "protocolFeeAmount", 7)] + public virtual BigInteger ProtocolFeeAmount { get; set; } + + [Parameter("uint256", "positionFeeReceiverFactor", 8)] + public virtual BigInteger PositionFeeReceiverFactor { get; set; } + + [Parameter("uint256", "feeReceiverAmount", 9)] + public virtual BigInteger FeeReceiverAmount { get; set; } + + [Parameter("uint256", "feeAmountForPool", 10)] + public virtual BigInteger FeeAmountForPool { get; set; } + + [Parameter("uint256", "positionFeeAmountForPool", 11)] + public virtual BigInteger PositionFeeAmountForPool { get; set; } + + [Parameter("uint256", "positionFeeAmount", 12)] + public virtual BigInteger PositionFeeAmount { get; set; } + + [Parameter("uint256", "totalCostAmountExcludingFunding", 13)] + public virtual BigInteger TotalCostAmountExcludingFunding { get; set; } + + [Parameter("uint256", "totalCostAmount", 14)] + public virtual BigInteger TotalCostAmount { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionFundingFees.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionFundingFees.cs new file mode 100644 index 0000000..7354752 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionFundingFees.cs @@ -0,0 +1,30 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class PositionFundingFees : PositionFundingFeesBase + { + } + + public class PositionFundingFeesBase + { + [Parameter("uint256", "fundingFeeAmount", 1)] + public virtual BigInteger FundingFeeAmount { get; set; } + + [Parameter("uint256", "claimableLongTokenAmount", 2)] + public virtual BigInteger ClaimableLongTokenAmount { get; set; } + + [Parameter("uint256", "claimableShortTokenAmount", 3)] + public virtual BigInteger ClaimableShortTokenAmount { get; set; } + + [Parameter("uint256", "latestFundingFeeAmountPerSize", 4)] + public virtual BigInteger LatestFundingFeeAmountPerSize { get; set; } + + [Parameter("uint256", "latestLongTokenClaimableFundingAmountPerSize", 5)] + public virtual BigInteger LatestLongTokenClaimableFundingAmountPerSize { get; set; } + + [Parameter("uint256", "latestShortTokenClaimableFundingAmountPerSize", 6)] + public virtual BigInteger LatestShortTokenClaimableFundingAmountPerSize { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionInfo.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionInfo.cs new file mode 100644 index 0000000..91bf6d5 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionInfo.cs @@ -0,0 +1,26 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class PositionInfo : PositionInfoBase + { + } + + public class PositionInfoBase + { + [Parameter("tuple", "position", 1)] public virtual Props Position { get; set; } + [Parameter("tuple", "fees", 2)] public virtual PositionFees Fees { get; set; } + + [Parameter("tuple", "executionPriceResult", 3)] + public virtual ExecutionPriceResult ExecutionPriceResult { get; set; } + + [Parameter("int256", "basePnlUsd", 4)] public virtual BigInteger BasePnlUsd { get; set; } + + [Parameter("int256", "uncappedBasePnlUsd", 5)] + public virtual BigInteger UncappedBasePnlUsd { get; set; } + + [Parameter("int256", "pnlAfterPriceImpactUsd", 6)] + public virtual BigInteger PnlAfterPriceImpactUsd { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionReferralFees.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionReferralFees.cs new file mode 100644 index 0000000..680616b --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionReferralFees.cs @@ -0,0 +1,33 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class PositionReferralFees : PositionReferralFeesBase + { + } + + public class PositionReferralFeesBase + { + [Parameter("bytes32", "referralCode", 1)] + public virtual byte[] ReferralCode { get; set; } + + [Parameter("address", "affiliate", 2)] public virtual string Affiliate { get; set; } + [Parameter("address", "trader", 3)] public virtual string Trader { get; set; } + + [Parameter("uint256", "totalRebateFactor", 4)] + public virtual BigInteger TotalRebateFactor { get; set; } + + [Parameter("uint256", "traderDiscountFactor", 5)] + public virtual BigInteger TraderDiscountFactor { get; set; } + + [Parameter("uint256", "totalRebateAmount", 6)] + public virtual BigInteger TotalRebateAmount { get; set; } + + [Parameter("uint256", "traderDiscountAmount", 7)] + public virtual BigInteger TraderDiscountAmount { get; set; } + + [Parameter("uint256", "affiliateRewardAmount", 8)] + public virtual BigInteger AffiliateRewardAmount { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionType.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionType.cs new file mode 100644 index 0000000..d04218b --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionType.cs @@ -0,0 +1,14 @@ +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class PositionType : PositionTypeBase + { + } + + public class PositionTypeBase + { + [Parameter("tuple", "long", 1)] public virtual CollateralType Long { get; set; } + [Parameter("tuple", "short", 2)] public virtual CollateralType Short { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionUiFees.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionUiFees.cs new file mode 100644 index 0000000..237ebe3 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/PositionUiFees.cs @@ -0,0 +1,21 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class PositionUiFees : PositionUiFeesBase + { + } + + public class PositionUiFeesBase + { + [Parameter("address", "uiFeeReceiver", 1)] + public virtual string UiFeeReceiver { get; set; } + + [Parameter("uint256", "uiFeeReceiverFactor", 2)] + public virtual BigInteger UiFeeReceiverFactor { get; set; } + + [Parameter("uint256", "uiFeeAmount", 3)] + public virtual BigInteger UiFeeAmount { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/Props.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/Props.cs new file mode 100644 index 0000000..b6d5848 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/Props.cs @@ -0,0 +1,15 @@ +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class Props : PropsBase + { + } + + public class PropsBase + { + [Parameter("tuple", "addresses", 1)] public virtual Addresses Addresses { get; set; } + [Parameter("tuple", "numbers", 2)] public virtual Numbers Numbers { get; set; } + [Parameter("tuple", "flags", 3)] public virtual Flags Flags { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/ReaderDefinition.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/ReaderDefinition.cs new file mode 100644 index 0000000..b08489b --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/ReaderDefinition.cs @@ -0,0 +1,775 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; +using Nethereum.Contracts; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class ReaderDeployment : ReaderDeploymentBase + { + public ReaderDeployment() : base(BYTECODE) + { + } + + public ReaderDeployment(string byteCode) : base(byteCode) + { + } + } + + public class ReaderDeploymentBase : ContractDeploymentMessage + { + public static string BYTECODE = + "608060405234801561001057600080fd5b5061541f806100206000396000f3fe608060405234801561001057600080fd5b506004361061013e5760003560e01c80630815bce114610143578063095ce6c51461016c5780630fa8f516146102155780631485d2971461023557806324c029e0146102555780632572d8f9146102765780632b17b4fd1461029e578063409f37c7146102d157806342a6f8d31461034357806349651b6a146103635780635d2b44f9146103835780635d5c6efe146103a35780635deceb84146103c5578063714af34b146103d857806377cfb162146103f8578063847bb46914610418578063971de27d14610438578063a01409381461044b578063a4f0d5501461045e578063addac2e014610471578063b4976dae14610510578063bc7b5bba14610523578063ce3264bf14610543578063ceeea3bf14610563578063ece9e0c814610583578063fd50649d146105a3575b600080fd5b610156610151366004612d22565b6105b6565b604051610163919061305a565b60405180910390f35b61017f61017a3660046130d1565b61064f565b60405161016392919060006101808201905083825282516020830152602083015160408301526040830151606083015260608301516080830152608083015160a083015260a083015160c083015260c083015160e083015260e083015161010081818501528085015191505061012081818501528085015191505061014081818501528085015161016085015250509392505050565b61022861022336600461314e565b610743565b604051610163919061317a565b61024861024336600461314e565b6107cf565b60405161016391906131cd565b61026861026336600461330d565b610855565b604051908152602001610163565b61028961028436600461338b565b610870565b60408051928352602083019190915201610163565b6102b16102ac366004613406565b610903565b604080519485529215156020850152918301526060820152608001610163565b6102e46102df366004613462565b61099e565b604080519384526020808501939093528151848201529181015160608085019190915291810151608080850191909152918101516001600160a01b031660a0808501919091529181015160c0840152015160e082015261010001610163565b6103566103513660046134cf565b610a78565b60405161016391906136dc565b61037661037136600461314e565b610bc5565b604051610163919061373e565b610396610391366004613751565b610c4b565b60405161016391906137bc565b6103b66103b13660046137ca565b610d64565b60405161016393929190613854565b6102686103d336600461386a565b610e7f565b6103eb6103e6366004613904565b610f08565b6040516101639190613970565b61040b6104063660046134cf565b610f8a565b604051610163919061397e565b61042b6104263660046139cd565b6110c9565b6040516101639190613aea565b610268610446366004613af9565b611158565b61026861045936600461330d565b6111ef565b6103eb61046c36600461314e565b6111fe565b61048461047f36600461314e565b61123f565b60408051825180516001600160a01b0390811683526020808301518216818501528285015182168486015260608084015183168186015260808085015184168187015260a0948501519093169385019390935294850151805160c08501529485015160e08401529284015161010083015283015161012082015291015161014082015261016001610163565b6103b661051e366004613b5e565b6112c2565b610536610531366004613c52565b6113d8565b6040516101639190613cb1565b610556610551366004613cf4565b6114c5565b6040516101639190613d29565b61057661057136600461314e565b611612565b6040516101639190613d6b565b610596610591366004613e0c565b611698565b6040516101639190613efc565b6102686105b1366004613f3f565b611776565b6105be612568565b6040516306bc109960e31b815273e14f1a0387a76c6427f22945246acd40e3f59ae0906335e084c890610601908b908b908b908b908b908b908b90600401613fca565b6106a060405180830381865af415801561061f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610643919061435f565b98975050505050505050565b60006106ae60405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604051637d494dc360e01b81527370cb5b3a4f10a25a9b522576bbbe7b9db58d264690637d494dc3906106f1908c908c908c908c908c908c908c906004016144ad565b61018060405180830381865af415801561070f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610733919061450f565b9150915097509795505050505050565b61074b6125b0565b60405163fdfc26f360e01b8152732da2ed5c3dcd92f7797339e2cb7ae30a6dd145329063fdfc26f39061078490869086906004016145c3565b6101e060405180830381865af41580156107a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c691906145dc565b90505b92915050565b6107d7612654565b60405163fdfc26f360e01b8152733063a99d2df2a871068d47041eb8d089e5de1cdc9063fdfc26f39061081090869086906004016145c3565b600060405180830381865af415801561082d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107c691908101906146bf565b60006108648686868686611784565b90505b95945050505050565b60008073fe1531c3b27e9e882881d9917b9cae9f2082c6df63b027d32d8989898989896040518763ffffffff1660e01b81526004016108b49695949392919061481e565b6040805180830381865af41580156108d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f49190614876565b91509150965096945050505050565b6000806000806000610916898989611815565b905060006109248a8a61188f565b905060008060006109878d858c8e60405160200161096c9060208082526016908201527513505617d4139317d19050d513d497d193d497d0511360521b604082015260600190565b60405160208183030381529060405280519060200120611920565b969f919e509c50949a509398505050505050505050565b6000806109e36040518060c0016040528060008152602001600081526020016000815260200160006001600160a01b0316815260200160008152602001600081525090565b60405163dafa66bf60e01b8152738c75f9905a9fd94a0d95cb0801d7de33a432667c9063dafa66bf90610a24908c908c908c908c908c908c9060040161489a565b61010060405180830381865af4158015610a42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6691906148ec565b92509250925096509650969350505050565b60606000610a8886868686611974565b9050600081516001600160401b03811115610aa557610aa5612ade565b604051908082528060200260200182016040528015610ade57816020015b610acb6126ed565b815260200190600190039081610ac35790505b50905060005b8251811015610bba576000838281518110610b0157610b01614974565b602002602001015190507367040c411c1b3195361801e9ad8a91d1fe9c0bc263fdfc26f38a836040518363ffffffff1660e01b8152600401610b449291906145c3565b600060405180830381865af4158015610b61573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b899190810190614aa0565b838381518110610b9b57610b9b614974565b6020026020010181905250508080610bb290614bec565b915050610ae4565b509695505050505050565b610bcd6126ed565b60405163fdfc26f360e01b81527367040c411c1b3195361801e9ad8a91d1fe9c0bc29063fdfc26f390610c0690869086906004016145c3565b600060405180830381865af4158015610c23573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107c69190810190614aa0565b610c5361276e565b60405163a8d8fff560e01b815260009073bbf05cf8e1c6548092a6a02c4c5330e76bf0fe2d9063a8d8fff590610c8f908c908c90600401614c05565b608060405180830381865af4158015610cac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd09190614c7c565b604051630a37d4c760e11b8152909150738c75f9905a9fd94a0d95cb0801d7de33a432667c9063146fa98e90610d16908c9085908c908c908c908c908c90600401614c98565b606060405180830381865af4158015610d33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d579190614cec565b9998505050505050505050565b60008060008073bbf05cf8e1c6548092a6a02c4c5330e76bf0fe2d63a8d8fff58c8c6040518363ffffffff1660e01b8152600401610da3929190614c05565b608060405180830381865af4158015610dc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de49190614c7c565b6040516340f5d44f60e11b8152909150738c75f9905a9fd94a0d95cb0801d7de33a432667c906381eba89e90610e2a908e9085908e908e908e908e908e90600401614d08565b606060405180830381865af4158015610e47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6b9190614d5a565b935093509350509750975097945050505050565b604051632bf0549960e11b81526000907385fcd569577a0bb52abf9d9e691f69d94dd61af8906357e0a93290610ec7908c908c908c908c908c908c908c908c90600401614d88565b602060405180830381865af4158015610ee4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d579190614df3565b610f1061278f565b60405163a8d8fff560e01b815273bbf05cf8e1c6548092a6a02c4c5330e76bf0fe2d9063a8d8fff590610f499086908690600401614c05565b608060405180830381865af4158015610f66573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c69190614c7c565b60606000610f9a868686866119f3565b9050600081516001600160401b03811115610fb757610fb7612ade565b604051908082528060200260200182016040528015610ff057816020015b610fdd6125b0565b815260200190600190039081610fd55790505b50905060005b8251811015610bba57600083828151811061101357611013614974565b60200260200101519050732da2ed5c3dcd92f7797339e2cb7ae30a6dd1453263fdfc26f38a836040518363ffffffff1660e01b81526004016110569291906145c3565b6101e060405180830381865af4158015611074573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109891906145dc565b8383815181106110aa576110aa614974565b60200260200101819052505080806110c190614bec565b915050610ff6565b6110d16127b6565b60405163619c4ddb60e01b815273e14f1a0387a76c6427f22945246acd40e3f59ae09063619c4ddb9061110c90879087908790600401614e0c565b6103a060405180830381865af415801561112a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114e9190614ee7565b90505b9392505050565b60008073bbf05cf8e1c6548092a6a02c4c5330e76bf0fe2d63a8d8fff588886040518363ffffffff1660e01b8152600401611194929190614c05565b608060405180830381865af41580156111b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d59190614c7c565b90506111e48782878787611a0d565b979650505050505050565b60006108648686868686611a51565b61120661278f565b6040516329bc01e160e11b815273bbf05cf8e1c6548092a6a02c4c5330e76bf0fe2d9063537803c290610f4990869086906004016145c3565b611247612827565b60405163fdfc26f360e01b815273cfad9cb2a681b63884aef98af28458692137c9e39063fdfc26f39061128090869086906004016145c3565b61016060405180830381865af415801561129e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c69190614ff6565b600080600080732da2ed5c3dcd92f7797339e2cb7ae30a6dd1453263fdfc26f38a886040518363ffffffff1660e01b81526004016113019291906145c3565b6101e060405180830381865af415801561131f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134391906145dc565b60405163e22de79360e01b8152909150734fb37ea32d371fa653d644bdd1e818be5c8fa9ff9063e22de79390611385908c908c908c9087908c906004016150b3565b606060405180830381865af41580156113a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c69190614d5a565b93509350935050955095509592505050565b606060006113e7868585611a7c565b9050600081516001600160401b0381111561140457611404612ade565b60405190808252806020026020018201604052801561143d57816020015b61142a6127b6565b8152602001906001900390816114225790505b50905060005b8251811015610bba57600087828151811061146057611460614974565b60200260200101519050600084838151811061147e5761147e614974565b602002602001015190506114938a83836110c9565b8484815181106114a5576114a5614974565b6020026020010181905250505080806114bd90614bec565b915050611443565b606060006114d4858585611a7c565b9050600081516001600160401b038111156114f1576114f1612ade565b60405190808252806020026020018201604052801561152a57816020015b61151761278f565b81526020019060019003908161150f5790505b50905060005b825181101561160857600083828151811061154d5761154d614974565b60200260200101519050600073bbf05cf8e1c6548092a6a02c4c5330e76bf0fe2d63a8d8fff58a846040518363ffffffff1660e01b8152600401611592929190614c05565b608060405180830381865af41580156115af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115d39190614c7c565b9050808484815181106115e8576115e8614974565b60200260200101819052505050808061160090614bec565b915050611530565b5095945050505050565b61161a612898565b60405163fdfc26f360e01b815273d521cb31b14bb9f70d9a59b47d8763336cad03959063fdfc26f39061165390869086906004016145c3565b600060405180830381865af4158015611670573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107c6919081019061511d565b6060600084516001600160401b038111156116b5576116b5612ade565b6040519080825280602002602001820160405280156116ee57816020015b6116db612568565b8152602001906001900390816116d35790505b50905060005b8551811015610bba57600086828151811061171157611711614974565b6020026020010151905061174589898389868151811061173357611733614974565b602002602001015160008a60016105b6565b83838151811061175757611757614974565b602002602001018190525050808061176e90614bec565b9150506116f4565b600061086785858585611b37565b60008061179a611795888887611b66565b611bb9565b905060006117a9888887611c2c565b90508115806117b6575080155b156117c657600092505050610867565b60006117d3878787611c73565b905060006117e46117958385615246565b90506000876117fc576117f7828661525d565b611806565b611806858361525d565b9b9a5050505050505050505050565b6000836001600160a01b031663bd02d0f56118308585611cac565b6040518263ffffffff1660e01b815260040161184e91815260200190565b602060405180830381865afa15801561186b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114e9190614df3565b61189761278f565b60405163a8d8fff560e01b815260009073bbf05cf8e1c6548092a6a02c4c5330e76bf0fe2d9063a8d8fff5906118d39087908790600401614c05565b608060405180830381865af41580156118f0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119149190614c7c565b90506107c68482611d33565b600080600080611934898989896001611a0d565b905060006119488a878b600001518a611e0c565b90506000808313801561196257508161196084611e87565b115b9b929a50909850909650505050505050565b6060846001600160a01b031663f069052a61198e86611ed9565b85856040518463ffffffff1660e01b81526004016119ae93929190613854565b600060405180830381865afa1580156119cb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108679190810190615284565b6060846001600160a01b031663f069052a61198e86611f5b565b600080611a1e878787878715611f96565b905080600003611a32576000915050610867565b6000611a45888888600001518888611784565b9050610643818361200f565b600080611a5f878786611b66565b90506000611a708888888888611784565b90506106438282612056565b6060836001600160a01b031663e7e4148e604051602001611abc906020808252600b908201526a13505492d15517d31254d560aa1b604082015260600190565b6040516020818303038152906040528051906020012085856040518463ffffffff1660e01b8152600401611af293929190613854565b600060405180830381865afa158015611b0f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261114e9190810190615309565b600080611b48868686600187611784565b90506000611b5a878787600088611784565b90506111e4818361533d565b600080611b7b8460400151856060015161206c565b90506000611b948686600001518760400151878661209b565b90506000611bad8787600001518860600151888761209b565b90506111e48183615365565b60006001600160ff1b03821115611c285760405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e2061604482015267371034b73a191a9b60c11b60648201526084015b60405180910390fd5b5090565b600080611c418460400151856060015161206c565b90506000611c5a86866000015187604001518786612121565b90506000611bad87876000015188606001518887612121565b60008215611c945781611c87578351611c8d565b83602001515b9050611151565b81611ca357836020015161114e565b50509051919050565b6000604051602001611cdf906020808252600d908201526c1310551154d517d0511317d055609a1b604082015260600190565b60408051601f198184030181528282528051602091820120908301526001600160a01b0385169082015282151560608201526080015b60405160208183030381529060405280519060200120905092915050565b80516001600160a01b0316611d5b576040516302fde0d760e11b815260040160405180910390fd5b6000826001600160a01b0316637ae1cfca611d79846000015161213e565b6040518263ffffffff1660e01b8152600401611d9791815260200190565b602060405180830381865afa158015611db4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd89190615378565b90508015611e075781516040516309f8c93760e01b81526001600160a01b039091166004820152602401611c1f565b505050565b6000846001600160a01b031663bd02d0f5611e28868686612176565b6040518263ffffffff1660e01b8152600401611e4691815260200190565b602060405180830381865afa158015611e63573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108679190614df3565b600080821215611c285760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401611c1f565b6000604051602001611f11906020808252601290820152711050d0d3d5539517d3d491115497d31254d560721b604082015260600190565b60408051601f198184030181528282528051602091820120908301526001600160a01b03841690820152606001604051602081830303815290604052805190602001209050919050565b6000604051602001611f11906020808252601590820152741050d0d3d5539517d413d4d2551253d397d31254d5605a1b604082015260600190565b60008083611fa8578560600151611fae565b85604001515b90506000611fbd888884612205565b905060008415611feb5785611fda57866040015160200151611fe4565b8660200151602001515b9050612005565b85611ffb57604087015151612002565b6020870151515b90505b610d578183615246565b60008061202461201e856122a3565b846122b4565b9050600084136120455761203781611bb9565b61204090615395565b61204e565b61204e81611bb9565b949350505050565b60008161206284611bb9565b6107c6919061533d565b6000816001600160a01b0316836001600160a01b03161461208e576001612091565b60025b60ff169392505050565b600081866001600160a01b031663bd02d0f56120b88888886122c2565b6040518263ffffffff1660e01b81526004016120d691815260200190565b602060405180830381865afa1580156120f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121179190614df3565b61086491906153c7565b600081866001600160a01b031663bd02d0f56120b888888861233a565b6000604051602001611f11906020808252601290820152711254d7d3505492d15517d11254d05093115160721b604082015260600190565b60006040516020016121aa906020808252600e908201526d26a0ac2fa827262fa320a1aa27a960911b604082015260600190565b60408051601f1981840301815282825280516020918201209083015281018590526001600160a01b0384166060820152821515608082015260a0015b6040516020818303038152906040528051906020012090509392505050565b60008061221a8460400151856060015161206c565b905080856001600160a01b031663bd02d0f561223a876000015187612377565b6040518263ffffffff1660e01b815260040161225891815260200190565b602060405180830381865afa158015612275573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122999190614df3565b61086791906153c7565b600080821215611c28575060000390565b60006107c6838360006123e5565b60006040516020016122f5906020808252600d908201526c13d4115397d2539511549154d5609a1b604082015260600190565b60408051601f198184030181528282528051602091820120908301526001600160a01b038087169183019190915284166060820152821515608082015260a0016121e6565b60006040516020016122f5906020808252601790820152764f50454e5f494e5445524553545f494e5f544f4b454e5360481b604082015260600190565b60006040516020016123a8906020808252600b908201526a1413d3d317d05353d5539560aa1b604082015260600190565b60408051601f198184030181528282528051602091820120908301526001600160a01b038086169183019190915283166060820152608001611d15565b6000836000036123f757506000611151565b811561241657611c8d8468327cb2734119d3b7a9601e1b85600161242d565b61114e8468327cb2734119d3b7a9601e1b8561247e565b60008061243b86868661247e565b9050600183600281111561245157612451613515565b14801561246e575060008480612469576124696153b1565b868809115b1561086757610864600182615365565b60008080600019858709858702925082811083820303915050806000036124b8578382816124ae576124ae6153b1565b0492505050611151565b8084116124ff5760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b6044820152606401611c1f565b60008486880960026001871981018816978890046003810283188082028403028082028403028082028403028082028403028082028403029081029092039091026000889003889004909101858311909403939093029303949094049190911702949350505050565b6040518060c0016040528061257b6125b0565b81526020016125886128e0565b815260200161259561276e565b81526020016000815260200160008152602001600081525090565b6040805160c081019091526000606082018181526080830182905260a08301919091528190815260200161263760405180610160016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b81526040805160208181019092526000815291015290565b905290565b604080516101808101909152600060608083018281526080840183905260a0840183905260c0840183905260e084018390526101008401839052610120840192909252610140830181905261016083015281905b81526020016126376040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516101608101909152600060608083018281526080840183905260a0840183905260c0840183905260e084018390526101008401839052610120840192909252610140830152815260208101612744612a26565b81526040805160808101825260008082526020828101829052928201819052606082015291015290565b60405180606001604052806000815260200160008152602001600081525090565b60408051608081018252600080825260208201819052918101829052606081019190915290565b6040518060e001604052806127c961278f565b815260200160008152602001600081526020016127e4612a41565b81526020016127f1612a61565b815260200161281a60405180606001604052806000815260200160008152602001600081525090565b8152600060209091015290565b60408051610100810182526000918101828152606082018390526080820183905260a0820183905260c0820183905260e0820192909252908190815260200161264f6040518060a0016040528060008152602001600081526020016000815260200160008152602001600081525090565b604080516101408101909152600060608083018281526080840183905260a0840183905260c0840183905260e0840192909252610100830181905261012083015281906126a8565b604080516102c0810190915260006101c082018181526101e08301829052610200830182905261022083018290526102408301829052610260830182905261028083018290526102a08301919091528190815260200161296f6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b815260200161299f6040518060800160405280600081526020016000815260200160008152602001600081525090565b815260408051606081018252600080825260208281018290529282015291019081526020016129e1604051806040016040528060008152602001600081525090565b81526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516101608101909152806000815260200160006129e1565b6040518060400160405280612a54612a87565b815260200161264f612a87565b6040518060a001604052806000151581526020016000815260200160008152602001612a545b6040805160808101825260009181018281526060820192909252908190815260200161264f604051806040016040528060008152602001600081525090565b6001600160a01b0381168114612adb57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715612b1657612b16612ade565b60405290565b604051606081016001600160401b0381118282101715612b1657612b16612ade565b604051608081016001600160401b0381118282101715612b1657612b16612ade565b60405161016081016001600160401b0381118282101715612b1657612b16612ade565b60405161010081016001600160401b0381118282101715612b1657612b16612ade565b60405160c081016001600160401b0381118282101715612b1657612b16612ade565b6040516101c081016001600160401b0381118282101715612b1657612b16612ade565b60405160e081016001600160401b0381118282101715612b1657612b16612ade565b60405161012081016001600160401b0381118282101715612b1657612b16612ade565b60405160a081016001600160401b0381118282101715612b1657612b16612ade565b604051601f8201601f191681016001600160401b0381118282101715612c7a57612c7a612ade565b604052919050565b600060408284031215612c9457600080fd5b612c9c612af4565b9050813581526020820135602082015292915050565b600060c08284031215612cc457600080fd5b612ccc612b1c565b9050612cd88383612c82565b8152612ce78360408401612c82565b6020820152612cf98360808401612c82565b604082015292915050565b8035612d0f81612ac6565b919050565b8015158114612adb57600080fd5b6000806000806000806000610180888a031215612d3e57600080fd5b8735612d4981612ac6565b96506020880135612d5981612ac6565b955060408801359450612d6f8960608a01612cb2565b93506101208801359250610140880135612d8881612ac6565b9150610160880135612d9981612d14565b8091505092959891949750929550565b6001600160a01b03169052565b80516001600160a01b03908116835260208083015182169084015260409182015116910152565b805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c083015260e081015160e08301526101008082015181840152506101208082015181840152506101408082015181840152505050565b612e5a828251612db6565b6020810151612e6c6060840182612ddd565b50604001515115156101c09190910152565b80518252602090810151910152565b8051825260208082015190830152604090810151910152565b612eb1828251612e4f565b602081810151805180516101e0860152808301516001600160a01b0390811661020087015260408083015182166102208801526060808401516102408901526080808501516102608a015260a0808601516102808b015260c08601516102a08b015260e0909501516102c08a01528587015180516102e08b0152808801516103008b0152808401516103208b0152808301516103408b0152808201516103608b0152909401516103808901528185015180516103a08a0152808701516103c08a0152808301516103e08a01528101516104008901528401518051909216610420880152938101516104408701529092015161046085015290810151612fba610480850182612e7e565b5060a08101516104c084015260c08101516104e084015260e08101516105008401526101008101516105208401526101208101516105408401526101408101516105608401526101608101516105808401526101808101516105a08401526101a001516105c083015260408101516130366105e0840182612e8d565b506060810151610640830152608081015161066083015260a0015161068090910152565b6106a081016107c98284612ea6565b60006080828403121561307b57600080fd5b613083612b3e565b9050813561309081612ac6565b815260208201356130a081612ac6565b602082015260408201356130b381612ac6565b604082015260608201356130c681612ac6565b606082015292915050565b60008060008060008060006101a0888a0312156130ed57600080fd5b87356130f881612ac6565b96506131078960208a01613069565b95506131168960a08a01612c82565b94506131258960e08a01612c82565b9350613135896101208a01612c82565b92506101608801359150610180880135612d9981612d14565b6000806040838503121561316157600080fd5b823561316c81612ac6565b946020939093013593505050565b6101e081016107c98284612e4f565b600081518084526020808501945080840160005b838110156131c25781516001600160a01b03168752958201959082019060010161319d565b509495945050505050565b60208152600082516101208060208501526131ed61014085018351612da9565b6020820151613200610160860182612da9565b506040820151613214610180860182612da9565b5060608201516132286101a0860182612da9565b50608082015161323c6101c0860182612da9565b5060a08201516132506101e0860182612da9565b5060c0820151613264610200860182612da9565b5060e08201518161022086015261327f610260860182613189565b9050610100830151925061013f19858203016102408601526132a18184613189565b92505060208501516132f56040860182805182526020810151602083015260408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c08301525050565b50604085015180511515858301525090949350505050565b6000806000806000610120868803121561332657600080fd5b853561333181612ac6565b94506133408760208801613069565b935061334f8760a08801612c82565b925060e086013561335f81612d14565b915061010086013561337081612d14565b809150509295509295909350565b60038110612adb57600080fd5b6000806000806000806101c087890312156133a557600080fd5b86356133b081612ac6565b95506133bf8860208901613069565b94506133ce8860a08901612cb2565b935061016087013592506101808701356133e781612ac6565b91506101a08701356133f88161337e565b809150509295509295509295565b600080600080610120858703121561341d57600080fd5b843561342881612ac6565b9350602085013561343881612ac6565b9250604085013561344881612d14565b91506134578660608701612cb2565b905092959194509250565b6000806000806000806101c0878903121561347c57600080fd5b863561348781612ac6565b95506134968860208901613069565b94506134a58860a08901612cb2565b93506101608701356134b681612ac6565b925061018087013591506101a08701356133f881612ac6565b600080600080608085870312156134e557600080fd5b84356134f081612ac6565b9350602085013561350081612ac6565b93969395505050506040820135916060013590565b634e487b7160e01b600052602160045260246000fd5b6008811061353b5761353b613515565b9052565b60038110612adb57612adb613515565b61353b8161353f565b61356382825161352b565b6020810151613575602084018261354f565b5060408101516040830152606081015160608301526080810151608083015260a081015160a083015260c081015160c083015260e081015160e08301526101008082015181840152506101208082015181840152506101408082015181840152505050565b805161020080845281516001600160a01b03908116918501919091526020820151166102208401526040810151600091613618610240860183612da9565b6060810151915061362d610260860183612da9565b60808101519150613642610280860183612da9565b60a081015191506136576102a0860183612da9565b60c0810151915061366c6102c0860183612da9565b60e001516101006102e08601529050613689610300850182613189565b9050602083015161369d6020860182613558565b5060408381015180511515610180870152602081015115156101a08701529081015115156101c0860152606081015115156101e0860152509392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561373157603f1988860301845261371f8583516135da565b94509285019290850190600101613703565b5092979650505050505050565b6020815260006107c660208301846135da565b6000806000806000806000610100888a03121561376d57600080fd5b873561377881612ac6565b9650602088013561378881612ac6565b95506137978960408a01612c82565b94506080880135935060a0880135925060c0880135915060e0880135612d9981612d14565b606081016107c98284612e8d565b6000806000806000806000610120888a0312156137e657600080fd5b87356137f181612ac6565b9650602088013561380181612ac6565b9550604088013561381181612ac6565b9450606088013561382181612ac6565b9350608088013592506138378960a08a01612c82565b91506138468960e08a01612c82565b905092959891949750929550565b9283526020830191909152604082015260600190565b600080600080600080600080610200898b03121561388757600080fd5b883561389281612ac6565b97506138a18a60208b01613069565b96506138b08a60a08b01612cb2565b9550610160890135945061018089013593506101a08901356138d181612ac6565b92506101c08901356138e28161337e565b91506101e08901356138f381612d14565b809150509295985092959890939650565b6000806040838503121561391757600080fd5b823561392281612ac6565b9150602083013561393281612ac6565b809150509250929050565b80516001600160a01b03908116835260208083015182169084015260408083015182169084015260609182015116910152565b608081016107c9828461393d565b6020808252825182820181905260009190848201906040850190845b818110156139c1576139ad838551612e4f565b928401926101e0929092019160010161399a565b50909695505050505050565b600080600061010084860312156139e357600080fd5b83356139ee81612ac6565b92506139fd8560208601612cb2565b915060e0840135613a0d81612ac6565b809150509250925092565b613a23828251612e7e565b6020810151611e076040840182612e7e565b613a4082825161393d565b60208101516080830152604081015160a08301526060810151613a6760c084018251613a18565b60200151613a79610140840182613a18565b506080810151805115156101c084015260208101516101e084015260408101516102008401526060810151613ab2610220850182613a18565b5060800151613ac56102a0840182613a18565b5060a0810151613ad9610320840182612e8d565b5060c0015115156103809190910152565b6103a081016107c98284613a35565b60008060008060006101408688031215613b1257600080fd5b8535613b1d81612ac6565b94506020860135613b2d81612ac6565b9350613b3c8760408801612cb2565b9250610100860135613b4d81612d14565b915061012086013561337081612d14565b60008060008060006101a08688031215613b7757600080fd5b8535613b8281612ac6565b9450613b918760208801613069565b9350613ba08760a08801612cb2565b949793965093946101608101359450610180013592915050565b60006001600160401b03821115613bd357613bd3612ade565b5060051b60200190565b600082601f830112613bee57600080fd5b81356020613c03613bfe83613bba565b612c52565b82815260c09283028501820192828201919087851115613c2257600080fd5b8387015b85811015613c4557613c388982612cb2565b8452928401928101613c26565b5090979650505050505050565b60008060008060808587031215613c6857600080fd5b8435613c7381612ac6565b935060208501356001600160401b03811115613c8e57600080fd5b613c9a87828801613bdd565b949794965050505060408301359260600135919050565b6020808252825182820181905260009190848201906040850190845b818110156139c157613ce0838551613a35565b928401926103a09290920191600101613ccd565b600080600060608486031215613d0957600080fd5b8335613d1481612ac6565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b818110156139c157613d5883855161393d565b9284019260809290920191600101613d45565b602081526000825161012080602085015260018060a01b03808351166101408601528060208401511661016086015280604084015116610180860152506060820151613dbb6101a0860182612da9565b506080820151613dcf6101c0860182612da9565b5060a082015160e06101e0860152613deb610220860182613189565b905060c0830151925061013f19858203016102008601526132a18184613189565b600080600080600060a08688031215613e2457600080fd5b8535613e2f81612ac6565b9450602086810135613e4081612ac6565b945060408701356001600160401b0380821115613e5c57600080fd5b818901915089601f830112613e7057600080fd5b8135613e7e613bfe82613bba565b81815260059190911b8301840190848101908c831115613e9d57600080fd5b938501935b82851015613ebb57843582529385019390850190613ea2565b975050506060890135925080831115613ed357600080fd5b5050613ee188828901613bdd565b925050613ef060808701612d04565b90509295509295909350565b6020808252825182820181905260009190848201906040850190845b818110156139c157613f2b838551612ea6565b928401926106a09290920191600101613f18565b6000806000806101008587031215613f5657600080fd5b8435613f6181612ac6565b9350613f708660208701613069565b9250613f7f8660a08701612c82565b915060e0850135613f8f81612d14565b939692955090935050565b613fa5828251612e7e565b6020810151613fb76040840182612e7e565b506040810151611e076080840182612e7e565b6001600160a01b038881168252878116602083015260408201879052610180820190613ff96060840188613f9a565b856101208401528085166101408401525082151561016083015298975050505050505050565b8051612d0f81612ac6565b8051612d0f81612d14565b60006020828403121561404757600080fd5b604051602081016001600160401b038111828210171561406957614069612ade565b8060405250809150825161407c81612d14565b905292915050565b60008183036101e081121561409857600080fd5b6140a0612b1c565b915060608112156140b057600080fd5b6140b8612b1c565b83516140c381612ac6565b815260208401516140d381612ac6565b602082015260408401516140e681612ac6565b60408201528252610160605f19820181131561410157600080fd5b614109612b60565b9150606084015182526080840151602083015260a0840151604083015260c0840151606083015260e084015160808301526101008085015160a08401526101208086015160c08501526101408087015160e08601528387015183860152610180870151828601526101a0870151818601525050505080602083015250612cf9836101c08401614035565b600061010082840312156141a657600080fd5b6141ae612b83565b90508151815260208201516141c281612ac6565b602082015260408201516141d581612ac6565b80604083015250606082015160608201526080820151608082015260a082015160a082015260c082015160c082015260e082015160e082015292915050565b600060c0828403121561422657600080fd5b61422e612ba6565b9050815181526020820151602082015260408201516040820152606082015160608201526080820151608082015260a082015160a082015292915050565b60006080828403121561427e57600080fd5b614286612b3e565b90508151815260208201516020820152604082015160408201526060820151606082015292915050565b6000606082840312156142c257600080fd5b6142ca612b1c565b905081516142d781612ac6565b80825250602082015160208201526040820151604082015292915050565b60006040828403121561430757600080fd5b61430f612af4565b9050815181526020820151602082015292915050565b60006060828403121561433757600080fd5b61433f612b1c565b905081518152602082015160208201526040820151604082015292915050565b60008183036106a081121561437357600080fd5b61437b612ba6565b6143858585614084565b81526104006101df198301121561439b57600080fd5b6143a3612bc8565b91506143b3856101e08601614193565b82526143c3856102e08601614214565b60208301526143d6856103a0860161426c565b60408301526143e98561042086016142b0565b60608301526143fc8561048086016142f5565b60808301526104c084015160a08301526104e084015160c083015261050084015160e08301526105208401516101008301526105408401516101208301526105608401516101408301526105808401516101608301526105a08401516101808301526105c08401516101a083015281602082015261447e856105e08601614325565b6040820152610640840151606082015261066084015160808201526106809093015160a0840152509092915050565b6001600160a01b03881681526101a081016144cb602083018961393d565b6144d860a0830188612e7e565b6144e560e0830187612e7e565b6144f3610120830186612e7e565b8361016083015282151561018083015298975050505050505050565b60008082840361018081121561452457600080fd5b8351925061016080601f198301121561453c57600080fd5b614544612b60565b91506020850151825260408501516020830152606085015160408301526080850151606083015260a0850151608083015260c085015160a083015260e085015160c08301526101008086015160e08401526101208087015182850152610140915081870151818501525081860151818401525050809150509250929050565b6001600160a01b03929092168252602082015260400190565b60006101e082840312156145ef57600080fd5b6107c68383614084565b600082601f83011261460a57600080fd5b8151602061461a613bfe83613bba565b82815260059290921b8401810191818101908684111561463957600080fd5b8286015b84811015610bba57805161465081612ac6565b835291830191830161463d565b600060e0828403121561466f57600080fd5b614677612beb565b9050815181526020820151602082015260408201516040820152606082015160608201526080820151608082015260a082015160a082015260c082015160c082015292915050565b6000602082840312156146d157600080fd5b81516001600160401b03808211156146e857600080fd5b81840191506101208083870312156146ff57600080fd5b614707612b1c565b83518381111561471657600080fd5b840180880383131561472757600080fd5b61472f612c0d565b925061473a8161401f565b83526147486020820161401f565b60208401526147596040820161401f565b604084015261476a6060820161401f565b606084015261477b6080820161401f565b608084015261478c60a0820161401f565b60a084015261479d60c0820161401f565b60c084015260e0810151848111156147b457600080fd5b6147c0898284016145f9565b60e08501525061010080820151858111156147da57600080fd5b6147e68a8285016145f9565b82860152508383526147fb896020880161465d565b602084015261480c89828801614035565b60408401525090979650505050505050565b6001600160a01b0387811682526101c082019061483e602084018961393d565b61484b60a0840188613f9a565b610160830186905284166101808301526148648361353f565b826101a0830152979650505050505050565b6000806040838503121561488957600080fd5b505080516020909101519092909150565b6001600160a01b0387811682526101c08201906148ba602084018961393d565b6148c760a0840188613f9a565b808616610160840152846101808401528084166101a084015250979650505050505050565b600080600083850361010081121561490357600080fd5b845193506020850151925060c0603f198201121561492057600080fd5b50614929612ba6565b60408501518152606085015160208201526080850151604082015260a085015161495281612ac6565b606082015260c0850151608082015260e09094015160a0850152509093909250565b634e487b7160e01b600052603260045260246000fd5b805160088110612d0f57600080fd5b8051612d0f8161337e565b600061016082840312156149b757600080fd5b6149bf612b60565b90506149ca8261498a565b81526149d860208301614999565b602082015260408201516040820152606082015160608201526080820151608082015260a082015160a082015260c082015160c082015260e082015160e082015261010080830151818301525061012080830151818301525061014080830151818301525092915050565b600060808284031215614a5557600080fd5b614a5d612b3e565b90508151614a6a81612d14565b81526020820151614a7a81612d14565b60208201526040820151614a8d81612d14565b604082015260608201516130c681612d14565b600060208284031215614ab257600080fd5b81516001600160401b0380821115614ac957600080fd5b908301906102008286031215614ade57600080fd5b614ae6612b1c565b825182811115614af557600080fd5b83016101008188031215614b0857600080fd5b614b10612b83565b614b198261401f565b8152614b276020830161401f565b6020820152614b386040830161401f565b6040820152614b496060830161401f565b6060820152614b5a6080830161401f565b6080820152614b6b60a0830161401f565b60a0820152614b7c60c0830161401f565b60c082015260e082015184811115614b9357600080fd5b614b9f898285016145f9565b60e083015250825250614bb586602085016149a4565b6020820152614bc8866101808501614a43565b604082015295945050505050565b634e487b7160e01b600052601160045260246000fd5b600060018201614bfe57614bfe614bd6565b5060010190565b6001600160a01b0392831681529116602082015260400190565b600060808284031215614c3157600080fd5b614c39612b3e565b90508151614c4681612ac6565b81526020820151614c5681612ac6565b60208201526040820151614c6981612ac6565b604082015260608201516130c681612ac6565b600060808284031215614c8e57600080fd5b6107c68383614c1f565b6001600160a01b03881681526101608101614cb6602083018961393d565b614cc360a0830188612e7e565b8560e0830152846101008301528361012083015282151561014083015298975050505050505050565b600060608284031215614cfe57600080fd5b6107c68383614325565b6001600160a01b038881168252610180820190614d28602084018a61393d565b87811660a0840152861660c083015260e08201859052614d4c610100830185612e7e565b610643610140830184612e7e565b600080600060608486031215614d6f57600080fd5b8351925060208401519150604084015190509250925092565b6001600160a01b038981168252610200820190614da8602084018b61393d565b614db560a084018a613f9a565b87610160840152866101808401528086166101a084015250614dd68461353f565b836101c08301528215156101e08301529998505050505050505050565b600060208284031215614e0557600080fd5b5051919050565b6001600160a01b038481168252610100820190614e2c6020840186613f9a565b80841660e084015250949350505050565b600060808284031215614e4f57600080fd5b614e57612af4565b9050614e6383836142f5565b8152614e7283604084016142f5565b602082015292915050565b60006101608284031215614e9057600080fd5b614e98612c30565b90508151614ea581612d14565b808252506020820151602082015260408201516040820152614eca8360608401614e3d565b6060820152614edc8360e08401614e3d565b608082015292915050565b60008183036103a0811215614efb57600080fd5b614f03612beb565b614f0d8585614c1f565b81526080840151602082015260a0840151604082015261010060bf1983011215614f3657600080fd5b614f3e612af4565b9150614f4d8560c08601614e3d565b8252614f5d856101408601614e3d565b6020830152816060820152614f76856101c08601614e7d565b6080820152614f89856103208601614325565b60a0820152614f9b610380850161402a565b60c0820152949350505050565b600060a08284031215614fba57600080fd5b614fc2612c30565b9050815181526020820151602082015260408201516040820152606082015160608201526080820151608082015292915050565b600081830361016081121561500a57600080fd5b615012612af4565b60c082121561502057600080fd5b615028612ba6565b9150835161503581612ac6565b8252602084015161504581612ac6565b6020830152604084015161505881612ac6565b6040830152606084015161506b81612ac6565b6060830152608084015161507e81612ac6565b608083015260a084015161509181612ac6565b60a08301528181526150a68560c08601614fa8565b6020820152949350505050565b6001600160a01b038616815261036081016150d1602083018761393d565b6150de60a0830186613f9a565b6150ed61016083018551612db6565b60208401516151006101c0840182612ddd565b506040939093015151151561032082015261034001529392505050565b60006020828403121561512f57600080fd5b81516001600160401b038082111561514657600080fd5b90830190610120828603121561515b57600080fd5b615163612b1c565b82518281111561517257600080fd5b830160e0818803121561518457600080fd5b61518c612beb565b6151958261401f565b81526151a36020830161401f565b60208201526151b46040830161401f565b60408201526151c56060830161401f565b60608201526151d66080830161401f565b608082015260a0820151848111156151ed57600080fd5b6151f9898285016145f9565b60a08301525060c08201518481111561521157600080fd5b61521d898285016145f9565b60c083015250825250615233866020850161465d565b6020820152614bc8866101008501614035565b80820281158282048414176107c9576107c9614bd6565b818103600083128015838313168383128216171561527d5761527d614bd6565b5092915050565b6000602080838503121561529757600080fd5b82516001600160401b038111156152ad57600080fd5b8301601f810185136152be57600080fd5b80516152cc613bfe82613bba565b81815260059190911b820183019083810190878311156152eb57600080fd5b928401925b828410156111e4578351825292840192908401906152f0565b60006020828403121561531b57600080fd5b81516001600160401b0381111561533157600080fd5b61204e848285016145f9565b808201828112600083128015821682158216171561535d5761535d614bd6565b505092915050565b808201808211156107c9576107c9614bd6565b60006020828403121561538a57600080fd5b81516107c681612d14565b6000600160ff1b82016153aa576153aa614bd6565b5060000390565b634e487b7160e01b600052601260045260246000fd5b6000826153e457634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212203233d1c88e2834df509795d562a4149615b014be8640709981435c03e4b2051b64736f6c63430008120033"; + + public ReaderDeploymentBase() : base(BYTECODE) + { + } + + public ReaderDeploymentBase(string byteCode) : base(byteCode) + { + } + } + + public partial class GetAccountOrdersFunction : GetAccountOrdersFunctionBase + { + } + + [Function("getAccountOrders", typeof(GetAccountOrdersOutputDTO))] + public class GetAccountOrdersFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("address", "account", 2)] public virtual string Account { get; set; } + [Parameter("uint256", "start", 3)] public virtual BigInteger Start { get; set; } + [Parameter("uint256", "end", 4)] public virtual BigInteger End { get; set; } + } + + public partial class GetAccountPositionInfoListFunction : GetAccountPositionInfoListFunctionBase + { + } + + [Function("getAccountPositionInfoList", typeof(GetAccountPositionInfoListOutputDTO))] + public class GetAccountPositionInfoListFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + + [Parameter("address", "referralStorage", 2)] + public virtual string ReferralStorage { get; set; } + + [Parameter("bytes32[]", "positionKeys", 3)] + public virtual List PositionKeys { get; set; } + + [Parameter("tuple[]", "prices", 4)] public virtual List Prices { get; set; } + + [Parameter("address", "uiFeeReceiver", 5)] + public virtual string UiFeeReceiver { get; set; } + } + + public partial class GetAccountPositionsFunction : GetAccountPositionsFunctionBase + { + } + + [Function("getAccountPositions", typeof(GetAccountPositionsOutputDTO))] + public class GetAccountPositionsFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("address", "account", 2)] public virtual string Account { get; set; } + [Parameter("uint256", "start", 3)] public virtual BigInteger Start { get; set; } + [Parameter("uint256", "end", 4)] public virtual BigInteger End { get; set; } + } + + public partial class GetAdlStateFunction : GetAdlStateFunctionBase + { + } + + [Function("getAdlState", typeof(GetAdlStateOutputDTO))] + public class GetAdlStateFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("address", "market", 2)] public virtual string Market { get; set; } + [Parameter("bool", "isLong", 3)] public virtual bool IsLong { get; set; } + [Parameter("tuple", "prices", 4)] public virtual MarketPrices Prices { get; set; } + } + + public partial class GetDepositFunction : GetDepositFunctionBase + { + } + + [Function("getDeposit", typeof(GetDepositOutputDTO))] + public class GetDepositFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("bytes32", "key", 2)] public virtual byte[] Key { get; set; } + } + + public partial class GetDepositAmountOutFunction : GetDepositAmountOutFunctionBase + { + } + + [Function("getDepositAmountOut", "uint256")] + public class GetDepositAmountOutFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("tuple", "market", 2)] public virtual Props Market { get; set; } + [Parameter("tuple", "prices", 3)] public virtual MarketPrices Prices { get; set; } + + [Parameter("uint256", "longTokenAmount", 4)] + public virtual BigInteger LongTokenAmount { get; set; } + + [Parameter("uint256", "shortTokenAmount", 5)] + public virtual BigInteger ShortTokenAmount { get; set; } + + [Parameter("address", "uiFeeReceiver", 6)] + public virtual string UiFeeReceiver { get; set; } + + [Parameter("uint8", "swapPricingType", 7)] + public virtual byte SwapPricingType { get; set; } + + [Parameter("bool", "includeVirtualInventoryImpact", 8)] + public virtual bool IncludeVirtualInventoryImpact { get; set; } + } + + public partial class GetExecutionPriceFunction : GetExecutionPriceFunctionBase + { + } + + [Function("getExecutionPrice", typeof(GetExecutionPriceOutputDTO))] + public class GetExecutionPriceFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("address", "marketKey", 2)] public virtual string MarketKey { get; set; } + + [Parameter("tuple", "indexTokenPrice", 3)] + public virtual Props IndexTokenPrice { get; set; } + + [Parameter("uint256", "positionSizeInUsd", 4)] + public virtual BigInteger PositionSizeInUsd { get; set; } + + [Parameter("uint256", "positionSizeInTokens", 5)] + public virtual BigInteger PositionSizeInTokens { get; set; } + + [Parameter("int256", "sizeDeltaUsd", 6)] + public virtual BigInteger SizeDeltaUsd { get; set; } + + [Parameter("bool", "isLong", 7)] public virtual bool IsLong { get; set; } + } + + public partial class GetMarketFunction : GetMarketFunctionBase + { + } + + [Function("getMarket", typeof(GetMarketOutputDTO))] + public class GetMarketFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("address", "key", 2)] public virtual string Key { get; set; } + } + + public partial class GetMarketBySaltFunction : GetMarketBySaltFunctionBase + { + } + + [Function("getMarketBySalt", typeof(GetMarketBySaltOutputDTO))] + public class GetMarketBySaltFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("bytes32", "salt", 2)] public virtual byte[] Salt { get; set; } + } + + public partial class GetMarketInfoFunction : GetMarketInfoFunctionBase + { + } + + [Function("getMarketInfo", typeof(GetMarketInfoOutputDTO))] + public class GetMarketInfoFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("tuple", "prices", 2)] public virtual MarketPrices Prices { get; set; } + [Parameter("address", "marketKey", 3)] public virtual string MarketKey { get; set; } + } + + public partial class GetMarketInfoListFunction : GetMarketInfoListFunctionBase + { + } + + [Function("getMarketInfoList", typeof(GetMarketInfoListOutputDTO))] + public class GetMarketInfoListFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + + [Parameter("tuple[]", "marketPricesList", 2)] + public virtual List MarketPricesList { get; set; } + + [Parameter("uint256", "start", 3)] public virtual BigInteger Start { get; set; } + [Parameter("uint256", "end", 4)] public virtual BigInteger End { get; set; } + } + + public partial class GetMarketTokenPriceFunction : GetMarketTokenPriceFunctionBase + { + } + + [Function("getMarketTokenPrice", typeof(GetMarketTokenPriceOutputDTO))] + public class GetMarketTokenPriceFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("tuple", "market", 2)] public virtual MarketsProps Market { get; set; } + + [Parameter("tuple", "indexTokenPrice", 3)] + public virtual MarketPrice IndexTokenPrice { get; set; } + + [Parameter("tuple", "longTokenPrice", 4)] + public virtual MarketPrice LongTokenPrice { get; set; } + + [Parameter("tuple", "shortTokenPrice", 5)] + public virtual MarketPrice ShortTokenPrice { get; set; } + + [Parameter("bytes32", "pnlFactorType", 6)] + public virtual byte[] PnlFactorType { get; set; } + + [Parameter("bool", "maximize", 7)] public virtual bool Maximize { get; set; } + } + + public partial class GetMarketsFunction : GetMarketsFunctionBase + { + } + + [Function("getMarkets", typeof(GetMarketsOutputDTO))] + public class GetMarketsFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("uint256", "start", 2)] public virtual BigInteger Start { get; set; } + [Parameter("uint256", "end", 3)] public virtual BigInteger End { get; set; } + } + + public partial class GetNetPnlFunction : GetNetPnlFunctionBase + { + } + + [Function("getNetPnl", "int256")] + public class GetNetPnlFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("tuple", "market", 2)] public virtual Props Market { get; set; } + + [Parameter("tuple", "indexTokenPrice", 3)] + public virtual Props IndexTokenPrice { get; set; } + + [Parameter("bool", "maximize", 4)] public virtual bool Maximize { get; set; } + } + + public partial class GetOpenInterestWithPnlFunction : GetOpenInterestWithPnlFunctionBase + { + } + + [Function("getOpenInterestWithPnl", "int256")] + public class GetOpenInterestWithPnlFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("tuple", "market", 2)] public virtual Props Market { get; set; } + + [Parameter("tuple", "indexTokenPrice", 3)] + public virtual Props IndexTokenPrice { get; set; } + + [Parameter("bool", "isLong", 4)] public virtual bool IsLong { get; set; } + [Parameter("bool", "maximize", 5)] public virtual bool Maximize { get; set; } + } + + public partial class GetOrderFunction : GetOrderFunctionBase + { + } + + [Function("getOrder", typeof(GetOrderOutputDTO))] + public class GetOrderFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("bytes32", "key", 2)] public virtual byte[] Key { get; set; } + } + + public partial class GetPnlFunction : GetPnlFunctionBase + { + } + + [Function("getPnl", "int256")] + public class GetPnlFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("tuple", "market", 2)] public virtual Props Market { get; set; } + + [Parameter("tuple", "indexTokenPrice", 3)] + public virtual Props IndexTokenPrice { get; set; } + + [Parameter("bool", "isLong", 4)] public virtual bool IsLong { get; set; } + [Parameter("bool", "maximize", 5)] public virtual bool Maximize { get; set; } + } + + public partial class GetPnlToPoolFactorFunction : GetPnlToPoolFactorFunctionBase + { + } + + [Function("getPnlToPoolFactor", "int256")] + public class GetPnlToPoolFactorFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + + [Parameter("address", "marketAddress", 2)] + public virtual string MarketAddress { get; set; } + + [Parameter("tuple", "prices", 3)] public virtual MarketPrices Prices { get; set; } + [Parameter("bool", "isLong", 4)] public virtual bool IsLong { get; set; } + [Parameter("bool", "maximize", 5)] public virtual bool Maximize { get; set; } + } + + public partial class GetPositionFunction : GetPositionFunctionBase + { + } + + [Function("getPosition", typeof(GetPositionOutputDTO))] + public class GetPositionFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("bytes32", "key", 2)] public virtual byte[] Key { get; set; } + } + + public partial class GetPositionInfoFunction : GetPositionInfoFunctionBase + { + } + + [Function("getPositionInfo", typeof(GetPositionInfoOutputDTO))] + public class GetPositionInfoFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + + [Parameter("address", "referralStorage", 2)] + public virtual string ReferralStorage { get; set; } + + [Parameter("bytes32", "positionKey", 3)] + public virtual byte[] PositionKey { get; set; } + + [Parameter("tuple", "prices", 4)] public virtual MarketPrices Prices { get; set; } + + [Parameter("uint256", "sizeDeltaUsd", 5)] + public virtual BigInteger SizeDeltaUsd { get; set; } + + [Parameter("address", "uiFeeReceiver", 6)] + public virtual string UiFeeReceiver { get; set; } + + [Parameter("bool", "usePositionSizeAsSizeDeltaUsd", 7)] + public virtual bool UsePositionSizeAsSizeDeltaUsd { get; set; } + } + + public partial class GetPositionPnlUsdFunction : GetPositionPnlUsdFunctionBase + { + } + + [Function("getPositionPnlUsd", typeof(GetPositionPnlUsdOutputDTO))] + public class GetPositionPnlUsdFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("tuple", "market", 2)] public virtual Props Market { get; set; } + [Parameter("tuple", "prices", 3)] public virtual MarketPrices Prices { get; set; } + + [Parameter("bytes32", "positionKey", 4)] + public virtual byte[] PositionKey { get; set; } + + [Parameter("uint256", "sizeDeltaUsd", 5)] + public virtual BigInteger SizeDeltaUsd { get; set; } + } + + public partial class GetShiftFunction : GetShiftFunctionBase + { + } + + [Function("getShift", typeof(GetShiftOutputDTO))] + public class GetShiftFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("bytes32", "key", 2)] public virtual byte[] Key { get; set; } + } + + public partial class GetSwapAmountOutFunction : GetSwapAmountOutFunctionBase + { + } + + [Function("getSwapAmountOut", typeof(GetSwapAmountOutOutputDTO))] + public class GetSwapAmountOutFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("tuple", "market", 2)] public virtual Props Market { get; set; } + [Parameter("tuple", "prices", 3)] public virtual MarketPrices Prices { get; set; } + [Parameter("address", "tokenIn", 4)] public virtual string TokenIn { get; set; } + [Parameter("uint256", "amountIn", 5)] public virtual BigInteger AmountIn { get; set; } + + [Parameter("address", "uiFeeReceiver", 6)] + public virtual string UiFeeReceiver { get; set; } + } + + public partial class GetSwapPriceImpactFunction : GetSwapPriceImpactFunctionBase + { + } + + [Function("getSwapPriceImpact", typeof(GetSwapPriceImpactOutputDTO))] + public class GetSwapPriceImpactFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("address", "marketKey", 2)] public virtual string MarketKey { get; set; } + [Parameter("address", "tokenIn", 3)] public virtual string TokenIn { get; set; } + [Parameter("address", "tokenOut", 4)] public virtual string TokenOut { get; set; } + [Parameter("uint256", "amountIn", 5)] public virtual BigInteger AmountIn { get; set; } + + [Parameter("tuple", "tokenInPrice", 6)] + public virtual Props TokenInPrice { get; set; } + + [Parameter("tuple", "tokenOutPrice", 7)] + public virtual Props TokenOutPrice { get; set; } + } + + public partial class GetWithdrawalFunction : GetWithdrawalFunctionBase + { + } + + [Function("getWithdrawal", typeof(GetWithdrawalOutputDTO))] + public class GetWithdrawalFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("bytes32", "key", 2)] public virtual byte[] Key { get; set; } + } + + public partial class GetWithdrawalAmountOutFunction : GetWithdrawalAmountOutFunctionBase + { + } + + [Function("getWithdrawalAmountOut", typeof(GetWithdrawalAmountOutOutputDTO))] + public class GetWithdrawalAmountOutFunctionBase : FunctionMessage + { + [Parameter("address", "dataStore", 1)] public virtual string DataStore { get; set; } + [Parameter("tuple", "market", 2)] public virtual Props Market { get; set; } + [Parameter("tuple", "prices", 3)] public virtual MarketPrices Prices { get; set; } + + [Parameter("uint256", "marketTokenAmount", 4)] + public virtual BigInteger MarketTokenAmount { get; set; } + + [Parameter("address", "uiFeeReceiver", 5)] + public virtual string UiFeeReceiver { get; set; } + + [Parameter("uint8", "swapPricingType", 6)] + public virtual byte SwapPricingType { get; set; } + } + + public partial class DisabledMarketError : DisabledMarketErrorBase + { + } + + [Error("DisabledMarket")] + public class DisabledMarketErrorBase : IErrorDTO + { + [Parameter("address", "market", 1)] public virtual string Market { get; set; } + } + + public partial class EmptyMarketError : EmptyMarketErrorBase + { + } + + [Error("EmptyMarket")] + public class EmptyMarketErrorBase : IErrorDTO + { + } + + public partial class GetAccountOrdersOutputDTO : GetAccountOrdersOutputDTOBase + { + } + + [FunctionOutput] + public class GetAccountOrdersOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple[]", "", 1)] public virtual List ReturnValue1 { get; set; } + } + + public partial class GetAccountPositionInfoListOutputDTO : GetAccountPositionInfoListOutputDTOBase + { + } + + [FunctionOutput] + public class GetAccountPositionInfoListOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple[]", "", 1)] public virtual List ReturnValue1 { get; set; } + } + + public partial class GetAccountPositionsOutputDTO : GetAccountPositionsOutputDTOBase + { + } + + [FunctionOutput] + public class GetAccountPositionsOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple[]", "", 1)] public virtual List ReturnValue1 { get; set; } + } + + public partial class GetAdlStateOutputDTO : GetAdlStateOutputDTOBase + { + } + + [FunctionOutput] + public class GetAdlStateOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("bool", "", 2)] public virtual bool ReturnValue2 { get; set; } + [Parameter("int256", "", 3)] public virtual BigInteger ReturnValue3 { get; set; } + [Parameter("uint256", "", 4)] public virtual BigInteger ReturnValue4 { get; set; } + } + + public partial class GetDepositOutputDTO : GetDepositOutputDTOBase + { + } + + [FunctionOutput] + public class GetDepositOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple", "", 1)] public virtual Props ReturnValue1 { get; set; } + } + + public partial class GetDepositAmountOutOutputDTO : GetDepositAmountOutOutputDTOBase + { + } + + [FunctionOutput] + public class GetDepositAmountOutOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } + } + + public partial class GetExecutionPriceOutputDTO : GetExecutionPriceOutputDTOBase + { + } + + [FunctionOutput] + public class GetExecutionPriceOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple", "", 1)] public virtual ExecutionPriceResult ReturnValue1 { get; set; } + } + + public partial class GetMarketOutputDTO : GetMarketOutputDTOBase + { + } + + [FunctionOutput] + public class GetMarketOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple", "", 1)] public virtual Props ReturnValue1 { get; set; } + } + + public partial class GetMarketBySaltOutputDTO : GetMarketBySaltOutputDTOBase + { + } + + [FunctionOutput] + public class GetMarketBySaltOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple", "", 1)] public virtual Props ReturnValue1 { get; set; } + } + + public partial class GetMarketInfoOutputDTO : GetMarketInfoOutputDTOBase + { + } + + [FunctionOutput] + public class GetMarketInfoOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple", "", 1)] public virtual MarketInfo ReturnValue1 { get; set; } + } + + public partial class GetMarketInfoListOutputDTO : GetMarketInfoListOutputDTOBase + { + } + + [FunctionOutput] + public class GetMarketInfoListOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple[]", "", 1)] public virtual List ReturnValue1 { get; set; } + } + + public partial class GetMarketTokenPriceOutputDTO : GetMarketTokenPriceOutputDTOBase + { + } + + [FunctionOutput] + public class GetMarketTokenPriceOutputDTOBase : IFunctionOutputDTO + { + [Parameter("int256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("tuple", "", 2)] public virtual MarketPoolValueInfo ReturnValue2 { get; set; } + } + + public class MarketPoolValueInfo + { + [Parameter("int256", "poolValue", 1)]public BigInteger PoolValue { get; set; } + [Parameter("int256", "longPnl", 2)]public BigInteger LongPnl { get; set; } + [Parameter("int256", "shortPnl", 3)]public BigInteger ShortPnl { get; set; } + [Parameter("int256", "NetPnl", 4)]public BigInteger NetPnl { get; set; } + [Parameter("int256", "longTokenAmount", 5)]public BigInteger LongTokenAmount { get; set; } + [Parameter("int256", "shortTokenAmount", 6)]public BigInteger ShortTokenAmount { get; set; } + [Parameter("int256", "longTokenUsd", 7)]public BigInteger LongTokenUsd { get; set; } + [Parameter("int256", "shortTokenUsd", 8)]public BigInteger ShortTokenUsd { get; set; } + [Parameter("int256", "totalBorrowingFees", 9)]public BigInteger TotalBorrowingFees { get; set; } + [Parameter("int256", "borrowingFeePoolFactor", 10)]public BigInteger BorrowingFeePoolFactor { get; set; } + [Parameter("int256", "impactPoolAmount", 11)]public BigInteger ImpactPoolAmount { get; set; } + } + + public partial class GetMarketsOutputDTO : GetMarketsOutputDTOBase + { + } + + [FunctionOutput] + public class GetMarketsOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple[]", "", 1)] public virtual List ReturnValue1 { get; set; } + } + + + public partial class GetNetPnlOutputDTO : GetNetPnlOutputDTOBase + { + } + + [FunctionOutput] + public class GetNetPnlOutputDTOBase : IFunctionOutputDTO + { + [Parameter("int256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } + } + + public partial class GetOpenInterestWithPnlOutputDTO : GetOpenInterestWithPnlOutputDTOBase + { + } + + [FunctionOutput] + public class GetOpenInterestWithPnlOutputDTOBase : IFunctionOutputDTO + { + [Parameter("int256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } + } + + public partial class GetOrderOutputDTO : GetOrderOutputDTOBase + { + } + + [FunctionOutput] + public class GetOrderOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple", "", 1)] public virtual Props ReturnValue1 { get; set; } + } + + public partial class GetPnlOutputDTO : GetPnlOutputDTOBase + { + } + + [FunctionOutput] + public class GetPnlOutputDTOBase : IFunctionOutputDTO + { + [Parameter("int256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } + } + + public partial class GetPnlToPoolFactorOutputDTO : GetPnlToPoolFactorOutputDTOBase + { + } + + [FunctionOutput] + public class GetPnlToPoolFactorOutputDTOBase : IFunctionOutputDTO + { + [Parameter("int256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } + } + + public partial class GetPositionOutputDTO : GetPositionOutputDTOBase + { + } + + [FunctionOutput] + public class GetPositionOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple", "", 1)] public virtual Props ReturnValue1 { get; set; } + } + + public partial class GetPositionInfoOutputDTO : GetPositionInfoOutputDTOBase + { + } + + [FunctionOutput] + public class GetPositionInfoOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple", "", 1)] public virtual PositionInfo ReturnValue1 { get; set; } + } + + public partial class GetPositionPnlUsdOutputDTO : GetPositionPnlUsdOutputDTOBase + { + } + + [FunctionOutput] + public class GetPositionPnlUsdOutputDTOBase : IFunctionOutputDTO + { + [Parameter("int256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("int256", "", 2)] public virtual BigInteger ReturnValue2 { get; set; } + [Parameter("uint256", "", 3)] public virtual BigInteger ReturnValue3 { get; set; } + } + + public partial class GetShiftOutputDTO : GetShiftOutputDTOBase + { + } + + [FunctionOutput] + public class GetShiftOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple", "", 1)] public virtual Props ReturnValue1 { get; set; } + } + + public partial class GetSwapAmountOutOutputDTO : GetSwapAmountOutOutputDTOBase + { + } + + [FunctionOutput] + public class GetSwapAmountOutOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("int256", "", 2)] public virtual BigInteger ReturnValue2 { get; set; } + [Parameter("tuple", "fees", 3)] public virtual SwapFees Fees { get; set; } + } + + public partial class GetSwapPriceImpactOutputDTO : GetSwapPriceImpactOutputDTOBase + { + } + + [FunctionOutput] + public class GetSwapPriceImpactOutputDTOBase : IFunctionOutputDTO + { + [Parameter("int256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("int256", "", 2)] public virtual BigInteger ReturnValue2 { get; set; } + [Parameter("int256", "", 3)] public virtual BigInteger ReturnValue3 { get; set; } + } + + public partial class GetWithdrawalOutputDTO : GetWithdrawalOutputDTOBase + { + } + + [FunctionOutput] + public class GetWithdrawalOutputDTOBase : IFunctionOutputDTO + { + [Parameter("tuple", "", 1)] public virtual Props ReturnValue1 { get; set; } + } + + public partial class GetWithdrawalAmountOutOutputDTO : GetWithdrawalAmountOutOutputDTOBase + { + } + + [FunctionOutput] + public class GetWithdrawalAmountOutOutputDTOBase : IFunctionOutputDTO + { + [Parameter("uint256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("uint256", "", 2)] public virtual BigInteger ReturnValue2 { get; set; } + } + + public class MarketsProps + { + [Parameter("address", "marketToken", 1)] + public string MarketToken { get; set; } + + [Parameter("address", "indexToken", 2)] + public string IndexToken { get; set; } + + [Parameter("address", "longToken", 3)] public string LongToken { get; set; } + + [Parameter("address", "shortToken", 4)] + public string ShortToken { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/SwapFees.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/SwapFees.cs new file mode 100644 index 0000000..cd51f0d --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/SwapFees.cs @@ -0,0 +1,30 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class SwapFees : SwapFeesBase + { + } + + public class SwapFeesBase + { + [Parameter("uint256", "feeReceiverAmount", 1)] + public virtual BigInteger FeeReceiverAmount { get; set; } + + [Parameter("uint256", "feeAmountForPool", 2)] + public virtual BigInteger FeeAmountForPool { get; set; } + + [Parameter("uint256", "amountAfterFees", 3)] + public virtual BigInteger AmountAfterFees { get; set; } + + [Parameter("address", "uiFeeReceiver", 4)] + public virtual string UiFeeReceiver { get; set; } + + [Parameter("uint256", "uiFeeReceiverFactor", 5)] + public virtual BigInteger UiFeeReceiverFactor { get; set; } + + [Parameter("uint256", "uiFeeAmount", 6)] + public virtual BigInteger UiFeeAmount { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ContractDefinition/VirtualInventory.cs b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/VirtualInventory.cs new file mode 100644 index 0000000..e2316db --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ContractDefinition/VirtualInventory.cs @@ -0,0 +1,21 @@ +using System.Numerics; +using Nethereum.ABI.FunctionEncoding.Attributes; + +namespace Managing.ABI.GmxV2.Reader.ContractDefinition +{ + public partial class VirtualInventory : VirtualInventoryBase + { + } + + public class VirtualInventoryBase + { + [Parameter("uint256", "virtualPoolAmountForLongToken", 1)] + public virtual BigInteger VirtualPoolAmountForLongToken { get; set; } + + [Parameter("uint256", "virtualPoolAmountForShortToken", 2)] + public virtual BigInteger VirtualPoolAmountForShortToken { get; set; } + + [Parameter("int256", "virtualInventoryForPositions", 3)] + public virtual BigInteger VirtualInventoryForPositions { get; set; } + } +} \ No newline at end of file diff --git a/src/Managing.ABI.GmxV2/Reader/ReaderService.cs b/src/Managing.ABI.GmxV2/Reader/ReaderService.cs new file mode 100644 index 0000000..5d7a9f0 --- /dev/null +++ b/src/Managing.ABI.GmxV2/Reader/ReaderService.cs @@ -0,0 +1,636 @@ +using System.Numerics; +using Managing.ABI.GmxV2.Reader.ContractDefinition; +using Nethereum.RPC.Eth.DTOs; +using Nethereum.Web3; + +namespace Managing.ABI.GmxV2.Reader +{ + public partial class ReaderService : ContractWeb3ServiceBase + { + public static Task DeployContractAndWaitForReceiptAsync(Nethereum.Web3.IWeb3 web3, + ReaderDeployment readerDeployment, CancellationTokenSource cancellationTokenSource = null) + { + return web3.Eth.GetContractDeploymentHandler() + .SendRequestAndWaitForReceiptAsync(readerDeployment, cancellationTokenSource); + } + + public static Task DeployContractAsync(Nethereum.Web3.IWeb3 web3, ReaderDeployment readerDeployment) + { + return web3.Eth.GetContractDeploymentHandler().SendRequestAsync(readerDeployment); + } + + public static async Task DeployContractAndGetServiceAsync(Nethereum.Web3.IWeb3 web3, + ReaderDeployment readerDeployment, CancellationTokenSource cancellationTokenSource = null) + { + var receipt = await DeployContractAndWaitForReceiptAsync(web3, readerDeployment, cancellationTokenSource); + return new ReaderService(web3, receipt.ContractAddress); + } + + public ReaderService(Nethereum.Web3.IWeb3 web3, string contractAddress) : base(web3, contractAddress) + { + } + + public Task GetAccountOrdersQueryAsync( + GetAccountOrdersFunction getAccountOrdersFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryDeserializingToObjectAsync( + getAccountOrdersFunction, blockParameter); + } + + public Task GetAccountOrdersQueryAsync(string dataStore, string account, + BigInteger start, BigInteger end, BlockParameter blockParameter = null) + { + var getAccountOrdersFunction = new GetAccountOrdersFunction(); + getAccountOrdersFunction.DataStore = dataStore; + getAccountOrdersFunction.Account = account; + getAccountOrdersFunction.Start = start; + getAccountOrdersFunction.End = end; + + return ContractHandler.QueryDeserializingToObjectAsync( + getAccountOrdersFunction, blockParameter); + } + + public Task GetAccountPositionInfoListQueryAsync( + GetAccountPositionInfoListFunction getAccountPositionInfoListFunction, BlockParameter blockParameter = null) + { + return ContractHandler + .QueryDeserializingToObjectAsync(getAccountPositionInfoListFunction, blockParameter); + } + + public Task GetAccountPositionInfoListQueryAsync(string dataStore, + string referralStorage, List positionKeys, List prices, string uiFeeReceiver, + BlockParameter blockParameter = null) + { + var getAccountPositionInfoListFunction = new GetAccountPositionInfoListFunction(); + getAccountPositionInfoListFunction.DataStore = dataStore; + getAccountPositionInfoListFunction.ReferralStorage = referralStorage; + getAccountPositionInfoListFunction.PositionKeys = positionKeys; + getAccountPositionInfoListFunction.Prices = prices; + getAccountPositionInfoListFunction.UiFeeReceiver = uiFeeReceiver; + + return ContractHandler + .QueryDeserializingToObjectAsync(getAccountPositionInfoListFunction, blockParameter); + } + + public Task GetAccountPositionsQueryAsync( + GetAccountPositionsFunction getAccountPositionsFunction, BlockParameter blockParameter = null) + { + return ContractHandler + .QueryDeserializingToObjectAsync( + getAccountPositionsFunction, blockParameter); + } + + public Task GetAccountPositionsQueryAsync(string dataStore, string account, + BigInteger start, BigInteger end, BlockParameter blockParameter = null) + { + var getAccountPositionsFunction = new GetAccountPositionsFunction(); + getAccountPositionsFunction.DataStore = dataStore; + getAccountPositionsFunction.Account = account; + getAccountPositionsFunction.Start = start; + getAccountPositionsFunction.End = end; + + return ContractHandler + .QueryDeserializingToObjectAsync( + getAccountPositionsFunction, blockParameter); + } + + public Task GetAdlStateQueryAsync(GetAdlStateFunction getAdlStateFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryDeserializingToObjectAsync( + getAdlStateFunction, blockParameter); + } + + public Task GetAdlStateQueryAsync(string dataStore, string market, bool isLong, + MarketPrices prices, BlockParameter blockParameter = null) + { + var getAdlStateFunction = new GetAdlStateFunction(); + getAdlStateFunction.DataStore = dataStore; + getAdlStateFunction.Market = market; + getAdlStateFunction.IsLong = isLong; + getAdlStateFunction.Prices = prices; + + return ContractHandler.QueryDeserializingToObjectAsync( + getAdlStateFunction, blockParameter); + } + + public Task GetDepositQueryAsync(GetDepositFunction getDepositFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryDeserializingToObjectAsync( + getDepositFunction, blockParameter); + } + + public Task GetDepositQueryAsync(string dataStore, byte[] key, + BlockParameter blockParameter = null) + { + var getDepositFunction = new GetDepositFunction(); + getDepositFunction.DataStore = dataStore; + getDepositFunction.Key = key; + + return ContractHandler.QueryDeserializingToObjectAsync( + getDepositFunction, blockParameter); + } + + public Task GetDepositAmountOutQueryAsync(GetDepositAmountOutFunction getDepositAmountOutFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getDepositAmountOutFunction, + blockParameter); + } + + + public Task GetDepositAmountOutQueryAsync(string dataStore, Props market, MarketPrices prices, + BigInteger longTokenAmount, BigInteger shortTokenAmount, string uiFeeReceiver, byte swapPricingType, + bool includeVirtualInventoryImpact, BlockParameter blockParameter = null) + { + var getDepositAmountOutFunction = new GetDepositAmountOutFunction(); + getDepositAmountOutFunction.DataStore = dataStore; + getDepositAmountOutFunction.Market = market; + getDepositAmountOutFunction.Prices = prices; + getDepositAmountOutFunction.LongTokenAmount = longTokenAmount; + getDepositAmountOutFunction.ShortTokenAmount = shortTokenAmount; + getDepositAmountOutFunction.UiFeeReceiver = uiFeeReceiver; + getDepositAmountOutFunction.SwapPricingType = swapPricingType; + getDepositAmountOutFunction.IncludeVirtualInventoryImpact = includeVirtualInventoryImpact; + + return ContractHandler.QueryAsync(getDepositAmountOutFunction, + blockParameter); + } + + public Task GetExecutionPriceQueryAsync( + GetExecutionPriceFunction getExecutionPriceFunction, BlockParameter blockParameter = null) + { + return ContractHandler + .QueryDeserializingToObjectAsync( + getExecutionPriceFunction, blockParameter); + } + + public Task GetExecutionPriceQueryAsync(string dataStore, string marketKey, + Props indexTokenPrice, BigInteger positionSizeInUsd, BigInteger positionSizeInTokens, + BigInteger sizeDeltaUsd, bool isLong, BlockParameter blockParameter = null) + { + var getExecutionPriceFunction = new GetExecutionPriceFunction(); + getExecutionPriceFunction.DataStore = dataStore; + getExecutionPriceFunction.MarketKey = marketKey; + getExecutionPriceFunction.IndexTokenPrice = indexTokenPrice; + getExecutionPriceFunction.PositionSizeInUsd = positionSizeInUsd; + getExecutionPriceFunction.PositionSizeInTokens = positionSizeInTokens; + getExecutionPriceFunction.SizeDeltaUsd = sizeDeltaUsd; + getExecutionPriceFunction.IsLong = isLong; + + return ContractHandler + .QueryDeserializingToObjectAsync( + getExecutionPriceFunction, blockParameter); + } + + public Task GetMarketQueryAsync(GetMarketFunction getMarketFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryDeserializingToObjectAsync( + getMarketFunction, blockParameter); + } + + public Task GetMarketQueryAsync(string dataStore, string key, + BlockParameter blockParameter = null) + { + var getMarketFunction = new GetMarketFunction(); + getMarketFunction.DataStore = dataStore; + getMarketFunction.Key = key; + + return ContractHandler.QueryDeserializingToObjectAsync( + getMarketFunction, blockParameter); + } + + public Task GetMarketBySaltQueryAsync(GetMarketBySaltFunction getMarketBySaltFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryDeserializingToObjectAsync( + getMarketBySaltFunction, blockParameter); + } + + public Task GetMarketBySaltQueryAsync(string dataStore, byte[] salt, + BlockParameter blockParameter = null) + { + var getMarketBySaltFunction = new GetMarketBySaltFunction(); + getMarketBySaltFunction.DataStore = dataStore; + getMarketBySaltFunction.Salt = salt; + + return ContractHandler.QueryDeserializingToObjectAsync( + getMarketBySaltFunction, blockParameter); + } + + public Task GetMarketInfoQueryAsync(GetMarketInfoFunction getMarketInfoFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryDeserializingToObjectAsync( + getMarketInfoFunction, blockParameter); + } + + public Task GetMarketInfoQueryAsync(string dataStore, MarketPrices prices, + string marketKey, BlockParameter blockParameter = null) + { + var getMarketInfoFunction = new GetMarketInfoFunction(); + getMarketInfoFunction.DataStore = dataStore; + getMarketInfoFunction.Prices = prices; + getMarketInfoFunction.MarketKey = marketKey; + + return ContractHandler.QueryDeserializingToObjectAsync( + getMarketInfoFunction, blockParameter); + } + + public Task GetMarketInfoListQueryAsync( + GetMarketInfoListFunction getMarketInfoListFunction, BlockParameter blockParameter = null) + { + return ContractHandler + .QueryDeserializingToObjectAsync( + getMarketInfoListFunction, blockParameter); + } + + public Task GetMarketInfoListQueryAsync(string dataStore, + List marketPricesList, BigInteger start, BigInteger end, BlockParameter blockParameter = null) + { + var getMarketInfoListFunction = new GetMarketInfoListFunction(); + getMarketInfoListFunction.DataStore = dataStore; + getMarketInfoListFunction.MarketPricesList = marketPricesList; + getMarketInfoListFunction.Start = start; + getMarketInfoListFunction.End = end; + + return ContractHandler + .QueryDeserializingToObjectAsync( + getMarketInfoListFunction, blockParameter); + } + + public Task GetMarketTokenPriceQueryAsync( + GetMarketTokenPriceFunction getMarketTokenPriceFunction, BlockParameter blockParameter = null) + { + return ContractHandler + .QueryDeserializingToObjectAsync( + getMarketTokenPriceFunction, blockParameter); + } + + public Task GetMarketTokenPriceQueryAsync(string dataStore, MarketsProps market, + MarketPrice indexTokenPrice, MarketPrice longTokenPrice, MarketPrice shortTokenPrice, byte[] pnlFactorType, + bool maximize, + BlockParameter blockParameter = null) + { + var getMarketTokenPriceFunction = new GetMarketTokenPriceFunction(); + getMarketTokenPriceFunction.DataStore = dataStore; + getMarketTokenPriceFunction.Market = market; + getMarketTokenPriceFunction.IndexTokenPrice = indexTokenPrice; + getMarketTokenPriceFunction.LongTokenPrice = longTokenPrice; + getMarketTokenPriceFunction.ShortTokenPrice = shortTokenPrice; + getMarketTokenPriceFunction.PnlFactorType = pnlFactorType; + getMarketTokenPriceFunction.Maximize = maximize; + + return ContractHandler + .QueryDeserializingToObjectAsync( + getMarketTokenPriceFunction, blockParameter); + } + + public Task GetMarketsQueryAsync(GetMarketsFunction getMarketsFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryDeserializingToObjectAsync( + getMarketsFunction, blockParameter); + } + + public Task GetMarketsQueryAsync(string dataStore, BigInteger start, BigInteger end, + BlockParameter blockParameter = null) + { + var getMarketsFunction = new GetMarketsFunction(); + getMarketsFunction.DataStore = dataStore; + getMarketsFunction.Start = start; + getMarketsFunction.End = end; + + return ContractHandler.QueryDeserializingToObjectAsync( + getMarketsFunction, blockParameter); + } + + public Task GetNetPnlQueryAsync(GetNetPnlFunction getNetPnlFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getNetPnlFunction, blockParameter); + } + + + public Task GetNetPnlQueryAsync(string dataStore, Props market, Props indexTokenPrice, + bool maximize, BlockParameter blockParameter = null) + { + var getNetPnlFunction = new GetNetPnlFunction(); + getNetPnlFunction.DataStore = dataStore; + getNetPnlFunction.Market = market; + getNetPnlFunction.IndexTokenPrice = indexTokenPrice; + getNetPnlFunction.Maximize = maximize; + + return ContractHandler.QueryAsync(getNetPnlFunction, blockParameter); + } + + public Task GetOpenInterestWithPnlQueryAsync( + GetOpenInterestWithPnlFunction getOpenInterestWithPnlFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync( + getOpenInterestWithPnlFunction, blockParameter); + } + + + public Task GetOpenInterestWithPnlQueryAsync(string dataStore, Props market, Props indexTokenPrice, + bool isLong, bool maximize, BlockParameter blockParameter = null) + { + var getOpenInterestWithPnlFunction = new GetOpenInterestWithPnlFunction(); + getOpenInterestWithPnlFunction.DataStore = dataStore; + getOpenInterestWithPnlFunction.Market = market; + getOpenInterestWithPnlFunction.IndexTokenPrice = indexTokenPrice; + getOpenInterestWithPnlFunction.IsLong = isLong; + getOpenInterestWithPnlFunction.Maximize = maximize; + + return ContractHandler.QueryAsync( + getOpenInterestWithPnlFunction, blockParameter); + } + + public Task GetOrderQueryAsync(GetOrderFunction getOrderFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryDeserializingToObjectAsync( + getOrderFunction, blockParameter); + } + + public Task GetOrderQueryAsync(string dataStore, byte[] key, + BlockParameter blockParameter = null) + { + var getOrderFunction = new GetOrderFunction(); + getOrderFunction.DataStore = dataStore; + getOrderFunction.Key = key; + + return ContractHandler.QueryDeserializingToObjectAsync( + getOrderFunction, blockParameter); + } + + public Task GetPnlQueryAsync(GetPnlFunction getPnlFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getPnlFunction, blockParameter); + } + + + public Task GetPnlQueryAsync(string dataStore, Props market, Props indexTokenPrice, bool isLong, + bool maximize, BlockParameter blockParameter = null) + { + var getPnlFunction = new GetPnlFunction(); + getPnlFunction.DataStore = dataStore; + getPnlFunction.Market = market; + getPnlFunction.IndexTokenPrice = indexTokenPrice; + getPnlFunction.IsLong = isLong; + getPnlFunction.Maximize = maximize; + + return ContractHandler.QueryAsync(getPnlFunction, blockParameter); + } + + public Task GetPnlToPoolFactorQueryAsync(GetPnlToPoolFactorFunction getPnlToPoolFactorFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryAsync(getPnlToPoolFactorFunction, + blockParameter); + } + + + public Task GetPnlToPoolFactorQueryAsync(string dataStore, string marketAddress, + MarketPrices prices, bool isLong, bool maximize, BlockParameter blockParameter = null) + { + var getPnlToPoolFactorFunction = new GetPnlToPoolFactorFunction(); + getPnlToPoolFactorFunction.DataStore = dataStore; + getPnlToPoolFactorFunction.MarketAddress = marketAddress; + getPnlToPoolFactorFunction.Prices = prices; + getPnlToPoolFactorFunction.IsLong = isLong; + getPnlToPoolFactorFunction.Maximize = maximize; + + return ContractHandler.QueryAsync(getPnlToPoolFactorFunction, + blockParameter); + } + + public Task GetPositionQueryAsync(GetPositionFunction getPositionFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryDeserializingToObjectAsync( + getPositionFunction, blockParameter); + } + + public Task GetPositionQueryAsync(string dataStore, byte[] key, + BlockParameter blockParameter = null) + { + var getPositionFunction = new GetPositionFunction(); + getPositionFunction.DataStore = dataStore; + getPositionFunction.Key = key; + + return ContractHandler.QueryDeserializingToObjectAsync( + getPositionFunction, blockParameter); + } + + public Task GetPositionInfoQueryAsync(GetPositionInfoFunction getPositionInfoFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryDeserializingToObjectAsync( + getPositionInfoFunction, blockParameter); + } + + public Task GetPositionInfoQueryAsync(string dataStore, string referralStorage, + byte[] positionKey, MarketPrices prices, BigInteger sizeDeltaUsd, string uiFeeReceiver, + bool usePositionSizeAsSizeDeltaUsd, BlockParameter blockParameter = null) + { + var getPositionInfoFunction = new GetPositionInfoFunction(); + getPositionInfoFunction.DataStore = dataStore; + getPositionInfoFunction.ReferralStorage = referralStorage; + getPositionInfoFunction.PositionKey = positionKey; + getPositionInfoFunction.Prices = prices; + getPositionInfoFunction.SizeDeltaUsd = sizeDeltaUsd; + getPositionInfoFunction.UiFeeReceiver = uiFeeReceiver; + getPositionInfoFunction.UsePositionSizeAsSizeDeltaUsd = usePositionSizeAsSizeDeltaUsd; + + return ContractHandler.QueryDeserializingToObjectAsync( + getPositionInfoFunction, blockParameter); + } + + public Task GetPositionPnlUsdQueryAsync( + GetPositionPnlUsdFunction getPositionPnlUsdFunction, BlockParameter blockParameter = null) + { + return ContractHandler + .QueryDeserializingToObjectAsync( + getPositionPnlUsdFunction, blockParameter); + } + + public Task GetPositionPnlUsdQueryAsync(string dataStore, Props market, + MarketPrices prices, byte[] positionKey, BigInteger sizeDeltaUsd, BlockParameter blockParameter = null) + { + var getPositionPnlUsdFunction = new GetPositionPnlUsdFunction(); + getPositionPnlUsdFunction.DataStore = dataStore; + getPositionPnlUsdFunction.Market = market; + getPositionPnlUsdFunction.Prices = prices; + getPositionPnlUsdFunction.PositionKey = positionKey; + getPositionPnlUsdFunction.SizeDeltaUsd = sizeDeltaUsd; + + return ContractHandler + .QueryDeserializingToObjectAsync( + getPositionPnlUsdFunction, blockParameter); + } + + public Task GetShiftQueryAsync(GetShiftFunction getShiftFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryDeserializingToObjectAsync( + getShiftFunction, blockParameter); + } + + public Task GetShiftQueryAsync(string dataStore, byte[] key, + BlockParameter blockParameter = null) + { + var getShiftFunction = new GetShiftFunction(); + getShiftFunction.DataStore = dataStore; + getShiftFunction.Key = key; + + return ContractHandler.QueryDeserializingToObjectAsync( + getShiftFunction, blockParameter); + } + + public Task GetSwapAmountOutQueryAsync( + GetSwapAmountOutFunction getSwapAmountOutFunction, BlockParameter blockParameter = null) + { + return ContractHandler.QueryDeserializingToObjectAsync( + getSwapAmountOutFunction, blockParameter); + } + + public Task GetSwapAmountOutQueryAsync(string dataStore, Props market, + MarketPrices prices, string tokenIn, BigInteger amountIn, string uiFeeReceiver, + BlockParameter blockParameter = null) + { + var getSwapAmountOutFunction = new GetSwapAmountOutFunction(); + getSwapAmountOutFunction.DataStore = dataStore; + getSwapAmountOutFunction.Market = market; + getSwapAmountOutFunction.Prices = prices; + getSwapAmountOutFunction.TokenIn = tokenIn; + getSwapAmountOutFunction.AmountIn = amountIn; + getSwapAmountOutFunction.UiFeeReceiver = uiFeeReceiver; + + return ContractHandler.QueryDeserializingToObjectAsync( + getSwapAmountOutFunction, blockParameter); + } + + public Task GetSwapPriceImpactQueryAsync( + GetSwapPriceImpactFunction getSwapPriceImpactFunction, BlockParameter blockParameter = null) + { + return ContractHandler + .QueryDeserializingToObjectAsync( + getSwapPriceImpactFunction, blockParameter); + } + + public Task GetSwapPriceImpactQueryAsync(string dataStore, string marketKey, + string tokenIn, string tokenOut, BigInteger amountIn, Props tokenInPrice, Props tokenOutPrice, + BlockParameter blockParameter = null) + { + var getSwapPriceImpactFunction = new GetSwapPriceImpactFunction(); + getSwapPriceImpactFunction.DataStore = dataStore; + getSwapPriceImpactFunction.MarketKey = marketKey; + getSwapPriceImpactFunction.TokenIn = tokenIn; + getSwapPriceImpactFunction.TokenOut = tokenOut; + getSwapPriceImpactFunction.AmountIn = amountIn; + getSwapPriceImpactFunction.TokenInPrice = tokenInPrice; + getSwapPriceImpactFunction.TokenOutPrice = tokenOutPrice; + + return ContractHandler + .QueryDeserializingToObjectAsync( + getSwapPriceImpactFunction, blockParameter); + } + + public Task GetWithdrawalQueryAsync(GetWithdrawalFunction getWithdrawalFunction, + BlockParameter blockParameter = null) + { + return ContractHandler.QueryDeserializingToObjectAsync( + getWithdrawalFunction, blockParameter); + } + + public Task GetWithdrawalQueryAsync(string dataStore, byte[] key, + BlockParameter blockParameter = null) + { + var getWithdrawalFunction = new GetWithdrawalFunction(); + getWithdrawalFunction.DataStore = dataStore; + getWithdrawalFunction.Key = key; + + return ContractHandler.QueryDeserializingToObjectAsync( + getWithdrawalFunction, blockParameter); + } + + public Task GetWithdrawalAmountOutQueryAsync( + GetWithdrawalAmountOutFunction getWithdrawalAmountOutFunction, BlockParameter blockParameter = null) + { + return ContractHandler + .QueryDeserializingToObjectAsync( + getWithdrawalAmountOutFunction, blockParameter); + } + + public Task GetWithdrawalAmountOutQueryAsync(string dataStore, Props market, + MarketPrices prices, BigInteger marketTokenAmount, string uiFeeReceiver, byte swapPricingType, + BlockParameter blockParameter = null) + { + var getWithdrawalAmountOutFunction = new GetWithdrawalAmountOutFunction(); + getWithdrawalAmountOutFunction.DataStore = dataStore; + getWithdrawalAmountOutFunction.Market = market; + getWithdrawalAmountOutFunction.Prices = prices; + getWithdrawalAmountOutFunction.MarketTokenAmount = marketTokenAmount; + getWithdrawalAmountOutFunction.UiFeeReceiver = uiFeeReceiver; + getWithdrawalAmountOutFunction.SwapPricingType = swapPricingType; + + return ContractHandler + .QueryDeserializingToObjectAsync( + getWithdrawalAmountOutFunction, blockParameter); + } + + public override List GetAllFunctionTypes() + { + return new List + { + typeof(GetAccountOrdersFunction), + typeof(GetAccountPositionInfoListFunction), + typeof(GetAccountPositionsFunction), + typeof(GetAdlStateFunction), + typeof(GetDepositFunction), + typeof(GetDepositAmountOutFunction), + typeof(GetExecutionPriceFunction), + typeof(GetMarketFunction), + typeof(GetMarketBySaltFunction), + typeof(GetMarketInfoFunction), + typeof(GetMarketInfoListFunction), + typeof(GetMarketTokenPriceFunction), + typeof(GetMarketsFunction), + typeof(GetNetPnlFunction), + typeof(GetOpenInterestWithPnlFunction), + typeof(GetOrderFunction), + typeof(GetPnlFunction), + typeof(GetPnlToPoolFactorFunction), + typeof(GetPositionFunction), + typeof(GetPositionInfoFunction), + typeof(GetPositionPnlUsdFunction), + typeof(GetShiftFunction), + typeof(GetSwapAmountOutFunction), + typeof(GetSwapPriceImpactFunction), + typeof(GetWithdrawalFunction), + typeof(GetWithdrawalAmountOutFunction) + }; + } + + public override List GetAllEventTypes() + { + return new List + { + }; + } + + public override List GetAllErrorTypes() + { + return new List + { + typeof(DisabledMarketError), + typeof(EmptyMarketError) + }; + } + } +} \ No newline at end of file diff --git a/src/Managing.Api.Workers/Program.cs b/src/Managing.Api.Workers/Program.cs index dffbfb5..034bb25 100644 --- a/src/Managing.Api.Workers/Program.cs +++ b/src/Managing.Api.Workers/Program.cs @@ -102,17 +102,17 @@ builder.Services.AddSwaggerGen(options => }); builder.WebHost.SetupDiscordBot(); -builder.Services.AddHostedService(); -// builder.Services.AddHostedService(); -// builder.Services.AddHostedService(); -// builder.Services.AddHostedService(); -builder.Services.AddHostedService(); -builder.Services.AddHostedService(); -// builder.Services.AddHostedService(); -builder.Services.AddHostedService(); -// builder.Services.AddHostedService(); -builder.Services.AddHostedService(); -builder.Services.AddHostedService(); +// builder.Services.AddHostedService(); +// // builder.Services.AddHostedService(); +// // builder.Services.AddHostedService(); +// // builder.Services.AddHostedService(); +// builder.Services.AddHostedService(); +// builder.Services.AddHostedService(); +// // builder.Services.AddHostedService(); +// builder.Services.AddHostedService(); +// // builder.Services.AddHostedService(); +// builder.Services.AddHostedService(); +// builder.Services.AddHostedService(); builder.Services.AddHostedService(); // App diff --git a/src/Managing.Application.Workers/StatisticService.cs b/src/Managing.Application.Workers/StatisticService.cs index fb8950e..0ebef26 100644 --- a/src/Managing.Application.Workers/StatisticService.cs +++ b/src/Managing.Application.Workers/StatisticService.cs @@ -94,9 +94,8 @@ public class StatisticService : IStatisticService { // Get fundingRate from database var previousFundingRate = await GetFundingRates(); - // var fundingRates = await .GetFundingRates(); + var newFundingRates = await _evmManager.GetFundingRates(); - var newFundingRates = await _tradaoService.GetFundingRates(); var topRates = newFundingRates .Where(fr => fr.Direction == TradeDirection.Short && fr.Rate > 0) .OrderByDescending(fr => fr.Rate) @@ -132,7 +131,7 @@ public class StatisticService : IStatisticService else if (previousFundingRate.Any(tr => SameFundingRate(tr, newRate))) { var oldRate = previousFundingRate.FirstOrDefault(tr => SameFundingRate(tr, newRate)); - if (oldRate != null && Math.Abs(oldRate.Rate - newRate.Rate) > 1m) + if (oldRate != null && Math.Abs(oldRate.Rate - newRate.Rate) > 5m) { await _messengerService.SendFundingRateUpdate(oldRate, newRate); _statisticRepository.UpdateFundingRate(oldRate, newRate); diff --git a/src/Managing.Common/Constants.cs b/src/Managing.Common/Constants.cs index b390e62..aeddcef 100644 --- a/src/Managing.Common/Constants.cs +++ b/src/Managing.Common/Constants.cs @@ -36,5 +36,77 @@ public const string Usd = "USD"; public const string Usdt = "USDT"; } + + public class GMX + { + public const string OPEN_INTEREST = "OPEN_INTEREST"; + public const string LONG_INTEREST_USD_KEY = "MAX_OPEN_INTEREST"; + public const string POOL_AMOUNT_KEY = "POOL_AMOUNT"; + public const string MARKET_DISABLED_KEY = "IS_MARKET_DISABLED"; + public const string MAX_PNL_FACTOR_FOR_TRADERS = "MAX_PNL_FACTOR_FOR_TRADERS"; + + public class TokenAddress + { + public const string WETH = "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"; + public const string WSTETH = "0x5979D7b546E38E414F7E9822514be443A4800529"; + public const string WBTC = "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f"; + public const string ARB = "0x912CE59144191C1204E64559FE8253a0e49E6548"; + public const string SOL = "0x2bcC6D6CdBbDC0a4071e48bb3B969b06B3330c07"; + public const string LINK = "0xf97f4df75117a78c1A5a0DBb814Af92458539FB4"; + public const string UNI = "0xFa7F8980b0f1E64A2062791cc3b0871572f1F7f0"; + public const string USDCE = "0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8"; + public const string USDC = "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"; + public const string USDT = "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"; + public const string DAI = "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1"; + public const string USDE = "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34"; + public const string FRAX = "0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F"; + public const string MIM = "0xFEa7a6a0B346362BF88A9e4A88416B77a57D6c2A"; + public const string BTC = "0x47904963fc8b2340414262125aF798B9655E58Cd"; + public const string DOGE = "0xC4da4c24fd591125c3F47b340b6f4f76111883d8"; + public const string LTC = "0xB46A094Bc4B0adBD801E14b9DB95e05E28962764"; + public const string XRP = "0xc14e065b0067dE91534e032868f5Ac6ecf2c6868"; + public const string GMX = "0xfc5A1A6EB076a2C7aD06eD22C90d7E710E35ad0a"; + public const string WBNB = "0xa9004A5421372E1D83fB1f85b0fc986c912f91f3"; + public const string ATOM = "0x7D7F1765aCbaF847b9A1f7137FE8Ed4931FbfEbA"; + public const string AAVE = "0xba5DdD1f9d7F570dc94a51479a000E3BCE967196"; + public const string AVAX = "0x565609fAF65B92F7be02468acF86f8979423e514"; + public const string OP = "0xaC800FD6159c2a2CB8fC31EF74621eB430287a5A"; + public const string PEPE = "0x25d887Ce7a35172C62FeBFD67a1856F20FaEbB00"; + public const string WIF = "0xA1b91fe9FD52141Ff8cac388Ce3F10BFDc1dE79d"; + public const string SHIB = "0x3E57D02f9d196873e55727382974b02EdebE6bfd"; + public const string APE = "0x74885b4D524d497261259B38900f54e6dbAd2210"; + public const string NEAR = "0x1FF7F3EFBb9481Cbd7db4F932cBCD4467144237C"; + public const string STX = "0xBaf07cF91D413C0aCB2b7444B9Bf13b4e03c9D71"; + public const string ORDI = "0x1E15d08f3CA46853B692EE28AE9C7a0b88a9c994"; + } + + public class Markets + { + public const string BTCUSDC = "0x47c031236e19d024b42f8AE6780E44A573170703"; + public const string ETHUSDC = "0x70d95587d40A2caf56bd97485aB3Eec10Bee6336"; + public const string SOLUSD = "0x09400D9DB990D5ed3f35D7be61DfAEB900Af03C9"; + public const string LINKUSD = "0x7f1fa204bb700853D36994DA19F830b6Ad18455C"; + public const string UNIUSD = "0xc7Abb2C5f3BF3CEB389dF0Eecd6120D451170B50"; + public const string DOGEUSD = "0x6853EA96FF216fAb11D2d930CE3C508556A4bdc4"; + public const string LTCUSD = "0xD9535bB5f58A1a75032416F2dFe7880C30575a41"; + public const string XRPUSD = "0x0CCB4fAa6f1F1B30911619f1184082aB4E25813c"; + public const string GMXUSD = "0x55391D178Ce46e7AC8eaAEa50A72D1A5a8A622Da"; + public const string BNBUSD = "0x2d340912Aa47e33c90Efb078e69E70EFe2B34b9B"; + public const string ATOMUSD = "0x248C35760068cE009a13076D573ed3497A47bCD4"; + public const string AAVEUSD = "0x1CbBa6346F110c8A5ea739ef2d1eb182990e4EB2"; + public const string AVAXUSD = "0x7BbBf946883a5701350007320F525c5379B8178A"; + public const string OPUSD = "0x4fDd333FF9cA409df583f306B6F5a7fFdE790739"; + public const string PEPEUSD = "0x2b477989A149B17073D9C9C82eC9cB03591e20c6"; + public const string WIFUSD = "0x0418643F94Ef14917f1345cE5C460C37dE463ef7"; + public const string SHIBUSD = "0xB62369752D8Ad08392572db6d0cc872127888beD"; + public const string APEUSD = "0x74885b4D524d497261259B38900f54e6dbAd2210"; + public const string NEARUSD = "0x63Dc80EE90F26363B3FCD609007CC9e14c8991BE"; + public const string ARBUSD = "0xC25cEf6061Cf5dE5eb761b50E4743c1F5D7E5407"; + public const string BTCUSD = "0x7C11F78Ce78768518D743E81Fdfa2F860C6b9A77"; + public const string ETHUSD = "0x450bb6774Dd8a756274E0ab4107953259d2ac541"; + public const string STXUSD = "0xD9377d9B9a2327C7778867203deeA73AB8a68b6B"; + public const string ORDIUSD = "0x93385F7C646A3048051914BDFaC25F4d620aeDF1"; + } + } } } \ No newline at end of file diff --git a/src/Managing.Common/Enums.cs b/src/Managing.Common/Enums.cs index 9850349..92c31c0 100644 --- a/src/Managing.Common/Enums.cs +++ b/src/Managing.Common/Enums.cs @@ -299,6 +299,10 @@ public static class Enums XMR, XRP, XTZ, + SHIB, + STX, + ORDI, + Unknown } public enum WorkerType diff --git a/src/Managing.Domain/Evm/Chain.cs b/src/Managing.Domain/Evm/Chain.cs index 4abe622..ee3c540 100644 --- a/src/Managing.Domain/Evm/Chain.cs +++ b/src/Managing.Domain/Evm/Chain.cs @@ -5,4 +5,5 @@ public class Chain public string Id { get; set; } public string RpcUrl { get; set; } public string Name { get; set; } -} + public int ChainId { get; set; } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Messengers/Discord/DiscordService.cs b/src/Managing.Infrastructure.Messengers/Discord/DiscordService.cs index c313bb9..ce0283e 100644 --- a/src/Managing.Infrastructure.Messengers/Discord/DiscordService.cs +++ b/src/Managing.Infrastructure.Messengers/Discord/DiscordService.cs @@ -130,7 +130,7 @@ namespace Managing.Infrastructure.Messengers.Discord catch (ApplicationCommandException exception) { var json = JsonConvert.SerializeObject(exception, Formatting.Indented); - Console.WriteLine(json); + _logger.LogError(exception, json); } } diff --git a/src/Managing.Infrastructure.Tests/GmxServiceV2Tests.cs b/src/Managing.Infrastructure.Tests/GmxServiceV2Tests.cs new file mode 100644 index 0000000..94410c8 --- /dev/null +++ b/src/Managing.Infrastructure.Tests/GmxServiceV2Tests.cs @@ -0,0 +1,121 @@ +using Managing.Common; +using Managing.Infrastructure.Evm.Models.Gmx.v2; +using Managing.Infrastructure.Evm.Services; +using Managing.Infrastructure.Evm.Services.Gmx; +using Nethereum.Web3; +using Xunit; + +namespace Managing.Infrastructure.Tests; + +public class GmxV2ServiceTests +{ + private readonly GmxV2Service _service; + private readonly Web3 _web3; + + public GmxV2ServiceTests() + { + var defaultChain = ChainService.GetArbitrum(); + _web3 = new Web3(defaultChain.RpcUrl); + _service = new GmxV2Service(); + } + + [Fact] + public async Task Get_Multiple_Markets_With_MultiCall() + { + // Act + var result = await _service.GetMarketsAsync(_web3); + + // Assert + Assert.NotNull(result); + Assert.NotEmpty(result); + Assert.All(result, r => + { + Assert.NotNull(r.MarketToken); + Assert.NotNull(r.IndexToken); + Assert.NotNull(r.LongToken); + Assert.NotNull(r.ShortToken); + }); + } + + [Fact] + public async Task Get_Multiple_Markets() + { + var result = await _service.GetMarkets(_web3); + Assert.NotNull(result); + } + + [Fact] + public async Task Get_Multiple_MarketsInfos_With_Multicall() + { + // Act + var result = await _service.GetMarketInfosAsync(_web3); + + // Assert + Assert.NotNull(result); + Assert.NotEmpty(result); + } + + [Fact] + public async Task Get_Single_MarketInfos() + { + var result = await _service.GetMarketInfo(_web3); + Assert.NotNull(result); + } + + [Fact] + public async Task Get_Single_FundingRate() + { + var result = await _service.GetFundingRate(_web3); + Assert.NotNull(result); + } + + [Fact] + public async Task Get_Market_Token_Price() + { + var result = await _service.GetMarketTokenPrice(_web3); + var resultMaximized = await _service.GetMarketTokenPrice(_web3, false); + + Assert.NotNull(result); + Assert.NotNull(resultMaximized); + } + + [Fact] + public async Task Get_IsMarket_Disabled() + { + var result = await _service.GetIsMarketDisabled(_web3); + Assert.False(result); + } + + [Fact] + public async Task Get_Long_Interest_Amount() + { + var result = await _service.GetLongInterestAmount(_web3); + Assert.NotNull(result); + } + + [Fact] + public async Task Get_FundigRates() + { + var result = await _service.GetFundingRates(_web3); + Assert.NotNull(result); + } + + [Fact] + public void Helpers_Should_Validate_Exact_Same_Address() + { + var address = "0x47904963Fc8b2340414262125aF798B9655E58Cd"; + var address2 = "0x47904963fc8b2340414262125aF798B9655E58Cd"; + + Assert.True(GmxV2Helpers.SameAddress(address, address2)); + } + + [Fact] + public void Should_Return_Correct_Long_Key() + { + var expectedKey = "0xaaf79028722fd65633cdf994a4a10b0bd349761062506c4bb6a0489956ba5d3f"; + var keys = GmxKeysService.GetMarketKeys(Constants.GMX.Markets.BTCUSDC); + + Assert.NotNull(keys); + Assert.Equal(expectedKey, keys.LongInterestUsingLongToken); + } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/EvmManager.cs b/src/Managing.Infrastructure.Web3/EvmManager.cs index 4e493c1..04d6096 100644 --- a/src/Managing.Infrastructure.Web3/EvmManager.cs +++ b/src/Managing.Infrastructure.Web3/EvmManager.cs @@ -29,7 +29,7 @@ public class EvmManager : IEvmManager private readonly Web3 _web3; private readonly HttpClient _httpClient; private readonly string _password = "!StrongPassword94"; - private readonly IEnumerable _subgraphs; + private readonly IEnumerable _subgraphs; private Dictionary> _geckoPrices; public EvmManager(IEnumerable subgraphs) @@ -38,7 +38,9 @@ public class EvmManager : IEvmManager _web3 = new Web3(defaultChain.RpcUrl); _httpClient = new HttpClient(); _subgraphs = subgraphs; - _geckoPrices = _geckoPrices != null && _geckoPrices.Any() ? _geckoPrices : new Dictionary>(); + _geckoPrices = _geckoPrices != null && _geckoPrices.Any() + ? _geckoPrices + : new Dictionary>(); SetupPrices(); } @@ -131,7 +133,8 @@ public class EvmManager : IEvmManager return holders; } - public async Task>> GetNftEvent(string contractAddress, string tokenOwner) + public async Task>> + GetNftEvent(string contractAddress, string tokenOwner) { return await NftService.GetNftEvent(_web3, tokenOwner, contractAddress); } @@ -186,15 +189,16 @@ public class EvmManager : IEvmManager { var web3 = new Web3(chain.RpcUrl); var etherBalance = Web3.Convert.FromWei(await web3.Eth.GetBalance.SendRequestAsync(account)); - var etherPrice = (await GetPrices(new List { "ethereum"}))["ethereum"]["usd"]; + var etherPrice = (await GetPrices(new List { "ethereum" }))["ethereum"]["usd"]; - return new EvmBalance() { Balance = etherBalance, Price = etherPrice, TokenName = "ETH", Value = etherBalance * etherPrice }; + return new EvmBalance() + { Balance = etherBalance, Price = etherPrice, TokenName = "ETH", Value = etherBalance * etherPrice }; } public async Task> GetAllBalances(Domain.Evm.Chain chain, string publicAddress) { var balances = new List(); - + var web3 = new Web3(chain.RpcUrl); SetupPrices(); @@ -213,6 +217,7 @@ public class EvmManager : IEvmManager // TODO : handle exception } } + var etherBalance = await GetEtherBalance(chain, publicAddress); etherBalance.Chain = chain; balances.Add(etherBalance); @@ -267,7 +272,8 @@ public class EvmManager : IEvmManager return evmBalance; } - public async Task> GetBalances(Domain.Evm.Chain chain, int page, int pageSize, string publicAddress) + public async Task> GetBalances(Domain.Evm.Chain chain, int page, int pageSize, + string publicAddress) { var callList = new List(); var startItem = (page * pageSize); @@ -281,6 +287,7 @@ public class EvmManager : IEvmManager tokens[i].Address); callList.Add(call); } + var evmTokens = new List<(EvmBalance Balance, GeckoToken GeckoToken)>(); try @@ -292,7 +299,8 @@ public class EvmManager : IEvmManager for (int i = startItem; i < totaItemsToFetch; i++) { - var balance = ((MulticallInputOutput)callList[i - startItem]).Output.Balance; + var balance = ((MulticallInputOutput)callList[i - startItem]) + .Output.Balance; if (balance > 0) { var tokenBalance = new EvmBalance() @@ -303,7 +311,8 @@ public class EvmManager : IEvmManager Chain = chain }; - var geckoToken = geckoTokens.FirstOrDefault(x => string.Equals(x.Symbol, tokens[i].Symbol, StringComparison.InvariantCultureIgnoreCase)); + var geckoToken = geckoTokens.FirstOrDefault(x => + string.Equals(x.Symbol, tokens[i].Symbol, StringComparison.InvariantCultureIgnoreCase)); evmTokens.Add((tokenBalance, geckoToken)); } @@ -324,7 +333,6 @@ public class EvmManager : IEvmManager } } } - } catch (Exception ex) { @@ -338,7 +346,8 @@ public class EvmManager : IEvmManager public async Task>> GetPrices(List geckoIds) { var idsCombined = string.Join(",", geckoIds); - return await _httpClient.GetFromJsonAsync>>("https://api.coingecko.com/api/v3/simple/price?ids=" + idsCombined + "&vs_currencies=usd"); + return await _httpClient.GetFromJsonAsync>>( + "https://api.coingecko.com/api/v3/simple/price?ids=" + idsCombined + "&vs_currencies=usd"); } public async Task> GetAllBalancesOnAllChain(string publicAddress) @@ -354,11 +363,12 @@ public class EvmManager : IEvmManager return chainBalances; } - public async Task> GetCandles(SubgraphProvider subgraphProvider, Ticker ticker, DateTime startDate, Timeframe timeframe) + public async Task> GetCandles(SubgraphProvider subgraphProvider, Ticker ticker, DateTime startDate, + Timeframe timeframe) { - string gmxTimeframe = GmxHelpers.GeTimeframe(timeframe); - var gmxPrices = await _httpClient.GetFromJsonAsync($"https://stats.gmx.io/api/candles/{ticker}?preferableChainId=42161&period={gmxTimeframe}&from={startDate.ToUnixTimestamp()}&preferableSource=fast"); + var gmxPrices = await _httpClient.GetFromJsonAsync( + $"https://stats.gmx.io/api/candles/{ticker}?preferableChainId=42161&period={gmxTimeframe}&from={startDate.ToUnixTimestamp()}&preferableSource=fast"); //var subgraph = _subgraphs.First(s => s.GetProvider() == subgraphProvider); //var prices = await subgraph.GetPrices(ticker, startDate, timeframe); @@ -401,7 +411,8 @@ public class EvmManager : IEvmManager public async Task GetCandle(SubgraphProvider subgraphProvider, Ticker ticker) { - var lastPrices = await GetCandles(subgraphProvider, ticker, DateTime.UtcNow.AddMinutes(-15), Timeframe.FiveMinutes); + var lastPrices = await GetCandles(subgraphProvider, ticker, DateTime.UtcNow.AddMinutes(-15), + Timeframe.FiveMinutes); return lastPrices.Last(); } @@ -482,7 +493,6 @@ public class EvmManager : IEvmManager string receiverAddress, Web3 web3) { - var contractAddress = TokenService.GetContractAddress(ticker); var transactionMessage = new TransferFunction { @@ -495,7 +505,8 @@ public class EvmManager : IEvmManager var transferReceipt = await transferHandler.SendRequestAndWaitForReceiptAsync(contractAddress, transactionMessage); - var transaction = await web3.Eth.Transactions.GetTransactionByHash.SendRequestAsync(transferReceipt.TransactionHash); + var transaction = + await web3.Eth.Transactions.GetTransactionByHash.SendRequestAsync(transferReceipt.TransactionHash); return transaction != null; } @@ -523,7 +534,6 @@ public class EvmManager : IEvmManager try { trade = await GmxService.IncreasePosition(web3, account.Key, ticker, direction, price, quantity, leverage); - } catch (Exception ex) { @@ -558,9 +568,9 @@ public class EvmManager : IEvmManager return trade; } - public async Task DecreaseOrder(Account account, TradeType tradeType, Ticker ticker, TradeDirection direction, decimal price, decimal quantity, decimal? leverage) + public async Task DecreaseOrder(Account account, TradeType tradeType, Ticker ticker, + TradeDirection direction, decimal price, decimal quantity, decimal? leverage) { - var wallet = new Wallet(account.Secret, _password).GetAccount(account.Key); var chain = ChainService.GetChain(Constants.Chains.Arbitrum); var web3 = new Web3(wallet, chain.RpcUrl); @@ -568,7 +578,8 @@ public class EvmManager : IEvmManager Trade trade = null; try { - trade = await GmxService.DecreaseOrder(web3, tradeType, account.Key, ticker, direction, price, quantity, leverage); + trade = await GmxService.DecreaseOrder(web3, tradeType, account.Key, ticker, direction, price, quantity, + leverage); } catch (Exception ex) { @@ -591,13 +602,14 @@ public class EvmManager : IEvmManager return await GmxService.GetTrade(web3, reference, ticker); } - public Task> GetFundingRates() + public async Task> GetFundingRates() { - // Call GMX v2 - // Call hyperliquid - - // Map the results - return Task.FromResult(new List()); + var chain = ChainService.GetChain(Constants.Chains.Arbitrum); + var web3 = new Web3(chain.RpcUrl); + var service = new GmxV2Service(); + var fundingRates = await service.GetFundingRates(web3); + + return fundingRates; } public async Task QuantityInPosition(string chainName, string publicAddress, Ticker ticker) @@ -626,5 +638,4 @@ public class EvmManager : IEvmManager return GmxHelpers.Map(orders, ticker); } - } \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Managing.Infrastructure.Evm.csproj b/src/Managing.Infrastructure.Web3/Managing.Infrastructure.Evm.csproj index 114dc54..e7bbf22 100644 --- a/src/Managing.Infrastructure.Web3/Managing.Infrastructure.Evm.csproj +++ b/src/Managing.Infrastructure.Web3/Managing.Infrastructure.Evm.csproj @@ -1,26 +1,29 @@ - - net8.0 - enable - enable - + + net8.0 + enable + enable + - - - - - - - - - - - + + + + + + + + + + + + + - - - - + + + + + diff --git a/src/Managing.Infrastructure.Web3/Models/Gmx/GmxOrder.cs b/src/Managing.Infrastructure.Web3/Models/Gmx/v1/GmxOrder.cs similarity index 100% rename from src/Managing.Infrastructure.Web3/Models/Gmx/GmxOrder.cs rename to src/Managing.Infrastructure.Web3/Models/Gmx/v1/GmxOrder.cs diff --git a/src/Managing.Infrastructure.Web3/Models/Gmx/GmxOrderIndex.cs b/src/Managing.Infrastructure.Web3/Models/Gmx/v1/GmxOrderIndex.cs similarity index 100% rename from src/Managing.Infrastructure.Web3/Models/Gmx/GmxOrderIndex.cs rename to src/Managing.Infrastructure.Web3/Models/Gmx/v1/GmxOrderIndex.cs diff --git a/src/Managing.Infrastructure.Web3/Models/Gmx/GmxPosition.cs b/src/Managing.Infrastructure.Web3/Models/Gmx/v1/GmxPosition.cs similarity index 100% rename from src/Managing.Infrastructure.Web3/Models/Gmx/GmxPosition.cs rename to src/Managing.Infrastructure.Web3/Models/Gmx/v1/GmxPosition.cs diff --git a/src/Managing.Infrastructure.Web3/Models/Gmx/GmxPrices.cs b/src/Managing.Infrastructure.Web3/Models/Gmx/v1/GmxPrices.cs similarity index 100% rename from src/Managing.Infrastructure.Web3/Models/Gmx/GmxPrices.cs rename to src/Managing.Infrastructure.Web3/Models/Gmx/v1/GmxPrices.cs diff --git a/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxMarket.cs b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxMarket.cs new file mode 100644 index 0000000..cd827f7 --- /dev/null +++ b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxMarket.cs @@ -0,0 +1,17 @@ +using System.Numerics; + +namespace Managing.Infrastructure.Evm.Models.Gmx.v2; + +public class GmxMarket +{ + public string MarketToken { get; set; } + public string IndexToken { get; set; } + public string LongToken { get; set; } + public string ShortToken { get; set; } + public string Name { get; set; } + public string Symbol { get; set; } + public bool IsSpotOnly { get; set; } + public bool IsSameCollaterals { get; set; } + public BigInteger FundingFactorPerSecond { get; set; } + public bool LongsPayShorts { get; set; } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxMarketInfo.cs b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxMarketInfo.cs new file mode 100644 index 0000000..7476bb7 --- /dev/null +++ b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxMarketInfo.cs @@ -0,0 +1,9 @@ +namespace Managing.Infrastructure.Evm.Models.Gmx.v2; + +public class GmxMarketInfo +{ + public GmxMarket Market { get; set; } + public GmxMarketTokenPrice MarketTokenPriceMax { get; set; } + public GmxMarketTokenPrice MarketTokenPriceMin { get; set; } + public GmxMarketInfos Infos { get; set; } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxMarketInfos.cs b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxMarketInfos.cs new file mode 100644 index 0000000..09e1ace --- /dev/null +++ b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxMarketInfos.cs @@ -0,0 +1,110 @@ +using System.Numerics; + +namespace Managing.Infrastructure.Evm.Models.Gmx.v2; + +public class GmxMarketInfos +{ + public bool IsDisabled { get; set; } + + public GmxTokenData LongToken { get; set; } + public GmxTokenData ShortToken { get; set; } + public GmxTokenData IndexToken { get; set; } + + public BigInteger LongPoolAmount { get; set; } + public BigInteger ShortPoolAmount { get; set; } + + public BigInteger MaxLongPoolAmount { get; set; } + public BigInteger MaxShortPoolAmount { get; set; } + public BigInteger MaxLongPoolUsdForDeposit { get; set; } + public BigInteger MaxShortPoolUsdForDeposit { get; set; } + + public BigInteger LongPoolAmountAdjustment { get; set; } + public BigInteger ShortPoolAmountAdjustment { get; set; } + + public BigInteger PoolValueMax { get; set; } + public BigInteger PoolValueMin { get; set; } + + public BigInteger ReserveFactorLong { get; set; } + public BigInteger ReserveFactorShort { get; set; } + + public BigInteger OpenInterestReserveFactorLong { get; set; } + public BigInteger OpenInterestReserveFactorShort { get; set; } + + public BigInteger MaxOpenInterestLong { get; set; } + public BigInteger MaxOpenInterestShort { get; set; } + + public BigInteger BorrowingFactorLong { get; set; } + public BigInteger BorrowingFactorShort { get; set; } + public BigInteger BorrowingExponentFactorLong { get; set; } + public BigInteger BorrowingExponentFactorShort { get; set; } + + public BigInteger FundingFactor { get; set; } + public BigInteger FundingExponentFactor { get; set; } + public BigInteger FundingIncreaseFactorPerSecond { get; set; } + public BigInteger FundingDecreaseFactorPerSecond { get; set; } + public BigInteger ThresholdForStableFunding { get; set; } + public BigInteger ThresholdForDecreaseFunding { get; set; } + public BigInteger MinFundingFactorPerSecond { get; set; } + public BigInteger MaxFundingFactorPerSecond { get; set; } + + public BigInteger TotalBorrowingFees { get; set; } + + public BigInteger PositionImpactPoolAmount { get; set; } + public BigInteger MinPositionImpactPoolAmount { get; set; } + public BigInteger PositionImpactPoolDistributionRate { get; set; } + + public BigInteger MinCollateralFactor { get; set; } + public BigInteger MinCollateralFactorForOpenInterestLong { get; set; } + public BigInteger MinCollateralFactorForOpenInterestShort { get; set; } + + public BigInteger SwapImpactPoolAmountLong { get; set; } + public BigInteger SwapImpactPoolAmountShort { get; set; } + + public BigInteger MaxPnlFactorForTradersLong { get; set; } + public BigInteger MaxPnlFactorForTradersShort { get; set; } + + public BigInteger PnlLongMin { get; set; } + public BigInteger PnlLongMax { get; set; } + public BigInteger PnlShortMin { get; set; } + public BigInteger PnlShortMax { get; set; } + + public BigInteger NetPnlMin { get; set; } + public BigInteger NetPnlMax { get; set; } + + public BigInteger? ClaimableFundingAmountLong { get; set; } + public BigInteger? ClaimableFundingAmountShort { get; set; } + + public BigInteger LongInterestUsd { get; set; } + public BigInteger ShortInterestUsd { get; set; } + public BigInteger LongInterestInTokens { get; set; } + public BigInteger ShortInterestInTokens { get; set; } + + public BigInteger PositionFeeFactorForPositiveImpact { get; set; } + public BigInteger PositionFeeFactorForNegativeImpact { get; set; } + public BigInteger PositionImpactFactorPositive { get; set; } + public BigInteger PositionImpactFactorNegative { get; set; } + public BigInteger MaxPositionImpactFactorPositive { get; set; } + public BigInteger MaxPositionImpactFactorNegative { get; set; } + public BigInteger MaxPositionImpactFactorForLiquidations { get; set; } + public BigInteger PositionImpactExponentFactor { get; set; } + + public BigInteger SwapFeeFactorForPositiveImpact { get; set; } + public BigInteger SwapFeeFactorForNegativeImpact { get; set; } + public BigInteger SwapImpactFactorPositive { get; set; } + public BigInteger SwapImpactFactorNegative { get; set; } + public BigInteger SwapImpactExponentFactor { get; set; } + + public BigInteger BorrowingFactorPerSecondForLongs { get; set; } + public BigInteger BorrowingFactorPerSecondForShorts { get; set; } + + public BigInteger FundingFactorPerSecond { get; set; } + public bool LongsPayShorts { get; set; } + + public BigInteger VirtualPoolAmountForLongToken { get; set; } + public BigInteger VirtualPoolAmountForShortToken { get; set; } + public BigInteger VirtualInventoryForPositions { get; set; } + + public string VirtualMarketId { get; set; } + public string VirtualLongTokenId { get; set; } + public string VirtualShortTokenId { get; set; } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxMarketTokenPrice.cs b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxMarketTokenPrice.cs new file mode 100644 index 0000000..140392d --- /dev/null +++ b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxMarketTokenPrice.cs @@ -0,0 +1,18 @@ +using System.Numerics; + +namespace Managing.Infrastructure.Evm.Models.Gmx.v2; + +public class GmxMarketTokenPrice +{ + public BigInteger PoolValue { get; set; } + public BigInteger LongPnl { get; set; } + public BigInteger ShortPnl { get; set; } + public BigInteger NetPnl { get; set; } + public BigInteger LongTokenAmount { get; set; } + public BigInteger ShortTokenAmount { get; set; } + public BigInteger LongTokenUsd { get; set; } + public BigInteger ShortTokenUsd { get; set; } + public BigInteger TotalBorrowingFees { get; set; } + public BigInteger BorrowingFeePoolFactor { get; set; } + public BigInteger ImpactPoolAmount { get; set; } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxStoreKeys.cs b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxStoreKeys.cs new file mode 100644 index 0000000..ecbe4d8 --- /dev/null +++ b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxStoreKeys.cs @@ -0,0 +1,45 @@ +using Newtonsoft.Json; + +namespace Managing.Infrastructure.Evm.Models.Gmx.v2; + +public class GmxStoreKeys +{ + [JsonProperty("longPoolAmount", NullValueHandling = NullValueHandling.Ignore)] + public string LongPoolAmount { get; set; } + + [JsonProperty("shortPoolAmount", NullValueHandling = NullValueHandling.Ignore)] + public string ShortPoolAmount { get; set; } + + [JsonProperty("positionImpactPoolAmount", NullValueHandling = NullValueHandling.Ignore)] + public string PositionImpactPoolAmount { get; set; } + + [JsonProperty("swapImpactPoolAmountLong", NullValueHandling = NullValueHandling.Ignore)] + public string SwapImpactPoolAmountLong { get; set; } + + [JsonProperty("swapImpactPoolAmountShort", NullValueHandling = NullValueHandling.Ignore)] + public string SwapImpactPoolAmountShort { get; set; } + + [JsonProperty("longInterestUsingLongToken", NullValueHandling = NullValueHandling.Ignore)] + public string LongInterestUsingLongToken { get; set; } + + [JsonProperty("longInterestUsingShortToken", NullValueHandling = NullValueHandling.Ignore)] + public string LongInterestUsingShortToken { get; set; } + + [JsonProperty("shortInterestUsingLongToken", NullValueHandling = NullValueHandling.Ignore)] + public string ShortInterestUsingLongToken { get; set; } + + [JsonProperty("shortInterestUsingShortToken", NullValueHandling = NullValueHandling.Ignore)] + public string ShortInterestUsingShortToken { get; set; } + + [JsonProperty("longInterestInTokensUsingLongToken", NullValueHandling = NullValueHandling.Ignore)] + public string LongInterestInTokensUsingLongToken { get; set; } + + [JsonProperty("longInterestInTokensUsingShortToken", NullValueHandling = NullValueHandling.Ignore)] + public string LongInterestInTokensUsingShortToken { get; set; } + + [JsonProperty("shortInterestInTokensUsingLongToken", NullValueHandling = NullValueHandling.Ignore)] + public string ShortInterestInTokensUsingLongToken { get; set; } + + [JsonProperty("shortInterestInTokensUsingShortToken", NullValueHandling = NullValueHandling.Ignore)] + public string ShortInterestInTokensUsingShortToken { get; set; } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxTokenBalances.cs b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxTokenBalances.cs new file mode 100644 index 0000000..9c0de38 --- /dev/null +++ b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxTokenBalances.cs @@ -0,0 +1,8 @@ +using System.Numerics; + +namespace Managing.Infrastructure.Evm.Models.Gmx.v2; + +public class GmxTokenBalances +{ + public Dictionary Balances { get; set; } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxTokenData.cs b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxTokenData.cs new file mode 100644 index 0000000..734ffa9 --- /dev/null +++ b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxTokenData.cs @@ -0,0 +1,10 @@ +using System.Numerics; +using Managing.ABI.GmxV2.Reader.ContractDefinition; + +namespace Managing.Infrastructure.Evm.Models.Gmx.v2; + +public class GmxTokenData : GmxToken +{ + public MarketPrice Price { get; set; } + public BigInteger? Balance { get; set; } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxTokenPriceData.cs b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxTokenPriceData.cs new file mode 100644 index 0000000..1913cb7 --- /dev/null +++ b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/GmxTokenPriceData.cs @@ -0,0 +1,11 @@ +using System.Numerics; +using Managing.ABI.GmxV2.Reader.ContractDefinition; + +namespace Managing.Infrastructure.Evm.Models.Gmx.v2; + +public class GmxTokenPriceData +{ + public MarketPrice Price { get; set; } + public BigInteger? Balance { get; set; } + public BigInteger? TotalSupply { get; set; } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Models/Gmx/v2/MarketStats.cs b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/MarketStats.cs new file mode 100644 index 0000000..fa61115 --- /dev/null +++ b/src/Managing.Infrastructure.Web3/Models/Gmx/v2/MarketStats.cs @@ -0,0 +1,20 @@ +namespace Managing.Infrastructure.Evm.Models.Gmx.v2; + +public class MarketStats +{ + public string Market { get; set; } + public decimal PoolValue { get; set; } + public decimal PoolBalance { get; set; } + public decimal PoolCapLong { get; set; } + public decimal PoolCapShort { get; set; } + public decimal PnL { get; set; } + public decimal BorrowingFees { get; set; } + public decimal FundingApr { get; set; } + public decimal OpenInterest { get; set; } + public decimal LiquidityLong { get; set; } + public decimal LiquidityShort { get; set; } + public decimal Vipositions { get; set; } + public decimal Viswaps { get; set; } + public decimal PositionImpactPool { get; set; } + public string Config { get; set; } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Referentials/Arbitrum.cs b/src/Managing.Infrastructure.Web3/Referentials/Arbitrum.cs index 7f6586f..48aeec3 100644 --- a/src/Managing.Infrastructure.Web3/Referentials/Arbitrum.cs +++ b/src/Managing.Infrastructure.Web3/Referentials/Arbitrum.cs @@ -4,54 +4,68 @@ public class Arbitrum { public class Address { - public const string ETH = "0x82af49447d8a07e3bd95bd0d56f35241523fbab1"; - public const string WBTC = "0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f"; - public const string LINK = "0xf97f4df75117a78c1a5a0dbb814af92458539fb4"; - public const string UNI = "0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0"; + public const string ETH = "0x82af49447d8a07e3bd95bd0d56f35241523fbab1"; + public const string WBTC = "0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f"; + public const string LINK = "0xf97f4df75117a78c1a5a0dbb814af92458539fb4"; + public const string UNI = "0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0"; - public const string USDC = "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8"; - public const string USDT = "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"; - public const string DAI = "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"; - public const string MIM = "0xFEa7a6a0B346362BF88A9e4A88416B77a57D6c2A"; - public const string FRAX = "0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F"; + public const string USDC = "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8"; + public const string USDT = "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"; + public const string DAI = "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1"; + public const string MIM = "0xFEa7a6a0B346362BF88A9e4A88416B77a57D6c2A"; + public const string FRAX = "0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F"; - public const string Vault = "0x489ee077994B6658eAfA855C308275EAd8097C4A"; - public const string VaultPriceFeed = "0x2d68011bcA022ed0E474264145F46CC4de96a002"; - public const string Router = "0xaBBc5F99639c9B6bCb58544ddf04EFA6802F4064"; - public const string VaultReader = "0xfebB9f4CAC4cD523598fE1C5771181440143F24A"; - public const string Reader = "0xF09eD52638c22cc3f1D7F5583e3699A075e601B2"; - public const string GlpManager = "0x321F653eED006AD1C29D174e17d96351BDe22649"; - public const string RewardRouter = "0xc73d553473dC65CE56db96c58e6a091c20980fbA"; - public const string RewardReader = "0xe725Ad0ce3eCf68A7B93d8D8091E83043Ff12e9A"; + public const string Vault = "0x489ee077994B6658eAfA855C308275EAd8097C4A"; + public const string VaultPriceFeed = "0x2d68011bcA022ed0E474264145F46CC4de96a002"; + public const string Router = "0xaBBc5F99639c9B6bCb58544ddf04EFA6802F4064"; + public const string VaultReader = "0xfebB9f4CAC4cD523598fE1C5771181440143F24A"; + public const string Reader = "0xF09eD52638c22cc3f1D7F5583e3699A075e601B2"; + public const string GlpManager = "0x321F653eED006AD1C29D174e17d96351BDe22649"; + public const string RewardRouter = "0xc73d553473dC65CE56db96c58e6a091c20980fbA"; + public const string RewardReader = "0xe725Ad0ce3eCf68A7B93d8D8091E83043Ff12e9A"; - public const string GLP = "0x4277f8f2c384827b5273592ff7cebd9f2c1ac258"; - public const string GMX = "0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a"; - public const string ES_GMX = "0xf42ae1d54fd613c9bb14810b0588faaa09a426ca"; - public const string BN_GMX = "0x35247165119B69A40edD5304969560D0ef486921"; - public const string USDG = "0x45096e7aA921f27590f8F19e457794EB09678141"; + public const string GLP = "0x4277f8f2c384827b5273592ff7cebd9f2c1ac258"; + public const string GMX = "0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a"; + public const string ES_GMX = "0xf42ae1d54fd613c9bb14810b0588faaa09a426ca"; + public const string BN_GMX = "0x35247165119B69A40edD5304969560D0ef486921"; + public const string USDG = "0x45096e7aA921f27590f8F19e457794EB09678141"; - public const string StakedGmxTracker = "0x908C4D94D34924765f1eDc22A1DD098397c59dD4"; - public const string BonusGmxTracker = "0x4d268a7d4C16ceB5a606c173Bd974984343fea13"; - public const string FeeGmxTracker = "0xd2D1162512F927a7e282Ef43a362659E4F2a728F"; - public const string FeeGlpTracker = "0x4e971a87900b931fF39d1Aad67697F49835400b6"; - public const string StakedGlpTracker = "0x1aDDD80E6039594eE970E5872D247bf0414C8903"; + public const string StakedGmxTracker = "0x908C4D94D34924765f1eDc22A1DD098397c59dD4"; + public const string BonusGmxTracker = "0x4d268a7d4C16ceB5a606c173Bd974984343fea13"; + public const string FeeGmxTracker = "0xd2D1162512F927a7e282Ef43a362659E4F2a728F"; + public const string FeeGlpTracker = "0x4e971a87900b931fF39d1Aad67697F49835400b6"; + public const string StakedGlpTracker = "0x1aDDD80E6039594eE970E5872D247bf0414C8903"; - public const string StakedGmxDistributor = "0x23208B91A98c7C1CD9FE63085BFf68311494F193"; - public const string StakedGlpDistributor = "0x60519b48ec4183a61ca2B8e37869E675FD203b34"; + public const string StakedGmxDistributor = "0x23208B91A98c7C1CD9FE63085BFf68311494F193"; + public const string StakedGlpDistributor = "0x60519b48ec4183a61ca2B8e37869E675FD203b34"; - public const string GmxVester = "0x199070DDfd1CFb69173aa2F7e20906F26B363004"; - public const string GlpVester = "0xA75287d2f8b217273E7FCD7E86eF07D33972042E"; + public const string GmxVester = "0x199070DDfd1CFb69173aa2F7e20906F26B363004"; + public const string GlpVester = "0xA75287d2f8b217273E7FCD7E86eF07D33972042E"; - public const string OrderBook = "0x09f77E8A13De9a35a7231028187e9fD5DB8a2ACB"; - public const string OrderExecutor = "0x7257ac5D0a0aaC04AA7bA2AC0A6Eb742E332c3fB"; - public const string OrderBookReader = "0xa27C20A7CF0e1C68C0460706bB674f98F362Bc21"; + public const string OrderBook = "0x09f77E8A13De9a35a7231028187e9fD5DB8a2ACB"; + public const string OrderExecutor = "0x7257ac5D0a0aaC04AA7bA2AC0A6Eb742E332c3fB"; + public const string OrderBookReader = "0xa27C20A7CF0e1C68C0460706bB674f98F362Bc21"; - public const string FastPriceFeed = "0x1a0ad27350cccd6f7f168e052100b4960efdb774"; - public const string PositionRouter = "0xb87a436B93fFE9D75c5cFA7bAcFff96430b09868"; - public const string PositionManager = "0x87a4088Bd721F83b6c2E5102e2FA47022Cb1c831"; + public const string FastPriceFeed = "0x1a0ad27350cccd6f7f168e052100b4960efdb774"; + public const string PositionRouter = "0xb87a436B93fFE9D75c5cFA7bAcFff96430b09868"; + public const string PositionManager = "0x87a4088Bd721F83b6c2E5102e2FA47022Cb1c831"; - public const string UniswapGmxEthPool = "0x80A9ae39310abf666A87C743d6ebBD0E8C42158E"; + public const string UniswapGmxEthPool = "0x80A9ae39310abf666A87C743d6ebBD0E8C42158E"; - public static string Zero = "0x0000000000000000000000000000000000000000"; + public static string Zero = "0x0000000000000000000000000000000000000000"; } -} + + public class AddressV2 + { + public const string DataStore = "0xFD70de6b91282D8017aA4E741e9Ae325CAb992d8"; + public const string EventEmitter = "0xC8ee91A54287DB53897056e12D9819156D3822Fb"; + public const string SubaccountRouter = "0x9F48160eDc3Ad78F4cA0E3FDF54A75D8FB228452"; + public const string ExchangeRouter = "0x69C527fC77291722b52649E45c838e41be8Bf5d5"; + public const string DepositVault = "0xF89e77e8Dc11691C9e8757e84aaFbCD8A67d7A55"; + public const string WithdrawalVault = "0x0628D46b5D145f183AdB6Ef1f2c97eD1C4701C55"; + public const string OrderVault = "0x31eF83a530Fde1B38EE9A18093A333D8Bbbc40D5"; + public const string Reader = "0x5Ca84c34a381434786738735265b9f3FD814b824"; + public const string SyntheticsRouter = "0x7452c558d45f8afC8c83dAe62C3f8A5BE19c71f6"; + public const string Multicall = "0xcA11bde05977b3631167028862bE2a173976CA11"; + } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Services/ChainService.cs b/src/Managing.Infrastructure.Web3/Services/ChainService.cs index b73792e..7ef834b 100644 --- a/src/Managing.Infrastructure.Web3/Services/ChainService.cs +++ b/src/Managing.Infrastructure.Web3/Services/ChainService.cs @@ -37,7 +37,8 @@ public static class ChainService return new Chain() { Name = Constants.Chains.Arbitrum, - RpcUrl = RPC_ARBITRUM + RpcUrl = RPC_ARBITRUM, + ChainId = 42161 }; } @@ -46,7 +47,8 @@ public static class ChainService return new Chain() { Name = Constants.Chains.Ethereum, - RpcUrl = RPC_ETHEREUM + RpcUrl = RPC_ETHEREUM, + ChainId = 1 }; } @@ -67,4 +69,4 @@ public static class ChainService RpcUrl = RPC_ETHEREUM_GOERLI }; } -} +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Services/Gmx/GmxHelpers.cs b/src/Managing.Infrastructure.Web3/Services/Gmx/GmxHelpers.cs index a193df0..604a029 100644 --- a/src/Managing.Infrastructure.Web3/Services/Gmx/GmxHelpers.cs +++ b/src/Managing.Infrastructure.Web3/Services/Gmx/GmxHelpers.cs @@ -1,21 +1,26 @@ -using Managing.Domain.Trades; -using Managing.Infrastructure.Evm.Models.Gmx; -using Managing.Infrastructure.Evm.Referentials; -using Nethereum.Web3; +using System.Globalization; using System.Numerics; +using Managing.ABI.GmxV2.Reader.ContractDefinition; +using Managing.Core; +using Managing.Domain.Trades; +using Managing.Infrastructure.Evm.Models.Gmx; +using Managing.Infrastructure.Evm.Models.Gmx.v2; +using Managing.Infrastructure.Evm.Referentials; +using Nethereum.Hex.HexConvertors.Extensions; +using Nethereum.Web3; using static Managing.Common.Enums; namespace Managing.Infrastructure.Evm.Services.Gmx; public static class GmxHelpers { - public static decimal GetQuantityForLeverage(decimal quantity, decimal? leverage) { return leverage.HasValue ? leverage.Value * quantity : quantity; } - public static (List CollateralTokens, List IndexTokens, List IsLong) GetPositionQueryData(List contractAddress) + public static (List CollateralTokens, List IndexTokens, List IsLong) GetPositionQueryData( + List contractAddress) { var collateralToken = new List(); var indexTokens = new List(); @@ -68,6 +73,7 @@ public static class GmxHelpers { priceBasisPoints = basisPointDivisor + allowedSlippage; } + var test = Web3.Convert.ToWei(price, toDecimal) * new BigInteger(priceBasisPoints); var priceLimit = test / Web3.Convert.ToWei(basisPointDivisor, 0); @@ -83,20 +89,20 @@ public static class GmxHelpers internal static List Map(List orders, Ticker ticker) { return orders.ConvertAll(order => Map(order, ticker)); + } - } private static Trade Map(GmxOrder order, Ticker ticker) { - var trade = new Trade(DateTime.UtcNow, - order.IsLong ? TradeDirection.Short : TradeDirection.Long, - TradeStatus.Requested, - GetTradeType(order.IsLong, order.TriggerAboveThreshold), + var trade = new Trade(DateTime.UtcNow, + order.IsLong ? TradeDirection.Short : TradeDirection.Long, + TradeStatus.Requested, + GetTradeType(order.IsLong, order.TriggerAboveThreshold), ticker, Convert.ToDecimal(order.SizeDelta), - Convert.ToDecimal(order.TriggerPrice), + Convert.ToDecimal(order.TriggerPrice), null, "", "" - ); + ); return trade; } @@ -136,4 +142,119 @@ public static class GmxHelpers _ => throw new NotImplementedException(), }; } -} + + public static string GetRandomAddress() + { + var ecKey = Nethereum.Signer.EthECKey.GenerateKey(); + var privateKey = ecKey.GetPrivateKeyAsBytes().ToHex(); + var account = new Nethereum.Signer.EthECKey(privateKey).GetPublicAddress(); + return account; + } + + internal static MarketPrices GetContractMarketPrices(List tokens, GmxMarket market) + { + var indexToken = tokens.First(t => GmxV2Helpers.SameAddress(t.Address, market.IndexToken)); + var longToken = tokens.First(t => GmxV2Helpers.SameAddress(t.Address, market.LongToken)); + var shortToken = tokens.First(t => GmxV2Helpers.SameAddress(t.Address, market.ShortToken)); + + return new MarketPrices() + { + IndexTokenPrice = ConvertToContractTokenPrice(indexToken.Price, indexToken.Decimals), + LongTokenPrice = ConvertToContractTokenPrice(longToken.Price, longToken.Decimals), + ShortTokenPrice = ConvertToContractTokenPrice(shortToken.Price, shortToken.Decimals) + }; + } + + private static MarketPrice ConvertToContractTokenPrice(MarketPrice marketPrice, int tokenDecimals) + { + var price = new MarketPrice(); + price.Min = ConvertToContractPrice(tokenDecimals, marketPrice.Min); + price.Max = ConvertToContractPrice(tokenDecimals, marketPrice.Max); + return price; + } + + private static BigInteger ConvertToContractPrice(decimal price, BigInteger tokenDecimals) + { + // Convert the decimal price to a BigInteger, scaling it up to maintain precision. + BigInteger scaledPrice = new BigInteger(price * (decimal)Math.Pow(10, (double)tokenDecimals)); + + // Return the scaled price directly since it's already adjusted for token decimals. + return scaledPrice; + } + + public static Ticker GetTicker(string marketName) + { + try + { + var indexToken = marketName.Split(' ')[0]; + var ticker = MiscExtensions.ParseEnum(indexToken); + return ticker; + } + catch (Exception e) + { + return Ticker.Unknown; + } + } + + public static decimal FormatAmount(BigInteger? amount, int tokenDecimals, int? displayDecimals = null, + bool useCommas = false, string defaultValue = "...") + { + if (amount == null || amount == BigInteger.Zero) + { + return 0; + } + + if (displayDecimals == null) + { + displayDecimals = 4; + } + + var amountStr = Web3.Convert.FromWei(amount.Value, tokenDecimals).ToString(CultureInfo.InvariantCulture); + amountStr = LimitDecimals(amountStr, displayDecimals.Value); + + if (displayDecimals != 0) + { + amountStr = PadDecimals(amountStr, displayDecimals.Value); + } + + if (useCommas) + { + amountStr = NumberWithCommas(amountStr); + } + + return decimal.Parse(amountStr, CultureInfo.InvariantCulture); + } + + private static string LimitDecimals(string amountStr, int displayDecimals) + { + var parts = amountStr.Split('.'); + if (parts.Length == 2 && parts[1].Length > displayDecimals) + { + parts[1] = parts[1].Substring(0, displayDecimals); + } + + return string.Join(".", parts); + } + + private static string PadDecimals(string amountStr, int displayDecimals) + { + var parts = amountStr.Split('.'); + if (parts.Length == 1) + { + return amountStr + "." + new string('0', displayDecimals); + } + else if (parts.Length == 2) + { + return parts[0] + "." + parts[1].PadRight(displayDecimals, '0'); + } + + return amountStr; + } + + private static string NumberWithCommas(string amountStr) + { + var parts = amountStr.Split('.'); + parts[0] = int.Parse(parts[0]).ToString("N0", CultureInfo.InvariantCulture); + return string.Join(".", parts); + } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Services/Gmx/GmxKeysService.cs b/src/Managing.Infrastructure.Web3/Services/Gmx/GmxKeysService.cs new file mode 100644 index 0000000..bb7bafd --- /dev/null +++ b/src/Managing.Infrastructure.Web3/Services/Gmx/GmxKeysService.cs @@ -0,0 +1,112 @@ +using Managing.Common; +using Managing.Infrastructure.Evm.Models.Gmx.v2; +using Newtonsoft.Json; + +namespace Managing.Infrastructure.Evm.Services.Gmx; + +public static class GmxKeysService +{ + private static Dictionary GmxKeys { get; set; } = new Dictionary + { + { + Constants.GMX.Markets.BTCUSDC, + "{\"isDisabled\":\"0xe8b3327a4f36a032e9c4b5c62bd478f8f7dcb358be17e031c08af181054f89e9\",\"longPoolAmount\":\"0xc97d6ba9e3cbf19c2bdb3eb671109e97cbbb0c4684ac5ea9b34fffbf3fff84fb\",\"shortPoolAmount\":\"0xf86d8be1f8a7b9fd99471eba5c9d770bce1c6723a038f4e35b333abbf267340d\",\"maxLongPoolAmount\":\"0x7122c7aa3613333d4613df9fdd649d0511e9d406f8d4838c575f262602f06f4b\",\"maxShortPoolAmount\":\"0x259df783d9c78073575ba824533a203c2b15679290cfdbd6d06482fc9a437a86\",\"maxLongPoolUsdForDeposit\":\"0xc36890864be1aa564a33fa69c3f92a3929eb4a1f6dc4afe72cc76f259ac0d4e3\",\"maxShortPoolUsdForDeposit\":\"0xf10df680fbf91b3d5a8216c8737c44023628cab2e14b178a13d20e61f5c8ea0d\",\"longPoolAmountAdjustment\":\"0xdd4ac48c161ef4a0be773485c18d339102c339a792eb415c50b34a80ee0453c2\",\"shortPoolAmountAdjustment\":\"0x61078d37b8ee9462bd2ea0e47d88e5b3a604247e6e0df43b21f154627bf3d503\",\"reserveFactorLong\":\"0x212d36de7b523df4b74555395b48e3323e7c6996e14165af6bd1ec54cde3b963\",\"reserveFactorShort\":\"0x59fb037f77cb858eca81fce0ead59189a60f57100848236472cb0bb623908a82\",\"openInterestReserveFactorLong\":\"0x7b6b8e403bb28910630c124ce8abc1c3885f04235fbc4eedc3fdb7375fb43acf\",\"openInterestReserveFactorShort\":\"0x095645de317d0983f941af6c7aa6f99baa01c7c649ab23a4c262d6c3714fc9b5\",\"maxOpenInterestLong\":\"0x2d0f2aa0e0538d35e4e2e963e33bec9e130cbefe2075d1c6d28df793dc7ad81b\",\"maxOpenInterestShort\":\"0x1591052ee37191368f8285bffabb9d1f6bdb81b52ea6f081f64210796081201a\",\"positionImpactPoolAmount\":\"0x79a3eb6b9901a75f1cf9795d572f8a017efacc3fd9d0a33a2c4c985959e9b4e2\",\"minPositionImpactPoolAmount\":\"0x8d94be2ecf1838e2c51cb28ddd6c5e5220086a571e002797988215fbcc5bdcd0\",\"positionImpactPoolDistributionRate\":\"0x8291b8d9e134ceb815a21fc07c99eb3a4342a5d423aaf5eed47427adbe61dba4\",\"swapImpactPoolAmountLong\":\"0x6dd5bb78cbd8ca664f5ee0c98697e19e163140f3ddeeea9141360a248ad44a84\",\"swapImpactPoolAmountShort\":\"0xda76160e7e77fef4f1bfcaa60a25da06273e0f8dd3b4448d18c333c148e58246\",\"borrowingFactorLong\":\"0x0c2b889c478bf94e61f69bfaf7b92695f8093c7f39c4416a8edaae0eba0757d2\",\"borrowingFactorShort\":\"0x3c138f46bb8ca079ae96fe39d12b231097e06d4274aac5c7148aaa31e4767f46\",\"borrowingExponentFactorLong\":\"0xdd05f2297757028494ed3bf7bba51d78bedeeb3ca5ece71e061e181f0c3bee8a\",\"borrowingExponentFactorShort\":\"0xefd22f59cbb8e2a49318d3de733a1dd1b8b41d034863c3470235b1f48bb23777\",\"fundingFactor\":\"0x00d05e5bdb2359dbb44dadeabf027e9d230b2dbbac2c82106932adcf8eec14ec\",\"fundingExponentFactor\":\"0xd346bdafa3b7d9c6959acf803206ede73356773e4a1dfac050614c57217f0fc5\",\"fundingIncreaseFactorPerSecond\":\"0xa71b7d4e7d5f3a3c7b280543d8e6b1c0b7ac23ded88ef0943bf0a74b046af521\",\"fundingDecreaseFactorPerSecond\":\"0x07ec2b7b55cb85a3be6e482457e544ce3a7d66dbda0d0c73902225eae4afb159\",\"thresholdForStableFunding\":\"0x400e11e7adba13d2a50d03cb7f4b261c2d7e3bcd61588252f9a719f32db1c4ab\",\"thresholdForDecreaseFunding\":\"0x31e03353c4a7e54a8430dbd1f501eab6969cabe5d690d6fbd2fe388e2882bf37\",\"minFundingFactorPerSecond\":\"0xe46384ec4d6fedd685e99a5c4b1ac3fe5cd7e422e83337f9b29b6332fa65ae89\",\"maxFundingFactorPerSecond\":\"0x4f7dc082dba2aa22249007c05bb4928623521833aa4d2993e150a90fbfa114e3\",\"maxPnlFactorForTradersLong\":\"0xaa8e9afe1a8ae000f057254aec33b0b038be8079bfcb184ea356dc917326331a\",\"maxPnlFactorForTradersShort\":\"0xfa31ea001f0ed9b3fa3d2f1deea9bf79493c211600b8f203f50dd95591e516da\",\"positionFeeFactorForPositiveImpact\":\"0x4b9bdba3ff745320751079b586d3c4f84cf87f7c3e79e39f1158b174c405cf67\",\"positionFeeFactorForNegativeImpact\":\"0xdd207fe702bdff93bb945786cd5d98c3259d3dbd7cf37c63c161714e938ba434\",\"positionImpactFactorPositive\":\"0x57f9be924ba0f2c763e255396dd8fdd27b3ff06fcde5fee6018b4ed0292eae0a\",\"positionImpactFactorNegative\":\"0x3b778e8ac16a3dc330bcceed5db97c4b853b0a696209858f5dd19591a1b3566e\",\"maxPositionImpactFactorPositive\":\"0x825201d62a913028fa553544c19e6e9e45885502ad94b3e9ccb79e2911daf669\",\"maxPositionImpactFactorNegative\":\"0xa0145413fea58392aad72c6aaba18435a1b6e00ff9346d8418c207d8b3f0ad1d\",\"maxPositionImpactFactorForLiquidations\":\"0xb7ab4d8339ba5934253d04b55d4141017d73b9801df9a8810ea10d1c3ea3fc6f\",\"minCollateralFactor\":\"0x0edf8a0fa860b71e689cfeb511c6b83c96d23eaf71c6f757184d23954fcb3169\",\"minCollateralFactorForOpenInterestLong\":\"0x18ab1bf4fdef11804a1212c94ba4ed35498ef5942b3d385fc9c33f933f17f60d\",\"minCollateralFactorForOpenInterestShort\":\"0xf5cca0ad2e4b2341858ed82455e0d4e3e2dc289d93124403d67c010ca53b62de\",\"positionImpactExponentFactor\":\"0xbe60fcfd99ab63b9f7c2a82da310aa88958ee0146cbc9ea008d8cc16a97ac70f\",\"swapFeeFactorForPositiveImpact\":\"0x695ec0e29327f505d4955e89ec25f98741aedf22d209dbc35e1d2d61e683877c\",\"swapFeeFactorForNegativeImpact\":\"0x6805e3bd65fab2c6cda687df591a5e9011a99df2ff0aa98287114c693ef8583e\",\"swapImpactFactorPositive\":\"0x79d8fe854154b43d003a20314c803b78ec01391248008659c0c8e998e866d7d7\",\"swapImpactFactorNegative\":\"0xe8438cfb97aef79fdebd4e948dd086e7c042ae7b47a2414454f6b691ebcc2419\",\"swapImpactExponentFactor\":\"0xf64c72f0c430da1f9096daec486ac3ba00752a0b600ce602ae5bd0a62c004145\",\"longInterestUsingLongToken\":\"0xaaf79028722fd65633cdf994a4a10b0bd349761062506c4bb6a0489956ba5d3f\",\"longInterestUsingShortToken\":\"0x40dad997139c47372d1ae990ecf25623dee34dc65401ed3aad14f344f4577e61\",\"shortInterestUsingLongToken\":\"0x0e0453188aaba28b788ab0a97ff05543c38cf88d2742cc85f689957e41c8ab39\",\"shortInterestUsingShortToken\":\"0xe95b181e49c851802d3ad428d2fe4597e4e2cf2f44001115ba44292ae3ba220a\",\"longInterestInTokensUsingLongToken\":\"0x75296845b36a5901aa4c9ce4caad19ff5fb7eb1c419028af5982fc395ed67da4\",\"longInterestInTokensUsingShortToken\":\"0x786f29c6644d5e68f2f0e30700df9f6e4cf594da31bb013c59fd350ec7173e7d\",\"shortInterestInTokensUsingLongToken\":\"0xc520adeafe7df0c66d377df2616c65cdef70b66feff02aef7ea572e19ec036aa\",\"shortInterestInTokensUsingShortToken\":\"0x37d30c2219f77c5b3ded6368ea2aac4fee0f693146fef8066e78807bb0b1c59b\",\"virtualMarketId\":\"0x30728fe6602aed966d65c62d392bcc1a4f02e155ce82cbdcae778669fc35a83d\",\"virtualLongTokenId\":\"0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.ETHUSDC, + "{\"isDisabled\":\"0xc45b95e59c3189b1ce34bf8e690a9dda3eee932f3855117d789dd298ad364e5d\",\"longPoolAmount\":\"0xff0b4cfe8dcdf388c21daa548b07a401cf7ee7c64087f47b0849009486ba0af4\",\"shortPoolAmount\":\"0x5b04b22d97863d6484a7ad72fd6b6ffbb1803bce27f5d839aa97def98d8604b1\",\"maxLongPoolAmount\":\"0xb3ea1fd4fd2a5705a0befaaf3aeaf8e3b13274e9a7b42ac29adbcff4e8ea0d36\",\"maxShortPoolAmount\":\"0x09a0354b47ce26b937a9377bcf171768a4144b3da3e3678fd267ce0c1409fa57\",\"maxLongPoolUsdForDeposit\":\"0xe1ccaff6899c584cd1afd51bad8c0dee84482a909301836a25c66f0d2628c210\",\"maxShortPoolUsdForDeposit\":\"0xadd2da2afb65847d22312497be62a85c93bb6c09299cb3fbfd70349a2a075005\",\"longPoolAmountAdjustment\":\"0xe06fc4c2a975bfa986d0af41a3dd02fe81dd7c7501be7f2fbb51ddfa88a5077b\",\"shortPoolAmountAdjustment\":\"0x645797122396cbc1adae18dd7be3de0c27d1b57c5717d446aaa59fd9233b05f7\",\"reserveFactorLong\":\"0x337e24e6d04ed216d312a36582f1e09658323e4e976607339857bf38abb48a35\",\"reserveFactorShort\":\"0xa40138b1217ca2863887e5feb34c72bb7c57ad5ae301eb52c22eb5a964438bac\",\"openInterestReserveFactorLong\":\"0x75f7ae4e1510eb1220300b6e25ffb4c58ba622674d0930d0fd71432e28e585f5\",\"openInterestReserveFactorShort\":\"0xae28e9d759b5f7abecf4f28d6916332cec352a27b3e7cfd170c017e74846932f\",\"maxOpenInterestLong\":\"0x4c8ff2fed94b668a66292ecb4056bb24b1de2ac1eaea0f8b38e6d815a3fe21de\",\"maxOpenInterestShort\":\"0x36689f489df04572f96026620d7f83ce953290e1b8476b7139928fc5f0a18cc7\",\"positionImpactPoolAmount\":\"0x4e8abdebb1ac95be23a129261980f4704835530793360d86a6d03c3d3044bc58\",\"minPositionImpactPoolAmount\":\"0xc6bbcad1d7e03c0876394dd4048039ab015cf5ac24edea497df190f31c95e6f3\",\"positionImpactPoolDistributionRate\":\"0xa578a514c09c7ff49cc21a599d66f253e7d007eff4381636a4297c76509a8758\",\"swapImpactPoolAmountLong\":\"0x485c0c3052f29694131e08336acc0756b4fc4e45bb30758f8865f1c48aefef2b\",\"swapImpactPoolAmountShort\":\"0xdead9e0b6458c6693fca20ec40b59f77f0be0fe0c00d7e3d82937c1f8281136a\",\"borrowingFactorLong\":\"0x98ed0ffd40ee93feef46cbae636a721ecd2255bd3f6a5180f9f774eb8c5713b7\",\"borrowingFactorShort\":\"0xc1d373679a8e8c04f741edcc53d137842adb375a026023b915e7c5aad7c7ea40\",\"borrowingExponentFactorLong\":\"0x84b7c55ec02bc8ec25412c045042c5d71c7216294b171dee34a8eb78b75ee7ca\",\"borrowingExponentFactorShort\":\"0x11e3c879f6e1addc7edec898778a860ca4dc0700fed538b462070f8a82d5b10c\",\"fundingFactor\":\"0x3b954bc1862c9eb11b5cc0e7343a561c595b795841642199567f3884e214d3ad\",\"fundingExponentFactor\":\"0x3fb09c259a63785c1a8a0a262a9cbf13253c88a6ea9ec88ddcd1118fae5c8d02\",\"fundingIncreaseFactorPerSecond\":\"0x9c70d42f70b74c1c8d3f33ff727d8248faaec0d6ee9fe03173dbb4160ed8180a\",\"fundingDecreaseFactorPerSecond\":\"0x199e505f4cda86d9e3ae7c8989632d7d182c9ab6ecfb408e274b933bcf7ac358\",\"thresholdForStableFunding\":\"0x855e20de9e6caa9a092bde888c28ed70f72e693eadb629d28a685b71f28181ac\",\"thresholdForDecreaseFunding\":\"0x54d309c97738e3ccdf4c95e79d0415d9e6d90ce7a4a81596832458a0eac48f78\",\"minFundingFactorPerSecond\":\"0xe2aeddbe8208ff69a91e8dda02ed2f0f7c0d6deed966af3400388ee238a9e49d\",\"maxFundingFactorPerSecond\":\"0x424c5a83737ee1e6ae9a863e64a6772ad7d591da777c4774b2484370d927b97a\",\"maxPnlFactorForTradersLong\":\"0x04e55b2a6b73d4cb774accdc2d7f0de0f4aa8a8ae6a084be73a43ca8f17f3586\",\"maxPnlFactorForTradersShort\":\"0x02badce9cdb1639287015c8989426be5963e2b0c8a41abd9723284ebff7f2e9e\",\"positionFeeFactorForPositiveImpact\":\"0x914f66951bf2600e37ce4f2e2fd45983c6d842e40cda838267764e38fbad3594\",\"positionFeeFactorForNegativeImpact\":\"0xe1a9164e4ffd3e27713953d91592d29e5e51e16c1df48725a919fa8785b184af\",\"positionImpactFactorPositive\":\"0xb2d34408902891f7a1ffb5a66609a793e142ed6dffc6d7c0c8b9b9bc6d6dd380\",\"positionImpactFactorNegative\":\"0x68cc8c831904230bbfe2ba8d3ee911509896dac5b48cc45c1323718a54fb4016\",\"maxPositionImpactFactorPositive\":\"0xc230e1e4d328166be2c9c1e775203c706519bd3f17777d460f0bd159e2680920\",\"maxPositionImpactFactorNegative\":\"0xf0304143d99ab54dd4a90b22df08fec271f1c69fc31cdcbdbcaaf2f3f9abbe90\",\"maxPositionImpactFactorForLiquidations\":\"0x2d8a11f53ea0e4da886046922afbdaf2f98111c2c3617ce8d53320e5368ece53\",\"minCollateralFactor\":\"0xcf1cefe1a11576531900922002113a6cf623823d2c813a4534c5d181976450ae\",\"minCollateralFactorForOpenInterestLong\":\"0xbcf38cdb77fa9cb02787c89b5b616dc4d91337a400795d617a2580ae49a6e209\",\"minCollateralFactorForOpenInterestShort\":\"0x635ce4b3864fcc94a0eb30789ab0eedb1724ed4bb51ebad2fa2e9a2bc051f60a\",\"positionImpactExponentFactor\":\"0xd3fb6cf1d6db9b533ada6f4f3e7f52adf7fa871788e67b80e7ae6e63811017e5\",\"swapFeeFactorForPositiveImpact\":\"0xd795542d99d4dc3faa6f4e4a11da9347d4f58fcfce910ccd9878f8fd79234324\",\"swapFeeFactorForNegativeImpact\":\"0x4a0e3a43fc8a8e48629f6d4e1c0c1ae7098a35d9834cd0c13446fc2b802a24a7\",\"swapImpactFactorPositive\":\"0x801066104b68a8504d32a319a865f5010a763e0b3f4372e0b03f3fe87ab77eb7\",\"swapImpactFactorNegative\":\"0x1a282191426197cc0dacd8fdca48acc252d354470638b44ca410893f9bc8d576\",\"swapImpactExponentFactor\":\"0x62f7b6ed5b17f35d4d42eb6abcaa00b07af41f4694af6f491f9bb5b31911af3e\",\"longInterestUsingLongToken\":\"0x39b1ba9baf45e2c11e202da432a2c21fa5d136cc112015896e024c20c339a6ea\",\"longInterestUsingShortToken\":\"0x81fd350222849df2df97529b003ab475f1bb887e8bc0efd91bd68cec68ab7671\",\"shortInterestUsingLongToken\":\"0xc00f0c27b5efefbbe1eb63ae8d2f35450f7ac54fe081cd0429f28274a954a341\",\"shortInterestUsingShortToken\":\"0xa2e49070d1a92211074fd9493c4010ad1ea0e07fe42d1d6853c845dd5ce91212\",\"longInterestInTokensUsingLongToken\":\"0x731d0e3f099505d38d8b4bd317293986c5d508b5794e89dfcd8cf21db057eef9\",\"longInterestInTokensUsingShortToken\":\"0xb29358c7b4cec591d8617ca7ed8db509eaa1138449e6aef8b85fd0d3b8bebb28\",\"shortInterestInTokensUsingLongToken\":\"0x2d362c965a171fc310ec6aeaddf9af5a996e26ad79dc0010675dc6808889eeef\",\"shortInterestInTokensUsingShortToken\":\"0xb2e38bb49cdd8a464a80bc33b668e72c105d3fee146c9b26d644cdbd22ed7dff\",\"virtualMarketId\":\"0xa8cd287a5068df6cf03223613f14a133ec7b31a50b305ee6091c89c1dcff904f\",\"virtualLongTokenId\":\"0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.DOGEUSD, + "{\"isDisabled\":\"0xbd2e133e3672c29fadb887a377cb41ca4421b484d6311d6c235deeda77cb1122\",\"longPoolAmount\":\"0xa8e03b2af1dd708da24d558140e3cf2eb06c2af2b4ac49be4ad437c5a3155045\",\"shortPoolAmount\":\"0x602b4f3bcc5b505af0f2982d736f4485b10d1def4481ecbcb11919cd7689b03a\",\"maxLongPoolAmount\":\"0xf2a19f0fc95d8e9aa18733b84e19f222c40fb2436447749226fdf3876b702299\",\"maxShortPoolAmount\":\"0x014b579a6a16241a955aaf663427b7815aead5ac8dca1d10409e00cad7c1335e\",\"maxLongPoolUsdForDeposit\":\"0x6f0162d6712686b9d3f54e9d64ea88b4b96d647fd6f1f97c8ea557c8d39c2530\",\"maxShortPoolUsdForDeposit\":\"0x081e26b0996713b0206c3020dcfaf76f5226deb0c48b0cbb81397174cd7ff5c6\",\"longPoolAmountAdjustment\":\"0x7369c7708e79b0ee8d070e6a46897271b7725ed5239ab4479ff67b7b2281fceb\",\"shortPoolAmountAdjustment\":\"0x49e0703ccacdfee9505137868f65437507b52a083997532dcdb7924f48453e80\",\"reserveFactorLong\":\"0x5c150417d919fc4cee0a0b25c630ca857961aed6f81a382affa9502954e66e24\",\"reserveFactorShort\":\"0xcbe6caba57585e15b5512813e264e8d2b7a78744958cac0a5d6654daaa6d3571\",\"openInterestReserveFactorLong\":\"0x5ad9b812f3f6fedbcea95e0d21f63e925cad5721d972ed501aa01ec32df12816\",\"openInterestReserveFactorShort\":\"0x1c658f6568aabc862c99c76f349f92e75ec87ca01da9ffc24bbd985289f40682\",\"maxOpenInterestLong\":\"0x3041ed43d6857b170418d422690141101116cec7a2824836c575e842233d1a23\",\"maxOpenInterestShort\":\"0x08f728f1196210ae39b3d165095b3fd4d58c14f7d60da07680c78708fa913cae\",\"positionImpactPoolAmount\":\"0x10d8f769919bc8b7e75072bfd103562a8452a52a3f1e7aecb59578ff6a5e4eb6\",\"minPositionImpactPoolAmount\":\"0xe8363959399e7ed2ec6b63691fe5511f9cb8156397631351b385a82a6efe8a1b\",\"positionImpactPoolDistributionRate\":\"0xcbb955da719fe4d90dce949d1e66be6d665e26b0b30f115ec787c797a6c697e9\",\"swapImpactPoolAmountLong\":\"0xfb895ea8c974487b0445bac1210d3f5d81cd424c290a16ab9f5ab802aadb34bc\",\"swapImpactPoolAmountShort\":\"0xbbca9db772695c7f950f972d4f4d85ef98509f4dd37a7512d6cf86e941c4db06\",\"borrowingFactorLong\":\"0x03a19849efba94a7805df96b8cf060e61bd676323ede4b0bab543eca7c3ca4bf\",\"borrowingFactorShort\":\"0xa488800ae9c99107499bcc73e3ec0bd81fc5e9b0c32ff2a31887a2b642af9aa5\",\"borrowingExponentFactorLong\":\"0x7ec7b39d7580212a9992daa1ca94ada070074c4f11e8b03e181b48bb3c9d9244\",\"borrowingExponentFactorShort\":\"0xf57fa02528a5676fb0e8d757a6964fb8e43c82faddba567dfcbd298912775aa6\",\"fundingFactor\":\"0xabd27d424744cfdff88f1484d7ab1e3116505624d5741a914ccf4284092cf472\",\"fundingExponentFactor\":\"0xd54767b8e1cacdc1d04a3de4709e128cd06ff38f7eb3a447326741749ab5e364\",\"fundingIncreaseFactorPerSecond\":\"0xa7692ef7d74fc7f78d502ea742a8d04b34cbc74f2fad14c6babf252767783f9e\",\"fundingDecreaseFactorPerSecond\":\"0xfc06e588a4c1dc1e624541966bdf0cc6b5bc2ff00e7e201afaca1ceff150411a\",\"thresholdForStableFunding\":\"0x4b051585056ffc8bc44829078f55d97370725a19091673cc367b079f54b88770\",\"thresholdForDecreaseFunding\":\"0xa280e7d186cbdd93b65ae3b91dc87a69ce96ef130acd6dc13e88bf743f279a84\",\"minFundingFactorPerSecond\":\"0x99b77bb6445d22f4ec498c19823bb28c3e2369d39cce3e65d10c786bb6ac8c3c\",\"maxFundingFactorPerSecond\":\"0xf9eebd782b6379771362c4bac105681bfa6f503b704718bcad8352c0de19f688\",\"maxPnlFactorForTradersLong\":\"0x4ad6b8b2ba952450663a8d5bf31ee14ed32607a478d6cd7294fe55a4a4ef90d2\",\"maxPnlFactorForTradersShort\":\"0x6c1fad48bb23f5fbd6f258f605f43fb3ced23cc7af730b7a7b4e8f05687c6939\",\"positionFeeFactorForPositiveImpact\":\"0x0a91a7ca843ae3371debc48312c71f1ed0ae40a087d2626c6c43fd86002de08c\",\"positionFeeFactorForNegativeImpact\":\"0x8e901273173d5fd00df54a257dc627db643127f496f5e187609a3210ba484b27\",\"positionImpactFactorPositive\":\"0x0c641238e5258665a42ece9c3874c8c5e0d627522aaf8c60cf0bbc5e64c5c5d8\",\"positionImpactFactorNegative\":\"0xc4bfa605ffb9f50e0f18e0399ccdac8f6fe971a739a91a6a726517653177e0e7\",\"maxPositionImpactFactorPositive\":\"0xef102c726b741df58e10ba28b7f783ebaa6c2076f27b615f9d21a4edfba791c1\",\"maxPositionImpactFactorNegative\":\"0x98bec1ab62f465a2a83119494f5f21c753b0527908dc422f67220e613c532771\",\"maxPositionImpactFactorForLiquidations\":\"0x5fbccb68c5d1de0fd2d39c7a60110688e10a969992910911b5a7ff5461a7fddd\",\"minCollateralFactor\":\"0x832e125ad1a59ec76a096a906db0abca415fae50215a04713ba7d26b806170d7\",\"minCollateralFactorForOpenInterestLong\":\"0x47ece80b5a8441270dc51b704ac241ee205157d6e79a17ec9a7a78d5a1c405cc\",\"minCollateralFactorForOpenInterestShort\":\"0x3ac33ae245dfa87c5023e2ada76a30d63b5d4a462868f2df4cf285c450c055bb\",\"positionImpactExponentFactor\":\"0x8185adf991484ed9941b9d357c45b4aaa04298bf56481c3ac20410b14c6e0426\",\"swapFeeFactorForPositiveImpact\":\"0x67a550e4fa661b4a6f6f7a4f2f276a0dac54970e784fe703031ee403f04b4665\",\"swapFeeFactorForNegativeImpact\":\"0x5f0f923b62e09d2ebb7df2b4b505d5eb8843b57816cb1fc36090965cfa939bfd\",\"swapImpactFactorPositive\":\"0x0538cdd47f4c430b1fcb396d2d4b81d55cc0fb604620d2cc1d1092d9a3d13b4a\",\"swapImpactFactorNegative\":\"0x7eb5c1dc27cc686df401fe1cc4a36537b363bfaa4d94f77d6fe72fd5ede61d08\",\"swapImpactExponentFactor\":\"0x7e561221c0f8fa07e9ca813aca94becde6d2fc0feacd84f50cadde2b177a4310\",\"longInterestUsingLongToken\":\"0x803e42d772720207636ccf28de001aecd7371f2637e573a2f5be344299314b5b\",\"longInterestUsingShortToken\":\"0xbf2755345de06cb8945a442f03949781afa66f96f62b648407b05979de96c5d3\",\"shortInterestUsingLongToken\":\"0x8177813dea0c1ed7e515419771d77c81367701b12fe97df996987ba4a86783f3\",\"shortInterestUsingShortToken\":\"0xb629b35d1f81768d1c71056fae4c6c4ec419d9fa15001ebbfdad29e7d030d522\",\"longInterestInTokensUsingLongToken\":\"0xd10a03b699e9f8ba6eb2c7a507066218bbb1a50d003358d9ddfde7d31724c113\",\"longInterestInTokensUsingShortToken\":\"0x96ae498de17f8d497060db437ccb9e755b7b0fbd74ffdbe07dc9c6a8fb57777a\",\"shortInterestInTokensUsingLongToken\":\"0x02bde765412e10447c77ca071a23d087450f9b0b41b952bb25462de51a565f1f\",\"shortInterestInTokensUsingShortToken\":\"0x00a167338fe44d05cbd7cb486e7081397b7d688081e2233edd840df13688c7ce\",\"virtualMarketId\":\"0x6fb554632adada3dfa9cce73bc454e855fb9969ebce7a35ba3f266de425e731e\",\"virtualLongTokenId\":\"0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.SOLUSD, + "{\"isDisabled\":\"0x382490eeea8df42b09a4e6c2c7f5720784be8b95b8de3ba960c8eb2bdc8123a5\",\"longPoolAmount\":\"0xbfbecba187570cb9f1b8c4784e5a1a7e11a501327737473ef2c9572d453a5752\",\"shortPoolAmount\":\"0x1a46540d4cd17be2e83e461a3760b258c4206a9199a747b9c9159f450bdfc031\",\"maxLongPoolAmount\":\"0x8d5ca4d7a73c2fbe70cb54d71b5cab887ddee76eddbaa922a1e870435fb509d2\",\"maxShortPoolAmount\":\"0xf875d8d0b071114de2992c8ee8e5aa229989807fea4381c61f24e283e17a5ac3\",\"maxLongPoolUsdForDeposit\":\"0x2dd782cf4b4a21869043889e20716913fa67865d30972b728f3fc8d9472fc2ea\",\"maxShortPoolUsdForDeposit\":\"0xc3dbd43e14db059345a7549ae8eb1c1cbb2573ef281bd2dfe0b8db4331047dea\",\"longPoolAmountAdjustment\":\"0x3cb8477be65494bb8d679f5a18d3c07678f319c3be7e7ebfaa5c0369ec1dbe2b\",\"shortPoolAmountAdjustment\":\"0x071eb9e378cb51e4acb31fbd6f6c44f5776b5682a5f2d6f4267c3b43109d9b66\",\"reserveFactorLong\":\"0x7c6124ff9bc18002a0adcf45dffaa7f5a3d1509d909a2d3ca3ad57be9d1714c9\",\"reserveFactorShort\":\"0xfe05d80ac48b6d31d2d13310166dffcca3ca0f335509331d70f1bad1283456c9\",\"openInterestReserveFactorLong\":\"0xdca9e9bc9359f1fe12916304aa46260a002d669075c9b3158bc6c14e02665ef3\",\"openInterestReserveFactorShort\":\"0xa8dde5202490af598fef361405f97b635c435c5ed0b4fa078c7c2ee72f99cd35\",\"maxOpenInterestLong\":\"0x75856eea766ea24217827b4360c234266b13c6174c91d8261f80ee2e123941ee\",\"maxOpenInterestShort\":\"0x78dc8d9e0e43a773d292b0742af47bd875a66f0da504f7e81a06fb8ebc72589c\",\"positionImpactPoolAmount\":\"0xd3df1d152a54618cac79336662681544a3cb9d5cb8a512a5715ab41379150131\",\"minPositionImpactPoolAmount\":\"0x958ec97500cc8495432f910ddd6a9d1128b0b6dfeb9212717d6cc31b1a1b23f8\",\"positionImpactPoolDistributionRate\":\"0xf6f8b595477ebdb70bd3806080e272cb4adedf66d18fefc9269cfda5ee65f5b8\",\"swapImpactPoolAmountLong\":\"0xc3ef825ca52a4ee45b978ba14ad8f6c54074630c4be8b67ced0514b9681361f9\",\"swapImpactPoolAmountShort\":\"0x953134e3672ddbdbb1fc1b26352f7dfa8a146a593ca08471bf33c92c6daeab2f\",\"borrowingFactorLong\":\"0x9704bf350ed9b2d84a024441a20053a75e4334e3462097aa2863174f4257f539\",\"borrowingFactorShort\":\"0xbdc2b9c3469227f42444b4ad9a916c416f206a7ae82b1d6bd0c5c822501b7039\",\"borrowingExponentFactorLong\":\"0x4f0779bd87e51ccce25bcc83555e731acc63b72df0f54d6b6caa4286bfe69618\",\"borrowingExponentFactorShort\":\"0xab1e5f2a0116f18486b78d23610a0ea0130246c6fa8f28ef3606f14a98244f56\",\"fundingFactor\":\"0x4f16cbd424ae61016b93b803007afea10f4c5c609f608d1f3a08ceaef121ffbc\",\"fundingExponentFactor\":\"0x129cd42ccb4c4bf9a8af07f304e4f0ff072ac89aa3a0c8e93ed505b28ea56c23\",\"fundingIncreaseFactorPerSecond\":\"0xafd77132773fc6a8732648296a0e45529217b075842464a56a88bbdc424934ac\",\"fundingDecreaseFactorPerSecond\":\"0x9e34e55a97b4085084afbebaeed51d8024980e378d3425207b8b14a87f0fbe84\",\"thresholdForStableFunding\":\"0xf936ab18a3e17efa978c9fdf5365c6c62f40b583da963f75c773683982553fa0\",\"thresholdForDecreaseFunding\":\"0x69f642f50ebecae1309230d26e63ebc2abae7468fbfabfbf104edd88a31b0f70\",\"minFundingFactorPerSecond\":\"0xed5144250ca46cf74da875772cd00965af40372ac5605dac489080557570afc4\",\"maxFundingFactorPerSecond\":\"0xd84ef4cc15df47ff3afd13c9d28e9a859dbabf200c94bcd0206c29b95f24e436\",\"maxPnlFactorForTradersLong\":\"0x72419a34e63cbfb23ab394e4439234ac97ea134e828df7be5bfb5df3ec881fb4\",\"maxPnlFactorForTradersShort\":\"0xa6300cb5902ed56008bca5c8649dc25ae7b7f119a00b42fa383e2d76f5ae5cb1\",\"positionFeeFactorForPositiveImpact\":\"0xc2e64a5a0c61ef9bb36e3f5d49f7ae23191b915b9b453689a7abd06820fb9b6a\",\"positionFeeFactorForNegativeImpact\":\"0xa6be8c7c302085742a3296b00ad87b973361d8a174bb7d30ffbf88e4c6f4d8cf\",\"positionImpactFactorPositive\":\"0x04bcbebc64b09778830c1b12d8c1b2d32504c94d71d5f64f2d547d6fe1ed4ff0\",\"positionImpactFactorNegative\":\"0x0c00767fffed8b00ff6d17106121d436ec02b7ff6c01968d8aecb9d29972e75a\",\"maxPositionImpactFactorPositive\":\"0x10951da02818a2ad689fc04ff3ca1935a2bd85a7023d53189f9f2526c1ad19df\",\"maxPositionImpactFactorNegative\":\"0x789029ddd96ed090034a9b9f30b7b5b6c658b3b2c03c3d8e8b99087572e6c29f\",\"maxPositionImpactFactorForLiquidations\":\"0xe67bb29085a2c9505c14cb22b778ffd89bab7484bcf0142d4b8f0d94823fe8b8\",\"minCollateralFactor\":\"0x25ca6ce85c0568d84138f6b3264fedf1668f1ddfc320f7ba409d3d6019411833\",\"minCollateralFactorForOpenInterestLong\":\"0x3c2241385fd888324a03ea03eb3606df19e300ae2c3cf2dcafbe2d235a04b676\",\"minCollateralFactorForOpenInterestShort\":\"0xeca78003c8f185c46542ba76034dd77edf8c1cee1a710cc59fde908d5b92f309\",\"positionImpactExponentFactor\":\"0xf1f5a97e4945291c333c8857cc08ec673be5b6c9cde98be1ad86931599685acc\",\"swapFeeFactorForPositiveImpact\":\"0x6a1d8e63575704359c436b79657db011d72a92f67f1bd5e14afb57e9a2912498\",\"swapFeeFactorForNegativeImpact\":\"0xaf4fad6d380803699ec362dd04941db2d6c038f504ad922664c8f9d1a4ef7160\",\"swapImpactFactorPositive\":\"0x5d50cff84fe2d5abc20ecbe3156a438d1b3479175f4748dae1d121887ed30eec\",\"swapImpactFactorNegative\":\"0xb9cc0f62898c08c383e014640b673a6cecc479fa1080544ea3250f029f3c304c\",\"swapImpactExponentFactor\":\"0xc7bcb77b7806e06a50ec6ba4bf17541c63b0577ef3d18018f96e5e74d2bd7619\",\"longInterestUsingLongToken\":\"0xc32df3db74b6e94f9714b80fa5a982119139af2d2007d051680e4d37ddb2f5f6\",\"longInterestUsingShortToken\":\"0xa693b695fc8ee008fabb6bd458764d04028839a0e4562c5a4bdad2f23a633f98\",\"shortInterestUsingLongToken\":\"0x7ac98888aa26cfae177c6b4cbfb3ae4aa6ced7cb9cb138e9ff8ec3e21c1fa6dd\",\"shortInterestUsingShortToken\":\"0xe8f3a481c54f097c764ebe829161d0d824dc1730a32fbdbff2e7fd36d494a8c0\",\"longInterestInTokensUsingLongToken\":\"0x9c6d5e6724b99256d7c8e88a87d7d727bde578f7518afe90439964d9c1803c1b\",\"longInterestInTokensUsingShortToken\":\"0x40ec31468f421bf157377d62d9fa3b21f73444bbe5b1a2ade254792c7aee408f\",\"shortInterestInTokensUsingLongToken\":\"0xe6a79c49a3b959357ea8a7f77f95a8e07246700e90c8af7c925d4a507a0b7c0a\",\"shortInterestInTokensUsingShortToken\":\"0x2348c64e4ec4e43e5ec69696283db9f1622c3a8b4d450d3b5f34501539fa9853\",\"virtualMarketId\":\"0x5eadb7b43a05016c33bc1d1a89e4938b37406a70977a8fd7bea66d62ba4df824\",\"virtualLongTokenId\":\"0x8f92ebbddf51de9f1607c3d6748a858fab29822d139ddcd3b8f877241ce75e70\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.LTCUSD, + "{\"isDisabled\":\"0xac22710e48fc7a9710dd08859634ebaef6b475897f190e543b0d071b1222bc80\",\"longPoolAmount\":\"0x1445a4384e1543d0a5dcbaf796635a774ef2b09c47b9e293e6eefa6e3aaf2c7a\",\"shortPoolAmount\":\"0x5c4356848f787769df79af41ac68759934c9ffe430a00858a2c9cea807e6a148\",\"maxLongPoolAmount\":\"0x7b6afc38ee99bd6a2fad93a6d739eb81bc766a44cf7dba77cb95611ed57282b9\",\"maxShortPoolAmount\":\"0xde25a103d468d8197403a27de53f627c7229d5c0354e8f55c57cd1d4484a8b13\",\"maxLongPoolUsdForDeposit\":\"0xdff94e258d022aa19698596b1504aadddf88cfeb4566559ee817b0cb4305d882\",\"maxShortPoolUsdForDeposit\":\"0x5e032f67eed642ade37ed3d94cef0eba66ab6f4d12acf3f66b91178515082097\",\"longPoolAmountAdjustment\":\"0xd3f4970c2ca9815e0d0906dad117f88ea83afe8e55760371cca991fb9deb0554\",\"shortPoolAmountAdjustment\":\"0x4447fbca62e144f4a420ad4f5086670239c59e1b0f5b963ca024940481db28d4\",\"reserveFactorLong\":\"0xbef1f359aebab6d38dbe716f46988191a08fa6aa72eddbae2c3ad720fc56ada6\",\"reserveFactorShort\":\"0x1d1710e3b42085266909ddb56a8cd6ee4a2fd296c1095d287915c42d18264eb1\",\"openInterestReserveFactorLong\":\"0x38b11830c1c117bb21a916d4755adcf48e0a0ffc143dbf4630931644331ccd92\",\"openInterestReserveFactorShort\":\"0xcfb57419c31ac39c54f1352144d376ff2708798d1e643870623a59ba90a49eaa\",\"maxOpenInterestLong\":\"0x43a34556631b0d04ffe8042b5e20f4cfaa29a410775a31005301cae346d1d5a3\",\"maxOpenInterestShort\":\"0x266d81546faa89a220299698e34e47b83fcdbb025cd8867345ebbc1b273344c0\",\"positionImpactPoolAmount\":\"0x07d51665eb180c270fa80853de36e03e0a2c5882228bc743bb84e2567948c4a6\",\"minPositionImpactPoolAmount\":\"0xdc8cc168bbf034e77d7ed2eed3c0d8cc027bb96943b3baca5748e2331ce40853\",\"positionImpactPoolDistributionRate\":\"0xa8107caf4c443947cc3bf81aa2f8a353b8e1d2be98da7305057d9c996ef7143a\",\"swapImpactPoolAmountLong\":\"0x15d77caefd6abd1963b6e93575246711753584f618994a755ac6822932d75957\",\"swapImpactPoolAmountShort\":\"0x6ba277ca079e7398fd5395a3fe3a9cc62cbe8abba7e95d180f3d9a1802e90571\",\"borrowingFactorLong\":\"0xcbef5377c01763fe8a02b16e3253c75a6b3b99e2bf515200931b47b099322a09\",\"borrowingFactorShort\":\"0xd67ead02e820ce8fe1ddf43bcd1eca1f3175fd00d1143b8d7d35f33f85d04a5a\",\"borrowingExponentFactorLong\":\"0xd4c7a13803d7c1a650ea91d031289fea22d31f4145afe92fe8704ee4b5f4c78e\",\"borrowingExponentFactorShort\":\"0x883430518537cb05e260cb7aecd55db9fd0245f8e8add75914a8c993a2bf01cb\",\"fundingFactor\":\"0xc4b6c75535c1792a62ea66b5f71cb35302ce55233753a3f5082c85562df51e8c\",\"fundingExponentFactor\":\"0xa524200894e068682fca71287f96b4c1c11375bf34b9f60ecaad7e4d4aaf9a4e\",\"fundingIncreaseFactorPerSecond\":\"0xe8e4bc72fcbc4720a33d6de05be85baf3eec3f61d254c14e572cd1034a824d76\",\"fundingDecreaseFactorPerSecond\":\"0xee9499448181735963b3e839fd16a91ebcd371d92aefd7399d83f459dccc6e8f\",\"thresholdForStableFunding\":\"0xb85dec3a08107e1bb12b18a45c43eedb81565c11c5f6c7f06ebf13eb9450c38e\",\"thresholdForDecreaseFunding\":\"0xcdea9807c2d3347d07c5f37e5d4727c1bbd31db42b56c7bed300b3aa4b831031\",\"minFundingFactorPerSecond\":\"0x6fed3347f971d3d2c366381cf47b9387f5a871019bd683e6aa884e936e9b14ca\",\"maxFundingFactorPerSecond\":\"0xb67c5c79dea1409495a4296882f29f55711c3613b3962c49406e76fb41cb3bd2\",\"maxPnlFactorForTradersLong\":\"0xa5a61d7f4a7f07641ab50335ad1305741802139fe956021e15cc7d9bc7be8d7f\",\"maxPnlFactorForTradersShort\":\"0xd493bce0cc5d3d5c297296e7eabc2585c31272109c39bbb39cabbfbe0030600d\",\"positionFeeFactorForPositiveImpact\":\"0xff452922f847142c79ed67c6b9f0f1f57d703384dacf714a43ea097072f341c1\",\"positionFeeFactorForNegativeImpact\":\"0x7e7eac91fdbffd192d12b66d7d34f83b12ca2709d7f6cea208e64c3b7905560a\",\"positionImpactFactorPositive\":\"0x04a7dc43056b287535c2fddccef2e0b361e2fc841de23ce8e630db13d4e3cabe\",\"positionImpactFactorNegative\":\"0xd1fa1ed0858635234f05b957d0f102dcdcff2d59307f5b378d07c404c515be22\",\"maxPositionImpactFactorPositive\":\"0x35e161be38af516eabcc7215e158450e46aa9123dfd22a127a3a22717f68e412\",\"maxPositionImpactFactorNegative\":\"0xad122e0fa63007cec09c08f304aa598044be6f5191018370739bc16a9c439816\",\"maxPositionImpactFactorForLiquidations\":\"0x1a5334adfb5b61b4aa80163c205dda0a875dea3d2db2fe0850b7b0614f31cdbd\",\"minCollateralFactor\":\"0x2bcb8363ff421d07360a2a95773d3f7b64319b6bc58f328c6c734e090562cdc1\",\"minCollateralFactorForOpenInterestLong\":\"0x7f97bdae1ee1c0424ccd6dc21526e5ef1e0cb581856d3c0b3279c518b2b140f6\",\"minCollateralFactorForOpenInterestShort\":\"0xa370583d9939495b60095d94f3906c9b15ba4e7a3d7422210d6f541c426d4010\",\"positionImpactExponentFactor\":\"0xe33c49e3c7a970aa64a71f22c589f0436ff537390a61d71088600b2f1fe24fb6\",\"swapFeeFactorForPositiveImpact\":\"0x1dbf6ea5c40ddb4981c0c991291ebcfe9ca18da36b55476f46c07db6f9d4d796\",\"swapFeeFactorForNegativeImpact\":\"0xbdfacc5a3aafccef508a92c25358d876d54cab9266f562bfeb0f075011400b5f\",\"swapImpactFactorPositive\":\"0xa24690e158bd6148dd1ee7619d26d4db4c22e063bf7fbc4849b248713ecc4be6\",\"swapImpactFactorNegative\":\"0xea3e78f194aabd8ee877feb4dd76f0f10e28e5375fe88a39575480d27d265afd\",\"swapImpactExponentFactor\":\"0x708c76a038fd213a993b7643df04ab046fa1987cbe5d0d428475cffb4c1147dd\",\"longInterestUsingLongToken\":\"0x9757fcb688ba5a068a6bc983358135ed9903aff161b47283fcf2eb6649961ade\",\"longInterestUsingShortToken\":\"0x60f0d227796928722b6e4459cc1565ade91a60ee036e9bef8cde8246b53aa235\",\"shortInterestUsingLongToken\":\"0x82690d46bceefb01e4cb7c2931dc00c0f8af31be51e0200fe6dccc6e4e2f5dde\",\"shortInterestUsingShortToken\":\"0xb2d4e48c35f248199b1e281e65b4686ba29baa195eb02ab1bfccbca949d19acc\",\"longInterestInTokensUsingLongToken\":\"0xfe52872b29da94390eb149202b417f14c16dd0d594a57983fe1730df907be72a\",\"longInterestInTokensUsingShortToken\":\"0xe2437867bb42e3579f3b074ce34837fe06b8f52e4f0007147cfdecb0eaa5a8cd\",\"shortInterestInTokensUsingLongToken\":\"0x3273ca3717c1c7b429b51971e61a8d3b13bb8452f3fbe0c594bd41ae15721b94\",\"shortInterestInTokensUsingShortToken\":\"0x259b86b363cd7c61f6e78f907f26941772e66ff1c15b45bbb59827c034b7c5a1\",\"virtualMarketId\":\"0x67e3328811cfb35653f2f4c14979f600f39845fc18fc343c14304f0734072a9b\",\"virtualLongTokenId\":\"0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.UNIUSD, + "{\"isDisabled\":\"0xe31c0474f0ae67a291668449dc770532d0692dd0e0b0973ace320f4351230d23\",\"longPoolAmount\":\"0xe7cf52d240a089203276bb01032bea2b89668274957a5186a5d37ceb95c5b591\",\"shortPoolAmount\":\"0x43a2d38c98e7d7cb84d3d17805a72ebfd08f9f84f1715adf7b79c240ddcdd177\",\"maxLongPoolAmount\":\"0x8fd9b1072830782492a86f89541be9981cd45179ee14c83aa0ef979f86d1fdf2\",\"maxShortPoolAmount\":\"0x5c29e5ae83edbd0ea9f796ece7753428ac0abfcb1f9eed6a0d52be50a3971d9e\",\"maxLongPoolUsdForDeposit\":\"0xd52409557286998f6253428f8a16fe801080e34363260c83c3541b2dd0131da9\",\"maxShortPoolUsdForDeposit\":\"0x2cbf927caefede44905c878cf4be72d712e82e9ece4ae725e848c95f9c09f986\",\"longPoolAmountAdjustment\":\"0x895e9269530dafb937ce1aa620aae6cfe56f00074857470ffb1c3f1e61bd9ce7\",\"shortPoolAmountAdjustment\":\"0x900de2fc53b3e2a42080cc8f925888c349bf0a1a5a7036be641aa548a037e3ee\",\"reserveFactorLong\":\"0x0285cb239e99e4627bf295cca3025820baa60c5833e1e6216b52fc09f687bcd1\",\"reserveFactorShort\":\"0xf7c96c68c833a4c9100088cb8c64a803b4bef37dfc21f8a6dd4b2f2098d1cd01\",\"openInterestReserveFactorLong\":\"0x732bac9969a3288cc473892f43e80792e58e7530338c8a37f1c63ba4dd855f15\",\"openInterestReserveFactorShort\":\"0xfdde6740f6d5ea37a932f2eb09aa74f8d78eaba61a15d18d1a7b446d008dc10c\",\"maxOpenInterestLong\":\"0x6f33c67d41efde4c880658de09d2ae29adb4649b0e092e31ba9e74a4310723d3\",\"maxOpenInterestShort\":\"0xe1595099ce8c877a64ac704ea84331cf9fe74fd92ce97e4d535c0e5195d47a44\",\"positionImpactPoolAmount\":\"0x653a1345e8bc5630c66a4def959467da16e0d9bcfea747829af83421eea4c2ff\",\"minPositionImpactPoolAmount\":\"0x82c22c1e0a9d3d32afa63308137ee99ace7d78e4bd8fa78f11d0191ce9fc97ae\",\"positionImpactPoolDistributionRate\":\"0xcbe85693d8b09a78e719fb4e18838aec0c8ec7e74fb6023c629c131db592024c\",\"swapImpactPoolAmountLong\":\"0x382fe60b4d0d153674673c43dcebae8d3d5b702c61b0c7ec1439b0d016a29f3e\",\"swapImpactPoolAmountShort\":\"0xd0570070f2eedd109e95adb99b5097698087f635d071e3fd933c59be9c64d72e\",\"borrowingFactorLong\":\"0xfe1d0c7d5862b8f73711afc5ba8fb662aa662cd217340b4db53da04faa9cdb6a\",\"borrowingFactorShort\":\"0xc6cef96f9c16ef21492cacdbacee441c819ac5385856c314c687d7c5735569f1\",\"borrowingExponentFactorLong\":\"0xec78b4aa9ec9955c5ed9df8cdd6e522cc6fd2109e3bd352920101c334a79b536\",\"borrowingExponentFactorShort\":\"0xa3ffb2b5924fa3a8bf0e6df7a1b1dcfb2c59e383a869c1d7d1808de3edd85ac9\",\"fundingFactor\":\"0xc0e0a73fd818b7a5f7e8c190aab4c72d4e2f11ca2d6ef5fcce0ae265979a5ca9\",\"fundingExponentFactor\":\"0x37753f9e81052c27ac58e26a3927ae63f1e0a56aeb366177426401b2e2df1119\",\"fundingIncreaseFactorPerSecond\":\"0x93175fa017d53689873818c9dc9526d498d6eb32f0f6796209dadef1eac40370\",\"fundingDecreaseFactorPerSecond\":\"0xb21fa3248df65a3a84186668811360a48b594d556969d64efbcb3249ee5caaa8\",\"thresholdForStableFunding\":\"0xe2877029637aeb67773acd2f7b38d35ca20dc9f570a6e599c40d10427df423a8\",\"thresholdForDecreaseFunding\":\"0x2ab6526d0c3cfb71d205f330c502f1bcbcd98269fe4f8cdbbd18ed3db7d80c15\",\"minFundingFactorPerSecond\":\"0x2cc6179d7488ad3afc665ae7b745a70805e4d8f89822164211155df29e3cb09d\",\"maxFundingFactorPerSecond\":\"0x5c35b3218147478cc4180f5aa2855d0f28596ba4441f9d2e8d209ae71eeccd89\",\"maxPnlFactorForTradersLong\":\"0x62b1329a211b95ce1332d70babea14c068cd8ba5a664cd92aefa4dfcaa4f167a\",\"maxPnlFactorForTradersShort\":\"0x974b387f81e50088e3c3ac618012d346cc44ada48d7755853beaf23ab5cf13d7\",\"positionFeeFactorForPositiveImpact\":\"0xb1bf22ec2a6afd7bcc3c9005e3c3c2487c8dae699c0f4ef601cd0bf2ec00b0fb\",\"positionFeeFactorForNegativeImpact\":\"0x491eab7041f5a8e59a24551f5f7c7f88554dfc7d8aa1cc32dc8447d4e0a3433d\",\"positionImpactFactorPositive\":\"0x058ef893f1d5f6ef1fc9eafb5b98f219ba86fe1ff1732bd8e621ed9314b04c2f\",\"positionImpactFactorNegative\":\"0xc3dd689dd953a4ead23ac3691cce97602c03ec497d0b618b927045ee6b05ec94\",\"maxPositionImpactFactorPositive\":\"0x76f07a9c4842e03295e606a17118aa7055df974c7e8119e90c54366f8438c824\",\"maxPositionImpactFactorNegative\":\"0xa90e6926653827715ada027f4112fe7c882a3ccaf37c922462d40fa4ea8d03ab\",\"maxPositionImpactFactorForLiquidations\":\"0x41af16a1d0ba06020391564578914ec605001bc8ed683269ff1c10ecde331864\",\"minCollateralFactor\":\"0x47e6ae06f279a68f0ca067d5a30ed3650bb14114110b8ee80883b47804ef6a3b\",\"minCollateralFactorForOpenInterestLong\":\"0x2baf62173b9765c40d17461b94ede9de9288eaceb9bea879a93916d6fbc22a19\",\"minCollateralFactorForOpenInterestShort\":\"0x2d87dc943787f13f340d4ca58bc57c9779423fb4b7a25951482d25d8cedc88ed\",\"positionImpactExponentFactor\":\"0x255ba96b3ea4034ce13d81ee90f50b43d11aa4cf3d7f6cf6e214708c8cfcdd02\",\"swapFeeFactorForPositiveImpact\":\"0x3de65a272685fe435c3bf061d018861d43e0981580e7f7fbbee8322549a24448\",\"swapFeeFactorForNegativeImpact\":\"0x16ac4a989200e46829ff7e2a35892009f28622ddbe6474b3bcbf0be26843bc8a\",\"swapImpactFactorPositive\":\"0xdd0713bd8c7d7d813cf41f2134c5c4171d1dd731b92f992bca75cee16f113bbf\",\"swapImpactFactorNegative\":\"0x2c1ef24611bfb6198a766b0251729bb7dac63eadd6743ed5585dcfba706d2b58\",\"swapImpactExponentFactor\":\"0x83731a2fa9b0d93a6a58adff585bfc0f336a70bb3a85535745a1d35ca14c41f4\",\"longInterestUsingLongToken\":\"0x95dd001ff2fb2e3b0ba377f245bcaf78b0b61424935c1af9cdadd3794bfabaaf\",\"longInterestUsingShortToken\":\"0xdc263d57e3c8a3937c126287c74d9b4f74c30491429ee86c90216d5ea329439c\",\"shortInterestUsingLongToken\":\"0x72869f1ca2a193c26300fcb6d1ebdbd1849767ceab9c8707be24d77ac564ea98\",\"shortInterestUsingShortToken\":\"0x697c479bf928bc6a04fc5e53a529a1b3b19d02a23222fa00bf0a14bd0ec5a0b1\",\"longInterestInTokensUsingLongToken\":\"0xae534cba40dd6f0b80ac1ab36c15ba7013a1e943e2b5bc0689e28df371574542\",\"longInterestInTokensUsingShortToken\":\"0x1df3848401f2d4af56ea76324c2254cb8b8e245eae1b36bc52925ab0a848b680\",\"shortInterestInTokensUsingLongToken\":\"0x1f557bf3949dda5df3aef9c48fe94f7357b92dfae2c3addea9905eaa1f8b0b08\",\"shortInterestInTokensUsingShortToken\":\"0x72d8f85055f69537e7d0015f6127f3709abd45238cd8f29315692355ccb2a94a\",\"virtualMarketId\":\"0x5d43ce08a24729807f7c46d7cbde59be236c1d3101b2aaa22e3d56b31bbd1602\",\"virtualLongTokenId\":\"0x6547e1b09306192c47b377a6974e71c596aefec1820265db5088bac5550038af\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.LINKUSD, + "{\"isDisabled\":\"0x326470f02e7dcdbed5c2bf2a7a280970c8e6bbd22e8f702bb3c8bda8efa52909\",\"longPoolAmount\":\"0x3be54f0eac4621335efcada2318b539e374df9148359b7b5219d4752dca287ea\",\"shortPoolAmount\":\"0x5ba6ced06a14a3ec1f9d4e8b7498f67e40e8fb1d0b5242b4980f2704b712a304\",\"maxLongPoolAmount\":\"0x6e9790a393e3f3bb111de81db14531fb65e1946e70bc3e4e91fdc3e5335b8064\",\"maxShortPoolAmount\":\"0x45ae34fec4cf59d6b90edc724b710d91af4c64fddf1f0f36df86786f875b2294\",\"maxLongPoolUsdForDeposit\":\"0x24b8c29389965242b8e1d21a75edc2bdc9e622301c6efb3d3c4f842374d6b682\",\"maxShortPoolUsdForDeposit\":\"0xe0138895bc14ce6ac2f34a128e53fc8ddf7618f0bb6638edfac0e7f06d590d0a\",\"longPoolAmountAdjustment\":\"0x960250e3511e26d9fc463fca2ab4336837fa1aa9b4e43df045c58dd031ab755a\",\"shortPoolAmountAdjustment\":\"0x8792960fde3f1706abdb518fc691fd79c239bc28b123e97cc4ccbd5d8d6e23ab\",\"reserveFactorLong\":\"0xff0a930271e88ee0d0cd9e02b248dd70a13f773cf55bbf578aa8941331f7d203\",\"reserveFactorShort\":\"0xf397760ee901bb1ce6043cf70f533bba4dd0d5821f8ca21712ff195c3826ca2e\",\"openInterestReserveFactorLong\":\"0xf6d9427331c14241209cbf9111a3a91cc011edb1a57a20cb732c52d27fd18fc5\",\"openInterestReserveFactorShort\":\"0x64aaa4867c5e70be5dbf75a7ed7d4426485c9fb4ed89243db8315ba17b5fc816\",\"maxOpenInterestLong\":\"0x0b20696e923124a1cf70d2b7c09bc182c9ff2263a1fd95bcb3045da39c1d8ced\",\"maxOpenInterestShort\":\"0x73d461d2b8298da8d4b762f3cf81357e1da0d8c5123b8e5ff516a7b36613fccc\",\"positionImpactPoolAmount\":\"0x2a12f69d1cc0d24b76a233956d40f4200aac76f5c9ea0835aad5e21d4c62b314\",\"minPositionImpactPoolAmount\":\"0x0ead98684b7c65db5de5c6c06c0eefe6daffeb2d5cce77e1217cf1e606118116\",\"positionImpactPoolDistributionRate\":\"0xede76755bb0112cb507216c12278b100aaf71fc4a1a677e2401fa7e518cdbb8f\",\"swapImpactPoolAmountLong\":\"0xebeb79cf4bd4f8ddd2044aa645af41f673f687e034562d13396147ef0b050c17\",\"swapImpactPoolAmountShort\":\"0x4b498ce8d141da810e713df0bb245de409a05fe8d46a35acc155eeeada601fe8\",\"borrowingFactorLong\":\"0xc530eef3eb91acd23cd0fdde1e36608797a59e42d0904edc0d2cff0c95c45846\",\"borrowingFactorShort\":\"0x624938db5681e20b83cdb0a9d663142c0ad75e047577783941e0a869eb379ba0\",\"borrowingExponentFactorLong\":\"0xce8c3d5822d4c02496927afcb7b3dd62c2dfc1b0255057a762aff7d04ed307ea\",\"borrowingExponentFactorShort\":\"0xd11eda8de3daa0dad87ec408041278fb2d6e5bb74aa80c8f20c8f07cfb8831f7\",\"fundingFactor\":\"0x97fe703a4ad969326b4c5f6eda95ea68764b4816e619d1e45ed9551ee3480bd9\",\"fundingExponentFactor\":\"0xe9a61a3fcfa1da2fbbd55c1e25d30f088021985bf80b01883db06c254da3f39b\",\"fundingIncreaseFactorPerSecond\":\"0x998ddc3ec098759d9b20c50505c6d8402303ff53b7cf47bdd63cad549ef3c750\",\"fundingDecreaseFactorPerSecond\":\"0x95d6a37be0e594ceae565f0880c9aaebd81795ca255720b250b078d14f2de500\",\"thresholdForStableFunding\":\"0x01b2a308462c37cbbfcf31e757e8db9600b5db45330efd4b945dfd427b6491a4\",\"thresholdForDecreaseFunding\":\"0x3f54a318d3b38eda63d6aa2e05f283a3ff7d66ef83b6b09d2f876975d91931ea\",\"minFundingFactorPerSecond\":\"0x16447d2801e2a19877de94089151e9223994cf89dc6c768296160ed2e490d613\",\"maxFundingFactorPerSecond\":\"0x1ef61f8f945d86cd58ef7e1e4bc7729da62fef5ec14affddbba24e7fd1c961bf\",\"maxPnlFactorForTradersLong\":\"0xef8aaa370644aaf3abf0f745c8d419b4e8b022fa74bd591331b9049f01a776a5\",\"maxPnlFactorForTradersShort\":\"0xa0ddc4194a3ed609bab97fffba907154c8b2fab359f5339b564c416dd307fdfc\",\"positionFeeFactorForPositiveImpact\":\"0xe0a8dfbd751b5d5206a4421add9c6138627ad8b1dd6c33c53e903e54a873d6bd\",\"positionFeeFactorForNegativeImpact\":\"0xb1d9a20a9576c7c8e95d076152d6b7471f325274e27944234317d1655b9a7c68\",\"positionImpactFactorPositive\":\"0xa72f633da73261095054c3c45e61c545b71b34515676776202071552eb46744e\",\"positionImpactFactorNegative\":\"0x06aa2f3ce1399efdc7ced916c85dab36fdb5f78075b6ffa4cad253f726e194e1\",\"maxPositionImpactFactorPositive\":\"0x5c9741051d509ce2c9f6984c4c7f98516b2cbf91e1342f56f0e1b5d40056b688\",\"maxPositionImpactFactorNegative\":\"0xc5e52b000c6cf276f134adfe885de18e057f3c5f68a128cd952aae394b3c11cf\",\"maxPositionImpactFactorForLiquidations\":\"0xe124a4a1a960aab0503ef70a732184bbc30732fd4697eb1ce4d4463f3a25c509\",\"minCollateralFactor\":\"0x96dbb6d13d7c6ad973f98461378032ffcf09dcfff780a087bfb18e8b2345b446\",\"minCollateralFactorForOpenInterestLong\":\"0x55f19e1cb6994dac8de0f0595716c8ce1c98c4a0fe7ab84d94a2581a2857ef77\",\"minCollateralFactorForOpenInterestShort\":\"0x661c2ecf5182f780d9b14cd701f17b54d2fec0a3c78259175f382a53aaa17c85\",\"positionImpactExponentFactor\":\"0x9c4e91c06294bf042d7bf732cb8ef8eacbc2b113523e0a3d00ca94d3baee95b5\",\"swapFeeFactorForPositiveImpact\":\"0x1e388b1aefe26c7999b5916b8d315dc220aab3bd1abf69d022fb2ca798af1d87\",\"swapFeeFactorForNegativeImpact\":\"0x42455fb0390e5144cf404e735d539d273f23e0599527cd4cfbea64781471c11b\",\"swapImpactFactorPositive\":\"0x8879db97a79f1b27c0eaf1b7e8326ca6b02dde9dab4a136bf6de2ae5bc87eb43\",\"swapImpactFactorNegative\":\"0x267ab1bdc0e337337fb57913abbc1774c61393c941ec14405210702c243dd087\",\"swapImpactExponentFactor\":\"0x42417562a37eef95c1e2ebc561a16eb5d2719490bbc0c214707c278411bdee69\",\"longInterestUsingLongToken\":\"0xb039f73d1d5b7be8cccea9ee69157fcb35007c098146a428740ffcef4a144563\",\"longInterestUsingShortToken\":\"0x69a6a3fa811ffbc01a4dae3275f89276cf68b1348f86bb19cadda86d6c4f557b\",\"shortInterestUsingLongToken\":\"0x63e9f5caaf1a63cfc4ed365990ca27b6a7ef68e57ffd026a8dc7dff09ab53e31\",\"shortInterestUsingShortToken\":\"0xdf0560123f096d6afe54197e03f89497806c818508ae80cd70931e7af9d7200a\",\"longInterestInTokensUsingLongToken\":\"0x21ac031407b3be05cff24ae337c2265f8b4f2259f8239dab4beb9e3e75b4dc84\",\"longInterestInTokensUsingShortToken\":\"0xec2cdc9da0aa726b0b2cdc19fb0dc3b8d2074c1c67c2352582e872bb0e867fbc\",\"shortInterestInTokensUsingLongToken\":\"0x9d353794286767733a5e69a8228d43fdb33dfd23b2768549e9e3d323f253a5ba\",\"shortInterestInTokensUsingShortToken\":\"0xb017d870156fcfef2f3393c1d7b0918624ba61bbd3362b1045d5c837b403b940\",\"virtualMarketId\":\"0xbd5d0629f6fa7cfbbc696188d6e70260c1965336daa35470f96c58867af8ee36\",\"virtualLongTokenId\":\"0xf1560d4507be69cfa4a1caaeb724e1a2e5a3f483f931332ea5ae9d057224f287\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.ARBUSD, + "{\"isDisabled\":\"0xb1d3cf88abedde4fe5bfe1a8b31ea31fdd5217bd4c18eace1b0174c05207770f\",\"longPoolAmount\":\"0x7e10eb326f33383ff6c064038a6d98e1a3de6b89de729e114767af9712f9c107\",\"shortPoolAmount\":\"0x19532fed75fd7a66414dbc262ba18d9c0c8957aaa87cd1060ecdb785aa0dc18d\",\"maxLongPoolAmount\":\"0x2de33c18d1ba1c4b2178d1f59f940119156c13c57313fa0ccec9068dc25ee14c\",\"maxShortPoolAmount\":\"0x1f5836422874f52e62a3e5f9b18dcfcc4f756e18deaf8970cb8f8b22cbc870da\",\"maxLongPoolUsdForDeposit\":\"0xd037e3bf6b8fd9542598f8d4b32d056cbefd1f1b7b9389c3b0bb2e8702eacab1\",\"maxShortPoolUsdForDeposit\":\"0x303e01786379e113fa64d7e00fe38cbb41517f3273b6d45f196985c156823b66\",\"longPoolAmountAdjustment\":\"0xf6e31dc8ea13a1ae2858567339b85d2dfa627da93631df992c08da350b6c0926\",\"shortPoolAmountAdjustment\":\"0xfa261879f962482d5193f8ce26ba18f57d8943346b2a56a01b06e728947a004f\",\"reserveFactorLong\":\"0x63bae2f62e73f425dd3151bacf894c0a693ae52e615c9b92af1d0446182c7c07\",\"reserveFactorShort\":\"0xe2ae33340f4eb98c6db75dfa90b5c8a07792d3436becbab39ed1097ee7330692\",\"openInterestReserveFactorLong\":\"0x66375251f2286c9d1aecdb09f09ce30983c44b376609697167c0cd1eadf2da71\",\"openInterestReserveFactorShort\":\"0x782eb655b1aa48d0898e76be6cc31396af34672b4ddab6a899ad432d39776167\",\"maxOpenInterestLong\":\"0xdc3cc38ccb07563f5b9be451d1e14a238a7d533a1499e9bb3ce3692d888a42eb\",\"maxOpenInterestShort\":\"0x60c0ba303e41eec81cea88370d528e0d7d65429430ca18dfa0617fffac08f5f0\",\"positionImpactPoolAmount\":\"0x5effce4ad38113d5ec12c19410377b1fc0eead0a7ebd45d4a7ea601a19be0bde\",\"minPositionImpactPoolAmount\":\"0x2e2af174dd52a9460413b14ff0e1b71859d284fd1f660569dc0ae9fa01bad08d\",\"positionImpactPoolDistributionRate\":\"0x3a3f8cdfc7c48bf53164300d060f3081f46c1793eb2369aa7943f0340f6848a5\",\"swapImpactPoolAmountLong\":\"0x4fe5a7221c18285cd5b953e53bbb28c9be1544c6e7a0f612149669d2285080c7\",\"swapImpactPoolAmountShort\":\"0x96bc6411ca7571960b07219d0542af5caa768a0801f30f05ff1b52737b986781\",\"borrowingFactorLong\":\"0xe04346192cd96b604ef9f1a1818401f46d87342b4d90defa0db448f0fd0fc88f\",\"borrowingFactorShort\":\"0x20778c75cb7ed4d65557b54a899af279a7351ff41ef7d11c0c164937c0ac66bb\",\"borrowingExponentFactorLong\":\"0x024de70645b3c71fc6a3ec8e9736110d0d4ea788346a6a51e1eb0ae3ae67ee9f\",\"borrowingExponentFactorShort\":\"0x2738f4a4b28a1eb52bf80ca90df8d3d0d24d86707a91a9523d996a4f3e5c337c\",\"fundingFactor\":\"0x5a6371bc88237c71b04ed58aec7d999a0303a044d561d9deb6e5fc0a52c804c5\",\"fundingExponentFactor\":\"0xdd9fc9c75ff997e7bb0f44292b38f59a98263baaea832f8ffe4817b055416b52\",\"fundingIncreaseFactorPerSecond\":\"0xdc26c558117d98c8e55fcffd6e0c866f702a2389ef3b73ca91871f6545f1c3cb\",\"fundingDecreaseFactorPerSecond\":\"0x609422a21e5a5041c957cf180a0dcf7dc2b7579152d4d7f91d4cfd736d06b47c\",\"thresholdForStableFunding\":\"0xde58b077b55c6126211e76d587050fca2d3e16ea6d90b94aaa44d0808a73b420\",\"thresholdForDecreaseFunding\":\"0x68b85cae0efa1919568d3e329aa6b43139738ee6df7e484b18008306bdef300e\",\"minFundingFactorPerSecond\":\"0x2d4dfc45a9d66995a9962b01513b20ff299e38e22b16e198bce4d175f51c3852\",\"maxFundingFactorPerSecond\":\"0x80fbfee732d414f7e197bd2dca60406b5443b01a07b4bcdb3e9c79809d5b1c98\",\"maxPnlFactorForTradersLong\":\"0x0d971c00493d5db7d3270c7a8cfa9cc7aa0a99e5005fb913d5dc26b445f551f7\",\"maxPnlFactorForTradersShort\":\"0xf9a064f376e3c391caabd7d692c3e5e5c601ac3a9ebd1d2c105ef84117e3588b\",\"positionFeeFactorForPositiveImpact\":\"0x57a019d7c544d1c83cd3118bf0c636b2e212af7f8c5c1e1ad5267adf98f3bbd6\",\"positionFeeFactorForNegativeImpact\":\"0x99694bed9c85088df5242e4cfb72caecd4c1cb1870445956483f383b2ad6a5c0\",\"positionImpactFactorPositive\":\"0x48e76a2a5d0acb603c2113e72183f2ff900dad314753ccd89847cbb3ab21a522\",\"positionImpactFactorNegative\":\"0x2892774a5b56d753852b4a0f3bfb467e3a8ec009f9363ea1e87a1fb0be8949eb\",\"maxPositionImpactFactorPositive\":\"0x2ff3590362f429c9e9fed9dbdd6d9b7af0fadc3db5958cbdad4915effd446ab5\",\"maxPositionImpactFactorNegative\":\"0xc5700a9f0f48d7f11ad44433d1848041e475133baa14ceabfd308aa05291380c\",\"maxPositionImpactFactorForLiquidations\":\"0x95b07614a06ac0a81e49b6e02b6b5be9ff94bec514e0e62042c8e1f5c1429733\",\"minCollateralFactor\":\"0xda500b491a746b24ab50e0b8b019f220ead47914b3745a2a7e7fdbd254e98380\",\"minCollateralFactorForOpenInterestLong\":\"0x766fd0d002f43488d55b72193e9da1714d44851b4eb0e813cc8d280bef17a17e\",\"minCollateralFactorForOpenInterestShort\":\"0xd7db435910f38921a33518f369da861bc79b935c47e55310cda4cac15d5e8817\",\"positionImpactExponentFactor\":\"0x2efcc03e271bba8971dffc9f4ceb1afc8fc3c3c21d00a7c3b55ce76374ad79d8\",\"swapFeeFactorForPositiveImpact\":\"0x33809fa251f2a79834e55024e55c4f8108575f4de5b2cb36a20328e5ab447533\",\"swapFeeFactorForNegativeImpact\":\"0x2cedab9e26e3f9beb8d6b7ed636b6bafb5c22480925bba846038f0c06b622eaa\",\"swapImpactFactorPositive\":\"0xb63747d677b3f4894bf83370aa290ba493a3279ab6c71e8f627d6a19200fd0c1\",\"swapImpactFactorNegative\":\"0x6db11718caa3c178b5c71b0ebb38438e678887ee9808ee5fff12f45dff61f523\",\"swapImpactExponentFactor\":\"0xecb5d9ab804ddb4babf57af0763d13484ab59dc753b190aed034545d261dad6b\",\"longInterestUsingLongToken\":\"0x00773c9b4edc76a785d521407891cc435fc23819fa3668e398ecbe34ebf2ad6b\",\"longInterestUsingShortToken\":\"0x2b7e74d62825d42ea37f554e2a07ac81004d656c7e4a1ba799240d5190981232\",\"shortInterestUsingLongToken\":\"0x4954b7805bf1b21196dddf0932b96a781c1341f593640578663fcfb199e29ec9\",\"shortInterestUsingShortToken\":\"0xc678516b7a355d05e635f7dae12b6d193223f640e4d7cd5f97c0fbafe70c6569\",\"longInterestInTokensUsingLongToken\":\"0x1a402099c28265d9e613d36b14f1244218fa21d8aae38842d5c08bc36f315af5\",\"longInterestInTokensUsingShortToken\":\"0x36eea6a57a03af9a929fcadc7f0e5712414597d4e8266b616069504459fc6ae5\",\"shortInterestInTokensUsingLongToken\":\"0x8c934322957ae354fc75083df7688733569e93f4f7fa8adcd32f2ebbdb3815ac\",\"shortInterestInTokensUsingShortToken\":\"0x31de6a9c5779f504ecb8aefdc3173ce221672840efbce76f01216034d84fdc25\",\"virtualMarketId\":\"0x403b84c44a43de012d5af0d352ddee18816098b6dc9ab85d18725c6c80ee34ad\",\"virtualLongTokenId\":\"0xd75a55ed2ecea1a03f2ca36bf769ceee55b3fcaa9c02f4cf863518485ed4918c\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.XRPUSD, + "{\"isDisabled\":\"0xfb532704a44e3486571fe4e8fe62e7780e56fa790b833842d79f90d0f46288c8\",\"longPoolAmount\":\"0x162e128ed7d7e87a743e0a07745c4861b3f1a52133825ddd86c4f40cc178c535\",\"shortPoolAmount\":\"0x9f5fd95e5680a30f8f6eef52e2c6d9b02dd47b2503d24f5e96d7115f083e98e7\",\"maxLongPoolAmount\":\"0x9d77a79b78ff0f86f396c977116cc28b7b34ec8b9b4b2752f3653e57ece05263\",\"maxShortPoolAmount\":\"0x4e804829b61b4a8ef75dd498c47d231e56160c494bd8d40515bb413fc777d5e7\",\"maxLongPoolUsdForDeposit\":\"0xe179c8aa812fe724113753f8e7735894da602e37c8109bbf67782398a574db97\",\"maxShortPoolUsdForDeposit\":\"0x6ab6233fab510097c6143eafade050e9166d20d72ab6614b4ba55ac5356fe94d\",\"longPoolAmountAdjustment\":\"0xda25a1e17e62d1bddbb481cd18a5ae16ddde5acbb8fd8c8c96b2dc53803b5c67\",\"shortPoolAmountAdjustment\":\"0xb6e34e87a1f8e633fae5fa3626c547f51f24494b8e5ee6c2161dee19d7e68b84\",\"reserveFactorLong\":\"0xfc1101b1047085db2d628cfc59d344549f7fe0be0c815b1f45523922e030343f\",\"reserveFactorShort\":\"0xc3b41b507b5f324ac2e4d8b2e5639a5416648a0ec00ea0c3e0c07e0d8cb96c81\",\"openInterestReserveFactorLong\":\"0x2158e1bc5d3d391e0818960999eee66c0fd7b00d133fa26808996ec248b5eca6\",\"openInterestReserveFactorShort\":\"0xd713c839e38eef01cf2ae81bc02166e1f255e83842091cfd68076fb2fcd08d6e\",\"maxOpenInterestLong\":\"0x6e29ee2c0926edeb6c68b6192d29f4b1d29463e9679a9a93bbc8c8d9ea088368\",\"maxOpenInterestShort\":\"0x8b18dce04c412d0a5b3f066a33ba853350605a4f348b92a482fcc44ef0b2aa63\",\"positionImpactPoolAmount\":\"0xa25c23eb710bfdb16f21db0ce08297c6b24ca760696c8b9ca48376cec76ac385\",\"minPositionImpactPoolAmount\":\"0x72ab83ddf0fb1454a055654d429c60573d5649ff4c4a01899c44c96206f622bc\",\"positionImpactPoolDistributionRate\":\"0xcbc24fdd19c94c38dd10f51fe4ae141568b9233d2321407a3a77b7b661591398\",\"swapImpactPoolAmountLong\":\"0xfab4fb0f74dd849796cd1820cb1dca248d50dcf59d6d12561d92b7ef9ffdc6c2\",\"swapImpactPoolAmountShort\":\"0xf628fa1bbdb3645fa29847536f1879dc047718ad74240f8143df351eea0bd007\",\"borrowingFactorLong\":\"0x23aaa724d649229661d04a81588ed47157d7adb06ef8848eddf36e626600536c\",\"borrowingFactorShort\":\"0x8397002fbbf56f73116879b26f679628094302d9fc43589c06dc591565e4ca79\",\"borrowingExponentFactorLong\":\"0xdd00f6b2e003144f1bb4fb4c1aa69897149f45c9dd41ad302d7219fb94aa6741\",\"borrowingExponentFactorShort\":\"0x238e8be4b40f1f005781ae1edd45acd0d7f6058c9a83ba23c6a9619ba723e5e0\",\"fundingFactor\":\"0xc61075b8cde8c86c8d00cf87c027f4b6c293fa282b7b2475c9eb8ce2d7b6dbdd\",\"fundingExponentFactor\":\"0x09674033e9197240c0f552d0978a9fd097d9b09b42491ab2e04aad63428a8f08\",\"fundingIncreaseFactorPerSecond\":\"0xc6a27b4d510e63f3a84c63c0fa86efd0af51b3dff437804da143dbf2419c16c3\",\"fundingDecreaseFactorPerSecond\":\"0x38cb2573f8dc621fe74a2df4c283a0a8c5763fd6429762c8eaf50bb1662659c2\",\"thresholdForStableFunding\":\"0x7df45d7ece6e1f0615f60adb4e08d26c0ec552e38301e5ca501008f4fa5661df\",\"thresholdForDecreaseFunding\":\"0x0c76d2b8a327c15978e3f37c0030b168a24bfbee3cf2ad1900195f7e401ba34d\",\"minFundingFactorPerSecond\":\"0x5ad463d95ec6163be46538304d7d1f8debd06ae0142111f7ee5dfe0ef835e528\",\"maxFundingFactorPerSecond\":\"0x77905364bba50c4f33e22bccadbd317691a1c22b10fb45c5dc8c32129526044b\",\"maxPnlFactorForTradersLong\":\"0x9dfce95f35750ed7989c98bc3fa7b9ffdc4d923342b99b475bd1a68dd2bea55f\",\"maxPnlFactorForTradersShort\":\"0x3f7a7d4fa7b04934a74b5c4fe364e15ec7f182a731e00665a8087943d90d8ef3\",\"positionFeeFactorForPositiveImpact\":\"0x2afa6ab01eaffdcdce3de67ca9408d171dca6f345e4a933977f017c3f935a150\",\"positionFeeFactorForNegativeImpact\":\"0x16a9815fd641b782481c256ae44f741d91f98e60f198e6f67711c2f872654659\",\"positionImpactFactorPositive\":\"0x163076b9dd0072442b9329b1e08c52eaf7f5d809f427178601592806a5200645\",\"positionImpactFactorNegative\":\"0xc27bde803397efc87d5d72964b6602262a80df80f9793084055ef0d6dd08b1af\",\"maxPositionImpactFactorPositive\":\"0x1c69876249545cf8f840054e487971e4faa2bf1574ac216060f5367e8fc4a611\",\"maxPositionImpactFactorNegative\":\"0xc6af5f36195b175198abc4774b59c643fd769f4e2c9e249c1e3006b88b70fa9e\",\"maxPositionImpactFactorForLiquidations\":\"0xbf51cc5c91b13d3465f57f3e9c7b3d9a464a01ad65b0cd7a784fd2d83ccb7051\",\"minCollateralFactor\":\"0x7cc57d46d5ff50a03e5a0f29242e18131d031794b2629b7f6398de7841588dbc\",\"minCollateralFactorForOpenInterestLong\":\"0xc91baace01ed132d5a1f539fb6ddacfa913f012c6d706993f1f9d21e28646417\",\"minCollateralFactorForOpenInterestShort\":\"0x42ab637ba5ede5ce450b490c92fd5308a4b63d814d521886092107e000564243\",\"positionImpactExponentFactor\":\"0xfbaadfdbb5b204e122e8a78505941f01262e57d5b600482db442a452bdf0c5e4\",\"swapFeeFactorForPositiveImpact\":\"0x13c0be771ab61c6f159c7b5afdf946b2e46e53aafb8881484d71a028dd441160\",\"swapFeeFactorForNegativeImpact\":\"0x7b665b4b365ff791322993f71e61afeba792f6ccb7a2f5f2163825643637c897\",\"swapImpactFactorPositive\":\"0x6d7c56088daa2bea15028f86d6f54e24a63768356083dce669015965c9f5b873\",\"swapImpactFactorNegative\":\"0x3b2c183b4353852490404ae6be59826b51e24517576e18db1483a6c593a1a99a\",\"swapImpactExponentFactor\":\"0xde8e209ca4616ee04606284a891e35dc078488672e5a98b257aaef147e46b5cd\",\"longInterestUsingLongToken\":\"0xeac9c2252d017460be3f860855a94cd16d776ef4977f896f6e0fd8e4b569f653\",\"longInterestUsingShortToken\":\"0xd601846c1043ad55f26260ee2926352380601e1e33f2366087f08bac80d3918f\",\"shortInterestUsingLongToken\":\"0x5acf26720f37b2c1ac85bf8f49c7ff58de8f17527046ea516238ba1a77836813\",\"shortInterestUsingShortToken\":\"0xd1458fdbbf038b94ef77c72814dd5b1fe848ec3dcfbf9bc9158d1ce83998d6e5\",\"longInterestInTokensUsingLongToken\":\"0x05b1f9e8a0b23480936d3553385806611799d0a15867c3d72bc4876ff6289637\",\"longInterestInTokensUsingShortToken\":\"0x0365630c97752ba6391f907322f0f51a94e02900a9d73e13b314543600b692aa\",\"shortInterestInTokensUsingLongToken\":\"0x11a781cc7d4d119dfea34b4081f818ba3816844bd1e912637c1b3bff3a28cbe7\",\"shortInterestInTokensUsingShortToken\":\"0xf7b2a70ceac522a3a297cbd1a7407d8a7d11d06893b27f9776be34bdbe3e3267\",\"virtualMarketId\":\"0x33ce55e7dda117ba6480d3120f3d7403d8db763bd7606ca8695846851288c789\",\"virtualLongTokenId\":\"0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.BNBUSD, + "{\"isDisabled\":\"0xc1d32ed0c76a3f0514d2972978714afaeebb7f1f439307c9e8c8d1d17e937858\",\"longPoolAmount\":\"0xb01a02674ceec2bf4b3d3221a800b02e993026feb55a9b98e7f1b4ec096d73e5\",\"shortPoolAmount\":\"0x07488fc5341e46307b3272614f7d78e599d9f836dcd3cf40f2f939da2f44ac2d\",\"maxLongPoolAmount\":\"0x9121aa2f0d512e0756e93f4eaa3c6d274e546558dea5f721b897b67f9db5e8ba\",\"maxShortPoolAmount\":\"0x0625bc3dd53555a03320174e5be6f468deca9f67c95db201f2d8bd48814b8373\",\"maxLongPoolUsdForDeposit\":\"0x30cad517470e6f44fb271fd7ac7050169248e1cb3e02d6b7e2629ff3ef94a2f2\",\"maxShortPoolUsdForDeposit\":\"0x90476494490e62a97d255ead9bc174ee42b889f4a716654b2ce17a5387ddb26b\",\"longPoolAmountAdjustment\":\"0x023cfe385001f6f535f804f5c8c4364cc2d2d861dde939d437e5f94d6ada607d\",\"shortPoolAmountAdjustment\":\"0x76b438e5baa05bf7d9fb43ec067baa90d1a5530254e79a731f997d913760c48c\",\"reserveFactorLong\":\"0xee12daa6322646c6ad0f613f13fbb115e7147e646365fcf22638c311b3baa657\",\"reserveFactorShort\":\"0x7e6c586a5e265f204036389179d4d4987cbb2a7edafe47868d12dc426a84e2aa\",\"openInterestReserveFactorLong\":\"0x56cd4bd3e0a7a42cfd55e27a9183d595660ccff7f5702723b69561212ef17b18\",\"openInterestReserveFactorShort\":\"0xbf4157920fd33a3ea64561fd1ac504a46e7936f1269dc091d75cc2d90ea88993\",\"maxOpenInterestLong\":\"0xba9f5d08da55c0e4d80ee0df2a1a9c76a435adc80a6adfc0ef94fac0f3ba5fc9\",\"maxOpenInterestShort\":\"0x46b29dd4bcba368c088d4ab08e74babb236ad1d80d3bc753dbaeb29385af81fa\",\"positionImpactPoolAmount\":\"0x157e5cb2ec61809df4176022dca1e93ecaf46c95c3b69203cbffebf4343b43cc\",\"minPositionImpactPoolAmount\":\"0x6aa69e47c30cc774f3c22beba7bfdeb098cf0c64cd6e89e87153ffc6d449162e\",\"positionImpactPoolDistributionRate\":\"0xc08e83a94ca5019fd44b90708ada389660461c40906712a50a9ae81fcf17f1a8\",\"swapImpactPoolAmountLong\":\"0xb91a32725774baaab40eb7ea83c37cf6f08d69e7406c56f3e9faa75f499038de\",\"swapImpactPoolAmountShort\":\"0x5323bca976340f4e198621817ac57118d1b54f014eccafa5045857330e20e015\",\"borrowingFactorLong\":\"0x36053028a19ecafa8fda920d11534cdf5a8fc435b3bcf9f9a80b9c540bb37456\",\"borrowingFactorShort\":\"0xbbdaf140c7a031bc05b96fe8210ca75409356178d6568fac51e1cf7f524769f4\",\"borrowingExponentFactorLong\":\"0x33e420b8f0a1bf9e108df3ace664be15f3f2694914eb464ea8a3842aaa63a32b\",\"borrowingExponentFactorShort\":\"0x4e2f09c1eafd4a91007d3b0f728f5abeda3a38c63d1bdfd4871c72e66043d853\",\"fundingFactor\":\"0xe288814d1635e3c6a21994bb350acf5d74b2fc933662fbd5cabb61e9454551a7\",\"fundingExponentFactor\":\"0x6b5e438c6dbd2cf2e8716d94fed2c88893dfb07e8666a7905758cf8a9971aa64\",\"fundingIncreaseFactorPerSecond\":\"0x5a8a8c161015a025c4a0431f22546c819ff2dd2f1b019ae4ee6703669e30cb8a\",\"fundingDecreaseFactorPerSecond\":\"0xed14af8b59043d260dc529f546fbab4fb2916182a5d336ba92ccb99c90bb60c4\",\"thresholdForStableFunding\":\"0x01865033922695631505e435deac05ee1e0be391d506975e74375e8aab642075\",\"thresholdForDecreaseFunding\":\"0x28a167885f010d70cc03b13f995aeea01bce14cd550d652967136d599b8a5568\",\"minFundingFactorPerSecond\":\"0x4a32c33bebf88ca2787f949d72bc5d442731a7a2fedb29fe7c3cd9c87095a2f2\",\"maxFundingFactorPerSecond\":\"0xfaa2e2d54bd6c23be91d8e5c47cb3ae9d9fec59b9aa8290ef792420f15b2469c\",\"maxPnlFactorForTradersLong\":\"0x85ec736c56013977c51d5e19da50497a732239f0fca988471f4e0a3066fca75b\",\"maxPnlFactorForTradersShort\":\"0x8edb1f5246ad1af8d59a7ad26d8f41fe7dd2a1813a1569cdcfe40851df6ea6cf\",\"positionFeeFactorForPositiveImpact\":\"0x529d29c9843efe4be2f9872d2e78fcf6e0440a13d77141765380fc76817f5c87\",\"positionFeeFactorForNegativeImpact\":\"0x8e3f4978a3cf5cce73d79ff5773e2edb617da3267e8017ac64dfb274f7742094\",\"positionImpactFactorPositive\":\"0x84bf3fb933429f4de132e3c58aff52a078506381c7f24020b466fccf28905941\",\"positionImpactFactorNegative\":\"0xf54c7c49ce94e0c61f7c5038863aff7eb4a7aa1a1097acf42851ffe9350bb0a5\",\"maxPositionImpactFactorPositive\":\"0x8fba80b3646c853ff0999394fbddf236bfdb72482b4fb1dadf6fbc81caa1b9f8\",\"maxPositionImpactFactorNegative\":\"0x12ba189cc009055d7cb1907f44c8b32ba8b8c6a8f0359713a84ba3179420f542\",\"maxPositionImpactFactorForLiquidations\":\"0xf630085ecccd08f436223030db10c9c8bbbf96d9b8e0dfdf97d02c978c024b14\",\"minCollateralFactor\":\"0x44d3450628900783da0a74bb9d83b0bca2ff8504e6c4d420a2c5480085883855\",\"minCollateralFactorForOpenInterestLong\":\"0x95ed56a404dad3b4f299ec1ce25cef2de1a828458f02787a404fff019baaafa4\",\"minCollateralFactorForOpenInterestShort\":\"0x8f5bb4ea781f12eefd8cc65f9cbe17af85a9e315fef4cc50fe63e7471af42531\",\"positionImpactExponentFactor\":\"0x2ad9516b4cf9062372bbb664ccbba50dff378bedfb8e9defbdc4eadab8306d1d\",\"swapFeeFactorForPositiveImpact\":\"0xcd711380dcd676e0544ad089e8c882686c308f656fa651d48a0747b7f70fd564\",\"swapFeeFactorForNegativeImpact\":\"0xfeadc380b20cab88593bd96433d4b0ee08368051055dfcfbfcc594a02a98cf08\",\"swapImpactFactorPositive\":\"0x737c7f824ed4b98d1e563da86dd27bc6555ef0c5e3a7735a9d2efad4b87dddc1\",\"swapImpactFactorNegative\":\"0x71533255ae7a74548b062c095bfbf28d36199e44d3481ed295bc9075f5137ef7\",\"swapImpactExponentFactor\":\"0x1a4ce691b5691f71e7bee1bc45b36e300e1549a3ee40a24945c65d0146428e30\",\"longInterestUsingLongToken\":\"0x2e06148c5ea2c660e7e6771b187af490d248e6e3dcfd266901e1fd727f31bbe3\",\"longInterestUsingShortToken\":\"0x53070e07e851072046636656c662796654eb4d75a712ffe6dfbb1b7b0a836ee9\",\"shortInterestUsingLongToken\":\"0xa9407767862edfc62832f6ecc895d105de579ac5163e49d8159352d670062e78\",\"shortInterestUsingShortToken\":\"0xb7b406bb543f124d31055569c395031f1e23960f67a4ad086fd81276b20b2aed\",\"longInterestInTokensUsingLongToken\":\"0xded94c8f814dd5a98fbf797995353c5a11d7ef063487aa9641fac3da0130b4b2\",\"longInterestInTokensUsingShortToken\":\"0x53e4b509f2b1e55e4686c80b990043ef4c4b0d15b811005af9c90e7804d0912a\",\"shortInterestInTokensUsingLongToken\":\"0x7a6b167f3a0844090ed8e45ac9a029cf9cd3673123360635821058070c099880\",\"shortInterestInTokensUsingShortToken\":\"0x7bbfa0c0470fbf6257fdfd7d6d407ac7b19c005f19adc1d911fa1a87483f1bd4\",\"virtualMarketId\":\"0x3eb5746eac364208e2f9195e45b599e3646c837956a8a41ffbaa1c75bb8ecdfc\",\"virtualLongTokenId\":\"0xd923fa1e30d3730f7ae064ccdc6dfa814534f0e8a5cbe1eb5f035a80ddaa2843\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.AAVEUSD, + "{\"isDisabled\":\"0xef9d3de546fd33f13d39f9e0e49e9ab2c0bd1fc8e5d6c1490a40a8803f56457b\",\"longPoolAmount\":\"0xdafe0928933f8c329480f33e230ca3f555bd8f932b33920b65c02692812bf135\",\"shortPoolAmount\":\"0x990be4124ece6dada46f5e9e096c006202518161da1109945ba0eef67e620b41\",\"maxLongPoolAmount\":\"0x0eb205be04d5fffe0321faac1d13c78ff6b6eebdb93bc58aca321fd5504f92ab\",\"maxShortPoolAmount\":\"0xf1bd2e9819a756bf388aa0508c8a28c93d8d07ae738f1b752c7d02c25e04a973\",\"maxLongPoolUsdForDeposit\":\"0xd36217e92178e4fee13ff1d3a3a2b7af92b48adea8448e8491ad78fae6e45f58\",\"maxShortPoolUsdForDeposit\":\"0x2cb3bf88d0102c24b25375930a7a1dfc4eb0162880c7478aa8d77f854ec369e2\",\"longPoolAmountAdjustment\":\"0xe32de65889fed6ae7dd25a65e96276abb215ff2a287b4adcc0dcc2eddc9eebae\",\"shortPoolAmountAdjustment\":\"0xf02c09739d49303805d645434dd3e4c5a6d2f70587ff7a53c7b0d36747b56a5c\",\"reserveFactorLong\":\"0x5fa5fb4a664608c4fcc52f5db846d70c0f1b327816ca3b1da3789dae20cd7d06\",\"reserveFactorShort\":\"0x77cf584ea7d32edc66fe17b14cee220885107de50d12af6f7718d47aa64ad321\",\"openInterestReserveFactorLong\":\"0x7dc5ed8947657008db74db38a50bf5decc638e75627a758dd00c215a4c057594\",\"openInterestReserveFactorShort\":\"0x9f690340546c6de2e4f6876e6cc5eefbe737dfc4b983d545ab7ed071a60e3fff\",\"maxOpenInterestLong\":\"0xdb713883489ef68a34f4265dd67dd8ae5a894b561ab97190707af7bbb4ed53e4\",\"maxOpenInterestShort\":\"0x655f2ec62f3aac30b58ffd5344166576a5a3dd61bfe932698b513de2e11c500a\",\"positionImpactPoolAmount\":\"0x4f018bc91a6e38a32fa8a3219ce9bdb3d9156324a086661d74ad97d1c692a8de\",\"minPositionImpactPoolAmount\":\"0xcc5572591a70f9b3b9a438388a3148d2682011bba8b7734d0285e0f400242535\",\"positionImpactPoolDistributionRate\":\"0xc255e87804e204d36c244b34aea0a1f74975798d0c2ffe5bddb5d0b76dbf3e4d\",\"swapImpactPoolAmountLong\":\"0x80108b8899f0bb3222e1c901cbc2de622653a5724b79280d652c8b199cf3fefa\",\"swapImpactPoolAmountShort\":\"0x708275b4fcfc110fc518cb09ece37eec17f5d577efb5c1933481b67576a87e0e\",\"borrowingFactorLong\":\"0xeae7c5fc25204d7315f878e1249ff67e2db2db5c2e7d511a3797202d094cdf9b\",\"borrowingFactorShort\":\"0x0b9c3b324f415e7220a099bb10376b42f387881c105248099dea22fa038aae1b\",\"borrowingExponentFactorLong\":\"0x6f25bc5c85281ea16831a7735debede39dd3e75a1414e60d0afd258483a058d1\",\"borrowingExponentFactorShort\":\"0xfbc607c98f9164a2ca729b8b1820149cca58ae35cf5f30e25dd97c4d2f4ef02d\",\"fundingFactor\":\"0x402b09ddd11d6e70990c40bbd8a89439b9d2b9ff7bd0de5d89fdc4319b953ef8\",\"fundingExponentFactor\":\"0x692d7e1e2473d5a267e4ff716317b0a8aa117cf37bd938d22212e6ff3d4a9d12\",\"fundingIncreaseFactorPerSecond\":\"0xbf9f749b412d9d0fbd0ab1f782c5d94189754c87aeb82e25f2f7a7d7e7650614\",\"fundingDecreaseFactorPerSecond\":\"0xa34c615cabca6cd973143be3ec4ebd4c1888a75b12ecc88f55b588de1327a8e7\",\"thresholdForStableFunding\":\"0x11436632bc7f0e17d051650f498db06367baac4d2c5c42e129173a7e1e44c2d8\",\"thresholdForDecreaseFunding\":\"0x4166e1cf33010f2ca643b2acecd79a1933d7691715af21db029b228449bc7613\",\"minFundingFactorPerSecond\":\"0x13ecc4bbaab7ad05006595e65d421b8e16dc8dd254cd4e2b98efa38f6c2f4e3d\",\"maxFundingFactorPerSecond\":\"0xc3d8ca914f0cc679122fb0f2cf851dd828b598d7d60d3b5fcc56ed86d8cc33fa\",\"maxPnlFactorForTradersLong\":\"0xea0ab7ba61168c2bee279288a503df6416568c2bbabfa80fe953fe824954d628\",\"maxPnlFactorForTradersShort\":\"0xab9ca42c0baf668370ea036fec734f4badac8b93f7d98bf8aca0c7bc53e3a100\",\"positionFeeFactorForPositiveImpact\":\"0xe5e2c324445803bae980161bc19f60163527312fb3ba12a69c42ac9d2d1ce824\",\"positionFeeFactorForNegativeImpact\":\"0x3c8892db6ea33607529e998daf052e2d7631399762ee3d4ed1dc0ef43290fa54\",\"positionImpactFactorPositive\":\"0x3bea7fd67f7eb844908e5e28482f18674e6bba80493bcac40694608c91afb23a\",\"positionImpactFactorNegative\":\"0xe6d8bca55d639e4693467c4031793f201d42fb885127ca38006b4948dd7af1e0\",\"maxPositionImpactFactorPositive\":\"0x4263f2ff7af12d6564bab215180503848e8bbaae4bf39c4e6e4e5d73b9a8add3\",\"maxPositionImpactFactorNegative\":\"0xf398b3bf767ae253c3dcace78389d530c601ae67be971378528e0b5a0bf2164d\",\"maxPositionImpactFactorForLiquidations\":\"0x8fe8d9a666bd04e67d114209c1926e70a58a132db2beeed4177f31ae9d0318c3\",\"minCollateralFactor\":\"0x6a8d715582ce7a436f0926fce0f99d60dd260a473e14babbb4560315a488cc1f\",\"minCollateralFactorForOpenInterestLong\":\"0x6d844c42863e83e23fa960ab45a1a5696e1be08fa1e4e772366172c0ac93229f\",\"minCollateralFactorForOpenInterestShort\":\"0x47f7b3459fe7e68075e8c6444215e21468de24ee4f0fdb3ddc04af016f6755b4\",\"positionImpactExponentFactor\":\"0x6193f8d462c3326bc8cb666374837667c596f93cd996cffbd81668a636843061\",\"swapFeeFactorForPositiveImpact\":\"0x2fc46450b98092e9b66e0bf7696ce02d4c833be88de497cfb915d3f39e3812ec\",\"swapFeeFactorForNegativeImpact\":\"0xb37a74e4f029bbab4db5c9a9bf086565143dc8e25ac8cd13909d079fb770d4c6\",\"swapImpactFactorPositive\":\"0x027553df27e8e9b5a65bebc5f963f76e85ff58fb8d9c1ae933ca099379ca4b60\",\"swapImpactFactorNegative\":\"0xb75f6793ffd5ebc77458bcfe941d32c2939bfde678876cb5795ef174242a34fd\",\"swapImpactExponentFactor\":\"0x3db9029b93780175fc0b831246129f3a2dd55c2f32d7f03ec0802bcd1e83a748\",\"longInterestUsingLongToken\":\"0xde6b2c704495e4da9200eefa54306c7d8eeb5fdfebb7354ccd917e05305d75d1\",\"longInterestUsingShortToken\":\"0x51b9e7c53dcb1d29202e9b012525628fb2e5ef74ff296dba432ce000fcf48373\",\"shortInterestUsingLongToken\":\"0x9270d6ad2bcd2e29ab4c9f0a583865c35c28f7a501428d5ab578f047a42bc49c\",\"shortInterestUsingShortToken\":\"0xeaea0ade96ddc0f16be6622c269b0fbe27a0e00527a335cfb6c04353bced0036\",\"longInterestInTokensUsingLongToken\":\"0x5a85041ad5fb01b6d5206730a1183aa245e78f099916dd3ee93a31a45f241268\",\"longInterestInTokensUsingShortToken\":\"0x71d83c4044b5dc60c72d1fa95ee9c838331654392ddc2a0bb9702f77b0599af6\",\"shortInterestInTokensUsingLongToken\":\"0x6a1218266e500c5d8a88eb67250e8aaaf07ab27f17b0beb62793e384378f02af\",\"shortInterestInTokensUsingShortToken\":\"0x17d54d9e031554c4305cd029b2687ad6d2aa1a309946125997f4f746a185c7d5\",\"virtualMarketId\":\"0x682b13e4eb57bc482b33cd2f48a9c3fb262fb4e645cab8fc718a866f7ca7b83b\",\"virtualLongTokenId\":\"0xe72465f260a5f100354daa20326f641873d2ee6b58b8697cc900105b58981005\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.ATOMUSD, + "{\"isDisabled\":\"0xc449d45abeee4d6989a118918991b90297b8d25be5f150def433ac5820db5c7a\",\"longPoolAmount\":\"0xcd12daea074a5dff980977bdf609fae1ad3cb3cff86b2c3cd32fa619de6d599b\",\"shortPoolAmount\":\"0x6bb95f92b7415e0646ecf584f9283ef54f1a58bfef7fa1ad637d72c2e0507bd2\",\"maxLongPoolAmount\":\"0x2d3a492a72424d4c7c13344dbfadb3801d77685becb19c822af3e9659215e0e4\",\"maxShortPoolAmount\":\"0xc2a2520a542fe97f34a8ba34761ece112d54b5db49bb72a95bcaac6458b37eee\",\"maxLongPoolUsdForDeposit\":\"0xeb0b25ff20dcb6801b23043589e08010abbc85aa8ca517067189f2569ae22da6\",\"maxShortPoolUsdForDeposit\":\"0xbb56a9f5e5053d96ecb98e2a6507f2f74c000f96604ca9f37326d8536a37190c\",\"longPoolAmountAdjustment\":\"0xd535d0416d824c2dcc75fc4cc6b705dc005edf148655cd9b8ec8585aeb1c0854\",\"shortPoolAmountAdjustment\":\"0x016c2dceeceab1f9efc9a0bc5c55cf2b03a64037ad77b48a338ca9f77f6baf4f\",\"reserveFactorLong\":\"0x4959cae4852bbe7bd7098d8d537cedab036f12956dcf55cff8f76909d2200957\",\"reserveFactorShort\":\"0x0a318dc81f7f1795d47da970a606c903326ce7087b7d836132a5fbbeadc57418\",\"openInterestReserveFactorLong\":\"0xfdae1f05d9d02268df647c589fdd9aea9bfd69872a9891cd4f3b48a153386d53\",\"openInterestReserveFactorShort\":\"0x4bfe61793ed50a2747bf5e51550d82249ebd9fdd1db9c4d4fd4d1ce217254949\",\"maxOpenInterestLong\":\"0xd8871f2955e887876d0c65f23dac9a4100507af1dc1adda8fdefe91807631ccd\",\"maxOpenInterestShort\":\"0x9c126025133b8ff440bd5d6c26296c2aa54e674b5ecaef544e261e445d320147\",\"positionImpactPoolAmount\":\"0x8c2dbc597225b9eb6cd0f2725cd63c89b1315a63ca4a7de9e48ab0b3dffbd778\",\"minPositionImpactPoolAmount\":\"0x718462076049eb871c946a1dde912d437fabc92ef3a7eca7abae97006da05157\",\"positionImpactPoolDistributionRate\":\"0x5975f347f3ba1f9592f650fade4b4d417f99d3e7f7427b69a4047ad6ed8266e8\",\"swapImpactPoolAmountLong\":\"0x066eef78c129c9ee52c021563cfe3ffc2417e6ce9d8189fe0ca73a41968cdbde\",\"swapImpactPoolAmountShort\":\"0xf4f8d60549bbd52cdcf5cef3f24cdd2c7a7a6d43bfb1062e4c6b2a97a31ea392\",\"borrowingFactorLong\":\"0xb682798d304203347953ed92d82b32d6e4c5042f388df81b5b5d7a2b5a2fab14\",\"borrowingFactorShort\":\"0x3e62195b7fe1a7dd3d7f2e020c0017ad656401f9182095bff1da06eb629072dd\",\"borrowingExponentFactorLong\":\"0x6ae1f6eb2950a60f56ef0507698007b27c2743f50c6343dbdb64686f1e5935cb\",\"borrowingExponentFactorShort\":\"0x20a562f14a3cfcb8040992bebbb424cb3d905dbaa0a4829f2359c46f76b06b0c\",\"fundingFactor\":\"0xece3b641944681dae45bc9aee4e7c75ec015b7559a56849fd1858024c59dd92b\",\"fundingExponentFactor\":\"0xd4ecb89d1f2b2ffe3e4c7971c77e3859fe1a776afc086fd6a1e7fdc00b7d45f8\",\"fundingIncreaseFactorPerSecond\":\"0xea4cdb244fe76a9d01a1bc6d0dabf6d999a9a180725999ec393c6fe27d8fb1b7\",\"fundingDecreaseFactorPerSecond\":\"0xd35971ec977cd8bafede1f8dbbcdc32f755bc76427538fb6fd45153dee937662\",\"thresholdForStableFunding\":\"0xc4c912458efa7f5b518bee2eab56d7dac6c8f14604dee5c00950214836cf12ef\",\"thresholdForDecreaseFunding\":\"0xb940efbcb9813eb825f866f95f0350fde86663083329d20d12d03d4c8d44e3ed\",\"minFundingFactorPerSecond\":\"0xe84b4ce3d5f88c3b775721bca55580ac828bea2bb85caed7f03b8d3b3eb4aedd\",\"maxFundingFactorPerSecond\":\"0x55069748b013aeafed958fcb91ec1fd542ea8544b742f6eb55c55776ac9f35dd\",\"maxPnlFactorForTradersLong\":\"0x8eb7ba2e0073ed92d420187aebffc7b087a92b226be547ff071f08274a0a4bfd\",\"maxPnlFactorForTradersShort\":\"0xd16159783f2f3480377b1016b40459ce05c08c5dba1055f792df1a4244251f45\",\"positionFeeFactorForPositiveImpact\":\"0x0c5805974efe868ce0ca027b4a7633ad68158550b1bb97bc30278ebbf228c14d\",\"positionFeeFactorForNegativeImpact\":\"0xdb16d4b4d8013bcc93d01321c277effb94bf6b8550cc8344b7b66819a29638fb\",\"positionImpactFactorPositive\":\"0xb11d8986c9d5f1ddb9a54c87c508436447121d439f07f9095a366cc5cc07527d\",\"positionImpactFactorNegative\":\"0x37dbbde80316028bcc42ab769e2d1dea559042641b0ef5e7e8b2c9bbdc92d21a\",\"maxPositionImpactFactorPositive\":\"0xc48d8c6bc423b09532b41f9989b3379cf2f045332ff8653091fe4d7269132d16\",\"maxPositionImpactFactorNegative\":\"0x56c740c2ca614eab1d549b7bb7a4f6288cf040a585c97ec247670cc345d4ec91\",\"maxPositionImpactFactorForLiquidations\":\"0x73aac72421893e1c0d682fad9aed3749e082ff69084394c9acc9b4ed0a0cc3b1\",\"minCollateralFactor\":\"0x5b9cbe70edfdfea83201f44a0f1c912fb82a4a1ee106f9a3842bb29cb5301035\",\"minCollateralFactorForOpenInterestLong\":\"0x2a50bf17c53f122cad04b207535a3c74b062687e8c8f8657ea2f927b501c1062\",\"minCollateralFactorForOpenInterestShort\":\"0xff365ea9e77f3aff0dea18e392461b9ca0e3b42051708fa32969f77d5ca76b87\",\"positionImpactExponentFactor\":\"0xd0d2c3fbe177c70b48f1f2866e4a15ccedeae13f3e7c96726a6e367325a045dd\",\"swapFeeFactorForPositiveImpact\":\"0xf9e19bb3189d432360663917ab7316f9eb15e32ca0fc81158e76cdcd51084b52\",\"swapFeeFactorForNegativeImpact\":\"0xe5f10a8eee33843ebf12cef81e4141d649bfb8c2584c80c0fc1e71d1e32d0d0e\",\"swapImpactFactorPositive\":\"0x51f43de19f522a77191e09d4d845cabc4a6b411ed843bd7333c97c0dd2a1e99d\",\"swapImpactFactorNegative\":\"0xdb943b0a66e6c7d34998c8e3ff6ce90d1f79df2b550aac083000d80ca80b1277\",\"swapImpactExponentFactor\":\"0xb4650d732840a970384403281dae1ab9569caa614bb95e82e845e5dbdec3f3ae\",\"longInterestUsingLongToken\":\"0xd74534dfecd7d84eaeea268fdf1496d67bfef2d8daf6809fe2b8de1247f883d4\",\"longInterestUsingShortToken\":\"0x4d151c41b16ff06e727d2ac633d07397bd085658119e0b61028ddf5041f8bea3\",\"shortInterestUsingLongToken\":\"0x098aebac5c46e39ce4347f939e11f06e4ed2902bf679f9a74825503cb5b803bd\",\"shortInterestUsingShortToken\":\"0xa04f897d09467d48975d46d4c76e2774a11b7755ae7eb654b7987c72b7aadefb\",\"longInterestInTokensUsingLongToken\":\"0x2b779863111f19ab87ec102b0760317e0e020efed927bc4c5b1f453d9f6bc584\",\"longInterestInTokensUsingShortToken\":\"0xd3d186bdbd0b37c40df68626bb1e1d55efcbe686f254abe86a3fe202f1713091\",\"shortInterestInTokensUsingLongToken\":\"0xe6db6541b13adbf38cbaa28116c235533f7be17d6e31c541c48a7c13d1354257\",\"shortInterestInTokensUsingShortToken\":\"0x31868ebc44d62b9411da4ef6c64ce3313b6ca83961bf35a5249c9957865e9860\",\"virtualMarketId\":\"0x682be80fbd5b14f1b05cbea1a5e3eef02bf3a52c7e8f908903d6eecf1e1fb093\",\"virtualLongTokenId\":\"0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.NEARUSD, + "{\"isDisabled\":\"0xda6f27b51a3534d74643ce6b7a83acd8431d25bf81fa09a1eb20a4127d66ec24\",\"longPoolAmount\":\"0x0c7ed603364e136dd642e890a1368bdfa9b16ec42dca0b4a73900cd045a83725\",\"shortPoolAmount\":\"0x9205d9f86188139db990b049be8de4fdbeb464eb94d5ee5dcf28584246f694c0\",\"maxLongPoolAmount\":\"0xef4f443f8d8a3af9a00bae8337664ea49126512f0491158bfda4d294b877842c\",\"maxShortPoolAmount\":\"0x624b26cd3400ca82e218997da9deb37a448529d324d656b68323a0e424da479c\",\"maxLongPoolUsdForDeposit\":\"0x6d109b65036ff66f517f9dfa757532b95fbcd02537c4594275450f6aa86d1e2b\",\"maxShortPoolUsdForDeposit\":\"0xfdc403c04d446af9e5bdc81dc5396dd557b75575ab1414c7103fce0c3423ab5c\",\"longPoolAmountAdjustment\":\"0xd3dc79af22d17188c7000d4b955bdd47c3f0842765c98dc4f0967135c08ef9e9\",\"shortPoolAmountAdjustment\":\"0x1ba76d3b2bbdf19d17c0323f31ec835f4fc62547c764f8ada71b925b4d8ac823\",\"reserveFactorLong\":\"0x3d4877d86175f53799446bb2b013b6aa134e5859247ee3408c0daf972c085db5\",\"reserveFactorShort\":\"0x2a522e9d2efcfdca342e80206ec9f2142da2480000caa9d81a292ce75166fe70\",\"openInterestReserveFactorLong\":\"0xe6d0736ea27358e0c989141cc0613863ec26b60db37d0eedf1d287d080500881\",\"openInterestReserveFactorShort\":\"0x2733f6a71a470306a4b4f2e843ca4af613b4e68cfcc66cadfad93b72ffc9eebb\",\"maxOpenInterestLong\":\"0x9528a62c5206eb8d9e2e2db3d73ce6f2421d9fc349c20edc836d5101499875bd\",\"maxOpenInterestShort\":\"0x6ad150f244fe2d3246e42a80487e6fde8444ac3bf6051fc80b78a6fe66bbff67\",\"positionImpactPoolAmount\":\"0x9bd63eb842401cfac7678dc0bab59c9b924375c7806b54b6872ce31d6bc36745\",\"minPositionImpactPoolAmount\":\"0x7830b72edfdf54dacd2b318deeceb6013c57d86c7c978c5ed21cd0eb9018e3fb\",\"positionImpactPoolDistributionRate\":\"0xbeebad4363d64226a2844b9e519e11658d57ab47c0dee05a723d71bc8814f912\",\"swapImpactPoolAmountLong\":\"0x5b040b6ae6d4bab8e3b6f9b863a20df19026944a0a0ea9fd54ab5b8696afbc3e\",\"swapImpactPoolAmountShort\":\"0x0ed05bd869a1461184f3afe2fbe36650489dc9668b90901b5fc6f46cb65724b0\",\"borrowingFactorLong\":\"0x87a38100c055e9fbf58f95c1c789a3c595452c7590e11b8e3baece9ae661fd2f\",\"borrowingFactorShort\":\"0xa7f2577a57fc42029a6db69e9c860ce1ee7a06863bf0527ed7cc2c7eceeb7bdb\",\"borrowingExponentFactorLong\":\"0x37fd94700dce079c9cda703aab8c7bdbd64cbb35b283e3b712882321c23bbef3\",\"borrowingExponentFactorShort\":\"0xea45a28654641df56dd0169aeb5e0053cf00c514bf2b31161af6f4b8da76b47a\",\"fundingFactor\":\"0x2ba9f36b9edb678880a9bfdce61a9988b5a3439ec7569c905d7dde7bd5161c29\",\"fundingExponentFactor\":\"0xb1dd6e7c119844833fdfe0f077d043a0fb4949dc14710e5be45ce4e3f33f3092\",\"fundingIncreaseFactorPerSecond\":\"0x1ae33b17d208bf7b519b24dccafb3b940c7be96e524c2670ab5d822c08a5ddf2\",\"fundingDecreaseFactorPerSecond\":\"0x03c5f4722a30df6ff8a427fb917aad7fb63b00de6848d2235e304df5de0fb0da\",\"thresholdForStableFunding\":\"0x070aa65a40d69584436301e1f656e348348a25d80e223894a3a61e0ae55f31d6\",\"thresholdForDecreaseFunding\":\"0xd39cb0b7df8f78f1c0d2f5b6c64bc423f974d17f0db6e57e201a517cdc51d7b9\",\"minFundingFactorPerSecond\":\"0x24c4c036c8ff6b7f5aa218f5e001841c12d0337781048b80aada3c666015741e\",\"maxFundingFactorPerSecond\":\"0x62aa103c40f4782518c92f328ea7e13953221a344bbe17e1182069e74bdccd43\",\"maxPnlFactorForTradersLong\":\"0x5c46a769b0e6fc8e1900598d8b17673417a9f295712f0839f2ba621fdaaa1420\",\"maxPnlFactorForTradersShort\":\"0x3157f0b83f7f288d4345b32021f8625dd0211a0bb3a856869d8449883481df51\",\"positionFeeFactorForPositiveImpact\":\"0x8e1966a3f947cb6695cd3294ede56aa8667a859843a47c8a1dfa15355ae302bd\",\"positionFeeFactorForNegativeImpact\":\"0x3d52d46103b4fd7fe8a8d527bf5a484d3950554a42a2879766c90dcaf48541a1\",\"positionImpactFactorPositive\":\"0x7938767f73461676c26d5a862999ac1f38ce4efa8b026f6ac6b1e8df69c4a8f7\",\"positionImpactFactorNegative\":\"0x9028c1019ee95416ba45534f1a394daea60dc7fdd77b5320961b263773789bb5\",\"maxPositionImpactFactorPositive\":\"0x8cc0069408f08a8a1e914d23f0bd90ab2edd81dcb73ba80808c1cb161d7f866b\",\"maxPositionImpactFactorNegative\":\"0x8326d13e731e4a06711e304528185e6df2a513e097f53a509c44e802ebc0c816\",\"maxPositionImpactFactorForLiquidations\":\"0x3ffd3e2d8443b5c30958a5bac0fdf3d6c024ea77777f91dea6aeaeff923797cf\",\"minCollateralFactor\":\"0x69a941e84ede0f13d1c7a57eb687f63ce8927eeef908b0e1e8dc22f9fda6c050\",\"minCollateralFactorForOpenInterestLong\":\"0x9a7f1df75521d5245272629ae3d633c5b1df32b56dbfb7bcb79f6ed1783f3207\",\"minCollateralFactorForOpenInterestShort\":\"0xa3964e38e2bfad919081510f192eb40d3c12b8102f229d74230e94476af37ba5\",\"positionImpactExponentFactor\":\"0xc59aff205787697cfac1654c750728376206127692ee4e7134bb41d79217bcb6\",\"swapFeeFactorForPositiveImpact\":\"0x3364c0f9fc9f8bb96a1008c317d26b51f20c5ea1d1130799e4662d8c4a7bf3b9\",\"swapFeeFactorForNegativeImpact\":\"0x305d6a42c6ccdab58c16ec512fc0b9394bf2dbdf82516c15d09cdcb76085e4b2\",\"swapImpactFactorPositive\":\"0x6ca9dab5d892a8a0c799579aad85021f29ddde1c808da563752093e0ddf2d4c7\",\"swapImpactFactorNegative\":\"0x0a2d863399db84d689cfdc9148b1a486ad96583764fdf636a66862500cc51b96\",\"swapImpactExponentFactor\":\"0x081a97750956cc6250ce06858d4427b11c1f050d0dacb64792d92f18f66a8da9\",\"longInterestUsingLongToken\":\"0xeae920ece94c0d44f4f87a95f8aca43394956b46823a6dfe03a441f9a07fc44a\",\"longInterestUsingShortToken\":\"0xe9a0e8ac805006ca6a0aee08fabd43b1fe6b73a9220af7a0c15d054c7992121b\",\"shortInterestUsingLongToken\":\"0x783978c10cdfbb256b9827e0908e516828513a8324b6e8ad1e8875f70b64c0be\",\"shortInterestUsingShortToken\":\"0x233b335a93940eccbd71e31e278a35c26365d06ca74b430325c03333a9212127\",\"longInterestInTokensUsingLongToken\":\"0xfae04bbcc57e01f2d9a471cbb081d7d518c735494c40843f1da56df76009eb81\",\"longInterestInTokensUsingShortToken\":\"0x76a58e421f426a55be12fb2d1b89ad13f0545e82444ab24f37efb8be6754ef23\",\"shortInterestInTokensUsingLongToken\":\"0x094a090e3b862aa2a7306ff78115c15b7896524f417baad635920828064397da\",\"shortInterestInTokensUsingShortToken\":\"0xc8b3585a20312d87490906048e5ae90c4ddcc4f5d48f6a04b3ca6b67af36d9b7\",\"virtualMarketId\":\"0x1b85db12d28f55ab49eac5c82867a61b99fbd1658d56cba37cc8538120c18520\",\"virtualLongTokenId\":\"0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.AVAXUSD, + "{\"isDisabled\":\"0x37f133fd29f19aa132b67b37a32cf5dd0c1fc0335feea28191dbaea391908459\",\"longPoolAmount\":\"0xf38d9d336808665d9e816eeac7d42e3788ae2d9e312f28c0237cc42fece2a2e8\",\"shortPoolAmount\":\"0x064746fd83c624e5534e3b3eab563607df1d922e489932a0eb5f4dd56ac44e91\",\"maxLongPoolAmount\":\"0xe2e00fde0410deecf69b30a6ceaa2ac64cb550b2f06825bb54427657dd16525a\",\"maxShortPoolAmount\":\"0xb13020fd6d863e44055fd2ab14e7532745ce473f1d8152bfdfb0ae956c41dafa\",\"maxLongPoolUsdForDeposit\":\"0xdc3ead598f0d2baa900d0cae632c96696e1b8bd63b1e585d9a4e1b20c527f124\",\"maxShortPoolUsdForDeposit\":\"0xf626f650f71f86a1110dc06d2dd20c30b798056869ebd550493ad1e18195c616\",\"longPoolAmountAdjustment\":\"0xd0f13bb49c3ce6f4aa3b14bb6f1f3cdd3569595d37a721bd1cbc8b105ffd3bed\",\"shortPoolAmountAdjustment\":\"0xb7105c2b473d388b9564d4cf92ebf102e35475feb34e399190e15a8402eb9453\",\"reserveFactorLong\":\"0xe365962def257c0197c21509b0563974200c951567a224b2bee630dcc9390a01\",\"reserveFactorShort\":\"0x9c95664de36e3b90a62a3ed43ebd43c109fbd2dd31a911033df84cb51316499d\",\"openInterestReserveFactorLong\":\"0xb1929b4558965c059ea4c201b0958c7c5102481eb4803689a9055f9d56fc2b1b\",\"openInterestReserveFactorShort\":\"0xd426d9733944956aa6db3f1a38facec294d237e0b2d2acec99391cebde9dbf82\",\"maxOpenInterestLong\":\"0xe3040e174b457b6f16fe1c15a92b50d0fd1edcf8387c9db092cccb2ae14bf965\",\"maxOpenInterestShort\":\"0x35a7856186177dd2008b0fdb956b6904d109724c0b426af18fd17c09048837f4\",\"positionImpactPoolAmount\":\"0xe3f26e825f76214ab0c7c99535bc12c87061ee1f8d799488584d4cc0674f4f2d\",\"minPositionImpactPoolAmount\":\"0x80a2f4bb28e340abfefdcf3c9e41464c4951363dc6d9a6e6fdf4f09e4f1187c9\",\"positionImpactPoolDistributionRate\":\"0x668c745190d2f5070714958681a329d1b73c95c402f1ca1986b1d09092765d05\",\"swapImpactPoolAmountLong\":\"0xeea45ff77b9abf6cbb9f5f5d2bdf38145ea0ba690af0fa3c9a28d0c190000860\",\"swapImpactPoolAmountShort\":\"0xd865cfdbfa6836318d3f702b50fc0f64387c70582a099f8d3e2d5f3df4382cd6\",\"borrowingFactorLong\":\"0xd5e5b22167c99e5d9aee4032bb7c8f519219bb4a6680f0877e3b052a0f81729b\",\"borrowingFactorShort\":\"0xf9d28a58b5ab4c0b47a1382588fad47e7a340bfbb8464abc8bd16901069544c4\",\"borrowingExponentFactorLong\":\"0xc1520be0b79841918b653d8d2c162f5c86850514ed0f594b8cb94ee2c63abea4\",\"borrowingExponentFactorShort\":\"0xbe8b6d833a170eac0fa29d6d07060f35561e64f5c7068ceb89d2c33e7a8999e3\",\"fundingFactor\":\"0xe3eee9e2a35c490a627a465c9829cb1e186f1fe8fe8cdd85e1eaab65248b7867\",\"fundingExponentFactor\":\"0x9f51caeb1c1fbfc122ddae0ac2b6ca923729046910930d50bd4812e2c584eafc\",\"fundingIncreaseFactorPerSecond\":\"0x72c0b098bef9137aaec1c66adfa6394e31cbc5f3ebd56eefff4e7f94f501d783\",\"fundingDecreaseFactorPerSecond\":\"0x0edc5e78789167ae6f0f987c4eede5a28ad9c03efe9b3b660579458966d4d011\",\"thresholdForStableFunding\":\"0x7a61b093118e29c58afdc7abf588441554ef438d4b2fc030a707f307d42b420c\",\"thresholdForDecreaseFunding\":\"0x24720246bc20a5fbbff33b5f4c286c2a61a0b38e5fb3f492cff4327e544f16bc\",\"minFundingFactorPerSecond\":\"0xe48176d45903cb6943e6090d565d426f8cf3106d2f209e5dc65d5d239718fbb8\",\"maxFundingFactorPerSecond\":\"0x2e363ac3de945f9e347a42944c7ddc509c53f8ce07b05316181a4834368d4af7\",\"maxPnlFactorForTradersLong\":\"0xc2b6ba297e2818e9751c3039ff2071b2ae3b4d72dee96205fd6c62cc9545a5ab\",\"maxPnlFactorForTradersShort\":\"0xa7db2c7ecf2ff216c4276556a88d852ea7296c5da8839673baa4f00f17e708c1\",\"positionFeeFactorForPositiveImpact\":\"0xd777c5b4d55d87e7a3876930db0af4b021a643cfa9070d896e77bda6b5681d6a\",\"positionFeeFactorForNegativeImpact\":\"0xa94fd16219d3c4b400807acb21ef6ac91bb6f1870bca3cb5ba5a19dc4f6e6c9c\",\"positionImpactFactorPositive\":\"0x644525ed476f4be317620be6a478b562b0de82d724dbced4b69c638ebdfdec79\",\"positionImpactFactorNegative\":\"0x1d5d8012f2837929e603657bc2d70a612947a3a1926d332e48e709b209d90f9d\",\"maxPositionImpactFactorPositive\":\"0x5319f499876d4621e715dc632e7d7cb3933dc765ea1acf8d430e17a55393e986\",\"maxPositionImpactFactorNegative\":\"0x7e416f0acea3cc9622087968a015c15cf9a9039935214cbd69d6e7a2059f93fc\",\"maxPositionImpactFactorForLiquidations\":\"0x1763e966632029c1f297e56d1a17944619af4ac6276c6f897ecd10bedd501f28\",\"minCollateralFactor\":\"0x658da6dd132bb7e1756b246c646e4f3681462f841ea26f37d83a1bc7a7c640af\",\"minCollateralFactorForOpenInterestLong\":\"0x5b29bc756da04509ebef8e49358a85e1b080ee9d9b19f646413c7ec366643c4f\",\"minCollateralFactorForOpenInterestShort\":\"0xc386fa4fcdecdfd9ac1d63b2d86d391f4676ced1e3ddb89d47bbb629bfcbde6e\",\"positionImpactExponentFactor\":\"0x2214e49931ae131c89d827b277789c69bccf736319f9448888c99ff753982a5f\",\"swapFeeFactorForPositiveImpact\":\"0xcf099a51e285d31b3ded24bb284f311662deae9715dff06251f99a1a623a7c01\",\"swapFeeFactorForNegativeImpact\":\"0x54f7ac0acaf50fddc48a4d1687ef164394bd31f48441c86b9fea6d348f7d83c8\",\"swapImpactFactorPositive\":\"0x004df3c0dc3d5b0aef8045ddf6c7170646212a2708d9c8efd90d42aa68887f7c\",\"swapImpactFactorNegative\":\"0xddc46fbfef1ad897fbe83b4250c0e21dc33408f6035ed37f98b4349cac818569\",\"swapImpactExponentFactor\":\"0x923471186f28cf538007fd535bdbd75f7378d1331f6d07cd2a40276153e34550\",\"longInterestUsingLongToken\":\"0xc5a05fc7dffcb5e8c5ab847777c3b0fcf39b92682861b0b33c9a968d478ea882\",\"longInterestUsingShortToken\":\"0x0fcebba8d1fb79a3a41ad548531d7d63ff10c5e02ffe7ad0f4de6f1ef3351f84\",\"shortInterestUsingLongToken\":\"0x73ac336f73bcc69edbfe3cf757bbeae7a3469668ed25b06af61e9530cd7eb81f\",\"shortInterestUsingShortToken\":\"0x78fdc3e0340c99506c7425c6f2512369ea086c664163fc3182b1261ab41d70d9\",\"longInterestInTokensUsingLongToken\":\"0x4a523bc54a64f6c4d0cccdc04ced5034611f28ae4096d5e47d3c19fa8e991ff1\",\"longInterestInTokensUsingShortToken\":\"0x0b6b93203750dad76900500fb99c143db5ba5fd77bb5616eb6a9484bb6f93c2f\",\"shortInterestInTokensUsingLongToken\":\"0x2ed27ac4a95885db918f5daa16714aea15b98b8c14f6ab74d2636d5ce241d61f\",\"shortInterestInTokensUsingShortToken\":\"0x70fd311d85d4250234d0f1f25bc3dbebbc85117187595c220a482969ff67b02c\",\"virtualMarketId\":\"0x4e2463fdc8eb0e623472d4e6fb67440aaf8b50db715ff81c918dcf0a9b4f6e02\",\"virtualLongTokenId\":\"0xda567314a5104c9d1832b3d80c0f411685db2478bc7f0a7d8c607bc4aff2bebd\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.OPUSD, + "{\"isDisabled\":\"0x47ad9d41bf78222568388d91815ca45d33c3fbce708dca956a07ec40e9ea1863\",\"longPoolAmount\":\"0x8e8db35e0dbd89865e95b89d3436fc6f2ac82c6ba032bca3ac4ee8229b50f400\",\"shortPoolAmount\":\"0xc6a9a7bf6692f5a50366c3eb34316d46466e5dc95d7aedeb5ce6c5bfd2681bdb\",\"maxLongPoolAmount\":\"0xf836f86fa333377c6707732974778aec73b1507698d794308d3b34ec58645bfc\",\"maxShortPoolAmount\":\"0x9e9ae241036832a5f184407c222b31ce65f7d0e7a4b3ad6d93fe139c23860f29\",\"maxLongPoolUsdForDeposit\":\"0x3b24e4ea1aec213c99c0805eae35b42e6a1dd86fc0f7e1efc5cf87705a663d29\",\"maxShortPoolUsdForDeposit\":\"0x376edf6873a9adbe218f792fb6aef0c132027c432d0ff76ccc3768f2c185680b\",\"longPoolAmountAdjustment\":\"0x8402bd23f34524aee932454a15615f4d39ef171d9ec562717b3d685bcdd5363c\",\"shortPoolAmountAdjustment\":\"0x22d2937d5327e4186b3ac8774aa62d0bcfdf407c4880ee9f3d94c7d45d5668b1\",\"reserveFactorLong\":\"0x7287a470dcffbc2c5bda4769185c34e3cc00aaa207ec5ec36e1a88d208768da9\",\"reserveFactorShort\":\"0xab263cfc97448c25c573cf73d610deec79616a03f09453de76d7ba5c4bc3e014\",\"openInterestReserveFactorLong\":\"0x38f702462a67b9ca1b107dd2f00691b13b5b5955b7fa9b67d12834f820f4d111\",\"openInterestReserveFactorShort\":\"0x826fb0b70b6e3de63f99f5f72da87b5cb48a186b7c3fb5d709853f60390c123f\",\"maxOpenInterestLong\":\"0x61e01b267458cc968860c92409fa2cca8853647c5e9787d947de3ed8987766e1\",\"maxOpenInterestShort\":\"0xb6f6324e8cdfd5818f1fd0fe060723b0036d87ec2e813a087227ed582b114075\",\"positionImpactPoolAmount\":\"0xb759cd7638ea9c86edadd27a4e54e72444ecb5b702a690f37a93d44f8e14dd8c\",\"minPositionImpactPoolAmount\":\"0xc467e76d4300e0e8e9a56e529821ff275b89679ce46259a9285ccf5bf7517e3a\",\"positionImpactPoolDistributionRate\":\"0x7d3fe5c201f9185d7a79278ffc597f92641721f2af8298575fe33f3854ac8779\",\"swapImpactPoolAmountLong\":\"0x7ed4ec39ed6463bfa4cbd257130e6591193d8710e83222f0ce648c78370d67ae\",\"swapImpactPoolAmountShort\":\"0xd471bb7ae282f8b43462a25e12d8fb51d7a1646170385987f4fee2d5afdb1bf4\",\"borrowingFactorLong\":\"0x583b47435e1df1ff8e2a38ab3dc231b18ff08fcee84c6b600ffadf2b477eeabd\",\"borrowingFactorShort\":\"0xc7b8317a43b73cea0c701cb8ff3fc84cefe124c519bc0ad4628e467385206e82\",\"borrowingExponentFactorLong\":\"0x801c5dc9e50967b6efcdda178b5ff7c171cc7dc9eb1e03698fe1bbb879922cba\",\"borrowingExponentFactorShort\":\"0xc3574e8f83495d3499a0a142e9663923a6c3fe74fd9e3f9461ba42f3de1eca31\",\"fundingFactor\":\"0x400a02ae7b4fd8a9caafdce19846ebe8a338c85b046b0f0dbcc9992450b5d5ee\",\"fundingExponentFactor\":\"0x24f460306ac0916b9bc3b1a05303ea3378f99365963881f64a11e66e149fa9a2\",\"fundingIncreaseFactorPerSecond\":\"0x42c227ccc3735deb22ff7dac82bf7ff80051d7cb4439ba8d0ba3dae6a63aa519\",\"fundingDecreaseFactorPerSecond\":\"0x3579768cea1b1400c472249b201450841a1da809ff1cefa88a4090f0a8440ef1\",\"thresholdForStableFunding\":\"0xc37bac6412d0b30518d860bd87e0281aa07b41066e61e67bab9b031247c96a0e\",\"thresholdForDecreaseFunding\":\"0x2e231aae3d887f1b876996cd74f40c0a388a5d1acdbfaec0603c47f160152f96\",\"minFundingFactorPerSecond\":\"0xb32b4c131f8165df98626140c44a535fa403da1f06ded732498d7b774f366cb7\",\"maxFundingFactorPerSecond\":\"0x600ebc560d5b1d959a5561e38cfc1e6fbafa3f74e4b84d3c77c000003913420f\",\"maxPnlFactorForTradersLong\":\"0x48fbe5087841455da95914af5afadfdb9bff2c13381ddd257abb5a01860d302e\",\"maxPnlFactorForTradersShort\":\"0x22cd9499d49aeaa2f91b64be08489a3ce928b8022d46363d16d60d459b0d7f94\",\"positionFeeFactorForPositiveImpact\":\"0x97c1a448f396a50ccc22e2ea500e54434962a5249dc5a661d06658985ae59383\",\"positionFeeFactorForNegativeImpact\":\"0xddf9c6e8a3146f2034501e798506b8a353893e80b3de3748c74b87532f824982\",\"positionImpactFactorPositive\":\"0xb906177bd22906fb4855b38744d7322883feb6e061495886d5c12d0b8f810ccf\",\"positionImpactFactorNegative\":\"0xc75f07b39b2aaf3050d588849ef734198cff5801bfa21c4559b08a95e281f72d\",\"maxPositionImpactFactorPositive\":\"0xe38a3799bc01e41c85e5fd8df2d75f32af5e85731835f96bec4cc30adab2fe75\",\"maxPositionImpactFactorNegative\":\"0x409c6508fd9685bb329819c23f0ec5e609025de5ee993837362348919dfb86b3\",\"maxPositionImpactFactorForLiquidations\":\"0x49704998ebf84402cb8e86f8e617cfc500631b77d9589d637e25350c84582f29\",\"minCollateralFactor\":\"0x99b3701cc7c1265785f49ccd881b41099fbe598b8eec779a1cb9f9d0ab47c538\",\"minCollateralFactorForOpenInterestLong\":\"0xc711c4d6d1307e7c53adb1d3e70e48374818834facdddda9f3aa07ab3b84b6eb\",\"minCollateralFactorForOpenInterestShort\":\"0x43728b39e120b4a41ea9f74f87206a5de82c1fd6020b9c20e8a12becd690628a\",\"positionImpactExponentFactor\":\"0x58ff383b5858a0568214aa46f74f6c6acda40c2de4e119a9fc703e6e9f883533\",\"swapFeeFactorForPositiveImpact\":\"0xc88b708cf46980ee7b53f2d31c02cae3f4097451afe3d262d1ae325896e2fb2f\",\"swapFeeFactorForNegativeImpact\":\"0xae26f90162d5a9dd0c751088ef6e3d8ad0a4e4d4296c92959aecebe6eba55438\",\"swapImpactFactorPositive\":\"0x9afe4fd264c1db9a7311ade7ccd92b9901cda321ff91dc4a544e60e9aefdd403\",\"swapImpactFactorNegative\":\"0x24b8ea4213ef6ea1381eef1d22c8be6e6a2776542043f94cd0b75451e722acc3\",\"swapImpactExponentFactor\":\"0x4436d7db87e33e8caf71800781dfda7be283203615038a5bc6bad07cdfa8ddeb\",\"longInterestUsingLongToken\":\"0xc727524556a6bad1ba32e02d56240c0b0fb789ed86d54691ec43b3cea0e7a7df\",\"longInterestUsingShortToken\":\"0x94c39cb2791e8886c7da98c00888b402fca49d83e7823ebd1ebdcbb8f2d82541\",\"shortInterestUsingLongToken\":\"0x3db15fd09a1da9df8d2cdeee3dbfb896f6aeca4184741ffe5651c74094b89914\",\"shortInterestUsingShortToken\":\"0x8afe614f87b107d50db49ac051f7cae85671d52466c575bcc9594385e323db04\",\"longInterestInTokensUsingLongToken\":\"0xb6e094dca1db999966c2f038ae3c6bf3adc982a67f743831a3d5897b269d555a\",\"longInterestInTokensUsingShortToken\":\"0xeab6c1477eca85958d142ae7eea04ee704be4418245672d45aed7d4962c2e831\",\"shortInterestInTokensUsingLongToken\":\"0x53991c084903a295ead3977c7809dc92863d7b515ab58fbecc4e0726c4733d02\",\"shortInterestInTokensUsingShortToken\":\"0x83238b54cf7eb0849a3ba32e59e6a6dcb08409c25dfb643cb24c85ad4b1a4d42\",\"virtualMarketId\":\"0xdcb08bed475a372d58c8d4a4106e2d728aba9f394a7edbbfc9af501300fa7578\",\"virtualLongTokenId\":\"0xa7a9f75b7dbea0c14f881634e911f467cea6ed6b8b309892a16f6bb88196f4ac\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.BTCUSD, + "{\"isDisabled\":\"0xb8a7e23fdff208107a7b26cd4d279087bc702bf105aa0465a7b207bd59f7ed13\",\"longPoolAmount\":\"0xfcdac88337d561a2ce617bc3d2118d2e415b20e94b5e2206a1a00c2ae4982969\",\"shortPoolAmount\":\"0xfcdac88337d561a2ce617bc3d2118d2e415b20e94b5e2206a1a00c2ae4982969\",\"maxLongPoolAmount\":\"0x84654f983352393a35235f362b8e4416978a11bf9f7e392453fe8d9094f878b9\",\"maxShortPoolAmount\":\"0x84654f983352393a35235f362b8e4416978a11bf9f7e392453fe8d9094f878b9\",\"maxLongPoolUsdForDeposit\":\"0x3afcc1a93aafa417b7ef751cc7467d330c8c473359b617e2d77349fd4a8f7043\",\"maxShortPoolUsdForDeposit\":\"0x3afcc1a93aafa417b7ef751cc7467d330c8c473359b617e2d77349fd4a8f7043\",\"longPoolAmountAdjustment\":\"0xf5eba6d704dd5bcb627dbb0dc30172dccbd254c52d089a71f66b2633d4ff248b\",\"shortPoolAmountAdjustment\":\"0xf5eba6d704dd5bcb627dbb0dc30172dccbd254c52d089a71f66b2633d4ff248b\",\"reserveFactorLong\":\"0x4ff0c4325193101a3ecb3950dc5b118ed1a07a2455a54a2e2e35d73f679f226d\",\"reserveFactorShort\":\"0x6f311634950b830983054fac96de7c535351c97e9efdb5324e3365caed8db4e8\",\"openInterestReserveFactorLong\":\"0x0ccbbeb76e1a4f47e17937cdedffb4963a02f6379cafc9fc56d7ea9bad2cb952\",\"openInterestReserveFactorShort\":\"0xaafac62da9c69924c5a550f5dcef997c973f8cb79835efb71b43e0be043bd63e\",\"maxOpenInterestLong\":\"0xcd504f5f40fd13f357d44c42988b854a9de30b201e5bb082d58327ef9a02018c\",\"maxOpenInterestShort\":\"0x7661ed2388284d70ec7fe9260f0836f77002653c783ee0243740d60f05c5d67d\",\"positionImpactPoolAmount\":\"0x54f7cf9f5bd8d6aec7f60fb92166ef61761e8258b354f6baba984fe1a4d74b96\",\"minPositionImpactPoolAmount\":\"0x26ae3b832d2753124d7cf74fad467e7b70341e56578ebc5d136ba8de2e8fa11e\",\"positionImpactPoolDistributionRate\":\"0x04313f4c98bb35d9e64eb471ef94eff7fb769e0204cea09027bd90618c2a26fe\",\"swapImpactPoolAmountLong\":\"0x1317c1d423f449947601b89851ac236c3887f0633665467e5075a383d311ad0e\",\"swapImpactPoolAmountShort\":\"0x1317c1d423f449947601b89851ac236c3887f0633665467e5075a383d311ad0e\",\"borrowingFactorLong\":\"0xc3e7ec50fb1ef19ef013db0523e60513369ad361f572aaa9b10968930c121837\",\"borrowingFactorShort\":\"0x7c14bf81fda21f2512b50c441d0b986fdef17273b7b8d7995ba00188ab40b616\",\"borrowingExponentFactorLong\":\"0xa67201d3c5d9d198b1ac3bab37696e5bd5e21f22957f0c9a14bb670251db67f9\",\"borrowingExponentFactorShort\":\"0x26c2d60666055e27160ec2e0664ad5e4863dbd939d7ef27a99b7c12b663ab4c0\",\"fundingFactor\":\"0x0b6b206951154da2a2e46e7b47d1531194e01060b3169f98384599bbbd52d5a6\",\"fundingExponentFactor\":\"0x8b8f0a001ccbe2090fef54d99f3d2cd12555e2012a8c533e3560fd8113de92aa\",\"fundingIncreaseFactorPerSecond\":\"0xec0df726bcea04f0c32b519b29f76067a8b5348a3ecf3b8bd25f44137872c761\",\"fundingDecreaseFactorPerSecond\":\"0x66a133104a2afcc8d693b474615df610474a1b8a44a4efbf385b321177d87ca9\",\"thresholdForStableFunding\":\"0x86512217c5ed5b22b96b799987bac827cb91e89f1a623d088e3b1b23c32ed663\",\"thresholdForDecreaseFunding\":\"0x85a8ee1afaefec0f69cb55aa6aa42b6197e915f3364908372038841ce07bd88d\",\"minFundingFactorPerSecond\":\"0xcbd5cee538f38f56d9af56bf02fa1cdc93531e4d130fc39df18adef02f1a824c\",\"maxFundingFactorPerSecond\":\"0x791b8aacf46146f2c630c31e87150454705394d0ddee283d9a218093004c4991\",\"maxPnlFactorForTradersLong\":\"0x61205f138d458d410fb24113fddaf8bfb906c41a5bd1243e09a60bd3fa95e6ad\",\"maxPnlFactorForTradersShort\":\"0xef08c3656d3ce51df1b75f08a987d879463632460692bcda68e4ef17ebac29c7\",\"positionFeeFactorForPositiveImpact\":\"0x55eb1bd845d62653b5e99b5862c3604b078e1609942fddc47148214a9f1b6c98\",\"positionFeeFactorForNegativeImpact\":\"0xeab5b72f46abf95fba34f585b311a74eb14eb8c40d3030aa04e806881a5338f3\",\"positionImpactFactorPositive\":\"0x5639f816f2049a823282162b24c26bccad96430b6cc80cfd802a6e0a4daa48e8\",\"positionImpactFactorNegative\":\"0x64b33aa4893fc85aeec723156a0fc0c151ec4e7d9e8c3f2f3225e52cdc6f5453\",\"maxPositionImpactFactorPositive\":\"0xebacab0fccc785fffddf4ce399ec5f857e302fa137d3b3443f5a3153b5d925b1\",\"maxPositionImpactFactorNegative\":\"0x0a64b1059a69b7fb1f5738256b5d1009c654a0343331b552b0946bce23fa5abb\",\"maxPositionImpactFactorForLiquidations\":\"0x9f5eb4d0a87742d78eb809fd1c85d378f22e830e2155e4c130147b107606db2c\",\"minCollateralFactor\":\"0x505fc7c1a1954b72fd3b5f7f9b5250661340b75ce9e9044e6dd11c8da2d692db\",\"minCollateralFactorForOpenInterestLong\":\"0x7be7f22de8ae3c36d8218b44d06c5a126ea07b5bf1176ff4e90c34ccdae32302\",\"minCollateralFactorForOpenInterestShort\":\"0x49034ddfa16113a80d2c700f7fa75fee26f684beec367e2c7d7e4f3f08320bb8\",\"positionImpactExponentFactor\":\"0xd0316ba8768fcb3880ea8519def956514eb9bc7d1cd1d9805bc936e379eb8610\",\"swapFeeFactorForPositiveImpact\":\"0x3097eb783f61d26eb308b82a5f390ad8a3b17605c548f16f6c22a9e4a9d4fdfc\",\"swapFeeFactorForNegativeImpact\":\"0x8439bc00c0643f5214a648849ed64fad4e16c6fdaa17c415cec3232757a71e70\",\"swapImpactFactorPositive\":\"0xcc58aaa5866cf4113e41fc4df9e5ee80b1d697ae5449bb1aada134f5eb228cbf\",\"swapImpactFactorNegative\":\"0x02fcf4c3f06217571778935d3f7e97c3e8d72c50baa6e937265d4b9d3cb65b37\",\"swapImpactExponentFactor\":\"0x68b31e362df2067ef9092172713fce629e43c8fb3ae7c604fda0e6ba18967a4f\",\"longInterestUsingLongToken\":\"0x9eb431a8682f4229bfe56da1eb8a0bfbab809e1ab0e51325542551e5a63fd65c\",\"longInterestUsingShortToken\":\"0x9eb431a8682f4229bfe56da1eb8a0bfbab809e1ab0e51325542551e5a63fd65c\",\"shortInterestUsingLongToken\":\"0x2adc2b7ecdc640969dede0bddf00021f43531a3832ea1579bbb695826576b4f3\",\"shortInterestUsingShortToken\":\"0x2adc2b7ecdc640969dede0bddf00021f43531a3832ea1579bbb695826576b4f3\",\"longInterestInTokensUsingLongToken\":\"0x1e42b46d2a594b8936b13829f59a9bd155c059d02cdfc41f94bc5af0a9d83d23\",\"longInterestInTokensUsingShortToken\":\"0x1e42b46d2a594b8936b13829f59a9bd155c059d02cdfc41f94bc5af0a9d83d23\",\"shortInterestInTokensUsingLongToken\":\"0x2eabe340ea53f228c0287adcc754e91a05b79ba309bdfe69143b0f41be6d2a9f\",\"shortInterestInTokensUsingShortToken\":\"0x2eabe340ea53f228c0287adcc754e91a05b79ba309bdfe69143b0f41be6d2a9f\",\"virtualMarketId\":\"0xd8d68dd67fd4509abfc2afe7261228687df5a857867ce0a35bf860e27184d77a\",\"virtualLongTokenId\":\"0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f\",\"virtualShortTokenId\":\"0xa59040b7efb6b7122a74cb318a192ebc6732849dff5332ee3ba40b90dfa0a04f\"}" + }, + { + Constants.GMX.Markets.ETHUSD, + "{\"isDisabled\":\"0xa11facb99bb90360154b9cf8ddfe405e5706f36b6c435a70698686a7f2d5b85c\",\"longPoolAmount\":\"0x5fc01fa6dc5fd8a23f79276f7837c863afa42adc43184cab9f01aea4c7ae695e\",\"shortPoolAmount\":\"0x5fc01fa6dc5fd8a23f79276f7837c863afa42adc43184cab9f01aea4c7ae695e\",\"maxLongPoolAmount\":\"0xa6216f68f1ee28685382ab766fabd8398532ad41b358ec5ea8a3d38db6c7553d\",\"maxShortPoolAmount\":\"0xa6216f68f1ee28685382ab766fabd8398532ad41b358ec5ea8a3d38db6c7553d\",\"maxLongPoolUsdForDeposit\":\"0x3326be4089d11ec02c8c6f2effbfa5cdea20fbe474830f2ecbfc06d0f5cef695\",\"maxShortPoolUsdForDeposit\":\"0x3326be4089d11ec02c8c6f2effbfa5cdea20fbe474830f2ecbfc06d0f5cef695\",\"longPoolAmountAdjustment\":\"0xf9c13e51dcbf38a3b33d6b2a683d44a9761232267923d9aae10b7993215b5f6a\",\"shortPoolAmountAdjustment\":\"0xf9c13e51dcbf38a3b33d6b2a683d44a9761232267923d9aae10b7993215b5f6a\",\"reserveFactorLong\":\"0x02e5d3361e614a40d445ebdcb9ebd26d2c1e5b02afbfdbd970245343ed3f73fa\",\"reserveFactorShort\":\"0x7d4cdc5c53db8fa5d0f35fbded84d6d05231c22a5cffb76f6b7aab0635e7c536\",\"openInterestReserveFactorLong\":\"0xe3ddc2a7f56eda5e56cc8d3c17d6fd2e43eca0f8a295fbba518bf3fe21548ba8\",\"openInterestReserveFactorShort\":\"0x1968626f42054ac7a49410983f9e066a4ffd6a9ea95017e2b180c0ad37c2e772\",\"maxOpenInterestLong\":\"0xcc386b59735dffe597c731e54e9e766016b19a0f23bb9398c8a2f146548133d3\",\"maxOpenInterestShort\":\"0x877e9a262da69a28f910737aff4813d28c59029aaa14612197d49264822b31a0\",\"positionImpactPoolAmount\":\"0x45adab12269a091adc6eb7220af6ab173c7a9e1cf701c930a1cfc98f41c82122\",\"minPositionImpactPoolAmount\":\"0xf307f00ffedbd9a6096bc0867fdd892bc20afc3e2a3221e5ab8266c05ddabeb2\",\"positionImpactPoolDistributionRate\":\"0x86f75c9ed81bb5c44f92e22d16b76f631abefe29bb9dbe2feb52ede92df02590\",\"swapImpactPoolAmountLong\":\"0x6c72ea872975a1addd5c0864de406dc019bc716c50166a7022f1ca33e3d3066e\",\"swapImpactPoolAmountShort\":\"0x6c72ea872975a1addd5c0864de406dc019bc716c50166a7022f1ca33e3d3066e\",\"borrowingFactorLong\":\"0xec2b54efb298c6452d29aa4fbf15998db5e8cd939d55fe52bcd4e74381fe320e\",\"borrowingFactorShort\":\"0xbb6dd7f5a10bcbf82f266023409a1105d99bcbddfba4b86688788e4265439796\",\"borrowingExponentFactorLong\":\"0xc0a58c241ba74eebba1fa0b923d58aeabdb89356bbeebe9dab15d42b6ae597d7\",\"borrowingExponentFactorShort\":\"0x0b8aefdc3e1b33d53477d528a0fd168172cb5e9341f20bc1bbf60f6411362440\",\"fundingFactor\":\"0xbd0f57543d571720ae85b9d2490ff8c833b467c626e488362f72803492d336cc\",\"fundingExponentFactor\":\"0x77c4955931cd79cbe3eb759c68c7bf1c26ab41bfe73d611082ae6236e66c3208\",\"fundingIncreaseFactorPerSecond\":\"0x603ae1d9fb72eed507c91f92e2c0213505d1770b2b58a66aa13304cc05d21264\",\"fundingDecreaseFactorPerSecond\":\"0x507e710de2e49eef3cbe99ccf4ca25036e8be5f37d4a4ae954d2c0acb4d51300\",\"thresholdForStableFunding\":\"0xa26d03ea93138af89bcec9362a56259cd850940d09190a5f1d9219729404ff99\",\"thresholdForDecreaseFunding\":\"0x51c0548ec8fdb71c60053ce7e421f873960cfecb15f9edf927ba08e207368a49\",\"minFundingFactorPerSecond\":\"0x1af5d8fc73e7dd8cbe09da773a96a49c6404acd273702f7957da0ace318f3df1\",\"maxFundingFactorPerSecond\":\"0x0a6526a497e4489cf4be22651eccc3b5071dc85cdaf2db76ebbee48f55fe4b44\",\"maxPnlFactorForTradersLong\":\"0x9ddabf7f3e53a1821379516b58312039c6eb26b81ee291c1252ef022bc03dc64\",\"maxPnlFactorForTradersShort\":\"0xbd9f0a0545529a2ddc6068c9d4d8c38529cab28e6dbea62d20017cdf93bba76f\",\"positionFeeFactorForPositiveImpact\":\"0x483710f439356b530fcbd39fe35dca94e09ae68f9b42137c2426b15c7eecab44\",\"positionFeeFactorForNegativeImpact\":\"0x9fcbf5b6ce818dc0a039fe77c3344216992a26473d6aa52571b5f9b1ebdd29f6\",\"positionImpactFactorPositive\":\"0x6e0611944f4603e4b3eb24878be8b06c454f0d32cdbd115b6989ce8666412b9f\",\"positionImpactFactorNegative\":\"0x6e3f4836d516e2b3c7d97f4eb14b647210743805f6625f18dc048184d42f3236\",\"maxPositionImpactFactorPositive\":\"0xa49f2ccad33245c6c3e4e65abbc1b574fb1b260c790a598aa1607b7916af939b\",\"maxPositionImpactFactorNegative\":\"0x1264f0fe836dba8344c27cfd30a27687f01ede436cbcb88905f3d099866aa385\",\"maxPositionImpactFactorForLiquidations\":\"0x3bee549827b24a6c7258484153433d3e8975a38058ca8301a06274c57c12febb\",\"minCollateralFactor\":\"0x23996b6d9b7a115e3ce89b84c1fb992e361ab8b7d0eee682f20dee97ec68ffe1\",\"minCollateralFactorForOpenInterestLong\":\"0x35859412d8490a4c126fe4f1bfc34c55cb8fe37dfa500acd3c8b86af666c5ec3\",\"minCollateralFactorForOpenInterestShort\":\"0x9fbb1a4f2cee065baea2f8cc6c37830cef07cbbc7a5c433a7a525949f5ecebd1\",\"positionImpactExponentFactor\":\"0xb6bff386e5ea9af0e6720bebfdd73d88abd8d3028c1819942bcee244f2ca9405\",\"swapFeeFactorForPositiveImpact\":\"0xaaf64b979df9faef0f42c389d81152da8e9d914ed4fae4f41a31ef0f70334eb0\",\"swapFeeFactorForNegativeImpact\":\"0xbe982294c986c3affb4919d120c418c791a8602c614700dc2bb0ca07815e6ed0\",\"swapImpactFactorPositive\":\"0x9fd271446b4cb4dabfda536750bd6f93b58bfb591131e601bae3c640d9609b2a\",\"swapImpactFactorNegative\":\"0x4a7f2a5421a3eb1067a7e45de84e107fc455e79cfbf6236aa396f99272cfe4b0\",\"swapImpactExponentFactor\":\"0x4ddfcb88742329060e7fae862f0bd237355ac1d858fc4be4928caa94ceef9abd\",\"longInterestUsingLongToken\":\"0x2fb76b062401e7b52ce73015f4cee12157e51119dfb844d4cdd274cb8299d747\",\"longInterestUsingShortToken\":\"0x2fb76b062401e7b52ce73015f4cee12157e51119dfb844d4cdd274cb8299d747\",\"shortInterestUsingLongToken\":\"0x3f57ef70949a77a5b48e6f9bff62899ad1aabde89980c67a6f4a33ceaec4152c\",\"shortInterestUsingShortToken\":\"0x3f57ef70949a77a5b48e6f9bff62899ad1aabde89980c67a6f4a33ceaec4152c\",\"longInterestInTokensUsingLongToken\":\"0xb1da7eacd92175afff35600be3528830573d92f07db6002618e6aca5c2410d68\",\"longInterestInTokensUsingShortToken\":\"0xb1da7eacd92175afff35600be3528830573d92f07db6002618e6aca5c2410d68\",\"shortInterestInTokensUsingLongToken\":\"0x5fbe97bea123c957f97b0bb967f1dbaaaa59333de62d758a2b228b75f289410b\",\"shortInterestInTokensUsingShortToken\":\"0x5fbe97bea123c957f97b0bb967f1dbaaaa59333de62d758a2b228b75f289410b\",\"virtualMarketId\":\"0x418e7c8fefa6d403a9778e123defd25ede196ce24b2de6d119798652b05a2d0c\",\"virtualLongTokenId\":\"0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5\",\"virtualShortTokenId\":\"0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5\"}" + }, + { + Constants.GMX.Markets.GMXUSD, + "{\"isDisabled\":\"0x94a6fe2b4cd290c255255ed7e166f90e8f4a88196d0e23b835da044c6d808d73\",\"longPoolAmount\":\"0x7e26b816faf4add32c579641a024a7c7761c05e664e78522a71153aab44e134c\",\"shortPoolAmount\":\"0x5baa604e3254fcbffdec0d7fbfc0cc1ff7e8ed1431204f4cc81a18757719fa9f\",\"maxLongPoolAmount\":\"0x6de39cee1659b19a7aede71fad06b802be3fcb549e54e288a6847fb462bdc5c6\",\"maxShortPoolAmount\":\"0x9e9c9481cf518b0abb0afe32270555724613f96935fad6d208959abaab7362f8\",\"maxLongPoolUsdForDeposit\":\"0x7163541d793ee6c014f266a3d320bafa0f22980981c6dd1c222dcba2e5e5a858\",\"maxShortPoolUsdForDeposit\":\"0x2cd620bf307a42ee0fcd880255508abbdebb5cf5d650f658e67c2bddac8b284c\",\"longPoolAmountAdjustment\":\"0x2a3b1c06d0773b973002f56de5b5bacf2e3be323ebbb3b9d635008c727cf53d3\",\"shortPoolAmountAdjustment\":\"0x9f16a6c4fa9967595c0c27896865c7204bb530970fa596d03685389612f5b510\",\"reserveFactorLong\":\"0xa919db502fd209965f823fc33320b58b98b538ad07d1f2c882521d10fcfb1330\",\"reserveFactorShort\":\"0x7ab3d81c87f79a924973d0db364d6ea3b139307056a0d61855f1054741d7616f\",\"openInterestReserveFactorLong\":\"0x73432956b0a36fa668a930273af2d971d936a58916b8049419cae3d7aa51e0b8\",\"openInterestReserveFactorShort\":\"0x3a2f6f5d3897a451a92e7d1d2c128913a6640fbf46cff08d1ead005d7ec31270\",\"maxOpenInterestLong\":\"0x679b6748fd721885de011493120c9831fd6bd2b046889503c8d28d0dc5252c2f\",\"maxOpenInterestShort\":\"0x8175d9915a0dc2773d2fdd54e0e11c735b337b5b6330d5c45221e82d4eaa376b\",\"positionImpactPoolAmount\":\"0x62852a15d987b5320c7d5dd89b3c58f67b74e1b3516e0d70f29b535595947569\",\"minPositionImpactPoolAmount\":\"0xc1c97477894ed1a067d6f3649c9977bab6bb6adfb491e820f1c13e1d9661e9b0\",\"positionImpactPoolDistributionRate\":\"0xb613cce94cdcecbefcd1cdd27f4b92631ceece2f032d9065e44da99b429f8483\",\"swapImpactPoolAmountLong\":\"0x90c9ebce1fcdb7ff1d083a099aea20dd4bddc4eacfbf6114a7e031da901b4d13\",\"swapImpactPoolAmountShort\":\"0x22f03848660c7989ab015e83739a6b249ca250f117efbc78f15048e844d96b42\",\"borrowingFactorLong\":\"0x98a8e94cf7d5469c0cce611f26586c2181f9f7854e700798c0fdbad7f14d52c8\",\"borrowingFactorShort\":\"0xc363a26032a115eb79d97d29055648de478959998f94cdc9c9e7c4a8713b6802\",\"borrowingExponentFactorLong\":\"0x66e27f44035c8f071bd1c6b2f24fff2c4257784278cb3c07bf2c5e080e1e545e\",\"borrowingExponentFactorShort\":\"0x3e64b34b6798d9422e4b587848a4de7d08ee0de67f64f1ac619076136b52c9e5\",\"fundingFactor\":\"0xba09adbcdbf01313837f6d4e9a30ee1544eb365b7dcbc748fee6bd4999b312ee\",\"fundingExponentFactor\":\"0x580df30eac40cbea65e5d4f0c7f69013a6ce1226dc2fd67a22bc2fb3bc61c521\",\"fundingIncreaseFactorPerSecond\":\"0x08698d4cb3c66be55f620f4777eeb957f3d8bfffba11c2d38962d33a6c9afa03\",\"fundingDecreaseFactorPerSecond\":\"0xdded7c8cd711bbfbf71f8ac4243d214af66e29b0b5ce44eb7899d116a8cf80a9\",\"thresholdForStableFunding\":\"0xaa73a55adfb469a06d8ce438519b19373ab93eb09493a4b34b60cfe88d134a30\",\"thresholdForDecreaseFunding\":\"0x4acdfba0d6217c8580e76bee851cd41de3927a429580aea87b55be61fada8291\",\"minFundingFactorPerSecond\":\"0xf1fb92c5564712350d72e3db95c65ca88e50602e975932a9c9b73eaa840e234b\",\"maxFundingFactorPerSecond\":\"0x5b6b8bfa2a902a4700b5a546209cb4097cb278eaffa6c775832110dec862dd16\",\"maxPnlFactorForTradersLong\":\"0x7e878f228e830c2c29edf1cebd86787df291d03924e2681eb9192db2925e2576\",\"maxPnlFactorForTradersShort\":\"0x13a5a683a8052446dd311ec4c4a537be6c046a45cdf374b87ecbd3663196e07c\",\"positionFeeFactorForPositiveImpact\":\"0x546c33b1dba15b428da83872dde33a920eb215ff6f219683cd72ba4a26d5c533\",\"positionFeeFactorForNegativeImpact\":\"0x8d6b3bf9f919ba71b67feb739447c6b300ac0f9f79068132584ce16c2a1e0fda\",\"positionImpactFactorPositive\":\"0x799fd72dcd8bc0b912b482f186a074b67fdab11aec58c5fc3c09a5ab601bfe4d\",\"positionImpactFactorNegative\":\"0xc35bd69b22ba7b4339033e97d3d4ad5735fbb434b54e10be44bac834d63d4ca6\",\"maxPositionImpactFactorPositive\":\"0xe2991c2345da0cfdfd5b8ec9e7676658276be8890053e15fcccb194d3bf7e12b\",\"maxPositionImpactFactorNegative\":\"0xe113eb600d7bbf5d1eecc81235c5881d5d33afb2f11d9ec2a2be8028b471a17b\",\"maxPositionImpactFactorForLiquidations\":\"0x5837f920215e0e61cea98ec67e54f88ea6b2c37942ce77134be57426826ea24e\",\"minCollateralFactor\":\"0x36ab3e3013ad52ba6a0d8f4a0453b7102f49cac48a2a11fa6c73dbe0aefe816f\",\"minCollateralFactorForOpenInterestLong\":\"0xb53e1f7357d8985ac911799567e535ae47b4b735a3aa570d896d2675c5ebb6d9\",\"minCollateralFactorForOpenInterestShort\":\"0x24518edda98ceefe82f1204ce0f521627a009586216d80895e53abfe2ecf184a\",\"positionImpactExponentFactor\":\"0xd0f2eee3c7933f4cd4be61e89645e29cc81fe2e6b8182b4622055eda40e77d48\",\"swapFeeFactorForPositiveImpact\":\"0x95cc059a74ab0cc2d211ba23f2332e2b506142a89fddc54e2006bc3f35931464\",\"swapFeeFactorForNegativeImpact\":\"0x4771d81fc424f4ad1751f397a8bf3cccc268f477d6a35c745a0e9d1841e1027b\",\"swapImpactFactorPositive\":\"0xb5f17a97f65ee498fdac7f1788550bbd6a729107081de95c3890c697fe931481\",\"swapImpactFactorNegative\":\"0xddcb4f9e4b88feb61b957dbc5dc0bd03435c471d8ab9c3c985699b0cad17ffc2\",\"swapImpactExponentFactor\":\"0x83899b2c9cd5391747c3988b8797dda3e5f3189c446c3f43746edd33e6e4bd1c\",\"longInterestUsingLongToken\":\"0x47042adc3bc051b0abb612ee2dbf558f6f9c7f0e77972163bd7394a044f94b9f\",\"longInterestUsingShortToken\":\"0x6a324615f090510a918bf260bc5aae2bb386d794975c2f54bec74b112f50bae8\",\"shortInterestUsingLongToken\":\"0x3982b8f7523ad74e8f54ba8bf631a775cfb518784da63d398623b0bf2d22adf1\",\"shortInterestUsingShortToken\":\"0xac1fd9fd1fa0ad431f10d06abd15edd14fbf5410e698bb5f0f8d67998d35e1a0\",\"longInterestInTokensUsingLongToken\":\"0x979fc2d11428c9c7021efa0809f1aa6fce864ed9952fedf8122214ec63a307c2\",\"longInterestInTokensUsingShortToken\":\"0xa25d9cfd62d2ede9ff34a3b74d283a3234fa2331a585996d60924ab4e10a7bd4\",\"shortInterestInTokensUsingLongToken\":\"0xfc7d73d44cd1f3ac9805040971654732154dd99337c3c6941478700da192f53c\",\"shortInterestInTokensUsingShortToken\":\"0x6a439a30994c0c9d98220b52bc16983fedda68429484d48de49271b175236909\",\"virtualMarketId\":\"0x0f02984b3dea380f61ec0a6c8d7c60fb497a489eb055b2d95d8ef2826282fb45\",\"virtualLongTokenId\":\"0x383a0fdd5ebac620fe9349688ff6922600f2d5659c01c204e11f3181114b8700\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.PEPEUSD, + "{\"isDisabled\":\"0xaf38c5d82180c4b155871b090949249989b70acbec4313eb41845a1061f0d644\",\"longPoolAmount\":\"0xdb4dcfdd3377718923920416934586a13fb1c4ab6caec126f16692a929806118\",\"shortPoolAmount\":\"0x2de1f935fd5108a6de074324b806e2476fa257c21213b0026b323a434fd35e88\",\"maxLongPoolAmount\":\"0x08211b0d10f775c70fdcb9da260fda3079b206a48eac26c9bd4432ff135961d0\",\"maxShortPoolAmount\":\"0x3d160932eb28ae21446ad1c8515556b1daa7235052f8f68b5623d411259911ec\",\"maxLongPoolUsdForDeposit\":\"0xa3778c6c0133d0e2be190772c78dc34e0bbabc486a1e09155be4f14e27ac13e5\",\"maxShortPoolUsdForDeposit\":\"0x4e600770e19cbc36cc0c9b1810745d875e229ee3c3512e3f0bd1ac460c6bfbc4\",\"longPoolAmountAdjustment\":\"0x93b2ef5691e06ece3fc4a84a97d3f7f25a0eb2905fac34e3376a37c89075f1f6\",\"shortPoolAmountAdjustment\":\"0xef8a3cab8bfc23c73eb979dd9a95212376f0defb55d7eb0107f824091f223148\",\"reserveFactorLong\":\"0xa67c17f5ad9f9c3a670e6ca824fd553e48a0a87ea1627b399e15d102d084e2ba\",\"reserveFactorShort\":\"0x1994481d5f277f989af8d002caa26a8ec31be4ccf63be579fe70db2c78b534fb\",\"openInterestReserveFactorLong\":\"0x17cf1d8fbb84f8e10546a951b3a2ce8d217d879959cfccb31305e435109868d9\",\"openInterestReserveFactorShort\":\"0xcca8553319979a9971eec5cea944f20462154d845e7c2203c0e1c3c777cd7b42\",\"maxOpenInterestLong\":\"0x116859648842e833cfe05ad1efbbd4a4cdf3f16bbf87240e0c13c9a6e444bebd\",\"maxOpenInterestShort\":\"0xf6eb813b9b564a94d18f2649bd3d8e09681855eb97722a4647bf13a3315f5c3a\",\"positionImpactPoolAmount\":\"0x365fab3eecb4deb4dc1321abc5b21c73b51f37615e51f1dbd77c58d47736bbd3\",\"minPositionImpactPoolAmount\":\"0x828b70cd2feeb4c23dd24eff9633c97581ae1d4591f15a4c6017ed4caa51db37\",\"positionImpactPoolDistributionRate\":\"0x0cc0041ba95aec083aadddf118ef899282c47120b0f17d111d00028eeb4f19c9\",\"swapImpactPoolAmountLong\":\"0xf49b83f78cfdf99fc5076fc6757a77250843cd1e5195c503c0df814ade02fbb4\",\"swapImpactPoolAmountShort\":\"0xdc8789f0b50f11eb03e58fd0dacf8a3f72f1e6a7722673703cd3621a868c755e\",\"borrowingFactorLong\":\"0xd032d4d671747d4dfc710bf9a76c39b8fd293c2954b8f4a40894bae35ab48d2c\",\"borrowingFactorShort\":\"0xb380f7e0ea51cf3d0e4c168fe3dc636ac74573fde0099f8275d10e6529f37af0\",\"borrowingExponentFactorLong\":\"0xe1ffeb7db9230a1bac6e41d474f82ea59fea6a2e77b830baea2872196ea4db48\",\"borrowingExponentFactorShort\":\"0x6168c3e6a9a81333d3a6ff61ab66ccf696cb1aacb4a922af74e9fc0dc02ee836\",\"fundingFactor\":\"0xc1000ae35f4f02f20bf5b58e8076242c3d4af501f151a5d9e49888e8ce5b91b2\",\"fundingExponentFactor\":\"0x2a131e64e8f2babedecaf000ad3b2c28de08e5d6f728b2dcc8374c5df1d1f2bc\",\"fundingIncreaseFactorPerSecond\":\"0xc6a392686beabd57971fe8bfe9ac32b82d2d37d5f1905cab849925afc1a4918c\",\"fundingDecreaseFactorPerSecond\":\"0x6381e281277e9d4a06f7dea74ddad4b2feada167ed97916f739b71a2635d6c2e\",\"thresholdForStableFunding\":\"0x9c12b3ee776d2d6990982fc22ede32e1a14976feb10b2bc9386994c31bcfd65d\",\"thresholdForDecreaseFunding\":\"0xcb9d81abd7f59282023527f186db011b1a7a47becf96759cd0fbc72be589bb39\",\"minFundingFactorPerSecond\":\"0xaaefe5d07f5c06b8db251238a70a8ed25a18ccb3a80cc13619808cb63986fc36\",\"maxFundingFactorPerSecond\":\"0x6c5d09a30a097dc3ce6bc2bdf3ae5515da61cf6eee5ffe30776669db8d0299ff\",\"maxPnlFactorForTradersLong\":\"0xa4856280b896701f3961e30b5ae67819ccfb3ecfcc1b02b51a279498566bab2a\",\"maxPnlFactorForTradersShort\":\"0x9261ef9a90b9f9785f18258aee39f431e7af66971ce7628b37dd197d93bde9dd\",\"positionFeeFactorForPositiveImpact\":\"0x98853d8dfbb87c8e9d5e028e404924d8e05219c0b47225b2044b7e7877f7a173\",\"positionFeeFactorForNegativeImpact\":\"0x37f06a157c23a33de4ca7196216ce1915ec1a3cc92d0a99ad8546b9ec307ccd9\",\"positionImpactFactorPositive\":\"0x548ce19161df3c4381f589d02db21974b0760e345caad0f3d209d39e87ef0e93\",\"positionImpactFactorNegative\":\"0x7f948d551673d7db11bc768d5e619644ad8fcd7d3b5ea979802542bef58c1ac2\",\"maxPositionImpactFactorPositive\":\"0xcc90fb298e671c27c085ae0f7416295fadedbd92249139252ddc869a5ca25dc7\",\"maxPositionImpactFactorNegative\":\"0x08e3b3b485b631d3a46abbc16ece5d6f745d41def3f018df49b7c4943d4a15e0\",\"maxPositionImpactFactorForLiquidations\":\"0x52ac32768630686448d7056b478dbb59679a30728f24b36d590687f6188e1491\",\"minCollateralFactor\":\"0xb763d546f4c43a22e39e6d544d2a097e2b739449ac8125be625ca1b3edb6c7e6\",\"minCollateralFactorForOpenInterestLong\":\"0x4279cffcd52e0915df8447175e708381712393531426166172e9a466f544ea6e\",\"minCollateralFactorForOpenInterestShort\":\"0xa7dd5e63b8b99bbd36c61b26e144889399099bdc86c904aa8dcf3d53670a8806\",\"positionImpactExponentFactor\":\"0x3a2cd4a711e8cba8017733aa537e32ebfd2e5fa858bf0a773a3967ca2f7b30b0\",\"swapFeeFactorForPositiveImpact\":\"0x4965fc8a21524ad70b41143626dd638286b9b42ceaa02dbb9bc821f614cf9fdf\",\"swapFeeFactorForNegativeImpact\":\"0xf890051400774cc25b9f4e404ba50d42ebd497e3b1c8b9541fa1da94174e71c2\",\"swapImpactFactorPositive\":\"0xa6399402207293d84fc48222f3238feae062d86e26e725edaca06fab54bf2e4b\",\"swapImpactFactorNegative\":\"0x8c3bbbb69bd132cae186a17c0f17fec773e3b7d2ef52c639a31ce3ecc4bba196\",\"swapImpactExponentFactor\":\"0x9a72811ae0698e31c2231403ff4e3263f7a83255c3ebd61ff1a9e6c90a5014fc\",\"longInterestUsingLongToken\":\"0x59ba3057fa9ce53ab916a6aa23bfdfd765ddd40ea64a1dc1d6569872ba4bcfae\",\"longInterestUsingShortToken\":\"0x3b4dc2b2a9960dc68d06d078ff0f27f85288aa5741e856fbe4b314d665258059\",\"shortInterestUsingLongToken\":\"0xcc93e178158938d00e596c35b990a2049fb6a22096dcd07d3a3a565bdc87545f\",\"shortInterestUsingShortToken\":\"0x2372925b7bccb7d92e274e5d799c10d86ce3acdad8bf362976277678fc063ad2\",\"longInterestInTokensUsingLongToken\":\"0x200a8381deac2b50cb2d7d0e25cabc935b910dc4ab23179973e09626729dd28b\",\"longInterestInTokensUsingShortToken\":\"0xdd66516cc98865eab546bcf996ddff13cc9a6cf964ec93c9c55aad68cbc0ab0c\",\"shortInterestInTokensUsingLongToken\":\"0x49d9a922900ff263325f1363942e0c290b5b2fbc0167a4b99ba6680821c9d348\",\"shortInterestInTokensUsingShortToken\":\"0xf25e678dde0faaaed94b6bd8ba21457e9a203075ca24e361402729d5882156f3\",\"virtualMarketId\":\"0xc0d8524413137e633578123c56536277851f30fa476e320824d3841d54e8331f\",\"virtualLongTokenId\":\"0x94039423f90376014849cce954f0d034b4adc74ce9d0f4142524fd668580cdd3\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.WIFUSD, + "{\"isDisabled\":\"0x3f3fd9c1581b7e4899657049fd1ffddbdea9cb8dc3282975dc30a87f9641afc2\",\"longPoolAmount\":\"0xd73b3208669c05e0668e35390e02294742e51293f2fa68791220534061606612\",\"shortPoolAmount\":\"0x7d3645cb8041bf9a00e47e9ef3899f206e9eafe88bc2c623cfdfa492106e6ff3\",\"maxLongPoolAmount\":\"0x497d2c066ee0a1d4f5d860dd118b56dffb0d77b8c1cb28414b260b19f958a206\",\"maxShortPoolAmount\":\"0x67d641d32e1eb1dfc49886ff8259989b5bf70e5dfd2b53c7b6e87a80fec525f0\",\"maxLongPoolUsdForDeposit\":\"0x297322829eaf1f798c0926208744c90c2c5684664457deedb2178d80b26310f3\",\"maxShortPoolUsdForDeposit\":\"0xca2451fe7f61f020d4d53f55c5c84178ffbae6d918bfba03fb6c50ed5cc54527\",\"longPoolAmountAdjustment\":\"0x934cbe2b03cd2a8197cd2d3d9a47c79c3e3d22839a2f20e8a7372756446f7802\",\"shortPoolAmountAdjustment\":\"0x0a4ce0fe2a8a8ebecfc6401e12a5185cd0d721505a10c0d126569d5b3e27d15f\",\"reserveFactorLong\":\"0x924eb0ec3f72c21cd5eb5c7311bd82f0f795be5cee2c1440f73192353f39f6cb\",\"reserveFactorShort\":\"0x895b9293d82672cb457c407fee8c753900dfff1de6987e00a0798eae9e253890\",\"openInterestReserveFactorLong\":\"0x8a0c3f5a0b7e9e23e72b960138a9d0b69c8fe644d76cdc8c604c669660399658\",\"openInterestReserveFactorShort\":\"0xa57ce8a217fd4ec2bfca5d1580f5b5f6ce23a26ef213a81245d29667328ca698\",\"maxOpenInterestLong\":\"0xbb197bcd6d4584b3eccc105f59368e512f079adabbaec3a232d6ba279af23ca8\",\"maxOpenInterestShort\":\"0x6505b94678c6b33d474e653963bc2f098be613c12e88cfa01fe512e1975345bc\",\"positionImpactPoolAmount\":\"0x7fef4ea911342fbdf849ef6fce4fa80f1db6664f09f09ae49d52bd94e041a849\",\"minPositionImpactPoolAmount\":\"0x7b738eef299c0f53e9515f9a152e1ffd846208c6dce2cdf3f246774b57f2f3b5\",\"positionImpactPoolDistributionRate\":\"0x29b659e40441ff3d00e7e4cd36aed95844a4a150d624580d5baab5abb70da4bd\",\"swapImpactPoolAmountLong\":\"0x185b6b2744fe9fb8e0461a6665514e36694af12648a57296557a6ee9e2f205dc\",\"swapImpactPoolAmountShort\":\"0x89eed98489b08431bef4010936dfecf4e8c4c1b2f9abfefab47915afe173ad1d\",\"borrowingFactorLong\":\"0x5584737905d0688f0f098df75a1ac2946d5b9186f228e5b163062e8b0613b243\",\"borrowingFactorShort\":\"0x5586c685b1bb8b97532bbdf7123e43895441a2ee4a801d6a804294b2ab5f13ca\",\"borrowingExponentFactorLong\":\"0xbe35cdafeeaf2527e277d398fdf7d973f7f501a11ad1b361cd026e46644268d6\",\"borrowingExponentFactorShort\":\"0x24ffa01597c8fca02c6be053d7ce77598f144bf38d9ebf9556618b6d9ea93c71\",\"fundingFactor\":\"0x0cf8ed5c568f04fa299c6507b1b4fcdf0627a89a9170afdbd43a78e27b3803c7\",\"fundingExponentFactor\":\"0xce158a3f9a5f344285e865b05db9ac6162151cd038cc3d2da4fc2c3d48705565\",\"fundingIncreaseFactorPerSecond\":\"0xc4a2e8612964239f74d2a154fada3c9814e92c911b2fd1a64ba7d451c2a7ece1\",\"fundingDecreaseFactorPerSecond\":\"0x7dda61f1744872d02d069f555063cc6d791fac38d765805afd2bdd614779e527\",\"thresholdForStableFunding\":\"0x2ed138212dcefc6912f737b68be3b2c7d556df4c6152399d2a26b3fa921114d0\",\"thresholdForDecreaseFunding\":\"0x99091ba73de4fb6ad50e9335cc0a04511753258004776c81597cb31ae0f6a841\",\"minFundingFactorPerSecond\":\"0x919a22ed814b944f03c1d7da6791c601791c3d32dd9dfaaecc2b3a8789b15fdd\",\"maxFundingFactorPerSecond\":\"0x3835500eefeba57cbe50ccb407e19aaec2f84810d63c5390fd9e7b6754d9166e\",\"maxPnlFactorForTradersLong\":\"0x1383fddcb6581558336fbc217cfc3db183cd69fb3e7cdac5fdf5ddafcfe3c75e\",\"maxPnlFactorForTradersShort\":\"0x71d36d7c6a247209ce0590c54c0d14752956059486987fc5161b7bec6739c8b3\",\"positionFeeFactorForPositiveImpact\":\"0x2708cfa61a406341dc08ec540f21a474d06cc5091f45dad2888452f9619320f1\",\"positionFeeFactorForNegativeImpact\":\"0x3596e5879e782fc01324e6c9391e2fe90856824c369c31b33c23987e61304bb7\",\"positionImpactFactorPositive\":\"0x5871f75e257b7d79f48e659a4c02d14ddd0b8baca3c4a1583219d85f177c5268\",\"positionImpactFactorNegative\":\"0x46340a568baf8d8bdd7d3198bfd3d4327a7532eac8a249a7cd6fe33cc05a86ea\",\"maxPositionImpactFactorPositive\":\"0x19d692d2b95d1189dba6f596c97673a944821958599797b977eb5408ce276ba3\",\"maxPositionImpactFactorNegative\":\"0x36ed3cee02b2c2f532d0985c0ea3f92ed5e980ce06a1116a0b6f2f65fa0de69d\",\"maxPositionImpactFactorForLiquidations\":\"0xc7ca98bf7ac93f2ca8dc4a8a99e99194279493898e08ebf4b7e8f6cfe0452d7c\",\"minCollateralFactor\":\"0x1cddd19b6c5ab7bac13bca435de5c29b7eb8b6d8f63653990ca7d124b6630211\",\"minCollateralFactorForOpenInterestLong\":\"0xf62a2cd524471634da150460345daeb42bcc47fc9a8b5ea5b1a581013edfef77\",\"minCollateralFactorForOpenInterestShort\":\"0xd9b39ffa382462e2b24dd0ebd1c3baec3d78c5ade8d4cbee813c5b8a51baeb20\",\"positionImpactExponentFactor\":\"0xa2af6371bc1aeebd6802ac29ccd755b5ab13703022b5b772111b4e555273e745\",\"swapFeeFactorForPositiveImpact\":\"0xa08dd6fcd6029bc48ce2addf2868af78d216638205a73838668634ca2a4981b7\",\"swapFeeFactorForNegativeImpact\":\"0xc9bbb4bcd2036e8e18f3fd37c85140389749faa6bb95005ded218d00ab217029\",\"swapImpactFactorPositive\":\"0x9f5c1ba768149251f1ac9bbe83db59ca66c5bc1dac404af7fe71e644dfe9cbb7\",\"swapImpactFactorNegative\":\"0xded0c3d499ee81a6f139dbbbafd11a57b4b0d741c4deed0eb81b462952739816\",\"swapImpactExponentFactor\":\"0xcb33824480bc1af4edb3a02742e93fc84d154d007addbabbf9515e6b900085c3\",\"longInterestUsingLongToken\":\"0xb9838b5ddf80867ad90ce3e90cfcf15c684830d54106d0b07f9426c76ea3ed6f\",\"longInterestUsingShortToken\":\"0x7b54a64b7eaaa0cb01caeaa2056e31e8ce5a7d3eef40388620df0d852bc47fb7\",\"shortInterestUsingLongToken\":\"0x679a5a56254840ebb42013b1c01dc183a33683f1bd6a8e03791345e360030654\",\"shortInterestUsingShortToken\":\"0x43f090931073aa42d39375083149dc5ddf12b938cc819983bcf8ddc75630a3e5\",\"longInterestInTokensUsingLongToken\":\"0xb8e1098dca1a6eec0a14fa5ad85ff6fbb81f13b951b2f97d7ddc470c07d860c4\",\"longInterestInTokensUsingShortToken\":\"0x7cc8925bf3553de74d606f5b490db17ba4aa8e897b039d1d4e27fca2286d206f\",\"shortInterestInTokensUsingLongToken\":\"0x41e3b79c739d3e836910657d8a83696cbdeb369b81f79e6678150bbccc1d864f\",\"shortInterestInTokensUsingShortToken\":\"0x5f470ef4838a440309e2a832937a4c031db5e3a45d9842e2c1095881b861d11a\",\"virtualMarketId\":\"0xa1f23522ffd6ecb1fbfee47dc3174341b74a30afb70d283e382b19fe9da9e5eb\",\"virtualLongTokenId\":\"0xddc8f44ea682520585381041be40a0e629e6ad51d6ed26e690d316dc2c55e957\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.SHIBUSD, + "{\"isDisabled\":\"0x03a5155414acfa53a2a5f4fe6daef37cde40c438c7c046f8557f8b57ec6a10a7\",\"longPoolAmount\":\"0xa4131aa803086954643d410d43c6dc25174ebc66038ddc5ec580c4c87cadce78\",\"shortPoolAmount\":\"0x746c446770e57610aaf8ab208f4994dde5078fa30ca67238933b639b0e081c91\",\"maxLongPoolAmount\":\"0xe00705dbc3a958cc3e5875bc2e4bc38baaf1ec16f4bbf936dda2606dc2613685\",\"maxShortPoolAmount\":\"0x9f92b886a29cf5c0f395972393c54254728fdf12e64d4422b6dfa58e0828c6b1\",\"maxLongPoolUsdForDeposit\":\"0x8e8a33a35ab4d6bf88fea7400f1b3156755cf154f37fa306d3681f6cdac92b5d\",\"maxShortPoolUsdForDeposit\":\"0x198c20ab100a043b232f3f553aabc4cdb38c4ad46f6122f9248f6cf0cc3c3719\",\"longPoolAmountAdjustment\":\"0x36f91a9f6c0b23a1a5fb2034e4e87c6c63767056fa921a986616166204570776\",\"shortPoolAmountAdjustment\":\"0xace1fe34fdc3172c12730e608492dc95160c0e5cd1effd59ad736ccae2ac4082\",\"reserveFactorLong\":\"0xb942291725efadb47f90b489a560166356babc41889c76b3e701b09a3be44a67\",\"reserveFactorShort\":\"0x72cc372c566a117f4bc76cf9e36a1c453fc2cce23db5e1e171bc8339f715d9a0\",\"openInterestReserveFactorLong\":\"0xea3535598f41c182bf9a6ecf1407d5526041953bfd0ff78f7e3bd183fa36f85a\",\"openInterestReserveFactorShort\":\"0xcd05c3be6d802c5465a7476303f94e1302b8847fa6042d368d9a2b9782c35864\",\"maxOpenInterestLong\":\"0x5dc97f5a0317b8799a69d443d37af5e048c91fbdc95d34b1ea4230f734f6a300\",\"maxOpenInterestShort\":\"0x285ced9e7b561c4b6b2c31b7f88f74d5b73833725762fe747fe72a16554ae372\",\"positionImpactPoolAmount\":\"0xcf9129cacfe38553828bae09806d4e6521711f4863d9eabef5439f8d38a7b813\",\"minPositionImpactPoolAmount\":\"0x5ef5523deb7be600d86473fb5aa81c1f9dcda59392eead0c9dede478e7b57f96\",\"positionImpactPoolDistributionRate\":\"0x9153fd10ef3def4580425914e2f410df9882aea06853a2941f9c5199946384fa\",\"swapImpactPoolAmountLong\":\"0x627b336a001cf6eb4e28d0abd139324bd4d82b16fb8c0dc30efa254d7bd695f4\",\"swapImpactPoolAmountShort\":\"0x72b515e6d2c544a823b6c7465563cee8dddf58b087d8b8853effa3cd07cc35bf\",\"borrowingFactorLong\":\"0xdb0b2e7d0ee4091fa786aebdedfb940daeae5cf07127549bdb4be9f0b8da80dc\",\"borrowingFactorShort\":\"0xb510a1d30f323a6bfa36b71c4ab2c4a338bbd41717b4bbf17bb5fba2ab4a6cbb\",\"borrowingExponentFactorLong\":\"0x2c3cbe4bd92abe28e26ab1c6e1ec690533dfbb10275d4aca6f688c17d28e51f9\",\"borrowingExponentFactorShort\":\"0x6e0a73f752e65fe44f2bd93d0608a10e14e8c8e5d81648dbe16d64343d046fdc\",\"fundingFactor\":\"0x6f2ecad16f1c834edc1b4c4635a901d3cc8a1fc4b989f3fa161ad88e66b388c7\",\"fundingExponentFactor\":\"0x20804a56e215b89ca879963c29d21a7e4e69e44c4aafa0abc67853c424931f4b\",\"fundingIncreaseFactorPerSecond\":\"0x8db9b3067b1e847a3bd291cc8d3e15f456104eab4ccd699f2ca132f25e8a39b2\",\"fundingDecreaseFactorPerSecond\":\"0xd66e36a0f16077bb94a8a580f8f08bd46819370638e694ce2f0ff995aaa23139\",\"thresholdForStableFunding\":\"0x9f7edfccd82a16d59264d71a2df2c0c5cd1bf1ebe65a249ef9dd6aa669bb009c\",\"thresholdForDecreaseFunding\":\"0x8aebc73bdbdd8776ba05f57cb763fcbf6df9223fa1d83d0fc2da77166d94c492\",\"minFundingFactorPerSecond\":\"0x3ea4e2edbe73786a314e8cc88ff042ab92a3916895086f0a4982b515d68e4489\",\"maxFundingFactorPerSecond\":\"0xa5f8602de310b7ef0eac8c0b938744a9c6b0127e0d806d7f8f0b58b6318614d5\",\"maxPnlFactorForTradersLong\":\"0x10c8eb29dea6e099e25573dccff9650d218c309953f6ba9b03690e8cfdd66b5b\",\"maxPnlFactorForTradersShort\":\"0xeca0d151e83f98ef5e12410b0a2d223e29cc7d97f228f9d63edb1a90d9467696\",\"positionFeeFactorForPositiveImpact\":\"0x10d2a12dc0ae3d3ebf4846a7fbe21f4c46517ee74bdd7c6fd72417e75ec1caaf\",\"positionFeeFactorForNegativeImpact\":\"0x611c3bc2e992fc865409dc0b81a02796f19cf207d98a8636ba04889156767b3c\",\"positionImpactFactorPositive\":\"0xe26bfc6ea0695527daaf43790b252c6cd520b6f041d52b89fa1765e332b0a2ba\",\"positionImpactFactorNegative\":\"0x29078683fd16217f167c57ce10332c45b25a7e2a42b7e317f4993cdd182ee4f0\",\"maxPositionImpactFactorPositive\":\"0x92c555de2df6a801fca90169a37445fa9e1b6127ad2b24e9aae09e610daa64d8\",\"maxPositionImpactFactorNegative\":\"0x836e6ed579eef0ce940ce76d025708ed4872eb6897ffdbecbaeba7d3a54e5a90\",\"maxPositionImpactFactorForLiquidations\":\"0x52fb95366a88cf85b51d86af2a6aaca9b2a742d85554af7cbe67a75a2a683f1c\",\"minCollateralFactor\":\"0xf222dcd515762a01b5dcd95d0d7bf6220adebaeeca37241b2334aec31858d008\",\"minCollateralFactorForOpenInterestLong\":\"0x159b5efb14ba5fdf82eb9483ce36a5cc511603ddc0851867d2f62e061a1eb5a5\",\"minCollateralFactorForOpenInterestShort\":\"0x5ea79f8f1091195b3a4b2e7b906f73a855a4677d85a563c73c636da18a4c3b61\",\"positionImpactExponentFactor\":\"0x5de08cfc1c45dc70944717fb92318d5f3f66c26fc83ad52ac82277eb036d81db\",\"swapFeeFactorForPositiveImpact\":\"0x8039a612505e93d3b3b411b3e667f13e1a54b0d830e9dcc16cb41d838b85c6bd\",\"swapFeeFactorForNegativeImpact\":\"0x07bcac70080ce14495a72e4e38fcbf3cf15913013379a12d4cab5ac6c741851d\",\"swapImpactFactorPositive\":\"0x16e0ad50beb175b5eb950fb44fac610b3289a7a74fe8a788d974cf667cb024a9\",\"swapImpactFactorNegative\":\"0xf4d68d4587e30f6e4d7a9ee6eb78d8d4c1c05ace6f9bafd291483c9ce9eb1bb7\",\"swapImpactExponentFactor\":\"0x97d1c1c0f5ad236f5f1edac5fdf95bce3537739693abc65a09ed0a3dcf34498d\",\"longInterestUsingLongToken\":\"0xb61609daaa551c8f0249a2285456d645767aec2a95f7e40418cc83a48c392ddf\",\"longInterestUsingShortToken\":\"0x8b5eb6a5510416d844b4684e5e69ca7bf35f1cb412c523a32ae03e12af375249\",\"shortInterestUsingLongToken\":\"0xed5cf2e98607d02af0b3061a14ec3cfc1433efae939c2b1cf93267aff3c46432\",\"shortInterestUsingShortToken\":\"0x472180f8e38e690c810613a6e1a46bb46c1e0a07300735b78f2ab0ef43bc44c0\",\"longInterestInTokensUsingLongToken\":\"0x5d20fe8125fd861ba1c32235b276268a6624f13b0a39e206f10774fffea8851c\",\"longInterestInTokensUsingShortToken\":\"0xac59a2a29b7733e95947fa6aff21b3637980d5c4943d9416f85b7edb57368023\",\"shortInterestInTokensUsingLongToken\":\"0xf4dd0f71273bdfa14336d19e6cc2cc1e94adc41a61db05fd3b1033a7e44ef2a8\",\"shortInterestInTokensUsingShortToken\":\"0xdaf6901cdc73c1b998244e56959831331e1d1d75d9463c0ed08517f4a134a739\",\"virtualMarketId\":\"0x03f15dfbb59683ff19459d28557cd3323f0872a7f560af3b99a3d3f9653d01bd\",\"virtualLongTokenId\":\"0xaab37f889b9680dda34f58a689de3023cb22f7ae14d32a3c1d45798a973db1f5\",\"virtualShortTokenId\":\"0xd5258cb84f0039be58306488e8df941c05f3cf4f219e92aacb6561c736bbb960\"}" + }, + { + Constants.GMX.Markets.STXUSD, + "{\"longPoolAmount\":\"0xf122c7e6d0351093f7d1e0fcfd69393bf080b2f123b5770d0b254e679be65a3f\",\"shortPoolAmount\":\"0x2510fcb6409c65d58482eb5db217757746856acefd9b8a3fada05aff8577fac5\",\"positionImpactPoolAmount\":\"0xe2ea1656d5f2192131393d1ff6241140222eeb5933080071e1e4e73886129085\",\"swapImpactPoolAmountLong\":\"0xbcd03b3bc910f49aa9773852d73ce05b9017e80061cb721c5f79b0c01eceef57\",\"swapImpactPoolAmountShort\":\"0x685dfc8dda5b57cceceb4a174a22db7b47edf55f9240b9a863c2e2bb16f11a7c\",\"longInterestUsingLongToken\":\"0xa01aace829bc77169967e69b3d6a2d4bb169476efd27ecefd7a83b563d0cc470\",\"longInterestUsingShortToken\":\"0x685eb8e71d1e05784e3a78108683e269d852e9a0ddc798f135cd5533a573f9db\",\"shortInterestUsingLongToken\":\"0xf7761b2355cda54d03540bec92a64d38168b9bdf3b476a32290d1fdcc1910273\",\"shortInterestUsingShortToken\":\"0x605c1ddd6b164b06be7cc90298b01df10ee225482f9788ec7f6e242d5c774c99\",\"longInterestInTokensUsingLongToken\":\"0x0481a67da357b858a6cc09afb46ec4c49a599a83f0bff5b69d59c527a7b5f304\",\"longInterestInTokensUsingShortToken\":\"0xf34d20df9636f3d0481701a04a489866f4fae1c9cfce08699333b624f07c1245\",\"shortInterestInTokensUsingLongToken\":\"0x5c8bea020aa9fa77aae2e2c21d50a17eed21673e372d4382bbf993059638ab2c\",\"shortInterestInTokensUsingShortToken\":\"0xbda4b62f2d1b6b81f9398e396999d6483bfc27b6168caa24cab3e536cdba12e5\"}" + }, + }; + + + public static GmxStoreKeys? GetMarketKeys(string marketToken) + { + if (GmxKeys.TryGetValue(marketToken, out string keys)) + { + var storeKeys = JsonConvert.DeserializeObject(keys); + return storeKeys; + } + + return null; + } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Services/Gmx/GmxMappers.cs b/src/Managing.Infrastructure.Web3/Services/Gmx/GmxMappers.cs index 73d8c72..10ee2ec 100644 --- a/src/Managing.Infrastructure.Web3/Services/Gmx/GmxMappers.cs +++ b/src/Managing.Infrastructure.Web3/Services/Gmx/GmxMappers.cs @@ -1,10 +1,12 @@ -using Managing.Core; +using System.Numerics; +using Managing.ABI.GmxV2.Reader.ContractDefinition; +using Managing.Core; using Managing.Domain.Candles; using Managing.Domain.Trades; using Managing.Infrastructure.Evm.Models.Gmx; +using Managing.Infrastructure.Evm.Models.Gmx.v2; using Managing.Infrastructure.Evm.Referentials; using Nethereum.Web3; -using System.Numerics; using static Managing.Common.Enums; namespace Managing.Infrastructure.Evm.Services.Gmx; @@ -174,4 +176,73 @@ public static class GmxMappers Timeframe = timeframe }; } -} + + internal static GmxMarket Map(MarketInfo infos) + { + var indexToken = + TokenV2Service.GetTokenByAddress(TokenV2Service.ConvertTokenAddress(infos.Market.IndexToken, "native")); + var longToken = TokenV2Service.GetTokenByAddress(infos.Market.LongToken); + var shortToken = TokenV2Service.GetTokenByAddress(infos.Market.ShortToken); + var isSameCollaterals = infos.Market.LongToken == infos.Market.ShortToken; + var isSpotOnly = infos.Market.IndexToken == Nethereum.Util.AddressUtil.ZERO_ADDRESS; + var name = TokenV2Service.GetMarketFullName(indexToken.Address, longToken.Address, shortToken.Address, + isSpotOnly); + var symbol = indexToken.Symbol; + + return new GmxMarket + { + MarketToken = infos.Market.MarketToken, + IndexToken = infos.Market.IndexToken, + LongToken = infos.Market.LongToken, + ShortToken = infos.Market.ShortToken, + Name = name, + Symbol = symbol, + IsSpotOnly = isSpotOnly, + IsSameCollaterals = isSameCollaterals, + FundingFactorPerSecond = infos.NextFunding.FundingFactorPerSecond, + LongsPayShorts = infos.NextFunding.LongsPayShorts + }; + } + + public static GmxMarket MapInfos(MarketsProps infos) + { + var indexToken = + TokenV2Service.GetTokenByAddress(TokenV2Service.ConvertTokenAddress(infos.IndexToken, "native")); + var longToken = TokenV2Service.GetTokenByAddress(infos.LongToken); + var shortToken = TokenV2Service.GetTokenByAddress(infos.ShortToken); + var isSameCollaterals = infos.LongToken == infos.ShortToken; + var isSpotOnly = infos.IndexToken == Nethereum.Util.AddressUtil.ZERO_ADDRESS; + var name = TokenV2Service.GetMarketFullName(indexToken.Address, longToken.Address, shortToken.Address, + isSpotOnly); + + return new GmxMarket + { + MarketToken = infos.MarketToken, + IndexToken = infos.IndexToken, + LongToken = infos.LongToken, + ShortToken = infos.ShortToken, + Name = name, + Symbol = indexToken.Symbol, + IsSpotOnly = isSpotOnly, + IsSameCollaterals = isSameCollaterals, + }; + } + + public static GmxMarketTokenPrice Map(GetMarketTokenPriceOutputDTO response) + { + return new GmxMarketTokenPrice + { + LongTokenAmount = response.ReturnValue2.LongTokenAmount, + ShortTokenAmount = response.ReturnValue2.ShortTokenAmount, + LongTokenUsd = response.ReturnValue2.LongTokenUsd, + ShortTokenUsd = response.ReturnValue2.ShortTokenUsd, + PoolValue = response.ReturnValue2.PoolValue, + LongPnl = response.ReturnValue2.LongPnl, + ShortPnl = response.ReturnValue2.ShortPnl, + NetPnl = response.ReturnValue2.NetPnl, + TotalBorrowingFees = response.ReturnValue2.TotalBorrowingFees, + BorrowingFeePoolFactor = response.ReturnValue2.BorrowingFeePoolFactor, + ImpactPoolAmount = response.ReturnValue2.ImpactPoolAmount + }; + } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Services/Gmx/GmxService.cs b/src/Managing.Infrastructure.Web3/Services/Gmx/GmxService.cs index 318aa1a..f9690b0 100644 --- a/src/Managing.Infrastructure.Web3/Services/Gmx/GmxService.cs +++ b/src/Managing.Infrastructure.Web3/Services/Gmx/GmxService.cs @@ -1,21 +1,21 @@ -using Managing.Domain.Trades; +using System.Numerics; +using Managing.Domain.Trades; using Managing.Infrastructure.Evm.Models.Gmx; using Managing.Infrastructure.Evm.Referentials; +using Managing.Tools.ABI.Reader; +using Managing.Tools.ABI.Reader.ContractDefinition; using Managing.Tools.OrderBook; using Managing.Tools.OrderBook.ContractDefinition; using Managing.Tools.OrderBookReader; using Managing.Tools.OrderBookReader.ContractDefinition; using Managing.Tools.PositionRouter; using Managing.Tools.PositionRouter.ContractDefinition; -using Managing.Tools.Reader; -using Managing.Tools.Reader.ContractDefinition; using Managing.Tools.Router; using Managing.Tools.Router.ContractDefinition; using Nethereum.Contracts.Standards.ERC20; using Nethereum.Contracts.Standards.ERC20.ContractDefinition; using Nethereum.Util; using Nethereum.Web3; -using System.Numerics; using static Managing.Common.Enums; namespace Managing.Infrastructure.Evm.Services.Gmx; @@ -98,7 +98,8 @@ public static class GmxService return true; } - public async static Task IncreasePosition(Web3 web3, string publicAddress, Ticker ticker, TradeDirection direction, decimal price, decimal quantity, decimal? leverage) + public async static Task IncreasePosition(Web3 web3, string publicAddress, Ticker ticker, + TradeDirection direction, decimal price, decimal quantity, decimal? leverage) { var quantityLeveraged = GmxHelpers.GetQuantityForLeverage(quantity, leverage); var orderBook = new OrderBookService(web3, Arbitrum.Address.OrderBook); @@ -114,9 +115,9 @@ public static class GmxService // Size of the position with the leveraged quantity // Ex : Long 11$ x3. SizeDelta = 33$ function.SizeDelta = Web3.Convert.ToWei(quantityLeveraged * price, UnitConversion.EthUnit.Tether); - function.CollateralToken = Arbitrum.Address.USDC; // USDC + function.CollateralToken = Arbitrum.Address.USDC; // USDC function.IsLong = isLong; - function.TriggerPrice = Web3.Convert.ToWei(price, 30); // Price of the order execution + function.TriggerPrice = Web3.Convert.ToWei(price, 30); // Price of the order execution function.TriggerAboveThreshold = false; function.ExecutionFee = Web3.Convert.ToWei(_orderFeesExecution); // Fee required to execute tx function.ShouldWrap = false; @@ -149,18 +150,19 @@ public static class GmxService return trade; } - public async static Task DecreasePosition(Web3 web3, string publicAddress, Ticker ticker, TradeDirection direction, decimal price, decimal quantity, decimal? leverage) + public async static Task DecreasePosition(Web3 web3, string publicAddress, Ticker ticker, + TradeDirection direction, decimal price, decimal quantity, decimal? leverage) { var trade = new Trade(DateTime.UtcNow, - direction, - TradeStatus.Cancelled, - TradeType.Market, - ticker, - quantity, - price, - leverage, - "", - ""); + direction, + TradeStatus.Cancelled, + TradeType.Market, + ticker, + quantity, + price, + leverage, + "", + ""); // Check if there is quantity in position if (await QuantityInPosition(web3, publicAddress, ticker) == 0) return trade; @@ -212,18 +214,19 @@ public static class GmxService return trade; } - public static async Task DecreaseOrder(Web3 web3, TradeType tradeType, string publicAddress, Ticker ticker, TradeDirection direction, decimal price, decimal quantity, decimal? leverage) + public static async Task DecreaseOrder(Web3 web3, TradeType tradeType, string publicAddress, Ticker ticker, + TradeDirection direction, decimal price, decimal quantity, decimal? leverage) { var trade = new Trade(DateTime.UtcNow, - direction, - TradeStatus.Cancelled, - tradeType, - ticker, - quantity, - price, - leverage, - "", - ""); + direction, + TradeStatus.Cancelled, + tradeType, + ticker, + quantity, + price, + leverage, + "", + ""); // Check if there is quantity in position var currentPosition = await GetGmxPosition(web3, publicAddress, ticker); @@ -318,12 +321,14 @@ public static class GmxService orders.AddRange(increaseOrders); orders.AddRange(decreaseOrders); var contractAddress = TokenService.GetContractAddress(ticker); - var ordersFiltered = orders.Where(o => string.Equals(o.IndexToken, contractAddress, StringComparison.CurrentCultureIgnoreCase)); + var ordersFiltered = orders.Where(o => + string.Equals(o.IndexToken, contractAddress, StringComparison.CurrentCultureIgnoreCase)); return ordersFiltered.ToList(); } - private static async Task> GetIncreaseOrders(OrderBookReaderService orderBookReader, string publicAddress, int lastIndex) + private static async Task> GetIncreaseOrders(OrderBookReaderService orderBookReader, + string publicAddress, int lastIndex) { var increaseIndex = GmxHelpers.GetIndexesRange(lastIndex); var increaseOrdersFunction = new GetIncreaseOrdersFunction @@ -338,7 +343,8 @@ public static class GmxService return GmxMappers.MapIncrease(increaseOrders.ReturnValue1, increaseOrders.ReturnValue2, increaseIndex); } - private static async Task> GetDecreaseOrders(OrderBookReaderService orderBookReader, string publicAddress, int lastIndex) + private static async Task> GetDecreaseOrders(OrderBookReaderService orderBookReader, + string publicAddress, int lastIndex) { var increaseIndex = GmxHelpers.GetIndexesRange(lastIndex); var increaseOrdersFunction = new GetDecreaseOrdersFunction @@ -452,7 +458,7 @@ public static class GmxService { Console.WriteLine(ex); } - + return totalCost; } -} +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Services/Gmx/GmxV2Helpers.cs b/src/Managing.Infrastructure.Web3/Services/Gmx/GmxV2Helpers.cs new file mode 100644 index 0000000..a1d2d3f --- /dev/null +++ b/src/Managing.Infrastructure.Web3/Services/Gmx/GmxV2Helpers.cs @@ -0,0 +1,70 @@ +using System.Numerics; +using Microsoft.Extensions.Caching.Memory; +using Nethereum.ABI; +using Nethereum.Util; + +namespace Managing.Infrastructure.Evm.Models.Gmx.v2; + +public class GmxV2Helpers +{ + private readonly MemoryCache _dataCache = new MemoryCache(new MemoryCacheOptions { SizeLimit = 10000 }); + private readonly MemoryCache _stringCache = new MemoryCache(new MemoryCacheOptions { SizeLimit = 10000 }); + private readonly ABIEncode _abiEncode = new ABIEncode(); + private readonly MemoryCacheEntryOptions _absoluteExpiration = new MemoryCacheEntryOptions { Size = 1 }; + + + public byte[] HashData(string[] dataTypes, object[] dataValues) + { + var key = GenerateKey(dataTypes, dataValues); + + if (_dataCache.TryGetValue(key, out byte[] cachedHash)) + { + return cachedHash; + } + + var abiValues = new List(); + foreach (var dataType in dataTypes) + { + var abiValue = new ABIValue(dataType, dataValues[dataTypes.ToList().IndexOf(dataType)]); + abiValues.Add(abiValue); + } + + var abiEncode = new ABIEncode(); + var encoded = abiEncode.GetABIEncoded(abiValues.ToArray()); + var hash = new Sha3Keccack().CalculateHash(encoded); + _dataCache.Set(key, hash, _absoluteExpiration); + + return hash; + } + + + public byte[] HashString(string input) + { + if (_stringCache.TryGetValue(input, out byte[] cachedHash)) + { + return cachedHash; + } + + // Adjusted to directly work with byte arrays + var hash = HashData(new[] { "string" }, new string[] { input }); + _stringCache.Set(input, hash, _absoluteExpiration); + + return hash; + } + + private string GenerateKey(string[] dataTypes, object[] dataValues) + { + var combined = new List(); + for (int i = 0; i < dataTypes.Length; i++) + { + combined.Add($"{dataTypes[i]}:{(dataValues[i] is BigInteger bigInt ? bigInt.ToString() : dataValues[i])}"); + } + + return string.Join(",", combined); + } + + public static bool SameAddress(string address, string address2) + { + return address.ToLower() == address2.ToLower(); + } +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Services/Gmx/GmxV2Service.cs b/src/Managing.Infrastructure.Web3/Services/Gmx/GmxV2Service.cs new file mode 100644 index 0000000..4501a2b --- /dev/null +++ b/src/Managing.Infrastructure.Web3/Services/Gmx/GmxV2Service.cs @@ -0,0 +1,531 @@ +using System.Numerics; +using Managing.ABI.GmxV2.DataStore; +using Managing.ABI.GmxV2.DataStore.ContractDefinition; +using Managing.ABI.GmxV2.Multicall3.ContractDefinition; +using Managing.ABI.GmxV2.Reader; +using Managing.ABI.GmxV2.Reader.ContractDefinition; +using Managing.Common; +using Managing.Domain.Statistics; +using Managing.Infrastructure.Evm.Models.Gmx.v2; +using Managing.Infrastructure.Evm.Referentials; +using Managing.Infrastructure.Evm.Services.Gmx; +using Nethereum.Contracts; +using Nethereum.Contracts.Standards.ERC20.ContractDefinition; +using Nethereum.Hex.HexConvertors.Extensions; +using Nethereum.Web3; + +public class GmxV2Service +{ + private readonly GmxV2Helpers _helpers = new GmxV2Helpers(); + + public GmxV2Service() + { + } + + public async Task GetMarkets(Web3 web3) + { + var reader = new ReaderService(web3, Arbitrum.AddressV2.Reader); + var result = await reader.GetMarketsQueryAsync(Arbitrum.AddressV2.DataStore, 0, 100); + return result; + } + + public async Task> GetMarketsAsync(Web3 web3) + { + var getMarketCallData = new GetMarketsFunction + { + DataStore = Arbitrum.AddressV2.DataStore, + Start = 0, + End = 100 + }.GetCallData(); + + var call1 = new Call + { + Target = Arbitrum.AddressV2.Reader, + CallData = getMarketCallData + }; + + var aggregateFunction = new AggregateFunction(); + aggregateFunction.Calls = new List(); + aggregateFunction.Calls.Add(call1); + + var queryHandler = web3.Eth.GetContractQueryHandler(); + var returnCalls = await queryHandler + .QueryDeserializingToObjectAsync(aggregateFunction, Arbitrum.AddressV2.Multicall) + .ConfigureAwait(false); + + var markets = new GetMarketsOutputDTO().DecodeOutput(returnCalls.ReturnData[0].ToHex()); + var result = new List(); + foreach (var market in markets.ReturnValue1) + { + try + { + result.Add(GmxMappers.MapInfos(market)); + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + return result; + } + + public async Task GetMarketInfo(Web3 web3) + { + var reader = new ReaderService(web3, Arbitrum.AddressV2.Reader); + var market = (await GetMarketsAsync(web3)).First(); + var tokensData = await GetTokensData(web3); + var marketPrices = GmxHelpers.GetContractMarketPrices(tokensData, market); + var response = + await reader.GetMarketInfoQueryAsync(Arbitrum.AddressV2.DataStore, marketPrices, market.MarketToken); + + // Get hashed key to call datastore + var marketKeys = GmxKeysService.GetMarketKeys(market.MarketToken); + var longInterestUsingLongTokenCallData = new GetUintFunction() + { + Key = marketKeys.LongInterestUsingLongToken.HexToByteArray() + }.GetCallData(); + var longInterestUsingLongTokenCall = new Call + { + Target = Arbitrum.AddressV2.DataStore, + CallData = longInterestUsingLongTokenCallData + }; + var longInterestUsingShortTokenCallData = new GetUintFunction() + { + Key = marketKeys.LongInterestUsingShortToken.HexToByteArray() + }.GetCallData(); + var longInterestUsingShortTokenCall = new Call + { + Target = Arbitrum.AddressV2.DataStore, + CallData = longInterestUsingShortTokenCallData + }; + var shortInterestUsingLongTokenCallData = new GetUintFunction() + { + Key = marketKeys.ShortInterestUsingLongToken.HexToByteArray() + }.GetCallData(); + var shortInterestUsingLongTokenCall = new Call + { + Target = Arbitrum.AddressV2.DataStore, + CallData = shortInterestUsingLongTokenCallData + }; + var shortInterestUsingShortTokenCallData = new GetUintFunction() + { + Key = marketKeys.ShortInterestUsingShortToken.HexToByteArray() + }.GetCallData(); + var shortInterestUsingShortTokenCall = new Call + { + Target = Arbitrum.AddressV2.DataStore, + CallData = shortInterestUsingShortTokenCallData + }; + + var dataStoreMulticall = new AggregateFunction(); + dataStoreMulticall.Calls = new List(); + dataStoreMulticall.Calls.Add(longInterestUsingLongTokenCall); + dataStoreMulticall.Calls.Add(longInterestUsingShortTokenCall); + dataStoreMulticall.Calls.Add(shortInterestUsingLongTokenCall); + dataStoreMulticall.Calls.Add(shortInterestUsingShortTokenCall); + var queryHandler = web3.Eth.GetContractQueryHandler(); + var returnCalls = await queryHandler + .QueryDeserializingToObjectAsync(dataStoreMulticall, Arbitrum.AddressV2.Multicall) + .ConfigureAwait(false); + + var marketInfos = GmxMappers.Map(response.ReturnValue1); + var result = new GmxMarketInfo() + { + Market = marketInfos, + Infos = DecodeFundingRateOutput(returnCalls, marketInfos.IsSameCollaterals) + }; + + return result; + } + + public async Task GetMarketTokenPrice(Web3 web3, bool maximize = true) + { + var reader = new ReaderService(web3, Arbitrum.AddressV2.Reader); + var market = (await GetMarketsAsync(web3)).First(); + var tokensData = await GetTokensData(web3); + var marketPrices = GmxHelpers.GetContractMarketPrices(tokensData, market); + var marketProps = new MarketsProps() + { + MarketToken = market.MarketToken, + IndexToken = market.IndexToken, + LongToken = market.LongToken, + ShortToken = market.ShortToken + }; + + var response = await reader.GetMarketTokenPriceQueryAsync(Arbitrum.AddressV2.DataStore, marketProps, + marketPrices.IndexTokenPrice, marketPrices.LongTokenPrice, marketPrices.ShortTokenPrice, + _helpers.HashString(Constants.GMX.MAX_PNL_FACTOR_FOR_TRADERS), maximize); + + return GmxMappers.Map(response); + } + + public async Task GetIsMarketDisabled(Web3 web3) + { + var dataStoreService = new DataStoreService(web3, Arbitrum.AddressV2.DataStore); + var market = (await GetMarketsAsync(web3)).First(); + var hashString = _helpers.HashString(Constants.GMX.MARKET_DISABLED_KEY); + var response = await dataStoreService.GetBoolQueryAsync(_helpers.HashData( + new[] { "bytes32", "address" }, + new object[] { hashString, market.MarketToken })); + return response; + } + + public async Task GetLongInterestAmount(Web3 web3) + { + var dataStoreService = new DataStoreService(web3, Arbitrum.AddressV2.DataStore); + var market = (await GetMarketsAsync(web3)).First(); + var keys = GmxKeysService.GetMarketKeys(market.MarketToken); + var response = await dataStoreService.GetUintQueryAsync(keys.LongInterestUsingLongToken.HexToByteArray()); + return response; + } + + public async Task> GetMarketInfosAsync(Web3 web3) + { + var markets = await GetMarketsAsync(web3); + var readerResult = new List(); + foreach (var market in markets) + { + var tokensData = await GetTokensData(web3); + var marketPrices = GmxHelpers.GetContractMarketPrices(tokensData, market); + var marketProps = new MarketsProps() + { + MarketToken = market.MarketToken, + IndexToken = market.IndexToken, + LongToken = market.LongToken, + ShortToken = market.ShortToken + }; + var getMarketInfoCallData = new GetMarketInfoFunction + { + DataStore = Arbitrum.AddressV2.DataStore, + Prices = marketPrices, + MarketKey = market.MarketToken + }.GetCallData(); + var getMarketInfoCall = new Call + { + Target = Arbitrum.AddressV2.Reader, + CallData = getMarketInfoCallData + }; + var getMarketTokenPriceCallData = new GetMarketTokenPriceFunction + { + DataStore = Arbitrum.AddressV2.DataStore, + Market = marketProps, + IndexTokenPrice = marketPrices.IndexTokenPrice, + LongTokenPrice = marketPrices.LongTokenPrice, + ShortTokenPrice = marketPrices.ShortTokenPrice, + PnlFactorType = _helpers.HashString(Constants.GMX.MAX_PNL_FACTOR_FOR_TRADERS), + Maximize = true + }.GetCallData(); + var getMarketTokenPriceCall = new Call + { + Target = Arbitrum.AddressV2.Reader, + CallData = getMarketTokenPriceCallData + }; + var getMarketTokenPriceMinCallData = new GetMarketTokenPriceFunction + { + DataStore = Arbitrum.AddressV2.DataStore, + Market = marketProps, + IndexTokenPrice = marketPrices.IndexTokenPrice, + LongTokenPrice = marketPrices.LongTokenPrice, + ShortTokenPrice = marketPrices.ShortTokenPrice, + PnlFactorType = _helpers.HashString(Constants.GMX.MAX_PNL_FACTOR_FOR_TRADERS), + Maximize = false + }.GetCallData(); + var getMarketTokenPriceMinCall = new Call + { + Target = Arbitrum.AddressV2.Reader, + CallData = getMarketTokenPriceMinCallData + }; + + var readerMulticall = new AggregateFunction(); + readerMulticall.Calls = new List(); + readerMulticall.Calls.Add(getMarketInfoCall); + readerMulticall.Calls.Add(getMarketTokenPriceCall); + readerMulticall.Calls.Add(getMarketTokenPriceMinCall); + + var queryHandler = web3.Eth.GetContractQueryHandler(); + var readerCallResults = await queryHandler + .QueryDeserializingToObjectAsync(readerMulticall, Arbitrum.AddressV2.Multicall) + .ConfigureAwait(false); + + var marketInfo = new GetMarketInfoOutputDTO().DecodeOutput(readerCallResults.ReturnData[0].ToHex()); + var marketTokenPriceMax = + new GetMarketTokenPriceOutputDTO().DecodeOutput(readerCallResults.ReturnData[1].ToHex()); + var marketTokenPriceMin = + new GetMarketTokenPriceOutputDTO().DecodeOutput(readerCallResults.ReturnData[2].ToHex()); + + // Get hashed key to call datastore + var marketKeys = GmxKeysService.GetMarketKeys(market.MarketToken); + if (marketKeys == null) + continue; + + var longInterestUsingLongTokenCallData = new GetUintFunction() + { + Key = marketKeys.LongInterestUsingLongToken.HexToByteArray() + }.GetCallData(); + var longInterestUsingLongTokenCall = new Call + { + Target = Arbitrum.AddressV2.DataStore, + CallData = longInterestUsingLongTokenCallData + }; + var longInterestUsingShortTokenCallData = new GetUintFunction() + { + Key = marketKeys.LongInterestUsingShortToken.HexToByteArray() + }.GetCallData(); + var longInterestUsingShortTokenCall = new Call + { + Target = Arbitrum.AddressV2.DataStore, + CallData = longInterestUsingShortTokenCallData + }; + var shortInterestUsingLongTokenCallData = new GetUintFunction() + { + Key = marketKeys.ShortInterestUsingLongToken.HexToByteArray() + }.GetCallData(); + var shortInterestUsingLongTokenCall = new Call + { + Target = Arbitrum.AddressV2.DataStore, + CallData = shortInterestUsingLongTokenCallData + }; + var shortInterestUsingShortTokenCallData = new GetUintFunction() + { + Key = marketKeys.ShortInterestUsingShortToken.HexToByteArray() + }.GetCallData(); + var shortInterestUsingShortTokenCall = new Call + { + Target = Arbitrum.AddressV2.DataStore, + CallData = shortInterestUsingShortTokenCallData + }; + + var dataStoreMulticall = new AggregateFunction(); + dataStoreMulticall.Calls = new List(); + dataStoreMulticall.Calls.Add(longInterestUsingLongTokenCall); + dataStoreMulticall.Calls.Add(longInterestUsingShortTokenCall); + dataStoreMulticall.Calls.Add(shortInterestUsingLongTokenCall); + dataStoreMulticall.Calls.Add(shortInterestUsingShortTokenCall); + + // Call datastore to get market info + var dataStoreQueryHandler = web3.Eth.GetContractQueryHandler(); + var dataStoreCallResults = await dataStoreQueryHandler + .QueryDeserializingToObjectAsync(dataStoreMulticall, Arbitrum.AddressV2.Multicall) + .ConfigureAwait(false); + + var marketInfos = GmxMappers.Map(marketInfo.ReturnValue1); + readerResult.Add(new GmxMarketInfo() + { + Market = marketInfos, + Infos = DecodeFundingRateOutput(dataStoreCallResults, marketInfos.IsSameCollaterals), + MarketTokenPriceMax = GmxMappers.Map(marketTokenPriceMax), + MarketTokenPriceMin = GmxMappers.Map(marketTokenPriceMin) + }); + } + + return readerResult; + } + + private GmxMarketInfos DecodeFundingRateOutput(AggregateOutputDTO results, bool isSameCollaterals) + { + var marketDivisor = new BigInteger(isSameCollaterals ? 2 : 1); + var longInterestUsingLongToken = + new GetUintOutputDTO().DecodeOutput(results.ReturnData[0].ToHex()).ReturnValue1 / marketDivisor; + var longInterestUsingShortToken = + new GetUintOutputDTO().DecodeOutput(results.ReturnData[1].ToHex()).ReturnValue1 / marketDivisor; + var shortInterestUsingLongToken = + new GetUintOutputDTO().DecodeOutput(results.ReturnData[2].ToHex()).ReturnValue1 / marketDivisor; + var shortInterestUsingShortToken = + new GetUintOutputDTO().DecodeOutput(results.ReturnData[3].ToHex()).ReturnValue1 / marketDivisor; + + var longInterestUsd = longInterestUsingLongToken + longInterestUsingShortToken; + var shortInterestUsd = shortInterestUsingLongToken + shortInterestUsingShortToken; + + var marketInfos = new GmxMarketInfos() + { + LongInterestUsd = longInterestUsd, + ShortInterestUsd = shortInterestUsd + }; + return marketInfos; + } + + public async Task> GetTokensData(Web3 web3) + { + var tokens = TokenV2Service.GetTokens().ToList(); + var balances = await GetTokenBalances(web3, tokens); + var prices = GetTokenPrices(web3, tokens); + var result = new List(); + + foreach (var token in tokens) + { + BigInteger? balance = null; + if (balances.Balances != null && balances.Balances.ContainsKey(token.Address)) + { + balance = balances.Balances[token.Address]; + } + + var price = prices[token.Address].Price; + + var data = new GmxTokenData() + { + Address = token.Address, + Name = token.Name, + Symbol = token.Symbol, + Decimals = token.Decimals, + Price = price, + Balance = balance + }; + result.Add(data); + } + + return result; + } + + private Dictionary GetTokenPrices(Web3 web3, List tokens) + { + var result = new Dictionary(); + foreach (var token in tokens) + { + // TODO fetch token price from oracle + result.Add(token.Address, new GmxTokenPriceData() + { + Price = new MarketPrice() + { + Min = 0, + Max = 0 + }, + Balance = 0, + TotalSupply = 0 + }); + } + + return result; + } + + public async Task GetTokenBalances(Web3 web3, List tokens, string? account = null) + { + var result = new GmxTokenBalances(); + result.Balances = new Dictionary(); + var aggregateFunction = new AggregateFunction(); + aggregateFunction.Calls = new List(); + foreach (var token in tokens) + { + if (token.IsNative) + { + var nativeBalanceCallData = new GetEthBalanceFunction() + { + Addr = account ?? Nethereum.Util.AddressUtil.ZERO_ADDRESS + }.GetCallData(); + aggregateFunction.Calls.Add(new Call + { + Target = Arbitrum.AddressV2.Multicall, + CallData = nativeBalanceCallData + }); + } + else + { + var balanceCallData = new BalanceOfFunction() + { + Owner = account ?? GmxHelpers.GetRandomAddress() + }.GetCallData(); + aggregateFunction.Calls.Add(new Call + { + Target = token.Address, + CallData = balanceCallData + }); + } + + var queryHandler = web3.Eth.GetContractQueryHandler(); + var returnCalls = await queryHandler + .QueryDeserializingToObjectAsync(aggregateFunction, Arbitrum.AddressV2.Multicall) + .ConfigureAwait(false); + + var balances = new BalanceOfOutputDTOBase().DecodeOutput(returnCalls.ReturnData[0].ToHex()); + result.Balances.Add(token.Address, balances.Balance); + } + + return result; + } + + public async Task> GetFundingRate(Web3 web3) + { + var market = await GetMarketInfo(web3); + return Map(market); + } + + private List Map(GmxMarketInfo market) + { + var longApr = GetFundingFactorPerPeriod(market, true, Periods[Enums.Timeframe.OneHour]) * 100; + var shortApr = GetFundingFactorPerPeriod(market, false, Periods[Enums.Timeframe.OneHour]) * 100; + var longFundingRate = new FundingRate() + { + Ticker = GmxHelpers.GetTicker(market.Market.Symbol), + Rate = GmxHelpers.FormatAmount(longApr, 30, 4), + Direction = Enums.TradeDirection.Long + }; + var shortFundingRate = new FundingRate() + { + Ticker = GmxHelpers.GetTicker(market.Market.Symbol), + Rate = GmxHelpers.FormatAmount(shortApr, 30, 4), + Direction = Enums.TradeDirection.Short + }; + return new List() { longFundingRate, shortFundingRate }; + } + + public async Task> GetFundingRates(Web3 web3) + { + var fundingRates = new List(); + var marketDatas = await GetMarketInfosAsync(web3); + foreach (var gmxMarketInfo in marketDatas) + { + var rates = Map(gmxMarketInfo); + fundingRates.AddRange(rates); + } + + return fundingRates; + } + + private BigInteger GetFundingFactorPerPeriod(GmxMarketInfo marketInfo, bool isLong, int periodInSeconds) + { + var fundingFactorPerSecond = marketInfo.Market.FundingFactorPerSecond; + var longsPayShorts = marketInfo.Market.LongsPayShorts; + var longInterestUsd = marketInfo.Infos.LongInterestUsd; + var shortInterestUsd = marketInfo.Infos.ShortInterestUsd; + + var isLargerSide = isLong ? longsPayShorts : !longsPayShorts; + + BigInteger factorPerSecond; + + if (isLargerSide) + { + factorPerSecond = fundingFactorPerSecond * -1; + } + else + { + var largerInterestUsd = longsPayShorts ? longInterestUsd : shortInterestUsd; + var smallerInterestUsd = longsPayShorts ? shortInterestUsd : longInterestUsd; + + var ratio = smallerInterestUsd > 0 + ? BigInteger.Multiply(largerInterestUsd, PRECISION) / smallerInterestUsd + : 0; + + factorPerSecond = ApplyFactor(ratio, fundingFactorPerSecond); + } + + return factorPerSecond * periodInSeconds; + } + + private BigInteger ApplyFactor(BigInteger ratio, BigInteger fundingFactorPerSecond) + { + // Implement the logic for applying the factor based on the ratio + // This is a placeholder implementation + return BigInteger.Multiply(ratio, fundingFactorPerSecond) / PRECISION; + } + + private static readonly BigInteger PRECISION = BigInteger.Pow(10, 18); + + private Dictionary Periods = new Dictionary() + { + { Enums.Timeframe.FiveMinutes, 300 }, + { Enums.Timeframe.FifteenMinutes, 900 }, + { Enums.Timeframe.OneHour, 3600 }, + { Enums.Timeframe.FourHour, 14400 }, + { Enums.Timeframe.OneDay, 86400 } + }; +} \ No newline at end of file diff --git a/src/Managing.Infrastructure.Web3/Services/Gmx/TokenV2Service.cs b/src/Managing.Infrastructure.Web3/Services/Gmx/TokenV2Service.cs new file mode 100644 index 0000000..6d78f2d --- /dev/null +++ b/src/Managing.Infrastructure.Web3/Services/Gmx/TokenV2Service.cs @@ -0,0 +1,447 @@ +using Managing.Common; + +namespace Managing.Infrastructure.Evm.Models.Gmx.v2; + +public static class TokenV2Service +{ + public static List TOKENS { get; set; } = new List + { + new GmxToken + { + Name = "Ethereum", + Symbol = "ETH", + Decimals = 18, + Address = Nethereum.Util.AddressUtil.ZERO_ADDRESS, + IsNative = true, + IsShortable = true, + ImageUrl = "https://assets.coingecko.com/coins/images/279/small/ethereum.png?1595348880", + CoingeckoUrl = "https://www.coingecko.com/en/coins/ethereum", + IsV1Available = true + }, + new GmxToken + { + Name = "Wrapped Ethereum", + Symbol = "WETH", + Decimals = 18, + Address = Constants.GMX.TokenAddress.WETH, + IsWrapped = true, + BaseSymbol = "ETH", + ImageUrl = "https://assets.coingecko.com/coins/images/2518/thumb/weth.png?1628852295", + CoingeckoUrl = "https://www.coingecko.com/en/coins/ethereum", + IsV1Available = true + }, + new GmxToken + { + Name = "Wrapped Stacked Ethereum", + Symbol = "WSTETH", + Decimals = 18, + Address = Constants.GMX.TokenAddress.WSTETH, + IsWrapped = true, + BaseSymbol = "wstETH", + ImageUrl = "https://assets.coingecko.com/coins/images/2518/thumb/wsteth.png?1628852295", + CoingeckoUrl = "https://www.coingecko.com/en/coins/ethereum", + }, + new GmxToken + { + Name = "Bitcoin (WBTC)", + Symbol = "BTC", + AssetSymbol = "WBTC", + Decimals = 8, + Address = Constants.GMX.TokenAddress.WBTC, + IsShortable = true, + ImageUrl = "https://assets.coingecko.com/coins/images/26115/thumb/btcb.png?1655921693", + CoingeckoUrl = "https://www.coingecko.com/en/coins/wrapped-bitcoin", + ExplorerUrl = "https://arbiscan.io/address/0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f", + IsV1Available = true + }, + new GmxToken + { + Name = "Arbitrum", + Symbol = "ARB", + Decimals = 18, + PriceDecimals = 3, + Address = Constants.GMX.TokenAddress.ARB, + ImageUrl = + "https://assets.coingecko.com/coins/images/16547/small/photo_2023-03-29_21.47.00.jpeg?1680097630", + CoingeckoUrl = "https://www.coingecko.com/en/coins/arbitrum", + ExplorerUrl = "https://arbiscan.io/token/0x912ce59144191c1204e64559fe8253a0e49e6548" + }, + new GmxToken + { + Name = "Wrapped SOL (Wormhole)", + Symbol = "SOL", + AssetSymbol = "WSOL (Wormhole)", + Decimals = 9, + Address = Constants.GMX.TokenAddress.SOL, + ImageUrl = "https://assets.coingecko.com/coins/images/4128/small/solana.png?1640133422", + CoingeckoUrl = "https://www.coingecko.com/en/coins/solana", + ExplorerUrl = "https://arbiscan.io/token/0x2bCc6D6CdBbDC0a4071e48bb3B969b06B3330c07", + }, + new GmxToken + { + Name = "Chainlink", + Symbol = "LINK", + Decimals = 18, + PriceDecimals = 3, + Address = Constants.GMX.TokenAddress.LINK, + IsStable = false, + IsShortable = true, + ImageUrl = "https://assets.coingecko.com/coins/images/877/thumb/chainlink-new-logo.png?1547034700", + CoingeckoUrl = "https://www.coingecko.com/en/coins/chainlink", + ExplorerUrl = "https://arbiscan.io/token/0xf97f4df75117a78c1a5a0dbb814af92458539fb4", + IsV1Available = true + }, + new GmxToken + { + Name = "Uniswap", + Symbol = "UNI", + Decimals = 18, + PriceDecimals = 3, + Address = Constants.GMX.TokenAddress.UNI, + IsStable = false, + IsShortable = true, + ImageUrl = "https://assets.coingecko.com/coins/images/12504/thumb/uniswap-uni.png?1600306604", + CoingeckoUrl = "https://www.coingecko.com/en/coins/uniswap", + ExplorerUrl = "https://arbiscan.io/token/0xfa7f8980b0f1e64a2062791cc3b0871572f1f7f0", + IsV1Available = true + }, + new GmxToken + { + Name = "Bridged USDC (USDC.e)", + Symbol = "USDC.e", + Decimals = 6, + Address = Constants.GMX.TokenAddress.USDCE, + IsStable = true, + ImageUrl = "https://assets.coingecko.com/coins/images/6319/thumb/USD_Coin_icon.png?1547042389", + CoingeckoUrl = "https://www.coingecko.com/en/coins/bridged-usdc-arbitrum", + ExplorerUrl = "https://arbiscan.io/token/0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8", + IsV1Available = true + }, + new GmxToken + { + Name = "USD Coin", + Symbol = "USDC", + Decimals = 6, + Address = Constants.GMX.TokenAddress.USDC, + IsStable = true, + IsV1Available = true, + ImageUrl = "https://assets.coingecko.com/coins/images/6319/thumb/USD_Coin_icon.png?1547042389", + CoingeckoUrl = "https://www.coingecko.com/en/coins/usd-coin", + ExplorerUrl = "https://arbiscan.io/address/0xaf88d065e77c8cC2239327C5EDb3A432268e5831" + }, + new GmxToken + { + Name = "Tether", + Symbol = "USDT", + Decimals = 6, + Address = Constants.GMX.TokenAddress.USDT, + IsStable = true, + ImageUrl = "https://assets.coingecko.com/coins/images/325/thumb/Tether-logo.png?1598003707", + ExplorerUrl = "https://arbiscan.io/address/0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", + CoingeckoUrl = "https://www.coingecko.com/en/coins/tether", + IsV1Available = true + }, + new GmxToken + { + Name = "Dai", + Symbol = "DAI", + Decimals = 18, + Address = Constants.GMX.TokenAddress.DAI, + IsStable = true, + ImageUrl = "https://assets.coingecko.com/coins/images/9956/thumb/4943.png?1636636734", + CoingeckoUrl = "https://www.coingecko.com/en/coins/dai", + ExplorerUrl = "https://arbiscan.io/token/0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1", + IsV1Available = true + }, + new GmxToken + { + Name = "USDe", + Symbol = "USDe", + Decimals = 18, + Address = Constants.GMX.TokenAddress.USDE, + IsStable = true, + ImageUrl = "https://assets.coingecko.com/coins/images/9956/thumb/4943.png?1636636734", + CoingeckoUrl = "https://www.coingecko.com/en/coins/usde", + ExplorerUrl = "https://arbiscan.io/token/0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1", + }, + new GmxToken + { + Name = "Frax", + Symbol = "FRAX", + Decimals = 18, + Address = Constants.GMX.TokenAddress.FRAX, + IsStable = true, + ImageUrl = "https://assets.coingecko.com/coins/images/13422/small/frax_logo.png?1608476506", + CoingeckoUrl = "https://www.coingecko.com/en/coins/frax", + ExplorerUrl = "https://arbiscan.io/token/0x17fc002b466eec40dae837fc4be5c67993ddbd6f", + IsV1Available = true + }, + new GmxToken + { + Name = "Magic Internet Money", + Symbol = "MIM", + Decimals = 18, + Address = Constants.GMX.TokenAddress.MIM, + IsStable = true, + ImageUrl = "https://assets.coingecko.com/coins/images/16786/thumb/mimlogopng.png?1624979612", + CoingeckoUrl = "https://www.coingecko.com/en/coins/magic-internet-money", + ExplorerUrl = "https://arbiscan.io/token/0xFEa7a6a0B346362BF88A9e4A88416B77a57D6c2A", + IsV1Available = true + }, + new GmxToken + { + Name = "Bitcoin", + Symbol = "BTC", + Decimals = 8, + Address = Constants.GMX.TokenAddress.BTC, + IsSynthetic = true, + ImageUrl = "https://assets.coingecko.com/coins/images/1/small/bitcoin.png?1547033579", + CoingeckoUrl = "https://www.coingecko.com/en/coins/bitcoin", + }, + new GmxToken() + { + Name = "DogeCoin", + Symbol = "DOGE", + Decimals = 8, + PriceDecimals = 4, + Address = Constants.GMX.TokenAddress.DOGE, + IsSynthetic = true, + ImageUrl = "https://assets.coingecko.com/coins/images/5/small/dogecoin.png?1547792256", + CoingeckoUrl = "https://www.coingecko.com/en/coins/dogecoin", + }, + new GmxToken + { + Name = "Litecoin", + Symbol = "LTC", + Decimals = 8, + Address = Constants.GMX.TokenAddress.LTC, + IsSynthetic = true, + ImageUrl = "https://assets.coingecko.com/coins/images/2/small/litecoin.png?1547033580", + CoingeckoUrl = "https://www.coingecko.com/en/coins/litecoin", + }, + new GmxToken + { + Name = "XRP", + Symbol = "XRP", + Decimals = 6, + PriceDecimals = 4, + Address = Constants.GMX.TokenAddress.XRP, + ImageUrl = "https://assets.coingecko.com/coins/images/44/small/xrp-symbol-white-128.png?1605778731", + CoingeckoUrl = "https://www.coingecko.com/en/coins/xrp", + IsSynthetic = true, + }, + new GmxToken + { + Name = "GMX", + Symbol = "GMX", + Address = + Constants.GMX.TokenAddress.GMX, + Decimals = 18, + ImageUrl = "https://assets.coingecko.com/coins/images/18323/small/arbit.png?1631532468", + CoingeckoUrl = "https://www.coingecko.com/en/coins/gmx", + ExplorerUrl = "https://arbiscan.io/address/0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a", + IsPlatform = true + }, + new GmxToken + { + Name = "Wrapped BNB (LayerZero)", + Symbol = "BNB", + AssetSymbol = "WBNB (LayerZero)", + Address = Constants.GMX.TokenAddress.WBNB, + Decimals = 18, + ImageUrl = "https://assets.coingecko.com/coins/images/825/standard/bnb-icon2_2x.png?1696501970", + CoingeckoUrl = "https://www.coingecko.com/en/coins/bnb", + }, + new GmxToken + { + Name = "Cosmos", + Symbol = "ATOM", + AssetSymbol = "ATOM", + Address = Constants.GMX.TokenAddress.ATOM, + Decimals = 6, + ImageUrl = "https://assets.coingecko.com/coins/images/1481/standard/cosmos_hub.png?1696502525", + CoingeckoUrl = "https://www.coingecko.com/en/coins/cosmos-hub", + IsSynthetic = true + }, + new GmxToken + { + Name = "Near", + Symbol = "NEAR", + AssetSymbol = "NEAR", + Address = Constants.GMX.TokenAddress.NEAR, + Decimals = 24, + ImageUrl = "https://assets.coingecko.com/coins/images/10365/standard/near.jpg?1696510367", + CoingeckoUrl = "https://www.coingecko.com/en/coins/near", + IsSynthetic = true + }, + new GmxToken + { + Name = "Aave", + Symbol = "AAVE", + AssetSymbol = "AAVE", + Address = Constants.GMX.TokenAddress.AAVE, + Decimals = 18, + ImageUrl = "https://assets.coingecko.com/coins/images/12645/standard/AAVE.png?1696512452", + CoingeckoUrl = "https://www.coingecko.com/en/coins/aave" + }, + new GmxToken + { + Name = "Wrapped AVAX (Wormhole)", + Symbol = "AVAX", + AssetSymbol = "WAVAX (Wormhole)", + Address = Constants.GMX.TokenAddress.AVAX, + Decimals = 18, + ImageUrl = "https://assets.coingecko.com/coins/images/12559/small/coin-round-red.png?1604021818", + CoingeckoUrl = "https://www.coingecko.com/en/coins/avalanche" + }, + new GmxToken + { + Name = "Optimism", + Symbol = "OP", + Address = Constants.GMX.TokenAddress.OP, + Decimals = 18, + ImageUrl = "https://assets.coingecko.com/coins/images/25244/standard/Optimism.png?1696524385", + CoingeckoUrl = "https://www.coingecko.com/en/coins/optimism" + }, + new GmxToken + { + Name = "Pepe", + Symbol = "PEPE", + Address = Constants.GMX.TokenAddress.PEPE, + Decimals = 18, + PriceDecimals = 8, + ImageUrl = "https://assets.coingecko.com/coins/images/29850/standard/pepe-token.jpeg?1696528776", + CoingeckoUrl = "https://www.coingecko.com/en/coins/pepe" + }, + new GmxToken + { + Name = "dogwifhat", + Symbol = "WIF", + Address = Constants.GMX.TokenAddress.WIF, + Decimals = 6, + ImageUrl = "https://assets.coingecko.com/coins/images/33566/standard/dogwifhat.jpg?1702499428", + CoingeckoUrl = "https://www.coingecko.com/en/coins/dogwifhat" + }, + new GmxToken + { + Name = "Shiba Inu", + Symbol = "SHIB", + Address = Constants.GMX.TokenAddress.SHIB, + Decimals = 18, + ImageUrl = "https://assets.coingecko.com/coins/images/11939/standard/shiba.png?1696511800", + CoingeckoUrl = "https://www.coingecko.com/en/coins/shiba-inu", + IsSynthetic = true, + PriceDecimals = 8 + }, + new GmxToken + { + Name = "APE Coin", + Symbol = "APE", + Address = Constants.GMX.TokenAddress.APE, + Decimals = 18, + ImageUrl = "https://assets.coingecko.com/coins/images/11939/standard/shiba.png?1696511800", + CoingeckoUrl = "https://www.coingecko.com/en/coins/shiba-inu", + IsSynthetic = true, + PriceDecimals = 8 + }, + new GmxToken + { + Name = "Stacks", + Symbol = "STX", + Address = Constants.GMX.TokenAddress.STX, + Decimals = 6, + ImageUrl = "https://assets.coingecko.com/coins/images/2069/standard/Stacks_Logo_png.png?1709979332", + CoingeckoUrl = "https://www.coingecko.com/en/coins/stacks", + IsSynthetic = true, + }, + new GmxToken + { + Name = "ORDI", + Symbol = "ORDI", + Address = Constants.GMX.TokenAddress.ORDI, + Decimals = 18, + ImageUrl = "https://assets.coingecko.com/coins/images/30162/standard/ordi.png?1696529082", + CoingeckoUrl = "https://www.coingecko.com/en/coins/ordi", + IsSynthetic = true, + }, + }; + + public static GmxToken NATIVE_TOKEN = TOKENS.First(t => t.IsNative); + public static GmxToken WRAPPRED_NATIVE_TOKEN = TOKENS.First(t => t.IsWrapped); + + public static List GetTokens() + { + return TOKENS; + } + + public static GmxToken GetTokenByAddress(string address) + { + var token = TOKENS.FirstOrDefault(t => GmxV2Helpers.SameAddress(t.Address, address)); + if (token == null) + throw new Exception($"Token with address '{address}' not found"); + + return token; + } + + public static string ConvertTokenAddress(string address, string convertTo = null) + { + if (convertTo == "wrapped" && address == NATIVE_TOKEN.Address) + { + return WRAPPRED_NATIVE_TOKEN.Address; + } + + if (convertTo == "native" && address == WRAPPRED_NATIVE_TOKEN.Address) + { + return NATIVE_TOKEN.Address; + } + + return address; + } + + public static string GetMarketFullName(string indexToken, string longToken, string shortToken, bool isSpotOnly) + { + return $"{GetMarketIndexName(indexToken, isSpotOnly)} [{GetMarketPoolName(longToken, shortToken)}]"; + } + + + public static string GetMarketIndexName(string indexToken, bool isSpotOnly) + { + if (isSpotOnly) + { + return "SPOT-ONLY"; + } + + return indexToken; + } + + public static string GetMarketPoolName(string longToken, string shortToken) + { + if (longToken == shortToken) + { + return longToken; + } + + return $"{longToken}-{shortToken}"; + } +} + +public class GmxToken +{ + public string Name { get; set; } + public string Symbol { get; set; } + public int Decimals { get; set; } + public string Address { get; set; } + public bool IsNative { get; set; } + public bool IsShortable { get; set; } + public string ImageUrl { get; set; } + public string CoingeckoUrl { get; set; } + public bool IsV1Available { get; set; } + public bool IsStable { get; set; } + public string ExplorerUrl { get; set; } + public string BaseSymbol { get; set; } + public string AssetSymbol { get; set; } + public bool IsWrapped { get; set; } + public int PriceDecimals { get; set; } + public bool IsSynthetic { get; set; } + public bool IsPlatform { get; set; } +} \ No newline at end of file diff --git a/src/Managing.Tools.ABI/Managing.Tools.ABI.csproj b/src/Managing.Tools.ABI/Managing.Tools.ABI.csproj index d18a1c8..7d94ba8 100644 --- a/src/Managing.Tools.ABI/Managing.Tools.ABI.csproj +++ b/src/Managing.Tools.ABI/Managing.Tools.ABI.csproj @@ -1,14 +1,29 @@ - - Exe - net8.0 - enable - enable - + + Exe + net8.0 + enable + enable + - - - + + + + + + + + + + + + + + + + + + diff --git a/src/Managing.Tools.ABI/Reader/ContractDefinition/ReaderDefinition.cs b/src/Managing.Tools.ABI/Reader/ContractDefinition/ReaderDefinition.cs index 3a7117f..4c9d81b 100644 --- a/src/Managing.Tools.ABI/Reader/ContractDefinition/ReaderDefinition.cs +++ b/src/Managing.Tools.ABI/Reader/ContractDefinition/ReaderDefinition.cs @@ -2,233 +2,253 @@ using System.Numerics; using Nethereum.ABI.FunctionEncoding.Attributes; using Nethereum.Contracts; -namespace Managing.Tools.Reader.ContractDefinition +namespace Managing.Tools.ABI.Reader.ContractDefinition { - - public partial class ReaderDeployment : ReaderDeploymentBase { - public ReaderDeployment() : base(BYTECODE) { } - public ReaderDeployment(string byteCode) : base(byteCode) { } + public ReaderDeployment() : base(BYTECODE) + { + } + + public ReaderDeployment(string byteCode) : base(byteCode) + { + } } public class ReaderDeploymentBase : ContractDeploymentMessage { - public static string BYTECODE = "608060405234801561001057600080fd5b50600080546001600160a01b031916331790556159ff80620000336000396000f3fe608060405234801561001057600080fd5b506004361061013e5760003560e01c8063126082cf1461014357806312d43a511461015d57806320542568146101815780632413c8c1146102925780632ac0184c146103335780632e3e3342146103e45780633613d52714610495578063440f018c1461054657806348211934146105a05780637b906e931461065157806386d4d0f514610712578063870d917c146107c35780638e83ca32146107cb578063937a0be81461088c57806395082d251461093d57806395a7535a146109455780639b0183c3146109ff578063a4543ead14610a20578063ad7e549714610ad1578063c6f1d67614610ad9578063cfad57a214610af5578063d7176ca914610b1b578063d802178e14610b70578063dc383cab14610c21578063f3535e6c14610ddf578063fbdb05ca14610e17575b600080fd5b61014b610ec8565b60408051918252519081900360200190f35b610165610ece565b604080516001600160a01b039092168252519081900360200190f35b6102426004803603608081101561019757600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b8111156101d157600080fd5b8201836020820111156101e357600080fd5b803590602001918460208302840111600160201b8311171561020457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610edd945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561027e578181015183820152602001610266565b505050509050019250505060405180910390f35b610242600480360360208110156102a857600080fd5b810190602081018135600160201b8111156102c257600080fd5b8201836020820111156102d457600080fd5b803590602001918460208302840111600160201b831117156102f557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506115eb945050505050565b61014b6004803603604081101561034957600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561037357600080fd5b82018360208201111561038557600080fd5b803590602001918460208302840111600160201b831117156103a657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506116e4945050505050565b610242600480360360408110156103fa57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561042457600080fd5b82018360208201111561043657600080fd5b803590602001918460208302840111600160201b8311171561045757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061180f945050505050565b610242600480360360408110156104ab57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156104d557600080fd5b8201836020820111156104e757600080fd5b803590602001918460208302840111600160201b8311171561050857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611a14945050505050565b6105826004803603608081101561055c57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135611e4e565b60408051938452602084019290925282820152519081900360600190f35b610242600480360360408110156105b657600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156105e057600080fd5b8201836020820111156105f257600080fd5b803590602001918460208302840111600160201b8311171561061357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506123b3945050505050565b6102426004803603608081101561066757600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b8111156106a157600080fd5b8201836020820111156106b357600080fd5b803590602001918460208302840111600160201b831117156106d457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612867945050505050565b6102426004803603604081101561072857600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561075257600080fd5b82018360208201111561076457600080fd5b803590602001918460208302840111600160201b8311171561078557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550613098945050505050565b61014b613198565b610242600480360360808110156107e157600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561081b57600080fd5b82018360208201111561082d57600080fd5b803590602001918460208302840111600160201b8311171561084e57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061319d945050505050565b610242600480360360408110156108a257600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156108cc57600080fd5b8201836020820111156108de57600080fd5b803590602001918460208302840111600160201b831117156108ff57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550613b1a945050505050565b61014b613caf565b6102426004803603606081101561095b57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561098e57600080fd5b8201836020820111156109a057600080fd5b803590602001918460208302840111600160201b831117156109c157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550613cbf945050505050565b610a1e60048036036020811015610a1557600080fd5b5035151561418d565b005b61024260048036036040811015610a3657600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610a6057600080fd5b820183602082011115610a7257600080fd5b803590602001918460208302840111600160201b83111715610a9357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550614202945050505050565b61014b61446e565b610ae1614473565b604080519115158252519081900360200190f35b610a1e60048036036020811015610b0b57600080fd5b50356001600160a01b0316614483565b610b5760048036036080811015610b3157600080fd5b506001600160a01b038135811691602081013582169160408201351690606001356144fc565b6040805192835260208301919091528051918290030190f35b61024260048036036040811015610b8657600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610bb057600080fd5b820183602082011115610bc257600080fd5b803590602001918460208302840111600160201b83111715610be357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550614bb2945050505050565b610242600480360360a0811015610c3757600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b811115610c6a57600080fd5b820183602082011115610c7c57600080fd5b803590602001918460208302840111600160201b83111715610c9d57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610cec57600080fd5b820183602082011115610cfe57600080fd5b803590602001918460208302840111600160201b83111715610d1f57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610d6e57600080fd5b820183602082011115610d8057600080fd5b803590602001918460208302840111600160201b83111715610da157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550614cfe945050505050565b61014b60048036036060811015610df557600080fd5b506001600160a01b0381358116916020810135821691604090910135166150fa565b61014b60048036036040811015610e2d57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610e5757600080fd5b820183602082011115610e6957600080fd5b803590602001918460208302840111600160201b83111715610e8a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506156c1945050505050565b61271081565b6000546001600160a01b031681565b60606000600a905060008690506000816001600160a01b031663741bef1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2557600080fd5b505afa158015610f39573d6000803e3d6000fd5b505050506040513d6020811015610f4f57600080fd5b5051855190915060609084026001600160401b0381118015610f7057600080fd5b50604051908082528060200260200182016040528015610f9a578160200160208202803683370190505b50905060005b86518110156115de576000878281518110610fb757fe5b6020026020010151905060006001600160a01b0316816001600160a01b03161415610fdf5750885b846001600160a01b03166352f55eed826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561102c57600080fd5b505afa158015611040573d6000803e3d6000fd5b505050506040513d602081101561105657600080fd5b50518351849084890290811061106857fe5b602002602001018181525050846001600160a01b031663c3c7b9e9826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156110c157600080fd5b505afa1580156110d5573d6000803e3d6000fd5b505050506040513d60208110156110eb57600080fd5b5051835184906001858a020190811061110057fe5b602002602001018181525050846001600160a01b0316631aa4ace5826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561115957600080fd5b505afa15801561116d573d6000803e3d6000fd5b505050506040513d602081101561118357600080fd5b5051835184906002858a020190811061119857fe5b602002602001018181525050846001600160a01b0316632c668ec1828b6040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b1580156111f957600080fd5b505afa15801561120d573d6000803e3d6000fd5b505050506040513d602081101561122357600080fd5b5051835184906003858a020190811061123857fe5b602002602001018181525050846001600160a01b031663ab2f3ad4826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561129157600080fd5b505afa1580156112a5573d6000803e3d6000fd5b505050506040513d60208110156112bb57600080fd5b5051835184906004858a02019081106112d057fe5b602002602001018181525050846001600160a01b03166381a612d6826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561132957600080fd5b505afa15801561133d573d6000803e3d6000fd5b505050506040513d602081101561135357600080fd5b5051835184906005858a020190811061136857fe5b602002602001018181525050846001600160a01b031663e124e6d2826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156113c157600080fd5b505afa1580156113d5573d6000803e3d6000fd5b505050506040513d60208110156113eb57600080fd5b5051835184906006858a020190811061140057fe5b602002602001018181525050846001600160a01b031663f07456ce826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561145957600080fd5b505afa15801561146d573d6000803e3d6000fd5b505050506040513d602081101561148357600080fd5b5051835184906007858a020190811061149857fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038481166004830152600060248301529151918716926356c8c2c192604480840193829003018186803b1580156114f257600080fd5b505afa158015611506573d6000803e3d6000fd5b505050506040513d602081101561151c57600080fd5b5051835184906008858a020190811061153157fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038481166004830152600160248301529151918716926356c8c2c192604480840193829003018186803b15801561158b57600080fd5b505afa15801561159f573d6000803e3d6000fd5b505050506040513d60208110156115b557600080fd5b5051835184906009858a02019081106115ca57fe5b602090810291909101015250600101610fa0565b5098975050505050505050565b60608082516001600160401b038111801561160557600080fd5b5060405190808252806020026020018201604052801561162f578160200160208202803683370190505b50905060005b83518110156116dd57600084828151811061164c57fe5b60200260200101519050806001600160a01b031663817b1cd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561168f57600080fd5b505afa1580156116a3573d6000803e3d6000fd5b505050506040513d60208110156116b957600080fd5b505183518490849081106116c957fe5b602090810291909101015250600101611635565b5092915050565b600080836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561172057600080fd5b505afa158015611734573d6000803e3d6000fd5b505050506040513d602081101561174a57600080fd5b5051905060005b835181101561180557600084828151811061176857fe5b602002602001015190506000866001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156117c157600080fd5b505afa1580156117d5573d6000803e3d6000fd5b505050506040513d60208110156117eb57600080fd5b505190506117f9848261577a565b93505050600101611751565b5090505b92915050565b60606000600290506060818451026001600160401b038111801561183257600080fd5b5060405190808252806020026020018201604052801561185c578160200160208202803683370190505b50905060005b8451811015611a0b57600085828151811061187957fe5b6020026020010151905060006001600160a01b0316816001600160a01b031614156118e857866001600160a01b03163183858402815181106118b757fe5b602002602001018181525050600083858402600101815181106118d657fe5b60200260200101818152505050611a03565b806001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561193557600080fd5b505afa158015611949573d6000803e3d6000fd5b505050506040513d602081101561195f57600080fd5b50518351849084870290811061197157fe5b602002602001018181525050806001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119b657600080fd5b505afa1580156119ca573d6000803e3d6000fd5b505050506040513d60208110156119e057600080fd5b5051835184906001858802019081106119f557fe5b602002602001018181525050505b600101611862565b50949350505050565b60606000600690506060818451026001600160401b0381118015611a3757600080fd5b50604051908082528060200260200182016040528015611a61578160200160208202803683370190505b50905060005b8451811015611a0b576000858281518110611a7e57fe5b602090810291909101810151604080516317e1d38560e11b81526001600160a01b0380841660048301526001602483018190526044830152600060648301529151929450908a1692632fc3a70a92608480840193829003018186803b158015611ae657600080fd5b505afa158015611afa573d6000803e3d6000fd5b505050506040513d6020811015611b1057600080fd5b505183518490848702908110611b2257fe5b602090810291909101810191909152604080516317e1d38560e11b81526001600160a01b0384811660048301526000602483018190526001604484015260648301529151918a1692632fc3a70a92608480840193829003018186803b158015611b8a57600080fd5b505afa158015611b9e573d6000803e3d6000fd5b505050506040513d6020811015611bb457600080fd5b505183518490600185880201908110611bc957fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038481166004830152600160248301529151918a16926356c8c2c192604480840193829003018186803b158015611c2357600080fd5b505afa158015611c37573d6000803e3d6000fd5b505050506040513d6020811015611c4d57600080fd5b505183518490600285880201908110611c6257fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038481166004830152600060248301529151918a16926356c8c2c192604480840193829003018186803b158015611cbc57600080fd5b505afa158015611cd0573d6000803e3d6000fd5b505050506040513d6020811015611ce657600080fd5b505183518490600385880201908110611cfb57fe5b602002602001018181525050866001600160a01b0316636ce8a44b826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611d5457600080fd5b505afa158015611d68573d6000803e3d6000fd5b505050506040513d6020811015611d7e57600080fd5b5051611d8b576000611d8e565b60015b60ff168385840260040181518110611da257fe5b602002602001018181525050866001600160a01b03166348cac277826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611dfb57600080fd5b505afa158015611e0f573d6000803e3d6000fd5b505050506040513d6020811015611e2557600080fd5b505183518490600585880201908110611e3a57fe5b602090810291909101015250600101611a67565b600080600080876001600160a01b03166381a612d6886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611ea157600080fd5b505afa158015611eb5573d6000803e3d6000fd5b505050506040513d6020811015611ecb57600080fd5b5051604080516323b95ceb60e21b81526001600160a01b038a811660048301529151929350600092918b1691638ee573ac91602480820192602092909190829003018186803b158015611f1d57600080fd5b505afa158015611f31573d6000803e3d6000fd5b505050506040513d6020811015611f4757600080fd5b505190506000611f6d68327cb2734119d3b7a9601e1b611f6789866157bc565b90615815565b9050611f89600a83900a611f6783670de0b6b3a76400006157bc565b905060008a6001600160a01b03166342b60b038b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611fda57600080fd5b505afa158015611fee573d6000803e3d6000fd5b505050506040513d602081101561200457600080fd5b5051801561208757508a6001600160a01b03166342b60b038a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561205a57600080fd5b505afa15801561206e573d6000803e3d6000fd5b505050506040513d602081101561208457600080fd5b50515b90506000816120fa578b6001600160a01b031663a22f23926040518163ffffffff1660e01b815260040160206040518083038186803b1580156120c957600080fd5b505afa1580156120dd573d6000803e3d6000fd5b505050506040513d60208110156120f357600080fd5b5051612160565b8b6001600160a01b031663df73a2676040518163ffffffff1660e01b815260040160206040518083038186803b15801561213357600080fd5b505afa158015612147573d6000803e3d6000fd5b505050506040513d602081101561215d57600080fd5b50515b90506000826121d3578c6001600160a01b0316637a210a2b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121a257600080fd5b505afa1580156121b6573d6000803e3d6000fd5b505050506040513d60208110156121cc57600080fd5b5051612239565b8c6001600160a01b03166310eb56c26040518163ffffffff1660e01b815260040160206040518083038186803b15801561220c57600080fd5b505afa158015612220573d6000803e3d6000fd5b505050506040513d602081101561223657600080fd5b50515b905060008d6001600160a01b031663c7e074c38e87868660016040518663ffffffff1660e01b815260040180866001600160a01b0316815260200185815260200184815260200183815260200182151581526020019550505050505060206040518083038186803b1580156122ad57600080fd5b505afa1580156122c1573d6000803e3d6000fd5b505050506040513d60208110156122d757600080fd5b8101908080519060200190929190505050905060008e6001600160a01b031663c7e074c38e88878760006040518663ffffffff1660e01b815260040180866001600160a01b0316815260200185815260200184815260200183815260200182151581526020019550505050505060206040518083038186803b15801561235c57600080fd5b505afa158015612370573d6000803e3d6000fd5b505050506040513d602081101561238657600080fd5b505190506000818311612399578161239b565b825b9b509199509750505050505050509450945094915050565b60606000600790506060818451026001600160401b03811180156123d657600080fd5b50604051908082528060200260200182016040528015612400578160200160208202803683370190505b50905060005b8451811015611a0b57600085828151811061241d57fe5b60200260200101519050806001600160a01b0316635d50e729886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561247457600080fd5b505afa158015612488573d6000803e3d6000fd5b505050506040513d602081101561249e57600080fd5b5051835184908487029081106124b057fe5b602002602001018181525050806001600160a01b031663d5a73fdd886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561250957600080fd5b505afa15801561251d573d6000803e3d6000fd5b505050506040513d602081101561253357600080fd5b50518351849060018588020190811061254857fe5b60200260200101818152505085828151811061256057fe5b60200260200101516001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156125b457600080fd5b505afa1580156125c8573d6000803e3d6000fd5b505050506040513d60208110156125de57600080fd5b5051835184906002858802019081106125f357fe5b602002602001018181525050806001600160a01b03166371417b32886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561264c57600080fd5b505afa158015612660573d6000803e3d6000fd5b505050506040513d602081101561267657600080fd5b50518351849060038588020190811061268b57fe5b602002602001018181525050806001600160a01b031663402914f5886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156126e457600080fd5b505afa1580156126f8573d6000803e3d6000fd5b505050506040513d602081101561270e57600080fd5b50518351849060048588020190811061272357fe5b602002602001018181525050806001600160a01b03166308f26c76886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561277c57600080fd5b505afa158015612790573d6000803e3d6000fd5b505050506040513d60208110156127a657600080fd5b5051835184906005858802019081106127bb57fe5b602002602001018181525050806001600160a01b03166345f01ee6886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561281457600080fd5b505afa158015612828573d6000803e3d6000fd5b505050506040513d602081101561283e57600080fd5b50518351849060068588020190811061285357fe5b602090810291909101015250600101612406565b60606000600c905060008690506000816001600160a01b031663741bef1a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128af57600080fd5b505afa1580156128c3573d6000803e3d6000fd5b505050506040513d60208110156128d957600080fd5b5051855190915060609084026001600160401b03811180156128fa57600080fd5b50604051908082528060200260200182016040528015612924578160200160208202803683370190505b50905060005b86518110156115de57600087828151811061294157fe5b6020026020010151905060006001600160a01b0316816001600160a01b031614156129695750885b846001600160a01b03166352f55eed826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156129b657600080fd5b505afa1580156129ca573d6000803e3d6000fd5b505050506040513d60208110156129e057600080fd5b5051835184908489029081106129f257fe5b602002602001018181525050846001600160a01b031663c3c7b9e9826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612a4b57600080fd5b505afa158015612a5f573d6000803e3d6000fd5b505050506040513d6020811015612a7557600080fd5b5051835184906001858a0201908110612a8a57fe5b602002602001018181525050846001600160a01b0316631aa4ace5826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612ae357600080fd5b505afa158015612af7573d6000803e3d6000fd5b505050506040513d6020811015612b0d57600080fd5b5051835184906002858a0201908110612b2257fe5b602002602001018181525050846001600160a01b0316632c668ec1828b6040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b158015612b8357600080fd5b505afa158015612b97573d6000803e3d6000fd5b505050506040513d6020811015612bad57600080fd5b5051835184906003858a0201908110612bc257fe5b602002602001018181525050846001600160a01b031663ab2f3ad4826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612c1b57600080fd5b505afa158015612c2f573d6000803e3d6000fd5b505050506040513d6020811015612c4557600080fd5b5051835184906004858a0201908110612c5a57fe5b602002602001018181525050846001600160a01b0316634a993ee9826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612cb357600080fd5b505afa158015612cc7573d6000803e3d6000fd5b505050506040513d6020811015612cdd57600080fd5b5051835184906005858a0201908110612cf257fe5b602002602001018181525050846001600160a01b031663ad1e4f8d826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612d4b57600080fd5b505afa158015612d5f573d6000803e3d6000fd5b505050506040513d6020811015612d7557600080fd5b5051835184906006858a0201908110612d8a57fe5b602002602001018181525050846001600160a01b03166381a612d6826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612de357600080fd5b505afa158015612df7573d6000803e3d6000fd5b505050506040513d6020811015612e0d57600080fd5b5051835184906007858a0201908110612e2257fe5b602002602001018181525050846001600160a01b031663e124e6d2826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612e7b57600080fd5b505afa158015612e8f573d6000803e3d6000fd5b505050506040513d6020811015612ea557600080fd5b5051835184906008858a0201908110612eba57fe5b602002602001018181525050846001600160a01b031663f07456ce826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612f1357600080fd5b505afa158015612f27573d6000803e3d6000fd5b505050506040513d6020811015612f3d57600080fd5b5051835184906009858a0201908110612f5257fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038481166004830152600060248301529151918716926356c8c2c192604480840193829003018186803b158015612fac57600080fd5b505afa158015612fc0573d6000803e3d6000fd5b505050506040513d6020811015612fd657600080fd5b505183518490600a858a0201908110612feb57fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038481166004830152600160248301529151918716926356c8c2c192604480840193829003018186803b15801561304557600080fd5b505afa158015613059573d6000803e3d6000fd5b505050506040513d602081101561306f57600080fd5b505183518490600b858a020190811061308457fe5b60209081029190910101525060010161292a565b60608082516001600160401b03811180156130b257600080fd5b506040519080825280602002602001820160405280156130dc578160200160208202803683370190505b50905060005b835181101561180557846001600160a01b0316631ce9cb8f85838151811061310657fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561314b57600080fd5b505afa15801561315f573d6000803e3d6000fd5b505050506040513d602081101561317557600080fd5b5051825183908390811061318557fe5b60209081029190910101526001016130e2565b601281565b60606000600e905060008690506000816001600160a01b031663741bef1a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156131e557600080fd5b505afa1580156131f9573d6000803e3d6000fd5b505050506040513d602081101561320f57600080fd5b5051855190915060609084026001600160401b038111801561323057600080fd5b5060405190808252806020026020018201604052801561325a578160200160208202803683370190505b50905060005b86518110156115de57600087828151811061327757fe5b6020026020010151905060006001600160a01b0316816001600160a01b0316141561329f5750885b60008054600160a01b900460ff166132b8576000613332565b856001600160a01b0316639698d25a836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561330557600080fd5b505afa158015613319573d6000803e3d6000fd5b505050506040513d602081101561332f57600080fd5b50515b9050856001600160a01b03166352f55eed836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561338157600080fd5b505afa158015613395573d6000803e3d6000fd5b505050506040513d60208110156133ab57600080fd5b505184518590858a029081106133bd57fe5b602002602001018181525050856001600160a01b031663c3c7b9e9836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561341657600080fd5b505afa15801561342a573d6000803e3d6000fd5b505050506040513d602081101561344057600080fd5b5051845185906001868b020190811061345557fe5b602002602001018181525050856001600160a01b0316631aa4ace5836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156134ae57600080fd5b505afa1580156134c2573d6000803e3d6000fd5b505050506040513d60208110156134d857600080fd5b5051845185906002868b02019081106134ed57fe5b602002602001018181525050856001600160a01b0316632c668ec1838c6040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561354e57600080fd5b505afa158015613562573d6000803e3d6000fd5b505050506040513d602081101561357857600080fd5b5051845185906003868b020190811061358d57fe5b602002602001018181525050856001600160a01b031663ab2f3ad4836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156135e657600080fd5b505afa1580156135fa573d6000803e3d6000fd5b505050506040513d602081101561361057600080fd5b5051845185906004868b020190811061362557fe5b602002602001018181525050856001600160a01b0316634a993ee9836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561367e57600080fd5b505afa158015613692573d6000803e3d6000fd5b505050506040513d60208110156136a857600080fd5b5051845185906005868b02019081106136bd57fe5b602002602001018181525050856001600160a01b031663ad1e4f8d836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561371657600080fd5b505afa15801561372a573d6000803e3d6000fd5b505050506040513d602081101561374057600080fd5b5051845185906006868b020190811061375557fe5b602002602001018181525050856001600160a01b0316638a78daa8836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156137ae57600080fd5b505afa1580156137c2573d6000803e3d6000fd5b505050506040513d60208110156137d857600080fd5b5051845185906007868b02019081106137ed57fe5b60200260200101818152505080848885026008018151811061380b57fe5b602002602001018181525050856001600160a01b03166381a612d6836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561386457600080fd5b505afa158015613878573d6000803e3d6000fd5b505050506040513d602081101561388e57600080fd5b5051845185906009868b02019081106138a357fe5b602002602001018181525050856001600160a01b031663e124e6d2836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156138fc57600080fd5b505afa158015613910573d6000803e3d6000fd5b505050506040513d602081101561392657600080fd5b505184518590600a868b020190811061393b57fe5b602002602001018181525050856001600160a01b031663f07456ce836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561399457600080fd5b505afa1580156139a8573d6000803e3d6000fd5b505050506040513d60208110156139be57600080fd5b505184518590600b868b02019081106139d357fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038581166004830152600060248301529151918816926356c8c2c192604480840193829003018186803b158015613a2d57600080fd5b505afa158015613a41573d6000803e3d6000fd5b505050506040513d6020811015613a5757600080fd5b505184518590600c868b0201908110613a6c57fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038581166004830152600160248301529151918816926356c8c2c192604480840193829003018186803b158015613ac657600080fd5b505afa158015613ada573d6000803e3d6000fd5b505050506040513d6020811015613af057600080fd5b505184518590600d868b0201908110613b0557fe5b60209081029190910101525050600101613260565b60606000600290506060818451026001600160401b0381118015613b3d57600080fd5b50604051908082528060200260200182016040528015613b67578160200160208202803683370190505b50905060005b8451811015611a0b576000858281518110613b8457fe5b60200260200101519050806001600160a01b031663402914f5886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015613bdb57600080fd5b505afa158015613bef573d6000803e3d6000fd5b505050506040513d6020811015613c0557600080fd5b505183518490848702908110613c1757fe5b602002602001018181525050806001600160a01b0316632459f51d6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c5c57600080fd5b505afa158015613c70573d6000803e3d6000fd5b505050506040513d6020811015613c8657600080fd5b505183518490600185880201908110613c9b57fe5b602090810291909101015250600101613b6d565b68327cb2734119d3b7a9601e1b81565b60606000600290506060818451026001600160401b0381118015613ce257600080fd5b50604051908082528060200260200182016040528015613d0c578160200160208202803683370190505b5090508560005b855181101561417f576000868281518110613d2a57fe5b6020026020010151905060006001600160a01b0316816001600160a01b03161415613d525750865b6000836001600160a01b03166342b60b03836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015613da157600080fd5b505afa158015613db5573d6000803e3d6000fd5b505050506040513d6020811015613dcb57600080fd5b5051613e3b57836001600160a01b031663c4f718bf6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e0a57600080fd5b505afa158015613e1e573d6000803e3d6000fd5b505050506040513d6020811015613e3457600080fd5b5051613ea1565b836001600160a01b031663134ca63b6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e7457600080fd5b505afa158015613e88573d6000803e3d6000fd5b505050506040513d6020811015613e9e57600080fd5b50515b90506000846001600160a01b031663c3c7b9e9846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015613ef257600080fd5b505afa158015613f06573d6000803e3d6000fd5b505050506040513d6020811015613f1c57600080fd5b5051604080516352f55eed60e01b81526001600160a01b0386811660048301529151929350600092918816916352f55eed91602480820192602092909190829003018186803b158015613f6e57600080fd5b505afa158015613f82573d6000803e3d6000fd5b505050506040513d6020811015613f9857600080fd5b505190508015613fcb57613fb081611f6785856157bc565b8789870281518110613fbe57fe5b6020026020010181815250505b6000866001600160a01b031663c65bc7b1866040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561401a57600080fd5b505afa15801561402e573d6000803e3d6000fd5b505050506040513d602081101561404457600080fd5b5051111561416f576000866001600160a01b031663a93acac2866040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561409b57600080fd5b505afa1580156140af573d6000803e3d6000fd5b505050506040513d60208110156140c557600080fd5b50516040805163c65bc7b160e01b81526001600160a01b0388811660048301529151929350600092918a169163c65bc7b191602480820192602092909190829003018186803b15801561411757600080fd5b505afa15801561412b573d6000803e3d6000fd5b505050506040513d602081101561414157600080fd5b5051905061414f8183615854565b898b89026001018151811061416057fe5b60200260200101818152505050505b505060019092019150613d139050565b5090925050505b9392505050565b6000546001600160a01b031633146141e4576040805162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b604482015290519081900360640190fd5b60008054911515600160a01b0260ff60a01b19909216919091179055565b80516060906002908190839082900482026001600160401b038111801561422857600080fd5b50604051908082528060200260200182016040528015614252578160200160208202803683370190505b50905060005b8386518161426257fe5b04811015614464576000868583028151811061427a57fe5b602002602001015190506000878684026001018151811061429757fe5b602002602001015190506000896001600160a01b031663e6a4390584846040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561430157600080fd5b505afa158015614315573d6000803e3d6000fd5b505050506040513d602081101561432b57600080fd5b5051604080516370a0823160e01b81526001600160a01b0380841660048301529151929350908516916370a0823191602480820192602092909190829003018186803b15801561437a57600080fd5b505afa15801561438e573d6000803e3d6000fd5b505050506040513d60208110156143a457600080fd5b5051855186908689029081106143b657fe5b602002602001018181525050816001600160a01b03166370a08231826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561440f57600080fd5b505afa158015614423573d6000803e3d6000fd5b505050506040513d602081101561443957600080fd5b5051855186906001878a020190811061444e57fe5b6020908102919091010152505050600101614258565b5095945050505050565b600981565b600054600160a01b900460ff1681565b6000546001600160a01b031633146144da576040805162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000866001600160a01b03166381a612d6876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561454e57600080fd5b505afa158015614562573d6000803e3d6000fd5b505050506040513d602081101561457857600080fd5b5051604080516323b95ceb60e21b81526001600160a01b0389811660048301529151929350600092918a1691638ee573ac91602480820192602092909190829003018186803b1580156145ca57600080fd5b505afa1580156145de573d6000803e3d6000fd5b505050506040513d60208110156145f457600080fd5b5051604080516323b95ceb60e21b81526001600160a01b0389811660048301529151929350600092918b1691638ee573ac91602480820192602092909190829003018186803b15801561464657600080fd5b505afa15801561465a573d6000803e3d6000fd5b505050506040513d602081101561467057600080fd5b5051905060008061469168327cb2734119d3b7a9601e1b611f678a886157bc565b90506146ad600a85900a611f6783670de0b6b3a76400006157bc565b905060008b6001600160a01b03166342b60b038c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156146fe57600080fd5b505afa158015614712573d6000803e3d6000fd5b505050506040513d602081101561472857600080fd5b505180156147ab57508b6001600160a01b03166342b60b038b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561477e57600080fd5b505afa158015614792573d6000803e3d6000fd5b505050506040513d60208110156147a857600080fd5b50515b905060008161481e578c6001600160a01b031663a22f23926040518163ffffffff1660e01b815260040160206040518083038186803b1580156147ed57600080fd5b505afa158015614801573d6000803e3d6000fd5b505050506040513d602081101561481757600080fd5b5051614884565b8c6001600160a01b031663df73a2676040518163ffffffff1660e01b815260040160206040518083038186803b15801561485757600080fd5b505afa15801561486b573d6000803e3d6000fd5b505050506040513d602081101561488157600080fd5b50515b90506000826148f7578d6001600160a01b0316637a210a2b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156148c657600080fd5b505afa1580156148da573d6000803e3d6000fd5b505050506040513d60208110156148f057600080fd5b505161495d565b8d6001600160a01b03166310eb56c26040518163ffffffff1660e01b815260040160206040518083038186803b15801561493057600080fd5b505afa158015614944573d6000803e3d6000fd5b505050506040513d602081101561495a57600080fd5b50515b905060008e6001600160a01b031663c7e074c38f87868660016040518663ffffffff1660e01b815260040180866001600160a01b0316815260200185815260200184815260200183815260200182151581526020019550505050505060206040518083038186803b1580156149d157600080fd5b505afa1580156149e5573d6000803e3d6000fd5b505050506040513d60208110156149fb57600080fd5b8101908080519060200190929190505050905060008f6001600160a01b031663c7e074c38f88878760006040518663ffffffff1660e01b815260040180866001600160a01b0316815260200185815260200184815260200183815260200182151581526020019550505050505060206040518083038186803b158015614a8057600080fd5b505afa158015614a94573d6000803e3d6000fd5b505050506040513d6020811015614aaa57600080fd5b50519050808211614abb5780614abd565b815b965050505050505060008a6001600160a01b031663e124e6d28a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015614b1457600080fd5b505afa158015614b28573d6000803e3d6000fd5b505050506040513d6020811015614b3e57600080fd5b505190506000614b5282611f678b896157bc565b9050614b7185600a0a611f6786600a0a846157bc90919063ffffffff16565b90506000614b8f612710611f67614b88828861577a565b85906157bc565b90506000614b9d838361577a565b919e919d50909b505050505050505050505050565b60608082516001600160401b0381118015614bcc57600080fd5b50604051908082528060200260200182016040528015614bf6578160200160208202803683370190505b50905060005b8351811015611805576000848281518110614c1357fe5b6020026020010151905060006001600160a01b0316816001600160a01b03161415614c6157856001600160a01b031631838381518110614c4f57fe5b60200260200101818152505050614cf6565b806001600160a01b03166370a08231876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015614cae57600080fd5b505afa158015614cc2573d6000803e3d6000fd5b505050506040513d6020811015614cd857600080fd5b50518351849084908110614ce857fe5b602002602001018181525050505b600101614bfc565b60608060098551026001600160401b0381118015614d1b57600080fd5b50604051908082528060200260200182016040528015614d45578160200160208202803683370190505b50905060005b85518110156150ef5760008060008060008060008e6001600160a01b0316634a3f088d8f8f8b81518110614d7b57fe5b60200260200101518f8c81518110614d8f57fe5b60200260200101518f8d81518110614da357fe5b60200260200101516040518563ffffffff1660e01b815260040180856001600160a01b03168152602001846001600160a01b03168152602001836001600160a01b0316815260200182151581526020019450505050506101006040518083038186803b158015614e1257600080fd5b505afa158015614e26573d6000803e3d6000fd5b505050506040513d610100811015614e3d57600080fd5b50805160208201516040830151606084015160a085015160c086015160e0909601518f51959d50939b509199509750955091935090915087908a9060098b02908110614e8557fe5b602002602001018181525050858960098a0260010181518110614ea457fe5b602002602001018181525050848960098a0260020181518110614ec357fe5b602002602001018181525050838960098a0260030181518110614ee257fe5b60200260200101818152505081614efa576000614efd565b60015b60ff168960098a0260040181518110614f1257fe5b602002602001018181525050828960098a0260050181518110614f3157fe5b602002602001018181525050808960098a0260060181518110614f5057fe5b602002602001018181525050505050505050506000826009830281518110614f7457fe5b602002602001015190506000836009840260020181518110614f9257fe5b602002602001015190506000846009850260060181518110614fb057fe5b6020026020010151905060008211156150e4576000808c6001600160a01b0316635c07eaab8b8881518110614fe157fe5b602002602001015187878d8b81518110614ff757fe5b6020026020010151886040518663ffffffff1660e01b815260040180866001600160a01b03168152602001858152602001848152602001831515815260200182815260200195505050505050604080518083038186803b15801561505a57600080fd5b505afa15801561506e573d6000803e3d6000fd5b505050506040513d604081101561508457600080fd5b50805160209091015190925090508161509e5760006150a1565b60015b60ff168760098802600701815181106150b657fe5b602002602001018181525050808760098802600801815181106150d557fe5b60200260200101818152505050505b505050600101614d4b565b509695505050505050565b600080846001600160a01b03166381a612d6856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561514a57600080fd5b505afa15801561515e573d6000803e3d6000fd5b505050506040513d602081101561517457600080fd5b505160408051637092736960e11b81526001600160a01b03868116600483015291519293506000929188169163e124e6d291602480820192602092909190829003018186803b1580156151c657600080fd5b505afa1580156151da573d6000803e3d6000fd5b505050506040513d60208110156151f057600080fd5b5051604080516323b95ceb60e21b81526001600160a01b038881166004830152915192935060009291891691638ee573ac91602480820192602092909190829003018186803b15801561524257600080fd5b505afa158015615256573d6000803e3d6000fd5b505050506040513d602081101561526c57600080fd5b5051604080516323b95ceb60e21b81526001600160a01b0388811660048301529151929350600092918a1691638ee573ac91602480820192602092909190829003018186803b1580156152be57600080fd5b505afa1580156152d2573d6000803e3d6000fd5b505050506040513d60208110156152e857600080fd5b5051604080516352f55eed60e01b81526001600160a01b038981166004830152915192935060009283928c16916352f55eed916024808301926020929190829003018186803b15801561533a57600080fd5b505afa15801561534e573d6000803e3d6000fd5b505050506040513d602081101561536457600080fd5b50516040805163c3c7b9e960e01b81526001600160a01b038b811660048301529151929350600092918d169163c3c7b9e991602480820192602092909190829003018186803b1580156153b657600080fd5b505afa1580156153ca573d6000803e3d6000fd5b505050506040513d60208110156153e057600080fd5b505160408051634a993ee960e01b81526001600160a01b038c811660048301529151929350600092918e1691634a993ee991602480820192602092909190829003018186803b15801561543257600080fd5b505afa158015615446573d6000803e3d6000fd5b505050506040513d602081101561545c57600080fd5b50519050600081831161546f5781615471565b825b905083811061548c5760009950505050505050505050614186565b6000615498858361577a565b90506154c587600a0a611f678a600a0a6154bf8e611f678f886157bc90919063ffffffff16565b906157bc565b955050505050506000896001600160a01b031663ad1e4f8d8a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561551b57600080fd5b505afa15801561552f573d6000803e3d6000fd5b505050506040513d602081101561554557600080fd5b5051905080156115de57896001600160a01b0316631aa4ace58a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561559c57600080fd5b505afa1580156155b0573d6000803e3d6000fd5b505050506040513d60208110156155c657600080fd5b50518110156155de5760009650505050505050614186565b60006156638b6001600160a01b0316631aa4ace58c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561563057600080fd5b505afa158015615644573d6000803e3d6000fd5b505050506040513d602081101561565a57600080fd5b5051839061577a565b905061567f670de0b6b3a7640000611f6783600a89900a6157bc565b905061569b87611f678368327cb2734119d3b7a9601e1b6157bc565b9050808311156156b357965061418695505050505050565b505098975050505050505050565b600080805b83518110156118055760008482815181106156dd57fe5b602002602001015190506000866001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561573657600080fd5b505afa15801561574a573d6000803e3d6000fd5b505050506040513d602081101561576057600080fd5b5051905061576e8482615854565b935050506001016156c6565b600061418683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506158ac565b6000826157cb57506000611809565b828202828482816157d857fe5b04146141865760405162461bcd60e51b81526004018080602001828103825260218152602001806159a96021913960400191505060405180910390fd5b600061418683836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b815250615943565b600082820183811015614186576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b6000818484111561593b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156159005781810151838201526020016158e8565b50505050905090810190601f16801561592d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836159925760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156159005781810151838201526020016158e8565b50600083858161599e57fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122045b628c599a8154fc42d4309c34d7a311429d723c48990eab8da614a960534d364736f6c634300060c0033"; - public ReaderDeploymentBase() : base(BYTECODE) { } - public ReaderDeploymentBase(string byteCode) : base(byteCode) { } + public static string BYTECODE = + "608060405234801561001057600080fd5b50600080546001600160a01b031916331790556159ff80620000336000396000f3fe608060405234801561001057600080fd5b506004361061013e5760003560e01c8063126082cf1461014357806312d43a511461015d57806320542568146101815780632413c8c1146102925780632ac0184c146103335780632e3e3342146103e45780633613d52714610495578063440f018c1461054657806348211934146105a05780637b906e931461065157806386d4d0f514610712578063870d917c146107c35780638e83ca32146107cb578063937a0be81461088c57806395082d251461093d57806395a7535a146109455780639b0183c3146109ff578063a4543ead14610a20578063ad7e549714610ad1578063c6f1d67614610ad9578063cfad57a214610af5578063d7176ca914610b1b578063d802178e14610b70578063dc383cab14610c21578063f3535e6c14610ddf578063fbdb05ca14610e17575b600080fd5b61014b610ec8565b60408051918252519081900360200190f35b610165610ece565b604080516001600160a01b039092168252519081900360200190f35b6102426004803603608081101561019757600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b8111156101d157600080fd5b8201836020820111156101e357600080fd5b803590602001918460208302840111600160201b8311171561020457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610edd945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561027e578181015183820152602001610266565b505050509050019250505060405180910390f35b610242600480360360208110156102a857600080fd5b810190602081018135600160201b8111156102c257600080fd5b8201836020820111156102d457600080fd5b803590602001918460208302840111600160201b831117156102f557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506115eb945050505050565b61014b6004803603604081101561034957600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561037357600080fd5b82018360208201111561038557600080fd5b803590602001918460208302840111600160201b831117156103a657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506116e4945050505050565b610242600480360360408110156103fa57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561042457600080fd5b82018360208201111561043657600080fd5b803590602001918460208302840111600160201b8311171561045757600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061180f945050505050565b610242600480360360408110156104ab57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156104d557600080fd5b8201836020820111156104e757600080fd5b803590602001918460208302840111600160201b8311171561050857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611a14945050505050565b6105826004803603608081101561055c57600080fd5b506001600160a01b03813581169160208101358216916040820135169060600135611e4e565b60408051938452602084019290925282820152519081900360600190f35b610242600480360360408110156105b657600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156105e057600080fd5b8201836020820111156105f257600080fd5b803590602001918460208302840111600160201b8311171561061357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506123b3945050505050565b6102426004803603608081101561066757600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b8111156106a157600080fd5b8201836020820111156106b357600080fd5b803590602001918460208302840111600160201b831117156106d457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612867945050505050565b6102426004803603604081101561072857600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561075257600080fd5b82018360208201111561076457600080fd5b803590602001918460208302840111600160201b8311171561078557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550613098945050505050565b61014b613198565b610242600480360360808110156107e157600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561081b57600080fd5b82018360208201111561082d57600080fd5b803590602001918460208302840111600160201b8311171561084e57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061319d945050505050565b610242600480360360408110156108a257600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156108cc57600080fd5b8201836020820111156108de57600080fd5b803590602001918460208302840111600160201b831117156108ff57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550613b1a945050505050565b61014b613caf565b6102426004803603606081101561095b57600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561098e57600080fd5b8201836020820111156109a057600080fd5b803590602001918460208302840111600160201b831117156109c157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550613cbf945050505050565b610a1e60048036036020811015610a1557600080fd5b5035151561418d565b005b61024260048036036040811015610a3657600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610a6057600080fd5b820183602082011115610a7257600080fd5b803590602001918460208302840111600160201b83111715610a9357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550614202945050505050565b61014b61446e565b610ae1614473565b604080519115158252519081900360200190f35b610a1e60048036036020811015610b0b57600080fd5b50356001600160a01b0316614483565b610b5760048036036080811015610b3157600080fd5b506001600160a01b038135811691602081013582169160408201351690606001356144fc565b6040805192835260208301919091528051918290030190f35b61024260048036036040811015610b8657600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610bb057600080fd5b820183602082011115610bc257600080fd5b803590602001918460208302840111600160201b83111715610be357600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550614bb2945050505050565b610242600480360360a0811015610c3757600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b811115610c6a57600080fd5b820183602082011115610c7c57600080fd5b803590602001918460208302840111600160201b83111715610c9d57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610cec57600080fd5b820183602082011115610cfe57600080fd5b803590602001918460208302840111600160201b83111715610d1f57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610d6e57600080fd5b820183602082011115610d8057600080fd5b803590602001918460208302840111600160201b83111715610da157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550614cfe945050505050565b61014b60048036036060811015610df557600080fd5b506001600160a01b0381358116916020810135821691604090910135166150fa565b61014b60048036036040811015610e2d57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610e5757600080fd5b820183602082011115610e6957600080fd5b803590602001918460208302840111600160201b83111715610e8a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506156c1945050505050565b61271081565b6000546001600160a01b031681565b60606000600a905060008690506000816001600160a01b031663741bef1a6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f2557600080fd5b505afa158015610f39573d6000803e3d6000fd5b505050506040513d6020811015610f4f57600080fd5b5051855190915060609084026001600160401b0381118015610f7057600080fd5b50604051908082528060200260200182016040528015610f9a578160200160208202803683370190505b50905060005b86518110156115de576000878281518110610fb757fe5b6020026020010151905060006001600160a01b0316816001600160a01b03161415610fdf5750885b846001600160a01b03166352f55eed826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561102c57600080fd5b505afa158015611040573d6000803e3d6000fd5b505050506040513d602081101561105657600080fd5b50518351849084890290811061106857fe5b602002602001018181525050846001600160a01b031663c3c7b9e9826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156110c157600080fd5b505afa1580156110d5573d6000803e3d6000fd5b505050506040513d60208110156110eb57600080fd5b5051835184906001858a020190811061110057fe5b602002602001018181525050846001600160a01b0316631aa4ace5826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561115957600080fd5b505afa15801561116d573d6000803e3d6000fd5b505050506040513d602081101561118357600080fd5b5051835184906002858a020190811061119857fe5b602002602001018181525050846001600160a01b0316632c668ec1828b6040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b1580156111f957600080fd5b505afa15801561120d573d6000803e3d6000fd5b505050506040513d602081101561122357600080fd5b5051835184906003858a020190811061123857fe5b602002602001018181525050846001600160a01b031663ab2f3ad4826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561129157600080fd5b505afa1580156112a5573d6000803e3d6000fd5b505050506040513d60208110156112bb57600080fd5b5051835184906004858a02019081106112d057fe5b602002602001018181525050846001600160a01b03166381a612d6826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561132957600080fd5b505afa15801561133d573d6000803e3d6000fd5b505050506040513d602081101561135357600080fd5b5051835184906005858a020190811061136857fe5b602002602001018181525050846001600160a01b031663e124e6d2826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156113c157600080fd5b505afa1580156113d5573d6000803e3d6000fd5b505050506040513d60208110156113eb57600080fd5b5051835184906006858a020190811061140057fe5b602002602001018181525050846001600160a01b031663f07456ce826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561145957600080fd5b505afa15801561146d573d6000803e3d6000fd5b505050506040513d602081101561148357600080fd5b5051835184906007858a020190811061149857fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038481166004830152600060248301529151918716926356c8c2c192604480840193829003018186803b1580156114f257600080fd5b505afa158015611506573d6000803e3d6000fd5b505050506040513d602081101561151c57600080fd5b5051835184906008858a020190811061153157fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038481166004830152600160248301529151918716926356c8c2c192604480840193829003018186803b15801561158b57600080fd5b505afa15801561159f573d6000803e3d6000fd5b505050506040513d60208110156115b557600080fd5b5051835184906009858a02019081106115ca57fe5b602090810291909101015250600101610fa0565b5098975050505050505050565b60608082516001600160401b038111801561160557600080fd5b5060405190808252806020026020018201604052801561162f578160200160208202803683370190505b50905060005b83518110156116dd57600084828151811061164c57fe5b60200260200101519050806001600160a01b031663817b1cd26040518163ffffffff1660e01b815260040160206040518083038186803b15801561168f57600080fd5b505afa1580156116a3573d6000803e3d6000fd5b505050506040513d60208110156116b957600080fd5b505183518490849081106116c957fe5b602090810291909101015250600101611635565b5092915050565b600080836001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561172057600080fd5b505afa158015611734573d6000803e3d6000fd5b505050506040513d602081101561174a57600080fd5b5051905060005b835181101561180557600084828151811061176857fe5b602002602001015190506000866001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156117c157600080fd5b505afa1580156117d5573d6000803e3d6000fd5b505050506040513d60208110156117eb57600080fd5b505190506117f9848261577a565b93505050600101611751565b5090505b92915050565b60606000600290506060818451026001600160401b038111801561183257600080fd5b5060405190808252806020026020018201604052801561185c578160200160208202803683370190505b50905060005b8451811015611a0b57600085828151811061187957fe5b6020026020010151905060006001600160a01b0316816001600160a01b031614156118e857866001600160a01b03163183858402815181106118b757fe5b602002602001018181525050600083858402600101815181106118d657fe5b60200260200101818152505050611a03565b806001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561193557600080fd5b505afa158015611949573d6000803e3d6000fd5b505050506040513d602081101561195f57600080fd5b50518351849084870290811061197157fe5b602002602001018181525050806001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156119b657600080fd5b505afa1580156119ca573d6000803e3d6000fd5b505050506040513d60208110156119e057600080fd5b5051835184906001858802019081106119f557fe5b602002602001018181525050505b600101611862565b50949350505050565b60606000600690506060818451026001600160401b0381118015611a3757600080fd5b50604051908082528060200260200182016040528015611a61578160200160208202803683370190505b50905060005b8451811015611a0b576000858281518110611a7e57fe5b602090810291909101810151604080516317e1d38560e11b81526001600160a01b0380841660048301526001602483018190526044830152600060648301529151929450908a1692632fc3a70a92608480840193829003018186803b158015611ae657600080fd5b505afa158015611afa573d6000803e3d6000fd5b505050506040513d6020811015611b1057600080fd5b505183518490848702908110611b2257fe5b602090810291909101810191909152604080516317e1d38560e11b81526001600160a01b0384811660048301526000602483018190526001604484015260648301529151918a1692632fc3a70a92608480840193829003018186803b158015611b8a57600080fd5b505afa158015611b9e573d6000803e3d6000fd5b505050506040513d6020811015611bb457600080fd5b505183518490600185880201908110611bc957fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038481166004830152600160248301529151918a16926356c8c2c192604480840193829003018186803b158015611c2357600080fd5b505afa158015611c37573d6000803e3d6000fd5b505050506040513d6020811015611c4d57600080fd5b505183518490600285880201908110611c6257fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038481166004830152600060248301529151918a16926356c8c2c192604480840193829003018186803b158015611cbc57600080fd5b505afa158015611cd0573d6000803e3d6000fd5b505050506040513d6020811015611ce657600080fd5b505183518490600385880201908110611cfb57fe5b602002602001018181525050866001600160a01b0316636ce8a44b826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611d5457600080fd5b505afa158015611d68573d6000803e3d6000fd5b505050506040513d6020811015611d7e57600080fd5b5051611d8b576000611d8e565b60015b60ff168385840260040181518110611da257fe5b602002602001018181525050866001600160a01b03166348cac277826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611dfb57600080fd5b505afa158015611e0f573d6000803e3d6000fd5b505050506040513d6020811015611e2557600080fd5b505183518490600585880201908110611e3a57fe5b602090810291909101015250600101611a67565b600080600080876001600160a01b03166381a612d6886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611ea157600080fd5b505afa158015611eb5573d6000803e3d6000fd5b505050506040513d6020811015611ecb57600080fd5b5051604080516323b95ceb60e21b81526001600160a01b038a811660048301529151929350600092918b1691638ee573ac91602480820192602092909190829003018186803b158015611f1d57600080fd5b505afa158015611f31573d6000803e3d6000fd5b505050506040513d6020811015611f4757600080fd5b505190506000611f6d68327cb2734119d3b7a9601e1b611f6789866157bc565b90615815565b9050611f89600a83900a611f6783670de0b6b3a76400006157bc565b905060008a6001600160a01b03166342b60b038b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611fda57600080fd5b505afa158015611fee573d6000803e3d6000fd5b505050506040513d602081101561200457600080fd5b5051801561208757508a6001600160a01b03166342b60b038a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561205a57600080fd5b505afa15801561206e573d6000803e3d6000fd5b505050506040513d602081101561208457600080fd5b50515b90506000816120fa578b6001600160a01b031663a22f23926040518163ffffffff1660e01b815260040160206040518083038186803b1580156120c957600080fd5b505afa1580156120dd573d6000803e3d6000fd5b505050506040513d60208110156120f357600080fd5b5051612160565b8b6001600160a01b031663df73a2676040518163ffffffff1660e01b815260040160206040518083038186803b15801561213357600080fd5b505afa158015612147573d6000803e3d6000fd5b505050506040513d602081101561215d57600080fd5b50515b90506000826121d3578c6001600160a01b0316637a210a2b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156121a257600080fd5b505afa1580156121b6573d6000803e3d6000fd5b505050506040513d60208110156121cc57600080fd5b5051612239565b8c6001600160a01b03166310eb56c26040518163ffffffff1660e01b815260040160206040518083038186803b15801561220c57600080fd5b505afa158015612220573d6000803e3d6000fd5b505050506040513d602081101561223657600080fd5b50515b905060008d6001600160a01b031663c7e074c38e87868660016040518663ffffffff1660e01b815260040180866001600160a01b0316815260200185815260200184815260200183815260200182151581526020019550505050505060206040518083038186803b1580156122ad57600080fd5b505afa1580156122c1573d6000803e3d6000fd5b505050506040513d60208110156122d757600080fd5b8101908080519060200190929190505050905060008e6001600160a01b031663c7e074c38e88878760006040518663ffffffff1660e01b815260040180866001600160a01b0316815260200185815260200184815260200183815260200182151581526020019550505050505060206040518083038186803b15801561235c57600080fd5b505afa158015612370573d6000803e3d6000fd5b505050506040513d602081101561238657600080fd5b505190506000818311612399578161239b565b825b9b509199509750505050505050509450945094915050565b60606000600790506060818451026001600160401b03811180156123d657600080fd5b50604051908082528060200260200182016040528015612400578160200160208202803683370190505b50905060005b8451811015611a0b57600085828151811061241d57fe5b60200260200101519050806001600160a01b0316635d50e729886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561247457600080fd5b505afa158015612488573d6000803e3d6000fd5b505050506040513d602081101561249e57600080fd5b5051835184908487029081106124b057fe5b602002602001018181525050806001600160a01b031663d5a73fdd886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561250957600080fd5b505afa15801561251d573d6000803e3d6000fd5b505050506040513d602081101561253357600080fd5b50518351849060018588020190811061254857fe5b60200260200101818152505085828151811061256057fe5b60200260200101516001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156125b457600080fd5b505afa1580156125c8573d6000803e3d6000fd5b505050506040513d60208110156125de57600080fd5b5051835184906002858802019081106125f357fe5b602002602001018181525050806001600160a01b03166371417b32886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561264c57600080fd5b505afa158015612660573d6000803e3d6000fd5b505050506040513d602081101561267657600080fd5b50518351849060038588020190811061268b57fe5b602002602001018181525050806001600160a01b031663402914f5886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156126e457600080fd5b505afa1580156126f8573d6000803e3d6000fd5b505050506040513d602081101561270e57600080fd5b50518351849060048588020190811061272357fe5b602002602001018181525050806001600160a01b03166308f26c76886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561277c57600080fd5b505afa158015612790573d6000803e3d6000fd5b505050506040513d60208110156127a657600080fd5b5051835184906005858802019081106127bb57fe5b602002602001018181525050806001600160a01b03166345f01ee6886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561281457600080fd5b505afa158015612828573d6000803e3d6000fd5b505050506040513d602081101561283e57600080fd5b50518351849060068588020190811061285357fe5b602090810291909101015250600101612406565b60606000600c905060008690506000816001600160a01b031663741bef1a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156128af57600080fd5b505afa1580156128c3573d6000803e3d6000fd5b505050506040513d60208110156128d957600080fd5b5051855190915060609084026001600160401b03811180156128fa57600080fd5b50604051908082528060200260200182016040528015612924578160200160208202803683370190505b50905060005b86518110156115de57600087828151811061294157fe5b6020026020010151905060006001600160a01b0316816001600160a01b031614156129695750885b846001600160a01b03166352f55eed826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156129b657600080fd5b505afa1580156129ca573d6000803e3d6000fd5b505050506040513d60208110156129e057600080fd5b5051835184908489029081106129f257fe5b602002602001018181525050846001600160a01b031663c3c7b9e9826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612a4b57600080fd5b505afa158015612a5f573d6000803e3d6000fd5b505050506040513d6020811015612a7557600080fd5b5051835184906001858a0201908110612a8a57fe5b602002602001018181525050846001600160a01b0316631aa4ace5826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612ae357600080fd5b505afa158015612af7573d6000803e3d6000fd5b505050506040513d6020811015612b0d57600080fd5b5051835184906002858a0201908110612b2257fe5b602002602001018181525050846001600160a01b0316632c668ec1828b6040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b158015612b8357600080fd5b505afa158015612b97573d6000803e3d6000fd5b505050506040513d6020811015612bad57600080fd5b5051835184906003858a0201908110612bc257fe5b602002602001018181525050846001600160a01b031663ab2f3ad4826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612c1b57600080fd5b505afa158015612c2f573d6000803e3d6000fd5b505050506040513d6020811015612c4557600080fd5b5051835184906004858a0201908110612c5a57fe5b602002602001018181525050846001600160a01b0316634a993ee9826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612cb357600080fd5b505afa158015612cc7573d6000803e3d6000fd5b505050506040513d6020811015612cdd57600080fd5b5051835184906005858a0201908110612cf257fe5b602002602001018181525050846001600160a01b031663ad1e4f8d826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612d4b57600080fd5b505afa158015612d5f573d6000803e3d6000fd5b505050506040513d6020811015612d7557600080fd5b5051835184906006858a0201908110612d8a57fe5b602002602001018181525050846001600160a01b03166381a612d6826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612de357600080fd5b505afa158015612df7573d6000803e3d6000fd5b505050506040513d6020811015612e0d57600080fd5b5051835184906007858a0201908110612e2257fe5b602002602001018181525050846001600160a01b031663e124e6d2826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612e7b57600080fd5b505afa158015612e8f573d6000803e3d6000fd5b505050506040513d6020811015612ea557600080fd5b5051835184906008858a0201908110612eba57fe5b602002602001018181525050846001600160a01b031663f07456ce826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015612f1357600080fd5b505afa158015612f27573d6000803e3d6000fd5b505050506040513d6020811015612f3d57600080fd5b5051835184906009858a0201908110612f5257fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038481166004830152600060248301529151918716926356c8c2c192604480840193829003018186803b158015612fac57600080fd5b505afa158015612fc0573d6000803e3d6000fd5b505050506040513d6020811015612fd657600080fd5b505183518490600a858a0201908110612feb57fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038481166004830152600160248301529151918716926356c8c2c192604480840193829003018186803b15801561304557600080fd5b505afa158015613059573d6000803e3d6000fd5b505050506040513d602081101561306f57600080fd5b505183518490600b858a020190811061308457fe5b60209081029190910101525060010161292a565b60608082516001600160401b03811180156130b257600080fd5b506040519080825280602002602001820160405280156130dc578160200160208202803683370190505b50905060005b835181101561180557846001600160a01b0316631ce9cb8f85838151811061310657fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561314b57600080fd5b505afa15801561315f573d6000803e3d6000fd5b505050506040513d602081101561317557600080fd5b5051825183908390811061318557fe5b60209081029190910101526001016130e2565b601281565b60606000600e905060008690506000816001600160a01b031663741bef1a6040518163ffffffff1660e01b815260040160206040518083038186803b1580156131e557600080fd5b505afa1580156131f9573d6000803e3d6000fd5b505050506040513d602081101561320f57600080fd5b5051855190915060609084026001600160401b038111801561323057600080fd5b5060405190808252806020026020018201604052801561325a578160200160208202803683370190505b50905060005b86518110156115de57600087828151811061327757fe5b6020026020010151905060006001600160a01b0316816001600160a01b0316141561329f5750885b60008054600160a01b900460ff166132b8576000613332565b856001600160a01b0316639698d25a836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561330557600080fd5b505afa158015613319573d6000803e3d6000fd5b505050506040513d602081101561332f57600080fd5b50515b9050856001600160a01b03166352f55eed836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561338157600080fd5b505afa158015613395573d6000803e3d6000fd5b505050506040513d60208110156133ab57600080fd5b505184518590858a029081106133bd57fe5b602002602001018181525050856001600160a01b031663c3c7b9e9836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561341657600080fd5b505afa15801561342a573d6000803e3d6000fd5b505050506040513d602081101561344057600080fd5b5051845185906001868b020190811061345557fe5b602002602001018181525050856001600160a01b0316631aa4ace5836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156134ae57600080fd5b505afa1580156134c2573d6000803e3d6000fd5b505050506040513d60208110156134d857600080fd5b5051845185906002868b02019081106134ed57fe5b602002602001018181525050856001600160a01b0316632c668ec1838c6040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561354e57600080fd5b505afa158015613562573d6000803e3d6000fd5b505050506040513d602081101561357857600080fd5b5051845185906003868b020190811061358d57fe5b602002602001018181525050856001600160a01b031663ab2f3ad4836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156135e657600080fd5b505afa1580156135fa573d6000803e3d6000fd5b505050506040513d602081101561361057600080fd5b5051845185906004868b020190811061362557fe5b602002602001018181525050856001600160a01b0316634a993ee9836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561367e57600080fd5b505afa158015613692573d6000803e3d6000fd5b505050506040513d60208110156136a857600080fd5b5051845185906005868b02019081106136bd57fe5b602002602001018181525050856001600160a01b031663ad1e4f8d836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561371657600080fd5b505afa15801561372a573d6000803e3d6000fd5b505050506040513d602081101561374057600080fd5b5051845185906006868b020190811061375557fe5b602002602001018181525050856001600160a01b0316638a78daa8836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156137ae57600080fd5b505afa1580156137c2573d6000803e3d6000fd5b505050506040513d60208110156137d857600080fd5b5051845185906007868b02019081106137ed57fe5b60200260200101818152505080848885026008018151811061380b57fe5b602002602001018181525050856001600160a01b03166381a612d6836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561386457600080fd5b505afa158015613878573d6000803e3d6000fd5b505050506040513d602081101561388e57600080fd5b5051845185906009868b02019081106138a357fe5b602002602001018181525050856001600160a01b031663e124e6d2836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156138fc57600080fd5b505afa158015613910573d6000803e3d6000fd5b505050506040513d602081101561392657600080fd5b505184518590600a868b020190811061393b57fe5b602002602001018181525050856001600160a01b031663f07456ce836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561399457600080fd5b505afa1580156139a8573d6000803e3d6000fd5b505050506040513d60208110156139be57600080fd5b505184518590600b868b02019081106139d357fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038581166004830152600060248301529151918816926356c8c2c192604480840193829003018186803b158015613a2d57600080fd5b505afa158015613a41573d6000803e3d6000fd5b505050506040513d6020811015613a5757600080fd5b505184518590600c868b0201908110613a6c57fe5b602090810291909101810191909152604080516356c8c2c160e01b81526001600160a01b038581166004830152600160248301529151918816926356c8c2c192604480840193829003018186803b158015613ac657600080fd5b505afa158015613ada573d6000803e3d6000fd5b505050506040513d6020811015613af057600080fd5b505184518590600d868b0201908110613b0557fe5b60209081029190910101525050600101613260565b60606000600290506060818451026001600160401b0381118015613b3d57600080fd5b50604051908082528060200260200182016040528015613b67578160200160208202803683370190505b50905060005b8451811015611a0b576000858281518110613b8457fe5b60200260200101519050806001600160a01b031663402914f5886040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015613bdb57600080fd5b505afa158015613bef573d6000803e3d6000fd5b505050506040513d6020811015613c0557600080fd5b505183518490848702908110613c1757fe5b602002602001018181525050806001600160a01b0316632459f51d6040518163ffffffff1660e01b815260040160206040518083038186803b158015613c5c57600080fd5b505afa158015613c70573d6000803e3d6000fd5b505050506040513d6020811015613c8657600080fd5b505183518490600185880201908110613c9b57fe5b602090810291909101015250600101613b6d565b68327cb2734119d3b7a9601e1b81565b60606000600290506060818451026001600160401b0381118015613ce257600080fd5b50604051908082528060200260200182016040528015613d0c578160200160208202803683370190505b5090508560005b855181101561417f576000868281518110613d2a57fe5b6020026020010151905060006001600160a01b0316816001600160a01b03161415613d525750865b6000836001600160a01b03166342b60b03836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015613da157600080fd5b505afa158015613db5573d6000803e3d6000fd5b505050506040513d6020811015613dcb57600080fd5b5051613e3b57836001600160a01b031663c4f718bf6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e0a57600080fd5b505afa158015613e1e573d6000803e3d6000fd5b505050506040513d6020811015613e3457600080fd5b5051613ea1565b836001600160a01b031663134ca63b6040518163ffffffff1660e01b815260040160206040518083038186803b158015613e7457600080fd5b505afa158015613e88573d6000803e3d6000fd5b505050506040513d6020811015613e9e57600080fd5b50515b90506000846001600160a01b031663c3c7b9e9846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015613ef257600080fd5b505afa158015613f06573d6000803e3d6000fd5b505050506040513d6020811015613f1c57600080fd5b5051604080516352f55eed60e01b81526001600160a01b0386811660048301529151929350600092918816916352f55eed91602480820192602092909190829003018186803b158015613f6e57600080fd5b505afa158015613f82573d6000803e3d6000fd5b505050506040513d6020811015613f9857600080fd5b505190508015613fcb57613fb081611f6785856157bc565b8789870281518110613fbe57fe5b6020026020010181815250505b6000866001600160a01b031663c65bc7b1866040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561401a57600080fd5b505afa15801561402e573d6000803e3d6000fd5b505050506040513d602081101561404457600080fd5b5051111561416f576000866001600160a01b031663a93acac2866040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561409b57600080fd5b505afa1580156140af573d6000803e3d6000fd5b505050506040513d60208110156140c557600080fd5b50516040805163c65bc7b160e01b81526001600160a01b0388811660048301529151929350600092918a169163c65bc7b191602480820192602092909190829003018186803b15801561411757600080fd5b505afa15801561412b573d6000803e3d6000fd5b505050506040513d602081101561414157600080fd5b5051905061414f8183615854565b898b89026001018151811061416057fe5b60200260200101818152505050505b505060019092019150613d139050565b5090925050505b9392505050565b6000546001600160a01b031633146141e4576040805162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b604482015290519081900360640190fd5b60008054911515600160a01b0260ff60a01b19909216919091179055565b80516060906002908190839082900482026001600160401b038111801561422857600080fd5b50604051908082528060200260200182016040528015614252578160200160208202803683370190505b50905060005b8386518161426257fe5b04811015614464576000868583028151811061427a57fe5b602002602001015190506000878684026001018151811061429757fe5b602002602001015190506000896001600160a01b031663e6a4390584846040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561430157600080fd5b505afa158015614315573d6000803e3d6000fd5b505050506040513d602081101561432b57600080fd5b5051604080516370a0823160e01b81526001600160a01b0380841660048301529151929350908516916370a0823191602480820192602092909190829003018186803b15801561437a57600080fd5b505afa15801561438e573d6000803e3d6000fd5b505050506040513d60208110156143a457600080fd5b5051855186908689029081106143b657fe5b602002602001018181525050816001600160a01b03166370a08231826040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561440f57600080fd5b505afa158015614423573d6000803e3d6000fd5b505050506040513d602081101561443957600080fd5b5051855186906001878a020190811061444e57fe5b6020908102919091010152505050600101614258565b5095945050505050565b600981565b600054600160a01b900460ff1681565b6000546001600160a01b031633146144da576040805162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000866001600160a01b03166381a612d6876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561454e57600080fd5b505afa158015614562573d6000803e3d6000fd5b505050506040513d602081101561457857600080fd5b5051604080516323b95ceb60e21b81526001600160a01b0389811660048301529151929350600092918a1691638ee573ac91602480820192602092909190829003018186803b1580156145ca57600080fd5b505afa1580156145de573d6000803e3d6000fd5b505050506040513d60208110156145f457600080fd5b5051604080516323b95ceb60e21b81526001600160a01b0389811660048301529151929350600092918b1691638ee573ac91602480820192602092909190829003018186803b15801561464657600080fd5b505afa15801561465a573d6000803e3d6000fd5b505050506040513d602081101561467057600080fd5b5051905060008061469168327cb2734119d3b7a9601e1b611f678a886157bc565b90506146ad600a85900a611f6783670de0b6b3a76400006157bc565b905060008b6001600160a01b03166342b60b038c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156146fe57600080fd5b505afa158015614712573d6000803e3d6000fd5b505050506040513d602081101561472857600080fd5b505180156147ab57508b6001600160a01b03166342b60b038b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561477e57600080fd5b505afa158015614792573d6000803e3d6000fd5b505050506040513d60208110156147a857600080fd5b50515b905060008161481e578c6001600160a01b031663a22f23926040518163ffffffff1660e01b815260040160206040518083038186803b1580156147ed57600080fd5b505afa158015614801573d6000803e3d6000fd5b505050506040513d602081101561481757600080fd5b5051614884565b8c6001600160a01b031663df73a2676040518163ffffffff1660e01b815260040160206040518083038186803b15801561485757600080fd5b505afa15801561486b573d6000803e3d6000fd5b505050506040513d602081101561488157600080fd5b50515b90506000826148f7578d6001600160a01b0316637a210a2b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156148c657600080fd5b505afa1580156148da573d6000803e3d6000fd5b505050506040513d60208110156148f057600080fd5b505161495d565b8d6001600160a01b03166310eb56c26040518163ffffffff1660e01b815260040160206040518083038186803b15801561493057600080fd5b505afa158015614944573d6000803e3d6000fd5b505050506040513d602081101561495a57600080fd5b50515b905060008e6001600160a01b031663c7e074c38f87868660016040518663ffffffff1660e01b815260040180866001600160a01b0316815260200185815260200184815260200183815260200182151581526020019550505050505060206040518083038186803b1580156149d157600080fd5b505afa1580156149e5573d6000803e3d6000fd5b505050506040513d60208110156149fb57600080fd5b8101908080519060200190929190505050905060008f6001600160a01b031663c7e074c38f88878760006040518663ffffffff1660e01b815260040180866001600160a01b0316815260200185815260200184815260200183815260200182151581526020019550505050505060206040518083038186803b158015614a8057600080fd5b505afa158015614a94573d6000803e3d6000fd5b505050506040513d6020811015614aaa57600080fd5b50519050808211614abb5780614abd565b815b965050505050505060008a6001600160a01b031663e124e6d28a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015614b1457600080fd5b505afa158015614b28573d6000803e3d6000fd5b505050506040513d6020811015614b3e57600080fd5b505190506000614b5282611f678b896157bc565b9050614b7185600a0a611f6786600a0a846157bc90919063ffffffff16565b90506000614b8f612710611f67614b88828861577a565b85906157bc565b90506000614b9d838361577a565b919e919d50909b505050505050505050505050565b60608082516001600160401b0381118015614bcc57600080fd5b50604051908082528060200260200182016040528015614bf6578160200160208202803683370190505b50905060005b8351811015611805576000848281518110614c1357fe5b6020026020010151905060006001600160a01b0316816001600160a01b03161415614c6157856001600160a01b031631838381518110614c4f57fe5b60200260200101818152505050614cf6565b806001600160a01b03166370a08231876040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015614cae57600080fd5b505afa158015614cc2573d6000803e3d6000fd5b505050506040513d6020811015614cd857600080fd5b50518351849084908110614ce857fe5b602002602001018181525050505b600101614bfc565b60608060098551026001600160401b0381118015614d1b57600080fd5b50604051908082528060200260200182016040528015614d45578160200160208202803683370190505b50905060005b85518110156150ef5760008060008060008060008e6001600160a01b0316634a3f088d8f8f8b81518110614d7b57fe5b60200260200101518f8c81518110614d8f57fe5b60200260200101518f8d81518110614da357fe5b60200260200101516040518563ffffffff1660e01b815260040180856001600160a01b03168152602001846001600160a01b03168152602001836001600160a01b0316815260200182151581526020019450505050506101006040518083038186803b158015614e1257600080fd5b505afa158015614e26573d6000803e3d6000fd5b505050506040513d610100811015614e3d57600080fd5b50805160208201516040830151606084015160a085015160c086015160e0909601518f51959d50939b509199509750955091935090915087908a9060098b02908110614e8557fe5b602002602001018181525050858960098a0260010181518110614ea457fe5b602002602001018181525050848960098a0260020181518110614ec357fe5b602002602001018181525050838960098a0260030181518110614ee257fe5b60200260200101818152505081614efa576000614efd565b60015b60ff168960098a0260040181518110614f1257fe5b602002602001018181525050828960098a0260050181518110614f3157fe5b602002602001018181525050808960098a0260060181518110614f5057fe5b602002602001018181525050505050505050506000826009830281518110614f7457fe5b602002602001015190506000836009840260020181518110614f9257fe5b602002602001015190506000846009850260060181518110614fb057fe5b6020026020010151905060008211156150e4576000808c6001600160a01b0316635c07eaab8b8881518110614fe157fe5b602002602001015187878d8b81518110614ff757fe5b6020026020010151886040518663ffffffff1660e01b815260040180866001600160a01b03168152602001858152602001848152602001831515815260200182815260200195505050505050604080518083038186803b15801561505a57600080fd5b505afa15801561506e573d6000803e3d6000fd5b505050506040513d604081101561508457600080fd5b50805160209091015190925090508161509e5760006150a1565b60015b60ff168760098802600701815181106150b657fe5b602002602001018181525050808760098802600801815181106150d557fe5b60200260200101818152505050505b505050600101614d4b565b509695505050505050565b600080846001600160a01b03166381a612d6856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561514a57600080fd5b505afa15801561515e573d6000803e3d6000fd5b505050506040513d602081101561517457600080fd5b505160408051637092736960e11b81526001600160a01b03868116600483015291519293506000929188169163e124e6d291602480820192602092909190829003018186803b1580156151c657600080fd5b505afa1580156151da573d6000803e3d6000fd5b505050506040513d60208110156151f057600080fd5b5051604080516323b95ceb60e21b81526001600160a01b038881166004830152915192935060009291891691638ee573ac91602480820192602092909190829003018186803b15801561524257600080fd5b505afa158015615256573d6000803e3d6000fd5b505050506040513d602081101561526c57600080fd5b5051604080516323b95ceb60e21b81526001600160a01b0388811660048301529151929350600092918a1691638ee573ac91602480820192602092909190829003018186803b1580156152be57600080fd5b505afa1580156152d2573d6000803e3d6000fd5b505050506040513d60208110156152e857600080fd5b5051604080516352f55eed60e01b81526001600160a01b038981166004830152915192935060009283928c16916352f55eed916024808301926020929190829003018186803b15801561533a57600080fd5b505afa15801561534e573d6000803e3d6000fd5b505050506040513d602081101561536457600080fd5b50516040805163c3c7b9e960e01b81526001600160a01b038b811660048301529151929350600092918d169163c3c7b9e991602480820192602092909190829003018186803b1580156153b657600080fd5b505afa1580156153ca573d6000803e3d6000fd5b505050506040513d60208110156153e057600080fd5b505160408051634a993ee960e01b81526001600160a01b038c811660048301529151929350600092918e1691634a993ee991602480820192602092909190829003018186803b15801561543257600080fd5b505afa158015615446573d6000803e3d6000fd5b505050506040513d602081101561545c57600080fd5b50519050600081831161546f5781615471565b825b905083811061548c5760009950505050505050505050614186565b6000615498858361577a565b90506154c587600a0a611f678a600a0a6154bf8e611f678f886157bc90919063ffffffff16565b906157bc565b955050505050506000896001600160a01b031663ad1e4f8d8a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561551b57600080fd5b505afa15801561552f573d6000803e3d6000fd5b505050506040513d602081101561554557600080fd5b5051905080156115de57896001600160a01b0316631aa4ace58a6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561559c57600080fd5b505afa1580156155b0573d6000803e3d6000fd5b505050506040513d60208110156155c657600080fd5b50518110156155de5760009650505050505050614186565b60006156638b6001600160a01b0316631aa4ace58c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561563057600080fd5b505afa158015615644573d6000803e3d6000fd5b505050506040513d602081101561565a57600080fd5b5051839061577a565b905061567f670de0b6b3a7640000611f6783600a89900a6157bc565b905061569b87611f678368327cb2734119d3b7a9601e1b6157bc565b9050808311156156b357965061418695505050505050565b505098975050505050505050565b600080805b83518110156118055760008482815181106156dd57fe5b602002602001015190506000866001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561573657600080fd5b505afa15801561574a573d6000803e3d6000fd5b505050506040513d602081101561576057600080fd5b5051905061576e8482615854565b935050506001016156c6565b600061418683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506158ac565b6000826157cb57506000611809565b828202828482816157d857fe5b04146141865760405162461bcd60e51b81526004018080602001828103825260218152602001806159a96021913960400191505060405180910390fd5b600061418683836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b815250615943565b600082820183811015614186576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b6000818484111561593b5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156159005781810151838201526020016158e8565b50505050905090810190601f16801561592d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836159925760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156159005781810151838201526020016158e8565b50600083858161599e57fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122045b628c599a8154fc42d4309c34d7a311429d723c48990eab8da614a960534d364736f6c634300060c0033"; + public ReaderDeploymentBase() : base(BYTECODE) + { + } + + public ReaderDeploymentBase(string byteCode) : base(byteCode) + { + } } - public partial class BasisPointsDivisorFunction : BasisPointsDivisorFunctionBase { } + public partial class BasisPointsDivisorFunction : BasisPointsDivisorFunctionBase + { + } [Function("BASIS_POINTS_DIVISOR", "uint256")] public class BasisPointsDivisorFunctionBase : FunctionMessage { - } - public partial class PositionPropsLengthFunction : PositionPropsLengthFunctionBase { } + public partial class PositionPropsLengthFunction : PositionPropsLengthFunctionBase + { + } [Function("POSITION_PROPS_LENGTH", "uint256")] public class PositionPropsLengthFunctionBase : FunctionMessage { - } - public partial class PricePrecisionFunction : PricePrecisionFunctionBase { } + public partial class PricePrecisionFunction : PricePrecisionFunctionBase + { + } [Function("PRICE_PRECISION", "uint256")] public class PricePrecisionFunctionBase : FunctionMessage { - } - public partial class UsdgDecimalsFunction : UsdgDecimalsFunctionBase { } + public partial class UsdgDecimalsFunction : UsdgDecimalsFunctionBase + { + } [Function("USDG_DECIMALS", "uint256")] public class UsdgDecimalsFunctionBase : FunctionMessage { - } - public partial class GetAmountOutFunction : GetAmountOutFunctionBase { } + public partial class GetAmountOutFunction : GetAmountOutFunctionBase + { + } [Function("getAmountOut", typeof(GetAmountOutOutputDTO))] public class GetAmountOutFunctionBase : FunctionMessage { - [Parameter("address", "_vault", 1)] - public virtual string Vault { get; set; } - [Parameter("address", "_tokenIn", 2)] - public virtual string TokenIn { get; set; } - [Parameter("address", "_tokenOut", 3)] - public virtual string TokenOut { get; set; } - [Parameter("uint256", "_amountIn", 4)] - public virtual BigInteger AmountIn { get; set; } + [Parameter("address", "_vault", 1)] public virtual string Vault { get; set; } + [Parameter("address", "_tokenIn", 2)] public virtual string TokenIn { get; set; } + [Parameter("address", "_tokenOut", 3)] public virtual string TokenOut { get; set; } + [Parameter("uint256", "_amountIn", 4)] public virtual BigInteger AmountIn { get; set; } } - public partial class GetFeeBasisPointsFunction : GetFeeBasisPointsFunctionBase { } + public partial class GetFeeBasisPointsFunction : GetFeeBasisPointsFunctionBase + { + } [Function("getFeeBasisPoints", typeof(GetFeeBasisPointsOutputDTO))] public class GetFeeBasisPointsFunctionBase : FunctionMessage { - [Parameter("address", "_vault", 1)] - public virtual string Vault { get; set; } - [Parameter("address", "_tokenIn", 2)] - public virtual string TokenIn { get; set; } - [Parameter("address", "_tokenOut", 3)] - public virtual string TokenOut { get; set; } - [Parameter("uint256", "_amountIn", 4)] - public virtual BigInteger AmountIn { get; set; } + [Parameter("address", "_vault", 1)] public virtual string Vault { get; set; } + [Parameter("address", "_tokenIn", 2)] public virtual string TokenIn { get; set; } + [Parameter("address", "_tokenOut", 3)] public virtual string TokenOut { get; set; } + [Parameter("uint256", "_amountIn", 4)] public virtual BigInteger AmountIn { get; set; } } - public partial class GetFeesFunction : GetFeesFunctionBase { } + public partial class GetFeesFunction : GetFeesFunctionBase + { + } [Function("getFees", "uint256[]")] public class GetFeesFunctionBase : FunctionMessage { - [Parameter("address", "_vault", 1)] - public virtual string Vault { get; set; } - [Parameter("address[]", "_tokens", 2)] - public virtual List Tokens { get; set; } + [Parameter("address", "_vault", 1)] public virtual string Vault { get; set; } + [Parameter("address[]", "_tokens", 2)] public virtual List Tokens { get; set; } } - public partial class GetFullVaultTokenInfoFunction : GetFullVaultTokenInfoFunctionBase { } + public partial class GetFullVaultTokenInfoFunction : GetFullVaultTokenInfoFunctionBase + { + } [Function("getFullVaultTokenInfo", "uint256[]")] public class GetFullVaultTokenInfoFunctionBase : FunctionMessage { - [Parameter("address", "_vault", 1)] - public virtual string Vault { get; set; } - [Parameter("address", "_weth", 2)] - public virtual string Weth { get; set; } + [Parameter("address", "_vault", 1)] public virtual string Vault { get; set; } + [Parameter("address", "_weth", 2)] public virtual string Weth { get; set; } + [Parameter("uint256", "_usdgAmount", 3)] public virtual BigInteger UsdgAmount { get; set; } - [Parameter("address[]", "_tokens", 4)] - public virtual List Tokens { get; set; } + + [Parameter("address[]", "_tokens", 4)] public virtual List Tokens { get; set; } } - public partial class GetFundingRatesFunction : GetFundingRatesFunctionBase { } + public partial class GetFundingRatesFunction : GetFundingRatesFunctionBase + { + } [Function("getFundingRates", "uint256[]")] public class GetFundingRatesFunctionBase : FunctionMessage { - [Parameter("address", "_vault", 1)] - public virtual string Vault { get; set; } - [Parameter("address", "_weth", 2)] - public virtual string Weth { get; set; } - [Parameter("address[]", "_tokens", 3)] - public virtual List Tokens { get; set; } + [Parameter("address", "_vault", 1)] public virtual string Vault { get; set; } + [Parameter("address", "_weth", 2)] public virtual string Weth { get; set; } + [Parameter("address[]", "_tokens", 3)] public virtual List Tokens { get; set; } } - public partial class GetMaxAmountInFunction : GetMaxAmountInFunctionBase { } + public partial class GetMaxAmountInFunction : GetMaxAmountInFunctionBase + { + } [Function("getMaxAmountIn", "uint256")] public class GetMaxAmountInFunctionBase : FunctionMessage { - [Parameter("address", "_vault", 1)] - public virtual string Vault { get; set; } - [Parameter("address", "_tokenIn", 2)] - public virtual string TokenIn { get; set; } - [Parameter("address", "_tokenOut", 3)] - public virtual string TokenOut { get; set; } + [Parameter("address", "_vault", 1)] public virtual string Vault { get; set; } + [Parameter("address", "_tokenIn", 2)] public virtual string TokenIn { get; set; } + [Parameter("address", "_tokenOut", 3)] public virtual string TokenOut { get; set; } } - public partial class GetPairInfoFunction : GetPairInfoFunctionBase { } + public partial class GetPairInfoFunction : GetPairInfoFunctionBase + { + } [Function("getPairInfo", "uint256[]")] public class GetPairInfoFunctionBase : FunctionMessage { - [Parameter("address", "_factory", 1)] - public virtual string Factory { get; set; } - [Parameter("address[]", "_tokens", 2)] - public virtual List Tokens { get; set; } + [Parameter("address", "_factory", 1)] public virtual string Factory { get; set; } + [Parameter("address[]", "_tokens", 2)] public virtual List Tokens { get; set; } } - public partial class GetPositionsFunction : GetPositionsFunctionBase { } + public partial class GetPositionsFunction : GetPositionsFunctionBase + { + } [Function("getPositions", "uint256[]")] public class GetPositionsFunctionBase : FunctionMessage { - [Parameter("address", "_vault", 1)] - public virtual string Vault { get; set; } - [Parameter("address", "_account", 2)] - public virtual string Account { get; set; } + [Parameter("address", "_vault", 1)] public virtual string Vault { get; set; } + [Parameter("address", "_account", 2)] public virtual string Account { get; set; } + [Parameter("address[]", "_collateralTokens", 3)] public virtual List CollateralTokens { get; set; } + [Parameter("address[]", "_indexTokens", 4)] public virtual List IndexTokens { get; set; } - [Parameter("bool[]", "_isLong", 5)] - public virtual List IsLong { get; set; } + + [Parameter("bool[]", "_isLong", 5)] public virtual List IsLong { get; set; } } - public partial class GetPricesFunction : GetPricesFunctionBase { } + public partial class GetPricesFunction : GetPricesFunctionBase + { + } [Function("getPrices", "uint256[]")] public class GetPricesFunctionBase : FunctionMessage { [Parameter("address", "_priceFeed", 1)] public virtual string PriceFeed { get; set; } - [Parameter("address[]", "_tokens", 2)] - public virtual List Tokens { get; set; } + + [Parameter("address[]", "_tokens", 2)] public virtual List Tokens { get; set; } } - public partial class GetStakingInfoFunction : GetStakingInfoFunctionBase { } + public partial class GetStakingInfoFunction : GetStakingInfoFunctionBase + { + } [Function("getStakingInfo", "uint256[]")] public class GetStakingInfoFunctionBase : FunctionMessage { - [Parameter("address", "_account", 1)] - public virtual string Account { get; set; } + [Parameter("address", "_account", 1)] public virtual string Account { get; set; } + [Parameter("address[]", "_yieldTrackers", 2)] public virtual List YieldTrackers { get; set; } } - public partial class GetTokenBalancesFunction : GetTokenBalancesFunctionBase { } + public partial class GetTokenBalancesFunction : GetTokenBalancesFunctionBase + { + } [Function("getTokenBalances", "uint256[]")] public class GetTokenBalancesFunctionBase : FunctionMessage { - [Parameter("address", "_account", 1)] - public virtual string Account { get; set; } - [Parameter("address[]", "_tokens", 2)] - public virtual List Tokens { get; set; } + [Parameter("address", "_account", 1)] public virtual string Account { get; set; } + [Parameter("address[]", "_tokens", 2)] public virtual List Tokens { get; set; } } - public partial class GetTokenBalancesWithSuppliesFunction : GetTokenBalancesWithSuppliesFunctionBase { } + public partial class GetTokenBalancesWithSuppliesFunction : GetTokenBalancesWithSuppliesFunctionBase + { + } [Function("getTokenBalancesWithSupplies", "uint256[]")] public class GetTokenBalancesWithSuppliesFunctionBase : FunctionMessage { - [Parameter("address", "_account", 1)] - public virtual string Account { get; set; } - [Parameter("address[]", "_tokens", 2)] - public virtual List Tokens { get; set; } + [Parameter("address", "_account", 1)] public virtual string Account { get; set; } + [Parameter("address[]", "_tokens", 2)] public virtual List Tokens { get; set; } } - public partial class GetTokenSupplyFunction : GetTokenSupplyFunctionBase { } + public partial class GetTokenSupplyFunction : GetTokenSupplyFunctionBase + { + } [Function("getTokenSupply", "uint256")] public class GetTokenSupplyFunctionBase : FunctionMessage { - [Parameter("address", "_token", 1)] - public virtual string Token { get; set; } + [Parameter("address", "_token", 1)] public virtual string Token { get; set; } + [Parameter("address[]", "_excludedAccounts", 2)] public virtual List ExcludedAccounts { get; set; } } - public partial class GetTotalBalanceFunction : GetTotalBalanceFunctionBase { } + public partial class GetTotalBalanceFunction : GetTotalBalanceFunctionBase + { + } [Function("getTotalBalance", "uint256")] public class GetTotalBalanceFunctionBase : FunctionMessage { - [Parameter("address", "_token", 1)] - public virtual string Token { get; set; } + [Parameter("address", "_token", 1)] public virtual string Token { get; set; } + [Parameter("address[]", "_accounts", 2)] public virtual List Accounts { get; set; } } - public partial class GetTotalStakedFunction : GetTotalStakedFunctionBase { } + public partial class GetTotalStakedFunction : GetTotalStakedFunctionBase + { + } [Function("getTotalStaked", "uint256[]")] public class GetTotalStakedFunctionBase : FunctionMessage @@ -237,64 +257,72 @@ namespace Managing.Tools.Reader.ContractDefinition public virtual List YieldTokens { get; set; } } - public partial class GetVaultTokenInfoFunction : GetVaultTokenInfoFunctionBase { } + public partial class GetVaultTokenInfoFunction : GetVaultTokenInfoFunctionBase + { + } [Function("getVaultTokenInfo", "uint256[]")] public class GetVaultTokenInfoFunctionBase : FunctionMessage { - [Parameter("address", "_vault", 1)] - public virtual string Vault { get; set; } - [Parameter("address", "_weth", 2)] - public virtual string Weth { get; set; } + [Parameter("address", "_vault", 1)] public virtual string Vault { get; set; } + [Parameter("address", "_weth", 2)] public virtual string Weth { get; set; } + [Parameter("uint256", "_usdgAmount", 3)] public virtual BigInteger UsdgAmount { get; set; } - [Parameter("address[]", "_tokens", 4)] - public virtual List Tokens { get; set; } + + [Parameter("address[]", "_tokens", 4)] public virtual List Tokens { get; set; } } - public partial class GetVaultTokenInfoV2Function : GetVaultTokenInfoV2FunctionBase { } + public partial class GetVaultTokenInfoV2Function : GetVaultTokenInfoV2FunctionBase + { + } [Function("getVaultTokenInfoV2", "uint256[]")] public class GetVaultTokenInfoV2FunctionBase : FunctionMessage { - [Parameter("address", "_vault", 1)] - public virtual string Vault { get; set; } - [Parameter("address", "_weth", 2)] - public virtual string Weth { get; set; } + [Parameter("address", "_vault", 1)] public virtual string Vault { get; set; } + [Parameter("address", "_weth", 2)] public virtual string Weth { get; set; } + [Parameter("uint256", "_usdgAmount", 3)] public virtual BigInteger UsdgAmount { get; set; } - [Parameter("address[]", "_tokens", 4)] - public virtual List Tokens { get; set; } + + [Parameter("address[]", "_tokens", 4)] public virtual List Tokens { get; set; } } - public partial class GetVestingInfoFunction : GetVestingInfoFunctionBase { } + public partial class GetVestingInfoFunction : GetVestingInfoFunctionBase + { + } [Function("getVestingInfo", "uint256[]")] public class GetVestingInfoFunctionBase : FunctionMessage { - [Parameter("address", "_account", 1)] - public virtual string Account { get; set; } + [Parameter("address", "_account", 1)] public virtual string Account { get; set; } + [Parameter("address[]", "_vesters", 2)] public virtual List Vesters { get; set; } } - public partial class GovFunction : GovFunctionBase { } + public partial class GovFunction : GovFunctionBase + { + } [Function("gov", "address")] public class GovFunctionBase : FunctionMessage { - } - public partial class HasMaxGlobalShortSizesFunction : HasMaxGlobalShortSizesFunctionBase { } + public partial class HasMaxGlobalShortSizesFunction : HasMaxGlobalShortSizesFunctionBase + { + } [Function("hasMaxGlobalShortSizes", "bool")] public class HasMaxGlobalShortSizesFunctionBase : FunctionMessage { - } - public partial class SetConfigFunction : SetConfigFunctionBase { } + public partial class SetConfigFunction : SetConfigFunctionBase + { + } [Function("setConfig")] public class SetConfigFunctionBase : FunctionMessage @@ -303,238 +331,256 @@ namespace Managing.Tools.Reader.ContractDefinition public virtual bool HasMaxGlobalShortSizes { get; set; } } - public partial class SetGovFunction : SetGovFunctionBase { } + public partial class SetGovFunction : SetGovFunctionBase + { + } [Function("setGov")] public class SetGovFunctionBase : FunctionMessage { - [Parameter("address", "_gov", 1)] - public virtual string Gov { get; set; } + [Parameter("address", "_gov", 1)] public virtual string Gov { get; set; } } - public partial class BasisPointsDivisorOutputDTO : BasisPointsDivisorOutputDTOBase { } + public partial class BasisPointsDivisorOutputDTO : BasisPointsDivisorOutputDTOBase + { + } [FunctionOutput] - public class BasisPointsDivisorOutputDTOBase : IFunctionOutputDTO + public class BasisPointsDivisorOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256", "", 1)] - public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("uint256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } } - public partial class PositionPropsLengthOutputDTO : PositionPropsLengthOutputDTOBase { } + public partial class PositionPropsLengthOutputDTO : PositionPropsLengthOutputDTOBase + { + } [FunctionOutput] - public class PositionPropsLengthOutputDTOBase : IFunctionOutputDTO + public class PositionPropsLengthOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256", "", 1)] - public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("uint256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } } - public partial class PricePrecisionOutputDTO : PricePrecisionOutputDTOBase { } + public partial class PricePrecisionOutputDTO : PricePrecisionOutputDTOBase + { + } [FunctionOutput] - public class PricePrecisionOutputDTOBase : IFunctionOutputDTO + public class PricePrecisionOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256", "", 1)] - public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("uint256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } } - public partial class UsdgDecimalsOutputDTO : UsdgDecimalsOutputDTOBase { } + public partial class UsdgDecimalsOutputDTO : UsdgDecimalsOutputDTOBase + { + } [FunctionOutput] - public class UsdgDecimalsOutputDTOBase : IFunctionOutputDTO + public class UsdgDecimalsOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256", "", 1)] - public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("uint256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } } - public partial class GetAmountOutOutputDTO : GetAmountOutOutputDTOBase { } + public partial class GetAmountOutOutputDTO : GetAmountOutOutputDTOBase + { + } [FunctionOutput] - public class GetAmountOutOutputDTOBase : IFunctionOutputDTO + public class GetAmountOutOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256", "", 1)] - public virtual BigInteger ReturnValue1 { get; set; } - [Parameter("uint256", "", 2)] - public virtual BigInteger ReturnValue2 { get; set; } + [Parameter("uint256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("uint256", "", 2)] public virtual BigInteger ReturnValue2 { get; set; } } - public partial class GetFeeBasisPointsOutputDTO : GetFeeBasisPointsOutputDTOBase { } + public partial class GetFeeBasisPointsOutputDTO : GetFeeBasisPointsOutputDTOBase + { + } [FunctionOutput] - public class GetFeeBasisPointsOutputDTOBase : IFunctionOutputDTO + public class GetFeeBasisPointsOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256", "", 1)] - public virtual BigInteger ReturnValue1 { get; set; } - [Parameter("uint256", "", 2)] - public virtual BigInteger ReturnValue2 { get; set; } - [Parameter("uint256", "", 3)] - public virtual BigInteger ReturnValue3 { get; set; } + [Parameter("uint256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("uint256", "", 2)] public virtual BigInteger ReturnValue2 { get; set; } + [Parameter("uint256", "", 3)] public virtual BigInteger ReturnValue3 { get; set; } } - public partial class GetFeesOutputDTO : GetFeesOutputDTOBase { } + public partial class GetFeesOutputDTO : GetFeesOutputDTOBase + { + } [FunctionOutput] - public class GetFeesOutputDTOBase : IFunctionOutputDTO + public class GetFeesOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256[]", "", 1)] - public virtual List ReturnValue1 { get; set; } + [Parameter("uint256[]", "", 1)] public virtual List ReturnValue1 { get; set; } } - public partial class GetFullVaultTokenInfoOutputDTO : GetFullVaultTokenInfoOutputDTOBase { } + public partial class GetFullVaultTokenInfoOutputDTO : GetFullVaultTokenInfoOutputDTOBase + { + } [FunctionOutput] - public class GetFullVaultTokenInfoOutputDTOBase : IFunctionOutputDTO + public class GetFullVaultTokenInfoOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256[]", "", 1)] - public virtual List ReturnValue1 { get; set; } + [Parameter("uint256[]", "", 1)] public virtual List ReturnValue1 { get; set; } } - public partial class GetFundingRatesOutputDTO : GetFundingRatesOutputDTOBase { } + public partial class GetFundingRatesOutputDTO : GetFundingRatesOutputDTOBase + { + } [FunctionOutput] - public class GetFundingRatesOutputDTOBase : IFunctionOutputDTO + public class GetFundingRatesOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256[]", "", 1)] - public virtual List ReturnValue1 { get; set; } + [Parameter("uint256[]", "", 1)] public virtual List ReturnValue1 { get; set; } } - public partial class GetMaxAmountInOutputDTO : GetMaxAmountInOutputDTOBase { } + public partial class GetMaxAmountInOutputDTO : GetMaxAmountInOutputDTOBase + { + } [FunctionOutput] - public class GetMaxAmountInOutputDTOBase : IFunctionOutputDTO + public class GetMaxAmountInOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256", "", 1)] - public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("uint256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } } - public partial class GetPairInfoOutputDTO : GetPairInfoOutputDTOBase { } + public partial class GetPairInfoOutputDTO : GetPairInfoOutputDTOBase + { + } [FunctionOutput] - public class GetPairInfoOutputDTOBase : IFunctionOutputDTO + public class GetPairInfoOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256[]", "", 1)] - public virtual List ReturnValue1 { get; set; } + [Parameter("uint256[]", "", 1)] public virtual List ReturnValue1 { get; set; } } - public partial class GetPositionsOutputDTO : GetPositionsOutputDTOBase { } + public partial class GetPositionsOutputDTO : GetPositionsOutputDTOBase + { + } [FunctionOutput] - public class GetPositionsOutputDTOBase : IFunctionOutputDTO + public class GetPositionsOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256[]", "", 1)] - public virtual List ReturnValue1 { get; set; } + [Parameter("uint256[]", "", 1)] public virtual List ReturnValue1 { get; set; } } - public partial class GetPricesOutputDTO : GetPricesOutputDTOBase { } + public partial class GetPricesOutputDTO : GetPricesOutputDTOBase + { + } [FunctionOutput] - public class GetPricesOutputDTOBase : IFunctionOutputDTO + public class GetPricesOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256[]", "", 1)] - public virtual List ReturnValue1 { get; set; } + [Parameter("uint256[]", "", 1)] public virtual List ReturnValue1 { get; set; } } - public partial class GetStakingInfoOutputDTO : GetStakingInfoOutputDTOBase { } + public partial class GetStakingInfoOutputDTO : GetStakingInfoOutputDTOBase + { + } [FunctionOutput] - public class GetStakingInfoOutputDTOBase : IFunctionOutputDTO + public class GetStakingInfoOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256[]", "", 1)] - public virtual List ReturnValue1 { get; set; } + [Parameter("uint256[]", "", 1)] public virtual List ReturnValue1 { get; set; } } - public partial class GetTokenBalancesOutputDTO : GetTokenBalancesOutputDTOBase { } + public partial class GetTokenBalancesOutputDTO : GetTokenBalancesOutputDTOBase + { + } [FunctionOutput] - public class GetTokenBalancesOutputDTOBase : IFunctionOutputDTO + public class GetTokenBalancesOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256[]", "", 1)] - public virtual List ReturnValue1 { get; set; } + [Parameter("uint256[]", "", 1)] public virtual List ReturnValue1 { get; set; } } - public partial class GetTokenBalancesWithSuppliesOutputDTO : GetTokenBalancesWithSuppliesOutputDTOBase { } + public partial class GetTokenBalancesWithSuppliesOutputDTO : GetTokenBalancesWithSuppliesOutputDTOBase + { + } [FunctionOutput] - public class GetTokenBalancesWithSuppliesOutputDTOBase : IFunctionOutputDTO + public class GetTokenBalancesWithSuppliesOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256[]", "", 1)] - public virtual List ReturnValue1 { get; set; } + [Parameter("uint256[]", "", 1)] public virtual List ReturnValue1 { get; set; } } - public partial class GetTokenSupplyOutputDTO : GetTokenSupplyOutputDTOBase { } + public partial class GetTokenSupplyOutputDTO : GetTokenSupplyOutputDTOBase + { + } [FunctionOutput] - public class GetTokenSupplyOutputDTOBase : IFunctionOutputDTO + public class GetTokenSupplyOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256", "", 1)] - public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("uint256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } } - public partial class GetTotalBalanceOutputDTO : GetTotalBalanceOutputDTOBase { } + public partial class GetTotalBalanceOutputDTO : GetTotalBalanceOutputDTOBase + { + } [FunctionOutput] - public class GetTotalBalanceOutputDTOBase : IFunctionOutputDTO + public class GetTotalBalanceOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256", "", 1)] - public virtual BigInteger ReturnValue1 { get; set; } + [Parameter("uint256", "", 1)] public virtual BigInteger ReturnValue1 { get; set; } } - public partial class GetTotalStakedOutputDTO : GetTotalStakedOutputDTOBase { } + public partial class GetTotalStakedOutputDTO : GetTotalStakedOutputDTOBase + { + } [FunctionOutput] - public class GetTotalStakedOutputDTOBase : IFunctionOutputDTO + public class GetTotalStakedOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256[]", "", 1)] - public virtual List ReturnValue1 { get; set; } + [Parameter("uint256[]", "", 1)] public virtual List ReturnValue1 { get; set; } } - public partial class GetVaultTokenInfoOutputDTO : GetVaultTokenInfoOutputDTOBase { } + public partial class GetVaultTokenInfoOutputDTO : GetVaultTokenInfoOutputDTOBase + { + } [FunctionOutput] - public class GetVaultTokenInfoOutputDTOBase : IFunctionOutputDTO + public class GetVaultTokenInfoOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256[]", "", 1)] - public virtual List ReturnValue1 { get; set; } + [Parameter("uint256[]", "", 1)] public virtual List ReturnValue1 { get; set; } } - public partial class GetVaultTokenInfoV2OutputDTO : GetVaultTokenInfoV2OutputDTOBase { } + public partial class GetVaultTokenInfoV2OutputDTO : GetVaultTokenInfoV2OutputDTOBase + { + } [FunctionOutput] - public class GetVaultTokenInfoV2OutputDTOBase : IFunctionOutputDTO + public class GetVaultTokenInfoV2OutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256[]", "", 1)] - public virtual List ReturnValue1 { get; set; } + [Parameter("uint256[]", "", 1)] public virtual List ReturnValue1 { get; set; } } - public partial class GetVestingInfoOutputDTO : GetVestingInfoOutputDTOBase { } + public partial class GetVestingInfoOutputDTO : GetVestingInfoOutputDTOBase + { + } [FunctionOutput] - public class GetVestingInfoOutputDTOBase : IFunctionOutputDTO + public class GetVestingInfoOutputDTOBase : IFunctionOutputDTO { - [Parameter("uint256[]", "", 1)] - public virtual List ReturnValue1 { get; set; } + [Parameter("uint256[]", "", 1)] public virtual List ReturnValue1 { get; set; } } - public partial class GovOutputDTO : GovOutputDTOBase { } + public partial class GovOutputDTO : GovOutputDTOBase + { + } [FunctionOutput] - public class GovOutputDTOBase : IFunctionOutputDTO + public class GovOutputDTOBase : IFunctionOutputDTO { - [Parameter("address", "", 1)] - public virtual string ReturnValue1 { get; set; } + [Parameter("address", "", 1)] public virtual string ReturnValue1 { get; set; } } - public partial class HasMaxGlobalShortSizesOutputDTO : HasMaxGlobalShortSizesOutputDTOBase { } + public partial class HasMaxGlobalShortSizesOutputDTO : HasMaxGlobalShortSizesOutputDTOBase + { + } [FunctionOutput] - public class HasMaxGlobalShortSizesOutputDTOBase : IFunctionOutputDTO + public class HasMaxGlobalShortSizesOutputDTOBase : IFunctionOutputDTO { - [Parameter("bool", "", 1)] - public virtual bool ReturnValue1 { get; set; } + [Parameter("bool", "", 1)] public virtual bool ReturnValue1 { get; set; } } - - - - -} +} \ No newline at end of file diff --git a/src/Managing.Tools.ABI/Reader/ReaderService.cs b/src/Managing.Tools.ABI/Reader/ReaderService.cs index 9b0349f..3e20e71 100644 --- a/src/Managing.Tools.ABI/Reader/ReaderService.cs +++ b/src/Managing.Tools.ABI/Reader/ReaderService.cs @@ -1,369 +1,438 @@ using System.Numerics; -using Nethereum.Web3; +using Managing.Tools.ABI.Reader.ContractDefinition; using Nethereum.RPC.Eth.DTOs; -using Nethereum.Contracts.ContractHandlers; -using Managing.Tools.Reader.ContractDefinition; +using Nethereum.Web3; -namespace Managing.Tools.Reader +namespace Managing.Tools.ABI.Reader { - public partial class ReaderService + public partial class ReaderService : ContractWeb3ServiceBase { - public static Task DeployContractAndWaitForReceiptAsync(Web3 web3, ReaderDeployment readerDeployment, CancellationTokenSource cancellationTokenSource = null) + public static Task DeployContractAndWaitForReceiptAsync(Nethereum.Web3.IWeb3 web3, + ReaderDeployment readerDeployment, CancellationTokenSource cancellationTokenSource = null) { - return web3.Eth.GetContractDeploymentHandler().SendRequestAndWaitForReceiptAsync(readerDeployment, cancellationTokenSource); + return web3.Eth.GetContractDeploymentHandler() + .SendRequestAndWaitForReceiptAsync(readerDeployment, cancellationTokenSource); } - public static Task DeployContractAsync(Web3 web3, ReaderDeployment readerDeployment) + public static Task DeployContractAsync(Nethereum.Web3.IWeb3 web3, ReaderDeployment readerDeployment) { return web3.Eth.GetContractDeploymentHandler().SendRequestAsync(readerDeployment); } - public static async Task DeployContractAndGetServiceAsync(Web3 web3, ReaderDeployment readerDeployment, CancellationTokenSource cancellationTokenSource = null) + public static async Task DeployContractAndGetServiceAsync(Nethereum.Web3.IWeb3 web3, + ReaderDeployment readerDeployment, CancellationTokenSource cancellationTokenSource = null) { var receipt = await DeployContractAndWaitForReceiptAsync(web3, readerDeployment, cancellationTokenSource); return new ReaderService(web3, receipt.ContractAddress); } - protected IWeb3 Web3 { get; } - - public ContractHandler ContractHandler { get; } - - public ReaderService(Web3 web3, string contractAddress) + public ReaderService(Nethereum.Web3.IWeb3 web3, string contractAddress) : base(web3, contractAddress) { - Web3 = web3; - ContractHandler = web3.Eth.GetContractHandler(contractAddress); } - public ReaderService(IWeb3 web3, string contractAddress) + public Task BasisPointsDivisorQueryAsync(BasisPointsDivisorFunction basisPointsDivisorFunction, + BlockParameter blockParameter = null) { - Web3 = web3; - ContractHandler = web3.Eth.GetContractHandler(contractAddress); + return ContractHandler.QueryAsync(basisPointsDivisorFunction, + blockParameter); } - public Task BasisPointsDivisorQueryAsync(BasisPointsDivisorFunction basisPointsDivisorFunction, BlockParameter blockParameter = null) - { - return ContractHandler.QueryAsync(basisPointsDivisorFunction, blockParameter); - } - public Task BasisPointsDivisorQueryAsync(BlockParameter blockParameter = null) { return ContractHandler.QueryAsync(null, blockParameter); } - public Task PositionPropsLengthQueryAsync(PositionPropsLengthFunction positionPropsLengthFunction, BlockParameter blockParameter = null) + public Task PositionPropsLengthQueryAsync(PositionPropsLengthFunction positionPropsLengthFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync(positionPropsLengthFunction, blockParameter); + return ContractHandler.QueryAsync(positionPropsLengthFunction, + blockParameter); } - + public Task PositionPropsLengthQueryAsync(BlockParameter blockParameter = null) { return ContractHandler.QueryAsync(null, blockParameter); } - public Task PricePrecisionQueryAsync(PricePrecisionFunction pricePrecisionFunction, BlockParameter blockParameter = null) + public Task PricePrecisionQueryAsync(PricePrecisionFunction pricePrecisionFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync(pricePrecisionFunction, blockParameter); + return ContractHandler.QueryAsync(pricePrecisionFunction, + blockParameter); } - + public Task PricePrecisionQueryAsync(BlockParameter blockParameter = null) { return ContractHandler.QueryAsync(null, blockParameter); } - public Task UsdgDecimalsQueryAsync(UsdgDecimalsFunction usdgDecimalsFunction, BlockParameter blockParameter = null) + public Task UsdgDecimalsQueryAsync(UsdgDecimalsFunction usdgDecimalsFunction, + BlockParameter blockParameter = null) { return ContractHandler.QueryAsync(usdgDecimalsFunction, blockParameter); } - + public Task UsdgDecimalsQueryAsync(BlockParameter blockParameter = null) { return ContractHandler.QueryAsync(null, blockParameter); } - public Task GetAmountOutQueryAsync(GetAmountOutFunction getAmountOutFunction, BlockParameter blockParameter = null) + public Task GetAmountOutQueryAsync(GetAmountOutFunction getAmountOutFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryDeserializingToObjectAsync(getAmountOutFunction, blockParameter); + return ContractHandler.QueryDeserializingToObjectAsync( + getAmountOutFunction, blockParameter); } - public Task GetAmountOutQueryAsync(string vault, string tokenIn, string tokenOut, BigInteger amountIn, BlockParameter blockParameter = null) + public Task GetAmountOutQueryAsync(string vault, string tokenIn, string tokenOut, + BigInteger amountIn, BlockParameter blockParameter = null) { var getAmountOutFunction = new GetAmountOutFunction(); - getAmountOutFunction.Vault = vault; - getAmountOutFunction.TokenIn = tokenIn; - getAmountOutFunction.TokenOut = tokenOut; - getAmountOutFunction.AmountIn = amountIn; - - return ContractHandler.QueryDeserializingToObjectAsync(getAmountOutFunction, blockParameter); + getAmountOutFunction.Vault = vault; + getAmountOutFunction.TokenIn = tokenIn; + getAmountOutFunction.TokenOut = tokenOut; + getAmountOutFunction.AmountIn = amountIn; + + return ContractHandler.QueryDeserializingToObjectAsync( + getAmountOutFunction, blockParameter); } - public Task GetFeeBasisPointsQueryAsync(GetFeeBasisPointsFunction getFeeBasisPointsFunction, BlockParameter blockParameter = null) + public Task GetFeeBasisPointsQueryAsync( + GetFeeBasisPointsFunction getFeeBasisPointsFunction, BlockParameter blockParameter = null) { - return ContractHandler.QueryDeserializingToObjectAsync(getFeeBasisPointsFunction, blockParameter); + return ContractHandler + .QueryDeserializingToObjectAsync( + getFeeBasisPointsFunction, blockParameter); } - public Task GetFeeBasisPointsQueryAsync(string vault, string tokenIn, string tokenOut, BigInteger amountIn, BlockParameter blockParameter = null) + public Task GetFeeBasisPointsQueryAsync(string vault, string tokenIn, + string tokenOut, BigInteger amountIn, BlockParameter blockParameter = null) { var getFeeBasisPointsFunction = new GetFeeBasisPointsFunction(); - getFeeBasisPointsFunction.Vault = vault; - getFeeBasisPointsFunction.TokenIn = tokenIn; - getFeeBasisPointsFunction.TokenOut = tokenOut; - getFeeBasisPointsFunction.AmountIn = amountIn; - - return ContractHandler.QueryDeserializingToObjectAsync(getFeeBasisPointsFunction, blockParameter); + getFeeBasisPointsFunction.Vault = vault; + getFeeBasisPointsFunction.TokenIn = tokenIn; + getFeeBasisPointsFunction.TokenOut = tokenOut; + getFeeBasisPointsFunction.AmountIn = amountIn; + + return ContractHandler + .QueryDeserializingToObjectAsync( + getFeeBasisPointsFunction, blockParameter); } - public Task> GetFeesQueryAsync(GetFeesFunction getFeesFunction, BlockParameter blockParameter = null) + public Task> GetFeesQueryAsync(GetFeesFunction getFeesFunction, + BlockParameter blockParameter = null) { return ContractHandler.QueryAsync>(getFeesFunction, blockParameter); } - - public Task> GetFeesQueryAsync(string vault, List tokens, BlockParameter blockParameter = null) + + public Task> GetFeesQueryAsync(string vault, List tokens, + BlockParameter blockParameter = null) { var getFeesFunction = new GetFeesFunction(); - getFeesFunction.Vault = vault; - getFeesFunction.Tokens = tokens; - + getFeesFunction.Vault = vault; + getFeesFunction.Tokens = tokens; + return ContractHandler.QueryAsync>(getFeesFunction, blockParameter); } - public Task> GetFullVaultTokenInfoQueryAsync(GetFullVaultTokenInfoFunction getFullVaultTokenInfoFunction, BlockParameter blockParameter = null) + public Task> GetFullVaultTokenInfoQueryAsync( + GetFullVaultTokenInfoFunction getFullVaultTokenInfoFunction, BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync>(getFullVaultTokenInfoFunction, blockParameter); + return ContractHandler.QueryAsync>( + getFullVaultTokenInfoFunction, blockParameter); } - - public Task> GetFullVaultTokenInfoQueryAsync(string vault, string weth, BigInteger usdgAmount, List tokens, BlockParameter blockParameter = null) + + public Task> GetFullVaultTokenInfoQueryAsync(string vault, string weth, BigInteger usdgAmount, + List tokens, BlockParameter blockParameter = null) { var getFullVaultTokenInfoFunction = new GetFullVaultTokenInfoFunction(); - getFullVaultTokenInfoFunction.Vault = vault; - getFullVaultTokenInfoFunction.Weth = weth; - getFullVaultTokenInfoFunction.UsdgAmount = usdgAmount; - getFullVaultTokenInfoFunction.Tokens = tokens; - - return ContractHandler.QueryAsync>(getFullVaultTokenInfoFunction, blockParameter); + getFullVaultTokenInfoFunction.Vault = vault; + getFullVaultTokenInfoFunction.Weth = weth; + getFullVaultTokenInfoFunction.UsdgAmount = usdgAmount; + getFullVaultTokenInfoFunction.Tokens = tokens; + + return ContractHandler.QueryAsync>( + getFullVaultTokenInfoFunction, blockParameter); } - public Task> GetFundingRatesQueryAsync(GetFundingRatesFunction getFundingRatesFunction, BlockParameter blockParameter = null) + public Task> GetFundingRatesQueryAsync(GetFundingRatesFunction getFundingRatesFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync>(getFundingRatesFunction, blockParameter); + return ContractHandler.QueryAsync>(getFundingRatesFunction, + blockParameter); } - - public Task> GetFundingRatesQueryAsync(string vault, string weth, List tokens, BlockParameter blockParameter = null) + + public Task> GetFundingRatesQueryAsync(string vault, string weth, List tokens, + BlockParameter blockParameter = null) { var getFundingRatesFunction = new GetFundingRatesFunction(); - getFundingRatesFunction.Vault = vault; - getFundingRatesFunction.Weth = weth; - getFundingRatesFunction.Tokens = tokens; - - return ContractHandler.QueryAsync>(getFundingRatesFunction, blockParameter); + getFundingRatesFunction.Vault = vault; + getFundingRatesFunction.Weth = weth; + getFundingRatesFunction.Tokens = tokens; + + return ContractHandler.QueryAsync>(getFundingRatesFunction, + blockParameter); } - public Task GetMaxAmountInQueryAsync(GetMaxAmountInFunction getMaxAmountInFunction, BlockParameter blockParameter = null) + public Task GetMaxAmountInQueryAsync(GetMaxAmountInFunction getMaxAmountInFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync(getMaxAmountInFunction, blockParameter); + return ContractHandler.QueryAsync(getMaxAmountInFunction, + blockParameter); } - - public Task GetMaxAmountInQueryAsync(string vault, string tokenIn, string tokenOut, BlockParameter blockParameter = null) + + public Task GetMaxAmountInQueryAsync(string vault, string tokenIn, string tokenOut, + BlockParameter blockParameter = null) { var getMaxAmountInFunction = new GetMaxAmountInFunction(); - getMaxAmountInFunction.Vault = vault; - getMaxAmountInFunction.TokenIn = tokenIn; - getMaxAmountInFunction.TokenOut = tokenOut; - - return ContractHandler.QueryAsync(getMaxAmountInFunction, blockParameter); + getMaxAmountInFunction.Vault = vault; + getMaxAmountInFunction.TokenIn = tokenIn; + getMaxAmountInFunction.TokenOut = tokenOut; + + return ContractHandler.QueryAsync(getMaxAmountInFunction, + blockParameter); } - public Task> GetPairInfoQueryAsync(GetPairInfoFunction getPairInfoFunction, BlockParameter blockParameter = null) + public Task> GetPairInfoQueryAsync(GetPairInfoFunction getPairInfoFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync>(getPairInfoFunction, blockParameter); + return ContractHandler.QueryAsync>(getPairInfoFunction, + blockParameter); } - - public Task> GetPairInfoQueryAsync(string factory, List tokens, BlockParameter blockParameter = null) + + public Task> GetPairInfoQueryAsync(string factory, List tokens, + BlockParameter blockParameter = null) { var getPairInfoFunction = new GetPairInfoFunction(); - getPairInfoFunction.Factory = factory; - getPairInfoFunction.Tokens = tokens; - - return ContractHandler.QueryAsync>(getPairInfoFunction, blockParameter); + getPairInfoFunction.Factory = factory; + getPairInfoFunction.Tokens = tokens; + + return ContractHandler.QueryAsync>(getPairInfoFunction, + blockParameter); } - public Task> GetPositionsQueryAsync(GetPositionsFunction getPositionsFunction, BlockParameter blockParameter = null) + public Task> GetPositionsQueryAsync(GetPositionsFunction getPositionsFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync>(getPositionsFunction, blockParameter); + return ContractHandler.QueryAsync>(getPositionsFunction, + blockParameter); } - - public Task> GetPositionsQueryAsync(string vault, string account, List collateralTokens, List indexTokens, List isLong, BlockParameter blockParameter = null) + + public Task> GetPositionsQueryAsync(string vault, string account, + List collateralTokens, List indexTokens, List isLong, + BlockParameter blockParameter = null) { var getPositionsFunction = new GetPositionsFunction(); - getPositionsFunction.Vault = vault; - getPositionsFunction.Account = account; - getPositionsFunction.CollateralTokens = collateralTokens; - getPositionsFunction.IndexTokens = indexTokens; - getPositionsFunction.IsLong = isLong; - - return ContractHandler.QueryAsync>(getPositionsFunction, blockParameter); + getPositionsFunction.Vault = vault; + getPositionsFunction.Account = account; + getPositionsFunction.CollateralTokens = collateralTokens; + getPositionsFunction.IndexTokens = indexTokens; + getPositionsFunction.IsLong = isLong; + + return ContractHandler.QueryAsync>(getPositionsFunction, + blockParameter); } - public Task> GetPricesQueryAsync(GetPricesFunction getPricesFunction, BlockParameter blockParameter = null) + public Task> GetPricesQueryAsync(GetPricesFunction getPricesFunction, + BlockParameter blockParameter = null) { return ContractHandler.QueryAsync>(getPricesFunction, blockParameter); } - - public Task> GetPricesQueryAsync(string priceFeed, List tokens, BlockParameter blockParameter = null) + + public Task> GetPricesQueryAsync(string priceFeed, List tokens, + BlockParameter blockParameter = null) { var getPricesFunction = new GetPricesFunction(); - getPricesFunction.PriceFeed = priceFeed; - getPricesFunction.Tokens = tokens; - + getPricesFunction.PriceFeed = priceFeed; + getPricesFunction.Tokens = tokens; + return ContractHandler.QueryAsync>(getPricesFunction, blockParameter); } - public Task> GetStakingInfoQueryAsync(GetStakingInfoFunction getStakingInfoFunction, BlockParameter blockParameter = null) + public Task> GetStakingInfoQueryAsync(GetStakingInfoFunction getStakingInfoFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync>(getStakingInfoFunction, blockParameter); + return ContractHandler.QueryAsync>(getStakingInfoFunction, + blockParameter); } - - public Task> GetStakingInfoQueryAsync(string account, List yieldTrackers, BlockParameter blockParameter = null) + + public Task> GetStakingInfoQueryAsync(string account, List yieldTrackers, + BlockParameter blockParameter = null) { var getStakingInfoFunction = new GetStakingInfoFunction(); - getStakingInfoFunction.Account = account; - getStakingInfoFunction.YieldTrackers = yieldTrackers; - - return ContractHandler.QueryAsync>(getStakingInfoFunction, blockParameter); + getStakingInfoFunction.Account = account; + getStakingInfoFunction.YieldTrackers = yieldTrackers; + + return ContractHandler.QueryAsync>(getStakingInfoFunction, + blockParameter); } - public Task> GetTokenBalancesQueryAsync(GetTokenBalancesFunction getTokenBalancesFunction, BlockParameter blockParameter = null) + public Task> GetTokenBalancesQueryAsync(GetTokenBalancesFunction getTokenBalancesFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync>(getTokenBalancesFunction, blockParameter); + return ContractHandler.QueryAsync>(getTokenBalancesFunction, + blockParameter); } - - public Task> GetTokenBalancesQueryAsync(string account, List tokens, BlockParameter blockParameter = null) + + public Task> GetTokenBalancesQueryAsync(string account, List tokens, + BlockParameter blockParameter = null) { var getTokenBalancesFunction = new GetTokenBalancesFunction(); - getTokenBalancesFunction.Account = account; - getTokenBalancesFunction.Tokens = tokens; - - return ContractHandler.QueryAsync>(getTokenBalancesFunction, blockParameter); + getTokenBalancesFunction.Account = account; + getTokenBalancesFunction.Tokens = tokens; + + return ContractHandler.QueryAsync>(getTokenBalancesFunction, + blockParameter); } - public Task> GetTokenBalancesWithSuppliesQueryAsync(GetTokenBalancesWithSuppliesFunction getTokenBalancesWithSuppliesFunction, BlockParameter blockParameter = null) + public Task> GetTokenBalancesWithSuppliesQueryAsync( + GetTokenBalancesWithSuppliesFunction getTokenBalancesWithSuppliesFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync>(getTokenBalancesWithSuppliesFunction, blockParameter); + return ContractHandler.QueryAsync>( + getTokenBalancesWithSuppliesFunction, blockParameter); } - - public Task> GetTokenBalancesWithSuppliesQueryAsync(string account, List tokens, BlockParameter blockParameter = null) + + public Task> GetTokenBalancesWithSuppliesQueryAsync(string account, List tokens, + BlockParameter blockParameter = null) { var getTokenBalancesWithSuppliesFunction = new GetTokenBalancesWithSuppliesFunction(); - getTokenBalancesWithSuppliesFunction.Account = account; - getTokenBalancesWithSuppliesFunction.Tokens = tokens; - - return ContractHandler.QueryAsync>(getTokenBalancesWithSuppliesFunction, blockParameter); + getTokenBalancesWithSuppliesFunction.Account = account; + getTokenBalancesWithSuppliesFunction.Tokens = tokens; + + return ContractHandler.QueryAsync>( + getTokenBalancesWithSuppliesFunction, blockParameter); } - public Task GetTokenSupplyQueryAsync(GetTokenSupplyFunction getTokenSupplyFunction, BlockParameter blockParameter = null) + public Task GetTokenSupplyQueryAsync(GetTokenSupplyFunction getTokenSupplyFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync(getTokenSupplyFunction, blockParameter); + return ContractHandler.QueryAsync(getTokenSupplyFunction, + blockParameter); } - - public Task GetTokenSupplyQueryAsync(string token, List excludedAccounts, BlockParameter blockParameter = null) + + public Task GetTokenSupplyQueryAsync(string token, List excludedAccounts, + BlockParameter blockParameter = null) { var getTokenSupplyFunction = new GetTokenSupplyFunction(); - getTokenSupplyFunction.Token = token; - getTokenSupplyFunction.ExcludedAccounts = excludedAccounts; - - return ContractHandler.QueryAsync(getTokenSupplyFunction, blockParameter); + getTokenSupplyFunction.Token = token; + getTokenSupplyFunction.ExcludedAccounts = excludedAccounts; + + return ContractHandler.QueryAsync(getTokenSupplyFunction, + blockParameter); } - public Task GetTotalBalanceQueryAsync(GetTotalBalanceFunction getTotalBalanceFunction, BlockParameter blockParameter = null) + public Task GetTotalBalanceQueryAsync(GetTotalBalanceFunction getTotalBalanceFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync(getTotalBalanceFunction, blockParameter); + return ContractHandler.QueryAsync(getTotalBalanceFunction, + blockParameter); } - - public Task GetTotalBalanceQueryAsync(string token, List accounts, BlockParameter blockParameter = null) + + public Task GetTotalBalanceQueryAsync(string token, List accounts, + BlockParameter blockParameter = null) { var getTotalBalanceFunction = new GetTotalBalanceFunction(); - getTotalBalanceFunction.Token = token; - getTotalBalanceFunction.Accounts = accounts; - - return ContractHandler.QueryAsync(getTotalBalanceFunction, blockParameter); + getTotalBalanceFunction.Token = token; + getTotalBalanceFunction.Accounts = accounts; + + return ContractHandler.QueryAsync(getTotalBalanceFunction, + blockParameter); } - public Task> GetTotalStakedQueryAsync(GetTotalStakedFunction getTotalStakedFunction, BlockParameter blockParameter = null) + public Task> GetTotalStakedQueryAsync(GetTotalStakedFunction getTotalStakedFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync>(getTotalStakedFunction, blockParameter); + return ContractHandler.QueryAsync>(getTotalStakedFunction, + blockParameter); } - - public Task> GetTotalStakedQueryAsync(List yieldTokens, BlockParameter blockParameter = null) + + public Task> GetTotalStakedQueryAsync(List yieldTokens, + BlockParameter blockParameter = null) { var getTotalStakedFunction = new GetTotalStakedFunction(); - getTotalStakedFunction.YieldTokens = yieldTokens; - - return ContractHandler.QueryAsync>(getTotalStakedFunction, blockParameter); + getTotalStakedFunction.YieldTokens = yieldTokens; + + return ContractHandler.QueryAsync>(getTotalStakedFunction, + blockParameter); } - public Task> GetVaultTokenInfoQueryAsync(GetVaultTokenInfoFunction getVaultTokenInfoFunction, BlockParameter blockParameter = null) + public Task> GetVaultTokenInfoQueryAsync(GetVaultTokenInfoFunction getVaultTokenInfoFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync>(getVaultTokenInfoFunction, blockParameter); + return ContractHandler.QueryAsync>(getVaultTokenInfoFunction, + blockParameter); } - - public Task> GetVaultTokenInfoQueryAsync(string vault, string weth, BigInteger usdgAmount, List tokens, BlockParameter blockParameter = null) + + public Task> GetVaultTokenInfoQueryAsync(string vault, string weth, BigInteger usdgAmount, + List tokens, BlockParameter blockParameter = null) { var getVaultTokenInfoFunction = new GetVaultTokenInfoFunction(); - getVaultTokenInfoFunction.Vault = vault; - getVaultTokenInfoFunction.Weth = weth; - getVaultTokenInfoFunction.UsdgAmount = usdgAmount; - getVaultTokenInfoFunction.Tokens = tokens; - - return ContractHandler.QueryAsync>(getVaultTokenInfoFunction, blockParameter); + getVaultTokenInfoFunction.Vault = vault; + getVaultTokenInfoFunction.Weth = weth; + getVaultTokenInfoFunction.UsdgAmount = usdgAmount; + getVaultTokenInfoFunction.Tokens = tokens; + + return ContractHandler.QueryAsync>(getVaultTokenInfoFunction, + blockParameter); } - public Task> GetVaultTokenInfoV2QueryAsync(GetVaultTokenInfoV2Function getVaultTokenInfoV2Function, BlockParameter blockParameter = null) + public Task> GetVaultTokenInfoV2QueryAsync( + GetVaultTokenInfoV2Function getVaultTokenInfoV2Function, BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync>(getVaultTokenInfoV2Function, blockParameter); + return ContractHandler.QueryAsync>( + getVaultTokenInfoV2Function, blockParameter); } - - public Task> GetVaultTokenInfoV2QueryAsync(string vault, string weth, BigInteger usdgAmount, List tokens, BlockParameter blockParameter = null) + + public Task> GetVaultTokenInfoV2QueryAsync(string vault, string weth, BigInteger usdgAmount, + List tokens, BlockParameter blockParameter = null) { var getVaultTokenInfoV2Function = new GetVaultTokenInfoV2Function(); - getVaultTokenInfoV2Function.Vault = vault; - getVaultTokenInfoV2Function.Weth = weth; - getVaultTokenInfoV2Function.UsdgAmount = usdgAmount; - getVaultTokenInfoV2Function.Tokens = tokens; - - return ContractHandler.QueryAsync>(getVaultTokenInfoV2Function, blockParameter); + getVaultTokenInfoV2Function.Vault = vault; + getVaultTokenInfoV2Function.Weth = weth; + getVaultTokenInfoV2Function.UsdgAmount = usdgAmount; + getVaultTokenInfoV2Function.Tokens = tokens; + + return ContractHandler.QueryAsync>( + getVaultTokenInfoV2Function, blockParameter); } - public Task> GetVestingInfoQueryAsync(GetVestingInfoFunction getVestingInfoFunction, BlockParameter blockParameter = null) + public Task> GetVestingInfoQueryAsync(GetVestingInfoFunction getVestingInfoFunction, + BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync>(getVestingInfoFunction, blockParameter); + return ContractHandler.QueryAsync>(getVestingInfoFunction, + blockParameter); } - - public Task> GetVestingInfoQueryAsync(string account, List vesters, BlockParameter blockParameter = null) + + public Task> GetVestingInfoQueryAsync(string account, List vesters, + BlockParameter blockParameter = null) { var getVestingInfoFunction = new GetVestingInfoFunction(); - getVestingInfoFunction.Account = account; - getVestingInfoFunction.Vesters = vesters; - - return ContractHandler.QueryAsync>(getVestingInfoFunction, blockParameter); + getVestingInfoFunction.Account = account; + getVestingInfoFunction.Vesters = vesters; + + return ContractHandler.QueryAsync>(getVestingInfoFunction, + blockParameter); } public Task GovQueryAsync(GovFunction govFunction, BlockParameter blockParameter = null) @@ -371,18 +440,20 @@ namespace Managing.Tools.Reader return ContractHandler.QueryAsync(govFunction, blockParameter); } - + public Task GovQueryAsync(BlockParameter blockParameter = null) { return ContractHandler.QueryAsync(null, blockParameter); } - public Task HasMaxGlobalShortSizesQueryAsync(HasMaxGlobalShortSizesFunction hasMaxGlobalShortSizesFunction, BlockParameter blockParameter = null) + public Task HasMaxGlobalShortSizesQueryAsync( + HasMaxGlobalShortSizesFunction hasMaxGlobalShortSizesFunction, BlockParameter blockParameter = null) { - return ContractHandler.QueryAsync(hasMaxGlobalShortSizesFunction, blockParameter); + return ContractHandler.QueryAsync(hasMaxGlobalShortSizesFunction, + blockParameter); } - + public Task HasMaxGlobalShortSizesQueryAsync(BlockParameter blockParameter = null) { return ContractHandler.QueryAsync(null, blockParameter); @@ -390,54 +461,105 @@ namespace Managing.Tools.Reader public Task SetConfigRequestAsync(SetConfigFunction setConfigFunction) { - return ContractHandler.SendRequestAsync(setConfigFunction); + return ContractHandler.SendRequestAsync(setConfigFunction); } - public Task SetConfigRequestAndWaitForReceiptAsync(SetConfigFunction setConfigFunction, CancellationTokenSource cancellationToken = null) + public Task SetConfigRequestAndWaitForReceiptAsync(SetConfigFunction setConfigFunction, + CancellationTokenSource cancellationToken = null) { - return ContractHandler.SendRequestAndWaitForReceiptAsync(setConfigFunction, cancellationToken); + return ContractHandler.SendRequestAndWaitForReceiptAsync(setConfigFunction, cancellationToken); } public Task SetConfigRequestAsync(bool hasMaxGlobalShortSizes) { var setConfigFunction = new SetConfigFunction(); - setConfigFunction.HasMaxGlobalShortSizes = hasMaxGlobalShortSizes; - - return ContractHandler.SendRequestAsync(setConfigFunction); + setConfigFunction.HasMaxGlobalShortSizes = hasMaxGlobalShortSizes; + + return ContractHandler.SendRequestAsync(setConfigFunction); } - public Task SetConfigRequestAndWaitForReceiptAsync(bool hasMaxGlobalShortSizes, CancellationTokenSource cancellationToken = null) + public Task SetConfigRequestAndWaitForReceiptAsync(bool hasMaxGlobalShortSizes, + CancellationTokenSource cancellationToken = null) { var setConfigFunction = new SetConfigFunction(); - setConfigFunction.HasMaxGlobalShortSizes = hasMaxGlobalShortSizes; - - return ContractHandler.SendRequestAndWaitForReceiptAsync(setConfigFunction, cancellationToken); + setConfigFunction.HasMaxGlobalShortSizes = hasMaxGlobalShortSizes; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(setConfigFunction, cancellationToken); } public Task SetGovRequestAsync(SetGovFunction setGovFunction) { - return ContractHandler.SendRequestAsync(setGovFunction); + return ContractHandler.SendRequestAsync(setGovFunction); } - public Task SetGovRequestAndWaitForReceiptAsync(SetGovFunction setGovFunction, CancellationTokenSource cancellationToken = null) + public Task SetGovRequestAndWaitForReceiptAsync(SetGovFunction setGovFunction, + CancellationTokenSource cancellationToken = null) { - return ContractHandler.SendRequestAndWaitForReceiptAsync(setGovFunction, cancellationToken); + return ContractHandler.SendRequestAndWaitForReceiptAsync(setGovFunction, cancellationToken); } public Task SetGovRequestAsync(string gov) { var setGovFunction = new SetGovFunction(); - setGovFunction.Gov = gov; - - return ContractHandler.SendRequestAsync(setGovFunction); + setGovFunction.Gov = gov; + + return ContractHandler.SendRequestAsync(setGovFunction); } - public Task SetGovRequestAndWaitForReceiptAsync(string gov, CancellationTokenSource cancellationToken = null) + public Task SetGovRequestAndWaitForReceiptAsync(string gov, + CancellationTokenSource cancellationToken = null) { var setGovFunction = new SetGovFunction(); - setGovFunction.Gov = gov; - - return ContractHandler.SendRequestAndWaitForReceiptAsync(setGovFunction, cancellationToken); + setGovFunction.Gov = gov; + + return ContractHandler.SendRequestAndWaitForReceiptAsync(setGovFunction, cancellationToken); + } + + public override List GetAllFunctionTypes() + { + return new List + { + typeof(BasisPointsDivisorFunction), + typeof(PositionPropsLengthFunction), + typeof(PricePrecisionFunction), + typeof(UsdgDecimalsFunction), + typeof(GetAmountOutFunction), + typeof(GetFeeBasisPointsFunction), + typeof(GetFeesFunction), + typeof(GetFullVaultTokenInfoFunction), + typeof(GetFundingRatesFunction), + typeof(GetMaxAmountInFunction), + typeof(GetPairInfoFunction), + typeof(GetPositionsFunction), + typeof(GetPricesFunction), + typeof(GetStakingInfoFunction), + typeof(GetTokenBalancesFunction), + typeof(GetTokenBalancesWithSuppliesFunction), + typeof(GetTokenSupplyFunction), + typeof(GetTotalBalanceFunction), + typeof(GetTotalStakedFunction), + typeof(GetVaultTokenInfoFunction), + typeof(GetVaultTokenInfoV2Function), + typeof(GetVestingInfoFunction), + typeof(GovFunction), + typeof(HasMaxGlobalShortSizesFunction), + typeof(SetConfigFunction), + typeof(SetGovFunction) + }; + } + + public override List GetAllEventTypes() + { + return new List + { + }; + } + + public override List GetAllErrorTypes() + { + return new List + { + }; } } -} +} \ No newline at end of file diff --git a/src/Managing.WebApp/src/pages/web3Page/GetMarketInfoGmxV2.tsx b/src/Managing.WebApp/src/pages/web3Page/GetMarketInfoGmxV2.tsx new file mode 100644 index 0000000..d933a91 --- /dev/null +++ b/src/Managing.WebApp/src/pages/web3Page/GetMarketInfoGmxV2.tsx @@ -0,0 +1,826 @@ +import {useAccount} from "wagmi"; + +import {getContract} from "config/contracts"; +import { + BORROWING_EXPONENT_FACTOR_KEY, + BORROWING_FACTOR_KEY, + CLAIMABLE_FUNDING_AMOUNT, + FUNDING_DECREASE_FACTOR_PER_SECOND, + FUNDING_EXPONENT_FACTOR_KEY, + FUNDING_FACTOR_KEY, + FUNDING_INCREASE_FACTOR_PER_SECOND, + IS_MARKET_DISABLED_KEY, + MAX_FUNDING_FACTOR_PER_SECOND, + MAX_OPEN_INTEREST_KEY, + MAX_PNL_FACTOR_FOR_TRADERS_KEY, + MAX_PNL_FACTOR_KEY, + MAX_POOL_AMOUNT_KEY, + MAX_POOL_USD_FOR_DEPOSIT_KEY, + MAX_POSITION_IMPACT_FACTOR_FOR_LIQUIDATIONS_KEY, + MAX_POSITION_IMPACT_FACTOR_KEY, + MIN_COLLATERAL_FACTOR_FOR_OPEN_INTEREST_MULTIPLIER_KEY, + MIN_COLLATERAL_FACTOR_KEY, + MIN_FUNDING_FACTOR_PER_SECOND, + MIN_POSITION_IMPACT_POOL_AMOUNT_KEY, + OPEN_INTEREST_IN_TOKENS_KEY, + OPEN_INTEREST_KEY, + OPEN_INTEREST_RESERVE_FACTOR_KEY, + POOL_AMOUNT_ADJUSTMENT_KEY, + POOL_AMOUNT_KEY, + POSITION_FEE_FACTOR_KEY, + POSITION_IMPACT_EXPONENT_FACTOR_KEY, + POSITION_IMPACT_FACTOR_KEY, + POSITION_IMPACT_POOL_AMOUNT_KEY, + POSITION_IMPACT_POOL_DISTRIBUTION_RATE_KEY, + RESERVE_FACTOR_KEY, + SWAP_FEE_FACTOR_KEY, + SWAP_IMPACT_EXPONENT_FACTOR_KEY, + SWAP_IMPACT_FACTOR_KEY, + SWAP_IMPACT_POOL_AMOUNT_KEY, + THRESHOLD_FOR_DECREASE_FUNDING, + THRESHOLD_FOR_STABLE_FUNDING, + VIRTUAL_MARKET_ID_KEY, + VIRTUAL_TOKEN_ID_KEY, +} from "config/dataStore"; +import {convertTokenAddress} from "config/tokens"; +import {useMulticall} from "lib/multicall"; +import {hashDataMapAsync} from "lib/multicall/hashDataAsync"; +import {BN_ONE} from "lib/numbers"; +import {getByKey} from "lib/objects"; +import {TokensData, useTokensDataRequest} from "../tokens"; +import {MarketsInfoData} from "./types"; +import {useMarkets} from "./useMarkets"; +import {getContractMarketPrices} from "./utils"; + +import DataStore from "abis/DataStore.json"; +import SyntheticsReader from "abis/SyntheticsReader.json"; + +export type MarketsInfoResult = { + marketsInfoData?: MarketsInfoData; + tokensData?: TokensData; + pricesUpdatedAt?: number; +}; + +export function useMarketsInfoRequest(chainId: number): MarketsInfoResult { + const {address: account} = useAccount(); + const {marketsData, marketsAddresses} = useMarkets(chainId); + const {tokensData, pricesUpdatedAt} = useTokensDataRequest(chainId); + const dataStoreAddress = getContract(chainId, "DataStore"); + + const isDepencenciesLoading = !marketsAddresses || !tokensData; + + const {data} = useMulticall(chainId, "useMarketsInfo", { + inWorker: true, + key: !isDepencenciesLoading && + marketsAddresses.length > 0 && [marketsAddresses.join("-"), dataStoreAddress, account, pricesUpdatedAt], + + // Refreshed on every prices update + refreshInterval: null, + clearUnusedKeys: true, + keepPreviousData: true, + + request: async () => { + const request = {}; + const promises = (marketsAddresses || []).map(async (marketAddress) => { + const market = getByKey(marketsData, marketAddress)!; + const marketPrices = getContractMarketPrices(tokensData!, market)!; + + if (!marketPrices) { + // eslint-disable-next-line no-console + console.warn("missed market prices", market); + return; + } + + const marketProps = { + marketToken: market.marketTokenAddress, + indexToken: market.indexTokenAddress, + longToken: market.longTokenAddress, + shortToken: market.shortTokenAddress, + }; + + request[`${marketAddress}-reader`] = { + contractAddress: getContract(chainId, "SyntheticsReader"), + abi: SyntheticsReader.abi, + calls: { + marketInfo: { + methodName: "getMarketInfo", + params: [dataStoreAddress, marketPrices, marketAddress], + }, + marketTokenPriceMax: { + methodName: "getMarketTokenPrice", + params: [ + dataStoreAddress, + marketProps, + marketPrices.indexTokenPrice, + marketPrices.longTokenPrice, + marketPrices.shortTokenPrice, + MAX_PNL_FACTOR_FOR_TRADERS_KEY, + true, + ], + }, + marketTokenPriceMin: { + methodName: "getMarketTokenPrice", + params: [ + dataStoreAddress, + marketProps, + marketPrices.indexTokenPrice, + marketPrices.longTokenPrice, + marketPrices.shortTokenPrice, + MAX_PNL_FACTOR_FOR_TRADERS_KEY, + false, + ], + }, + }, + }; + + const hashedKeys = await hashDataMapAsync({ + isDisabled: [ + ["bytes32", "address"], + [IS_MARKET_DISABLED_KEY, marketAddress], + ], + longPoolAmount: [ + ["bytes32", "address", "address"], + [POOL_AMOUNT_KEY, marketAddress, market.longTokenAddress], + ], + shortPoolAmount: [ + ["bytes32", "address", "address"], + [POOL_AMOUNT_KEY, marketAddress, market.shortTokenAddress], + ], + maxLongPoolAmount: [ + ["bytes32", "address", "address"], + [MAX_POOL_AMOUNT_KEY, marketAddress, market.longTokenAddress], + ], + maxShortPoolAmount: [ + ["bytes32", "address", "address"], + [MAX_POOL_AMOUNT_KEY, marketAddress, market.shortTokenAddress], + ], + maxLongPoolUsdForDeposit: [ + ["bytes32", "address", "address"], + [MAX_POOL_USD_FOR_DEPOSIT_KEY, marketAddress, market.longTokenAddress], + ], + maxShortPoolUsdForDeposit: [ + ["bytes32", "address", "address"], + [MAX_POOL_USD_FOR_DEPOSIT_KEY, marketAddress, market.shortTokenAddress], + ], + longPoolAmountAdjustment: [ + ["bytes32", "address", "address"], + [POOL_AMOUNT_ADJUSTMENT_KEY, marketAddress, market.longTokenAddress], + ], + shortPoolAmountAdjustment: [ + ["bytes32", "address", "address"], + [POOL_AMOUNT_ADJUSTMENT_KEY, marketAddress, market.shortTokenAddress], + ], + reserveFactorLong: [ + ["bytes32", "address", "bool"], + [RESERVE_FACTOR_KEY, marketAddress, true], + ], + reserveFactorShort: [ + ["bytes32", "address", "bool"], + [RESERVE_FACTOR_KEY, marketAddress, false], + ], + openInterestReserveFactorLong: [ + ["bytes32", "address", "bool"], + [OPEN_INTEREST_RESERVE_FACTOR_KEY, marketAddress, true], + ], + openInterestReserveFactorShort: [ + ["bytes32", "address", "bool"], + [OPEN_INTEREST_RESERVE_FACTOR_KEY, marketAddress, false], + ], + maxOpenInterestLong: [ + ["bytes32", "address", "bool"], + [MAX_OPEN_INTEREST_KEY, marketAddress, true], + ], + maxOpenInterestShort: [ + ["bytes32", "address", "bool"], + [MAX_OPEN_INTEREST_KEY, marketAddress, false], + ], + positionImpactPoolAmount: [ + ["bytes32", "address"], + [POSITION_IMPACT_POOL_AMOUNT_KEY, marketAddress], + ], + minPositionImpactPoolAmount: [ + ["bytes32", "address"], + [MIN_POSITION_IMPACT_POOL_AMOUNT_KEY, marketAddress], + ], + positionImpactPoolDistributionRate: [ + ["bytes32", "address"], + [POSITION_IMPACT_POOL_DISTRIBUTION_RATE_KEY, marketAddress], + ], + swapImpactPoolAmountLong: [ + ["bytes32", "address", "address"], + [SWAP_IMPACT_POOL_AMOUNT_KEY, marketAddress, market.longTokenAddress], + ], + swapImpactPoolAmountShort: [ + ["bytes32", "address", "address"], + [SWAP_IMPACT_POOL_AMOUNT_KEY, marketAddress, market.shortTokenAddress], + ], + borrowingFactorLong: [ + ["bytes32", "address", "bool"], + [BORROWING_FACTOR_KEY, marketAddress, true], + ], + borrowingFactorShort: [ + ["bytes32", "address", "bool"], + [BORROWING_FACTOR_KEY, marketAddress, false], + ], + borrowingExponentFactorLong: [ + ["bytes32", "address", "bool"], + [BORROWING_EXPONENT_FACTOR_KEY, marketAddress, true], + ], + borrowingExponentFactorShort: [ + ["bytes32", "address", "bool"], + [BORROWING_EXPONENT_FACTOR_KEY, marketAddress, false], + ], + fundingFactor: [ + ["bytes32", "address"], + [FUNDING_FACTOR_KEY, marketAddress], + ], + fundingExponentFactor: [ + ["bytes32", "address"], + [FUNDING_EXPONENT_FACTOR_KEY, marketAddress], + ], + fundingIncreaseFactorPerSecond: [ + ["bytes32", "address"], + [FUNDING_INCREASE_FACTOR_PER_SECOND, marketAddress], + ], + fundingDecreaseFactorPerSecond: [ + ["bytes32", "address"], + [FUNDING_DECREASE_FACTOR_PER_SECOND, marketAddress], + ], + thresholdForStableFunding: [ + ["bytes32", "address"], + [THRESHOLD_FOR_STABLE_FUNDING, marketAddress], + ], + thresholdForDecreaseFunding: [ + ["bytes32", "address"], + [THRESHOLD_FOR_DECREASE_FUNDING, marketAddress], + ], + minFundingFactorPerSecond: [ + ["bytes32", "address"], + [MIN_FUNDING_FACTOR_PER_SECOND, marketAddress], + ], + maxFundingFactorPerSecond: [ + ["bytes32", "address"], + [MAX_FUNDING_FACTOR_PER_SECOND, marketAddress], + ], + maxPnlFactorForTradersLong: [ + ["bytes32", "bytes32", "address", "bool"], + [MAX_PNL_FACTOR_KEY, MAX_PNL_FACTOR_FOR_TRADERS_KEY, marketAddress, true], + ], + maxPnlFactorForTradersShort: [ + ["bytes32", "bytes32", "address", "bool"], + [MAX_PNL_FACTOR_KEY, MAX_PNL_FACTOR_FOR_TRADERS_KEY, marketAddress, false], + ], + claimableFundingAmountLong: account + ? [ + ["bytes32", "address", "address", "address"], + [CLAIMABLE_FUNDING_AMOUNT, marketAddress, market.longTokenAddress, account], + ] + : undefined, + claimableFundingAmountShort: account + ? [ + ["bytes32", "address", "address", "address"], + [CLAIMABLE_FUNDING_AMOUNT, marketAddress, market.shortTokenAddress, account], + ] + : undefined, + positionFeeFactorForPositiveImpact: [ + ["bytes32", "address", "bool"], + [POSITION_FEE_FACTOR_KEY, marketAddress, true], + ], + positionFeeFactorForNegativeImpact: [ + ["bytes32", "address", "bool"], + [POSITION_FEE_FACTOR_KEY, marketAddress, false], + ], + positionImpactFactorPositive: [ + ["bytes32", "address", "bool"], + [POSITION_IMPACT_FACTOR_KEY, marketAddress, true], + ], + positionImpactFactorNegative: [ + ["bytes32", "address", "bool"], + [POSITION_IMPACT_FACTOR_KEY, marketAddress, false], + ], + maxPositionImpactFactorPositive: [ + ["bytes32", "address", "bool"], + [MAX_POSITION_IMPACT_FACTOR_KEY, marketAddress, true], + ], + maxPositionImpactFactorNegative: [ + ["bytes32", "address", "bool"], + [MAX_POSITION_IMPACT_FACTOR_KEY, marketAddress, false], + ], + maxPositionImpactFactorForLiquidations: [ + ["bytes32", "address"], + [MAX_POSITION_IMPACT_FACTOR_FOR_LIQUIDATIONS_KEY, marketAddress], + ], + minCollateralFactor: [ + ["bytes32", "address"], + [MIN_COLLATERAL_FACTOR_KEY, marketAddress], + ], + minCollateralFactorForOpenInterestLong: [ + ["bytes32", "address", "bool"], + [MIN_COLLATERAL_FACTOR_FOR_OPEN_INTEREST_MULTIPLIER_KEY, marketAddress, true], + ], + minCollateralFactorForOpenInterestShort: [ + ["bytes32", "address", "bool"], + [MIN_COLLATERAL_FACTOR_FOR_OPEN_INTEREST_MULTIPLIER_KEY, marketAddress, false], + ], + positionImpactExponentFactor: [ + ["bytes32", "address"], + [POSITION_IMPACT_EXPONENT_FACTOR_KEY, marketAddress], + ], + swapFeeFactorForPositiveImpact: [ + ["bytes32", "address", "bool"], + [SWAP_FEE_FACTOR_KEY, marketAddress, true], + ], + swapFeeFactorForNegativeImpact: [ + ["bytes32", "address", "bool"], + [SWAP_FEE_FACTOR_KEY, marketAddress, false], + ], + swapImpactFactorPositive: [ + ["bytes32", "address", "bool"], + [SWAP_IMPACT_FACTOR_KEY, marketAddress, true], + ], + swapImpactFactorNegative: [ + ["bytes32", "address", "bool"], + [SWAP_IMPACT_FACTOR_KEY, marketAddress, false], + ], + swapImpactExponentFactor: [ + ["bytes32", "address"], + [SWAP_IMPACT_EXPONENT_FACTOR_KEY, marketAddress], + ], + longInterestUsingLongToken: [ + ["bytes32", "address", "address", "bool"], + [OPEN_INTEREST_KEY, marketAddress, market.longTokenAddress, true], + ], + longInterestUsingShortToken: [ + ["bytes32", "address", "address", "bool"], + [OPEN_INTEREST_KEY, marketAddress, market.shortTokenAddress, true], + ], + shortInterestUsingLongToken: [ + ["bytes32", "address", "address", "bool"], + [OPEN_INTEREST_KEY, marketAddress, market.longTokenAddress, false], + ], + shortInterestUsingShortToken: [ + ["bytes32", "address", "address", "bool"], + [OPEN_INTEREST_KEY, marketAddress, market.shortTokenAddress, false], + ], + longInterestInTokensUsingLongToken: [ + ["bytes32", "address", "address", "bool"], + [OPEN_INTEREST_IN_TOKENS_KEY, marketAddress, market.longTokenAddress, true], + ], + longInterestInTokensUsingShortToken: [ + ["bytes32", "address", "address", "bool"], + [OPEN_INTEREST_IN_TOKENS_KEY, marketAddress, market.shortTokenAddress, true], + ], + shortInterestInTokensUsingLongToken: [ + ["bytes32", "address", "address", "bool"], + [OPEN_INTEREST_IN_TOKENS_KEY, marketAddress, market.longTokenAddress, false], + ], + shortInterestInTokensUsingShortToken: [ + ["bytes32", "address", "address", "bool"], + [OPEN_INTEREST_IN_TOKENS_KEY, marketAddress, market.shortTokenAddress, false], + ], + virtualMarketId: [ + ["bytes32", "address"], + [VIRTUAL_MARKET_ID_KEY, marketAddress], + ], + virtualLongTokenId: [ + ["bytes32", "address"], + [VIRTUAL_TOKEN_ID_KEY, market.longTokenAddress], + ], + virtualShortTokenId: [ + ["bytes32", "address"], + [VIRTUAL_TOKEN_ID_KEY, market.shortTokenAddress], + ], + }); + + request[`${marketAddress}-dataStore`] = { + contractAddress: dataStoreAddress, + abi: DataStore.abi, + calls: { + isDisabled: { + methodName: "getBool", + params: [hashedKeys.isDisabled], + }, + longPoolAmount: { + methodName: "getUint", + params: [hashedKeys.longPoolAmount], + }, + shortPoolAmount: { + methodName: "getUint", + params: [hashedKeys.shortPoolAmount], + }, + maxLongPoolAmount: { + methodName: "getUint", + params: [hashedKeys.maxLongPoolAmount], + }, + maxShortPoolAmount: { + methodName: "getUint", + params: [hashedKeys.maxShortPoolAmount], + }, + maxLongPoolUsdForDeposit: { + methodName: "getUint", + params: [hashedKeys.maxLongPoolUsdForDeposit], + }, + maxShortPoolUsdForDeposit: { + methodName: "getUint", + params: [hashedKeys.maxShortPoolUsdForDeposit], + }, + longPoolAmountAdjustment: { + methodName: "getUint", + params: [hashedKeys.longPoolAmountAdjustment], + }, + shortPoolAmountAdjustment: { + methodName: "getUint", + params: [hashedKeys.shortPoolAmountAdjustment], + }, + reserveFactorLong: { + methodName: "getUint", + params: [hashedKeys.reserveFactorLong], + }, + reserveFactorShort: { + methodName: "getUint", + params: [hashedKeys.reserveFactorShort], + }, + openInterestReserveFactorLong: { + methodName: "getUint", + params: [hashedKeys.openInterestReserveFactorLong], + }, + openInterestReserveFactorShort: { + methodName: "getUint", + params: [hashedKeys.openInterestReserveFactorShort], + }, + maxOpenInterestLong: { + methodName: "getUint", + params: [hashedKeys.maxOpenInterestLong], + }, + maxOpenInterestShort: { + methodName: "getUint", + params: [hashedKeys.maxOpenInterestShort], + }, + positionImpactPoolAmount: { + methodName: "getUint", + params: [hashedKeys.positionImpactPoolAmount], + }, + minPositionImpactPoolAmount: { + methodName: "getUint", + params: [hashedKeys.minPositionImpactPoolAmount], + }, + positionImpactPoolDistributionRate: { + methodName: "getUint", + params: [hashedKeys.positionImpactPoolDistributionRate], + }, + swapImpactPoolAmountLong: { + methodName: "getUint", + params: [hashedKeys.swapImpactPoolAmountLong], + }, + swapImpactPoolAmountShort: { + methodName: "getUint", + params: [hashedKeys.swapImpactPoolAmountShort], + }, + borrowingFactorLong: { + methodName: "getUint", + params: [hashedKeys.borrowingFactorLong], + }, + borrowingFactorShort: { + methodName: "getUint", + params: [hashedKeys.borrowingFactorShort], + }, + borrowingExponentFactorLong: { + methodName: "getUint", + params: [hashedKeys.borrowingExponentFactorLong], + }, + borrowingExponentFactorShort: { + methodName: "getUint", + params: [hashedKeys.borrowingExponentFactorShort], + }, + fundingFactor: { + methodName: "getUint", + params: [hashedKeys.fundingFactor], + }, + fundingExponentFactor: { + methodName: "getUint", + params: [hashedKeys.fundingExponentFactor], + }, + fundingIncreaseFactorPerSecond: { + methodName: "getUint", + params: [hashedKeys.fundingIncreaseFactorPerSecond], + }, + fundingDecreaseFactorPerSecond: { + methodName: "getUint", + params: [hashedKeys.fundingDecreaseFactorPerSecond], + }, + thresholdForStableFunding: { + methodName: "getUint", + params: [hashedKeys.thresholdForStableFunding], + }, + thresholdForDecreaseFunding: { + methodName: "getUint", + params: [hashedKeys.thresholdForDecreaseFunding], + }, + minFundingFactorPerSecond: { + methodName: "getUint", + params: [hashedKeys.minFundingFactorPerSecond], + }, + maxFundingFactorPerSecond: { + methodName: "getUint", + params: [hashedKeys.maxFundingFactorPerSecond], + }, + maxPnlFactorForTradersLong: { + methodName: "getUint", + params: [hashedKeys.maxPnlFactorForTradersLong], + }, + maxPnlFactorForTradersShort: { + methodName: "getUint", + params: [hashedKeys.maxPnlFactorForTradersShort], + }, + claimableFundingAmountLong: account + ? { + methodName: "getUint", + params: [hashedKeys.claimableFundingAmountLong], + } + : undefined, + claimableFundingAmountShort: account + ? { + methodName: "getUint", + params: [hashedKeys.claimableFundingAmountShort], + } + : undefined, + positionFeeFactorForPositiveImpact: { + methodName: "getUint", + params: [hashedKeys.positionFeeFactorForPositiveImpact], + }, + positionFeeFactorForNegativeImpact: { + methodName: "getUint", + params: [hashedKeys.positionFeeFactorForNegativeImpact], + }, + positionImpactFactorPositive: { + methodName: "getUint", + params: [hashedKeys.positionImpactFactorPositive], + }, + positionImpactFactorNegative: { + methodName: "getUint", + params: [hashedKeys.positionImpactFactorNegative], + }, + maxPositionImpactFactorPositive: { + methodName: "getUint", + params: [hashedKeys.maxPositionImpactFactorPositive], + }, + maxPositionImpactFactorNegative: { + methodName: "getUint", + params: [hashedKeys.maxPositionImpactFactorNegative], + }, + maxPositionImpactFactorForLiquidations: { + methodName: "getUint", + params: [hashedKeys.maxPositionImpactFactorForLiquidations], + }, + minCollateralFactor: { + methodName: "getUint", + params: [hashedKeys.minCollateralFactor], + }, + minCollateralFactorForOpenInterestLong: { + methodName: "getUint", + params: [hashedKeys.minCollateralFactorForOpenInterestLong], + }, + minCollateralFactorForOpenInterestShort: { + methodName: "getUint", + params: [hashedKeys.minCollateralFactorForOpenInterestShort], + }, + positionImpactExponentFactor: { + methodName: "getUint", + params: [hashedKeys.positionImpactExponentFactor], + }, + swapFeeFactorForPositiveImpact: { + methodName: "getUint", + params: [hashedKeys.swapFeeFactorForPositiveImpact], + }, + swapFeeFactorForNegativeImpact: { + methodName: "getUint", + params: [hashedKeys.swapFeeFactorForNegativeImpact], + }, + swapImpactFactorPositive: { + methodName: "getUint", + params: [hashedKeys.swapImpactFactorPositive], + }, + swapImpactFactorNegative: { + methodName: "getUint", + params: [hashedKeys.swapImpactFactorNegative], + }, + swapImpactExponentFactor: { + methodName: "getUint", + params: [hashedKeys.swapImpactExponentFactor], + }, + longInterestUsingLongToken: { + methodName: "getUint", + params: [hashedKeys.longInterestUsingLongToken], + }, + longInterestUsingShortToken: { + methodName: "getUint", + params: [hashedKeys.longInterestUsingShortToken], + }, + shortInterestUsingLongToken: { + methodName: "getUint", + params: [hashedKeys.shortInterestUsingLongToken], + }, + shortInterestUsingShortToken: { + methodName: "getUint", + params: [hashedKeys.shortInterestUsingShortToken], + }, + longInterestInTokensUsingLongToken: { + methodName: "getUint", + params: [hashedKeys.longInterestInTokensUsingLongToken], + }, + longInterestInTokensUsingShortToken: { + methodName: "getUint", + params: [hashedKeys.longInterestInTokensUsingShortToken], + }, + shortInterestInTokensUsingLongToken: { + methodName: "getUint", + params: [hashedKeys.shortInterestInTokensUsingLongToken], + }, + shortInterestInTokensUsingShortToken: { + methodName: "getUint", + params: [hashedKeys.shortInterestInTokensUsingShortToken], + }, + virtualMarketId: { + methodName: "getBytes32", + params: [hashedKeys.virtualMarketId], + }, + virtualLongTokenId: { + methodName: "getBytes32", + params: [hashedKeys.virtualLongTokenId], + }, + virtualShortTokenId: { + methodName: "getBytes32", + params: [hashedKeys.virtualShortTokenId], + }, + }, + }; + }); + + await Promise.all(promises); + + return request; + }, + parseResponse: (res) => { + const result = marketsAddresses!.reduce((acc: MarketsInfoData, marketAddress) => { + const readerErrors = res.errors[`${marketAddress}-reader`]; + const dataStoreErrors = res.errors[`${marketAddress}-dataStore`]; + + const readerValues = res.data[`${marketAddress}-reader`]; + const dataStoreValues = res.data[`${marketAddress}-dataStore`]; + + // Skip invalid market + if (!readerValues || !dataStoreValues || readerErrors || dataStoreErrors) { + // eslint-disable-next-line no-console + console.log("market info error", marketAddress, readerErrors, dataStoreErrors, dataStoreValues); + return acc; + } + const market = getByKey(marketsData, marketAddress)!; + const marketDivisor = market.isSameCollaterals ? BigInt(2) : BN_ONE; + + const longInterestUsingLongToken = + BigInt(dataStoreValues.longInterestUsingLongToken.returnValues[0]) / marketDivisor; + const longInterestUsingShortToken = + BigInt(dataStoreValues.longInterestUsingShortToken.returnValues[0]) / marketDivisor; + const shortInterestUsingLongToken = + BigInt(dataStoreValues.shortInterestUsingLongToken.returnValues[0]) / marketDivisor; + const shortInterestUsingShortToken = + BigInt(dataStoreValues.shortInterestUsingShortToken.returnValues[0]) / marketDivisor; + + const longInterestUsd = longInterestUsingLongToken + longInterestUsingShortToken; + const shortInterestUsd = shortInterestUsingLongToken + shortInterestUsingShortToken; + + const longInterestInTokensUsingLongToken = + BigInt(dataStoreValues.longInterestInTokensUsingLongToken.returnValues[0]) / marketDivisor; + const longInterestInTokensUsingShortToken = + BigInt(dataStoreValues.longInterestInTokensUsingShortToken.returnValues[0]) / marketDivisor; + const shortInterestInTokensUsingLongToken = + BigInt(dataStoreValues.shortInterestInTokensUsingLongToken.returnValues[0]) / marketDivisor; + const shortInterestInTokensUsingShortToken = + BigInt(dataStoreValues.shortInterestInTokensUsingShortToken.returnValues[0]) / marketDivisor; + + const longInterestInTokens = longInterestInTokensUsingLongToken + longInterestInTokensUsingShortToken; + const shortInterestInTokens = shortInterestInTokensUsingLongToken + shortInterestInTokensUsingShortToken; + + const {nextFunding, virtualInventory} = readerValues.marketInfo.returnValues; + + const [, poolValueInfoMin] = readerValues.marketTokenPriceMin.returnValues; + + const [, poolValueInfoMax] = readerValues.marketTokenPriceMax.returnValues; + + const longToken = getByKey(tokensData!, market.longTokenAddress)!; + const shortToken = getByKey(tokensData!, market.shortTokenAddress)!; + const indexToken = getByKey(tokensData!, convertTokenAddress(chainId, market.indexTokenAddress, "native"))!; + + acc[marketAddress] = { + ...market, + isDisabled: dataStoreValues.isDisabled.returnValues[0], + longToken, + shortToken, + indexToken, + longInterestUsd, + shortInterestUsd, + longInterestInTokens, + shortInterestInTokens, + longPoolAmount: dataStoreValues.longPoolAmount.returnValues[0] / marketDivisor, + shortPoolAmount: dataStoreValues.shortPoolAmount.returnValues[0] / marketDivisor, + maxLongPoolUsdForDeposit: dataStoreValues.maxLongPoolUsdForDeposit.returnValues[0], + maxShortPoolUsdForDeposit: dataStoreValues.maxShortPoolUsdForDeposit.returnValues[0], + maxLongPoolAmount: dataStoreValues.maxLongPoolAmount.returnValues[0], + maxShortPoolAmount: dataStoreValues.maxShortPoolAmount.returnValues[0], + longPoolAmountAdjustment: dataStoreValues.longPoolAmountAdjustment.returnValues[0], + shortPoolAmountAdjustment: dataStoreValues.shortPoolAmountAdjustment.returnValues[0], + poolValueMin: poolValueInfoMin.poolValue, + poolValueMax: poolValueInfoMax.poolValue, + reserveFactorLong: dataStoreValues.reserveFactorLong.returnValues[0], + reserveFactorShort: dataStoreValues.reserveFactorShort.returnValues[0], + openInterestReserveFactorLong: dataStoreValues.openInterestReserveFactorLong.returnValues[0], + openInterestReserveFactorShort: dataStoreValues.openInterestReserveFactorShort.returnValues[0], + maxOpenInterestLong: dataStoreValues.maxOpenInterestLong.returnValues[0], + maxOpenInterestShort: dataStoreValues.maxOpenInterestShort.returnValues[0], + totalBorrowingFees: poolValueInfoMax.totalBorrowingFees, + positionImpactPoolAmount: dataStoreValues.positionImpactPoolAmount.returnValues[0], + minPositionImpactPoolAmount: dataStoreValues.minPositionImpactPoolAmount.returnValues[0], + positionImpactPoolDistributionRate: dataStoreValues.positionImpactPoolDistributionRate.returnValues[0], + swapImpactPoolAmountLong: dataStoreValues.swapImpactPoolAmountLong.returnValues[0], + swapImpactPoolAmountShort: dataStoreValues.swapImpactPoolAmountShort.returnValues[0], + borrowingFactorLong: dataStoreValues.borrowingFactorLong.returnValues[0], + borrowingFactorShort: dataStoreValues.borrowingFactorShort.returnValues[0], + borrowingExponentFactorLong: dataStoreValues.borrowingExponentFactorLong.returnValues[0], + borrowingExponentFactorShort: dataStoreValues.borrowingExponentFactorShort.returnValues[0], + fundingFactor: dataStoreValues.fundingFactor.returnValues[0], + fundingExponentFactor: dataStoreValues.fundingExponentFactor.returnValues[0], + fundingIncreaseFactorPerSecond: dataStoreValues.fundingIncreaseFactorPerSecond.returnValues[0], + fundingDecreaseFactorPerSecond: dataStoreValues.fundingDecreaseFactorPerSecond.returnValues[0], + thresholdForDecreaseFunding: dataStoreValues.thresholdForDecreaseFunding.returnValues[0], + thresholdForStableFunding: dataStoreValues.thresholdForStableFunding.returnValues[0], + minFundingFactorPerSecond: dataStoreValues.minFundingFactorPerSecond.returnValues[0], + maxFundingFactorPerSecond: dataStoreValues.maxFundingFactorPerSecond.returnValues[0], + pnlLongMax: poolValueInfoMax.longPnl, + pnlLongMin: poolValueInfoMin.longPnl, + pnlShortMax: poolValueInfoMax.shortPnl, + pnlShortMin: poolValueInfoMin.shortPnl, + netPnlMax: poolValueInfoMax.netPnl, + netPnlMin: poolValueInfoMin.netPnl, + + maxPnlFactorForTradersLong: dataStoreValues.maxPnlFactorForTradersLong.returnValues[0], + maxPnlFactorForTradersShort: dataStoreValues.maxPnlFactorForTradersShort.returnValues[0], + + minCollateralFactor: dataStoreValues.minCollateralFactor.returnValues[0], + minCollateralFactorForOpenInterestLong: + dataStoreValues.minCollateralFactorForOpenInterestLong.returnValues[0], + + minCollateralFactorForOpenInterestShort: + dataStoreValues.minCollateralFactorForOpenInterestShort.returnValues[0], + + claimableFundingAmountLong: dataStoreValues.claimableFundingAmountLong + ? dataStoreValues.claimableFundingAmountLong?.returnValues[0] / marketDivisor + : undefined, + + claimableFundingAmountShort: dataStoreValues.claimableFundingAmountShort + ? dataStoreValues.claimableFundingAmountShort?.returnValues[0] / marketDivisor + : undefined, + + positionFeeFactorForPositiveImpact: dataStoreValues.positionFeeFactorForPositiveImpact.returnValues[0], + positionFeeFactorForNegativeImpact: dataStoreValues.positionFeeFactorForNegativeImpact.returnValues[0], + positionImpactFactorPositive: dataStoreValues.positionImpactFactorPositive.returnValues[0], + positionImpactFactorNegative: dataStoreValues.positionImpactFactorNegative.returnValues[0], + maxPositionImpactFactorPositive: dataStoreValues.maxPositionImpactFactorPositive.returnValues[0], + maxPositionImpactFactorNegative: dataStoreValues.maxPositionImpactFactorNegative.returnValues[0], + maxPositionImpactFactorForLiquidations: + dataStoreValues.maxPositionImpactFactorForLiquidations.returnValues[0], + positionImpactExponentFactor: dataStoreValues.positionImpactExponentFactor.returnValues[0], + swapFeeFactorForPositiveImpact: dataStoreValues.swapFeeFactorForPositiveImpact.returnValues[0], + swapFeeFactorForNegativeImpact: dataStoreValues.swapFeeFactorForNegativeImpact.returnValues[0], + swapImpactFactorPositive: dataStoreValues.swapImpactFactorPositive.returnValues[0], + swapImpactFactorNegative: dataStoreValues.swapImpactFactorNegative.returnValues[0], + swapImpactExponentFactor: dataStoreValues.swapImpactExponentFactor.returnValues[0], + + borrowingFactorPerSecondForLongs: readerValues.marketInfo.returnValues.borrowingFactorPerSecondForLongs, + + borrowingFactorPerSecondForShorts: readerValues.marketInfo.returnValues.borrowingFactorPerSecondForShorts, + + fundingFactorPerSecond: nextFunding.fundingFactorPerSecond, + longsPayShorts: nextFunding.longsPayShorts, + + virtualPoolAmountForLongToken: virtualInventory.virtualPoolAmountForLongToken, + virtualPoolAmountForShortToken: virtualInventory.virtualPoolAmountForShortToken, + virtualInventoryForPositions: virtualInventory.virtualInventoryForPositions, + + virtualMarketId: dataStoreValues.virtualMarketId.returnValues[0], + virtualLongTokenId: dataStoreValues.virtualLongTokenId.returnValues[0], + virtualShortTokenId: dataStoreValues.virtualShortTokenId.returnValues[0], + }; + + return acc; + }, {} as MarketsInfoData); + + return result; + }, + }); + + return { + marketsInfoData: isDepencenciesLoading ? undefined : data, + tokensData, + pricesUpdatedAt, + }; +} diff --git a/src/Managing.sln b/src/Managing.sln index 0a20804..5c5441a 100644 --- a/src/Managing.sln +++ b/src/Managing.sln @@ -64,6 +64,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Managing.ABI.GmxV2", "Managing.ABI.GmxV2\Managing.ABI.GmxV2.csproj", "{4521E1A9-AF81-4CA8-8B4D-30C261ECE977}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -216,6 +218,14 @@ Global {A1D88DC3-1CF6-4C03-AEEC-30AA37420CE1}.Release|Any CPU.Build.0 = Release|Any CPU {A1D88DC3-1CF6-4C03-AEEC-30AA37420CE1}.Release|x64.ActiveCfg = Release|Any CPU {A1D88DC3-1CF6-4C03-AEEC-30AA37420CE1}.Release|x64.Build.0 = Release|Any CPU + {4521E1A9-AF81-4CA8-8B4D-30C261ECE977}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4521E1A9-AF81-4CA8-8B4D-30C261ECE977}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4521E1A9-AF81-4CA8-8B4D-30C261ECE977}.Debug|x64.ActiveCfg = Debug|Any CPU + {4521E1A9-AF81-4CA8-8B4D-30C261ECE977}.Debug|x64.Build.0 = Debug|Any CPU + {4521E1A9-AF81-4CA8-8B4D-30C261ECE977}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4521E1A9-AF81-4CA8-8B4D-30C261ECE977}.Release|Any CPU.Build.0 = Release|Any CPU + {4521E1A9-AF81-4CA8-8B4D-30C261ECE977}.Release|x64.ActiveCfg = Release|Any CPU + {4521E1A9-AF81-4CA8-8B4D-30C261ECE977}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -238,6 +248,7 @@ Global {283AC491-97C3-49E0-AB17-272EFB4E5A9C} = {F6774DB0-DF13-4077-BC94-0E67EE105C4C} {CDDF92D4-9D2E-4134-BD44-3064D6EF462D} = {E453D33B-5C2B-4AA1-834D-2C916EC95FC6} {A1D88DC3-1CF6-4C03-AEEC-30AA37420CE1} = {D6711C71-A263-4398-8DFF-28E2CD1FE0CE} + {4521E1A9-AF81-4CA8-8B4D-30C261ECE977} = {D6711C71-A263-4398-8DFF-28E2CD1FE0CE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BD7CA081-CE52-4824-9777-C0562E54F3EA}