@eco-foundation/routes
Version:
The Eco Routes Protocol is a decentralized intent based system that allows users to submit their intent to the network and have it fulfilled by a solver on the destination rollup of their choice.
192 lines (188 loc) • 11 kB
text/typescript
/**
* ABI for the Vault contract
*/
export const VaultAbi = [
{
"inputs": [
{
"internalType": "bytes32",
"name": "intentHash",
"type": "bytes32"
},
{
"components": [
{
"internalType": "address",
"name": "creator",
"type": "address"
},
{
"internalType": "address",
"name": "prover",
"type": "address"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "nativeValue",
"type": "uint256"
},
{
"components": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"internalType": "struct TokenAmount[]",
"name": "tokens",
"type": "tuple[]"
}
],
"internalType": "struct Reward",
"name": "reward",
"type": "tuple"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "target",
"type": "address"
}
],
"name": "AddressEmptyCode",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "AddressInsufficientBalance",
"type": "error"
},
{
"inputs": [],
"name": "FailedInnerCall",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "InsufficientTokenAllowance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "permitContract",
"type": "address"
},
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "PermitTransferFailed",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"name": "SafeERC20FailedOperation",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"name": "ZeroRefundTokenBalance",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "RewardTransferFailed",
"type": "event"
}
] as const
/**
* Type-safe ABI for the Vault contract
*/
export type VaultAbiType = typeof VaultAbi
/**
* Bytecode for the Vault contract
*/
export const VaultBytecode = "0x6080806040523461055757610dc3803803809161001c82856109de565b8339810190604081830312610557578051602082015190916001600160401b038211610557570160a081840312610557576040519261005a846109c3565b61006382610a01565b845261007160208301610a01565b602085015260408281015190850152606080830151908501908152608083015190926001600160401b038211610557570181601f82011215610557578051906001600160401b0382116109ad57604051926100d260208460051b01856109de565b82845260208085019360061b8301019181831161055757602001925b828410610962575050505060808401908152604051632068274d60e21b8152600481018490529160a083602481335afa92831561034d576000936108d4575b5060208301805160ff1661071157505060018060a01b0360808301511681515192600094600160ff606084015116146106a1575b5060005b84811061017f575050505050505b516001600160a01b0316ff5b83516001600160a01b0390610195908390610a23565b5151169060206101a6828751610a23565b5101516040516370a0823160e01b815230600482015290602082602481875afa91821561034d5760009261066e575b508082106101ea575b50506001915001610165565b906101f491610a4d565b916001600160a01b0388168061038a575b5082610212575b806101de565b60ff60408501511692604051636eb1769f60e11b8152866004820152306024820152602081604481865afa90811561034d57600091610359575b506040516370a0823160e01b815260048101889052602081602481875afa90811561034d57600091610319575b508082101561031257505b8181106102de5750600193505b8061029d575b5061020c565b6102d791604051916323b872dd60e01b60208401528760248401523060448401526064830152606482526102d26084836109de565b610cca565b3880610297565b9192936001146000146102f657509060019291610291565b8583638f87ba6760e01b60005260045260245260445260646000fd5b9050610284565b906020823d8211610345575b81610332602093836109de565b8101031261034257505138610279565b80fd5b3d9150610325565b6040513d6000823e3d90fd5b906020823d8211610382575b81610372602093836109de565b810103126103425750513861024c565b3d9150610365565b6040516370a0823160e01b81523060048201529193906000602084602481895afa93841561066157819461062a575b5060405163927da10560e01b8152886004820152866024820152306044820152606081606481865afa90811561061f5782916105be575b506040516370a0823160e01b8152600481018a90526020816024818b5afa9081156105b357839161057e575b506001600160a01b03821681111561056d5750905b506001600160a01b031682811061055c57506000925b826104f4575b6040516370a0823160e01b81523060048201526020816024818a5afa90811561034d576000916104c3575b508382018092116104ad57106104915750509138610205565b84906303ae10f160e21b60005260045260245260445260646000fd5b634e487b7160e01b600052601160045260246000fd5b906020823d82116104ec575b816104dc602093836109de565b8101031261034257505138610478565b3d91506104cf565b813b1561055757604051631b63c28b60e11b8152600481018990523060248201526001600160a01b03841660448201526064810187905260008160848183875af1801561034d57610546575b5061044d565b6000610551916109de565b38610540565b600080fd5b806105679193610a4d565b92610447565b6001600160a01b0316919050610431565b90506020813d82116105ab575b81610598602093836109de565b810103126105a757513861041c565b8280fd5b3d915061058b565b6040513d85823e3d90fd5b90506060813d8211610617575b816105d8606093836109de565b81010312610613578051906001600160a01b03821682036105a757604081610605602061060c9401610cb7565b5001610cb7565b50386103f0565b5080fd5b3d91506105cb565b6040513d84823e3d90fd5b9093506020813d8211610659575b81610645602093836109de565b81010312610655575192386103b9565b8380fd5b3d9150610638565b50604051903d90823e3d90fd5b90916020823d8211610699575b81610688602093836109de565b8101031261034257505190386101d5565b3d915061067b565b90945060405190635480632960e11b82526004820152602081602481335afa90811561034d576000916106d7575b509338610161565b90506020813d602011610709575b816106f2602093836109de565b810103126105575761070390610a01565b386106cf565b3d91506106e5565b91509250600160ff825116146000146107c35750608001805161073d906001600160a01b031684610a5a565b5190516001600160a01b03909116908061075a575b50505b610173565b818180471061079d575b50600080808481945af1610776610bc3565b5061075257600080516020610da38339815191526020600092604051908152a33880610752565b60009192506020600080516020610da383398151915291604051908152a3478138610764565b909150600260ff825116146000146107ec5750508051610755906001600160a01b031682610a5a565b5160ff166003146107fe575b50610173565b6080015181516040516370a0823160e01b81523060048201526001600160a01b039283169392909116602082602481875afa91821561034d576000926108a0575b50811561088b5760405163a9059cbb60e01b60208201526001600160a01b03919091166024820152604480820192909252908152909161088591906102d26064836109de565b386107f8565b836308a285bb60e21b60005260045260246000fd5b90916020823d6020116108cc575b816108bb602093836109de565b81010312610342575051903861083f565b3d91506108ae565b909260a0823d60a01161095a575b816108ef60a093836109de565b81010312610342575061094e60806040519261090a846109c3565b61091381610a15565b845261092160208201610a15565b602085015261093260408201610a15565b604085015261094360608201610a15565b606085015201610a01565b6080820152913861012d565b3d91506108e2565b604084830312610557576040805191908201906001600160401b038211838310176109ad57604092602092845261099887610a01565b815282870151838201528152019301926100ee565b634e487b7160e01b600052604160045260246000fd5b60a081019081106001600160401b038211176109ad57604052565b601f909101601f19168101906001600160401b038211908210176109ad57604052565b51906001600160a01b038216820361055757565b519060ff8216820361055757565b8051821015610a375760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b919082039182116104ad57565b90608082018051519160005b838110610a74575050505050565b82516001600160a01b0390610a8a908390610a23565b5151166020610a9a838651610a23565b510151906040516370a0823160e01b8152306004820152602081602481855afa90811561034d57600091610b91575b508751600194939291906001600160a01b03878116911681148015610b88575b15610b485790918093868060a01b038b51168303610b27575b5050508481610b16575b5050505b01610a66565b610b1f92610c02565b388084610b0c565b6020600080516020610da383398151915291604051908152a3388281610b02565b50610b54838784610c02565b828111610b64575b505050610b10565b610b7a610b8093868060a01b038b511692610a4d565b91610c02565b388080610b5c565b50838210610ae9565b906020823d8211610bbb575b81610baa602093836109de565b810103126103425750516001610ac9565b3d9150610b9d565b3d15610bfd573d906001600160401b0382116109ad5760405191610bf1601f8201601f1916602001846109de565b82523d6000602084013e565b606090565b60405163a9059cbb60e01b602082019081526001600160a01b0384166024830152604480830186905282529193929190610c3d6064826109de565b6020600080938193519082895af115918219610cac575b8215610c90575b5050610c6657505050565b6040519182526001600160a01b03908116921690600080516020610da383398151915290602090a3565b909150610ca35750823b155b3880610c5b565b60011415610c9c565b50506000513d610c54565b519065ffffffffffff8216820361055757565b600080610cf39260018060a01b03169360208151910182865af1610cec610bc3565b9083610d41565b8051908115159182610d1d575b5050610d095750565b635274afe760e01b60005260045260246000fd5b81925090602091810103126105575760200151801590811503610557573880610d00565b90610d675750805115610d5657805190602001fd5b630a12f52160e11b60005260046000fd5b81511580610d99575b610d78575090565b639996b31560e01b60009081526001600160a01b0391909116600452602490fd5b50803b15610d7056fedce1598fdc26bc6ef7bef35c4bf92827604fbe4defdcb5c8569c2c8e035acde1"
/**
* Deployed bytecode for the Vault contract
*/
export const VaultDeployedBytecode = "0x600080fdfea2646970667358221220cadc3d52a4c2e6e28d1228b732150bbe24bca3ad4275e2449c1b31062300fa6f64736f6c634300081b0033"