This commit is contained in:
mihaisc 2021-11-24 16:00:24 +02:00
parent 30c1be31e0
commit 64cdaf8993
5 changed files with 3036 additions and 1508 deletions

View File

@ -1,314 +1,314 @@
{ {
"_format": "hh-sol-artifact-1", "_format": "hh-sol-artifact-1",
"contractName": "BMath", "contractName": "BMath",
"sourceName": "contracts/pools/balancer/BMath.sol", "sourceName": "contracts/pools/balancer/BMath.sol",
"abi": [ "abi": [
{ {
"anonymous": false, "anonymous": false,
"inputs": [ "inputs": [
{ {
"indexed": false, "indexed": false,
"internalType": "uint256", "internalType": "uint256",
"name": "swapFeeAmount", "name": "swapFeeAmount",
"type": "uint256" "type": "uint256"
}, },
{ {
"indexed": false, "indexed": false,
"internalType": "uint256", "internalType": "uint256",
"name": "oceanFeeAmount", "name": "oceanFeeAmount",
"type": "uint256" "type": "uint256"
}, },
{ {
"indexed": false, "indexed": false,
"internalType": "uint256", "internalType": "uint256",
"name": "marketFeeAmount", "name": "marketFeeAmount",
"type": "uint256" "type": "uint256"
}, },
{ {
"indexed": false, "indexed": false,
"internalType": "address", "internalType": "address",
"name": "tokenFees", "name": "tokenFees",
"type": "address" "type": "address"
} }
], ],
"name": "SWAP_FEES", "name": "SWAP_FEES",
"type": "event" "type": "event"
}, },
{ {
"inputs": [], "inputs": [],
"name": "BONE", "name": "BONE",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "BPOW_PRECISION", "name": "BPOW_PRECISION",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "EXIT_FEE", "name": "EXIT_FEE",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "INIT_POOL_SUPPLY", "name": "INIT_POOL_SUPPLY",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "MAX_BOUND_TOKENS", "name": "MAX_BOUND_TOKENS",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "MAX_BPOW_BASE", "name": "MAX_BPOW_BASE",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "MAX_FEE", "name": "MAX_FEE",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "MAX_IN_RATIO", "name": "MAX_IN_RATIO",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "MAX_OUT_RATIO", "name": "MAX_OUT_RATIO",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "MAX_TOTAL_WEIGHT", "name": "MAX_TOTAL_WEIGHT",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "MAX_WEIGHT", "name": "MAX_WEIGHT",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "MIN_BALANCE", "name": "MIN_BALANCE",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "MIN_BOUND_TOKENS", "name": "MIN_BOUND_TOKENS",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "MIN_BPOW_BASE", "name": "MIN_BPOW_BASE",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "MIN_FEE", "name": "MIN_FEE",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "MIN_WEIGHT", "name": "MIN_WEIGHT",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "_swapMarketFee", "name": "_swapMarketFee",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [ "inputs": [
{ {
"internalType": "address", "internalType": "address",
"name": "", "name": "",
"type": "address" "type": "address"
} }
], ],
"name": "communityFees", "name": "communityFees",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [], "inputs": [],
"name": "getOPFFee", "name": "getOPFFee",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
}, },
{ {
"inputs": [ "inputs": [
{ {
"internalType": "address", "internalType": "address",
"name": "", "name": "",
"type": "address" "type": "address"
} }
], ],
"name": "marketFees", "name": "marketFees",
"outputs": [ "outputs": [
{ {
"internalType": "uint256", "internalType": "uint256",
"name": "", "name": "",
"type": "uint256" "type": "uint256"
} }
], ],
"stateMutability": "view", "stateMutability": "view",
"type": "function" "type": "function"
} }
], ],
"bytecode": "0x608060405234801561001057600080fd5b50610460806100206000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c8063992e2a92116100ad578063bc694ea211610071578063bc694ea2146101eb578063c36596a614610153578063c6580d12146101f3578063e4a28a5214610131578063ec093021146101fb57600080fd5b8063992e2a92146101cb578063b0e0d136146101d3578063b7b800a4146101d3578063ba019dab146101db578063bc063e1a146101e357600080fd5b806349e9350f116100f457806349e9350f146101a2578063700dd7e8146101ab57806376c7a3c7146101b3578063867378c5146101bb5780639381cd2b146101c357600080fd5b806309a3bbe414610131578063189d00ca1461014b578063218b538214610153578063300621921461016257806331e2761b14610182575b600080fd5b610139610203565b60405190815260200160405180910390f35b610139610219565b610139670de0b6b3a764000081565b61013961017036600461035b565b60056020526000908152604090205481565b61013961019036600461035b565b60066020526000908152604090205481565b61013960005481565b610139610230565b6101396102b9565b6101396102ce565b6101396102e5565b6101396102f8565b610139600281565b610139600181565b610139610316565b610139610329565b610139600081565b610139610348565b610216670de0b6b3a764000060326103de565b81565b6102166402540be400670de0b6b3a76400006103bc565b60025460048054604051637c0aa57760e11b81526001600160a01b0391821692810192909252600092169063f8154aee9060240160206040518083038186803b15801561027c57600080fd5b505afa158015610290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b4919061038b565b905090565b610216620f4240670de0b6b3a76400006103bc565b61021664e8d4a51000670de0b6b3a76400006103bc565b610216670de0b6b3a764000060646103de565b61030b6003670de0b6b3a76400006103bc565b6102169060016103a4565b610216600a670de0b6b3a76400006103bc565b600161033e670de0b6b3a764000060026103de565b61021691906103fd565b6102166002670de0b6b3a76400006103bc565b60006020828403121561036d57600080fd5b81356001600160a01b038116811461038457600080fd5b9392505050565b60006020828403121561039d57600080fd5b5051919050565b600082198211156103b7576103b7610414565b500190565b6000826103d957634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156103f8576103f8610414565b500290565b60008282101561040f5761040f610414565b500390565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220699b1f34bf1d54caa297e60d6fddebd8dc902d2243c98d4a62f4485302305a1064736f6c63430008070033", "bytecode": "0x608060405234801561001057600080fd5b50610460806100206000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c8063992e2a92116100ad578063bc694ea211610071578063bc694ea2146101eb578063c36596a614610153578063c6580d12146101f3578063e4a28a5214610131578063ec093021146101fb57600080fd5b8063992e2a92146101cb578063b0e0d136146101d3578063b7b800a4146101d3578063ba019dab146101db578063bc063e1a146101e357600080fd5b806349e9350f116100f457806349e9350f146101a2578063700dd7e8146101ab57806376c7a3c7146101b3578063867378c5146101bb5780639381cd2b146101c357600080fd5b806309a3bbe414610131578063189d00ca1461014b578063218b538214610153578063300621921461016257806331e2761b14610182575b600080fd5b610139610203565b60405190815260200160405180910390f35b610139610219565b610139670de0b6b3a764000081565b61013961017036600461035b565b60056020526000908152604090205481565b61013961019036600461035b565b60066020526000908152604090205481565b61013960005481565b610139610230565b6101396102b9565b6101396102ce565b6101396102e5565b6101396102f8565b610139600281565b610139600181565b610139610316565b610139610329565b610139600081565b610139610348565b610216670de0b6b3a764000060326103de565b81565b6102166402540be400670de0b6b3a76400006103bc565b60025460048054604051637c0aa57760e11b81526001600160a01b0391821692810192909252600092169063f8154aee9060240160206040518083038186803b15801561027c57600080fd5b505afa158015610290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b4919061038b565b905090565b610216620f4240670de0b6b3a76400006103bc565b61021664e8d4a51000670de0b6b3a76400006103bc565b610216670de0b6b3a764000060646103de565b61030b6003670de0b6b3a76400006103bc565b6102169060016103a4565b610216600a670de0b6b3a76400006103bc565b600161033e670de0b6b3a764000060026103de565b61021691906103fd565b6102166002670de0b6b3a76400006103bc565b60006020828403121561036d57600080fd5b81356001600160a01b038116811461038457600080fd5b9392505050565b60006020828403121561039d57600080fd5b5051919050565b600082198211156103b7576103b7610414565b500190565b6000826103d957634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156103f8576103f8610414565b500290565b60008282101561040f5761040f610414565b500390565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220699b1f34bf1d54caa297e60d6fddebd8dc902d2243c98d4a62f4485302305a1064736f6c63430008070033",
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061012c5760003560e01c8063992e2a92116100ad578063bc694ea211610071578063bc694ea2146101eb578063c36596a614610153578063c6580d12146101f3578063e4a28a5214610131578063ec093021146101fb57600080fd5b8063992e2a92146101cb578063b0e0d136146101d3578063b7b800a4146101d3578063ba019dab146101db578063bc063e1a146101e357600080fd5b806349e9350f116100f457806349e9350f146101a2578063700dd7e8146101ab57806376c7a3c7146101b3578063867378c5146101bb5780639381cd2b146101c357600080fd5b806309a3bbe414610131578063189d00ca1461014b578063218b538214610153578063300621921461016257806331e2761b14610182575b600080fd5b610139610203565b60405190815260200160405180910390f35b610139610219565b610139670de0b6b3a764000081565b61013961017036600461035b565b60056020526000908152604090205481565b61013961019036600461035b565b60066020526000908152604090205481565b61013960005481565b610139610230565b6101396102b9565b6101396102ce565b6101396102e5565b6101396102f8565b610139600281565b610139600181565b610139610316565b610139610329565b610139600081565b610139610348565b610216670de0b6b3a764000060326103de565b81565b6102166402540be400670de0b6b3a76400006103bc565b60025460048054604051637c0aa57760e11b81526001600160a01b0391821692810192909252600092169063f8154aee9060240160206040518083038186803b15801561027c57600080fd5b505afa158015610290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b4919061038b565b905090565b610216620f4240670de0b6b3a76400006103bc565b61021664e8d4a51000670de0b6b3a76400006103bc565b610216670de0b6b3a764000060646103de565b61030b6003670de0b6b3a76400006103bc565b6102169060016103a4565b610216600a670de0b6b3a76400006103bc565b600161033e670de0b6b3a764000060026103de565b61021691906103fd565b6102166002670de0b6b3a76400006103bc565b60006020828403121561036d57600080fd5b81356001600160a01b038116811461038457600080fd5b9392505050565b60006020828403121561039d57600080fd5b5051919050565b600082198211156103b7576103b7610414565b500190565b6000826103d957634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156103f8576103f8610414565b500290565b60008282101561040f5761040f610414565b500390565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220699b1f34bf1d54caa297e60d6fddebd8dc902d2243c98d4a62f4485302305a1064736f6c63430008070033", "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061012c5760003560e01c8063992e2a92116100ad578063bc694ea211610071578063bc694ea2146101eb578063c36596a614610153578063c6580d12146101f3578063e4a28a5214610131578063ec093021146101fb57600080fd5b8063992e2a92146101cb578063b0e0d136146101d3578063b7b800a4146101d3578063ba019dab146101db578063bc063e1a146101e357600080fd5b806349e9350f116100f457806349e9350f146101a2578063700dd7e8146101ab57806376c7a3c7146101b3578063867378c5146101bb5780639381cd2b146101c357600080fd5b806309a3bbe414610131578063189d00ca1461014b578063218b538214610153578063300621921461016257806331e2761b14610182575b600080fd5b610139610203565b60405190815260200160405180910390f35b610139610219565b610139670de0b6b3a764000081565b61013961017036600461035b565b60056020526000908152604090205481565b61013961019036600461035b565b60066020526000908152604090205481565b61013960005481565b610139610230565b6101396102b9565b6101396102ce565b6101396102e5565b6101396102f8565b610139600281565b610139600181565b610139610316565b610139610329565b610139600081565b610139610348565b610216670de0b6b3a764000060326103de565b81565b6102166402540be400670de0b6b3a76400006103bc565b60025460048054604051637c0aa57760e11b81526001600160a01b0391821692810192909252600092169063f8154aee9060240160206040518083038186803b15801561027c57600080fd5b505afa158015610290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b4919061038b565b905090565b610216620f4240670de0b6b3a76400006103bc565b61021664e8d4a51000670de0b6b3a76400006103bc565b610216670de0b6b3a764000060646103de565b61030b6003670de0b6b3a76400006103bc565b6102169060016103a4565b610216600a670de0b6b3a76400006103bc565b600161033e670de0b6b3a764000060026103de565b61021691906103fd565b6102166002670de0b6b3a76400006103bc565b60006020828403121561036d57600080fd5b81356001600160a01b038116811461038457600080fd5b9392505050565b60006020828403121561039d57600080fd5b5051919050565b600082198211156103b7576103b7610414565b500190565b6000826103d957634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156103f8576103f8610414565b500290565b60008282101561040f5761040f610414565b500390565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220699b1f34bf1d54caa297e60d6fddebd8dc902d2243c98d4a62f4485302305a1064736f6c63430008070033",
"linkReferences": {}, "linkReferences": {},
"deployedLinkReferences": {} "deployedLinkReferences": {}
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -104,6 +104,8 @@ templates:
abis: abis:
- name: ERC20Template - name: ERC20Template
file: ./abis/ERC20Template.json file: ./abis/ERC20Template.json
- name: ERC20TemplateEnterprise
file: ./abis/ERC20TemplateEnterprise.json
- name: ERC20 - name: ERC20
file: ./abis/ERC20.json file: ./abis/ERC20.json
- name: ERC20Roles - name: ERC20Roles
@ -111,18 +113,8 @@ templates:
eventHandlers: eventHandlers:
- event: OrderStarted(indexed address,address,uint256,uint256,uint256,indexed address,indexed address,uint256) - event: OrderStarted(indexed address,address,uint256,uint256,uint256,indexed address,indexed address,uint256)
handler: handleOrderStarted handler: handleOrderStarted
- event: MinterApproved(address,address) - event: NewPaymentCollector(indexed address,indexed address,uint256,uint256)
handler: handleMinterApproved handler: handlerNewPaymentCollector
- event: AddedMinter(indexed address,indexed address,uint256,uint256)
handler: handleAddMinter
- event: RemovedMinter(indexed address,indexed address,uint256,uint256)
handler: handleRemoveMinter
- event: AddedFeeManager(indexed address,indexed address,uint256,uint256)
handler: handlerAddFeeManager
- event: RemovedFeeManager(indexed address,indexed address,uint256,uint256)
handler: handlerRemoveFeeManager
- event: CleanedPermissions(indexed address,uint256,uint256)
handler: handleCleanPermissions
- kind: ethereum/contract - kind: ethereum/contract
name: BFactory name: BFactory
network: barge network: barge
@ -158,6 +150,8 @@ templates:
file: ./abis/BPool.json file: ./abis/BPool.json
- name: BToken - name: BToken
file: ./abis/BToken.json file: ./abis/BToken.json
- name: BMath
file: ./abis/BMath.json
eventHandlers: eventHandlers:
- event: LOG_SWAP(indexed address,indexed address,indexed address,uint256,uint256,uint256) - event: LOG_SWAP(indexed address,indexed address,indexed address,uint256,uint256,uint256)
handler: handleSwap handler: handleSwap
@ -171,6 +165,8 @@ templates:
handler: handleBpt handler: handleBpt
- event: Transfer(indexed address,indexed address,uint256) - event: Transfer(indexed address,indexed address,uint256)
handler: handlerBptTransfer handler: handlerBptTransfer
- event: SWAP_FEES(uint,uint,uint,address)
handler: handlerSwapFees
features: features:
- nonFatalErrors - nonFatalErrors