Fix Swap
This commit is contained in:
@@ -0,0 +1,105 @@
|
|||||||
|
{
|
||||||
|
"abi": [
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{ "internalType": "uint64", "name": "size", "type": "uint64" },
|
||||||
|
{ "internalType": "uint64", "name": "leaf", "type": "uint64" }
|
||||||
|
],
|
||||||
|
"name": "constructOutboxProof",
|
||||||
|
"outputs": [
|
||||||
|
{ "internalType": "bytes32", "name": "send", "type": "bytes32" },
|
||||||
|
{ "internalType": "bytes32", "name": "root", "type": "bytes32" },
|
||||||
|
{ "internalType": "bytes32[]", "name": "proof", "type": "bytes32[]" }
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{ "internalType": "address", "name": "sender", "type": "address" },
|
||||||
|
{ "internalType": "uint256", "name": "deposit", "type": "uint256" },
|
||||||
|
{ "internalType": "address", "name": "to", "type": "address" },
|
||||||
|
{ "internalType": "uint256", "name": "l2CallValue", "type": "uint256" },
|
||||||
|
{ "internalType": "address", "name": "excessFeeRefundAddress", "type": "address" },
|
||||||
|
{ "internalType": "address", "name": "callValueRefundAddress", "type": "address" },
|
||||||
|
{ "internalType": "bytes", "name": "data", "type": "bytes" }
|
||||||
|
],
|
||||||
|
"name": "estimateRetryableTicket",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [{ "internalType": "uint64", "name": "blockNum", "type": "uint64" }],
|
||||||
|
"name": "findBatchContainingBlock",
|
||||||
|
"outputs": [{ "internalType": "uint64", "name": "batch", "type": "uint64" }],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{ "internalType": "address", "name": "to", "type": "address" },
|
||||||
|
{ "internalType": "bool", "name": "contractCreation", "type": "bool" },
|
||||||
|
{ "internalType": "bytes", "name": "data", "type": "bytes" }
|
||||||
|
],
|
||||||
|
"name": "gasEstimateComponents",
|
||||||
|
"outputs": [
|
||||||
|
{ "internalType": "uint64", "name": "gasEstimate", "type": "uint64" },
|
||||||
|
{ "internalType": "uint64", "name": "gasEstimateForL1", "type": "uint64" },
|
||||||
|
{ "internalType": "uint256", "name": "baseFee", "type": "uint256" },
|
||||||
|
{ "internalType": "uint256", "name": "l1BaseFeeEstimate", "type": "uint256" }
|
||||||
|
],
|
||||||
|
"stateMutability": "payable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{ "internalType": "address", "name": "to", "type": "address" },
|
||||||
|
{ "internalType": "bool", "name": "contractCreation", "type": "bool" },
|
||||||
|
{ "internalType": "bytes", "name": "data", "type": "bytes" }
|
||||||
|
],
|
||||||
|
"name": "gasEstimateL1Component",
|
||||||
|
"outputs": [
|
||||||
|
{ "internalType": "uint64", "name": "gasEstimateForL1", "type": "uint64" },
|
||||||
|
{ "internalType": "uint256", "name": "baseFee", "type": "uint256" },
|
||||||
|
{ "internalType": "uint256", "name": "l1BaseFeeEstimate", "type": "uint256" }
|
||||||
|
],
|
||||||
|
"stateMutability": "payable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [{ "internalType": "bytes32", "name": "blockHash", "type": "bytes32" }],
|
||||||
|
"name": "getL1Confirmations",
|
||||||
|
"outputs": [{ "internalType": "uint64", "name": "confirmations", "type": "uint64" }],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{ "internalType": "uint256", "name": "batchNum", "type": "uint256" },
|
||||||
|
{ "internalType": "uint64", "name": "index", "type": "uint64" }
|
||||||
|
],
|
||||||
|
"name": "legacyLookupMessageBatchProof",
|
||||||
|
"outputs": [
|
||||||
|
{ "internalType": "bytes32[]", "name": "proof", "type": "bytes32[]" },
|
||||||
|
{ "internalType": "uint256", "name": "path", "type": "uint256" },
|
||||||
|
{ "internalType": "address", "name": "l2Sender", "type": "address" },
|
||||||
|
{ "internalType": "address", "name": "l1Dest", "type": "address" },
|
||||||
|
{ "internalType": "uint256", "name": "l2Block", "type": "uint256" },
|
||||||
|
{ "internalType": "uint256", "name": "l1Block", "type": "uint256" },
|
||||||
|
{ "internalType": "uint256", "name": "timestamp", "type": "uint256" },
|
||||||
|
{ "internalType": "uint256", "name": "amount", "type": "uint256" },
|
||||||
|
{ "internalType": "bytes", "name": "calldataForL1", "type": "bytes" }
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "nitroGenesisBlock",
|
||||||
|
"outputs": [{ "internalType": "uint256", "name": "number", "type": "uint256" }],
|
||||||
|
"stateMutability": "pure",
|
||||||
|
"type": "function"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,424 @@
|
|||||||
|
{
|
||||||
|
"abi": [
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract RoleStore",
|
||||||
|
"name": "_roleStore",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract DataStore",
|
||||||
|
"name": "_dataStore",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract EventEmitter",
|
||||||
|
"name": "_eventEmitter",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract ClaimVault",
|
||||||
|
"name": "_claimVault",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "constructor"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "key",
|
||||||
|
"type": "bytes32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "DisabledFeature",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "existingDistributionId",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "DuplicateClaimTerms",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "EmptyAccount",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "EmptyAmount",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "EmptyClaimableAmount",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "EmptyReceiver",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "EmptyToken",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InsufficientFunds",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "recoveredSigner",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "expectedSigner",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InvalidClaimTermsSignature",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "expectedSigner",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InvalidClaimTermsSignatureForContract",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "reason",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InvalidParams",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "msgSender",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "role",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Unauthorized",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "distributionId",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "termsSignature",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct ClaimHandler.ClaimParam[]",
|
||||||
|
"name": "params",
|
||||||
|
"type": "tuple[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "receiver",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "claimFunds",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "claimVault",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract ClaimVault",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "dataStore",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract DataStore",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "distributionId",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "account",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct ClaimHandler.DepositParam[]",
|
||||||
|
"name": "params",
|
||||||
|
"type": "tuple[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "depositFunds",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "eventEmitter",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract EventEmitter",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "account",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256[]",
|
||||||
|
"name": "distributionIds",
|
||||||
|
"type": "uint256[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "getClaimableAmount",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "getTotalClaimableAmount",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "distributionId",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "removeTerms",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "roleStore",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract RoleStore",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "distributionId",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "terms",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "setTerms",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "distributionId",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "fromAccount",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "toAccount",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct ClaimHandler.TransferClaimParam[]",
|
||||||
|
"name": "params",
|
||||||
|
"type": "tuple[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "transferClaim",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "account",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "distributionId",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct ClaimHandler.WithdrawParam[]",
|
||||||
|
"name": "params",
|
||||||
|
"type": "tuple[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "receiver",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "withdrawFunds",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-artifact-1",
|
|
||||||
"contractName": "DataStore",
|
|
||||||
"sourceName": "contracts/data/DataStore.sol",
|
|
||||||
"abi": [
|
"abi": [
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -204,6 +201,30 @@
|
|||||||
"stateMutability": "nonpayable",
|
"stateMutability": "nonpayable",
|
||||||
"type": "function"
|
"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": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -1434,7 +1455,5 @@
|
|||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"linkReferences": {},
|
|
||||||
"deployedLinkReferences": {}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,118 @@
|
|||||||
|
{
|
||||||
|
"abi": [
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "PERMIT_TYPEHASH",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "",
|
||||||
|
"type": "bytes32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "DOMAIN_SEPARATOR",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "",
|
||||||
|
"type": "bytes32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "owner",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "nonces",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "owner",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "spender",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "value",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "deadline",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint8",
|
||||||
|
"name": "v",
|
||||||
|
"type": "uint8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "r",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "s",
|
||||||
|
"type": "bytes32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "permit",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "version",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "name",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-artifact-1",
|
|
||||||
"contractName": "EventEmitter",
|
|
||||||
"sourceName": "contracts/event/EventEmitter.sol",
|
|
||||||
"abi": [
|
"abi": [
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -2059,7 +2056,5 @@
|
|||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"linkReferences": {},
|
|
||||||
"deployedLinkReferences": {}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"address": "0x69C527fC77291722b52649E45c838e41be8Bf5d5",
|
|
||||||
"abi": [
|
"abi": [
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -142,22 +141,6 @@
|
|||||||
"name": "EmptyTokenTranferGasLimit",
|
"name": "EmptyTokenTranferGasLimit",
|
||||||
"type": "error"
|
"type": "error"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "marketsLength",
|
|
||||||
"type": "uint256"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "tokensLength",
|
|
||||||
"type": "uint256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"name": "InvalidClaimAffiliateRewardsInput",
|
|
||||||
"type": "error"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -179,38 +162,6 @@
|
|||||||
"name": "InvalidClaimCollateralInput",
|
"name": "InvalidClaimCollateralInput",
|
||||||
"type": "error"
|
"type": "error"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "marketsLength",
|
|
||||||
"type": "uint256"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "tokensLength",
|
|
||||||
"type": "uint256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"name": "InvalidClaimFundingFeesInput",
|
|
||||||
"type": "error"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "marketsLength",
|
|
||||||
"type": "uint256"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "tokensLength",
|
|
||||||
"type": "uint256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"name": "InvalidClaimUiFeesInput",
|
|
||||||
"type": "error"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -353,6 +304,25 @@
|
|||||||
"name": "Unauthorized",
|
"name": "Unauthorized",
|
||||||
"type": "error"
|
"type": "error"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "reason",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "returndata",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "TokenTransferReverted",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -528,6 +498,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
{
|
{
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
@@ -569,6 +541,11 @@
|
|||||||
"internalType": "address[]",
|
"internalType": "address[]",
|
||||||
"name": "shortTokenSwapPath",
|
"name": "shortTokenSwapPath",
|
||||||
"type": "address[]"
|
"type": "address[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct IDepositUtils.CreateDepositParamsAddresses",
|
||||||
|
"name": "addresses",
|
||||||
|
"type": "tuple"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
@@ -589,9 +566,14 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "callbackGasLimit",
|
"name": "callbackGasLimit",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct DepositUtils.CreateDepositParams",
|
"internalType": "struct IDepositUtils.CreateDepositParams",
|
||||||
"name": "params",
|
"name": "params",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
}
|
}
|
||||||
@@ -729,6 +711,11 @@
|
|||||||
"internalType": "bytes32",
|
"internalType": "bytes32",
|
||||||
"name": "referralCode",
|
"name": "referralCode",
|
||||||
"type": "bytes32"
|
"type": "bytes32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct IBaseOrderUtils.CreateOrderParams",
|
"internalType": "struct IBaseOrderUtils.CreateOrderParams",
|
||||||
@@ -749,6 +736,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
{
|
{
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
@@ -775,6 +764,11 @@
|
|||||||
"internalType": "address",
|
"internalType": "address",
|
||||||
"name": "toMarket",
|
"name": "toMarket",
|
||||||
"type": "address"
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct IShiftUtils.CreateShiftParamsAddresses",
|
||||||
|
"name": "addresses",
|
||||||
|
"type": "tuple"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
@@ -790,9 +784,14 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "callbackGasLimit",
|
"name": "callbackGasLimit",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct ShiftUtils.CreateShiftParams",
|
"internalType": "struct IShiftUtils.CreateShiftParams",
|
||||||
"name": "params",
|
"name": "params",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
}
|
}
|
||||||
@@ -810,6 +809,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
{
|
{
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
@@ -841,6 +842,11 @@
|
|||||||
"internalType": "address[]",
|
"internalType": "address[]",
|
||||||
"name": "shortTokenSwapPath",
|
"name": "shortTokenSwapPath",
|
||||||
"type": "address[]"
|
"type": "address[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct IWithdrawalUtils.CreateWithdrawalParamsAddresses",
|
||||||
|
"name": "addresses",
|
||||||
|
"type": "tuple"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
@@ -866,9 +872,14 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "callbackGasLimit",
|
"name": "callbackGasLimit",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct WithdrawalUtils.CreateWithdrawalParams",
|
"internalType": "struct IWithdrawalUtils.CreateWithdrawalParams",
|
||||||
"name": "params",
|
"name": "params",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
}
|
}
|
||||||
@@ -925,6 +936,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
{
|
{
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
@@ -956,6 +969,11 @@
|
|||||||
"internalType": "address[]",
|
"internalType": "address[]",
|
||||||
"name": "shortTokenSwapPath",
|
"name": "shortTokenSwapPath",
|
||||||
"type": "address[]"
|
"type": "address[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct IWithdrawalUtils.CreateWithdrawalParamsAddresses",
|
||||||
|
"name": "addresses",
|
||||||
|
"type": "tuple"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
@@ -981,9 +999,14 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "callbackGasLimit",
|
"name": "callbackGasLimit",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct WithdrawalUtils.CreateWithdrawalParams",
|
"internalType": "struct IWithdrawalUtils.CreateWithdrawalParams",
|
||||||
"name": "params",
|
"name": "params",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
},
|
},
|
||||||
@@ -1053,7 +1076,7 @@
|
|||||||
],
|
],
|
||||||
"name": "makeExternalCalls",
|
"name": "makeExternalCalls",
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"stateMutability": "nonpayable",
|
"stateMutability": "payable",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1679,123 +1702,5 @@
|
|||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"transactionHash": "0x723bba33993a46238da285f8900a6c411564432b8af409c3dc8d3b1f6d5c7167",
|
|
||||||
"receipt": {
|
|
||||||
"to": null,
|
|
||||||
"from": "0xE7BfFf2aB721264887230037940490351700a068",
|
|
||||||
"contractAddress": "0x69C527fC77291722b52649E45c838e41be8Bf5d5",
|
|
||||||
"transactionIndex": 6,
|
|
||||||
"gasUsed": "6362339",
|
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
"blockHash": "0xd18c90532e420963f4dc93793b032a792fdde7171138710bc41c4088e2aa5d59",
|
|
||||||
"transactionHash": "0x723bba33993a46238da285f8900a6c411564432b8af409c3dc8d3b1f6d5c7167",
|
|
||||||
"logs": [],
|
|
||||||
"blockNumber": 222747030,
|
|
||||||
"cumulativeGasUsed": "6942059",
|
|
||||||
"status": 1,
|
|
||||||
"byzantium": true
|
|
||||||
},
|
|
||||||
"args": [
|
|
||||||
"0x7452c558d45f8afC8c83dAe62C3f8A5BE19c71f6",
|
|
||||||
"0x3c3d99FD298f679DBC2CEcd132b4eC4d0F5e6e72",
|
|
||||||
"0xFD70de6b91282D8017aA4E741e9Ae325CAb992d8",
|
|
||||||
"0xC8ee91A54287DB53897056e12D9819156D3822Fb",
|
|
||||||
"0x321f3739983CC3E911fd67a83d1ee76238894Bd0",
|
|
||||||
"0xA19fA3F0D8E7b7A8963420De504b624167e709B2",
|
|
||||||
"0xEa90EC1228F7D1b3D47D84d1c9D46dBDFEfF7709",
|
|
||||||
"0xB0Fc2a48b873da40e7bc25658e5E6137616AC2Ee",
|
|
||||||
"0x389CEf541397e872dC04421f166B5Bc2E0b374a5"
|
|
||||||
],
|
|
||||||
"numDeployments": 6,
|
|
||||||
"solcInputHash": "292dd15f99d7c1e4e4b27476672071d7",
|
|
||||||
"libraries": {
|
|
||||||
"CallbackUtils": "0x501e34E31f1594ffbd3D0C17634D6de6C6C5c7A3",
|
|
||||||
"DepositStoreUtils": "0x3063A99D2df2A871068D47041eB8d089E5DE1Cdc",
|
|
||||||
"FeeUtils": "0x7Fd8d13A778a22F5c2acB67226A193C7d0b0a336",
|
|
||||||
"MarketEventUtils": "0x1F493E17bcF5390d3e5E49eE0bce17d4d068f90b",
|
|
||||||
"MarketStoreUtils": "0xbbf05cF8e1c6548092A6a02c4c5330E76BF0fE2D",
|
|
||||||
"OrderStoreUtils": "0x67040c411C1b3195361801E9Ad8a91D1Fe9C0BC2",
|
|
||||||
"ReferralUtils": "0x27346Fdab142e2b8B6C6d2ecFe73e75B5e249A57",
|
|
||||||
"ShiftStoreUtils": "0xCfad9CB2a681b63884AEf98af28458692137c9E3",
|
|
||||||
"WithdrawalStoreUtils": "0xD521Cb31B14bB9F70D9a59b47D8763336CAD0395"
|
|
||||||
},
|
|
||||||
"devdoc": {
|
|
||||||
"details": "Router for exchange functions, supports functions which require token transfers from the user IMPORTANT: PayableMulticall uses delegatecall, msg.value will be the same for each delegatecall extra care should be taken when using msg.value in any of the functions in this contract To avoid front-running issues, most actions require two steps to execute: - User sends transaction with request details, e.g. deposit / withdraw liquidity, swap, increase / decrease position - Keepers listen for the transactions, include the prices for the request then send a transaction to execute the request Prices are provided by an off-chain oracle system: - Oracle keepers continually check the latest blocks - When there is a new block, oracle keepers fetch the latest prices from reference exchanges - Oracle keepers then sign the median price for each token together with the block hash - Oracle keepers then send the data and signature to archive nodes - Archive nodes display this information for anyone to query Example: - Block 100 is finalized on the blockchain - Oracle keepers observe this block - Oracle keepers pull the latest prices from reference exchanges, token A: price 20,000, token B: price 80,000 - Oracle keepers sign [chainId, blockhash(100), 20,000], [chainId, blockhash(100), 80,000] - If in block 100, there was a market order to open a long position for token A, the market order would have a block number of 100 - The prices signed at block 100 can be used to execute this order - Order keepers would bundle the signature and price data for token A then execute the order",
|
|
||||||
"kind": "dev",
|
|
||||||
"methods": {
|
|
||||||
"cancelOrder(bytes32)": {
|
|
||||||
"details": "Cancels the given order. The `cancelOrder()` feature must be enabled for the given order type. The caller must be the owner of the order, and the order must not be a market order. The order is cancelled by calling the `cancelOrder()` function in the `OrderUtils` contract. This function also records the starting gas amount and the reason for cancellation, which is passed to the `cancelOrder()` function.",
|
|
||||||
"params": {
|
|
||||||
"key": "The unique ID of the order to be cancelled"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"claimAffiliateRewards(address[],address[],address)": {
|
|
||||||
"details": "Claims affiliate rewards for the given markets and tokens on behalf of the caller, and sends the rewards to the specified receiver. The length of the `markets` and `tokens` arrays must be the same. For each market-token pair, the `claimAffiliateReward()` function in the `ReferralUtils` contract is called to claim the rewards for the caller.",
|
|
||||||
"params": {
|
|
||||||
"markets": "An array of market addresses",
|
|
||||||
"receiver": "The address to which the claimed rewards should be sent",
|
|
||||||
"tokens": "An array of token addresses, corresponding to the given markets"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"claimFundingFees(address[],address[],address)": {
|
|
||||||
"details": "Claims funding fees for the given markets and tokens on behalf of the caller, and sends the fees to the specified receiver. The length of the `markets` and `tokens` arrays must be the same. For each market-token pair, the `claimFundingFees()` function in the `MarketUtils` contract is called to claim the fees for the caller.",
|
|
||||||
"params": {
|
|
||||||
"markets": "An array of market addresses",
|
|
||||||
"receiver": "The address to which the claimed fees should be sent",
|
|
||||||
"tokens": "An array of token addresses, corresponding to the given markets"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"createDeposit((address,address,address,address,address,address,address[],address[],uint256,bool,uint256,uint256))": {
|
|
||||||
"details": "Creates a new deposit with the given long token, short token, long token amount, short token amount, and deposit parameters. The deposit is created by transferring the specified amounts of long and short tokens from the caller's account to the deposit store, and then calling the `createDeposit()` function on the deposit handler contract.",
|
|
||||||
"params": {
|
|
||||||
"params": "The deposit parameters, as specified in the `DepositUtils.CreateDepositParams` struct"
|
|
||||||
},
|
|
||||||
"returns": {
|
|
||||||
"_0": "The unique ID of the newly created deposit"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"createOrder(((address,address,address,address,address,address,address[]),(uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint8,uint8,bool,bool,bool,bytes32))": {
|
|
||||||
"details": "Creates a new order with the given amount, order parameters. The order is created by transferring the specified amount of collateral tokens from the caller's account to the order store, and then calling the `createOrder()` function on the order handler contract. The referral code is also set on the caller's account using the referral storage contract."
|
|
||||||
},
|
|
||||||
"multicall(bytes[])": {
|
|
||||||
"details": "Receives and executes a batch of function calls on this contract."
|
|
||||||
},
|
|
||||||
"updateOrder(bytes32,uint256,uint256,uint256,uint256,bool)": {
|
|
||||||
"details": "Updates the given order with the specified size delta, acceptable price, and trigger price. The `updateOrder()` feature must be enabled for the given order type. The caller must be the owner of the order, and the order must not be a market order. The size delta, trigger price, and acceptable price are updated on the order, and the order is unfrozen. Any additional WNT that is transferred to the contract is added to the order's execution fee. The updated order is then saved in the order store, and an `OrderUpdated` event is emitted.",
|
|
||||||
"params": {
|
|
||||||
"acceptablePrice": "The new acceptable price for the order",
|
|
||||||
"key": "The unique ID of the order to be updated",
|
|
||||||
"sizeDeltaUsd": "The new size delta for the order",
|
|
||||||
"triggerPrice": "The new trigger price for the order"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"title": "ExchangeRouter",
|
|
||||||
"version": 1
|
|
||||||
},
|
|
||||||
"userdoc": {
|
|
||||||
"kind": "user",
|
|
||||||
"methods": {},
|
|
||||||
"version": 1
|
|
||||||
},
|
|
||||||
"storageLayout": {
|
|
||||||
"storage": [
|
|
||||||
{
|
|
||||||
"astId": 115,
|
|
||||||
"contract": "contracts/router/ExchangeRouter.sol:ExchangeRouter",
|
|
||||||
"label": "_status",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "0",
|
|
||||||
"type": "t_uint256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"types": {
|
|
||||||
"t_uint256": {
|
|
||||||
"encoding": "inplace",
|
|
||||||
"label": "uint256",
|
|
||||||
"numberOfBytes": "32"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-artifact-1",
|
|
||||||
"contractName": "GlvReader",
|
|
||||||
"sourceName": "contracts/reader/GlvReader.sol",
|
|
||||||
"abi": [
|
"abi": [
|
||||||
{
|
{
|
||||||
"inputs": [],
|
"inputs": [],
|
||||||
@@ -144,6 +141,11 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "callbackGasLimit",
|
"name": "callbackGasLimit",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct GlvDeposit.Numbers",
|
"internalType": "struct GlvDeposit.Numbers",
|
||||||
@@ -166,6 +168,11 @@
|
|||||||
"internalType": "struct GlvDeposit.Flags",
|
"internalType": "struct GlvDeposit.Flags",
|
||||||
"name": "flags",
|
"name": "flags",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "_dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct GlvDeposit.Props[]",
|
"internalType": "struct GlvDeposit.Props[]",
|
||||||
@@ -281,6 +288,11 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "callbackGasLimit",
|
"name": "callbackGasLimit",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct GlvWithdrawal.Numbers",
|
"internalType": "struct GlvWithdrawal.Numbers",
|
||||||
@@ -298,6 +310,11 @@
|
|||||||
"internalType": "struct GlvWithdrawal.Flags",
|
"internalType": "struct GlvWithdrawal.Flags",
|
||||||
"name": "flags",
|
"name": "flags",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "_dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct GlvWithdrawal.Props[]",
|
"internalType": "struct GlvWithdrawal.Props[]",
|
||||||
@@ -500,6 +517,11 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "callbackGasLimit",
|
"name": "callbackGasLimit",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct GlvDeposit.Numbers",
|
"internalType": "struct GlvDeposit.Numbers",
|
||||||
@@ -522,6 +544,11 @@
|
|||||||
"internalType": "struct GlvDeposit.Flags",
|
"internalType": "struct GlvDeposit.Flags",
|
||||||
"name": "flags",
|
"name": "flags",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "_dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct GlvDeposit.Props",
|
"internalType": "struct GlvDeposit.Props",
|
||||||
@@ -647,6 +674,11 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "callbackGasLimit",
|
"name": "callbackGasLimit",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct GlvDeposit.Numbers",
|
"internalType": "struct GlvDeposit.Numbers",
|
||||||
@@ -669,6 +701,11 @@
|
|||||||
"internalType": "struct GlvDeposit.Flags",
|
"internalType": "struct GlvDeposit.Flags",
|
||||||
"name": "flags",
|
"name": "flags",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "_dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct GlvDeposit.Props[]",
|
"internalType": "struct GlvDeposit.Props[]",
|
||||||
@@ -1210,6 +1247,11 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "callbackGasLimit",
|
"name": "callbackGasLimit",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct GlvWithdrawal.Numbers",
|
"internalType": "struct GlvWithdrawal.Numbers",
|
||||||
@@ -1227,6 +1269,11 @@
|
|||||||
"internalType": "struct GlvWithdrawal.Flags",
|
"internalType": "struct GlvWithdrawal.Flags",
|
||||||
"name": "flags",
|
"name": "flags",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "_dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct GlvWithdrawal.Props",
|
"internalType": "struct GlvWithdrawal.Props",
|
||||||
@@ -1337,6 +1384,11 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "callbackGasLimit",
|
"name": "callbackGasLimit",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct GlvWithdrawal.Numbers",
|
"internalType": "struct GlvWithdrawal.Numbers",
|
||||||
@@ -1354,6 +1406,11 @@
|
|||||||
"internalType": "struct GlvWithdrawal.Flags",
|
"internalType": "struct GlvWithdrawal.Flags",
|
||||||
"name": "flags",
|
"name": "flags",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "_dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct GlvWithdrawal.Props[]",
|
"internalType": "struct GlvWithdrawal.Props[]",
|
||||||
@@ -1411,5 +1468,4 @@
|
|||||||
"type": "function"
|
"type": "function"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-artifact-1",
|
|
||||||
"contractName": "GlvRouter",
|
|
||||||
"sourceName": "contracts/router/GlvRouter.sol",
|
|
||||||
"abi": [
|
"abi": [
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -26,8 +23,13 @@
|
|||||||
"type": "address"
|
"type": "address"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "contract IGlvHandler",
|
"internalType": "contract IGlvDepositHandler",
|
||||||
"name": "_glvHandler",
|
"name": "_glvDepositHandler",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract IGlvWithdrawalHandler",
|
||||||
|
"name": "_glvWithdrawalHandler",
|
||||||
"type": "address"
|
"type": "address"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -118,6 +120,25 @@
|
|||||||
"name": "Unauthorized",
|
"name": "Unauthorized",
|
||||||
"type": "error"
|
"type": "error"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "reason",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "returndata",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "TokenTransferReverted",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -146,6 +167,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
{
|
{
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
@@ -192,6 +215,11 @@
|
|||||||
"internalType": "address[]",
|
"internalType": "address[]",
|
||||||
"name": "shortTokenSwapPath",
|
"name": "shortTokenSwapPath",
|
||||||
"type": "address[]"
|
"type": "address[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct IGlvDepositUtils.CreateGlvDepositParamsAddresses",
|
||||||
|
"name": "addresses",
|
||||||
|
"type": "tuple"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
@@ -217,9 +245,14 @@
|
|||||||
"internalType": "bool",
|
"internalType": "bool",
|
||||||
"name": "isMarketTokenDeposit",
|
"name": "isMarketTokenDeposit",
|
||||||
"type": "bool"
|
"type": "bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct GlvDepositUtils.CreateGlvDepositParams",
|
"internalType": "struct IGlvDepositUtils.CreateGlvDepositParams",
|
||||||
"name": "params",
|
"name": "params",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
}
|
}
|
||||||
@@ -237,6 +270,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
{
|
{
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
@@ -273,6 +308,11 @@
|
|||||||
"internalType": "address[]",
|
"internalType": "address[]",
|
||||||
"name": "shortTokenSwapPath",
|
"name": "shortTokenSwapPath",
|
||||||
"type": "address[]"
|
"type": "address[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct IGlvWithdrawalUtils.CreateGlvWithdrawalParamsAddresses",
|
||||||
|
"name": "addresses",
|
||||||
|
"type": "tuple"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
@@ -298,9 +338,14 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "callbackGasLimit",
|
"name": "callbackGasLimit",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct GlvWithdrawalUtils.CreateGlvWithdrawalParams",
|
"internalType": "struct IGlvWithdrawalUtils.CreateGlvWithdrawalParams",
|
||||||
"name": "params",
|
"name": "params",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
}
|
}
|
||||||
@@ -357,10 +402,23 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"inputs": [],
|
"inputs": [],
|
||||||
"name": "glvHandler",
|
"name": "glvDepositHandler",
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"internalType": "contract IGlvHandler",
|
"internalType": "contract IGlvDepositHandler",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "glvWithdrawalHandler",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract IGlvWithdrawalHandler",
|
||||||
"name": "",
|
"name": "",
|
||||||
"type": "address"
|
"type": "address"
|
||||||
}
|
}
|
||||||
@@ -393,7 +451,7 @@
|
|||||||
],
|
],
|
||||||
"name": "makeExternalCalls",
|
"name": "makeExternalCalls",
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"stateMutability": "nonpayable",
|
"stateMutability": "payable",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -703,5 +761,4 @@
|
|||||||
"type": "receive"
|
"type": "receive"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"address": "0x2A29D3a792000750807cc401806d6fd539928481",
|
|
||||||
"abi": [
|
"abi": [
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -765,357 +764,5 @@
|
|||||||
"stateMutability": "nonpayable",
|
"stateMutability": "nonpayable",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"transactionHash": "0xf41d2b874807c8dea4d0b21d1215669c990495bda5cdfa8ef7bb822e6edf3043",
|
|
||||||
"receipt": {
|
|
||||||
"to": null,
|
|
||||||
"from": "0xE7BfFf2aB721264887230037940490351700a068",
|
|
||||||
"contractAddress": "0x2A29D3a792000750807cc401806d6fd539928481",
|
|
||||||
"transactionIndex": 1,
|
|
||||||
"gasUsed": "15199775",
|
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
"blockHash": "0xc6e67e18e1c484c3ddd3cd5db795adc007a2633bf83bfc7d1c28ee352d90f9f6",
|
|
||||||
"transactionHash": "0xf41d2b874807c8dea4d0b21d1215669c990495bda5cdfa8ef7bb822e6edf3043",
|
|
||||||
"logs": [],
|
|
||||||
"blockNumber": 168596066,
|
|
||||||
"cumulativeGasUsed": "15199775",
|
|
||||||
"status": 1,
|
|
||||||
"byzantium": true
|
|
||||||
},
|
|
||||||
"args": [
|
|
||||||
"0x3c3d99FD298f679DBC2CEcd132b4eC4d0F5e6e72",
|
|
||||||
"GMX DAO",
|
|
||||||
"GMX_DAO",
|
|
||||||
18
|
|
||||||
],
|
|
||||||
"numDeployments": 1,
|
|
||||||
"solcInputHash": "ddb2cd26020caa6335eda5082c5c80ae",
|
|
||||||
"libraries": {},
|
|
||||||
"devdoc": {
|
|
||||||
"events": {
|
|
||||||
"Approval(address,address,uint256)": {
|
|
||||||
"details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance."
|
|
||||||
},
|
|
||||||
"DelegateChanged(address,address,address)": {
|
|
||||||
"details": "Emitted when an account changes their delegate."
|
|
||||||
},
|
|
||||||
"DelegateVotesChanged(address,uint256,uint256)": {
|
|
||||||
"details": "Emitted when a token transfer or delegate change results in changes to a delegate's number of votes."
|
|
||||||
},
|
|
||||||
"EIP712DomainChanged()": {
|
|
||||||
"details": "MAY be emitted to signal that the domain could have changed."
|
|
||||||
},
|
|
||||||
"Transfer(address,address,uint256)": {
|
|
||||||
"details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"kind": "dev",
|
|
||||||
"methods": {
|
|
||||||
"CLOCK_MODE()": {
|
|
||||||
"details": "Description of the clock"
|
|
||||||
},
|
|
||||||
"DOMAIN_SEPARATOR()": {
|
|
||||||
"details": "See {IERC20Permit-DOMAIN_SEPARATOR}."
|
|
||||||
},
|
|
||||||
"allowance(address,address)": {
|
|
||||||
"details": "See {IERC20-allowance}."
|
|
||||||
},
|
|
||||||
"approve(address,uint256)": {
|
|
||||||
"details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address."
|
|
||||||
},
|
|
||||||
"balanceOf(address)": {
|
|
||||||
"details": "See {IERC20-balanceOf}."
|
|
||||||
},
|
|
||||||
"checkpoints(address,uint32)": {
|
|
||||||
"details": "Get the `pos`-th checkpoint for `account`."
|
|
||||||
},
|
|
||||||
"clock()": {
|
|
||||||
"details": "Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting)."
|
|
||||||
},
|
|
||||||
"decimals()": {
|
|
||||||
"details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."
|
|
||||||
},
|
|
||||||
"decreaseAllowance(address,uint256)": {
|
|
||||||
"details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."
|
|
||||||
},
|
|
||||||
"delegate(address)": {
|
|
||||||
"details": "Delegate votes from the sender to `delegatee`."
|
|
||||||
},
|
|
||||||
"delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": {
|
|
||||||
"details": "Delegates votes from signer to `delegatee`"
|
|
||||||
},
|
|
||||||
"delegates(address)": {
|
|
||||||
"details": "Get the address `account` is currently delegating to."
|
|
||||||
},
|
|
||||||
"eip712Domain()": {
|
|
||||||
"details": "See {EIP-5267}. _Available since v4.9._"
|
|
||||||
},
|
|
||||||
"getPastTotalSupply(uint256)": {
|
|
||||||
"details": "Retrieve the `totalSupply` at the end of `timepoint`. Note, this value is the sum of all balances. It is NOT the sum of all the delegated votes! Requirements: - `timepoint` must be in the past"
|
|
||||||
},
|
|
||||||
"getPastVotes(address,uint256)": {
|
|
||||||
"details": "Retrieve the number of votes for `account` at the end of `timepoint`. Requirements: - `timepoint` must be in the past"
|
|
||||||
},
|
|
||||||
"getVotes(address)": {
|
|
||||||
"details": "Gets the current votes balance for `account`"
|
|
||||||
},
|
|
||||||
"increaseAllowance(address,uint256)": {
|
|
||||||
"details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."
|
|
||||||
},
|
|
||||||
"name()": {
|
|
||||||
"details": "Returns the name of the token."
|
|
||||||
},
|
|
||||||
"nonces(address)": {
|
|
||||||
"details": "See {IERC20Permit-nonces}."
|
|
||||||
},
|
|
||||||
"numCheckpoints(address)": {
|
|
||||||
"details": "Get number of checkpoints for `account`."
|
|
||||||
},
|
|
||||||
"permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": {
|
|
||||||
"details": "See {IERC20Permit-permit}."
|
|
||||||
},
|
|
||||||
"symbol()": {
|
|
||||||
"details": "Returns the symbol of the token, usually a shorter version of the name."
|
|
||||||
},
|
|
||||||
"totalSupply()": {
|
|
||||||
"details": "See {IERC20-totalSupply}."
|
|
||||||
},
|
|
||||||
"transfer(address,uint256)": {
|
|
||||||
"details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`."
|
|
||||||
},
|
|
||||||
"transferFrom(address,address,uint256)": {
|
|
||||||
"details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": 1
|
|
||||||
},
|
|
||||||
"userdoc": {
|
|
||||||
"kind": "user",
|
|
||||||
"methods": {},
|
|
||||||
"version": 1
|
|
||||||
},
|
|
||||||
"storageLayout": {
|
|
||||||
"storage": [
|
|
||||||
{
|
|
||||||
"astId": 207,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "_balances",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "0",
|
|
||||||
"type": "t_mapping(t_address,t_uint256)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"astId": 213,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "_allowances",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "1",
|
|
||||||
"type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"astId": 215,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "_totalSupply",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "2",
|
|
||||||
"type": "t_uint256"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"astId": 217,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "_name",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "3",
|
|
||||||
"type": "t_string_storage"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"astId": 219,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "_symbol",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "4",
|
|
||||||
"type": "t_string_storage"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"astId": 3579,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "_nameFallback",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "5",
|
|
||||||
"type": "t_string_storage"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"astId": 3581,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "_versionFallback",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "6",
|
|
||||||
"type": "t_string_storage"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"astId": 879,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "_nonces",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "7",
|
|
||||||
"type": "t_mapping(t_address,t_struct(Counter)2557_storage)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"astId": 887,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "8",
|
|
||||||
"type": "t_bytes32"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"astId": 1054,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "_delegates",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "9",
|
|
||||||
"type": "t_mapping(t_address,t_address)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"astId": 1060,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "_checkpoints",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "10",
|
|
||||||
"type": "t_mapping(t_address,t_array(t_struct(Checkpoint)1045_storage)dyn_storage)"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"astId": 1064,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "_totalSupplyCheckpoints",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "11",
|
|
||||||
"type": "t_array(t_struct(Checkpoint)1045_storage)dyn_storage"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"astId": 27701,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "_decimals",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "12",
|
|
||||||
"type": "t_uint8"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"types": {
|
|
||||||
"t_address": {
|
|
||||||
"encoding": "inplace",
|
|
||||||
"label": "address",
|
|
||||||
"numberOfBytes": "20"
|
|
||||||
},
|
|
||||||
"t_array(t_struct(Checkpoint)1045_storage)dyn_storage": {
|
|
||||||
"base": "t_struct(Checkpoint)1045_storage",
|
|
||||||
"encoding": "dynamic_array",
|
|
||||||
"label": "struct ERC20Votes.Checkpoint[]",
|
|
||||||
"numberOfBytes": "32"
|
|
||||||
},
|
|
||||||
"t_bytes32": {
|
|
||||||
"encoding": "inplace",
|
|
||||||
"label": "bytes32",
|
|
||||||
"numberOfBytes": "32"
|
|
||||||
},
|
|
||||||
"t_mapping(t_address,t_address)": {
|
|
||||||
"encoding": "mapping",
|
|
||||||
"key": "t_address",
|
|
||||||
"label": "mapping(address => address)",
|
|
||||||
"numberOfBytes": "32",
|
|
||||||
"value": "t_address"
|
|
||||||
},
|
|
||||||
"t_mapping(t_address,t_array(t_struct(Checkpoint)1045_storage)dyn_storage)": {
|
|
||||||
"encoding": "mapping",
|
|
||||||
"key": "t_address",
|
|
||||||
"label": "mapping(address => struct ERC20Votes.Checkpoint[])",
|
|
||||||
"numberOfBytes": "32",
|
|
||||||
"value": "t_array(t_struct(Checkpoint)1045_storage)dyn_storage"
|
|
||||||
},
|
|
||||||
"t_mapping(t_address,t_mapping(t_address,t_uint256))": {
|
|
||||||
"encoding": "mapping",
|
|
||||||
"key": "t_address",
|
|
||||||
"label": "mapping(address => mapping(address => uint256))",
|
|
||||||
"numberOfBytes": "32",
|
|
||||||
"value": "t_mapping(t_address,t_uint256)"
|
|
||||||
},
|
|
||||||
"t_mapping(t_address,t_struct(Counter)2557_storage)": {
|
|
||||||
"encoding": "mapping",
|
|
||||||
"key": "t_address",
|
|
||||||
"label": "mapping(address => struct Counters.Counter)",
|
|
||||||
"numberOfBytes": "32",
|
|
||||||
"value": "t_struct(Counter)2557_storage"
|
|
||||||
},
|
|
||||||
"t_mapping(t_address,t_uint256)": {
|
|
||||||
"encoding": "mapping",
|
|
||||||
"key": "t_address",
|
|
||||||
"label": "mapping(address => uint256)",
|
|
||||||
"numberOfBytes": "32",
|
|
||||||
"value": "t_uint256"
|
|
||||||
},
|
|
||||||
"t_string_storage": {
|
|
||||||
"encoding": "bytes",
|
|
||||||
"label": "string",
|
|
||||||
"numberOfBytes": "32"
|
|
||||||
},
|
|
||||||
"t_struct(Checkpoint)1045_storage": {
|
|
||||||
"encoding": "inplace",
|
|
||||||
"label": "struct ERC20Votes.Checkpoint",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"astId": 1042,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "fromBlock",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "0",
|
|
||||||
"type": "t_uint32"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"astId": 1044,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "votes",
|
|
||||||
"offset": 4,
|
|
||||||
"slot": "0",
|
|
||||||
"type": "t_uint224"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"numberOfBytes": "32"
|
|
||||||
},
|
|
||||||
"t_struct(Counter)2557_storage": {
|
|
||||||
"encoding": "inplace",
|
|
||||||
"label": "struct Counters.Counter",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"astId": 2556,
|
|
||||||
"contract": "contracts/gov/GovToken.sol:GovToken",
|
|
||||||
"label": "_value",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "0",
|
|
||||||
"type": "t_uint256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"numberOfBytes": "32"
|
|
||||||
},
|
|
||||||
"t_uint224": {
|
|
||||||
"encoding": "inplace",
|
|
||||||
"label": "uint224",
|
|
||||||
"numberOfBytes": "28"
|
|
||||||
},
|
|
||||||
"t_uint256": {
|
|
||||||
"encoding": "inplace",
|
|
||||||
"label": "uint256",
|
|
||||||
"numberOfBytes": "32"
|
|
||||||
},
|
|
||||||
"t_uint32": {
|
|
||||||
"encoding": "inplace",
|
|
||||||
"label": "uint32",
|
|
||||||
"numberOfBytes": "4"
|
|
||||||
},
|
|
||||||
"t_uint8": {
|
|
||||||
"encoding": "inplace",
|
|
||||||
"label": "uint8",
|
|
||||||
"numberOfBytes": "1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,372 @@
|
|||||||
|
{
|
||||||
|
"abi": [
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract DataStore",
|
||||||
|
"name": "_dataStore",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract RoleStore",
|
||||||
|
"name": "_roleStore",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract EventEmitter",
|
||||||
|
"name": "_eventEmitter",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract MultichainVault",
|
||||||
|
"name": "_multichainVault",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract IMultichainGmRouter",
|
||||||
|
"name": "_multichainGmRouter",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract IMultichainGlvRouter",
|
||||||
|
"name": "_multichainGlvRouter",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract IMultichainOrderRouter",
|
||||||
|
"name": "_multichainOrderRouter",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "constructor"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "EmptyHoldingAddress",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "EmptyReceiver",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "EmptyTokenTranferGasLimit",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "EmptyWithdrawalAmount",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "gas",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "estimatedGasLimit",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InsufficientGasLeft",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InvalidBridgeOutToken",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "eid",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InvalidEid",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "receiver",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "TokenTransferError",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "msgSender",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "role",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Unauthorized",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "reason",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "returndata",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "TokenTransferReverted",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "account",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "minAmountOut",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "provider",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "data",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct IRelayUtils.BridgeOutParams",
|
||||||
|
"name": "params",
|
||||||
|
"type": "tuple"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "bridgeOut",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "dataStore",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract DataStore",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "eventEmitter",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract EventEmitter",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "from",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "message",
|
||||||
|
"type": "bytes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "lzCompose",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "payable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "multichainGlvRouter",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract IMultichainGlvRouter",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "multichainGmRouter",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract IMultichainGmRouter",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "multichainOrderRouter",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract IMultichainOrderRouter",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "multichainVault",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract MultichainVault",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "roleStore",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract RoleStore",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "receiver",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "withdrawTokens",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stateMutability": "payable",
|
||||||
|
"type": "receive"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-artifact-1",
|
|
||||||
"contractName": "Multicall2",
|
|
||||||
"sourceName": "contracts/mock/Multicall2.sol",
|
|
||||||
"abi": [
|
"abi": [
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -18,7 +15,7 @@
|
|||||||
"type": "bytes"
|
"type": "bytes"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Multicall2.Call[]",
|
"internalType": "struct Multicall3.Call[]",
|
||||||
"name": "calls",
|
"name": "calls",
|
||||||
"type": "tuple[]"
|
"type": "tuple[]"
|
||||||
}
|
}
|
||||||
@@ -36,7 +33,108 @@
|
|||||||
"type": "bytes[]"
|
"type": "bytes[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stateMutability": "nonpayable",
|
"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"
|
"type": "function"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -54,7 +152,7 @@
|
|||||||
"type": "bytes"
|
"type": "bytes"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Multicall2.Call[]",
|
"internalType": "struct Multicall3.Call[]",
|
||||||
"name": "calls",
|
"name": "calls",
|
||||||
"type": "tuple[]"
|
"type": "tuple[]"
|
||||||
}
|
}
|
||||||
@@ -84,12 +182,25 @@
|
|||||||
"type": "bytes"
|
"type": "bytes"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Multicall2.Result[]",
|
"internalType": "struct Multicall3.Result[]",
|
||||||
"name": "returnData",
|
"name": "returnData",
|
||||||
"type": "tuple[]"
|
"type": "tuple[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stateMutability": "nonpayable",
|
"stateMutability": "payable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "getBasefee",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "basefee",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -126,12 +237,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"inputs": [],
|
"inputs": [],
|
||||||
"name": "getCurrentBlockCoinbase",
|
"name": "getChainId",
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"internalType": "address",
|
"internalType": "uint256",
|
||||||
"name": "coinbase",
|
"name": "chainid",
|
||||||
"type": "address"
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
@@ -139,12 +250,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"inputs": [],
|
"inputs": [],
|
||||||
"name": "getCurrentBlockDifficulty",
|
"name": "getCurrentBlockCoinbase",
|
||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "address",
|
||||||
"name": "difficulty",
|
"name": "coinbase",
|
||||||
"type": "uint256"
|
"type": "address"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
@@ -195,19 +306,6 @@
|
|||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"inputs": [],
|
|
||||||
"name": "getL1BlockNumber",
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "l1BlockNumber",
|
|
||||||
"type": "uint256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"stateMutability": "view",
|
|
||||||
"type": "function"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"inputs": [],
|
"inputs": [],
|
||||||
"name": "getLastBlockHash",
|
"name": "getLastBlockHash",
|
||||||
@@ -241,7 +339,7 @@
|
|||||||
"type": "bytes"
|
"type": "bytes"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Multicall2.Call[]",
|
"internalType": "struct Multicall3.Call[]",
|
||||||
"name": "calls",
|
"name": "calls",
|
||||||
"type": "tuple[]"
|
"type": "tuple[]"
|
||||||
}
|
}
|
||||||
@@ -261,12 +359,12 @@
|
|||||||
"type": "bytes"
|
"type": "bytes"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Multicall2.Result[]",
|
"internalType": "struct Multicall3.Result[]",
|
||||||
"name": "returnData",
|
"name": "returnData",
|
||||||
"type": "tuple[]"
|
"type": "tuple[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stateMutability": "nonpayable",
|
"stateMutability": "payable",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -289,7 +387,7 @@
|
|||||||
"type": "bytes"
|
"type": "bytes"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Multicall2.Call[]",
|
"internalType": "struct Multicall3.Call[]",
|
||||||
"name": "calls",
|
"name": "calls",
|
||||||
"type": "tuple[]"
|
"type": "tuple[]"
|
||||||
}
|
}
|
||||||
@@ -319,15 +417,13 @@
|
|||||||
"type": "bytes"
|
"type": "bytes"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Multicall2.Result[]",
|
"internalType": "struct Multicall3.Result[]",
|
||||||
"name": "returnData",
|
"name": "returnData",
|
||||||
"type": "tuple[]"
|
"type": "tuple[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"stateMutability": "nonpayable",
|
"stateMutability": "payable",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"linkReferences": {},
|
|
||||||
"deployedLinkReferences": {}
|
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,915 @@
|
|||||||
|
{
|
||||||
|
"abi": [
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "contract Router",
|
||||||
|
"name": "router",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract RoleStore",
|
||||||
|
"name": "roleStore",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract DataStore",
|
||||||
|
"name": "dataStore",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract EventEmitter",
|
||||||
|
"name": "eventEmitter",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract IOracle",
|
||||||
|
"name": "oracle",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract OrderVault",
|
||||||
|
"name": "orderVault",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract IOrderHandler",
|
||||||
|
"name": "orderHandler",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract ISwapHandler",
|
||||||
|
"name": "swapHandler",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract IExternalHandler",
|
||||||
|
"name": "externalHandler",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract MultichainVault",
|
||||||
|
"name": "multichainVault",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct MultichainRouter.BaseConstructorParams",
|
||||||
|
"name": "params",
|
||||||
|
"type": "tuple"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "constructor"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "currentTimestamp",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "deadline",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "DeadlinePassed",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "key",
|
||||||
|
"type": "bytes32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "DisabledFeature",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "EmptyHoldingAddress",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "EmptyReceiver",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "EmptyTokenTranferGasLimit",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "requiredRelayFee",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "availableFeeAmount",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InsufficientRelayFee",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "desChainId",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InvalidDestinationChainId",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "sendTokensLength",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "sendAmountsLength",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InvalidExternalCalls",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "InvalidInitializer",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "provider",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InvalidMultichainProvider",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "spender",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "expectedSpender",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InvalidPermitSpender",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InvalidSrcChainId",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "digest",
|
||||||
|
"type": "bytes32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InvalidUserDigest",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "feeUsd",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "maxFeeUsd",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "MaxRelayFeeSwapForSubaccountExceeded",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "NonEmptyExternalCallsForSubaccountOrder",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "TokenPermitsNotAllowedForMultichain",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "receiver",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "TokenTransferError",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "msgSender",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "role",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Unauthorized",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "feeToken",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "expectedFeeToken",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "UnexpectedRelayFeeToken",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "feeToken",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "expectedFeeToken",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "UnsupportedRelayFeeToken",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "uint8",
|
||||||
|
"name": "version",
|
||||||
|
"type": "uint8"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Initialized",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "reason",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "returndata",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "TokenTransferReverted",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "account",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "bridgeIn",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "payable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address[]",
|
||||||
|
"name": "tokens",
|
||||||
|
"type": "address[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address[]",
|
||||||
|
"name": "providers",
|
||||||
|
"type": "address[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes[]",
|
||||||
|
"name": "data",
|
||||||
|
"type": "bytes[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct OracleUtils.SetPricesParams",
|
||||||
|
"name": "oracleParams",
|
||||||
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address[]",
|
||||||
|
"name": "sendTokens",
|
||||||
|
"type": "address[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256[]",
|
||||||
|
"name": "sendAmounts",
|
||||||
|
"type": "uint256[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address[]",
|
||||||
|
"name": "externalCallTargets",
|
||||||
|
"type": "address[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes[]",
|
||||||
|
"name": "externalCallDataList",
|
||||||
|
"type": "bytes[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address[]",
|
||||||
|
"name": "refundTokens",
|
||||||
|
"type": "address[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address[]",
|
||||||
|
"name": "refundReceivers",
|
||||||
|
"type": "address[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct IRelayUtils.ExternalCalls",
|
||||||
|
"name": "externalCalls",
|
||||||
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "owner",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "spender",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "value",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "deadline",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint8",
|
||||||
|
"name": "v",
|
||||||
|
"type": "uint8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "r",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "s",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct IRelayUtils.TokenPermit[]",
|
||||||
|
"name": "tokenPermits",
|
||||||
|
"type": "tuple[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "feeToken",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "feeAmount",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address[]",
|
||||||
|
"name": "feeSwapPath",
|
||||||
|
"type": "address[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct IRelayUtils.FeeParams",
|
||||||
|
"name": "fee",
|
||||||
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "userNonce",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "deadline",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "signature",
|
||||||
|
"type": "bytes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "desChainId",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct IRelayUtils.RelayParams",
|
||||||
|
"name": "relayParams",
|
||||||
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "account",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "minAmountOut",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "provider",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "data",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct IRelayUtils.BridgeOutParams",
|
||||||
|
"name": "params",
|
||||||
|
"type": "tuple"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "bridgeOut",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "account",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "desChainId",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "deadline",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "minAmountOut",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "provider",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "data",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct IRelayUtils.BridgeOutParams",
|
||||||
|
"name": "params",
|
||||||
|
"type": "tuple"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "bridgeOutFromController",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "dataStore",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract DataStore",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "",
|
||||||
|
"type": "bytes32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "digests",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bool",
|
||||||
|
"name": "",
|
||||||
|
"type": "bool"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "eventEmitter",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract EventEmitter",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "externalHandler",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract IExternalHandler",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "_multichainProvider",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "initialize",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes[]",
|
||||||
|
"name": "data",
|
||||||
|
"type": "bytes[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "multicall",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes[]",
|
||||||
|
"name": "results",
|
||||||
|
"type": "bytes[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "payable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "multichainProvider",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract IMultichainProvider",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "multichainVault",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract MultichainVault",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "oracle",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract IOracle",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "orderHandler",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract IOrderHandler",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "orderVault",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract OrderVault",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "roleStore",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract RoleStore",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "router",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract Router",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "receiver",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "sendNativeToken",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "payable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "receiver",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "sendTokens",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "payable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "receiver",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "sendWnt",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "payable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "swapHandler",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract ISwapHandler",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "minAmountOut",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "provider",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "data",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct IRelayUtils.BridgeOutParams",
|
||||||
|
"name": "params",
|
||||||
|
"type": "tuple"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "transferOut",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,133 @@
|
|||||||
|
{
|
||||||
|
"abi": [
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "account",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "EmptyMultichainTransferInAmount",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "account",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "balance",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InsufficientMultichainBalance",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "endpoint",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InvalidMultichainEndpoint",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "provider",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InvalidMultichainProvider",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract DataStore",
|
||||||
|
"name": "dataStore",
|
||||||
|
"type": "DataStore"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "account",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "getMultichainBalanceAmount",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract DataStore",
|
||||||
|
"name": "dataStore",
|
||||||
|
"type": "DataStore"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "endpoint",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "validateMultichainEndpoint",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract DataStore",
|
||||||
|
"name": "dataStore",
|
||||||
|
"type": "DataStore"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "provider",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "validateMultichainProvider",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,275 @@
|
|||||||
|
{
|
||||||
|
"abi": [
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract RoleStore",
|
||||||
|
"name": "_roleStore",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "contract DataStore",
|
||||||
|
"name": "_dataStore",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "constructor"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "EmptyHoldingAddress",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "EmptyReceiver",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "EmptyTokenTranferGasLimit",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "msgSender",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "InvalidNativeTokenSender",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "receiver",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "SelfTransferNotSupported",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "receiver",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "TokenTransferError",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "msgSender",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "role",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Unauthorized",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "reason",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "returndata",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "TokenTransferReverted",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "dataStore",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract DataStore",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "recordTransferIn",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "roleStore",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract RoleStore",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "syncTokenBalance",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "tokenBalances",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "receiver",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "transferOut",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "receiver",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bool",
|
||||||
|
"name": "shouldUnwrapNativeToken",
|
||||||
|
"type": "bool"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "transferOut",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "receiver",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "amount",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "transferOutNativeToken",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"stateMutability": "payable",
|
||||||
|
"type": "receive"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,8 +1,21 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-artifact-1",
|
|
||||||
"contractName": "ReferralStorage",
|
|
||||||
"sourceName": "contracts/referrals/ReferralStorage.sol",
|
|
||||||
"abi": [
|
"abi": [
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "msgSender",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "role",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Unauthorized",
|
||||||
|
"type": "error"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"anonymous": false,
|
"anonymous": false,
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -66,6 +79,25 @@
|
|||||||
"name": "SetCodeOwner",
|
"name": "SetCodeOwner",
|
||||||
"type": "event"
|
"type": "event"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "prevGov",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "nextGov",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "SetGov",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"anonymous": false,
|
"anonymous": false,
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -180,6 +212,13 @@
|
|||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "acceptOwnership",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -273,6 +312,19 @@
|
|||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"inputs": [],
|
||||||
|
"name": "pendingGov",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -342,19 +394,6 @@
|
|||||||
"stateMutability": "nonpayable",
|
"stateMutability": "nonpayable",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"internalType": "address",
|
|
||||||
"name": "_gov",
|
|
||||||
"type": "address"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"name": "setGov",
|
|
||||||
"outputs": [],
|
|
||||||
"stateMutability": "nonpayable",
|
|
||||||
"type": "function"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -500,8 +539,19 @@
|
|||||||
],
|
],
|
||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "_newGov",
|
||||||
|
"type": "address"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"linkReferences": {},
|
"name": "transferOwnership",
|
||||||
"deployedLinkReferences": {}
|
"outputs": [],
|
||||||
|
"stateMutability": "nonpayable",
|
||||||
|
"type": "function"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,147 @@
|
|||||||
|
{
|
||||||
|
"abi": [
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address[]",
|
||||||
|
"name": "tokens",
|
||||||
|
"type": "address[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address[]",
|
||||||
|
"name": "providers",
|
||||||
|
"type": "address[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes[]",
|
||||||
|
"name": "data",
|
||||||
|
"type": "bytes[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct OracleUtils.SetPricesParams",
|
||||||
|
"name": "oracleParams",
|
||||||
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address[]",
|
||||||
|
"name": "sendTokens",
|
||||||
|
"type": "address[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256[]",
|
||||||
|
"name": "sendAmounts",
|
||||||
|
"type": "uint256[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address[]",
|
||||||
|
"name": "externalCallTargets",
|
||||||
|
"type": "address[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes[]",
|
||||||
|
"name": "externalCallDataList",
|
||||||
|
"type": "bytes[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address[]",
|
||||||
|
"name": "refundTokens",
|
||||||
|
"type": "address[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address[]",
|
||||||
|
"name": "refundReceivers",
|
||||||
|
"type": "address[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct ExternalCalls",
|
||||||
|
"name": "externalCalls",
|
||||||
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "owner",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "spender",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "value",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "deadline",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint8",
|
||||||
|
"name": "v",
|
||||||
|
"type": "uint8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "r",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "s",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "token",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct TokenPermit[]",
|
||||||
|
"name": "tokenPermits",
|
||||||
|
"type": "tuple[]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "feeToken",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "feeAmount",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address[]",
|
||||||
|
"name": "feeSwapPath",
|
||||||
|
"type": "address[]"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct FeeParams",
|
||||||
|
"name": "fee",
|
||||||
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "userNonce",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "deadline",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "desChainId",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"abi": [
|
||||||
|
{
|
||||||
|
"name": "isValidSignature",
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "_hash",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "_signature",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes4",
|
||||||
|
"name": "magicValue",
|
||||||
|
"type": "bytes4"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
1225
src/Managing.Web3Proxy/src/generated/gmxsdk/abis/StBTC.json
Normal file
1225
src/Managing.Web3Proxy/src/generated/gmxsdk/abis/StBTC.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"abi": [
|
||||||
|
{
|
||||||
|
"type": "tuple",
|
||||||
|
"components": [
|
||||||
|
{ "name": "subaccount", "type": "address" },
|
||||||
|
{ "name": "shouldAdd", "type": "bool" },
|
||||||
|
{ "name": "expiresAt", "type": "uint256" },
|
||||||
|
{ "name": "maxAllowedCount", "type": "uint256" },
|
||||||
|
{ "name": "actionType", "type": "bytes32" },
|
||||||
|
{ "name": "nonce", "type": "uint256" },
|
||||||
|
{ "name": "deadline", "type": "uint256" },
|
||||||
|
{ "name": "signature", "type": "bytes" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"address": "0xe5485a4fD6527911e9b82A75A1bFEd6e47BE2241",
|
|
||||||
"abi": [
|
"abi": [
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -85,64 +84,6 @@
|
|||||||
"name": "InvalidNativeTokenSender",
|
"name": "InvalidNativeTokenSender",
|
||||||
"type": "error"
|
"type": "error"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"internalType": "address",
|
|
||||||
"name": "receiver",
|
|
||||||
"type": "address"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "address",
|
|
||||||
"name": "expectedReceiver",
|
|
||||||
"type": "address"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"name": "InvalidReceiverForSubaccountOrder",
|
|
||||||
"type": "error"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"internalType": "address",
|
|
||||||
"name": "account",
|
|
||||||
"type": "address"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "address",
|
|
||||||
"name": "subaccount",
|
|
||||||
"type": "address"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "count",
|
|
||||||
"type": "uint256"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "uint256",
|
|
||||||
"name": "maxCount",
|
|
||||||
"type": "uint256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"name": "MaxSubaccountActionCountExceeded",
|
|
||||||
"type": "error"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"inputs": [
|
|
||||||
{
|
|
||||||
"internalType": "address",
|
|
||||||
"name": "account",
|
|
||||||
"type": "address"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"internalType": "address",
|
|
||||||
"name": "subaccount",
|
|
||||||
"type": "address"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"name": "SubaccountNotAuthorized",
|
|
||||||
"type": "error"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -164,6 +105,25 @@
|
|||||||
"name": "TokenTransferError",
|
"name": "TokenTransferError",
|
||||||
"type": "error"
|
"type": "error"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"anonymous": false,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "reason",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"indexed": false,
|
||||||
|
"internalType": "bytes",
|
||||||
|
"name": "returndata",
|
||||||
|
"type": "bytes"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "TokenTransferReverted",
|
||||||
|
"type": "event"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -317,6 +277,11 @@
|
|||||||
"internalType": "bytes32",
|
"internalType": "bytes32",
|
||||||
"name": "referralCode",
|
"name": "referralCode",
|
||||||
"type": "bytes32"
|
"type": "bytes32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct IBaseOrderUtils.CreateOrderParams",
|
"internalType": "struct IBaseOrderUtils.CreateOrderParams",
|
||||||
@@ -504,6 +469,24 @@
|
|||||||
"stateMutability": "payable",
|
"stateMutability": "payable",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "subaccount",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "integrationId",
|
||||||
|
"type": "bytes32"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "setIntegrationId",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "payable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -545,6 +528,29 @@
|
|||||||
"stateMutability": "payable",
|
"stateMutability": "payable",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "subaccount",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "actionType",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "expiresAt",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "setSubaccountExpiresAt",
|
||||||
|
"outputs": [],
|
||||||
|
"stateMutability": "payable",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -592,67 +598,5 @@
|
|||||||
"stateMutability": "payable",
|
"stateMutability": "payable",
|
||||||
"type": "receive"
|
"type": "receive"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"transactionHash": "0xe5b71c86f938f547820ca3262678fb70c379c15ef02430fbb773ee4d37e86e09",
|
|
||||||
"receipt": {
|
|
||||||
"to": null,
|
|
||||||
"from": "0xE7BfFf2aB721264887230037940490351700a068",
|
|
||||||
"contractAddress": "0xe5485a4fD6527911e9b82A75A1bFEd6e47BE2241",
|
|
||||||
"transactionIndex": 0,
|
|
||||||
"gasUsed": "3707710",
|
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
"blockHash": "0x00c9beda5865106776abea90f56310f05628852d29d91b7c235c44a20123b601",
|
|
||||||
"transactionHash": "0xe5b71c86f938f547820ca3262678fb70c379c15ef02430fbb773ee4d37e86e09",
|
|
||||||
"logs": [],
|
|
||||||
"blockNumber": 46822607,
|
|
||||||
"cumulativeGasUsed": "3707710",
|
|
||||||
"status": 1,
|
|
||||||
"byzantium": true
|
|
||||||
},
|
|
||||||
"args": [
|
|
||||||
"0x820F5FfC5b525cD4d88Cd91aCf2c28F16530Cc68",
|
|
||||||
"0xA44F830B6a2B6fa76657a3B92C1fe74fcB7C6AfD",
|
|
||||||
"0x2F0b22339414ADeD7D5F06f9D604c7fF5b2fe3f6",
|
|
||||||
"0xDb17B211c34240B014ab6d61d4A31FA0C0e20c26",
|
|
||||||
"0x32A0258007a6ea78265a5AE4DBb28f176be4a8EB",
|
|
||||||
"0xD3D60D22d415aD43b7e64b510D86A30f19B1B12C"
|
|
||||||
],
|
|
||||||
"numDeployments": 3,
|
|
||||||
"solcInputHash": "95ed34927f843d6700c121bcc6faf594",
|
|
||||||
"libraries": {
|
|
||||||
"OrderStoreUtils": "0x805a15bf16582eC8d76841062A47dFfEa7903131"
|
|
||||||
},
|
|
||||||
"devdoc": {
|
|
||||||
"kind": "dev",
|
|
||||||
"methods": {
|
|
||||||
"multicall(bytes[])": {
|
|
||||||
"details": "Receives and executes a batch of function calls on this contract."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"version": 1
|
|
||||||
},
|
|
||||||
"userdoc": {
|
|
||||||
"kind": "user",
|
|
||||||
"methods": {},
|
|
||||||
"version": 1
|
|
||||||
},
|
|
||||||
"storageLayout": {
|
|
||||||
"storage": [
|
|
||||||
{
|
|
||||||
"astId": 115,
|
|
||||||
"contract": "contracts/router/SubaccountRouter.sol:SubaccountRouter",
|
|
||||||
"label": "_status",
|
|
||||||
"offset": 0,
|
|
||||||
"slot": "0",
|
|
||||||
"type": "t_uint256"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"types": {
|
|
||||||
"t_uint256": {
|
|
||||||
"encoding": "inplace",
|
|
||||||
"label": "uint256",
|
|
||||||
"numberOfBytes": "32"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"address": "0x23D4Da5C7C6902D4C86d551CaE60d5755820df9E",
|
|
||||||
"abi": [
|
"abi": [
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -26,6 +25,13 @@
|
|||||||
],
|
],
|
||||||
"name": "getAccountOrders",
|
"name": "getAccountOrders",
|
||||||
"outputs": [
|
"outputs": [
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "orderKey",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
@@ -131,6 +137,11 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "validFromTime",
|
"name": "validFromTime",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Order.Numbers",
|
"internalType": "struct Order.Numbers",
|
||||||
@@ -163,9 +174,19 @@
|
|||||||
"internalType": "struct Order.Flags",
|
"internalType": "struct Order.Flags",
|
||||||
"name": "flags",
|
"name": "flags",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "_dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Order.Props[]",
|
"internalType": "struct Order.Props",
|
||||||
|
"name": "order",
|
||||||
|
"type": "tuple"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"internalType": "struct ReaderUtils.OrderInfo[]",
|
||||||
"name": "",
|
"name": "",
|
||||||
"type": "tuple[]"
|
"type": "tuple[]"
|
||||||
}
|
}
|
||||||
@@ -273,6 +294,11 @@
|
|||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "positionKey",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
@@ -314,6 +340,11 @@
|
|||||||
"name": "collateralAmount",
|
"name": "collateralAmount",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int256",
|
||||||
|
"name": "pendingImpactAmount",
|
||||||
|
"type": "int256"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "borrowingFactor",
|
"name": "borrowingFactor",
|
||||||
@@ -641,12 +672,27 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "priceImpactDiffUsd",
|
"name": "executionPrice",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bool",
|
||||||
|
"name": "balanceWasImproved",
|
||||||
|
"type": "bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int256",
|
||||||
|
"name": "proportionalPendingImpactUsd",
|
||||||
|
"type": "int256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int256",
|
||||||
|
"name": "totalImpactUsd",
|
||||||
|
"type": "int256"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "executionPrice",
|
"name": "priceImpactDiffUsd",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -744,6 +790,11 @@
|
|||||||
"name": "collateralAmount",
|
"name": "collateralAmount",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int256",
|
||||||
|
"name": "pendingImpactAmount",
|
||||||
|
"type": "int256"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "borrowingFactor",
|
"name": "borrowingFactor",
|
||||||
@@ -1002,6 +1053,11 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "callbackGasLimit",
|
"name": "callbackGasLimit",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Deposit.Numbers",
|
"internalType": "struct Deposit.Numbers",
|
||||||
@@ -1019,6 +1075,11 @@
|
|||||||
"internalType": "struct Deposit.Flags",
|
"internalType": "struct Deposit.Flags",
|
||||||
"name": "flags",
|
"name": "flags",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "_dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Deposit.Props",
|
"internalType": "struct Deposit.Props",
|
||||||
@@ -1170,6 +1231,8 @@
|
|||||||
"name": "marketKey",
|
"name": "marketKey",
|
||||||
"type": "address"
|
"type": "address"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"components": [
|
||||||
{
|
{
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
@@ -1187,6 +1250,45 @@
|
|||||||
"name": "indexTokenPrice",
|
"name": "indexTokenPrice",
|
||||||
"type": "tuple"
|
"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",
|
"internalType": "uint256",
|
||||||
"name": "positionSizeInUsd",
|
"name": "positionSizeInUsd",
|
||||||
@@ -1202,6 +1304,11 @@
|
|||||||
"name": "sizeDeltaUsd",
|
"name": "sizeDeltaUsd",
|
||||||
"type": "int256"
|
"type": "int256"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int256",
|
||||||
|
"name": "pendingImpactAmount",
|
||||||
|
"type": "int256"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"internalType": "bool",
|
"internalType": "bool",
|
||||||
"name": "isLong",
|
"name": "isLong",
|
||||||
@@ -1219,12 +1326,27 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "priceImpactDiffUsd",
|
"name": "executionPrice",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bool",
|
||||||
|
"name": "balanceWasImproved",
|
||||||
|
"type": "bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int256",
|
||||||
|
"name": "proportionalPendingImpactUsd",
|
||||||
|
"type": "int256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int256",
|
||||||
|
"name": "totalImpactUsd",
|
||||||
|
"type": "int256"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "executionPrice",
|
"name": "priceImpactDiffUsd",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -2174,6 +2296,11 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "impactPoolAmount",
|
"name": "impactPoolAmount",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "lentImpactPoolAmount",
|
||||||
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct MarketPoolValueInfo.Props",
|
"internalType": "struct MarketPoolValueInfo.Props",
|
||||||
@@ -2496,6 +2623,11 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "validFromTime",
|
"name": "validFromTime",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Order.Numbers",
|
"internalType": "struct Order.Numbers",
|
||||||
@@ -2528,6 +2660,11 @@
|
|||||||
"internalType": "struct Order.Flags",
|
"internalType": "struct Order.Flags",
|
||||||
"name": "flags",
|
"name": "flags",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "_dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Order.Props",
|
"internalType": "struct Order.Props",
|
||||||
@@ -2538,6 +2675,35 @@
|
|||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "contract DataStore",
|
||||||
|
"name": "dataStore",
|
||||||
|
"type": "address"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "address",
|
||||||
|
"name": "market",
|
||||||
|
"type": "address"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "getPendingPositionImpactPoolDistributionAmount",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "",
|
||||||
|
"type": "uint256"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"stateMutability": "view",
|
||||||
|
"type": "function"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
{
|
{
|
||||||
@@ -2759,6 +2925,11 @@
|
|||||||
"name": "collateralAmount",
|
"name": "collateralAmount",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int256",
|
||||||
|
"name": "pendingImpactAmount",
|
||||||
|
"type": "int256"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "borrowingFactor",
|
"name": "borrowingFactor",
|
||||||
@@ -2910,6 +3081,11 @@
|
|||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "positionKey",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
@@ -2951,6 +3127,11 @@
|
|||||||
"name": "collateralAmount",
|
"name": "collateralAmount",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int256",
|
||||||
|
"name": "pendingImpactAmount",
|
||||||
|
"type": "int256"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "borrowingFactor",
|
"name": "borrowingFactor",
|
||||||
@@ -3278,12 +3459,27 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "priceImpactDiffUsd",
|
"name": "executionPrice",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bool",
|
||||||
|
"name": "balanceWasImproved",
|
||||||
|
"type": "bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int256",
|
||||||
|
"name": "proportionalPendingImpactUsd",
|
||||||
|
"type": "int256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int256",
|
||||||
|
"name": "totalImpactUsd",
|
||||||
|
"type": "int256"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "executionPrice",
|
"name": "priceImpactDiffUsd",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -3400,6 +3596,11 @@
|
|||||||
"outputs": [
|
"outputs": [
|
||||||
{
|
{
|
||||||
"components": [
|
"components": [
|
||||||
|
{
|
||||||
|
"internalType": "bytes32",
|
||||||
|
"name": "positionKey",
|
||||||
|
"type": "bytes32"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
@@ -3441,6 +3642,11 @@
|
|||||||
"name": "collateralAmount",
|
"name": "collateralAmount",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int256",
|
||||||
|
"name": "pendingImpactAmount",
|
||||||
|
"type": "int256"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "borrowingFactor",
|
"name": "borrowingFactor",
|
||||||
@@ -3768,12 +3974,27 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "priceImpactDiffUsd",
|
"name": "executionPrice",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bool",
|
||||||
|
"name": "balanceWasImproved",
|
||||||
|
"type": "bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int256",
|
||||||
|
"name": "proportionalPendingImpactUsd",
|
||||||
|
"type": "int256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "int256",
|
||||||
|
"name": "totalImpactUsd",
|
||||||
|
"type": "int256"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "executionPrice",
|
"name": "priceImpactDiffUsd",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -4009,11 +4230,21 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "callbackGasLimit",
|
"name": "callbackGasLimit",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Shift.Numbers",
|
"internalType": "struct Shift.Numbers",
|
||||||
"name": "numbers",
|
"name": "numbers",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "_dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Shift.Props",
|
"internalType": "struct Shift.Props",
|
||||||
@@ -4358,6 +4589,11 @@
|
|||||||
"internalType": "uint256",
|
"internalType": "uint256",
|
||||||
"name": "callbackGasLimit",
|
"name": "callbackGasLimit",
|
||||||
"type": "uint256"
|
"type": "uint256"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "srcChainId",
|
||||||
|
"type": "uint256"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Withdrawal.Numbers",
|
"internalType": "struct Withdrawal.Numbers",
|
||||||
@@ -4375,6 +4611,11 @@
|
|||||||
"internalType": "struct Withdrawal.Flags",
|
"internalType": "struct Withdrawal.Flags",
|
||||||
"name": "flags",
|
"name": "flags",
|
||||||
"type": "tuple"
|
"type": "tuple"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bytes32[]",
|
||||||
|
"name": "_dataList",
|
||||||
|
"type": "bytes32[]"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"internalType": "struct Withdrawal.Props",
|
"internalType": "struct Withdrawal.Props",
|
||||||
@@ -4615,6 +4856,11 @@
|
|||||||
"internalType": "bool",
|
"internalType": "bool",
|
||||||
"name": "shouldValidateMinCollateralUsd",
|
"name": "shouldValidateMinCollateralUsd",
|
||||||
"type": "bool"
|
"type": "bool"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"internalType": "bool",
|
||||||
|
"name": "forLiquidation",
|
||||||
|
"type": "bool"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"name": "isPositionLiquidatable",
|
"name": "isPositionLiquidatable",
|
||||||
@@ -4655,52 +4901,5 @@
|
|||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"transactionHash": "0xb058c26493408e1ec30b17ac5872c1c322a9d4243e75d434099d15a9e4ccea76",
|
|
||||||
"receipt": {
|
|
||||||
"to": null,
|
|
||||||
"from": "0xE7BfFf2aB721264887230037940490351700a068",
|
|
||||||
"contractAddress": "0x23D4Da5C7C6902D4C86d551CaE60d5755820df9E",
|
|
||||||
"transactionIndex": 5,
|
|
||||||
"gasUsed": "5375288",
|
|
||||||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
||||||
"blockHash": "0xec6a71487f45632fdf9f6c8e7c2f3efe0c7d4093f90f28a8468bd2b7b23c3395",
|
|
||||||
"transactionHash": "0xb058c26493408e1ec30b17ac5872c1c322a9d4243e75d434099d15a9e4ccea76",
|
|
||||||
"logs": [],
|
|
||||||
"blockNumber": 252698175,
|
|
||||||
"cumulativeGasUsed": "5964774",
|
|
||||||
"status": 1,
|
|
||||||
"byzantium": true
|
|
||||||
},
|
|
||||||
"args": [],
|
|
||||||
"numDeployments": 10,
|
|
||||||
"solcInputHash": "be316035eac2019d87590bce566bb2c5",
|
|
||||||
"libraries": {
|
|
||||||
"DepositStoreUtils": "0x5E4A532E53359b0BeAa21e41ccC9B35042e8051C",
|
|
||||||
"MarketStoreUtils": "0xDEBC0b5DADF3F88d9f00B0d8545B61e67eF3aBEa",
|
|
||||||
"MarketUtils": "0xB6426e70E7efc43aEf14a1D963A4F740c2356467",
|
|
||||||
"PositionStoreUtils": "0x3a4F71855554552f024E936E673eDb6E5C25535C",
|
|
||||||
"PositionUtils": "0xA3D091e23FEc66D843D3Fc8a83F1C8996d32f6a4",
|
|
||||||
"ReaderDepositUtils": "0x6023f1452C85aA2f5C77f6814651d3ED2FD19654",
|
|
||||||
"ReaderPositionUtils": "0xa7Bb93C5361BD6fe66408dCc0a9d98a25a1b2d88",
|
|
||||||
"ReaderPricingUtils": "0x4eA13E6926bF984B4c8853A8fbc9AbC149A0b445",
|
|
||||||
"ReaderUtils": "0x0597FB70fF1b3081c9B27a9eFFD1407DF1B4035f",
|
|
||||||
"ReaderWithdrawalUtils": "0xa0452ae9b77d384b45816A086Bd474104fAD32a4",
|
|
||||||
"ShiftStoreUtils": "0xb30a8d551Bd51fC1493DA195289665cBcDB6EB98",
|
|
||||||
"WithdrawalStoreUtils": "0xB57Cb5eafCd367D0C4D7ecd04d170e48A6145138"
|
|
||||||
},
|
|
||||||
"devdoc": {
|
|
||||||
"kind": "dev",
|
|
||||||
"methods": {},
|
|
||||||
"version": 1
|
|
||||||
},
|
|
||||||
"userdoc": {
|
|
||||||
"kind": "user",
|
|
||||||
"methods": {},
|
|
||||||
"version": 1
|
|
||||||
},
|
|
||||||
"storageLayout": {
|
|
||||||
"storage": [],
|
|
||||||
"types": null
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
{
|
{
|
||||||
"_format": "hh-sol-artifact-1",
|
|
||||||
"contractName": "Router",
|
|
||||||
"sourceName": "contracts/router/Router.sol",
|
|
||||||
"abi": [
|
"abi": [
|
||||||
{
|
{
|
||||||
"inputs": [
|
"inputs": [
|
||||||
@@ -71,7 +68,5 @@
|
|||||||
"stateMutability": "view",
|
"stateMutability": "view",
|
||||||
"type": "function"
|
"type": "function"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"linkReferences": {},
|
|
||||||
"deployedLinkReferences": {}
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
import fs from "fs";
|
||||||
|
import path from "path";
|
||||||
|
import {describe, expect, it} from "vitest";
|
||||||
|
|
||||||
|
function isEmptyValue(value: any): boolean {
|
||||||
|
if (
|
||||||
|
!value ||
|
||||||
|
(Array.isArray(value) && value.length === 0) ||
|
||||||
|
(typeof value === "object" && Object.keys(value).length === 0)
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
describe("ABI files validation", () => {
|
||||||
|
const abiDir = path.join(__dirname, "..");
|
||||||
|
const abiFiles = fs.readdirSync(abiDir).filter((file) => file.endsWith(".json"));
|
||||||
|
|
||||||
|
it.each(abiFiles)("validates %s doesn't contain metadata or bytecode", (fileName) => {
|
||||||
|
const filePath = path.join(abiDir, fileName);
|
||||||
|
const fileContent = JSON.parse(fs.readFileSync(filePath, "utf-8"));
|
||||||
|
|
||||||
|
const abiContent = Array.isArray(fileContent) ? fileContent : fileContent.abi;
|
||||||
|
|
||||||
|
expect(abiContent).toBeDefined();
|
||||||
|
expect(Array.isArray(abiContent)).toBe(true);
|
||||||
|
|
||||||
|
const unnecessaryFields = [
|
||||||
|
"metadata",
|
||||||
|
"bytecode",
|
||||||
|
"deployedBytecode",
|
||||||
|
"sourceMap",
|
||||||
|
"deployedSourceMap",
|
||||||
|
"source",
|
||||||
|
"ast",
|
||||||
|
"schemaVersion",
|
||||||
|
"updatedAt",
|
||||||
|
];
|
||||||
|
|
||||||
|
const foundFields = unnecessaryFields.filter((field) => !isEmptyValue(fileContent[field]));
|
||||||
|
|
||||||
|
expect(foundFields).toHaveLength(0);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -1,64 +1,96 @@
|
|||||||
import type { JsonFragment } from "ethers";
|
import {Abi, erc20Abi} from "viem";
|
||||||
import { Abi, erc20Abi } from "viem";
|
|
||||||
|
|
||||||
import CustomErrors from "./CustomErrors.json" with { type: "json" };
|
import ArbitrumNodeInterface from "./ArbitrumNodeInterface.json";
|
||||||
import DataStore from "./DataStore.json" with { type: "json" };
|
import ClaimHandler from "./ClaimHandler.json";
|
||||||
import ERC721 from "./ERC721.json" with { type: "json" };
|
import CustomErrors from "./CustomErrors.json";
|
||||||
import EventEmitter from "./EventEmitter.json" with { type: "json" };
|
import DataStore from "./DataStore.json";
|
||||||
import ExchangeRouter from "./ExchangeRouter.json" with { type: "json" };
|
import ERC20PermitInterface from "./ERC20PermitInterface.json";
|
||||||
import GlpManager from "./GlpManager.json" with { type: "json" };
|
import ERC721 from "./ERC721.json";
|
||||||
import GlvReader from "./GlvReader.json" with { type: "json" };
|
import EventEmitter from "./EventEmitter.json";
|
||||||
import GlvRouter from "./GlvRouter.json" with { type: "json" };
|
import ExchangeRouter from "./ExchangeRouter.json";
|
||||||
import GMT from "./GMT.json" with { type: "json" };
|
import GelatoRelayRouter from "./GelatoRelayRouter.json";
|
||||||
import GmxMigrator from "./GmxMigrator.json" with { type: "json" };
|
import GlpManager from "./GlpManager.json";
|
||||||
import GovToken from "./GovToken.json" with { type: "json" };
|
import GlvReader from "./GlvReader.json";
|
||||||
import MintableBaseToken from "./MintableBaseToken.json" with { type: "json" };
|
import GlvRouter from "./GlvRouter.json";
|
||||||
import Multicall from "./Multicall.json" with { type: "json" };
|
import GMT from "./GMT.json";
|
||||||
import OrderBook from "./OrderBook.json" with { type: "json" };
|
import GmxMigrator from "./GmxMigrator.json";
|
||||||
import OrderBookReader from "./OrderBookReader.json" with { type: "json" };
|
import GovToken from "./GovToken.json";
|
||||||
import OrderExecutor from "./OrderExecutor.json" with { type: "json" };
|
import LayerZeroProvider from "./LayerZeroProvider.json";
|
||||||
import PositionManager from "./PositionManager.json" with { type: "json" };
|
import MintableBaseToken from "./MintableBaseToken.json";
|
||||||
import PositionRouter from "./PositionRouter.json" with { type: "json" };
|
import Multicall from "./Multicall.json";
|
||||||
import Reader from "./Reader.json" with { type: "json" };
|
import MultichainClaimsRouter from "./MultichainClaimsRouter.json";
|
||||||
import ReaderV2 from "./ReaderV2.json" with { type: "json" };
|
import MultichainGlvRouter from "./MultichainGlvRouter.json";
|
||||||
import ReferralStorage from "./ReferralStorage.json" with { type: "json" };
|
import MultichainGmRouter from "./MultichainGmRouter.json";
|
||||||
import RewardReader from "./RewardReader.json" with { type: "json" };
|
import MultichainOrderRouter from "./MultichainOrderRouter.json";
|
||||||
import RewardRouter from "./RewardRouter.json" with { type: "json" };
|
import MultichainSubaccountRouter from "./MultichainSubaccountRouter.json";
|
||||||
import RewardTracker from "./RewardTracker.json" with { type: "json" };
|
import MultichainTransferRouter from "./MultichainTransferRouter.json";
|
||||||
import RouterV2 from "./Router-v2.json" with { type: "json" };
|
import MultichainUtils from "./MultichainUtils.json";
|
||||||
import Router from "./Router.json" with { type: "json" };
|
import MultichainVault from "./MultichainVault.json";
|
||||||
import SubaccountRouter from "./SubaccountRouter.json" with { type: "json" };
|
import OrderBook from "./OrderBook.json";
|
||||||
import SyntheticsReader from "./SyntheticsReader.json" with { type: "json" };
|
import OrderBookReader from "./OrderBookReader.json";
|
||||||
import SyntheticsRouter from "./SyntheticsRouter.json" with { type: "json" };
|
import OrderExecutor from "./OrderExecutor.json";
|
||||||
import Timelock from "./Timelock.json" with { type: "json" };
|
import PositionManager from "./PositionManager.json";
|
||||||
import Token from "./Token.json" with { type: "json" };
|
import PositionRouter from "./PositionRouter.json";
|
||||||
import Treasury from "./Treasury.json" with { type: "json" };
|
import Reader from "./Reader.json";
|
||||||
import UniPool from "./UniPool.json" with { type: "json" };
|
import ReaderV2 from "./ReaderV2.json";
|
||||||
import UniswapV2 from "./UniswapV2.json" with { type: "json" };
|
import ReferralStorage from "./ReferralStorage.json";
|
||||||
import Vault from "./Vault.json" with { type: "json" };
|
import RelayParams from "./RelayParams.json";
|
||||||
import VaultReader from "./VaultReader.json" with { type: "json" };
|
import RewardReader from "./RewardReader.json";
|
||||||
import VaultV2 from "./VaultV2.json" with { type: "json" };
|
import RewardRouter from "./RewardRouter.json";
|
||||||
import VaultV2b from "./VaultV2b.json" with { type: "json" };
|
import RewardTracker from "./RewardTracker.json";
|
||||||
import Vester from "./Vester.json" with { type: "json" };
|
import RouterV2 from "./Router-v2.json";
|
||||||
import WETH from "./WETH.json" with { type: "json" };
|
import Router from "./Router.json";
|
||||||
import YieldFarm from "./YieldFarm.json" with { type: "json" };
|
import SmartAccount from "./SmartAccount.json";
|
||||||
import YieldToken from "./YieldToken.json" with { type: "json" };
|
import StBTC from "./StBTC.json";
|
||||||
|
import SubaccountGelatoRelayRouter from "./SubaccountGelatoRelayRouter.json";
|
||||||
|
import SubaccountRouter from "./SubaccountRouter.json";
|
||||||
|
import SyntheticsReader from "./SyntheticsReader.json";
|
||||||
|
import SyntheticsRouter from "./SyntheticsRouter.json";
|
||||||
|
import Timelock from "./Timelock.json";
|
||||||
|
import Token from "./Token.json";
|
||||||
|
import Treasury from "./Treasury.json";
|
||||||
|
import UniPool from "./UniPool.json";
|
||||||
|
import UniswapV2 from "./UniswapV2.json";
|
||||||
|
import Vault from "./Vault.json";
|
||||||
|
import VaultReader from "./VaultReader.json";
|
||||||
|
import VaultV2 from "./VaultV2.json";
|
||||||
|
import VaultV2b from "./VaultV2b.json";
|
||||||
|
import Vester from "./Vester.json";
|
||||||
|
import WETH from "./WETH.json";
|
||||||
|
import YieldFarm from "./YieldFarm.json";
|
||||||
|
import YieldToken from "./YieldToken.json";
|
||||||
|
|
||||||
export type AbiId =
|
export type AbiId =
|
||||||
|
| "AbstractSubaccountApprovalNonceable"
|
||||||
|
| "ArbitrumNodeInterface"
|
||||||
|
| "ClaimHandler"
|
||||||
| "CustomErrors"
|
| "CustomErrors"
|
||||||
| "DataStore"
|
| "DataStore"
|
||||||
| "ERC721"
|
|
||||||
| "ERC20"
|
| "ERC20"
|
||||||
|
| "ERC20PermitInterface"
|
||||||
|
| "ERC20PermitInterface"
|
||||||
|
| "ERC721"
|
||||||
| "EventEmitter"
|
| "EventEmitter"
|
||||||
| "ExchangeRouter"
|
| "ExchangeRouter"
|
||||||
|
| "GelatoRelayRouter"
|
||||||
|
| "GelatoRelayRouter"
|
||||||
| "GlpManager"
|
| "GlpManager"
|
||||||
| "GlvReader"
|
| "GlvReader"
|
||||||
| "GlvRouter"
|
| "GlvRouter"
|
||||||
| "GMT"
|
| "GMT"
|
||||||
| "GmxMigrator"
|
| "GmxMigrator"
|
||||||
| "GovToken"
|
| "GovToken"
|
||||||
|
| "LayerZeroProvider"
|
||||||
| "MintableBaseToken"
|
| "MintableBaseToken"
|
||||||
| "Multicall"
|
| "Multicall"
|
||||||
|
| "MultichainClaimsRouter"
|
||||||
|
| "MultichainGlvRouter"
|
||||||
|
| "MultichainGmRouter"
|
||||||
|
| "MultichainOrderRouter"
|
||||||
|
| "MultichainSubaccountRouter"
|
||||||
|
| "MultichainTransferRouter"
|
||||||
|
| "MultichainUtils"
|
||||||
|
| "MultichainVault"
|
||||||
| "OrderBook"
|
| "OrderBook"
|
||||||
| "OrderBookReader"
|
| "OrderBookReader"
|
||||||
| "OrderExecutor"
|
| "OrderExecutor"
|
||||||
@@ -67,11 +99,16 @@ export type AbiId =
|
|||||||
| "Reader"
|
| "Reader"
|
||||||
| "ReaderV2"
|
| "ReaderV2"
|
||||||
| "ReferralStorage"
|
| "ReferralStorage"
|
||||||
|
| "RelayParams"
|
||||||
| "RewardReader"
|
| "RewardReader"
|
||||||
| "RewardRouter"
|
| "RewardRouter"
|
||||||
| "RewardTracker"
|
| "RewardTracker"
|
||||||
| "Router-v2"
|
|
||||||
| "Router"
|
| "Router"
|
||||||
|
| "RouterV2"
|
||||||
|
| "SmartAccount"
|
||||||
|
| "StBTC"
|
||||||
|
| "SubaccountGelatoRelayRouter"
|
||||||
|
| "SubaccountGelatoRelayRouter"
|
||||||
| "SubaccountRouter"
|
| "SubaccountRouter"
|
||||||
| "SyntheticsReader"
|
| "SyntheticsReader"
|
||||||
| "SyntheticsRouter"
|
| "SyntheticsRouter"
|
||||||
@@ -89,21 +126,78 @@ export type AbiId =
|
|||||||
| "YieldFarm"
|
| "YieldFarm"
|
||||||
| "YieldToken";
|
| "YieldToken";
|
||||||
|
|
||||||
|
/** Copied from ethers to enable compatibility with GMX UI */
|
||||||
|
interface JsonFragmentType {
|
||||||
|
readonly name?: string;
|
||||||
|
readonly indexed?: boolean;
|
||||||
|
readonly type?: string;
|
||||||
|
readonly internalType?: string;
|
||||||
|
readonly components?: ReadonlyArray<JsonFragmentType>;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface JsonFragment {
|
||||||
|
readonly name?: string;
|
||||||
|
readonly type?: string;
|
||||||
|
readonly anonymous?: boolean;
|
||||||
|
readonly payable?: boolean;
|
||||||
|
readonly constant?: boolean;
|
||||||
|
readonly stateMutability?: string;
|
||||||
|
readonly inputs?: ReadonlyArray<JsonFragmentType>;
|
||||||
|
readonly outputs?: ReadonlyArray<JsonFragmentType>;
|
||||||
|
readonly gas?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const AbstractSubaccountApprovalNonceable = [
|
||||||
|
{
|
||||||
|
inputs: [
|
||||||
|
{
|
||||||
|
internalType: "address",
|
||||||
|
name: "",
|
||||||
|
type: "address",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
name: "subaccountApprovalNonces",
|
||||||
|
outputs: [
|
||||||
|
{
|
||||||
|
internalType: "uint256",
|
||||||
|
name: "",
|
||||||
|
type: "uint256",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
stateMutability: "view",
|
||||||
|
type: "function",
|
||||||
|
},
|
||||||
|
] as const;
|
||||||
|
|
||||||
export const abis: Record<AbiId, readonly (Abi[number] & JsonFragment)[]> = {
|
export const abis: Record<AbiId, readonly (Abi[number] & JsonFragment)[]> = {
|
||||||
|
AbstractSubaccountApprovalNonceable,
|
||||||
|
ArbitrumNodeInterface: ArbitrumNodeInterface.abi,
|
||||||
|
ClaimHandler: ClaimHandler.abi,
|
||||||
CustomErrors: CustomErrors.abi,
|
CustomErrors: CustomErrors.abi,
|
||||||
DataStore: DataStore.abi,
|
DataStore: DataStore.abi,
|
||||||
ERC721: ERC721.abi,
|
|
||||||
ERC20: erc20Abi,
|
ERC20: erc20Abi,
|
||||||
|
ERC20PermitInterface: ERC20PermitInterface.abi,
|
||||||
|
ERC721: ERC721.abi,
|
||||||
EventEmitter: EventEmitter.abi,
|
EventEmitter: EventEmitter.abi,
|
||||||
ExchangeRouter: ExchangeRouter.abi,
|
ExchangeRouter: ExchangeRouter.abi,
|
||||||
|
GelatoRelayRouter: GelatoRelayRouter.abi,
|
||||||
GlpManager: GlpManager.abi,
|
GlpManager: GlpManager.abi,
|
||||||
GlvReader: GlvReader.abi,
|
GlvReader: GlvReader.abi,
|
||||||
GlvRouter: GlvRouter.abi,
|
GlvRouter: GlvRouter.abi,
|
||||||
GMT: GMT.abi,
|
GMT: GMT.abi,
|
||||||
GmxMigrator: GmxMigrator.abi,
|
GmxMigrator: GmxMigrator.abi,
|
||||||
GovToken: GovToken.abi,
|
GovToken: GovToken.abi,
|
||||||
|
LayerZeroProvider: LayerZeroProvider.abi,
|
||||||
MintableBaseToken: MintableBaseToken.abi,
|
MintableBaseToken: MintableBaseToken.abi,
|
||||||
Multicall: Multicall.abi,
|
Multicall: Multicall.abi,
|
||||||
|
MultichainClaimsRouter: MultichainClaimsRouter.abi,
|
||||||
|
MultichainGlvRouter: MultichainGlvRouter.abi,
|
||||||
|
MultichainGmRouter: MultichainGmRouter.abi,
|
||||||
|
MultichainOrderRouter: MultichainOrderRouter.abi,
|
||||||
|
MultichainSubaccountRouter: MultichainSubaccountRouter.abi,
|
||||||
|
MultichainTransferRouter: MultichainTransferRouter.abi,
|
||||||
|
MultichainUtils: MultichainUtils.abi,
|
||||||
|
MultichainVault: MultichainVault.abi,
|
||||||
OrderBook: OrderBook.abi,
|
OrderBook: OrderBook.abi,
|
||||||
OrderBookReader: OrderBookReader.abi,
|
OrderBookReader: OrderBookReader.abi,
|
||||||
OrderExecutor: OrderExecutor.abi,
|
OrderExecutor: OrderExecutor.abi,
|
||||||
@@ -112,11 +206,15 @@ export const abis: Record<AbiId, readonly (Abi[number] & JsonFragment)[]> = {
|
|||||||
Reader: Reader.abi,
|
Reader: Reader.abi,
|
||||||
ReaderV2: ReaderV2.abi,
|
ReaderV2: ReaderV2.abi,
|
||||||
ReferralStorage: ReferralStorage.abi,
|
ReferralStorage: ReferralStorage.abi,
|
||||||
|
RelayParams: RelayParams.abi,
|
||||||
RewardReader: RewardReader.abi,
|
RewardReader: RewardReader.abi,
|
||||||
RewardRouter: RewardRouter.abi,
|
RewardRouter: RewardRouter.abi,
|
||||||
RewardTracker: RewardTracker.abi,
|
RewardTracker: RewardTracker.abi,
|
||||||
RouterV2: RouterV2.abi,
|
|
||||||
Router: Router.abi,
|
Router: Router.abi,
|
||||||
|
RouterV2: RouterV2.abi,
|
||||||
|
SmartAccount: SmartAccount.abi,
|
||||||
|
StBTC: StBTC.abi,
|
||||||
|
SubaccountGelatoRelayRouter: SubaccountGelatoRelayRouter.abi,
|
||||||
SubaccountRouter: SubaccountRouter.abi,
|
SubaccountRouter: SubaccountRouter.abi,
|
||||||
SyntheticsReader: SyntheticsReader.abi,
|
SyntheticsReader: SyntheticsReader.abi,
|
||||||
SyntheticsRouter: SyntheticsRouter.abi,
|
SyntheticsRouter: SyntheticsRouter.abi,
|
||||||
@@ -133,4 +231,4 @@ export const abis: Record<AbiId, readonly (Abi[number] & JsonFragment)[]> = {
|
|||||||
WETH: WETH.abi,
|
WETH: WETH.abi,
|
||||||
YieldFarm: YieldFarm.abi,
|
YieldFarm: YieldFarm.abi,
|
||||||
YieldToken: YieldToken.abi,
|
YieldToken: YieldToken.abi,
|
||||||
} as any;
|
} satisfies Record<AbiId, any> as any;
|
||||||
|
|||||||
@@ -50,13 +50,13 @@ export const CONTRACTS = {
|
|||||||
// Synthetics
|
// Synthetics
|
||||||
DataStore: "0xFD70de6b91282D8017aA4E741e9Ae325CAb992d8",
|
DataStore: "0xFD70de6b91282D8017aA4E741e9Ae325CAb992d8",
|
||||||
EventEmitter: "0xC8ee91A54287DB53897056e12D9819156D3822Fb",
|
EventEmitter: "0xC8ee91A54287DB53897056e12D9819156D3822Fb",
|
||||||
SubaccountRouter: "0xa329221a77BE08485f59310b873b14815c82E10D",
|
SubaccountRouter: "0x5b9A353F18d543B9F8a57B2AE50a4FBc80033EC1",
|
||||||
ExchangeRouter: "0x602b805EedddBbD9ddff44A7dcBD46cb07849685",
|
ExchangeRouter: "0x87d66368cD08a7Ca42252f5ab44B2fb6d1Fb8d15",
|
||||||
DepositVault: "0xF89e77e8Dc11691C9e8757e84aaFbCD8A67d7A55",
|
DepositVault: "0xF89e77e8Dc11691C9e8757e84aaFbCD8A67d7A55",
|
||||||
WithdrawalVault: "0x0628D46b5D145f183AdB6Ef1f2c97eD1C4701C55",
|
WithdrawalVault: "0x0628D46b5D145f183AdB6Ef1f2c97eD1C4701C55",
|
||||||
OrderVault: "0x31eF83a530Fde1B38EE9A18093A333D8Bbbc40D5",
|
OrderVault: "0x31eF83a530Fde1B38EE9A18093A333D8Bbbc40D5",
|
||||||
ShiftVault: "0xfe99609C4AA83ff6816b64563Bdffd7fa68753Ab",
|
ShiftVault: "0xfe99609C4AA83ff6816b64563Bdffd7fa68753Ab",
|
||||||
SyntheticsReader: "0xcF2845Ab3866842A6b51Fb6a551b92dF58333574",
|
SyntheticsReader: "0x65A6CC451BAfF7e7B4FDAb4157763aB4b6b44D0E",
|
||||||
SyntheticsRouter: "0x7452c558d45f8afC8c83dAe62C3f8A5BE19c71f6",
|
SyntheticsRouter: "0x7452c558d45f8afC8c83dAe62C3f8A5BE19c71f6",
|
||||||
|
|
||||||
GlvReader: "0x6a9505D0B44cFA863d9281EA5B0b34cB36243b45",
|
GlvReader: "0x6a9505D0B44cFA863d9281EA5B0b34cB36243b45",
|
||||||
|
|||||||
@@ -449,6 +449,7 @@ export async function swap(sdk: GmxSdk, params: SwapParams) {
|
|||||||
wrappedToAddress,
|
wrappedToAddress,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
const estimator = createSwapEstimator(marketsInfoData);
|
const estimator = createSwapEstimator(marketsInfoData);
|
||||||
|
|
||||||
const findSwapPath = createFindSwapPath({
|
const findSwapPath = createFindSwapPath({
|
||||||
@@ -464,6 +465,7 @@ export async function swap(sdk: GmxSdk, params: SwapParams) {
|
|||||||
fromToken && toToken && (getIsWrap(fromToken, toToken) || getIsUnwrap(fromToken, toToken))
|
fromToken && toToken && (getIsWrap(fromToken, toToken) || getIsUnwrap(fromToken, toToken))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
const swapOptimizationOrder: Parameters<FindSwapPath>[1]["order"] = isLimit ? ["length", "liquidity"] : undefined;
|
const swapOptimizationOrder: Parameters<FindSwapPath>[1]["order"] = isLimit ? ["length", "liquidity"] : undefined;
|
||||||
|
|
||||||
let swapAmounts: SwapAmounts | undefined;
|
let swapAmounts: SwapAmounts | undefined;
|
||||||
|
|||||||
@@ -397,10 +397,15 @@ export class Orders extends Module {
|
|||||||
throw new Error("Swap data is not defined");
|
throw new Error("Swap data is not defined");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Validate that swapPathStats has a valid swapPath array
|
||||||
|
if (!swapAmounts.swapPathStats.swapPath || !Array.isArray(swapAmounts.swapPathStats.swapPath)) {
|
||||||
|
throw new Error("Invalid swap path: swapPath is not a valid array");
|
||||||
|
}
|
||||||
|
|
||||||
return createSwapOrderTxn(this.sdk, {
|
return createSwapOrderTxn(this.sdk, {
|
||||||
fromTokenAddress: fromToken.address,
|
fromTokenAddress: fromToken.address,
|
||||||
fromTokenAmount: swapAmounts.amountIn,
|
fromTokenAmount: swapAmounts.amountIn,
|
||||||
swapPath: swapAmounts.swapPathStats?.swapPath,
|
swapPath: swapAmounts.swapPathStats.swapPath,
|
||||||
toTokenAddress: toToken.address,
|
toTokenAddress: toToken.address,
|
||||||
orderType,
|
orderType,
|
||||||
minOutputAmount: swapAmounts.minOutputAmount,
|
minOutputAmount: swapAmounts.minOutputAmount,
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ async function getParams(sdk: GmxSdk, p: SwapOrderParams) {
|
|||||||
|
|
||||||
const initialCollateralDeltaAmount = p.fromTokenAmount;
|
const initialCollateralDeltaAmount = p.fromTokenAmount;
|
||||||
|
|
||||||
|
|
||||||
const createOrderParams = {
|
const createOrderParams = {
|
||||||
addresses: {
|
addresses: {
|
||||||
receiver: sdk.config.account,
|
receiver: sdk.config.account,
|
||||||
@@ -77,7 +78,7 @@ async function getParams(sdk: GmxSdk, p: SwapOrderParams) {
|
|||||||
callbackContract: zeroAddress,
|
callbackContract: zeroAddress,
|
||||||
market: zeroAddress,
|
market: zeroAddress,
|
||||||
swapPath: p.swapPath,
|
swapPath: p.swapPath,
|
||||||
uiFeeReceiver: zeroAddress,
|
uiFeeReceiver: sdk.config.settings?.uiFeeReceiverAccount || zeroAddress,
|
||||||
},
|
},
|
||||||
numbers: {
|
numbers: {
|
||||||
sizeDeltaUsd: 0n,
|
sizeDeltaUsd: 0n,
|
||||||
@@ -95,6 +96,7 @@ async function getParams(sdk: GmxSdk, p: SwapOrderParams) {
|
|||||||
isLong: false,
|
isLong: false,
|
||||||
shouldUnwrapNativeToken: isNativeReceive,
|
shouldUnwrapNativeToken: isNativeReceive,
|
||||||
referralCode: p.referralCode || zeroHash,
|
referralCode: p.referralCode || zeroHash,
|
||||||
|
dataList: [], // Add the missing dataList field as an empty array
|
||||||
};
|
};
|
||||||
|
|
||||||
const multicall = [
|
const multicall = [
|
||||||
@@ -110,13 +112,15 @@ async function getParams(sdk: GmxSdk, p: SwapOrderParams) {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
return {
|
const encodedPayload = multicall
|
||||||
minOutputAmount,
|
|
||||||
totalWntAmount,
|
|
||||||
encodedPayload: multicall
|
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.map((call) =>
|
.map((call) =>
|
||||||
encodeFunctionData({ abi: abis.ExchangeRouter as Abi, functionName: call!.method, args: call!.params as any })
|
encodeFunctionData({ abi: abis.ExchangeRouter as Abi, functionName: call!.method, args: call!.params as any })
|
||||||
),
|
);
|
||||||
|
|
||||||
|
return {
|
||||||
|
minOutputAmount,
|
||||||
|
totalWntAmount,
|
||||||
|
encodedPayload,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,13 @@
|
|||||||
import { SwapRoute } from "../../types/trade.js";
|
import type {FindSwapPath, SwapAmounts} from "../../types/trade.js";
|
||||||
|
import {SwapRoute} from "../../types/trade.js";
|
||||||
|
import type {TokenData, TokensRatio} from "../../types/tokens.js";
|
||||||
|
|
||||||
import type { SwapAmounts } from "../../types/trade.js";
|
import {BASIS_POINTS_DIVISOR_BIGINT} from "../../configs/factors.js";
|
||||||
import type { FindSwapPath } from "../../types/trade.js";
|
|
||||||
import type { TokenData } from "../../types/tokens.js";
|
|
||||||
import type { TokensRatio } from "../../types/tokens.js";
|
|
||||||
|
|
||||||
import { BASIS_POINTS_DIVISOR_BIGINT } from "../../configs/factors.js";
|
import {applyFactor} from "../numbers.js";
|
||||||
|
import {bigMath} from "../bigmath.js";
|
||||||
import { applyFactor } from "../numbers.js";
|
import {convertToTokenAmount, convertToUsd, getAmountByRatio, getIsEquivalentTokens} from "../tokens.js";
|
||||||
import { bigMath } from "../bigmath.js";
|
import {getTotalSwapVolumeFromSwapStats} from "../fees/index.js";
|
||||||
import { convertToUsd, getIsEquivalentTokens, convertToTokenAmount, getAmountByRatio } from "../tokens.js";
|
|
||||||
import { getTotalSwapVolumeFromSwapStats } from "../fees/index.js";
|
|
||||||
|
|
||||||
export function getSwapAmountsByFromValue(p: {
|
export function getSwapAmountsByFromValue(p: {
|
||||||
tokenIn: TokenData;
|
tokenIn: TokenData;
|
||||||
@@ -78,11 +75,17 @@ export function getSwapAmountsByFromValue(p: {
|
|||||||
|
|
||||||
const swapPathStats = findSwapPath(defaultAmounts.usdIn, { order: swapOptimizationOrder });
|
const swapPathStats = findSwapPath(defaultAmounts.usdIn, { order: swapOptimizationOrder });
|
||||||
|
|
||||||
|
console.log("🔍 Swap Path Stats Debug:");
|
||||||
|
console.log(" - swapPathStats found:", !!swapPathStats);
|
||||||
|
console.log(" - swapPathStats.swapPath:", swapPathStats?.swapPath);
|
||||||
|
console.log(" - usdIn:", defaultAmounts.usdIn.toString());
|
||||||
|
|
||||||
const totalSwapVolume = getTotalSwapVolumeFromSwapStats(swapPathStats?.swapSteps);
|
const totalSwapVolume = getTotalSwapVolumeFromSwapStats(swapPathStats?.swapSteps);
|
||||||
const swapUiFeeUsd = applyFactor(totalSwapVolume, uiFeeFactor);
|
const swapUiFeeUsd = applyFactor(totalSwapVolume, uiFeeFactor);
|
||||||
const swapUiFeeAmount = convertToTokenAmount(swapUiFeeUsd, tokenOut.decimals, priceOut)!;
|
const swapUiFeeAmount = convertToTokenAmount(swapUiFeeUsd, tokenOut.decimals, priceOut)!;
|
||||||
|
|
||||||
if (!swapPathStats) {
|
if (!swapPathStats) {
|
||||||
|
console.log("❌ No swap path found, returning default amounts");
|
||||||
return defaultAmounts;
|
return defaultAmounts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1828,7 +1828,6 @@ export const swapGmxTokensImpl = async (
|
|||||||
toTokenAddress: toTokenData.address,
|
toTokenAddress: toTokenData.address,
|
||||||
allowedSlippageBps: allowedSlippageBps,
|
allowedSlippageBps: allowedSlippageBps,
|
||||||
referralCodeForTxn: encodeReferralCode("kaigen_ai"),
|
referralCodeForTxn: encodeReferralCode("kaigen_ai"),
|
||||||
triggerPrice: triggerPrice, // Only defined for limit orders
|
|
||||||
skipSimulation: true,
|
skipSimulation: true,
|
||||||
} as SwapParams;
|
} as SwapParams;
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +1,21 @@
|
|||||||
import {before, describe, it} from 'node:test'
|
import {describe, it} from 'node:test'
|
||||||
import assert from 'node:assert'
|
import assert from 'node:assert'
|
||||||
import {getClientForAddress, swapGmxTokensImpl} from '../../src/plugins/custom/gmx.js'
|
import {getClientForAddress, swapGmxTokensImpl} from '../../src/plugins/custom/gmx.js'
|
||||||
import {Ticker} from '../../src/generated/ManagingApiTypes'
|
import {Ticker} from '../../src/generated/ManagingApiTypes'
|
||||||
|
|
||||||
describe('swap tokens implementation', () => {
|
describe('swap tokens implementation', () => {
|
||||||
let sdk: any
|
|
||||||
|
|
||||||
before(async () => {
|
|
||||||
// Initialize the SDK with a test account
|
|
||||||
const testAccount = '0xbba4eaa534cbd0ecaed5e2fd6036aec2e7ee309f'
|
|
||||||
sdk = await getClientForAddress(testAccount)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('should swap USDC to ETH successfully', async () => {
|
it('should swap USDC to ETH successfully', async () => {
|
||||||
try {
|
try {
|
||||||
|
const testAccount = '0x0AF60B5C1c349744Ef8fa8c4ed78Ee1A0d392Fe9'
|
||||||
|
const sdk = await getClientForAddress(testAccount)
|
||||||
|
|
||||||
|
console.log('Account', sdk.account)
|
||||||
const result = await swapGmxTokensImpl(
|
const result = await swapGmxTokensImpl(
|
||||||
sdk,
|
sdk,
|
||||||
Ticker.BTC, // fromTicker
|
Ticker.SOL, // fromTicker
|
||||||
Ticker.USDC, // toTicker
|
Ticker.USDC, // toTicker
|
||||||
0.000056 // amount
|
0.001 // amount
|
||||||
)
|
)
|
||||||
|
|
||||||
assert.strictEqual(typeof result, 'string')
|
assert.strictEqual(typeof result, 'string')
|
||||||
|
|||||||
Reference in New Issue
Block a user