-
Notifications
You must be signed in to change notification settings - Fork 8
/
ExampleFlashSwap.json
62 lines (62 loc) · 18.8 KB
/
ExampleFlashSwap.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{
"contractName": "ExampleFlashSwap",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_factory",
"type": "address"
},
{
"internalType": "address",
"name": "_factoryV1",
"type": "address"
},
{
"internalType": "address",
"name": "router",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount0",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount1",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"name": "uniswapV2Call",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
],
"bytecode": "0x60e060405234801561001057600080fd5b506040516112273803806112278339818101604052606081101561003357600080fd5b5080516020808301516040938401516001600160601b0319606083811b821660805285901b1660a05284516315ab88c960e31b815294519394919390926001600160a01b0384169263ad5c46489260048083019392829003018186803b15801561009c57600080fd5b505afa1580156100b0573d6000803e3d6000fd5b505050506040513d60208110156100c657600080fd5b50516001600160601b031960609190911b1660c05250505060805160601c60a05160601c60c05160601c6110e76101406000398061027a52806102af52806102f452806103435280610395528061062b52806106c1528061083d5250806101c352806105e4528061092552508061041652506110e76000f3fe6080604052600436106100225760003560e01c806310d1e85c1461002e57610029565b3661002957005b600080fd5b34801561003a57600080fd5b506100c76004803603608081101561005157600080fd5b6001600160a01b03823516916020810135916040820135919081019060808101606082013564010000000081111561008857600080fd5b82018360208201111561009a57600080fd5b803590602001918460018302840111640100000000831117156100bc57600080fd5b5090925090506100c9565b005b60408051600280825260608083018452926020830190803683370190505090506000806000336001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561012757600080fd5b505afa15801561013b573d6000803e3d6000fd5b505050506040513d602081101561015157600080fd5b50516040805163d21220a760e01b81529051919250600091339163d21220a7916004808301926020929190829003018186803b15801561019057600080fd5b505afa1580156101a4573d6000803e3d6000fd5b505050506040513d60208110156101ba57600080fd5b505190506101e97f00000000000000000000000000000000000000000000000000000000000000008383610a81565b6001600160a01b0316336001600160a01b03161461020357fe5b88158061020e575087155b61021457fe5b88156102205780610222565b815b8560008151811061022f57fe5b6001600160a01b039092166020928302919091019091015288156102535781610255565b805b8560018151811061026257fe5b6001600160a01b0392831660209182029290920101527f00000000000000000000000000000000000000000000000000000000000000008116908316146102a957886102ab565b875b93507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146102ec57876102ee565b885b925050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168360008151811061032957fe5b60200260200101516001600160a01b0316148061038b57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168360018151811061037857fe5b60200260200101516001600160a01b0316145b61039157fe5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846000815181106103ca57fe5b60200260200101516001600160a01b0316146103fa57836000815181106103ed57fe5b6020026020010151610410565b8360018151811061040757fe5b60200260200101515b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166306f2bf62836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561048a57600080fd5b505afa15801561049e573d6000803e3d6000fd5b505050506040513d60208110156104b457600080fd5b505190508315610805576000878760208110156104d057600080fd5b506040805163095ea7b360e01b81526001600160a01b038581166004830152602482018990529151923593509085169163095ea7b3916044808201926020929091908290030181600087803b15801561052857600080fd5b505af115801561053c573d6000803e3d6000fd5b505050506040513d602081101561055257600080fd5b5050604080516395e3c50b60e01b81526004810187905260248101839052600019604482015290516000916001600160a01b038516916395e3c50b9160648082019260209290919082900301818787803b1580156105af57600080fd5b505af11580156105c3573d6000803e3d6000fd5b505050506040513d60208110156105d957600080fd5b50519050600061060a7f0000000000000000000000000000000000000000000000000000000000000000888a610b41565b60008151811061061657fe5b6020026020010151905080821161062957fe5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561068457600080fd5b505af1158015610698573d6000803e3d6000fd5b50506040805163a9059cbb60e01b81523360048201526024810186905290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016945063a9059cbb9350604480830193506020928290030181600087803b15801561070a57600080fd5b505af115801561071e573d6000803e3d6000fd5b505050506040513d602081101561073457600080fd5b505161073c57fe5b604080516000808252602082019092526001600160a01b038f1690838503906040518082805190602001908083835b6020831061078a5780518252601f19909201916020918201910161076b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146107ec576040519150601f19603f3d011682016040523d82523d6000602084013e6107f1565b606091505b50509050806107fc57fe5b50505050610a75565b60008787602081101561081757600080fd5b5060408051632e1a7d4d60e01b8152600481018790529051913592506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691632e1a7d4d9160248082019260009290919082900301818387803b15801561088557600080fd5b505af1158015610899573d6000803e3d6000fd5b505050506000826001600160a01b031663f39b5b9b86846000196040518463ffffffff1660e01b815260040180838152602001828152602001925050506020604051808303818588803b1580156108ef57600080fd5b505af1158015610903573d6000803e3d6000fd5b50505050506040513d602081101561091a57600080fd5b50519050600061094b7f0000000000000000000000000000000000000000000000000000000000000000878a610b41565b60008151811061095757fe5b6020026020010151905080821161096a57fe5b6040805163a9059cbb60e01b81523360048201526024810183905290516001600160a01b0387169163a9059cbb9160448083019260209291908290030181600087803b1580156109b957600080fd5b505af11580156109cd573d6000803e3d6000fd5b505050506040513d60208110156109e357600080fd5b50516109eb57fe5b6040805163a9059cbb60e01b81526001600160a01b038f81166004830152838503602483015291519187169163a9059cbb916044808201926020929091908290030181600087803b158015610a3f57600080fd5b505af1158015610a53573d6000803e3d6000fd5b505050506040513d6020811015610a6957600080fd5b5051610a7157fe5b5050505b50505050505050505050565b6000806000610a908585610c8e565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501206001600160f81b031960688401529a90941b9093166069840152607d8301989098527f3e587aafa830ed6729f6ad31bd15f244a5938c6c3dc057d4fcf2cbc0b1046987609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b6060600282511015610b9a576040805162461bcd60e51b815260206004820152601c60248201527f50616e63616b654c6962726172793a20494e56414c49445f5041544800000000604482015290519081900360640190fd5b815167ffffffffffffffff81118015610bb257600080fd5b50604051908082528060200260200182016040528015610bdc578160200160208202803683370190505b5090508281600183510381518110610bf057fe5b60209081029190910101528151600019015b8015610c8657600080610c3f87866001860381518110610c1e57fe5b6020026020010151878681518110610c3257fe5b6020026020010151610d6c565b91509150610c61848481518110610c5257fe5b60200260200101518383610e46565b846001850381518110610c7057fe5b6020908102919091010152505060001901610c02565b509392505050565b600080826001600160a01b0316846001600160a01b03161415610ce25760405162461bcd60e51b81526004018080602001828103825260238152602001806110696023913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b031610610d02578284610d05565b83835b90925090506001600160a01b038216610d65576040805162461bcd60e51b815260206004820152601c60248201527f50616e63616b654c6962726172793a205a45524f5f4144445245535300000000604482015290519081900360640190fd5b9250929050565b6000806000610d7b8585610c8e565b509050610d89868686610a81565b50600080610d98888888610a81565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610dd057600080fd5b505afa158015610de4573d6000803e3d6000fd5b505050506040513d6060811015610dfa57600080fd5b5080516020909101516dffffffffffffffffffffffffffff91821693501690506001600160a01b0387811690841614610e34578082610e37565b81815b90999098509650505050505050565b6000808411610e865760405162461bcd60e51b815260040180806020018281038252602a81526020018061103f602a913960400191505060405180910390fd5b600083118015610e965750600082115b610ed15760405162461bcd60e51b815260040180806020018281038252602681526020018061108c6026913960400191505060405180910390fd5b6000610ef56103e8610ee9868863ffffffff610f3616565b9063ffffffff610f3616565b90506000610f0f6103e6610ee9868963ffffffff610f9f16565b9050610f2c6001828481610f1f57fe5b049063ffffffff610fef16565b9695505050505050565b6000811580610f5157505080820282828281610f4e57fe5b04145b610f99576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604482015290519081900360640190fd5b92915050565b80820382811115610f99576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b80820182811015610f99576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fdfe50616e63616b654c6962726172793a20494e53554646494349454e545f4f55545055545f414d4f554e5450616e63616b654c6962726172793a204944454e544943414c5f41444452455353455350616e63616b654c6962726172793a20494e53554646494349454e545f4c4951554944495459a264697066735822122060b9ae112adbbd0ed036576464b2e6fcda5d3fbadb1fa70436c42c6c8b4c4ade64736f6c63430006060033",
"deployedBytecode": "0x6080604052600436106100225760003560e01c806310d1e85c1461002e57610029565b3661002957005b600080fd5b34801561003a57600080fd5b506100c76004803603608081101561005157600080fd5b6001600160a01b03823516916020810135916040820135919081019060808101606082013564010000000081111561008857600080fd5b82018360208201111561009a57600080fd5b803590602001918460018302840111640100000000831117156100bc57600080fd5b5090925090506100c9565b005b60408051600280825260608083018452926020830190803683370190505090506000806000336001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561012757600080fd5b505afa15801561013b573d6000803e3d6000fd5b505050506040513d602081101561015157600080fd5b50516040805163d21220a760e01b81529051919250600091339163d21220a7916004808301926020929190829003018186803b15801561019057600080fd5b505afa1580156101a4573d6000803e3d6000fd5b505050506040513d60208110156101ba57600080fd5b505190506101e97f00000000000000000000000000000000000000000000000000000000000000008383610a81565b6001600160a01b0316336001600160a01b03161461020357fe5b88158061020e575087155b61021457fe5b88156102205780610222565b815b8560008151811061022f57fe5b6001600160a01b039092166020928302919091019091015288156102535781610255565b805b8560018151811061026257fe5b6001600160a01b0392831660209182029290920101527f00000000000000000000000000000000000000000000000000000000000000008116908316146102a957886102ab565b875b93507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146102ec57876102ee565b885b925050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168360008151811061032957fe5b60200260200101516001600160a01b0316148061038b57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168360018151811061037857fe5b60200260200101516001600160a01b0316145b61039157fe5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846000815181106103ca57fe5b60200260200101516001600160a01b0316146103fa57836000815181106103ed57fe5b6020026020010151610410565b8360018151811061040757fe5b60200260200101515b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166306f2bf62836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561048a57600080fd5b505afa15801561049e573d6000803e3d6000fd5b505050506040513d60208110156104b457600080fd5b505190508315610805576000878760208110156104d057600080fd5b506040805163095ea7b360e01b81526001600160a01b038581166004830152602482018990529151923593509085169163095ea7b3916044808201926020929091908290030181600087803b15801561052857600080fd5b505af115801561053c573d6000803e3d6000fd5b505050506040513d602081101561055257600080fd5b5050604080516395e3c50b60e01b81526004810187905260248101839052600019604482015290516000916001600160a01b038516916395e3c50b9160648082019260209290919082900301818787803b1580156105af57600080fd5b505af11580156105c3573d6000803e3d6000fd5b505050506040513d60208110156105d957600080fd5b50519050600061060a7f0000000000000000000000000000000000000000000000000000000000000000888a610b41565b60008151811061061657fe5b6020026020010151905080821161062957fe5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561068457600080fd5b505af1158015610698573d6000803e3d6000fd5b50506040805163a9059cbb60e01b81523360048201526024810186905290516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016945063a9059cbb9350604480830193506020928290030181600087803b15801561070a57600080fd5b505af115801561071e573d6000803e3d6000fd5b505050506040513d602081101561073457600080fd5b505161073c57fe5b604080516000808252602082019092526001600160a01b038f1690838503906040518082805190602001908083835b6020831061078a5780518252601f19909201916020918201910161076b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146107ec576040519150601f19603f3d011682016040523d82523d6000602084013e6107f1565b606091505b50509050806107fc57fe5b50505050610a75565b60008787602081101561081757600080fd5b5060408051632e1a7d4d60e01b8152600481018790529051913592506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691632e1a7d4d9160248082019260009290919082900301818387803b15801561088557600080fd5b505af1158015610899573d6000803e3d6000fd5b505050506000826001600160a01b031663f39b5b9b86846000196040518463ffffffff1660e01b815260040180838152602001828152602001925050506020604051808303818588803b1580156108ef57600080fd5b505af1158015610903573d6000803e3d6000fd5b50505050506040513d602081101561091a57600080fd5b50519050600061094b7f0000000000000000000000000000000000000000000000000000000000000000878a610b41565b60008151811061095757fe5b6020026020010151905080821161096a57fe5b6040805163a9059cbb60e01b81523360048201526024810183905290516001600160a01b0387169163a9059cbb9160448083019260209291908290030181600087803b1580156109b957600080fd5b505af11580156109cd573d6000803e3d6000fd5b505050506040513d60208110156109e357600080fd5b50516109eb57fe5b6040805163a9059cbb60e01b81526001600160a01b038f81166004830152838503602483015291519187169163a9059cbb916044808201926020929091908290030181600087803b158015610a3f57600080fd5b505af1158015610a53573d6000803e3d6000fd5b505050506040513d6020811015610a6957600080fd5b5051610a7157fe5b5050505b50505050505050505050565b6000806000610a908585610c8e565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501206001600160f81b031960688401529a90941b9093166069840152607d8301989098527f3e587aafa830ed6729f6ad31bd15f244a5938c6c3dc057d4fcf2cbc0b1046987609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b6060600282511015610b9a576040805162461bcd60e51b815260206004820152601c60248201527f50616e63616b654c6962726172793a20494e56414c49445f5041544800000000604482015290519081900360640190fd5b815167ffffffffffffffff81118015610bb257600080fd5b50604051908082528060200260200182016040528015610bdc578160200160208202803683370190505b5090508281600183510381518110610bf057fe5b60209081029190910101528151600019015b8015610c8657600080610c3f87866001860381518110610c1e57fe5b6020026020010151878681518110610c3257fe5b6020026020010151610d6c565b91509150610c61848481518110610c5257fe5b60200260200101518383610e46565b846001850381518110610c7057fe5b6020908102919091010152505060001901610c02565b509392505050565b600080826001600160a01b0316846001600160a01b03161415610ce25760405162461bcd60e51b81526004018080602001828103825260238152602001806110696023913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b031610610d02578284610d05565b83835b90925090506001600160a01b038216610d65576040805162461bcd60e51b815260206004820152601c60248201527f50616e63616b654c6962726172793a205a45524f5f4144445245535300000000604482015290519081900360640190fd5b9250929050565b6000806000610d7b8585610c8e565b509050610d89868686610a81565b50600080610d98888888610a81565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610dd057600080fd5b505afa158015610de4573d6000803e3d6000fd5b505050506040513d6060811015610dfa57600080fd5b5080516020909101516dffffffffffffffffffffffffffff91821693501690506001600160a01b0387811690841614610e34578082610e37565b81815b90999098509650505050505050565b6000808411610e865760405162461bcd60e51b815260040180806020018281038252602a81526020018061103f602a913960400191505060405180910390fd5b600083118015610e965750600082115b610ed15760405162461bcd60e51b815260040180806020018281038252602681526020018061108c6026913960400191505060405180910390fd5b6000610ef56103e8610ee9868863ffffffff610f3616565b9063ffffffff610f3616565b90506000610f0f6103e6610ee9868963ffffffff610f9f16565b9050610f2c6001828481610f1f57fe5b049063ffffffff610fef16565b9695505050505050565b6000811580610f5157505080820282828281610f4e57fe5b04145b610f99576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6d756c2d6f766572666c6f7760601b604482015290519081900360640190fd5b92915050565b80820382811115610f99576040805162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b604482015290519081900360640190fd5b80820182811015610f99576040805162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b604482015290519081900360640190fdfe50616e63616b654c6962726172793a20494e53554646494349454e545f4f55545055545f414d4f554e5450616e63616b654c6962726172793a204944454e544943414c5f41444452455353455350616e63616b654c6962726172793a20494e53554646494349454e545f4c4951554944495459a264697066735822122060b9ae112adbbd0ed036576464b2e6fcda5d3fbadb1fa70436c42c6c8b4c4ade64736f6c63430006060033",
"linkReferences": {},
"deployedLinkReferences": {}
}