Verified contractExactGPL-3.0-or-later
WeightedPool
Address0xdaba3d8ccf79ef289a7e2dbce51871b39ea445a2
- Balance
0 ETH
- Transactions
92
- Compiler
solc 0.8.26
- Same code
27 more contracts
Details
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Language
- solidity
- Optimization
- No
- EVM version
- cancun
- Via IR
- yes
- License
- GPL-3.0-or-later
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 22,761,339
- Creation transaction
- 0x64537cd133…2082d14625
Read29
- DOMAIN_SEPARATOR() → (bytes32)
- PERMIT_TYPEHASH() → (bytes32)
- allowance(address,address) → (uint256)
- balanceOf(address) → (uint256)
- computeBalance(uint256[],uint256,uint256) → (uint256)
- computeInvariant(uint256[],uint8) → (uint256)
- decimals() → (uint8)
- eip712Domain() → (bytes1,string,string,uint256,address,bytes32,uint256[])
- getAggregateFeePercentages() → (uint256,uint256)
- getCurrentLiveBalances() → (uint256[])
- getMaximumInvariantRatio() → (uint256)
- getMaximumSwapFeePercentage() → (uint256)
- getMinimumInvariantRatio() → (uint256)
- getMinimumSwapFeePercentage() → (uint256)
- getNormalizedWeights() → (uint256[])
- getRate() → (uint256)
- getStaticSwapFeePercentage() → (uint256)
- getTokenInfo() → (address[],tuple[],uint256[],uint256[])
- getTokens() → (address[])
- getVault() → (address)
- getWeightedPoolDynamicData() → (tuple)
- getWeightedPoolImmutableData() → (tuple)
- name() → (string)
- nonces(address) → (uint256)
- onSwap(tuple) → (uint256)
- supportsInterface(bytes4) → (bool)
- symbol() → (string)
- totalSupply() → (uint256)
- version() → (string)
Write7
- approve(address,uint256) → (bool)
- emitApproval(address,address,uint256)
- emitTransfer(address,address,uint256)
- incrementNonce()
- permit(address,address,uint256,uint256,uint8,bytes32,bytes32)
- transfer(address,uint256) → (bool)
- transferFrom(address,address,uint256) → (bool)
Events3
- Approval(address,address,uint256)
- EIP712DomainChanged()
- Transfer(address,address,uint256)
Errors22
- BaseOutOfBounds()
- ECDSAInvalidSignature()
- ECDSAInvalidSignatureLength(uint256)
- ECDSAInvalidSignatureS(bytes32)
- ERC2612ExpiredSignature(uint256)
- ERC2612InvalidSigner(address,address)
- ExponentOutOfBounds()
- InputLengthMismatch()
- InvalidAccountNonce(address,uint256)
- InvalidExponent()
- InvalidShortString()
- InvalidToken()
- MaxInRatio()
- MaxOutRatio()
- MinWeight()
- NormalizedWeightInvariant()
- ProductOutOfBounds()
- SenderIsNotVault(address)
- StringTooLong(string)
- WeightedPoolBptRateUnsupported()
- ZeroDivision()
- ZeroInvariant()
ABI as JSON
[
{
"type": "constructor",
"inputs": [
{
"name": "params",
"type": "tuple",
"components": [
{
"name": "name",
"type": "string",
"internalType": "string"
},
{
"name": "symbol",
"type": "string",
"internalType": "string"
},
{
"name": "numTokens",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "normalizedWeights",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "version",
"type": "string",
"internalType": "string"
}
],
"internalType": "struct WeightedPool.NewPoolParams"
},
{
"name": "vault",
"type": "address",
"internalType": "contract IVault"
}
],
"stateMutability": "nonpayable"
},
{
"name": "BaseOutOfBounds",
"type": "error",
"inputs": []
},
{
"name": "ECDSAInvalidSignature",
"type": "error",
"inputs": []
},
{
"name": "ECDSAInvalidSignatureLength",
"type": "error",
"inputs": [
{
"name": "length",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"name": "ECDSAInvalidSignatureS",
"type": "error",
"inputs": [
{
"name": "s",
"type": "bytes32",
"internalType": "bytes32"
}
]
},
{
"name": "ERC2612ExpiredSignature",
"type": "error",
"inputs": [
{
"name": "deadline",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"name": "ERC2612InvalidSigner",
"type": "error",
"inputs": [
{
"name": "signer",
"type": "address",
"internalType": "address"
},
{
"name": "owner",
"type": "address",
"internalType": "address"
}
]
},
{
"name": "ExponentOutOfBounds",
"type": "error",
"inputs": []
},
{
"name": "InputLengthMismatch",
"type": "error",
"inputs": []
},
{
"name": "InvalidAccountNonce",
"type": "error",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
},
{
"name": "currentNonce",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"name": "InvalidExponent",
"type": "error",
"inputs": []
},
{
"name": "InvalidShortString",
"type": "error",
"inputs": []
},
{
"name": "InvalidToken",
"type": "error",
"inputs": []
},
{
"name": "MaxInRatio",
"type": "error",
"inputs": []
},
{
"name": "MaxOutRatio",
"type": "error",
"inputs": []
},
{
"name": "MinWeight",
"type": "error",
"inputs": []
},
{
"name": "NormalizedWeightInvariant",
"type": "error",
"inputs": []
},
{
"name": "ProductOutOfBounds",
"type": "error",
"inputs": []
},
{
"name": "SenderIsNotVault",
"type": "error",
"inputs": [
{
"name": "sender",
"type": "address",
"internalType": "address"
}
]
},
{
"name": "StringTooLong",
"type": "error",
"inputs": [
{
"name": "str",
"type": "string",
"internalType": "string"
}
]
},
{
"name": "WeightedPoolBptRateUnsupported",
"type": "error",
"inputs": []
},
{
"name": "ZeroDivision",
"type": "error",
"inputs": []
},
{
"name": "ZeroInvariant",
"type": "error",
"inputs": []
},
{
"name": "Approval",
"type": "event",
"inputs": [
{
"name": "owner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "spender",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "value",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "EIP712DomainChanged",
"type": "event",
"inputs": [],
"anonymous": false
},
{
"name": "Transfer",
"type": "event",
"inputs": [
{
"name": "from",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "to",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "value",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "DOMAIN_SEPARATOR",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"name": "PERMIT_TYPEHASH",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"name": "allowance",
"type": "function",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
},
{
"name": "spender",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "approve",
"type": "function",
"inputs": [
{
"name": "spender",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"name": "balanceOf",
"type": "function",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "computeBalance",
"type": "function",
"inputs": [
{
"name": "balancesLiveScaled18",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "tokenInIndex",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "invariantRatio",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "newBalance",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "computeInvariant",
"type": "function",
"inputs": [
{
"name": "balancesLiveScaled18",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "rounding",
"type": "uint8",
"internalType": "enum Rounding"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "decimals",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint8",
"internalType": "uint8"
}
],
"stateMutability": "pure"
},
{
"name": "eip712Domain",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "fields",
"type": "bytes1",
"internalType": "bytes1"
},
{
"name": "name",
"type": "string",
"internalType": "string"
},
{
"name": "version",
"type": "string",
"internalType": "string"
},
{
"name": "chainId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "verifyingContract",
"type": "address",
"internalType": "address"
},
{
"name": "salt",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "extensions",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"stateMutability": "view"
},
{
"name": "emitApproval",
"type": "function",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
},
{
"name": "spender",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "emitTransfer",
"type": "function",
"inputs": [
{
"name": "from",
"type": "address",
"internalType": "address"
},
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "getAggregateFeePercentages",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "aggregateSwapFeePercentage",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "aggregateYieldFeePercentage",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "getCurrentLiveBalances",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "balancesLiveScaled18",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"stateMutability": "view"
},
{
"name": "getMaximumInvariantRatio",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "pure"
},
{
"name": "getMaximumSwapFeePercentage",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "pure"
},
{
"name": "getMinimumInvariantRatio",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "pure"
},
{
"name": "getMinimumSwapFeePercentage",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "pure"
},
{
"name": "getNormalizedWeights",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"stateMutability": "view"
},
{
"name": "getRate",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "pure"
},
{
"name": "getStaticSwapFeePercentage",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "getTokenInfo",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "tokens",
"type": "address[]",
"internalType": "contract IERC20[]"
},
{
"name": "tokenInfo",
"type": "tuple[]",
"components": [
{
"name": "tokenType",
"type": "uint8",
"internalType": "enum TokenType"
},
{
"name": "rateProvider",
"type": "address",
"internalType": "contract IRateProvider"
},
{
"name": "paysYieldFees",
"type": "bool",
"internalType": "bool"
}
],
"internalType": "struct TokenInfo[]"
},
{
"name": "balancesRaw",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "lastBalancesLiveScaled18",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"stateMutability": "view"
},
{
"name": "getTokens",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "tokens",
"type": "address[]",
"internalType": "contract IERC20[]"
}
],
"stateMutability": "view"
},
{
"name": "getVault",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IVault"
}
],
"stateMutability": "view"
},
{
"name": "getWeightedPoolDynamicData",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "data",
"type": "tuple",
"components": [
{
"name": "balancesLiveScaled18",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "tokenRates",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "staticSwapFeePercentage",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "totalSupply",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "isPoolInitialized",
"type": "bool",
"internalType": "bool"
},
{
"name": "isPoolPaused",
"type": "bool",
"internalType": "bool"
},
{
"name": "isPoolInRecoveryMode",
"type": "bool",
"internalType": "bool"
}
],
"internalType": "struct WeightedPoolDynamicData"
}
],
"stateMutability": "view"
},
{
"name": "getWeightedPoolImmutableData",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "data",
"type": "tuple",
"components": [
{
"name": "tokens",
"type": "address[]",
"internalType": "contract IERC20[]"
},
{
"name": "decimalScalingFactors",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "normalizedWeights",
"type": "uint256[]",
"internalType": "uint256[]"
}
],
"internalType": "struct WeightedPoolImmutableData"
}
],
"stateMutability": "view"
},
{
"name": "incrementNonce",
"type": "function",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "name",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"name": "nonces",
"type": "function",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "onSwap",
"type": "function",
"inputs": [
{
"name": "request",
"type": "tuple",
"components": [
{
"name": "kind",
"type": "uint8",
"internalType": "enum SwapKind"
},
{
"name": "amountGivenScaled18",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "balancesScaled18",
"type": "uint256[]",
"internalType": "uint256[]"
},
{
"name": "indexIn",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "indexOut",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "router",
"type": "address",
"internalType": "address"
},
{
"name": "userData",
"type": "bytes",
"internalType": "bytes"
}
],
"internalType": "struct PoolSwapParams"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "permit",
"type": "function",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
},
{
"name": "spender",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "deadline",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "v",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "r",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "s",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "supportsInterface",
"type": "function",
"inputs": [
{
"name": "interfaceId",
"type": "bytes4",
"internalType": "bytes4"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"name": "symbol",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"name": "totalSupply",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "transfer",
"type": "function",
"inputs": [
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"name": "transferFrom",
"type": "function",
"inputs": [
{
"name": "from",
"type": "address",
"internalType": "address"
},
{
"name": "to",
"type": "address",
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "nonpayable"
},
{
"name": "version",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
}
]Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.