Skip to content

Commit

Permalink
Aave withdraw and bridge (#313)
Browse files Browse the repository at this point in the history
* Refactor AaveWithdrawWorkflow to remove receiver parameter and update tests accordingly.

* Add Bridger integration to AaveWithdrawWorkflow with new withdrawAndBridge function and corresponding tests.

* Upgrade access protocol: update AaveWithdrawWorkflow contract addresses across multiple chains, modify transaction details in broadcast files, and adjust test artifacts to reflect new deployments.
  • Loading branch information
ylv-io authored Nov 14, 2024
1 parent dfa0e74 commit fa932d7
Show file tree
Hide file tree
Showing 13 changed files with 529 additions and 954 deletions.
100 changes: 100 additions & 0 deletions broadcast/145-upgrade_access_protocol.s.sol/1/run-1731605143.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"transactions": [
{
"hash": "0x40694cf9a7ffc3aa814c773a38d4670d3ba927b3a16073b8bf19d7ec24604962",
"transactionType": "CREATE",
"contractName": "AaveWithdrawWorkflow",
"contractAddress": "0x4dbe021eba4275e149b268a9e6efcd6528531aab",
"function": null,
"arguments": [
"0x2f39d218133AFaB8F2B819B1066c7E434Ad94E9e",
"0xA000000eaA652c7023530b603844471294B811c4"
],
"transaction": {
"from": "0x660ad4b5a74130a4796b4d54bc6750ae93c86e6c",
"gas": "0xebdf2",
"value": "0x0",
"input": "0x60c060405234801561001057600080fd5b50604051610d48380380610d4883398101604081905261002f91610062565b6001600160a01b039182166080521660a052610095565b80516001600160a01b038116811461005d57600080fd5b919050565b6000806040838503121561007557600080fd5b61007e83610046565b915061008c60208401610046565b90509250929050565b60805160a051610c746100d460003960008181605601528181610135015281816101c0015261020b01526000818160a7015261029a0152610c746000f3fe60806040526004361061003f5760003560e01c80634d47fc85146100445780636268461614610095578063dbb4e148146100c9578063f3fef3a3146100ea575b600080fd5b34801561005057600080fd5b506100787f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100a157600080fd5b506100787f000000000000000000000000000000000000000000000000000000000000000081565b6100dc6100d7366004610793565b61010c565b60405190815260200161008c565b3480156100f657600080fd5b5061010a610105366004610804565b610296565b005b60006101188585610296565b604051636eb1769f60e11b81523060048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116602483015285919087169063dd62ed3e90604401602060405180830381865afa158015610187573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101ab9190610830565b10156101e7576101e76001600160a01b0386167f0000000000000000000000000000000000000000000000000000000000000000600019610480565b6040805160208101825260008152905163e48e2d8f60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163e48e2d8f9161024a91899189918991849184918b906004016108e3565b6020604051808303816000875af1158015610269573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028d9190610830565b95945050505050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663026b1d5f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031a91906109f1565b90506000198203610401576040516335ea6a7560e01b81526001600160a01b0384811660048301528216906335ea6a75906024016101e060405180830381865afa15801561036c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103909190610add565b61010001516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156103da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fe9190610830565b91505b604051631a4ca37b60e21b81526001600160a01b038481166004830152602482018490523060448301528216906369328dec906064016020604051808303816000875af1158015610456573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047a9190610830565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526104d18482610534565b61047a57604080516001600160a01b038516602482015260006044808301919091528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261052a9085906105d7565b61047a84826105d7565b6000806000846001600160a01b0316846040516105519190610c00565b6000604051808303816000865af19150503d806000811461058e576040519150601f19603f3d011682016040523d82523d6000602084013e610593565b606091505b50915091508180156105bd5750805115806105bd5750808060200190518101906105bd9190610c1c565b801561028d5750505050506001600160a01b03163b151590565b60006105ec6001600160a01b03841683610644565b9050805160001415801561061157508080602001905181019061060f9190610c1c565b155b1561063f57604051635274afe760e01b81526001600160a01b03841660048201526024015b60405180910390fd5b505050565b606061065283836000610659565b9392505050565b60608147101561067e5760405163cd78605960e01b8152306004820152602401610636565b600080856001600160a01b0316848660405161069a9190610c00565b60006040518083038185875af1925050503d80600081146106d7576040519150601f19603f3d011682016040523d82523d6000602084013e6106dc565b606091505b50915091506106ec8683836106f6565b9695505050505050565b60608261070b5761070682610752565b610652565b815115801561072257506001600160a01b0384163b155b1561074b57604051639996b31560e01b81526001600160a01b0385166004820152602401610636565b5080610652565b8051156107625780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b50565b6001600160a01b038116811461077b57600080fd5b600080600080608085870312156107a957600080fd5b84356107b48161077e565b93506020850135925060408501356107cb8161077e565b9150606085013567ffffffffffffffff8111156107e757600080fd5b850160c081880312156107f957600080fd5b939692955090935050565b6000806040838503121561081757600080fd5b82356108228161077e565b946020939093013593505050565b60006020828403121561084257600080fd5b5051919050565b60005b8381101561086457818101518382015260200161084c565b50506000910152565b6000808335601e1984360301811261088457600080fd5b830160208101925035905067ffffffffffffffff8111156108a457600080fd5b8036038213156108b357600080fd5b9250929050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b600060018060a01b03808a1683528860208401528088166040840152808716606084015285608084015260e060a084015284518060e085015261010061092f8282870160208a01610849565b601f19601f83011685019150808583030160c086015285356109508161077e565b83169082015260208501356101208201526040850135610140820152606085013561097a8161077e565b821661016082015261098f608086018661086d565b925060c06101808301526109a86101c0830184836108ba565b9250506109b860a086018661086d565b82840360ff19016101a08401526109d08482846108ba565b9d9c50505050505050505050505050565b80516109ec8161077e565b919050565b600060208284031215610a0357600080fd5b81516106528161077e565b6040516101e0810167ffffffffffffffff81118282101715610a4057634e487b7160e01b600052604160045260246000fd5b60405290565b600060208284031215610a5857600080fd5b6040516020810181811067ffffffffffffffff82111715610a8957634e487b7160e01b600052604160045260246000fd5b6040529151825250919050565b80516fffffffffffffffffffffffffffffffff811681146109ec57600080fd5b805164ffffffffff811681146109ec57600080fd5b805161ffff811681146109ec57600080fd5b60006101e08284031215610af057600080fd5b610af8610a0e565b610b028484610a46565b8152610b1060208401610a96565b6020820152610b2160408401610a96565b6040820152610b3260608401610a96565b6060820152610b4360808401610a96565b6080820152610b5460a08401610a96565b60a0820152610b6560c08401610ab6565b60c0820152610b7660e08401610acb565b60e0820152610100610b898185016109e1565b90820152610120610b9b8482016109e1565b90820152610140610bad8482016109e1565b90820152610160610bbf8482016109e1565b90820152610180610bd1848201610a96565b908201526101a0610be3848201610a96565b908201526101c0610bf5848201610a96565b908201529392505050565b60008251610c12818460208701610849565b9190910192915050565b600060208284031215610c2e57600080fd5b8151801515811461065257600080fdfea2646970667358221220d5ae2937a849a1bb129d49d213f210b198cf5930255eb59a7f30fe1c91351db764736f6c634300081800330000000000000000000000002f39d218133afab8f2b819b1066c7e434ad94e9e000000000000000000000000a000000eaa652c7023530b603844471294b811c4",
"nonce": "0x304",
"chainId": "0x1"
},
"additionalContracts": [],
"isFixedGasLimit": false
},
{
"hash": "0xcfe087f898b9b75b3b8fa61339a5bd5e4c32126a3bf9ec5b6951fc14428793c1",
"transactionType": "CALL",
"contractName": "UUPSProxy",
"contractAddress": "0xa000000eaa652c7023530b603844471294b811c4",
"function": null,
"arguments": null,
"transaction": {
"from": "0x660ad4b5a74130a4796b4d54bc6750ae93c86e6c",
"to": "0xa000000eaa652c7023530b603844471294b811c4",
"gas": "0x11cf1",
"value": "0x0",
"input": "0x0bf919fc0000000000000000000000004dbe021eba4275e149b268a9e6efcd6528531aab",
"nonce": "0x305",
"chainId": "0x1"
},
"additionalContracts": [],
"isFixedGasLimit": false
}
],
"receipts": [
{
"status": "0x1",
"cumulativeGasUsed": "0xaba75d",
"logs": [],
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"type": "0x2",
"transactionHash": "0x40694cf9a7ffc3aa814c773a38d4670d3ba927b3a16073b8bf19d7ec24604962",
"transactionIndex": "0x56",
"blockHash": "0x13c5d1872984446ff1933b7a09008ab1cb4cb605a6d645a0afe913f8b7b25bda",
"blockNumber": "0x1434b50",
"gasUsed": "0xb57e3",
"effectiveGasPrice": "0x61779829a",
"from": "0x660ad4b5a74130a4796b4d54bc6750ae93c86e6c",
"to": null,
"contractAddress": "0x4dbe021eba4275e149b268a9e6efcd6528531aab"
},
{
"status": "0x1",
"cumulativeGasUsed": "0xe412d7",
"logs": [
{
"address": "0xa000000eaa652c7023530b603844471294b811c4",
"topics": [
"0x4330c9a27379ee1ae26d7ba186fb3420ab2fde5cb4f1937298b69228b4787058",
"0x0000000000000000000000004dbe021eba4275e149b268a9e6efcd6528531aab",
"0x0000000000000000000000000000000000000000000000000000000000000001"
],
"data": "0x",
"blockHash": "0x2ee822b900e007d50a895720b3c5103daeb4c7f54d71ea629d0c46a325a39f80",
"blockNumber": "0x1434b51",
"transactionHash": "0xcfe087f898b9b75b3b8fa61339a5bd5e4c32126a3bf9ec5b6951fc14428793c1",
"transactionIndex": "0x9c",
"logIndex": "0x1ad",
"removed": false
}
],
"logsBloom": "0x00000000000000000001000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000040000040001000000000000000000000000000000000000040000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000020000000200000000000000000000000000000000000000000000040000000000001000000000000000000000000000000000000000000000000000000",
"type": "0x2",
"transactionHash": "0xcfe087f898b9b75b3b8fa61339a5bd5e4c32126a3bf9ec5b6951fc14428793c1",
"transactionIndex": "0x9c",
"blockHash": "0x2ee822b900e007d50a895720b3c5103daeb4c7f54d71ea629d0c46a325a39f80",
"blockNumber": "0x1434b51",
"gasUsed": "0xce4c",
"effectiveGasPrice": "0x60acc1f95",
"from": "0x660ad4b5a74130a4796b4d54bc6750ae93c86e6c",
"to": "0xa000000eaa652c7023530b603844471294b811c4",
"contractAddress": null
}
],
"libraries": [],
"pending": [],
"returns": {},
"timestamp": 1731605143,
"chain": 1,
"commit": "2d94fe4"
}
Loading

0 comments on commit fa932d7

Please sign in to comment.