@augumented-finance/protocol-v1
Version:
Augmented Protocol smart contracts
515 lines • 26.6 kB
JavaScript
"use strict";
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ZombieAdapterFactory = void 0;
const contracts_1 = require("@ethersproject/contracts");
class ZombieAdapterFactory extends contracts_1.ContractFactory {
constructor(signer) {
super(_abi, _bytecode, signer);
}
deploy(controller, originAsset, overrides) {
return super.deploy(controller, originAsset, overrides || {});
}
getDeployTransaction(controller, originAsset, overrides) {
return super.getDeployTransaction(controller, originAsset, overrides || {});
}
attach(address) {
return super.attach(address);
}
connect(signer) {
return super.connect(signer);
}
static connect(address, signerOrProvider) {
return new contracts_1.Contract(address, _abi, signerOrProvider);
}
}
exports.ZombieAdapterFactory = ZombieAdapterFactory;
const _abi = [
{
inputs: [
{
internalType: "address",
name: "controller",
type: "address",
},
{
internalType: "address",
name: "originAsset",
type: "address",
},
],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "token",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "holder",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "internalBalance",
type: "uint256",
},
{
indexed: true,
internalType: "uint64",
name: "referralCode",
type: "uint64",
},
],
name: "DepositedForMigrate",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "token",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "holder",
type: "address",
},
{
indexed: false,
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
indexed: false,
internalType: "uint256",
name: "internalBalance",
type: "uint256",
},
],
name: "WithdrawnFromMigrate",
type: "event",
},
{
inputs: [],
name: "ORIGIN_ASSET_ADDRESS",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "UNDERLYING_ASSET_ADDRESS",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "admin_enableClaims",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "contract ILendableToken",
name: "targetAsset",
type: "address",
},
],
name: "admin_migrateAll",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "contract IBalanceHook",
name: "rewardPool",
type: "address",
},
],
name: "admin_setRewardPool",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "token",
type: "address",
},
{
internalType: "address",
name: "to",
type: "address",
},
],
name: "admin_sweepToken",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "holder",
type: "address",
},
],
name: "balanceForMigrate",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "holder",
type: "address",
},
],
name: "balanceMigrated",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "holder",
type: "address",
},
],
name: "claimMigrated",
outputs: [
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "bool",
name: "claimable",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "holder",
type: "address",
},
{
internalType: "uint256",
name: "divisor",
type: "uint256",
},
],
name: "claimMigratedPortion",
outputs: [
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "bool",
name: "claimable",
type: "bool",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "address",
name: "holder",
type: "address",
},
{
internalType: "uint64",
name: "referralCode",
type: "uint64",
},
],
name: "depositToMigrate",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "getController",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "getRewardPool",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "isClaimable",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "isPaused",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "holder",
type: "address",
},
{
internalType: "uint256",
name: "preBalance",
type: "uint256",
},
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "uint64",
name: "referralCode",
type: "uint64",
},
],
name: "postDepositOnBehalf",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "preDepositOnBehalf",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "bool",
name: "paused",
type: "bool",
},
],
name: "setPaused",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "totalBalanceForMigrate",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "totalScaledBalances",
outputs: [
{
internalType: "uint256",
name: "totalDeposited",
type: "uint256",
},
{
internalType: "uint256",
name: "totalMigrated",
type: "uint256",
},
{
internalType: "uint256",
name: "totalClaimed",
type: "uint256",
},
{
internalType: "bool",
name: "migrated",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
],
name: "withdrawFromMigrate",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "uint256",
name: "amount",
type: "uint256",
},
{
internalType: "address",
name: "holder",
type: "address",
},
],
name: "withdrawFromMigrateOnBehalf",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "nonpayable",
type: "function",
},
];
const _bytecode = "0x608060405234801561001057600080fd5b50604051611b6e380380611b6e8339818101604052604081101561003357600080fd5b508051602091820151604080516318160ddd60e01b81529051929391928492849283926000926001600160a01b038516926318160ddd9260048083019392829003018186803b15801561008557600080fd5b505afa158015610099573d6000803e3d6000fd5b505050506040513d60208110156100af57600080fd5b5051116100f4576040805162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b21037b934b3b4b760911b604482015290519081900360640190fd5b600180546001600160a01b03199081166001600160a01b03948516179091556000805482169484169490941784556002805490911691909216179055611a2c925082915061014290396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806374478bb3116100b8578063b16a19de1161007c578063b16a19de14610387578063b187bd261461038f578063c9e9ca3c14610397578063df60de9d146103b4578063e0fbdf23146103bc578063fe3c410b146103ec57610142565b806374478bb3146102b15780637a050ea5146102cd5780637f874994146102f357806390c203c51461031f57806399e4a6cd1461036157610142565b80633f0de7421161010a5780633f0de742146101ea57806351231f29146102295780635ec5cf36146102315780635fcb7e8114610239578063615036c11461025f57806365fc09a61461028b57610142565b806306dea8671461014757806316c38b3c1461016b5780631b8b13a71461018c5780633018205f146101945780633c7158d11461019c575b600080fd5b61014f61041a565b604080516001600160a01b039092168252519081900360200190f35b61018a6004803603602081101561018157600080fd5b5035151561042a565b005b61014f61048a565b61014f610499565b6101d8600480360360608110156101b257600080fd5b5080359060208101356001600160a01b0316906040013567ffffffffffffffff166104a8565b60408051918252519081900360200190f35b6102106004803603602081101561020057600080fd5b50356001600160a01b03166105cc565b6040805192835290151560208301528051918290030190f35b61018a610626565b6101d8610684565b6101d86004803603602081101561024f57600080fd5b50356001600160a01b03166106a9565b6101d86004803603604081101561027557600080fd5b50803590602001356001600160a01b03166106fa565b61018a600480360360208110156102a157600080fd5b50356001600160a01b03166107ab565b6102b961081a565b604080519115158252519081900360200190f35b6101d8600480360360208110156102e357600080fd5b50356001600160a01b0316610824565b6102106004803603604081101561030957600080fd5b506001600160a01b038135169060200135610846565b6101d86004803603608081101561033557600080fd5b5080356001600160a01b0316906020810135906040810135906060013567ffffffffffffffff166108a2565b61018a6004803603602081101561037757600080fd5b50356001600160a01b03166109f0565b61014f610a9f565b6102b9610aae565b6101d8600480360360208110156103ad57600080fd5b5035610ab7565b6101d8610ac3565b6103c4610acd565b6040805194855260208501939093528383019190915215156060830152519081900360800190f35b6101d86004803603604081101561040257600080fd5b506001600160a01b0381358116916020013516610af2565b6001546001600160a01b03165b90565b6000546001600160a01b03163314610477576040805162461bcd60e51b815260206004820152601c602482015260008051602061192c833981519152604482015290519081900360640190fd5b600a805460ff1916911515919091179055565b6005546001600160a01b031690565b6000546001600160a01b031690565b6006546000906001600160a01b031615610501576040805162461bcd60e51b81526020600482015260156024820152741b5a59dc985d1a5b99c81bdc881b5a59dc985d1959605a1b604482015290519081900360640190fd5b600a5460ff1615610542576040805162461bcd60e51b81526020600482015260066024820152651c185d5cd95960d21b604482015290519081900360640190fd5b6001600160a01b038316610592576040805162461bcd60e51b81526020600482015260126024820152711a1bdb19195c881a5cc81c995c5d5a5c995960721b604482015290519081900360640190fd5b600061059c610d43565b6001549091506105b7906001600160a01b0316853088610dbf565b6105c384828786610e1f565b95945050505050565b600a54600090819060ff1615610612576040805162461bcd60e51b81526020600482015260066024820152651c185d5cd95960d21b604482015290519081900360640190fd5b61061d836001610e71565b91509150915091565b6000546001600160a01b03163314610673576040805162461bcd60e51b815260206004820152601c602482015260008051602061192c833981519152604482015290519081900360640190fd5b600a805461ff001916610100179055565b60006003546000141561069957506000610427565b6106a4600354610427565b905090565b6000600354600014156106be575060006106f5565b6003546008546001600160a01b0384166000908152600460205260409020546106f292916106ec9190610f82565b90610fdb565b90505b919050565b600080546001600160a01b03163314610748576040805162461bcd60e51b815260206004820152601c602482015260008051602061192c833981519152604482015290519081900360640190fd5b6001600160a01b038216610798576040805162461bcd60e51b81526020600482015260126024820152711a1bdb19195c881a5cc81c995c5d5a5c995960721b604482015290519081900360640190fd5b6107a2838361101d565b90505b92915050565b6000546001600160a01b031633146107f8576040805162461bcd60e51b815260206004820152601c602482015260008051602061192c833981519152604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b60006106a46111da565b6001600160a01b0381166000908152600460205260408120546106f290610427565b600a54600090819060ff161561088c576040805162461bcd60e51b81526020600482015260066024820152651c185d5cd95960d21b604482015290519081900360640190fd5b6108968484610e71565b915091505b9250929050565b6006546000906001600160a01b0316156108fb576040805162461bcd60e51b81526020600482015260156024820152741b5a59dc985d1a5b99c81bdc881b5a59dc985d1959605a1b604482015290519081900360640190fd5b600a5460ff161561093c576040805162461bcd60e51b81526020600482015260066024820152651c185d5cd95960d21b604482015290519081900360640190fd5b6000546001600160a01b03163314610989576040805162461bcd60e51b815260206004820152601c602482015260008051602061192c833981519152604482015290519081900360640190fd5b6001600160a01b0385166109d9576040805162461bcd60e51b81526020600482015260126024820152711a1bdb19195c881a5cc81c995c5d5a5c995960721b604482015290519081900360640190fd5b6109e585858585610e1f565b90505b949350505050565b6000546001600160a01b03163314610a3d576040805162461bcd60e51b815260206004820152601c602482015260008051602061192c833981519152604482015290519081900360640190fd5b6006546001600160a01b031615610a93576040805162461bcd60e51b81526020600482015260156024820152741b5a59dc985d1a5b99c81bdc881b5a59dc985d1959605a1b604482015290519081900360640190fd5b610a9c81611209565b50565b6002546001600160a01b031690565b600a5460ff1690565b60006106f2823361101d565b60006106a4610d43565b600080600080600354600854600954610ae461121e565b935093509350935090919293565b600080546001600160a01b03163314610b40576040805162461bcd60e51b815260206004820152601c602482015260008051602061192c833981519152604482015290519081900360640190fd5b6001600160a01b038316610b8b576040805162461bcd60e51b815260206004820152600d60248201526c3ab735b737bbb7103a37b5b2b760991b604482015290519081900360640190fd5b6001600160a01b038216610be6576040805162461bcd60e51b815260206004820152601d60248201527f76616c69642064657374696e6174696f6e206973207265717569726564000000604482015290519081900360640190fd5b610bee61121e565b15610c45576006546001600160a01b0384811691161415610c405760405162461bcd60e51b815260040180806020018281038252602d8152602001806118ff602d913960400191505060405180910390fd5b610cac565b6002546001600160a01b03848116911614801590610c7157506001546001600160a01b03848116911614155b610cac5760405162461bcd60e51b815260040180806020018281038252603781526020018061196d6037913960400191505060405180910390fd5b6000836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015610cfb57600080fd5b505afa158015610d0f573d6000803e3d6000fd5b505050506040513d6020811015610d2557600080fd5b5051905080156107a2576107a26001600160a01b038516848361122f565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610d8e57600080fd5b505afa158015610da2573d6000803e3d6000fd5b505050506040513d6020811015610db857600080fd5b5051905090565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610e19908590611286565b50505050565b6000610e2a8561143e565b610e655760405162461bcd60e51b81526004018080602001828103825260298152602001806119ce6029913960400191505060405180910390fd5b6109e585858585611464565b600080610e7c6111da565b610e8b5750600090508061089b565b6001600160a01b03841660009081526004602052604090205480610eb75760006001925092505061089b565b6000806001861115610f0957858381610ecc57fe5b04915081610ee457600060019450945050505061089b565b506001600160a01b038616600090815260046020526040902081830390819055610f26565b6001600160a01b0387166000908152600460205260408120558291505b6009805483019055600354610f3e5760009150610f5c565b610f596003546106ec60085485610f8290919063ffffffff16565b91505b610f6a878483600354611594565b610f748288611620565b976001975095505050505050565b600082610f91575060006107a5565b82820282848281610f9e57fe5b04146107a25760405162461bcd60e51b815260040180806020018281038252602181526020018061194c6021913960400191505060405180910390fd5b60006107a283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611628565b6006546000906001600160a01b031615611076576040805162461bcd60e51b81526020600482015260156024820152741b5a59dc985d1a5b99c81bdc881b5a59dc985d1959605a1b604482015290519081900360640190fd5b6001600160a01b0382166000908152600460205260409020548061109e5760009150506107a5565b600354600090816110ae84610427565b90508087106110ef576001600160a01b0386166000908152600460205260408120559550856110dd81876116ca565b506110e882856116eb565b9150611164565b60006110fb88886116ca565b9050611139816040518060400160405280600f81526020016e32bc31b2b9b9903a3930b739b332b960891b815250876117299092919063ffffffff16565b6001600160a01b0388166000908152600460205260409020819055935061116083826116eb565b9250505b60038290556005546001600160a01b0316156111865761118686858585611594565b600154604080518981526020810186905281516001600160a01b03808b169416927fc35681e1ad3bc2dde86d58e740e9d6de0e4b86d5c1972b8e47453c7f7024190a928290030190a3509495945050505050565b60006111e461121e565b80156111f75750600a54610100900460ff165b80156106a4575050600a5460ff161590565b50600680546001600160a01b03191630179055565b6006546001600160a01b0316151590565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611281908490611286565b505050565b611298826001600160a01b0316611783565b6112e9576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106113275780518252601f199092019160209182019101611308565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611389576040519150601f19603f3d011682016040523d82523d6000602084013e61138e565b606091505b5091509150816113e5576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115610e195780806020019051602081101561140157600080fd5b5051610e195760405162461bcd60e51b815260040180806020018281038252602a8152602001806119a4602a913960400191505060405180910390fd5b3f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4701490565b600061147884611472610d43565b906116eb565b93506114ad6040518060400160405280600f81526020016e1a5b9d195c9b985b11195c1bdcda5d608a1b8152508686866117bc565b836114ba575060006109e8565b6001600160a01b038516600090815260046020526040812054906114de8287611883565b6001600160a01b03881660009081526004602052604081208290556003549192509061150a9088611883565b60038190556005549091506001600160a01b03161561152f5761152f88848484611594565b6001546040805188815260208101859052815167ffffffffffffffff8916936001600160a01b03808e16949116927f84c7ca3cae0879e95be9cb6ba730d8558c83ee5ccc1a293f8b570e04d2e04796929081900390910190a450939695505050505050565b60055460025460408051632568149560e21b81526001600160a01b0392831660048201528783166024820152604481018790526064810186905260848101859052905191909216916395a052549160a480830192600092919082900301818387803b15801561160257600080fd5b505af1158015611616573d6000803e3d6000fd5b5050505050505050565b600092915050565b600081836116b45760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611679578181015183820152602001611661565b50505050905090810190601f1680156116a65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816116c057fe5b0495945050505050565b6001546000906116e4906001600160a01b0316838561122f565b5090919050565b60006107a283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152505b6000818484111561177b5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611679578181015183820152602001611661565b505050900390565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906109e8575050151592915050565b610e19848484846040516024018080602001856001600160a01b03168152602001848152602001838152602001828103825286818151815260200191508051906020019080838360005b8381101561181e578181015183820152602001611806565b50505050905090810190601f16801561184b5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b031663daa394bd60e01b17905295506118dd945050505050565b6000828201838110156107a2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b80516a636f6e736f6c652e6c6f67602083016000808483855afa505050505056fe7461726765742061737365742063616e206e6f74206265207377657074206166746572206d6967726174696f6e63616c6c6572206973206e6f742074686520636f6e74726f6c6c657200000000536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776f726967696e20616e6420756e6465726c79696e672063616e206f6e6c79206265207377657074206166746572206d6967726174696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565646f6e6c792075736572732061726520616c6c6f7765642c20627574206e6f7420636f6e747261637473a264697066735822122088e8ca513144adb61ffdb2533467358a8c7d80d7b9e43006a4fc23c20e8f7df064736f6c634300060c0033";
//# sourceMappingURL=ZombieAdapterFactory.js.map