@dolomite-exchange/dolomite-margin
Version:
Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol
435 lines (434 loc) • 14.4 kB
JSON
{
"contractName": "BorrowPositionProxyV2",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "dolomiteMargin",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "_borrower",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "_borrowAccountNumber",
"type": "uint256"
}
],
"name": "BorrowPositionOpen",
"type": "event"
},
{
"constant": true,
"inputs": [],
"name": "DOLOMITE_MARGIN",
"outputs": [
{
"internalType": "contract IDolomiteMargin",
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "_borrowAccountNumber",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_toAccountNumber",
"type": "uint256"
},
{
"internalType": "uint256[]",
"name": "_collateralMarketIds",
"type": "uint256[]"
}
],
"name": "closeBorrowPosition",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"internalType": "address",
"name": "_caller",
"type": "address"
}
],
"name": "isCallerAuthorized",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "_fromAccountNumber",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_toAccountNumber",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_marketId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_amountWei",
"type": "uint256"
},
{
"internalType": "enum AccountBalanceLib.BalanceCheckFlag",
"name": "_balanceCheckFlag",
"type": "uint8"
}
],
"name": "openBorrowPosition",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "_fromAccountNumber",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_borrowAccountNumber",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_marketId",
"type": "uint256"
},
{
"internalType": "enum AccountBalanceLib.BalanceCheckFlag",
"name": "_balanceCheckFlag",
"type": "uint8"
}
],
"name": "repayAllForBorrowPosition",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "_caller",
"type": "address"
},
{
"internalType": "bool",
"name": "_isAuthorized",
"type": "bool"
}
],
"name": "setIsCallerAuthorized",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "uint256",
"name": "_fromAccountNumber",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_toAccountNumber",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_marketId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_amountWei",
"type": "uint256"
},
{
"internalType": "enum AccountBalanceLib.BalanceCheckFlag",
"name": "_balanceCheckFlag",
"type": "uint8"
}
],
"name": "transferBetweenAccounts",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "_fromAccountOwner",
"type": "address"
},
{
"internalType": "uint256",
"name": "_fromAccountNumber",
"type": "uint256"
},
{
"internalType": "address",
"name": "_toAccountOwner",
"type": "address"
},
{
"internalType": "uint256",
"name": "_toAccountNumber",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_marketId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_amountWei",
"type": "uint256"
},
{
"internalType": "enum AccountBalanceLib.BalanceCheckFlag",
"name": "_balanceCheckFlag",
"type": "uint8"
}
],
"name": "openBorrowPositionWithDifferentAccounts",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "_borrowAccountOwner",
"type": "address"
},
{
"internalType": "uint256",
"name": "_borrowAccountNumber",
"type": "uint256"
},
{
"internalType": "address",
"name": "_toAccountOwner",
"type": "address"
},
{
"internalType": "uint256",
"name": "_toAccountNumber",
"type": "uint256"
},
{
"internalType": "uint256[]",
"name": "_collateralMarketIds",
"type": "uint256[]"
}
],
"name": "closeBorrowPositionWithDifferentAccounts",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "_fromAccountOwner",
"type": "address"
},
{
"internalType": "uint256",
"name": "_fromAccountNumber",
"type": "uint256"
},
{
"internalType": "address",
"name": "_toAccountOwner",
"type": "address"
},
{
"internalType": "uint256",
"name": "_toAccountNumber",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_marketId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_amountWei",
"type": "uint256"
},
{
"internalType": "enum AccountBalanceLib.BalanceCheckFlag",
"name": "_balanceCheckFlag",
"type": "uint8"
}
],
"name": "transferBetweenAccountsWithDifferentAccounts",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "_fromAccountOwner",
"type": "address"
},
{
"internalType": "uint256",
"name": "_fromAccountNumber",
"type": "uint256"
},
{
"internalType": "address",
"name": "_borrowAccountOwner",
"type": "address"
},
{
"internalType": "uint256",
"name": "_borrowAccountNumber",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_marketId",
"type": "uint256"
},
{
"internalType": "enum AccountBalanceLib.BalanceCheckFlag",
"name": "_balanceCheckFlag",
"type": "uint8"
}
],
"name": "repayAllForBorrowPositionWithDifferentAccounts",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"networks": {
"1": {
"links": {},
"address": "0xC06271eb97d960F4034DDF953e16271CcB2B10BD",
"transactionHash": "0x46d74c4275ecff4c8b9d76dd291c76a7491340d574284d38eadf8c81ccd41ad8"
},
"196": {
"links": {},
"address": "0x694F7Ba53e331D8494043A41262dC063B0F5C8b4",
"transactionHash": "0x8bf95fd51e3625b5f545928bccc29648404e5006fd1df410e9159e0651c86159"
},
"1101": {
"links": {},
"address": "0xB3fF983d7927540B7f92602657a2a26977664e77",
"transactionHash": "0xb2bdd2720ad98f646f82000479f050fdd8492463ec1ea64124ac339bfe6bd7c9"
},
"3637": {
"links": {},
"address": "0xC06271eb97d960F4034DDF953e16271CcB2B10BD",
"transactionHash": "0xf306f9f4442f7fb4f58f6b768e9294cf5d2981f55cbdaa0082b3567e3f6486bc"
},
"5000": {
"links": {},
"address": "0xe99A7e4556CaF7925fbac52765128e524E9Dd793",
"transactionHash": "0x73393293269b25c3c3ba0601709915254ca31bbace0ae3bce8408422323cf4de"
},
"5330": {
"links": {},
"address": "0xC06271eb97d960F4034DDF953e16271CcB2B10BD",
"transactionHash": "0xedabec11430fd87f6bbb84b154be25658decb7710af217336d2f488496bc2b91"
},
"8453": {
"links": {},
"address": "0xC06271eb97d960F4034DDF953e16271CcB2B10BD",
"transactionHash": "0x069e41436df4b883a785f8b301ac4dd33a75c4e1c986992f260c36aaae8e673b"
},
"42161": {
"links": {},
"address": "0x38E49A617305101216eC6306e3a18065D14Bf3a7",
"transactionHash": "0x6de8d7f6e27d62e73dd25e5af4de52e2ce086b51252805db63a8255760746995"
},
"57073": {
"links": {},
"address": "0xC06271eb97d960F4034DDF953e16271CcB2B10BD",
"transactionHash": "0x7c9316103412d7984cece2b304e7d277bca9a87408345ae369f579f2311159fe"
},
"80094": {
"links": {},
"address": "0xC06271eb97d960F4034DDF953e16271CcB2B10BD",
"transactionHash": "0x031e1292f6634f4c17670470e012c0c27421500f62412be7dea226b0956fc39a"
}
}
}