Commit d4de0cf3 authored by Matthew Slipper's avatar Matthew Slipper Committed by GitHub

Merge pull request #2321 from mslipper/feat/teleportr-kovan

go/teleportr contracts: Updates to support deploying Teleportr to Kovan
parents defdeffd 7150efbb
......@@ -142,15 +142,15 @@ func NewConfig(ctx *cli.Context) (Config, error) {
return Config{
Hostname: ctx.GlobalString(flags.APIHostnameFlag.Name),
Port: uint16(ctx.GlobalUint64(flags.APIPortFlag.Name)),
L1EthRpc: ctx.GlobalString(flags.APIL1EthRpcFlag.Name),
DepositAddress: ctx.GlobalString(flags.APIDepositAddressFlag.Name),
NumConfirmations: ctx.GlobalUint64(flags.APINumConfirmationsFlag.Name),
PostgresHost: ctx.GlobalString(flags.APIPostgresHostFlag.Name),
PostgresPort: uint16(ctx.GlobalUint64(flags.APIPostgresPortFlag.Name)),
PostgresUser: ctx.GlobalString(flags.APIPostgresUserFlag.Name),
PostgresPassword: ctx.GlobalString(flags.APIPostgresPasswordFlag.Name),
PostgresDBName: ctx.GlobalString(flags.APIPostgresDBNameFlag.Name),
PostgresEnableSSL: ctx.GlobalBool(flags.APIPostgresEnableSSLFlag.Name),
L1EthRpc: ctx.GlobalString(flags.L1EthRpcFlag.Name),
DepositAddress: ctx.GlobalString(flags.DepositAddressFlag.Name),
NumConfirmations: ctx.GlobalUint64(flags.NumDepositConfirmationsFlag.Name),
PostgresHost: ctx.GlobalString(flags.PostgresHostFlag.Name),
PostgresPort: uint16(ctx.GlobalUint64(flags.PostgresPortFlag.Name)),
PostgresUser: ctx.GlobalString(flags.PostgresUserFlag.Name),
PostgresPassword: ctx.GlobalString(flags.PostgresPasswordFlag.Name),
PostgresDBName: ctx.GlobalString(flags.PostgresDBNameFlag.Name),
PostgresEnableSSL: ctx.GlobalBool(flags.PostgresEnableSSLFlag.Name),
}, nil
}
......
......@@ -37,7 +37,7 @@ type TeleportrDisburserDisbursement struct {
// TeleportrDisburserMetaData contains all meta data concerning the TeleportrDisburser contract.
var TeleportrDisburserMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"BalanceWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"depositId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DisbursementFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"depositId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DisbursementSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nextDepositId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"internalType\":\"structTeleportrDisburser.Disbursement[]\",\"name\":\"_disbursements\",\"type\":\"tuple[]\"}],\"name\":\"disburse\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalDisbursements\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
Bin: "0x608060405234801561001057600080fd5b5061001a33610024565b6000600155610074565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6109e1806100836000396000f3fe6080604052600436106100655760003560e01c80638da5cb5b116100435780638da5cb5b146100bf578063ad48144d146100f4578063f2fde38b1461010757600080fd5b806325999e7f1461006a5780635fd8c71014610093578063715018a6146100aa575b600080fd5b34801561007657600080fd5b5061008060015481565b6040519081526020015b60405180910390f35b34801561009f57600080fd5b506100a8610127565b005b3480156100b657600080fd5b506100a8610248565b3480156100cb57600080fd5b5060005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161008a565b6100a8610102366004610840565b6102d5565b34801561011357600080fd5b506100a86101223660046108bf565b61069b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6000546040805147808252915173ffffffffffffffffffffffffffffffffffffffff9093169283917fddc398b321237a8d40ac914388309c2f52a08c134e4dc4ce61e32f57cb7d80f1919081900360200190a260405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610243573d6000803e3d6000fd5b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101a4565b6102d360006107cb565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610356576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101a4565b80806103be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f2064697362757273656d656e74730000000000000000000000000000000060448201526064016101a4565b60015484811461042a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f556e6578706563746564206e657874206465706f73697420696400000000000060448201526064016101a4565b60018054830190556000805b8381101561047757858582818110610450576104506108fc565b610463926040909102013590508361095a565b91508061046f81610972565b915050610436565b50348114610507576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f44697362757273656d656e7420746f74616c20213d20616d6f756e742073656e60448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016101a4565b60005b83811015610692576000868683818110610526576105266108fc565b9050604002016000013590506000878784818110610546576105466108fc565b905060400201602001602081019061055e91906108bf565b905060008173ffffffffffffffffffffffffffffffffffffffff16836108fc90604051600060405180830381858888f193505050503d80600081146105bf576040519150601f19603f3d011682016040523d82523d6000602084013e6105c4565b606091505b505090508015610624578173ffffffffffffffffffffffffffffffffffffffff16867feaa22fd2d7b875476355b32cf719794faf9d91b66e73bc6375a053cace9caaee8560405161061791815260200190565b60405180910390a3610676565b8173ffffffffffffffffffffffffffffffffffffffff16867f9b478c095979d3d3a7d602ffd9ee1f0843204d853558ae0882c8fcc0a5bc78cf8560405161066d91815260200190565b60405180910390a35b600186019550505050808061068a90610972565b91505061050a565b50505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101a4565b73ffffffffffffffffffffffffffffffffffffffff81166107bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101a4565b6107c8816107cb565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060006040848603121561085557600080fd5b83359250602084013567ffffffffffffffff8082111561087457600080fd5b818601915086601f83011261088857600080fd5b81358181111561089757600080fd5b8760208260061b85010111156108ac57600080fd5b6020830194508093505050509250925092565b6000602082840312156108d157600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146108f557600080fd5b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561096d5761096d61092b565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156109a4576109a461092b565b506001019056fea2646970667358221220955e65ceaae72ce1d31ed14064916aa5576cb375d1a20fa0959e5a0d69e361fc64736f6c63430008090033",
Bin: "0x608060405234801561001057600080fd5b5061001a33610024565b6000600155610074565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6109e1806100836000396000f3fe6080604052600436106100655760003560e01c80638da5cb5b116100435780638da5cb5b146100bf578063ad48144d146100f4578063f2fde38b1461010757600080fd5b806325999e7f1461006a5780635fd8c71014610093578063715018a6146100aa575b600080fd5b34801561007657600080fd5b5061008060015481565b6040519081526020015b60405180910390f35b34801561009f57600080fd5b506100a8610127565b005b3480156100b657600080fd5b506100a8610248565b3480156100cb57600080fd5b5060005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161008a565b6100a8610102366004610840565b6102d5565b34801561011357600080fd5b506100a86101223660046108bf565b61069b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6000546040805147808252915173ffffffffffffffffffffffffffffffffffffffff9093169283917fddc398b321237a8d40ac914388309c2f52a08c134e4dc4ce61e32f57cb7d80f1919081900360200190a260405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610243573d6000803e3d6000fd5b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101a4565b6102d360006107cb565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610356576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101a4565b80806103be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f4e6f2064697362757273656d656e74730000000000000000000000000000000060448201526064016101a4565b60015484811461042a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f556e6578706563746564206e657874206465706f73697420696400000000000060448201526064016101a4565b60018054830190556000805b8381101561047757858582818110610450576104506108fc565b610463926040909102013590508361095a565b91508061046f81610972565b915050610436565b50348114610507576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f44697362757273656d656e7420746f74616c20213d20616d6f756e742073656e60448201527f740000000000000000000000000000000000000000000000000000000000000060648201526084016101a4565b60005b83811015610692576000868683818110610526576105266108fc565b9050604002016000013590506000878784818110610546576105466108fc565b905060400201602001602081019061055e91906108bf565b905060008173ffffffffffffffffffffffffffffffffffffffff16836108fc90604051600060405180830381858888f193505050503d80600081146105bf576040519150601f19603f3d011682016040523d82523d6000602084013e6105c4565b606091505b505090508015610624578173ffffffffffffffffffffffffffffffffffffffff16867feaa22fd2d7b875476355b32cf719794faf9d91b66e73bc6375a053cace9caaee8560405161061791815260200190565b60405180910390a3610676565b8173ffffffffffffffffffffffffffffffffffffffff16867f9b478c095979d3d3a7d602ffd9ee1f0843204d853558ae0882c8fcc0a5bc78cf8560405161066d91815260200190565b60405180910390a35b600186019550505050808061068a90610972565b91505061050a565b50505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461071c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101a4565b73ffffffffffffffffffffffffffffffffffffffff81166107bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101a4565b6107c8816107cb565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008060006040848603121561085557600080fd5b83359250602084013567ffffffffffffffff8082111561087457600080fd5b818601915086601f83011261088857600080fd5b81358181111561089757600080fd5b8760208260061b85010111156108ac57600080fd5b6020830194508093505050509250925092565b6000602082840312156108d157600080fd5b813573ffffffffffffffffffffffffffffffffffffffff811681146108f557600080fd5b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561096d5761096d61092b565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156109a4576109a461092b565b506001019056fea26469706673582212209c98cb9cc04bc2bf5e8c0baf23ef87d045122afe6cfbb0e3c31bd854dd7fad7d64736f6c63430008090033",
}
// TeleportrDisburserABI is the input ABI used to generate the binding from.
......
......@@ -33,6 +33,13 @@ func main() {
app.Name = "teleportr"
app.Usage = "Teleportr"
app.Description = "Teleportr bridge from L1 to L2"
app.Commands = []cli.Command{
{
Name: "migrate",
Usage: "Migrates teleportr's database",
Action: teleportr.Migrate(),
},
}
app.Action = teleportr.Main(GitVersion)
err := app.Run(os.Args)
......
......@@ -390,7 +390,8 @@ dep.txn_hash, dep.block_number, dep.block_timestamp,
dis.txn_hash, dis.block_number, dis.block_timestamp
FROM deposits AS dep
LEFT JOIN disbursements AS dis
ON dep.id = dis.id AND dep.txn_hash = $1
ON dep.id = dis.id
WHERE dep.txn_hash = $1
LIMIT 1
`
......@@ -416,7 +417,8 @@ dep.txn_hash, dep.block_number, dep.block_timestamp,
dis.txn_hash, dis.block_number, dis.block_timestamp
FROM deposits AS dep
LEFT JOIN disbursements AS dis
ON dep.id = dis.id AND dep.address = $1
ON dep.id = dis.id
WHERE dep.address = $1
ORDER BY dep.block_timestamp DESC, dep.id DESC
LIMIT 100
`
......
......@@ -234,6 +234,7 @@ func (d *Driver) CraftBatchTx(
var disbursements []disburse.TeleportrDisburserDisbursement
var depositIDs []uint64
value := new(big.Int)
for _, deposit := range confirmedDeposits {
disbursement := disburse.TeleportrDisburserDisbursement{
Amount: deposit.Amount,
......@@ -241,6 +242,7 @@ func (d *Driver) CraftBatchTx(
}
disbursements = append(disbursements, disbursement)
depositIDs = append(depositIDs, deposit.ID)
value = value.Add(value, deposit.Amount)
}
log.Info(name+" crafting batch tx", "start", start, "end", end,
......@@ -250,7 +252,7 @@ func (d *Driver) CraftBatchTx(
log.Info(name+" batch constructed", "num_disbursements", len(disbursements))
gasPrice, err := d.cfg.L1Client.SuggestGasPrice(ctx)
gasPrice, err := d.cfg.L2Client.SuggestGasPrice(ctx)
if err != nil {
return nil, err
}
......@@ -265,6 +267,7 @@ func (d *Driver) CraftBatchTx(
opts.Nonce = nonce
opts.GasPrice = gasPrice
opts.NoSend = true
opts.Value = value
tx, err := d.disburserContract.Disburse(opts, start, disbursements)
if err != nil {
......@@ -299,6 +302,7 @@ func (d *Driver) UpdateGasPrice(
opts.Context = ctx
opts.Nonce = new(big.Int).SetUint64(tx.Nonce())
opts.GasPrice = gasPrice
opts.Value = tx.Value()
opts.NoSend = true
return d.rawDisburserContract.RawTransact(opts, tx.Data())
......@@ -313,7 +317,7 @@ func (d *Driver) SendTransaction(
txHash := tx.Hash()
startID := d.currentDepositIDs[0]
endID := d.currentDepositIDs[len(d.currentDepositIDs)] + 1
endID := d.currentDepositIDs[len(d.currentDepositIDs) - 1] + 1
// Record the pending transaction hash so that we can recover if we crash
// after publishing.
......
......@@ -24,74 +24,18 @@ var (
Required: true,
EnvVar: prefixAPIEnvVar("PORT"),
}
APIL1EthRpcFlag = cli.StringFlag{
Name: "l1-eth-rpc",
Usage: "The endpoint for the L1 ETH provider",
Required: true,
EnvVar: prefixAPIEnvVar("L1_ETH_RPC"),
}
APIDepositAddressFlag = cli.StringFlag{
Name: "deposit-address",
Usage: "Address of the TeleportrDeposit contract",
Required: true,
EnvVar: prefixAPIEnvVar("DEPOSIT_ADDRESS"),
}
APINumConfirmationsFlag = cli.StringFlag{
Name: "num-confirmations",
Usage: "Number of confirmations required until deposits are " +
"considered confirmed",
Required: true,
EnvVar: prefixAPIEnvVar("NUM_CONFIRMATIONS"),
}
APIPostgresHostFlag = cli.StringFlag{
Name: "postgres-host",
Usage: "Host of the teleportr postgres instance",
Required: true,
EnvVar: prefixAPIEnvVar("POSTGRES_HOST"),
}
APIPostgresPortFlag = cli.Uint64Flag{
Name: "postgres-port",
Usage: "Port of the teleportr postgres instance",
Required: true,
EnvVar: prefixAPIEnvVar("POSTGRES_PORT"),
}
APIPostgresUserFlag = cli.StringFlag{
Name: "postgres-user",
Usage: "Username of the teleportr postgres instance",
Required: true,
EnvVar: prefixAPIEnvVar("POSTGRES_USER"),
}
APIPostgresPasswordFlag = cli.StringFlag{
Name: "postgres-password",
Usage: "Password of the teleportr postgres instance",
Required: true,
EnvVar: prefixAPIEnvVar("POSTGRES_PASSWORD"),
}
APIPostgresDBNameFlag = cli.StringFlag{
Name: "postgres-db-name",
Usage: "Database name of the teleportr postgres instance",
Required: true,
EnvVar: prefixAPIEnvVar("POSTGRES_DB_NAME"),
}
APIPostgresEnableSSLFlag = cli.BoolFlag{
Name: "postgres-enable-ssl",
Usage: "Whether or not to enable SSL on connections to " +
"teleportr postgres instance",
Required: true,
EnvVar: prefixAPIEnvVar("POSTGRES_ENABLE_SSL"),
}
)
var APIFlags = []cli.Flag{
APIHostnameFlag,
APIPortFlag,
APIL1EthRpcFlag,
APIDepositAddressFlag,
APINumConfirmationsFlag,
APIPostgresHostFlag,
APIPostgresPortFlag,
APIPostgresUserFlag,
APIPostgresPasswordFlag,
APIPostgresDBNameFlag,
APIPostgresEnableSSLFlag,
L1EthRpcFlag,
DepositAddressFlag,
NumDepositConfirmationsFlag,
PostgresHostFlag,
PostgresPortFlag,
PostgresUserFlag,
PostgresPasswordFlag,
PostgresDBNameFlag,
PostgresEnableSSLFlag,
}
......@@ -126,16 +126,15 @@ var (
Required: true,
EnvVar: prefixEnvVar("POSTGRES_DB_NAME"),
}
/* Optional Flags */
PostgresEnableSSLFlag = cli.BoolFlag{
Name: "postgres-enable-ssl",
Usage: "Whether or not to enable SSL on connections to " +
"teleportr postgres instance",
Required: true,
EnvVar: prefixEnvVar("POSTGRES_ENABLE_SSL"),
EnvVar: prefixEnvVar("POSTGRES_ENABLE_SSL"),
}
/* Optional Flags */
LogLevelFlag = cli.StringFlag{
Name: "log-level",
Usage: "The lowest log level that will be output",
......@@ -208,12 +207,12 @@ var requiredFlags = []cli.Flag{
PostgresUserFlag,
PostgresPasswordFlag,
PostgresDBNameFlag,
PostgresEnableSSLFlag,
}
var optionalFlags = []cli.Flag{
LogLevelFlag,
LogTerminalFlag,
PostgresEnableSSLFlag,
DisburserPrivateKeyFlag,
MnemonicFlag,
DisburserHDPathFlag,
......
......@@ -85,7 +85,7 @@ func Main(gitVersion string) func(ctx *cli.Context) error {
go metrics.RunServer(cfg.MetricsHostname, cfg.MetricsPort)
}
chainID, err := l1Client.ChainID(ctx)
chainID, err := l2Client.ChainID(ctx)
if err != nil {
return err
}
......@@ -120,7 +120,7 @@ func Main(gitVersion string) func(ctx *cli.Context) error {
Driver: teleportrDriver,
PollInterval: cfg.PollInterval,
ClearPendingTx: false,
L1Client: l1Client,
L1Client: l2Client,
TxManagerConfig: txManagerConfig,
})
......@@ -152,3 +152,33 @@ func Main(gitVersion string) func(ctx *cli.Context) error {
return nil
}
}
func Migrate() func(ctx *cli.Context) error {
return func(cliCtx *cli.Context) error {
cfg, err := NewConfig(cliCtx)
if err != nil {
return err
}
log.Info("Initializing teleportr")
database, err := db.Open(db.Config{
Host: cfg.PostgresHost,
Port: uint16(cfg.PostgresPort),
User: cfg.PostgresUser,
Password: cfg.PostgresPassword,
DBName: cfg.PostgresDBName,
EnableSSL: cfg.PostgresEnableSSL,
})
if err != nil {
return err
}
log.Info("Migrating database")
if err := database.Migrate(); err != nil {
return err
}
log.Info("Done")
return nil
}
}
\ No newline at end of file
FROM golang:1.17.3-alpine3.13 as builder
RUN apk add --no-cache make gcc musl-dev linux-headers git jq bash
COPY ./go/bss-core /go/bss-core
COPY ./go/teleportr/go.mod ./go/teleportr/go.sum /go/teleportr/
WORKDIR /go/teleportr
RUN go mod graph | grep -v bss-core | awk '{if ($1 !~ "@") print $2}' | xargs -n 1 go get
COPY ./go/teleportr/ ./
RUN make teleportr teleportr-api
FROM alpine:3.13
RUN apk add --no-cache ca-certificates jq curl
COPY --from=builder /go/teleportr/teleportr /usr/local/bin/
COPY --from=builder /go/teleportr/teleportr-api /usr/local/bin/
CMD ["teleportr"]
{
"address": "0x4821975ca220601c153d02353300d6ad34adc362",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "_minDepositAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_maxDepositAmount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "_maxBalance",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "balance",
"type": "uint256"
}
],
"name": "BalanceWithdrawn",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "depositId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "emitter",
"type": "address"
},
{
"indexed": true,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "EtherReceived",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "previousBalance",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newBalance",
"type": "uint256"
}
],
"name": "MaxBalanceSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "previousAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newAmount",
"type": "uint256"
}
],
"name": "MaxDepositAmountSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "previousAmount",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "newAmount",
"type": "uint256"
}
],
"name": "MinDepositAmountSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "c__0xbf18ea64",
"type": "bytes32"
}
],
"name": "c_0xbf18ea64",
"outputs": [],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "maxBalance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxDepositAmount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "minDepositAmount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_maxDepositAmount",
"type": "uint256"
}
],
"name": "setMaxAmount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_maxBalance",
"type": "uint256"
}
],
"name": "setMaxBalance",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_minDepositAmount",
"type": "uint256"
}
],
"name": "setMinAmount",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "totalDeposits",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "withdrawBalance",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
],
"transactionHash": "0x83a2775ed8bc832e1a4ae46b003b5b0987a4163cc79224d65fc9c38875f0b452",
"receipt": {
"to": null,
"from": "0x6c2cBc2132aB6Fc48Ebf3569Bdde7B0AA34aa0FC",
"contractAddress": "0x170E152DeDADaa7fE028b025B18748cbab7083bD",
"transactionIndex": 1,
"gasUsed": "1286769",
"logsBloom": "0x00000000000000000000000010000000000000000000000000800000000000000100000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400080000000000000000000000000000040000000000000000000000000000000000000040000000000000000000000000000000000020000000000000000000000000000000000000200000000000000400000000020000000040000000020000000000000000010000000000000008000000000000000000000000000020000",
"blockHash": "0xb2eb3e02f35921cd1201f5a5eecbdf61c6f8196b174fb057e442fc2c85d2635f",
"transactionHash": "0x83a2775ed8bc832e1a4ae46b003b5b0987a4163cc79224d65fc9c38875f0b452",
"logs": [
{
"transactionIndex": 1,
"blockNumber": 30510065,
"transactionHash": "0x83a2775ed8bc832e1a4ae46b003b5b0987a4163cc79224d65fc9c38875f0b452",
"address": "0x170E152DeDADaa7fE028b025B18748cbab7083bD",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000006c2cbc2132ab6fc48ebf3569bdde7b0aa34aa0fc"
],
"data": "0x",
"logIndex": 1,
"blockHash": "0xb2eb3e02f35921cd1201f5a5eecbdf61c6f8196b174fb057e442fc2c85d2635f"
},
{
"transactionIndex": 1,
"blockNumber": 30510065,
"transactionHash": "0x83a2775ed8bc832e1a4ae46b003b5b0987a4163cc79224d65fc9c38875f0b452",
"address": "0x170E152DeDADaa7fE028b025B18748cbab7083bD",
"topics": [
"0x65779d3ca560e9bdec52d08ed75431a84df87cb7796f0e51965f6efc0f556c0f"
],
"data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000038d7ea4c68000",
"logIndex": 2,
"blockHash": "0xb2eb3e02f35921cd1201f5a5eecbdf61c6f8196b174fb057e442fc2c85d2635f"
},
{
"transactionIndex": 1,
"blockNumber": 30510065,
"transactionHash": "0x83a2775ed8bc832e1a4ae46b003b5b0987a4163cc79224d65fc9c38875f0b452",
"address": "0x170E152DeDADaa7fE028b025B18748cbab7083bD",
"topics": [
"0xb1e6cc560df1786578fd4d1fe6e046f089a0c3be401e999b51a5112437911797"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000de0b6b3a7640000",
"logIndex": 3,
"blockHash": "0xb2eb3e02f35921cd1201f5a5eecbdf61c6f8196b174fb057e442fc2c85d2635f"
},
{
"transactionIndex": 1,
"blockNumber": 30510065,
"transactionHash": "0x83a2775ed8bc832e1a4ae46b003b5b0987a4163cc79224d65fc9c38875f0b452",
"address": "0x170E152DeDADaa7fE028b025B18748cbab7083bD",
"topics": [
"0x185c6391e7218e85de8a9346fc72024a0f88e1f04c186e6351230b93976ad50b"
],
"data": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003635c9adc5dea00000",
"logIndex": 4,
"blockHash": "0xb2eb3e02f35921cd1201f5a5eecbdf61c6f8196b174fb057e442fc2c85d2635f"
}
],
"blockNumber": 30510065,
"cumulativeGasUsed": "1322127",
"status": 1,
"byzantium": true
},
"args": [
"1000000000000000",
"1000000000000000000",
"1000000000000000000000"
],
"solcInputHash": "f20d616c1af6713a0e8ca9fae9d7bae7",
"metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minDepositAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxDepositAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxBalance\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"BalanceWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"depositId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"emitter\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EtherReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newBalance\",\"type\":\"uint256\"}],\"name\":\"MaxBalanceSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newAmount\",\"type\":\"uint256\"}],\"name\":\"MaxDepositAmountSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"previousAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newAmount\",\"type\":\"uint256\"}],\"name\":\"MinDepositAmountSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"c__0xbf18ea64\",\"type\":\"bytes32\"}],\"name\":\"c_0xbf18ea64\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDepositAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minDepositAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDepositAmount\",\"type\":\"uint256\"}],\"name\":\"setMaxAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxBalance\",\"type\":\"uint256\"}],\"name\":\"setMaxBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minDepositAmount\",\"type\":\"uint256\"}],\"name\":\"setMinAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalDeposits\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"events\":{\"BalanceWithdrawn(address,uint256)\":{\"params\":{\"balance\":\"The current contract balance paid to the owner.\",\"owner\":\"The current owner and recipient of the funds.\"}},\"EtherReceived(uint256,address,uint256)\":{\"params\":{\"amount\":\"The amount deposited by the payer.\",\"depositId\":\"A unique sequencer number identifying the deposit.\",\"emitter\":\"The sending address of the payer.\"}},\"MaxBalanceSet(uint256,uint256)\":{\"params\":{\"newBalance\":\"The new maximum contract balance.\",\"previousBalance\":\"The previous maximum contract balance.\"}},\"MaxDepositAmountSet(uint256,uint256)\":{\"params\":{\"newAmount\":\"The new maximum deposit amount.\",\"previousAmount\":\"The previous maximum deposit amount.\"}},\"MinDepositAmountSet(uint256,uint256)\":{\"params\":{\"newAmount\":\"The new minimum deposit amount.\",\"previousAmount\":\"The previous minimum deposit amount.\"}}},\"kind\":\"dev\",\"methods\":{\"constructor\":{\"params\":{\"_maxBalance\":\"The initial maximum contract balance.\",\"_maxDepositAmount\":\"The initial maximum deposit amount.\",\"_minDepositAmount\":\"The initial minimum deposit amount.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setMaxAmount(uint256)\":{\"params\":{\"_maxDepositAmount\":\"The new maximum deposit amount.\"}},\"setMaxBalance(uint256)\":{\"params\":{\"_maxBalance\":\"The new maximum contract balance.\"}},\"setMinAmount(uint256)\":{\"params\":{\"_minDepositAmount\":\"The new minimum deposit amount.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"TeleportrDeposit Shout out to 0xclem for providing the inspiration for this contract: https://github.com/0xclem/teleportr/blob/main/contracts/BridgeDeposit.sol\",\"version\":1},\"userdoc\":{\"events\":{\"BalanceWithdrawn(address,uint256)\":{\"notice\":\"Emitted any time the balance is withdrawn by the owner.\"},\"EtherReceived(uint256,address,uint256)\":{\"notice\":\"Emitted any time a successful deposit is received.\"},\"MaxBalanceSet(uint256,uint256)\":{\"notice\":\"Emitted any time the contract maximum balance is set.\"},\"MaxDepositAmountSet(uint256,uint256)\":{\"notice\":\"Emitted any time the maximum deposit amount is set.\"},\"MinDepositAmountSet(uint256,uint256)\":{\"notice\":\"Emitted any time the minimum deposit amount is set.\"}},\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Initializes a new TeleportrDeposit contract.\"},\"maxBalance()\":{\"notice\":\"The maximum balance the contract can hold after a receive.\"},\"maxDepositAmount()\":{\"notice\":\"The maximum amount that be deposited in a receive.\"},\"minDepositAmount()\":{\"notice\":\"The minimum amount that be deposited in a receive.\"},\"setMaxAmount(uint256)\":{\"notice\":\"Sets the maximum amount that can be deposited in a receive.\"},\"setMaxBalance(uint256)\":{\"notice\":\"Sets the maximum balance the contract can hold after a receive.\"},\"setMinAmount(uint256)\":{\"notice\":\"Sets the minimum amount that can be deposited in a receive.\"},\"totalDeposits()\":{\"notice\":\"The total number of successful deposits received.\"},\"withdrawBalance()\":{\"notice\":\"Sends the contract's current balance to the owner.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L1/teleportr/TeleportrDeposit.sol\":\"TeleportrDeposit\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b2ebbbe6d0011175bd9e7268b83de3f9c2f9d8d4cbfbaef12aff977d7d727163\",\"dweb:/ipfs/Qmd5c7Vxtis9wzkDNhxwc6A2QT5H9xn9kfjhx7qx44vpro\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://26e8b38a7ac8e7b4463af00cf7fff1bf48ae9875765bf4f7751e100124d0bc8c\",\"dweb:/ipfs/QmWcsmkVr24xmmjfnBQZoemFniXjj3vwT78Cz6uqZW1Hux\"]},\"contracts/L1/teleportr/TeleportrDeposit.sol\":{\"keccak256\":\"0x885673d5837399f19082826a2bc64889384a39f0999d003bfcca675a26ec2d74\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://d44b9d501288828c6fa026eaa02936301ff0e2037294747d7c1605fa93a598e0\",\"dweb:/ipfs/QmbQ2pQnvkTzuwns4azKVPmKvB2oPV6rJ6wL3ZE3vw6n15\"]}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b5060405162001a6a38038062001a6a83398181016040528101906200003791906200054b565b620000576200004b6200043c60201b60201c565b6200044460201b60201c565b6200008a7e64b7c3d2e027eba5da5f5280491bfce7932df45fdf2e0891110c3dc3e84bf460001b6200050860201b60201c565b620000be7f0754617f84d3b5fc04f16a0983e82c729cb6d2698f728b30dfa934b5add9016960001b6200050860201b60201c565b620000f27f1cd5d3f0acece0d68e6ccf8bfd89b818133486ea9f082a4b9b7b11b6000baad560001b6200050860201b60201c565b826001819055506200012d7f30791823e64606c8be3e7feb8b103685a5aaff26eaa6bd2c7f3ce310352527be60001b6200050860201b60201c565b620001617f33d8a274a292fb8ba3cc7d2b767284bf7dc0c506646d5443215dab914e4ca6e860001b6200050860201b60201c565b816002819055506200019c7f50d9a49460146742cae39d07048c68aa13de2a770bed641810140d7a8973a70d60001b6200050860201b60201c565b620001d07f3d77b70ed2057214d5cd1b0ee90db5bba75d46a8e2c1c1175b1c3c6c7477c14260001b6200050860201b60201c565b806003819055506200020b7f942240fbaf8b00e69532f2fbe4ea09bf8f15876f36c4a0d73a3ece54aa0a522960001b6200050860201b60201c565b6200023f7f94060d265c2e1f35f4230c634aaf7f14185d0a42d6d8d5f35fe5492ece57cc0c60001b6200050860201b60201c565b60006004819055506200027b7f2c650db3dc7a065d861e08f687272c0e3d1fd605cd167042d67953202666742f60001b6200050860201b60201c565b620002af7f1b7587159c5f1160ede69f194a9e5c933514c192042fd3415bf2deb3f8f74b0760001b6200050860201b60201c565b7f65779d3ca560e9bdec52d08ed75431a84df87cb7796f0e51965f6efc0f556c0f600084604051620002e392919062000605565b60405180910390a16200031f7f14fdcec951a67568c0b528dd486521f51bdc14f531d71f850fa0bd2d9c45829460001b6200050860201b60201c565b620003537f59bcf0476adddb53cd05f64c33dcc191fa4a0a2cbb042239cce51dd2fc7b4b9a60001b6200050860201b60201c565b7fb1e6cc560df1786578fd4d1fe6e046f089a0c3be401e999b51a51124379117976000836040516200038792919062000605565b60405180910390a1620003c37fd10cdaddea1cf4d5c38c657c8184253dab5a819c5e4b0c88869a9564fd4b4c4960001b6200050860201b60201c565b620003f77fd8d1727cb6b16868521109e26db98e2148155c06bb992b0a0cb83f313921eb9160001b6200050860201b60201c565b7f185c6391e7218e85de8a9346fc72024a0f88e1f04c186e6351230b93976ad50b6000826040516200042b92919062000605565b60405180910390a150505062000632565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b50565b600080fd5b6000819050919050565b620005258162000510565b81146200053157600080fd5b50565b60008151905062000545816200051a565b92915050565b6000806000606084860312156200056757620005666200050b565b5b6000620005778682870162000534565b93505060206200058a8682870162000534565b92505060406200059d8682870162000534565b9150509250925092565b6000819050919050565b6000819050919050565b6000620005dc620005d6620005d084620005a7565b620005b1565b62000510565b9050919050565b620005ee81620005bb565b82525050565b620005ff8162000510565b82525050565b60006040820190506200061c6000830185620005e3565b6200062b6020830184620005f4565b9392505050565b61142880620006426000396000f3fe6080604052600436106100cb5760003560e01c80637d882097116100745780638ed832711161004e5780638ed83271146105365780639d51d9b714610561578063f2fde38b1461058a576103dc565b80637d882097146104b7578063897b0637146104e25780638da5cb5b1461050b576103dc565b8063715018a6116100a5578063715018a61461044c57806373ad468a146104635780637d63d0cd1461048e576103dc565b80634fe47f70146103e15780635fd8c7101461040a578063645006ca14610421576103dc565b366103dc576100fc7f5e91eb4e146243c5fc10218c63813d75795efa063ee048a70076cb6ecc61587d60001b6105b3565b6101287f73260b5f05e45d61e42c373897b87998b1a5a7bd70f9af562c4b361e04f0379d60001b6105b3565b60015434101561016d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016490611029565b60405180910390fd5b6101997f23991968fdcb96adbea8af7b4742a78253230d9f76ee5eff35c987310043166a60001b6105b3565b6101c57f249aaae9e0e29e3e4031f40b7d96a68f16ea91f027ace995e46bfdaeffc6f39160001b6105b3565b6101f17fbce8df54e38e3ccc6f9f6481c255cd9804ade53c913156b5c2da09a92946cb2360001b6105b3565b600254341115610236576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161022d90611095565b60405180910390fd5b6102627f2bd55ff7de06b7bc9a18ccd9faec6cc761628852dff2df2d03f1f08dc28285d660001b6105b3565b61028e7f8ad51416e28945719acfb674a9f9e6907225e745b1f9e523e751b4be1bdaac4e60001b6105b3565b6102ba7fff12f46047487761ec7b26043d01a917e9aecfcdd47cd91d771c8ea30d37e8b860001b6105b3565b6003544711156102ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f690611101565b60405180910390fd5b61032a7e3763c76368796ee311ec1b0ddfd3708e87b99464363f5ac0147716b637edb160001b6105b3565b6103567f79e71c65a22716d1eba9afec74511a85d8fe55b5f6a98109655aaf23bbcf27f060001b6105b3565b343373ffffffffffffffffffffffffffffffffffffffff166004547f2d27851832fcac28a0d4af1344f01fed7ffcfd15171c14c564a0c42aa57ae5c060405160405180910390a46103c97f1da34b6132b7d28e2dd5dcc9cc69abac10b228d460afab0c9cfbc955300ed96c60001b6105b3565b6001600460008282540192505081905550005b600080fd5b3480156103ed57600080fd5b506104086004803603810190610403919061115c565b6105b6565b005b34801561041657600080fd5b5061041f610753565b005b34801561042d57600080fd5b50610436610a05565b6040516104439190611198565b60405180910390f35b34801561045857600080fd5b50610461610a0b565b005b34801561046f57600080fd5b50610478610a93565b6040516104859190611198565b60405180910390f35b34801561049a57600080fd5b506104b560048036038101906104b091906111e9565b6105b3565b005b3480156104c357600080fd5b506104cc610a99565b6040516104d99190611198565b60405180910390f35b3480156104ee57600080fd5b506105096004803603810190610504919061115c565b610a9f565b005b34801561051757600080fd5b50610520610c3c565b60405161052d9190611257565b60405180910390f35b34801561054257600080fd5b5061054b610c65565b6040516105589190611198565b60405180910390f35b34801561056d57600080fd5b506105886004803603810190610583919061115c565b610c6b565b005b34801561059657600080fd5b506105b160048036038101906105ac919061129e565b610e08565b005b50565b6105be610f00565b73ffffffffffffffffffffffffffffffffffffffff166105dc610c3c565b73ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062990611317565b60405180910390fd5b61065e7ffee123fad7ec16093a6435cf2c5d00b4571ad879afd34fb5bbb0d90914f7898160001b6105b3565b61068a7f23b16a5b6e035bf28fefd8536d3d907084332ed11eaad0c731ab33bdf63728ab60001b6105b3565b6106b67fe3990e89e60d0565ab8d3b4f20893f23ea714ef00b2b971bfdca4ed564f9d7bc60001b6105b3565b7fb1e6cc560df1786578fd4d1fe6e046f089a0c3be401e999b51a5112437911797600254826040516106e9929190611337565b60405180910390a161071d7f7dcc232dd4ea9159fcc353f5151cc835e78ec60204ecd0bd7d926246ba5419ab60001b6105b3565b6107497fe638d78dd410ed0ed44e18bb848eaffdebe2397f929549a92d78c434746b5a1960001b6105b3565b8060028190555050565b61075b610f00565b73ffffffffffffffffffffffffffffffffffffffff16610779610c3c565b73ffffffffffffffffffffffffffffffffffffffff16146107cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c690611317565b60405180910390fd5b6107fb7fc6b27d465e4053b68a3388de9da95b673c18eb4989d1008c2e06915f910a066060001b6105b3565b6108277f2fca1e77c51979dc28ae8dc9fc4db5c9ce9be137728cb0a61cecdd0d78850eb160001b6105b3565b6108537fec90bc2e2104a1823652f6828778f93075a8d31d8e3ac2bfd179ffcbfe51739b60001b6105b3565b600061085d610c3c565b905061088b7fb45dbc3fc05181c7356e9244306dddabaf0b75b05688c615d0e7a4833ce1b98860001b6105b3565b6108b77fbc38348ea4a9b5cb61c62ee5badf6ec802094b56806baef5ac173cb7461a82d160001b6105b3565b60004790506108e87ff96c8825c2177b3c21775b49f255faad2ce4e7da2e10326bacd5248e8b712dff60001b6105b3565b6109147fd43f2aaa632b9ffeb71c574863f0f8a1552a8f75769c81b9552396c6190eff4160001b6105b3565b8173ffffffffffffffffffffffffffffffffffffffff167fddc398b321237a8d40ac914388309c2f52a08c134e4dc4ce61e32f57cb7d80f18260405161095a9190611198565b60405180910390a261098e7f3c0d0013f3a63b85c4bd529a45060dc1444fc884d2c8cc3cc575aa3a4710e27860001b6105b3565b6109ba7f5b79781fe133b568105927be0b812215d4bec71e3c2215d5d4758c9bac65c62760001b6105b3565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a00573d6000803e3d6000fd5b505050565b60015481565b610a13610f00565b73ffffffffffffffffffffffffffffffffffffffff16610a31610c3c565b73ffffffffffffffffffffffffffffffffffffffff1614610a87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7e90611317565b60405180910390fd5b610a916000610f08565b565b60035481565b60045481565b610aa7610f00565b73ffffffffffffffffffffffffffffffffffffffff16610ac5610c3c565b73ffffffffffffffffffffffffffffffffffffffff1614610b1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1290611317565b60405180910390fd5b610b477fb433caf62ec08507ab7af9b492ca9c31d5bcdd278f6004a28794eb4106b5cf3e60001b6105b3565b610b737f897c1d74774bdd740f697ebe75144626bd7a18205b591e95d5ad4f8de174ea7060001b6105b3565b610b9f7fd9e9dc42b180f2f843f8d913ef4d43c5f8f8bea2ec782b7a740d2561a257cde260001b6105b3565b7f65779d3ca560e9bdec52d08ed75431a84df87cb7796f0e51965f6efc0f556c0f60015482604051610bd2929190611337565b60405180910390a1610c067f8da41a211fc748f0027d0993815cc4ca3cc376d4ae4b4471d749b0984a57239960001b6105b3565b610c327f4aa4ae558612ce08434cb24e0473deb7e6c2752c6a90ce39f24fd88b9cfe6d7d60001b6105b3565b8060018190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60025481565b610c73610f00565b73ffffffffffffffffffffffffffffffffffffffff16610c91610c3c565b73ffffffffffffffffffffffffffffffffffffffff1614610ce7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cde90611317565b60405180910390fd5b610d137fce1bcd2174ef6ef3da0e36105bd18a71486b853321242fc762fb2a5064cb2e5360001b6105b3565b610d3f7f96e568f68ceba0bb138445fe1d28ff043c88b4482d666e86c6663627a794d00e60001b6105b3565b610d6b7f83921b77b4f8764a56568881a61495190986808cf7eaa1d617e46cd7e7b52f7360001b6105b3565b7f185c6391e7218e85de8a9346fc72024a0f88e1f04c186e6351230b93976ad50b60035482604051610d9e929190611337565b60405180910390a1610dd27f5e9d45d2a21d81f43304c5d88d8c4b9fe0060aae15b5abf9547f24437e7f90fc60001b6105b3565b610dfe7f819805374cc1d4a4ad5b35e7e174e0b0ecb50f725597510954c8cd97e051b56760001b6105b3565b8060038190555050565b610e10610f00565b73ffffffffffffffffffffffffffffffffffffffff16610e2e610c3c565b73ffffffffffffffffffffffffffffffffffffffff1614610e84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7b90611317565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ef4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eeb906113d2565b60405180910390fd5b610efd81610f08565b50565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600082825260208201905092915050565b7f4465706f73697420616d6f756e7420697320746f6f20736d616c6c0000000000600082015250565b6000611013601b83610fcc565b915061101e82610fdd565b602082019050919050565b6000602082019050818103600083015261104281611006565b9050919050565b7f4465706f73697420616d6f756e7420697320746f6f2062696700000000000000600082015250565b600061107f601983610fcc565b915061108a82611049565b602082019050919050565b600060208201905081810360008301526110ae81611072565b9050919050565b7f436f6e7472616374206d61782062616c616e6365206578636565646564000000600082015250565b60006110eb601d83610fcc565b91506110f6826110b5565b602082019050919050565b6000602082019050818103600083015261111a816110de565b9050919050565b600080fd5b6000819050919050565b61113981611126565b811461114457600080fd5b50565b60008135905061115681611130565b92915050565b60006020828403121561117257611171611121565b5b600061118084828501611147565b91505092915050565b61119281611126565b82525050565b60006020820190506111ad6000830184611189565b92915050565b6000819050919050565b6111c6816111b3565b81146111d157600080fd5b50565b6000813590506111e3816111bd565b92915050565b6000602082840312156111ff576111fe611121565b5b600061120d848285016111d4565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061124182611216565b9050919050565b61125181611236565b82525050565b600060208201905061126c6000830184611248565b92915050565b61127b81611236565b811461128657600080fd5b50565b60008135905061129881611272565b92915050565b6000602082840312156112b4576112b3611121565b5b60006112c284828501611289565b91505092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000611301602083610fcc565b915061130c826112cb565b602082019050919050565b60006020820190508181036000830152611330816112f4565b9050919050565b600060408201905061134c6000830185611189565b6113596020830184611189565b9392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006113bc602683610fcc565b91506113c782611360565b604082019050919050565b600060208201905081810360008301526113eb816113af565b905091905056fea264697066735822122037015225a63ecab5a43f7590abb54032a0ddd923e67369b73360917b27c6e14c64736f6c63430008090033",
"deployedBytecode": "0x6080604052600436106100cb5760003560e01c80637d882097116100745780638ed832711161004e5780638ed83271146105365780639d51d9b714610561578063f2fde38b1461058a576103dc565b80637d882097146104b7578063897b0637146104e25780638da5cb5b1461050b576103dc565b8063715018a6116100a5578063715018a61461044c57806373ad468a146104635780637d63d0cd1461048e576103dc565b80634fe47f70146103e15780635fd8c7101461040a578063645006ca14610421576103dc565b366103dc576100fc7f5e91eb4e146243c5fc10218c63813d75795efa063ee048a70076cb6ecc61587d60001b6105b3565b6101287f73260b5f05e45d61e42c373897b87998b1a5a7bd70f9af562c4b361e04f0379d60001b6105b3565b60015434101561016d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161016490611029565b60405180910390fd5b6101997f23991968fdcb96adbea8af7b4742a78253230d9f76ee5eff35c987310043166a60001b6105b3565b6101c57f249aaae9e0e29e3e4031f40b7d96a68f16ea91f027ace995e46bfdaeffc6f39160001b6105b3565b6101f17fbce8df54e38e3ccc6f9f6481c255cd9804ade53c913156b5c2da09a92946cb2360001b6105b3565b600254341115610236576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161022d90611095565b60405180910390fd5b6102627f2bd55ff7de06b7bc9a18ccd9faec6cc761628852dff2df2d03f1f08dc28285d660001b6105b3565b61028e7f8ad51416e28945719acfb674a9f9e6907225e745b1f9e523e751b4be1bdaac4e60001b6105b3565b6102ba7fff12f46047487761ec7b26043d01a917e9aecfcdd47cd91d771c8ea30d37e8b860001b6105b3565b6003544711156102ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102f690611101565b60405180910390fd5b61032a7e3763c76368796ee311ec1b0ddfd3708e87b99464363f5ac0147716b637edb160001b6105b3565b6103567f79e71c65a22716d1eba9afec74511a85d8fe55b5f6a98109655aaf23bbcf27f060001b6105b3565b343373ffffffffffffffffffffffffffffffffffffffff166004547f2d27851832fcac28a0d4af1344f01fed7ffcfd15171c14c564a0c42aa57ae5c060405160405180910390a46103c97f1da34b6132b7d28e2dd5dcc9cc69abac10b228d460afab0c9cfbc955300ed96c60001b6105b3565b6001600460008282540192505081905550005b600080fd5b3480156103ed57600080fd5b506104086004803603810190610403919061115c565b6105b6565b005b34801561041657600080fd5b5061041f610753565b005b34801561042d57600080fd5b50610436610a05565b6040516104439190611198565b60405180910390f35b34801561045857600080fd5b50610461610a0b565b005b34801561046f57600080fd5b50610478610a93565b6040516104859190611198565b60405180910390f35b34801561049a57600080fd5b506104b560048036038101906104b091906111e9565b6105b3565b005b3480156104c357600080fd5b506104cc610a99565b6040516104d99190611198565b60405180910390f35b3480156104ee57600080fd5b506105096004803603810190610504919061115c565b610a9f565b005b34801561051757600080fd5b50610520610c3c565b60405161052d9190611257565b60405180910390f35b34801561054257600080fd5b5061054b610c65565b6040516105589190611198565b60405180910390f35b34801561056d57600080fd5b506105886004803603810190610583919061115c565b610c6b565b005b34801561059657600080fd5b506105b160048036038101906105ac919061129e565b610e08565b005b50565b6105be610f00565b73ffffffffffffffffffffffffffffffffffffffff166105dc610c3c565b73ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062990611317565b60405180910390fd5b61065e7ffee123fad7ec16093a6435cf2c5d00b4571ad879afd34fb5bbb0d90914f7898160001b6105b3565b61068a7f23b16a5b6e035bf28fefd8536d3d907084332ed11eaad0c731ab33bdf63728ab60001b6105b3565b6106b67fe3990e89e60d0565ab8d3b4f20893f23ea714ef00b2b971bfdca4ed564f9d7bc60001b6105b3565b7fb1e6cc560df1786578fd4d1fe6e046f089a0c3be401e999b51a5112437911797600254826040516106e9929190611337565b60405180910390a161071d7f7dcc232dd4ea9159fcc353f5151cc835e78ec60204ecd0bd7d926246ba5419ab60001b6105b3565b6107497fe638d78dd410ed0ed44e18bb848eaffdebe2397f929549a92d78c434746b5a1960001b6105b3565b8060028190555050565b61075b610f00565b73ffffffffffffffffffffffffffffffffffffffff16610779610c3c565b73ffffffffffffffffffffffffffffffffffffffff16146107cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c690611317565b60405180910390fd5b6107fb7fc6b27d465e4053b68a3388de9da95b673c18eb4989d1008c2e06915f910a066060001b6105b3565b6108277f2fca1e77c51979dc28ae8dc9fc4db5c9ce9be137728cb0a61cecdd0d78850eb160001b6105b3565b6108537fec90bc2e2104a1823652f6828778f93075a8d31d8e3ac2bfd179ffcbfe51739b60001b6105b3565b600061085d610c3c565b905061088b7fb45dbc3fc05181c7356e9244306dddabaf0b75b05688c615d0e7a4833ce1b98860001b6105b3565b6108b77fbc38348ea4a9b5cb61c62ee5badf6ec802094b56806baef5ac173cb7461a82d160001b6105b3565b60004790506108e87ff96c8825c2177b3c21775b49f255faad2ce4e7da2e10326bacd5248e8b712dff60001b6105b3565b6109147fd43f2aaa632b9ffeb71c574863f0f8a1552a8f75769c81b9552396c6190eff4160001b6105b3565b8173ffffffffffffffffffffffffffffffffffffffff167fddc398b321237a8d40ac914388309c2f52a08c134e4dc4ce61e32f57cb7d80f18260405161095a9190611198565b60405180910390a261098e7f3c0d0013f3a63b85c4bd529a45060dc1444fc884d2c8cc3cc575aa3a4710e27860001b6105b3565b6109ba7f5b79781fe133b568105927be0b812215d4bec71e3c2215d5d4758c9bac65c62760001b6105b3565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610a00573d6000803e3d6000fd5b505050565b60015481565b610a13610f00565b73ffffffffffffffffffffffffffffffffffffffff16610a31610c3c565b73ffffffffffffffffffffffffffffffffffffffff1614610a87576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7e90611317565b60405180910390fd5b610a916000610f08565b565b60035481565b60045481565b610aa7610f00565b73ffffffffffffffffffffffffffffffffffffffff16610ac5610c3c565b73ffffffffffffffffffffffffffffffffffffffff1614610b1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1290611317565b60405180910390fd5b610b477fb433caf62ec08507ab7af9b492ca9c31d5bcdd278f6004a28794eb4106b5cf3e60001b6105b3565b610b737f897c1d74774bdd740f697ebe75144626bd7a18205b591e95d5ad4f8de174ea7060001b6105b3565b610b9f7fd9e9dc42b180f2f843f8d913ef4d43c5f8f8bea2ec782b7a740d2561a257cde260001b6105b3565b7f65779d3ca560e9bdec52d08ed75431a84df87cb7796f0e51965f6efc0f556c0f60015482604051610bd2929190611337565b60405180910390a1610c067f8da41a211fc748f0027d0993815cc4ca3cc376d4ae4b4471d749b0984a57239960001b6105b3565b610c327f4aa4ae558612ce08434cb24e0473deb7e6c2752c6a90ce39f24fd88b9cfe6d7d60001b6105b3565b8060018190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60025481565b610c73610f00565b73ffffffffffffffffffffffffffffffffffffffff16610c91610c3c565b73ffffffffffffffffffffffffffffffffffffffff1614610ce7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cde90611317565b60405180910390fd5b610d137fce1bcd2174ef6ef3da0e36105bd18a71486b853321242fc762fb2a5064cb2e5360001b6105b3565b610d3f7f96e568f68ceba0bb138445fe1d28ff043c88b4482d666e86c6663627a794d00e60001b6105b3565b610d6b7f83921b77b4f8764a56568881a61495190986808cf7eaa1d617e46cd7e7b52f7360001b6105b3565b7f185c6391e7218e85de8a9346fc72024a0f88e1f04c186e6351230b93976ad50b60035482604051610d9e929190611337565b60405180910390a1610dd27f5e9d45d2a21d81f43304c5d88d8c4b9fe0060aae15b5abf9547f24437e7f90fc60001b6105b3565b610dfe7f819805374cc1d4a4ad5b35e7e174e0b0ecb50f725597510954c8cd97e051b56760001b6105b3565b8060038190555050565b610e10610f00565b73ffffffffffffffffffffffffffffffffffffffff16610e2e610c3c565b73ffffffffffffffffffffffffffffffffffffffff1614610e84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7b90611317565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610ef4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eeb906113d2565b60405180910390fd5b610efd81610f08565b50565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600082825260208201905092915050565b7f4465706f73697420616d6f756e7420697320746f6f20736d616c6c0000000000600082015250565b6000611013601b83610fcc565b915061101e82610fdd565b602082019050919050565b6000602082019050818103600083015261104281611006565b9050919050565b7f4465706f73697420616d6f756e7420697320746f6f2062696700000000000000600082015250565b600061107f601983610fcc565b915061108a82611049565b602082019050919050565b600060208201905081810360008301526110ae81611072565b9050919050565b7f436f6e7472616374206d61782062616c616e6365206578636565646564000000600082015250565b60006110eb601d83610fcc565b91506110f6826110b5565b602082019050919050565b6000602082019050818103600083015261111a816110de565b9050919050565b600080fd5b6000819050919050565b61113981611126565b811461114457600080fd5b50565b60008135905061115681611130565b92915050565b60006020828403121561117257611171611121565b5b600061118084828501611147565b91505092915050565b61119281611126565b82525050565b60006020820190506111ad6000830184611189565b92915050565b6000819050919050565b6111c6816111b3565b81146111d157600080fd5b50565b6000813590506111e3816111bd565b92915050565b6000602082840312156111ff576111fe611121565b5b600061120d848285016111d4565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061124182611216565b9050919050565b61125181611236565b82525050565b600060208201905061126c6000830184611248565b92915050565b61127b81611236565b811461128657600080fd5b50565b60008135905061129881611272565b92915050565b6000602082840312156112b4576112b3611121565b5b60006112c284828501611289565b91505092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000611301602083610fcc565b915061130c826112cb565b602082019050919050565b60006020820190508181036000830152611330816112f4565b9050919050565b600060408201905061134c6000830185611189565b6113596020830184611189565b9392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006113bc602683610fcc565b91506113c782611360565b604082019050919050565b600060208201905081810360008301526113eb816113af565b905091905056fea264697066735822122037015225a63ecab5a43f7590abb54032a0ddd923e67369b73360917b27c6e14c64736f6c63430008090033",
"devdoc": {
"events": {
"BalanceWithdrawn(address,uint256)": {
"params": {
"balance": "The current contract balance paid to the owner.",
"owner": "The current owner and recipient of the funds."
}
},
"EtherReceived(uint256,address,uint256)": {
"params": {
"amount": "The amount deposited by the payer.",
"depositId": "A unique sequencer number identifying the deposit.",
"emitter": "The sending address of the payer."
}
},
"MaxBalanceSet(uint256,uint256)": {
"params": {
"newBalance": "The new maximum contract balance.",
"previousBalance": "The previous maximum contract balance."
}
},
"MaxDepositAmountSet(uint256,uint256)": {
"params": {
"newAmount": "The new maximum deposit amount.",
"previousAmount": "The previous maximum deposit amount."
}
},
"MinDepositAmountSet(uint256,uint256)": {
"params": {
"newAmount": "The new minimum deposit amount.",
"previousAmount": "The previous minimum deposit amount."
}
}
},
"kind": "dev",
"methods": {
"constructor": {
"params": {
"_maxBalance": "The initial maximum contract balance.",
"_maxDepositAmount": "The initial maximum deposit amount.",
"_minDepositAmount": "The initial minimum deposit amount."
}
},
"owner()": {
"details": "Returns the address of the current owner."
},
"renounceOwnership()": {
"details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
},
"setMaxAmount(uint256)": {
"params": {
"_maxDepositAmount": "The new maximum deposit amount."
}
},
"setMaxBalance(uint256)": {
"params": {
"_maxBalance": "The new maximum contract balance."
}
},
"setMinAmount(uint256)": {
"params": {
"_minDepositAmount": "The new minimum deposit amount."
}
},
"transferOwnership(address)": {
"details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
}
},
"title": "TeleportrDeposit Shout out to 0xclem for providing the inspiration for this contract: https://github.com/0xclem/teleportr/blob/main/contracts/BridgeDeposit.sol",
"version": 1
},
"userdoc": {
"events": {
"BalanceWithdrawn(address,uint256)": {
"notice": "Emitted any time the balance is withdrawn by the owner."
},
"EtherReceived(uint256,address,uint256)": {
"notice": "Emitted any time a successful deposit is received."
},
"MaxBalanceSet(uint256,uint256)": {
"notice": "Emitted any time the contract maximum balance is set."
},
"MaxDepositAmountSet(uint256,uint256)": {
"notice": "Emitted any time the maximum deposit amount is set."
},
"MinDepositAmountSet(uint256,uint256)": {
"notice": "Emitted any time the minimum deposit amount is set."
}
},
"kind": "user",
"methods": {
"constructor": {
"notice": "Initializes a new TeleportrDeposit contract."
},
"maxBalance()": {
"notice": "The maximum balance the contract can hold after a receive."
},
"maxDepositAmount()": {
"notice": "The maximum amount that be deposited in a receive."
},
"minDepositAmount()": {
"notice": "The minimum amount that be deposited in a receive."
},
"setMaxAmount(uint256)": {
"notice": "Sets the maximum amount that can be deposited in a receive."
},
"setMaxBalance(uint256)": {
"notice": "Sets the maximum balance the contract can hold after a receive."
},
"setMinAmount(uint256)": {
"notice": "Sets the minimum amount that can be deposited in a receive."
},
"totalDeposits()": {
"notice": "The total number of successful deposits received."
},
"withdrawBalance()": {
"notice": "Sends the contract's current balance to the owner."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 393,
"contract": "contracts/L1/teleportr/TeleportrDeposit.sol:TeleportrDeposit",
"label": "_owner",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 7830,
"contract": "contracts/L1/teleportr/TeleportrDeposit.sol:TeleportrDeposit",
"label": "minDepositAmount",
"offset": 0,
"slot": "1",
"type": "t_uint256"
},
{
"astId": 7833,
"contract": "contracts/L1/teleportr/TeleportrDeposit.sol:TeleportrDeposit",
"label": "maxDepositAmount",
"offset": 0,
"slot": "2",
"type": "t_uint256"
},
{
"astId": 7836,
"contract": "contracts/L1/teleportr/TeleportrDeposit.sol:TeleportrDeposit",
"label": "maxBalance",
"offset": 0,
"slot": "3",
"type": "t_uint256"
},
{
"astId": 7839,
"contract": "contracts/L1/teleportr/TeleportrDeposit.sol:TeleportrDeposit",
"label": "totalDeposits",
"offset": 0,
"slot": "4",
"type": "t_uint256"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"address": "0x4821975ca220601c153d02353300d6ad34adc362",
"abi": [
{
"inputs": [],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "balance",
"type": "uint256"
}
],
"name": "BalanceWithdrawn",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "depositId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "DisbursementFailed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "depositId",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "DisbursementSuccess",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "c__0x16931334",
"type": "bytes32"
}
],
"name": "c_0x16931334",
"outputs": [],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_nextDepositId",
"type": "uint256"
},
{
"components": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "address",
"name": "addr",
"type": "address"
}
],
"internalType": "struct TeleportrDisburser.Disbursement[]",
"name": "_disbursements",
"type": "tuple[]"
}
],
"name": "disburse",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "totalDisbursements",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "withdrawBalance",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x91be8d4c1a357b2c06bac93ce2a39015504cdd13910b0b05403bd11f8b5259c8",
"receipt": {
"to": null,
"from": "0x6c2cBc2132aB6Fc48Ebf3569Bdde7B0AA34aa0FC",
"contractAddress": "0xde440ADa095F36835ecB90297D22Ccbe02045a94",
"transactionIndex": 0,
"gasUsed": "1341401",
"logsBloom": "0x00000000000000000000000010000000000000000000000000800000000000010000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000001200000000000000000000100000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000010000000000000000000000000000000000000000000000000",
"blockHash": "0x94f294a93fc7178f06afbe6f97c0c013bbf570016ad491583af420c1d3f21763",
"transactionHash": "0x91be8d4c1a357b2c06bac93ce2a39015504cdd13910b0b05403bd11f8b5259c8",
"logs": [
{
"transactionIndex": 0,
"blockNumber": 1644547,
"transactionHash": "0x91be8d4c1a357b2c06bac93ce2a39015504cdd13910b0b05403bd11f8b5259c8",
"address": "0xde440ADa095F36835ecB90297D22Ccbe02045a94",
"topics": [
"0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000006c2cbc2132ab6fc48ebf3569bdde7b0aa34aa0fc"
],
"data": "0x",
"logIndex": 0,
"blockHash": "0x94f294a93fc7178f06afbe6f97c0c013bbf570016ad491583af420c1d3f21763"
}
],
"blockNumber": 1644547,
"cumulativeGasUsed": "1341401",
"status": 1,
"byzantium": true
},
"args": [],
"solcInputHash": "f20d616c1af6713a0e8ca9fae9d7bae7",
"metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"BalanceWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"depositId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DisbursementFailed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"depositId\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DisbursementSuccess\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"c__0x16931334\",\"type\":\"bytes32\"}],\"name\":\"c_0x16931334\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nextDepositId\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"internalType\":\"struct TeleportrDisburser.Disbursement[]\",\"name\":\"_disbursements\",\"type\":\"tuple[]\"}],\"name\":\"disburse\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalDisbursements\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"BalanceWithdrawn(address,uint256)\":{\"params\":{\"balance\":\"The current contract balance paid to the owner.\",\"owner\":\"The current owner and recipient of the funds.\"}},\"DisbursementFailed(uint256,address,uint256)\":{\"params\":{\"amount\":\"The amount intended to be sent to the recipient.\",\"depositId\":\"The unique sequence number identifying the deposit.\",\"to\":\"The intended recipient of the disbursement.\"}},\"DisbursementSuccess(uint256,address,uint256)\":{\"params\":{\"amount\":\"The amount sent to the recipient.\",\"depositId\":\"The unique sequence number identifying the deposit.\",\"to\":\"The recipient of the disbursement.\"}}},\"kind\":\"dev\",\"methods\":{\"disburse(uint256,(uint256,address)[])\":{\"params\":{\"_disbursements\":\"A list of Disbursements to process.\",\"_nextDepositId\":\"The depositId of the first Dispursement.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"title\":\"TeleportrDisburser\",\"version\":1},\"userdoc\":{\"events\":{\"BalanceWithdrawn(address,uint256)\":{\"notice\":\"Emitted any time the balance is withdrawn by the owner.\"},\"DisbursementFailed(uint256,address,uint256)\":{\"notice\":\"Emitted any time a disbursement fails to send.\"},\"DisbursementSuccess(uint256,address,uint256)\":{\"notice\":\"Emitted any time a disbursement is successfuly sent.\"}},\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"Initializes a new TeleportrDisburser contract.\"},\"disburse(uint256,(uint256,address)[])\":{\"notice\":\"Accepts a list of Disbursements and forwards the amount paid to the contract to each recipient. The method reverts if there are zero disbursements, the total amount to forward differs from the amount sent in the transaction, or the _nextDepositId is unexpected. Failed disbursements will not cause the method to revert, but will instead be held by the contract and availabe for the owner to withdraw.\"},\"totalDisbursements()\":{\"notice\":\"The total number of disbursements processed.\"},\"withdrawBalance()\":{\"notice\":\"Sends the contract's current balance to the owner.\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/L2/teleportr/TeleportrDisburser.sol\":\"TeleportrDisburser\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"keccak256\":\"0x6bb804a310218875e89d12c053e94a13a4607cdf7cc2052f3e52bd32a0dc50a1\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b2ebbbe6d0011175bd9e7268b83de3f9c2f9d8d4cbfbaef12aff977d7d727163\",\"dweb:/ipfs/Qmd5c7Vxtis9wzkDNhxwc6A2QT5H9xn9kfjhx7qx44vpro\"]},\"@openzeppelin/contracts/utils/Context.sol\":{\"keccak256\":\"0x90565a39ae45c80f0468dc96c7b20d0afc3055f344c8203a0c9258239f350b9f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://26e8b38a7ac8e7b4463af00cf7fff1bf48ae9875765bf4f7751e100124d0bc8c\",\"dweb:/ipfs/QmWcsmkVr24xmmjfnBQZoemFniXjj3vwT78Cz6uqZW1Hux\"]},\"contracts/L2/teleportr/TeleportrDisburser.sol\":{\"keccak256\":\"0x42a2eb0f230f8b713fb97d6d44330251c067a26344439cb8fc0f6c5008c61e69\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://5b3f82df2740a5b40c30fca65cbf6d3242bbf34260a266cf579ef015235af676\",\"dweb:/ipfs/QmZyfQh3M3fzGMjrF31NcAG3YpxMGW93mNzVHcxfjo29qt\"]}},\"version\":1}",
"bytecode": "0x60806040523480156200001157600080fd5b506200003262000026620000dc60201b60201c565b620000e460201b60201c565b620000667f39bbaedb82e6743a336be557192fb64c205b1c7023985a2169da77cfa38456e760001b620001a860201b60201c565b6200009a7f24db5b5cfdf4200d735f11046f2ae1a70f4558a5d72f76885640a569c06c07cf60001b620001a860201b60201c565b620000ce7f317e8430390de1cd59d658f9aa2e38e3fc3ede461a2882fce72bce93ad4b116360001b620001a860201b60201c565b6000600181905550620001ab565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b50565b6116cc80620001bb6000396000f3fe6080604052600436106100705760003560e01c80638da5cb5b1161004e5780638da5cb5b146100ce578063a0adbb93146100f9578063ad48144d14610122578063f2fde38b1461013e57610070565b806325999e7f146100755780635fd8c710146100a0578063715018a6146100b7575b600080fd5b34801561008157600080fd5b5061008a610167565b60405161009791906110ac565b60405180910390f35b3480156100ac57600080fd5b506100b561016d565b005b3480156100c357600080fd5b506100cc61041f565b005b3480156100da57600080fd5b506100e36104a7565b6040516100f09190611108565b60405180910390f35b34801561010557600080fd5b50610120600480360381019061011b9190611163565b6104d0565b005b61013c60048036038101906101379190611221565b6104d3565b005b34801561014a57600080fd5b50610165600480360381019061016091906112ad565b610ecf565b005b60015481565b610175610fc7565b73ffffffffffffffffffffffffffffffffffffffff166101936104a7565b73ffffffffffffffffffffffffffffffffffffffff16146101e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101e090611337565b60405180910390fd5b6102157ffe92f91ad70fcc788c91b5c6377091fddb1bb4643da297f26117462bd94f49fd60001b6104d0565b6102417f1703157428668d098e51859c561d5296ef183d7c69ae701c20e674a9fb1fc99d60001b6104d0565b61026d7fa3bdcd2326103ecf302266dfd6c4af18da60b0396e4465dbc816f02baf137a4d60001b6104d0565b60006102776104a7565b90506102a57fbcfc6ad7959841cabcf36b03dfcd357d7d622acca2ba6e9a43b2372593a2b1f460001b6104d0565b6102d17f627056f9061efb209e979f60571640480c8dc859fd3b1446b24f901abd471d7860001b6104d0565b60004790506103027f872f745d610a98fff77a703564a28bce54c15938fd721d2bb1c1c96b29f02cc060001b6104d0565b61032e7fc7b520880199ff8ecee4cb60a0f2910d8beafd85c2a5d75e88cd45146cbd88c860001b6104d0565b8173ffffffffffffffffffffffffffffffffffffffff167fddc398b321237a8d40ac914388309c2f52a08c134e4dc4ce61e32f57cb7d80f18260405161037491906110ac565b60405180910390a26103a87fbb13c854fee71d4d649f60251494946a1dc47696ecdbc5239eebd0f0e09dedb660001b6104d0565b6103d47f848adaf7559bcfbc99734e73f7109730b5e7d6c9dac716b49e5293cd159045da60001b6104d0565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561041a573d6000803e3d6000fd5b505050565b610427610fc7565b73ffffffffffffffffffffffffffffffffffffffff166104456104a7565b73ffffffffffffffffffffffffffffffffffffffff161461049b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161049290611337565b60405180910390fd5b6104a56000610fcf565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b50565b6104db610fc7565b73ffffffffffffffffffffffffffffffffffffffff166104f96104a7565b73ffffffffffffffffffffffffffffffffffffffff161461054f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054690611337565b60405180910390fd5b61057b7f2ada5d99a5213ee4ca2bb15d1f40a59e356e720b5882c0781678a5e06b9ddb5960001b6104d0565b6105a77f7a7334b1d6bfe4bd15a6309ce921c6474f6768575c5e38d2b2ce7acc447ba59160001b6104d0565b6105d37fb807ae02c58a5c6be11b494711fb222a14e0d7e215117e68acdd94a81151ba7460001b6104d0565b60008282905090506106077f21ab292895678d1873f05582fb6da03baffcd8dbbf67acb7d05adbe92e38f27360001b6104d0565b6106337f807737600e915e0ac1bda9d244b1b42f3883b11d61a3714e96412ab37d49aa0d60001b6104d0565b61065f7fc1dafb9e03ad5f719e2b448b24a8dec5f2278a2d3a090d11212eccbf65b3b9dc60001b6104d0565b600081116106a2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610699906113a3565b60405180910390fd5b6106ce7f23dbf8b6555265ebf2ff79777f7ef74ba63f296fc3b5440ee3f186724f49d63d60001b6104d0565b6106fa7f0f09cdc510c9eeadb6f4ffed3990e7ce53a93e2d1026c772e2303eb967ae645660001b6104d0565b6107267f442b40ff3f756dfe83209f66d82504cceb390151b2ea76b7ce2bce481ddb3b0e60001b6104d0565b600060015490506107597fb14a4d7d74c1e2df0ad5d1ac6189bd833e51ed69416aa7c504d01606d755c7ef60001b6104d0565b6107857f1338effe85e1ba3bde809611b8cd8ff762211afaccab634e6b6449395abbd82260001b6104d0565b6107b17fc20c000c8553b2152a7a80ac43c52f1b7ba7cbd04b533472fc0fd7fd7057f68060001b6104d0565b8481146107f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ea9061140f565b60405180910390fd5b61081f7fb25de3d3bad93e8f821dbd0a8d2aeb60bfa371bf7f2593187e3d6f3012cbbd1360001b6104d0565b61084b7fc1437f73ab0f757f501060cc8e214fb6e895e2c11fdec90f1c26c337259cb3b260001b6104d0565b816001600082825401925050819055506108877f60fb755f4c85c0f5e4fc55a59a862d71795ee75dd9aebd26397347a776a4438060001b6104d0565b6108b37f961eebfc60945127454266e3a2aa59e195e493c917f20887f27522f65f6138f360001b6104d0565b60006108e17f4a4656352b6110f616892179a43a4db2d257323981851d33e20f1d032afa810160001b6104d0565b61090d7f03453438aaa639cf92f4b9a0819dd07143a378d1d08840fd1091d6142cbd37ea60001b6104d0565b60005b838110156109ad576109447fa06b97308620cba29f8f5270af06b6b2b47882e99ef6a3ab7cb6ae3dff36e6c760001b6104d0565b6109707f1def478f38c0910e76e6a9de11aea3e47f48c79346e34413455d16858a227f7460001b6104d0565b8585828181106109835761098261142f565b5b9050604002016000013582610998919061148d565b915080806109a5906114e3565b915050610910565b506109da7f1bd35d5e9c2fadd60189746ebf51278308a09575bc3dacb8a2ce127511f4bd5b60001b6104d0565b610a067f6ed34bb8ab9df4b9f1295d0d512d642d3757c3c47b131b126385d8539862347060001b6104d0565b610a327f6140d5c902a63db76a3285429152fb3a87752f7db4120de3c9d932f328bc305060001b6104d0565b348114610a74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6b9061159e565b60405180910390fd5b610aa07f18246eeaf0026a3e2c4ac32cbc1dc0606e82d2890a32165286e3d0a8c95fd7a460001b6104d0565b610acc7f70b83d9371755905523d6f1e944a8b8692c0959960315ee55559fafd7c2c52bf60001b6104d0565b610af87f21baa28c2eb7d3242d4afa89ad217acdeea738ab84a007f3e8aa489d3ce867c860001b6104d0565b60005b83811015610ec657610b2f7fcdf5d58952d1caa81fdfa362bb2eeb66956f151aa2b33f407f9833563b20496e60001b6104d0565b610b5b7f82fdec1cc8aa1098d9a8242384eaea39f90e5593c12b39cb109348a772e9fafe60001b6104d0565b6000868683818110610b7057610b6f61142f565b5b905060400201600001359050610ba87faaf73602f455fb6fc88332cf7f6d0caabacde6b54d461dc6eb9a7ee12bb2b57460001b6104d0565b610bd47f0d14c42168fe96cb818965cb522ed1023d13f8dc0ab098cdf8760c35932c9cdf60001b6104d0565b6000878784818110610be957610be861142f565b5b9050604002016020016020810190610c0191906112ad565b9050610c2f7f4fccbbc284abd163c3c18f168872dc29d4fac77f01fc1cf5f9992b361605dc4f60001b6104d0565b610c5b7f14f24022c2530a4720a223a36c798ed655b1320c21a7fb1cd078146c936b277060001b6104d0565b60008173ffffffffffffffffffffffffffffffffffffffff16836108fc90604051610c85906115ef565b600060405180830381858888f193505050503d8060008114610cc3576040519150601f19603f3d011682016040523d82523d6000602084013e610cc8565b606091505b50509050610cf87f990d01d9292bbf5a72b844d9e480c435f5bf3f28c6a3cf01231653128d574a2960001b6104d0565b610d247fbeb05d1cb9e0c8962b3fbce755095395f809190d1f56a0305f52d745ed2be60860001b6104d0565b8015610dd657610d567f926cdb8fa3eec76098df0921133fbad388217c8a5f07adf0e3652e64344ff66760001b6104d0565b610d827fcf258c3a8696678566a6fd532ee096e27d2a9dc64bcc87d8fccf2c9df406855560001b6104d0565b8173ffffffffffffffffffffffffffffffffffffffff16867feaa22fd2d7b875476355b32cf719794faf9d91b66e73bc6375a053cace9caaee85604051610dc991906110ac565b60405180910390a3610e7e565b610e027f9065e1e3bc2a1b35f85ca394361800750d7ccf66381f3e69fe4faefe0e5cc78f60001b6104d0565b610e2e7f57081b0378c1c31ae18ff29ec060b75a2fcf8bec375989be94d0d303a4f0021160001b6104d0565b8173ffffffffffffffffffffffffffffffffffffffff16867f9b478c095979d3d3a7d602ffd9ee1f0843204d853558ae0882c8fcc0a5bc78cf85604051610e7591906110ac565b60405180910390a35b610eaa7f9de3918864af83d66c46c014e27703f1021307042aef5dcf52b75516706ddd8b60001b6104d0565b6001860195505050508080610ebe906114e3565b915050610afb565b50505050505050565b610ed7610fc7565b73ffffffffffffffffffffffffffffffffffffffff16610ef56104a7565b73ffffffffffffffffffffffffffffffffffffffff1614610f4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4290611337565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610fbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb290611676565b60405180910390fd5b610fc481610fcf565b50565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000819050919050565b6110a681611093565b82525050565b60006020820190506110c1600083018461109d565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006110f2826110c7565b9050919050565b611102816110e7565b82525050565b600060208201905061111d60008301846110f9565b92915050565b600080fd5b600080fd5b6000819050919050565b6111408161112d565b811461114b57600080fd5b50565b60008135905061115d81611137565b92915050565b60006020828403121561117957611178611123565b5b60006111878482850161114e565b91505092915050565b61119981611093565b81146111a457600080fd5b50565b6000813590506111b681611190565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126111e1576111e06111bc565b5b8235905067ffffffffffffffff8111156111fe576111fd6111c1565b5b60208301915083604082028301111561121a576112196111c6565b5b9250929050565b60008060006040848603121561123a57611239611123565b5b6000611248868287016111a7565b935050602084013567ffffffffffffffff81111561126957611268611128565b5b611275868287016111cb565b92509250509250925092565b61128a816110e7565b811461129557600080fd5b50565b6000813590506112a781611281565b92915050565b6000602082840312156112c3576112c2611123565b5b60006112d184828501611298565b91505092915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006113216020836112da565b915061132c826112eb565b602082019050919050565b6000602082019050818103600083015261135081611314565b9050919050565b7f4e6f2064697362757273656d656e747300000000000000000000000000000000600082015250565b600061138d6010836112da565b915061139882611357565b602082019050919050565b600060208201905081810360008301526113bc81611380565b9050919050565b7f556e6578706563746564206e657874206465706f736974206964000000000000600082015250565b60006113f9601a836112da565b9150611404826113c3565b602082019050919050565b60006020820190508181036000830152611428816113ec565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061149882611093565b91506114a383611093565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156114d8576114d761145e565b5b828201905092915050565b60006114ee82611093565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156115215761152061145e565b5b600182019050919050565b7f44697362757273656d656e7420746f74616c20213d20616d6f756e742073656e60008201527f7400000000000000000000000000000000000000000000000000000000000000602082015250565b60006115886021836112da565b91506115938261152c565b604082019050919050565b600060208201905081810360008301526115b78161157b565b9050919050565b600081905092915050565b50565b60006115d96000836115be565b91506115e4826115c9565b600082019050919050565b60006115fa826115cc565b9150819050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006116606026836112da565b915061166b82611604565b604082019050919050565b6000602082019050818103600083015261168f81611653565b905091905056fea264697066735822122083f16098b83d1bcd3c8f88b64cd62c2ff0f7149c4df36e3ea3404931581a899064736f6c63430008090033",
"deployedBytecode": "0x6080604052600436106100705760003560e01c80638da5cb5b1161004e5780638da5cb5b146100ce578063a0adbb93146100f9578063ad48144d14610122578063f2fde38b1461013e57610070565b806325999e7f146100755780635fd8c710146100a0578063715018a6146100b7575b600080fd5b34801561008157600080fd5b5061008a610167565b60405161009791906110ac565b60405180910390f35b3480156100ac57600080fd5b506100b561016d565b005b3480156100c357600080fd5b506100cc61041f565b005b3480156100da57600080fd5b506100e36104a7565b6040516100f09190611108565b60405180910390f35b34801561010557600080fd5b50610120600480360381019061011b9190611163565b6104d0565b005b61013c60048036038101906101379190611221565b6104d3565b005b34801561014a57600080fd5b50610165600480360381019061016091906112ad565b610ecf565b005b60015481565b610175610fc7565b73ffffffffffffffffffffffffffffffffffffffff166101936104a7565b73ffffffffffffffffffffffffffffffffffffffff16146101e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101e090611337565b60405180910390fd5b6102157ffe92f91ad70fcc788c91b5c6377091fddb1bb4643da297f26117462bd94f49fd60001b6104d0565b6102417f1703157428668d098e51859c561d5296ef183d7c69ae701c20e674a9fb1fc99d60001b6104d0565b61026d7fa3bdcd2326103ecf302266dfd6c4af18da60b0396e4465dbc816f02baf137a4d60001b6104d0565b60006102776104a7565b90506102a57fbcfc6ad7959841cabcf36b03dfcd357d7d622acca2ba6e9a43b2372593a2b1f460001b6104d0565b6102d17f627056f9061efb209e979f60571640480c8dc859fd3b1446b24f901abd471d7860001b6104d0565b60004790506103027f872f745d610a98fff77a703564a28bce54c15938fd721d2bb1c1c96b29f02cc060001b6104d0565b61032e7fc7b520880199ff8ecee4cb60a0f2910d8beafd85c2a5d75e88cd45146cbd88c860001b6104d0565b8173ffffffffffffffffffffffffffffffffffffffff167fddc398b321237a8d40ac914388309c2f52a08c134e4dc4ce61e32f57cb7d80f18260405161037491906110ac565b60405180910390a26103a87fbb13c854fee71d4d649f60251494946a1dc47696ecdbc5239eebd0f0e09dedb660001b6104d0565b6103d47f848adaf7559bcfbc99734e73f7109730b5e7d6c9dac716b49e5293cd159045da60001b6104d0565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561041a573d6000803e3d6000fd5b505050565b610427610fc7565b73ffffffffffffffffffffffffffffffffffffffff166104456104a7565b73ffffffffffffffffffffffffffffffffffffffff161461049b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161049290611337565b60405180910390fd5b6104a56000610fcf565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b50565b6104db610fc7565b73ffffffffffffffffffffffffffffffffffffffff166104f96104a7565b73ffffffffffffffffffffffffffffffffffffffff161461054f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161054690611337565b60405180910390fd5b61057b7f2ada5d99a5213ee4ca2bb15d1f40a59e356e720b5882c0781678a5e06b9ddb5960001b6104d0565b6105a77f7a7334b1d6bfe4bd15a6309ce921c6474f6768575c5e38d2b2ce7acc447ba59160001b6104d0565b6105d37fb807ae02c58a5c6be11b494711fb222a14e0d7e215117e68acdd94a81151ba7460001b6104d0565b60008282905090506106077f21ab292895678d1873f05582fb6da03baffcd8dbbf67acb7d05adbe92e38f27360001b6104d0565b6106337f807737600e915e0ac1bda9d244b1b42f3883b11d61a3714e96412ab37d49aa0d60001b6104d0565b61065f7fc1dafb9e03ad5f719e2b448b24a8dec5f2278a2d3a090d11212eccbf65b3b9dc60001b6104d0565b600081116106a2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610699906113a3565b60405180910390fd5b6106ce7f23dbf8b6555265ebf2ff79777f7ef74ba63f296fc3b5440ee3f186724f49d63d60001b6104d0565b6106fa7f0f09cdc510c9eeadb6f4ffed3990e7ce53a93e2d1026c772e2303eb967ae645660001b6104d0565b6107267f442b40ff3f756dfe83209f66d82504cceb390151b2ea76b7ce2bce481ddb3b0e60001b6104d0565b600060015490506107597fb14a4d7d74c1e2df0ad5d1ac6189bd833e51ed69416aa7c504d01606d755c7ef60001b6104d0565b6107857f1338effe85e1ba3bde809611b8cd8ff762211afaccab634e6b6449395abbd82260001b6104d0565b6107b17fc20c000c8553b2152a7a80ac43c52f1b7ba7cbd04b533472fc0fd7fd7057f68060001b6104d0565b8481146107f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ea9061140f565b60405180910390fd5b61081f7fb25de3d3bad93e8f821dbd0a8d2aeb60bfa371bf7f2593187e3d6f3012cbbd1360001b6104d0565b61084b7fc1437f73ab0f757f501060cc8e214fb6e895e2c11fdec90f1c26c337259cb3b260001b6104d0565b816001600082825401925050819055506108877f60fb755f4c85c0f5e4fc55a59a862d71795ee75dd9aebd26397347a776a4438060001b6104d0565b6108b37f961eebfc60945127454266e3a2aa59e195e493c917f20887f27522f65f6138f360001b6104d0565b60006108e17f4a4656352b6110f616892179a43a4db2d257323981851d33e20f1d032afa810160001b6104d0565b61090d7f03453438aaa639cf92f4b9a0819dd07143a378d1d08840fd1091d6142cbd37ea60001b6104d0565b60005b838110156109ad576109447fa06b97308620cba29f8f5270af06b6b2b47882e99ef6a3ab7cb6ae3dff36e6c760001b6104d0565b6109707f1def478f38c0910e76e6a9de11aea3e47f48c79346e34413455d16858a227f7460001b6104d0565b8585828181106109835761098261142f565b5b9050604002016000013582610998919061148d565b915080806109a5906114e3565b915050610910565b506109da7f1bd35d5e9c2fadd60189746ebf51278308a09575bc3dacb8a2ce127511f4bd5b60001b6104d0565b610a067f6ed34bb8ab9df4b9f1295d0d512d642d3757c3c47b131b126385d8539862347060001b6104d0565b610a327f6140d5c902a63db76a3285429152fb3a87752f7db4120de3c9d932f328bc305060001b6104d0565b348114610a74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6b9061159e565b60405180910390fd5b610aa07f18246eeaf0026a3e2c4ac32cbc1dc0606e82d2890a32165286e3d0a8c95fd7a460001b6104d0565b610acc7f70b83d9371755905523d6f1e944a8b8692c0959960315ee55559fafd7c2c52bf60001b6104d0565b610af87f21baa28c2eb7d3242d4afa89ad217acdeea738ab84a007f3e8aa489d3ce867c860001b6104d0565b60005b83811015610ec657610b2f7fcdf5d58952d1caa81fdfa362bb2eeb66956f151aa2b33f407f9833563b20496e60001b6104d0565b610b5b7f82fdec1cc8aa1098d9a8242384eaea39f90e5593c12b39cb109348a772e9fafe60001b6104d0565b6000868683818110610b7057610b6f61142f565b5b905060400201600001359050610ba87faaf73602f455fb6fc88332cf7f6d0caabacde6b54d461dc6eb9a7ee12bb2b57460001b6104d0565b610bd47f0d14c42168fe96cb818965cb522ed1023d13f8dc0ab098cdf8760c35932c9cdf60001b6104d0565b6000878784818110610be957610be861142f565b5b9050604002016020016020810190610c0191906112ad565b9050610c2f7f4fccbbc284abd163c3c18f168872dc29d4fac77f01fc1cf5f9992b361605dc4f60001b6104d0565b610c5b7f14f24022c2530a4720a223a36c798ed655b1320c21a7fb1cd078146c936b277060001b6104d0565b60008173ffffffffffffffffffffffffffffffffffffffff16836108fc90604051610c85906115ef565b600060405180830381858888f193505050503d8060008114610cc3576040519150601f19603f3d011682016040523d82523d6000602084013e610cc8565b606091505b50509050610cf87f990d01d9292bbf5a72b844d9e480c435f5bf3f28c6a3cf01231653128d574a2960001b6104d0565b610d247fbeb05d1cb9e0c8962b3fbce755095395f809190d1f56a0305f52d745ed2be60860001b6104d0565b8015610dd657610d567f926cdb8fa3eec76098df0921133fbad388217c8a5f07adf0e3652e64344ff66760001b6104d0565b610d827fcf258c3a8696678566a6fd532ee096e27d2a9dc64bcc87d8fccf2c9df406855560001b6104d0565b8173ffffffffffffffffffffffffffffffffffffffff16867feaa22fd2d7b875476355b32cf719794faf9d91b66e73bc6375a053cace9caaee85604051610dc991906110ac565b60405180910390a3610e7e565b610e027f9065e1e3bc2a1b35f85ca394361800750d7ccf66381f3e69fe4faefe0e5cc78f60001b6104d0565b610e2e7f57081b0378c1c31ae18ff29ec060b75a2fcf8bec375989be94d0d303a4f0021160001b6104d0565b8173ffffffffffffffffffffffffffffffffffffffff16867f9b478c095979d3d3a7d602ffd9ee1f0843204d853558ae0882c8fcc0a5bc78cf85604051610e7591906110ac565b60405180910390a35b610eaa7f9de3918864af83d66c46c014e27703f1021307042aef5dcf52b75516706ddd8b60001b6104d0565b6001860195505050508080610ebe906114e3565b915050610afb565b50505050505050565b610ed7610fc7565b73ffffffffffffffffffffffffffffffffffffffff16610ef56104a7565b73ffffffffffffffffffffffffffffffffffffffff1614610f4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4290611337565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610fbb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb290611676565b60405180910390fd5b610fc481610fcf565b50565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000819050919050565b6110a681611093565b82525050565b60006020820190506110c1600083018461109d565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006110f2826110c7565b9050919050565b611102816110e7565b82525050565b600060208201905061111d60008301846110f9565b92915050565b600080fd5b600080fd5b6000819050919050565b6111408161112d565b811461114b57600080fd5b50565b60008135905061115d81611137565b92915050565b60006020828403121561117957611178611123565b5b60006111878482850161114e565b91505092915050565b61119981611093565b81146111a457600080fd5b50565b6000813590506111b681611190565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126111e1576111e06111bc565b5b8235905067ffffffffffffffff8111156111fe576111fd6111c1565b5b60208301915083604082028301111561121a576112196111c6565b5b9250929050565b60008060006040848603121561123a57611239611123565b5b6000611248868287016111a7565b935050602084013567ffffffffffffffff81111561126957611268611128565b5b611275868287016111cb565b92509250509250925092565b61128a816110e7565b811461129557600080fd5b50565b6000813590506112a781611281565b92915050565b6000602082840312156112c3576112c2611123565b5b60006112d184828501611298565b91505092915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006113216020836112da565b915061132c826112eb565b602082019050919050565b6000602082019050818103600083015261135081611314565b9050919050565b7f4e6f2064697362757273656d656e747300000000000000000000000000000000600082015250565b600061138d6010836112da565b915061139882611357565b602082019050919050565b600060208201905081810360008301526113bc81611380565b9050919050565b7f556e6578706563746564206e657874206465706f736974206964000000000000600082015250565b60006113f9601a836112da565b9150611404826113c3565b602082019050919050565b60006020820190508181036000830152611428816113ec565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061149882611093565b91506114a383611093565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156114d8576114d761145e565b5b828201905092915050565b60006114ee82611093565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156115215761152061145e565b5b600182019050919050565b7f44697362757273656d656e7420746f74616c20213d20616d6f756e742073656e60008201527f7400000000000000000000000000000000000000000000000000000000000000602082015250565b60006115886021836112da565b91506115938261152c565b604082019050919050565b600060208201905081810360008301526115b78161157b565b9050919050565b600081905092915050565b50565b60006115d96000836115be565b91506115e4826115c9565b600082019050919050565b60006115fa826115cc565b9150819050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006116606026836112da565b915061166b82611604565b604082019050919050565b6000602082019050818103600083015261168f81611653565b905091905056fea264697066735822122083f16098b83d1bcd3c8f88b64cd62c2ff0f7149c4df36e3ea3404931581a899064736f6c63430008090033",
"devdoc": {
"events": {
"BalanceWithdrawn(address,uint256)": {
"params": {
"balance": "The current contract balance paid to the owner.",
"owner": "The current owner and recipient of the funds."
}
},
"DisbursementFailed(uint256,address,uint256)": {
"params": {
"amount": "The amount intended to be sent to the recipient.",
"depositId": "The unique sequence number identifying the deposit.",
"to": "The intended recipient of the disbursement."
}
},
"DisbursementSuccess(uint256,address,uint256)": {
"params": {
"amount": "The amount sent to the recipient.",
"depositId": "The unique sequence number identifying the deposit.",
"to": "The recipient of the disbursement."
}
}
},
"kind": "dev",
"methods": {
"disburse(uint256,(uint256,address)[])": {
"params": {
"_disbursements": "A list of Disbursements to process.",
"_nextDepositId": "The depositId of the first Dispursement."
}
},
"owner()": {
"details": "Returns the address of the current owner."
},
"renounceOwnership()": {
"details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner."
},
"transferOwnership(address)": {
"details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
}
},
"title": "TeleportrDisburser",
"version": 1
},
"userdoc": {
"events": {
"BalanceWithdrawn(address,uint256)": {
"notice": "Emitted any time the balance is withdrawn by the owner."
},
"DisbursementFailed(uint256,address,uint256)": {
"notice": "Emitted any time a disbursement fails to send."
},
"DisbursementSuccess(uint256,address,uint256)": {
"notice": "Emitted any time a disbursement is successfuly sent."
}
},
"kind": "user",
"methods": {
"constructor": {
"notice": "Initializes a new TeleportrDisburser contract."
},
"disburse(uint256,(uint256,address)[])": {
"notice": "Accepts a list of Disbursements and forwards the amount paid to the contract to each recipient. The method reverts if there are zero disbursements, the total amount to forward differs from the amount sent in the transaction, or the _nextDepositId is unexpected. Failed disbursements will not cause the method to revert, but will instead be held by the contract and availabe for the owner to withdraw."
},
"totalDisbursements()": {
"notice": "The total number of disbursements processed."
},
"withdrawBalance()": {
"notice": "Sends the contract's current balance to the owner."
}
},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 393,
"contract": "contracts/L2/teleportr/TeleportrDisburser.sol:TeleportrDisburser",
"label": "_owner",
"offset": 0,
"slot": "0",
"type": "t_address"
},
{
"astId": 10517,
"contract": "contracts/L2/teleportr/TeleportrDisburser.sol:TeleportrDisburser",
"label": "totalDisbursements",
"offset": 0,
"slot": "1",
"type": "t_uint256"
}
],
"types": {
"t_address": {
"encoding": "inplace",
"label": "address",
"numberOfBytes": "20"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -23,6 +23,7 @@ dotenv.config()
const enableGasReport = !!process.env.ENABLE_GAS_REPORT
const privateKey = process.env.PRIVATE_KEY || '0x' + '11'.repeat(32) // this is to avoid hardhat error
const deploy = process.env.DEPLOY_DIRECTORY || 'deploy'
const config: HardhatUserConfig = {
networks: {
......@@ -40,11 +41,13 @@ const config: HardhatUserConfig = {
'optimism-kovan': {
chainId: 69,
url: 'https://kovan.optimism.io',
deploy,
accounts: [privateKey],
},
'optimism-mainnet': {
chainId: 10,
url: 'https://mainnet.optimism.io',
deploy,
accounts: [privateKey],
},
'mainnet-trial': {
......@@ -52,6 +55,18 @@ const config: HardhatUserConfig = {
url: 'http://127.0.0.1:8545',
accounts: [privateKey],
},
kovan: {
chainId: 42,
url: process.env.CONTRACTS_RPC_URL || '',
deploy,
accounts: [privateKey],
},
mainnet: {
chainId: 1,
url: process.env.CONTRACTS_RPC_URL || '',
deploy,
accounts: [privateKey],
},
},
mocha: {
timeout: 50000,
......
/* Imports: External */
import { ethers } from 'ethers'
import { task } from 'hardhat/config'
import * as types from 'hardhat/internal/core/params/argumentTypes'
task('deploy-teleportr-l1')
.addParam(
'minDepositAmountEth',
'Minimum deposit amount, in ETH.',
undefined,
types.string
)
.addParam(
'maxDepositAmountEth',
'Maximum deposit amount, in ETH.',
undefined,
types.string
)
.addParam(
'maxBalanceEth',
'Maximum contract balance, in ETH.',
undefined,
types.string
)
.addOptionalParam(
'numDeployConfirmations',
'Number of confirmations to wait for each transaction in the deployment. More is safer.',
1,
types.int
)
.setAction(
async (
{
minDepositAmountEth,
maxDepositAmountEth,
maxBalanceEth,
numDeployConfirmations,
},
hre: any
) => {
const { deploy } = hre.deployments
const { deployer } = await hre.getNamedAccounts()
console.log('Deploying TeleportrDeposit... ')
await deploy('TeleportrDeposit', {
from: deployer,
args: [
ethers.utils.parseEther(minDepositAmountEth),
ethers.utils.parseEther(maxDepositAmountEth),
ethers.utils.parseEther(maxBalanceEth),
],
log: true,
waitConfirmations: numDeployConfirmations,
})
console.log('Done.')
}
)
task('deploy-teleportr-l2').setAction(
async ({ numDeployConfirmations }, hre: any) => {
const { deploy } = hre.deployments
const { deployer } = await hre.getNamedAccounts()
console.log('Deploying TeleportrDisburser... ')
await deploy('TeleportrDisburser', {
from: deployer,
args: [],
log: true,
waitConfirmations: numDeployConfirmations,
})
console.log('Done.')
}
)
......@@ -6,3 +6,4 @@ export * from './validate-chugsplash-dictator'
export * from './whitelist'
export * from './withdraw-fees'
export * from './fetch-batches'
export * from './deploy-teleportr'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment