Commit 94a01d5b authored by OptimismBot's avatar OptimismBot Committed by GitHub

Merge pull request #6373 from ethereum-optimism/clabby/ctb/local-preimage-key-support

feat(ctb): Local preimage key support
parents f1359221 4ce2ad0f
......@@ -27,6 +27,7 @@ var (
StepBytes4 = crypto.Keccak256([]byte("step(bytes,bytes)"))[:4]
CheatBytes4 = crypto.Keccak256([]byte("cheat(uint256,bytes32,bytes32,uint256)"))[:4]
LoadKeccak256PreimagePartBytes4 = crypto.Keccak256([]byte("loadKeccak256PreimagePart(uint256,bytes)"))[:4]
LoadLocalDataBytes4 = crypto.Keccak256([]byte("loadLocalData(uint256,bytes32,uint256,uint256)"))[:4]
)
// LoadContracts loads the Cannon contracts, from op-bindings package
......
......@@ -37,9 +37,12 @@ func testContractsSetup(t require.TestingT) (*Contracts, *Addresses) {
}
func SourceMapTracer(t *testing.T, contracts *Contracts, addrs *Addresses) vm.EVMLogger {
mipsSrcMap, err := contracts.MIPS.SourceMap([]string{"../../packages/contracts-bedrock/contracts/cannon/MIPS.sol"})
t.Fatal("TODO(clabby): The source map tracer is disabled until source IDs have been added to foundry artifacts.")
contractsDir := "../../packages/contracts-bedrock"
mipsSrcMap, err := contracts.MIPS.SourceMap([]string{path.Join(contractsDir, "src/cannon/MIPS.sol")})
require.NoError(t, err)
oracleSrcMap, err := contracts.Oracle.SourceMap([]string{"../../packages/contracts-bedrock/contracts/cannon/PreimageOracle.sol"})
oracleSrcMap, err := contracts.Oracle.SourceMap([]string{path.Join(contractsDir, "src/cannon/PreimageOracle.sol")})
require.NoError(t, err)
return srcmap.NewSourceMapTracer(map[common.Address]*srcmap.SourceMap{addrs.MIPS: mipsSrcMap, addrs.Oracle: oracleSrcMap}, os.Stdout)
......@@ -76,7 +79,7 @@ func (m *MIPSEVM) Step(t *testing.T, stepWitness *StepWitness) []byte {
t.Logf("reading preimage key %x at offset %d", stepWitness.PreimageKey, stepWitness.PreimageOffset)
poInput, err := stepWitness.EncodePreimageOracleInput()
require.NoError(t, err, "encode preimage oracle input")
_, leftOverGas, err := m.env.Call(vm.AccountRef(m.addrs.Sender), m.addrs.Oracle, poInput, startingGas, big.NewInt(0))
_, leftOverGas, err := m.env.Call(vm.AccountRef(sender), m.addrs.Oracle, poInput, startingGas, big.NewInt(0))
require.NoErrorf(t, err, "evm should not fail, took %d gas", startingGas-leftOverGas)
}
......
......@@ -49,18 +49,19 @@ func (wit *StepWitness) EncodePreimageOracleInput() ([]byte, error) {
switch preimage.KeyType(wit.PreimageKey[0]) {
case preimage.LocalKeyType:
// We have no on-chain form of preparing the bootstrap pre-images onchain yet.
// So instead we cheat them in.
// In production usage there should be an on-chain contract that exposes this,
// rather than going through the global keccak256 oracle.
if len(wit.PreimageValue) > 32+8 {
return nil, fmt.Errorf("local pre-image exceeds maximum size of 32 bytes with key 0x%x", wit.PreimageKey)
}
var input []byte
input = append(input, CheatBytes4...)
input = append(input, uint32ToBytes32(wit.PreimageOffset)...)
input = append(input, LoadLocalDataBytes4...)
input = append(input, wit.PreimageKey[:]...)
preimagePart := wit.PreimageValue[8:]
var tmp [32]byte
copy(tmp[:], wit.PreimageValue[wit.PreimageOffset:])
copy(tmp[:], preimagePart)
input = append(input, tmp[:]...)
input = append(input, uint32ToBytes32(uint32(len(wit.PreimageValue))-8)...)
input = append(input, uint32ToBytes32(uint32(len(wit.PreimageValue)-8))...)
input = append(input, uint32ToBytes32(wit.PreimageOffset)...)
// Note: we can pad calldata to 32 byte multiple, but don't strictly have to
return input, nil
case preimage.Keccak256KeyType:
......
......@@ -30,8 +30,8 @@ var (
// AlphabetVMMetaData contains all meta data concerning the AlphabetVM contract.
var AlphabetVMMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"Claim\",\"name\":\"_absolutePrestate\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_stateData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"step\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"postState_\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x60a060405234801561001057600080fd5b5060405161030438038061030483398101604081905261002f91610037565b608052610050565b60006020828403121561004957600080fd5b5051919050565b60805161029a61006a6000396000605c015261029a6000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063f8e0cb9614610030575b600080fd5b61004361003e366004610157565b610055565b60405190815260200160405180910390f35b60008060007f0000000000000000000000000000000000000000000000000000000000000000878760405161008b9291906101c3565b6040518091039020036100af57600091506100a8868801886101d3565b90506100ce565b6100bb868801886101ec565b9092509050816100ca8161023d565b9250505b816100da826001610275565b6040805160208101939093528201526060016040516020818303038152906040528051906020012092505050949350505050565b60008083601f84011261012057600080fd5b50813567ffffffffffffffff81111561013857600080fd5b60208301915083602082850101111561015057600080fd5b9250929050565b6000806000806040858703121561016d57600080fd5b843567ffffffffffffffff8082111561018557600080fd5b6101918883890161010e565b909650945060208701359150808211156101aa57600080fd5b506101b78782880161010e565b95989497509550505050565b8183823760009101908152919050565b6000602082840312156101e557600080fd5b5035919050565b600080604083850312156101ff57600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361026e5761026e61020e565b5060010190565b600082198211156102885761028861020e565b50019056fea164736f6c634300080f000a",
ABI: "[{\"inputs\":[{\"internalType\":\"Claim\",\"name\":\"_absolutePrestate\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"internalType\":\"contractIPreimageOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_stateData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"step\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"postState_\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x60a060405234801561001057600080fd5b5060405161039838038061039883398101604081905261002f9161007a565b608081905261003c610062565b600080546001600160a01b0319166001600160a01b039290921691909117905550610093565b6460016000f36000908152600580601b83f091505090565b60006020828403121561008c57600080fd5b5051919050565b6080516102eb6100ad600039600060ad01526102eb6000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80637dc0d1d01461003b578063f8e0cb9614610085575b600080fd5b60005461005b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100986100933660046101a8565b6100a6565b60405190815260200161007c565b60008060007f000000000000000000000000000000000000000000000000000000000000000087876040516100dc929190610214565b60405180910390200361010057600091506100f986880188610224565b905061011f565b61010c8688018861023d565b90925090508161011b8161028e565b9250505b8161012b8260016102c6565b6040805160208101939093528201526060016040516020818303038152906040528051906020012092505050949350505050565b60008083601f84011261017157600080fd5b50813567ffffffffffffffff81111561018957600080fd5b6020830191508360208285010111156101a157600080fd5b9250929050565b600080600080604085870312156101be57600080fd5b843567ffffffffffffffff808211156101d657600080fd5b6101e28883890161015f565b909650945060208701359150808211156101fb57600080fd5b506102088782880161015f565b95989497509550505050565b8183823760009101908152919050565b60006020828403121561023657600080fd5b5035919050565b6000806040838503121561025057600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036102bf576102bf61025f565b5060010190565b600082198211156102d9576102d961025f565b50019056fea164736f6c634300080f000a",
}
// AlphabetVMABI is the input ABI used to generate the binding from.
......@@ -201,6 +201,37 @@ func (_AlphabetVM *AlphabetVMTransactorRaw) Transact(opts *bind.TransactOpts, me
return _AlphabetVM.Contract.contract.Transact(opts, method, params...)
}
// Oracle is a free data retrieval call binding the contract method 0x7dc0d1d0.
//
// Solidity: function oracle() view returns(address)
func (_AlphabetVM *AlphabetVMCaller) Oracle(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _AlphabetVM.contract.Call(opts, &out, "oracle")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// Oracle is a free data retrieval call binding the contract method 0x7dc0d1d0.
//
// Solidity: function oracle() view returns(address)
func (_AlphabetVM *AlphabetVMSession) Oracle() (common.Address, error) {
return _AlphabetVM.Contract.Oracle(&_AlphabetVM.CallOpts)
}
// Oracle is a free data retrieval call binding the contract method 0x7dc0d1d0.
//
// Solidity: function oracle() view returns(address)
func (_AlphabetVM *AlphabetVMCallerSession) Oracle() (common.Address, error) {
return _AlphabetVM.Contract.Oracle(&_AlphabetVM.CallOpts)
}
// Step is a free data retrieval call binding the contract method 0xf8e0cb96.
//
// Solidity: function step(bytes _stateData, bytes ) view returns(bytes32 postState_)
......
......@@ -9,11 +9,11 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const AlphabetVMStorageLayoutJSON = "{\"storage\":null,\"types\":{}}"
const AlphabetVMStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"test/FaultDisputeGame.t.sol:AlphabetVM\",\"label\":\"oracle\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_contract(IPreimageOracle)1001\"}],\"types\":{\"t_contract(IPreimageOracle)1001\":{\"encoding\":\"inplace\",\"label\":\"contract IPreimageOracle\",\"numberOfBytes\":\"20\"}}}"
var AlphabetVMStorageLayout = new(solc.StorageLayout)
var AlphabetVMDeployedBin = "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063f8e0cb9614610030575b600080fd5b61004361003e366004610157565b610055565b60405190815260200160405180910390f35b60008060007f0000000000000000000000000000000000000000000000000000000000000000878760405161008b9291906101c3565b6040518091039020036100af57600091506100a8868801886101d3565b90506100ce565b6100bb868801886101ec565b9092509050816100ca8161023d565b9250505b816100da826001610275565b6040805160208101939093528201526060016040516020818303038152906040528051906020012092505050949350505050565b60008083601f84011261012057600080fd5b50813567ffffffffffffffff81111561013857600080fd5b60208301915083602082850101111561015057600080fd5b9250929050565b6000806000806040858703121561016d57600080fd5b843567ffffffffffffffff8082111561018557600080fd5b6101918883890161010e565b909650945060208701359150808211156101aa57600080fd5b506101b78782880161010e565b95989497509550505050565b8183823760009101908152919050565b6000602082840312156101e557600080fd5b5035919050565b600080604083850312156101ff57600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361026e5761026e61020e565b5060010190565b600082198211156102885761028861020e565b50019056fea164736f6c634300080f000a"
var AlphabetVMDeployedBin = "0x608060405234801561001057600080fd5b50600436106100365760003560e01c80637dc0d1d01461003b578063f8e0cb9614610085575b600080fd5b60005461005b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100986100933660046101a8565b6100a6565b60405190815260200161007c565b60008060007f000000000000000000000000000000000000000000000000000000000000000087876040516100dc929190610214565b60405180910390200361010057600091506100f986880188610224565b905061011f565b61010c8688018861023d565b90925090508161011b8161028e565b9250505b8161012b8260016102c6565b6040805160208101939093528201526060016040516020818303038152906040528051906020012092505050949350505050565b60008083601f84011261017157600080fd5b50813567ffffffffffffffff81111561018957600080fd5b6020830191508360208285010111156101a157600080fd5b9250929050565b600080600080604085870312156101be57600080fd5b843567ffffffffffffffff808211156101d657600080fd5b6101e28883890161015f565b909650945060208701359150808211156101fb57600080fd5b506102088782880161015f565b95989497509550505050565b8183823760009101908152919050565b60006020828403121561023657600080fd5b5035919050565b6000806040838503121561025057600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036102bf576102bf61025f565b5060010190565b600082198211156102d9576102d961025f565b50019056fea164736f6c634300080f000a"
func init() {
if err := json.Unmarshal([]byte(AlphabetVMStorageLayoutJSON), AlphabetVMStorageLayout); err != nil {
......
......@@ -30,8 +30,8 @@ var (
// FaultDisputeGameMetaData contains all meta data concerning the FaultDisputeGame contract.
var FaultDisputeGameMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"Claim\",\"name\":\"_absolutePrestate\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_maxGameDepth\",\"type\":\"uint256\"},{\"internalType\":\"Duration\",\"name\":\"_gameDuration\",\"type\":\"uint64\"},{\"internalType\":\"contractIBigStepper\",\"name\":\"_vm\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotDefendRootClaim\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClockNotExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClockTimeExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GameDepthExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GameNotInProgress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPrestate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValidStep\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"parentIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"Claim\",\"name\":\"claim\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"claimant\",\"type\":\"address\"}],\"name\":\"Move\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enumGameStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"Resolved\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ABSOLUTE_PRESTATE\",\"outputs\":[{\"internalType\":\"Claim\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GAME_DURATION\",\"outputs\":[{\"internalType\":\"Duration\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_GAME_DEPTH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VM\",\"outputs\":[{\"internalType\":\"contractIBigStepper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_parentIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"}],\"name\":\"attack\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bondManager\",\"outputs\":[{\"internalType\":\"contractIBondManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimData\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"parentIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"countered\",\"type\":\"bool\"},{\"internalType\":\"Claim\",\"name\":\"claim\",\"type\":\"bytes32\"},{\"internalType\":\"Position\",\"name\":\"position\",\"type\":\"uint128\"},{\"internalType\":\"Clock\",\"name\":\"clock\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimDataLen\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"len_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createdAt\",\"outputs\":[{\"internalType\":\"Timestamp\",\"name\":\"createdAt_\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_parentIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"}],\"name\":\"defend\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"extraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"extraData_\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gameData\",\"outputs\":[{\"internalType\":\"GameType\",\"name\":\"gameType_\",\"type\":\"uint8\"},{\"internalType\":\"Claim\",\"name\":\"rootClaim_\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"extraData_\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gameStart\",\"outputs\":[{\"internalType\":\"Timestamp\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gameType\",\"outputs\":[{\"internalType\":\"GameType\",\"name\":\"gameType_\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2BlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"l2BlockNumber_\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_challengeIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_isAttack\",\"type\":\"bool\"}],\"name\":\"move\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"enumGameStatus\",\"name\":\"status_\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rootClaim\",\"outputs\":[{\"internalType\":\"Claim\",\"name\":\"rootClaim_\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"status\",\"outputs\":[{\"internalType\":\"enumGameStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_claimIndex\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_isAttack\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_stateData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_proof\",\"type\":\"bytes\"}],\"name\":\"step\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x6101606040523480156200001257600080fd5b50604051620022a8380380620022a8833981016040819052620000359162000071565b6000608081905260a052600360c05260e093909352610100919091526001600160401b0316610120526001600160a01b031661014052620000d8565b600080600080608085870312156200008857600080fd5b84516020860151604087015191955093506001600160401b0381168114620000af57600080fd5b60608601519092506001600160a01b0381168114620000cd57600080fd5b939692955090935050565b60805160a05160c05160e05161010051610120516101405161214462000164600039600081816103b501526114690152600081816104420152818161074e0152610d9f0152600081816102cd0152818161065601528181610bde015261126d0152600081816101c801526113a7015260006109c60152600061099d0152600061097401526121446000f3fe6080604052600436106101755760003560e01c80638980e0cc116100cb578063c31b29ce1161007f578063cf09e0d011610059578063cf09e0d0146104db578063d8cc1a3c146104fa578063fa24f7431461051a57600080fd5b8063c31b29ce14610430578063c55cd0c714610464578063c6f0308c1461047757600080fd5b806392931298116100b057806392931298146103a3578063bbdc02db146103d7578063bcef3b55146103f357600080fd5b80638980e0cc1461034e5780638b85902b1461036357600080fd5b8063363cc4271161012d578063609d333411610107578063609d333414610311578063632247ea146103265780638129fc1c1461033957600080fd5b8063363cc4271461025c5780634778efe8146102bb57806354fd4d50146102ef57600080fd5b80632810e1d61161015e5780632810e1d6146101f85780633218b99d1461020d57806335fef5671461024757600080fd5b8063200d2ed21461017a578063266198f9146101b6575b600080fd5b34801561018657600080fd5b506000546101a09068010000000000000000900460ff1681565b6040516101ad9190611bcd565b60405180910390f35b3480156101c257600080fd5b506101ea7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101ad565b34801561020457600080fd5b506101a061053e565b34801561021957600080fd5b5060005461022e9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101ad565b61025a610255366004611c0e565b61095d565b005b34801561026857600080fd5b50600054610296906901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ad565b3480156102c757600080fd5b506101ea7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102fb57600080fd5b5061030461096d565b6040516101ad9190611caa565b34801561031d57600080fd5b50610304610a10565b61025a610334366004611cd9565b610a22565b34801561034557600080fd5b5061025a611006565b34801561035a57600080fd5b506001546101ea565b34801561036f57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003602001356101ea565b3480156103af57600080fd5b506102967f000000000000000000000000000000000000000000000000000000000000000081565b3480156103e357600080fd5b50604051600081526020016101ad565b3480156103ff57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356101ea565b34801561043c57600080fd5b5061022e7f000000000000000000000000000000000000000000000000000000000000000081565b61025a610472366004611c0e565b611147565b34801561048357600080fd5b50610497610492366004611d0e565b611153565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101ad565b3480156104e757600080fd5b5060005467ffffffffffffffff1661022e565b34801561050657600080fd5b5061025a610515366004611d70565b6111c4565b34801561052657600080fd5b5061052f6116e8565b6040516101ad93929190611dfa565b60008060005468010000000000000000900460ff16600281111561056457610564611b9e565b1461059b576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546000916105ab91611e54565b90506fffffffffffffffffffffffffffffffff815b67ffffffffffffffff811015610695576000600182815481106105e5576105e5611e6b565b6000918252602090912060039091020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019290915060ff640100000000909104161561063657506105c0565b600281015460009061067a906fffffffffffffffffffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000611726565b90508381101561068e578093508260010194505b50506105c0565b506000600183815481106106ab576106ab611e6b565b600091825260208220600390910201805490925063ffffffff9081169190821461071557600182815481106106e2576106e2611e6b565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff16610741565b600283015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff165b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1661078567ffffffffffffffff831642611e54565b6107a1836fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff166107b59190611e9a565b116107ec576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028381015461088e906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b6108989190611ee1565b67ffffffffffffffff161580156108bf57506fffffffffffffffffffffffffffffffff8414155b156108cd57600295506108d2565b600195505b600080548791907fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff166801000000000000000083600281111561091757610917611b9e565b02179055600281111561092c5761092c611b9e565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a2505050505090565b61096982826000610a22565b5050565b60606109987f00000000000000000000000000000000000000000000000000000000000000006117db565b6109c17f00000000000000000000000000000000000000000000000000000000000000006117db565b6109ea7f00000000000000000000000000000000000000000000000000000000000000006117db565b6040516020016109fc93929190611f08565b604051602081830303815290604052905090565b6060610a1d602080611918565b905090565b6000805468010000000000000000900460ff166002811115610a4657610a46611b9e565b14610a7d576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015610a89575080155b15610ac0576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060018481548110610ad557610ad5611e6b565b60009182526020918290206040805160a0810182526003909302909101805463ffffffff8116845260ff64010000000090910416151593830193909352600180840154918301919091526002909201546fffffffffffffffffffffffffffffffff80821660608401527001000000000000000000000000000000009091041660808201528154909250819086908110610b7057610b70611e6b565b6000918252602082206003909102018054921515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909316929092179091556060820151610bda906fffffffffffffffffffffffffffffffff1684151760011b90565b90507f0000000000000000000000000000000000000000000000000000000000000000610c99826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610cdb576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815160009063ffffffff90811614610d3b576001836000015163ffffffff1681548110610d0a57610d0a611e6b565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610d74846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610d889190611e9a565b610d929190611e54565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610e05576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b421790506000610e26888660009182526020526040902090565b60008181526002602052604090205490915060ff1615610e72576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260026020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581528184018e81526fffffffffffffffffffffffffffffffff808d16606085019081528a82166080860190815286548088018855968a52945160039096027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf68101805495511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000909616979099169690961793909317909655517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf78401555190518416700100000000000000000000000000000000029316929092177fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf8909201919091555133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff8152602081019290925260019190810161108b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff909316929092179490941781556040830151938101939093556060820151608090920151811670010000000000000000000000000000000002911617600290910155565b61096982826001610a22565b6001818154811061116357600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b6000805468010000000000000000900460ff1660028111156111e8576111e8611b9e565b1461121f576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001878154811061123457611234611e6b565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112937f00000000000000000000000000000000000000000000000000000000000000006001611e9a565b61132f826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1614611370576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008089156113f657611394836fffffffffffffffffffffffffffffffff166119af565b67ffffffffffffffff166000036113cd577f000000000000000000000000000000000000000000000000000000000000000091506113ef565b6113e86113db600186611f7e565b865463ffffffff16611a55565b6001015491505b5083611410565b8460010154915061140d8460016113db9190611faf565b90505b818989604051611421929190611fe3565b604051809103902014611460576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f8e0cb968c8c8c8c6040518563ffffffff1660e01b81526004016114c6949392919061203c565b6020604051808303816000875af11580156114e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611509919061206e565b6002848101549290911492506000916115b4906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611650886fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61165a9190612087565b6116649190611ee1565b67ffffffffffffffff1615905081151581036116ac576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505084547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff166401000000001790945550505050505050505050565b6000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900335606061171f610a10565b9050909192565b6000806117b3847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1690508083036001841b600180831b0386831b17039250505092915050565b60608160000361181e57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156118485780611832816120a8565b91506118419050600a836120e0565b9150611822565b60008167ffffffffffffffff811115611863576118636120f4565b6040519080825280601f01601f19166020018201604052801561188d576020820181803683370190505b5090505b8415611910576118a2600183611e54565b91506118af600a86612123565b6118ba906030611e9a565b60f81b8183815181106118cf576118cf611e6b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611909600a866120e0565b9450611891565b949350505050565b6060600061194f84367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003611e9a565b90508267ffffffffffffffff1667ffffffffffffffff811115611974576119746120f4565b6040519080825280601f01601f19166020018201604052801561199e576020820181803683370190505b509150828160208401375092915050565b600080611a3c837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b600080611a73846fffffffffffffffffffffffffffffffff16611af2565b905060018381548110611a8857611a88611e6b565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff828116911614611aeb57815460018054909163ffffffff16908110611ad657611ad6611e6b565b90600052602060002090600302019150611a99565b5092915050565b60008119600183011681611b86827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310611c08577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008060408385031215611c2157600080fd5b50508035926020909101359150565b60005b83811015611c4b578181015183820152602001611c33565b83811115611c5a576000848401525b50505050565b60008151808452611c78816020860160208601611c30565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611cbd6020830184611c60565b9392505050565b80358015158114611cd457600080fd5b919050565b600080600060608486031215611cee57600080fd5b8335925060208401359150611d0560408501611cc4565b90509250925092565b600060208284031215611d2057600080fd5b5035919050565b60008083601f840112611d3957600080fd5b50813567ffffffffffffffff811115611d5157600080fd5b602083019150836020828501011115611d6957600080fd5b9250929050565b60008060008060008060808789031215611d8957600080fd5b86359550611d9960208801611cc4565b9450604087013567ffffffffffffffff80821115611db657600080fd5b611dc28a838b01611d27565b90965094506060890135915080821115611ddb57600080fd5b50611de889828a01611d27565b979a9699509497509295939492505050565b60ff84168152826020820152606060408201526000611e1c6060830184611c60565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015611e6657611e66611e25565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008219821115611ead57611ead611e25565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600067ffffffffffffffff80841680611efc57611efc611eb2565b92169190910692915050565b60008451611f1a818460208901611c30565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551611f56816001850160208a01611c30565b60019201918201528351611f71816002840160208801611c30565b0160020195945050505050565b60006fffffffffffffffffffffffffffffffff83811690831681811015611fa757611fa7611e25565b039392505050565b60006fffffffffffffffffffffffffffffffff808316818516808303821115611fda57611fda611e25565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000612050604083018688611ff3565b8281036020840152612063818587611ff3565b979650505050505050565b60006020828403121561208057600080fd5b5051919050565b600067ffffffffffffffff83811690831681811015611fa757611fa7611e25565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036120d9576120d9611e25565b5060010190565b6000826120ef576120ef611eb2565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008261213257612132611eb2565b50069056fea164736f6c634300080f000a",
ABI: "[{\"inputs\":[{\"internalType\":\"Claim\",\"name\":\"_absolutePrestate\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_maxGameDepth\",\"type\":\"uint256\"},{\"internalType\":\"Duration\",\"name\":\"_gameDuration\",\"type\":\"uint64\"},{\"internalType\":\"contractIBigStepper\",\"name\":\"_vm\",\"type\":\"address\"},{\"internalType\":\"contractL2OutputOracle\",\"name\":\"_l2oo\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CannotDefendRootClaim\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClaimAlreadyExists\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClockNotExpired\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ClockTimeExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GameDepthExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GameNotInProgress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidParent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPrestate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValidStep\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"parentIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"Claim\",\"name\":\"claim\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"claimant\",\"type\":\"address\"}],\"name\":\"Move\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"enumGameStatus\",\"name\":\"status\",\"type\":\"uint8\"}],\"name\":\"Resolved\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ABSOLUTE_PRESTATE\",\"outputs\":[{\"internalType\":\"Claim\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GAME_DURATION\",\"outputs\":[{\"internalType\":\"Duration\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"L2_OUTPUT_ORACLE\",\"outputs\":[{\"internalType\":\"contractL2OutputOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_GAME_DEPTH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VM\",\"outputs\":[{\"internalType\":\"contractIBigStepper\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_ident\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_partOffset\",\"type\":\"uint256\"}],\"name\":\"addLocalData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_parentIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"}],\"name\":\"attack\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"bondManager\",\"outputs\":[{\"internalType\":\"contractIBondManager\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimData\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"parentIndex\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"countered\",\"type\":\"bool\"},{\"internalType\":\"Claim\",\"name\":\"claim\",\"type\":\"bytes32\"},{\"internalType\":\"Position\",\"name\":\"position\",\"type\":\"uint128\"},{\"internalType\":\"Clock\",\"name\":\"clock\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimDataLen\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"len_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"createdAt\",\"outputs\":[{\"internalType\":\"Timestamp\",\"name\":\"createdAt_\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_parentIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"}],\"name\":\"defend\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"extraData\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"extraData_\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gameData\",\"outputs\":[{\"internalType\":\"GameType\",\"name\":\"gameType_\",\"type\":\"uint8\"},{\"internalType\":\"Claim\",\"name\":\"rootClaim_\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"extraData_\",\"type\":\"bytes\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gameStart\",\"outputs\":[{\"internalType\":\"Timestamp\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gameType\",\"outputs\":[{\"internalType\":\"GameType\",\"name\":\"gameType_\",\"type\":\"uint8\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l1Head\",\"outputs\":[{\"internalType\":\"Hash\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"l2BlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"l2BlockNumber_\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_challengeIndex\",\"type\":\"uint256\"},{\"internalType\":\"Claim\",\"name\":\"_claim\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_isAttack\",\"type\":\"bool\"}],\"name\":\"move\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resolve\",\"outputs\":[{\"internalType\":\"enumGameStatus\",\"name\":\"status_\",\"type\":\"uint8\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rootClaim\",\"outputs\":[{\"internalType\":\"Claim\",\"name\":\"rootClaim_\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"status\",\"outputs\":[{\"internalType\":\"enumGameStatus\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_claimIndex\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"_isAttack\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"_stateData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"_proof\",\"type\":\"bytes\"}],\"name\":\"step\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"version\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x6101806040523480156200001257600080fd5b50604051620029aa380380620029aa833981016040819052620000359162000091565b6000608081905260a052600460c05260e094909452610100929092526001600160401b0316610120526001600160a01b0390811661014052166101605262000105565b6001600160a01b03811681146200008e57600080fd5b50565b600080600080600060a08688031215620000aa57600080fd5b85516020870151604088015191965094506001600160401b0381168114620000d157600080fd5b6060870151909350620000e48162000078565b6080870151909250620000f78162000078565b809150509295509295909350565b60805160a05160c05160e05161010051610120516101405161016051612800620001aa6000396000818161049901526107eb01526000818161040c015281816106280152611a470152600081816104cd01528181610ce4015261133501526000818161030e01528181610bec01528181611174015261184b01526000818161020b015261198501526000610f5c01526000610f3301526000610f0a01526128006000f3fe6080604052600436106101965760003560e01c80638129fc1c116100e1578063c0c3a0921161008a578063c6f0308c11610064578063c6f0308c14610502578063cf09e0d014610566578063d8cc1a3c14610585578063fa24f743146105a557600080fd5b8063c0c3a09214610487578063c31b29ce146104bb578063c55cd0c7146104ef57600080fd5b806392931298116100bb57806392931298146103fa578063bbdc02db1461042e578063bcef3b551461044a57600080fd5b80638129fc1c146103905780638980e0cc146103a55780638b85902b146103ba57600080fd5b8063363cc42711610143578063609d33341161011d578063609d333414610352578063632247ea146103675780636361506d1461037a57600080fd5b8063363cc4271461029d5780634778efe8146102fc57806354fd4d501461033057600080fd5b80632810e1d6116101745780632810e1d61461023b5780633218b99d1461025057806335fef5671461028a57600080fd5b80631e27052a1461019b578063200d2ed2146101bd578063266198f9146101f9575b600080fd5b3480156101a757600080fd5b506101bb6101b636600461217c565b6105c9565b005b3480156101c957600080fd5b506000546101e39068010000000000000000900460ff1681565b6040516101f091906121cd565b60405180910390f35b34801561020557600080fd5b5061022d7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101f0565b34801561024757600080fd5b506101e3610ad2565b34801561025c57600080fd5b506000546102719067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101f0565b6101bb61029836600461217c565b610ef3565b3480156102a957600080fd5b506000546102d7906901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f0565b34801561030857600080fd5b5061022d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561033c57600080fd5b50610345610f03565b6040516101f09190612284565b34801561035e57600080fd5b50610345610fa6565b6101bb6103753660046122b3565b610fb8565b34801561038657600080fd5b5061022d60015481565b34801561039c57600080fd5b506101bb6115d4565b3480156103b157600080fd5b5060025461022d565b3480156103c657600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036020013561022d565b34801561040657600080fd5b506102d77f000000000000000000000000000000000000000000000000000000000000000081565b34801561043a57600080fd5b50604051600081526020016101f0565b34801561045657600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033561022d565b34801561049357600080fd5b506102d77f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c757600080fd5b506102717f000000000000000000000000000000000000000000000000000000000000000081565b6101bb6104fd36600461217c565b611725565b34801561050e57600080fd5b5061052261051d3660046122e8565b611731565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101f0565b34801561057257600080fd5b5060005467ffffffffffffffff16610271565b34801561059157600080fd5b506101bb6105a036600461234a565b6117a2565b3480156105b157600080fd5b506105ba611cc6565b6040516101f0939291906123d4565b6000805468010000000000000000900460ff1660028111156105ed576105ed61219e565b14610624576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa158015610691573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b591906123ff565b905082600103610770576001546040517f9a1f5e7f000000000000000000000000000000000000000000000000000000008152600481018590526024810191909152602060448201526064810183905273ffffffffffffffffffffffffffffffffffffffff821690639a1f5e7f906084015b6020604051808303816000875af1158015610746573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076a9190612435565b50505050565b82600203610909576040517fcf8e5cf0000000000000000000000000000000000000000000000000000000008152367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360200135600482015260009073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063cf8e5cf090602401606060405180830381865afa158015610832573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610856919061249d565b80516040517f9a1f5e7f000000000000000000000000000000000000000000000000000000008152600481018790526024810191909152602060448201526064810185905290915073ffffffffffffffffffffffffffffffffffffffff831690639a1f5e7f906084016020604051808303816000875af11580156108de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109029190612435565b5050505050565b826003036109a2576040517f9a1f5e7f00000000000000000000000000000000000000000000000000000000815260048101849052367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356024820152602060448201526064810183905273ffffffffffffffffffffffffffffffffffffffff821690639a1f5e7f90608401610727565b82600403610a41576040517f9a1f5e7f00000000000000000000000000000000000000000000000000000000815260048101849052367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036020013560c01b6024820152600860448201526064810183905273ffffffffffffffffffffffffffffffffffffffff821690639a1f5e7f90608401610727565b82600503610acd576040517f9a1f5e7f000000000000000000000000000000000000000000000000000000008152600481018490524660c01b6024820152600860448201526064810183905273ffffffffffffffffffffffffffffffffffffffff821690639a1f5e7f906084016020604051808303816000875af1158015610746573d6000803e3d6000fd5b505050565b60008060005468010000000000000000900460ff166002811115610af857610af861219e565b14610b2f576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254600090610b4190600190612558565b90506fffffffffffffffffffffffffffffffff815b67ffffffffffffffff811015610c2b57600060028281548110610b7b57610b7b61256f565b6000918252602090912060039091020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019290915060ff6401000000009091041615610bcc5750610b56565b6002810154600090610c10906fffffffffffffffffffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000611d04565b905083811015610c24578093508260010194505b5050610b56565b50600060028381548110610c4157610c4161256f565b600091825260208220600390910201805490925063ffffffff90811691908214610cab5760028281548110610c7857610c7861256f565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff16610cd7565b600283015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff165b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c16610d1b67ffffffffffffffff831642612558565b610d37836fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610d4b919061259e565b11610d82576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600283810154610e24906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b610e2e91906125e5565b67ffffffffffffffff16158015610e5557506fffffffffffffffffffffffffffffffff8414155b15610e635760029550610e68565b600195505b600080548791907fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff1668010000000000000000836002811115610ead57610ead61219e565b021790556002811115610ec257610ec261219e565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a2505050505090565b610eff82826000610fb8565b5050565b6060610f2e7f0000000000000000000000000000000000000000000000000000000000000000611db9565b610f577f0000000000000000000000000000000000000000000000000000000000000000611db9565b610f807f0000000000000000000000000000000000000000000000000000000000000000611db9565b604051602001610f929392919061260c565b604051602081830303815290604052905090565b6060610fb3602080611ef6565b905090565b6000805468010000000000000000900460ff166002811115610fdc57610fdc61219e565b14611013576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8215801561101f575080155b15611056576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006002848154811061106b5761106b61256f565b60009182526020918290206040805160a0810182526003909302909101805463ffffffff8116845260ff64010000000090910416151593830193909352600180840154918301919091526002928301546fffffffffffffffffffffffffffffffff808216606085015270010000000000000000000000000000000090910416608083015282549193509190869081106111065761110661256f565b6000918252602082206003909102018054921515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909316929092179091556060820151611170906fffffffffffffffffffffffffffffffff1684151760011b90565b90507f000000000000000000000000000000000000000000000000000000000000000061122f826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115611271576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815160009063ffffffff908116146112d1576002836000015163ffffffff16815481106112a0576112a061256f565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff164261130a846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff1661131e919061259e565b6113289190612558565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff8216111561139b576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b4217905060006113bc888660009182526020526040902090565b60008181526003602052604090205490915060ff1615611408576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016003600083815260200190815260200160002060006101000a81548160ff02191690831515021790555060026040518060a001604052808b63ffffffff1681526020016000151581526020018a8152602001876fffffffffffffffffffffffffffffffff168152602001846fffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003906000526020600020906003020160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548160ff0219169083151502179055506040820151816001015560608201518160020160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060808201518160020160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555050503373ffffffffffffffffffffffffffffffffffffffff16888a7f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be60405160405180910390a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff815260208101929092526002919081016116597ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff909316929092179490941781556040830151818501556060830151608090930151821670010000000000000000000000000000000002929091169190911760029091015561171f9043612558565b40600155565b610eff82826001610fb8565b6002818154811061174157600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b6000805468010000000000000000900460ff1660028111156117c6576117c661219e565b146117fd576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600287815481106118125761181261256f565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506118717f0000000000000000000000000000000000000000000000000000000000000000600161259e565b61190d826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161461194e576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008089156119d457611972836fffffffffffffffffffffffffffffffff16611f8d565b67ffffffffffffffff166000036119ab577f000000000000000000000000000000000000000000000000000000000000000091506119cd565b6119c66119b9600186612682565b865463ffffffff16612033565b6001015491505b50836119ee565b846001015491506119eb8460016119b991906126b3565b90505b8189896040516119ff9291906126e7565b604051809103902014611a3e576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f8e0cb968c8c8c8c6040518563ffffffff1660e01b8152600401611aa49493929190612740565b6020604051808303816000875af1158015611ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ae79190612435565b600284810154929091149250600091611b92906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611c2e886fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611c389190612772565b611c4291906125e5565b67ffffffffffffffff161590508115158103611c8a576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505084547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff166401000000001790945550505050505050505050565b6000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611cfd610fa6565b9050909192565b600080611d91847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1690508083036001841b600180831b0386831b17039250505092915050565b606081600003611dfc57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611e265780611e1081612793565b9150611e1f9050600a836127cb565b9150611e00565b60008167ffffffffffffffff811115611e4157611e4161244e565b6040519080825280601f01601f191660200182016040528015611e6b576020820181803683370190505b5090505b8415611eee57611e80600183612558565b9150611e8d600a866127df565b611e9890603061259e565b60f81b818381518110611ead57611ead61256f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611ee7600a866127cb565b9450611e6f565b949350505050565b60606000611f2d84367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900361259e565b90508267ffffffffffffffff1667ffffffffffffffff811115611f5257611f5261244e565b6040519080825280601f01601f191660200182016040528015611f7c576020820181803683370190505b509150828160208401375092915050565b60008061201a837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b600080612051846fffffffffffffffffffffffffffffffff166120d0565b9050600283815481106120665761206661256f565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff8281169116146120c957815460028054909163ffffffff169081106120b4576120b461256f565b90600052602060002090600302019150612077565b5092915050565b60008119600183011681612164827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b6000806040838503121561218f57600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310612208577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60005b83811015612229578181015183820152602001612211565b8381111561076a5750506000910152565b6000815180845261225281602086016020860161220e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612297602083018461223a565b9392505050565b803580151581146122ae57600080fd5b919050565b6000806000606084860312156122c857600080fd5b83359250602084013591506122df6040850161229e565b90509250925092565b6000602082840312156122fa57600080fd5b5035919050565b60008083601f84011261231357600080fd5b50813567ffffffffffffffff81111561232b57600080fd5b60208301915083602082850101111561234357600080fd5b9250929050565b6000806000806000806080878903121561236357600080fd5b863595506123736020880161229e565b9450604087013567ffffffffffffffff8082111561239057600080fd5b61239c8a838b01612301565b909650945060608901359150808211156123b557600080fd5b506123c289828a01612301565b979a9699509497509295939492505050565b60ff841681528260208201526060604082015260006123f6606083018461223a565b95945050505050565b60006020828403121561241157600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461229757600080fd5b60006020828403121561244757600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b80516fffffffffffffffffffffffffffffffff811681146122ae57600080fd5b6000606082840312156124af57600080fd5b6040516060810181811067ffffffffffffffff821117156124f9577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040528251815261250c6020840161247d565b602082015261251d6040840161247d565b60408201529392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561256a5761256a612529565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082198211156125b1576125b1612529565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600067ffffffffffffffff80841680612600576126006125b6565b92169190910692915050565b6000845161261e81846020890161220e565b80830190507f2e00000000000000000000000000000000000000000000000000000000000000808252855161265a816001850160208a0161220e565b6001920191820152835161267581600284016020880161220e565b0160020195945050505050565b60006fffffffffffffffffffffffffffffffff838116908316818110156126ab576126ab612529565b039392505050565b60006fffffffffffffffffffffffffffffffff8083168185168083038211156126de576126de612529565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6040815260006127546040830186886126f7565b82810360208401526127678185876126f7565b979650505050505050565b600067ffffffffffffffff838116908316818110156126ab576126ab612529565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036127c4576127c4612529565b5060010190565b6000826127da576127da6125b6565b500490565b6000826127ee576127ee6125b6565b50069056fea164736f6c634300080f000a",
}
// FaultDisputeGameABI is the input ABI used to generate the binding from.
......@@ -43,7 +43,7 @@ var FaultDisputeGameABI = FaultDisputeGameMetaData.ABI
var FaultDisputeGameBin = FaultDisputeGameMetaData.Bin
// DeployFaultDisputeGame deploys a new Ethereum contract, binding an instance of FaultDisputeGame to it.
func DeployFaultDisputeGame(auth *bind.TransactOpts, backend bind.ContractBackend, _absolutePrestate [32]byte, _maxGameDepth *big.Int, _gameDuration uint64, _vm common.Address) (common.Address, *types.Transaction, *FaultDisputeGame, error) {
func DeployFaultDisputeGame(auth *bind.TransactOpts, backend bind.ContractBackend, _absolutePrestate [32]byte, _maxGameDepth *big.Int, _gameDuration uint64, _vm common.Address, _l2oo common.Address) (common.Address, *types.Transaction, *FaultDisputeGame, error) {
parsed, err := FaultDisputeGameMetaData.GetAbi()
if err != nil {
return common.Address{}, nil, nil, err
......@@ -52,7 +52,7 @@ func DeployFaultDisputeGame(auth *bind.TransactOpts, backend bind.ContractBacken
return common.Address{}, nil, nil, errors.New("GetABI returned nil")
}
address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(FaultDisputeGameBin), backend, _absolutePrestate, _maxGameDepth, _gameDuration, _vm)
address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(FaultDisputeGameBin), backend, _absolutePrestate, _maxGameDepth, _gameDuration, _vm, _l2oo)
if err != nil {
return common.Address{}, nil, nil, err
}
......@@ -263,6 +263,37 @@ func (_FaultDisputeGame *FaultDisputeGameCallerSession) GAMEDURATION() (uint64,
return _FaultDisputeGame.Contract.GAMEDURATION(&_FaultDisputeGame.CallOpts)
}
// L2OUTPUTORACLE is a free data retrieval call binding the contract method 0xc0c3a092.
//
// Solidity: function L2_OUTPUT_ORACLE() view returns(address)
func (_FaultDisputeGame *FaultDisputeGameCaller) L2OUTPUTORACLE(opts *bind.CallOpts) (common.Address, error) {
var out []interface{}
err := _FaultDisputeGame.contract.Call(opts, &out, "L2_OUTPUT_ORACLE")
if err != nil {
return *new(common.Address), err
}
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
return out0, err
}
// L2OUTPUTORACLE is a free data retrieval call binding the contract method 0xc0c3a092.
//
// Solidity: function L2_OUTPUT_ORACLE() view returns(address)
func (_FaultDisputeGame *FaultDisputeGameSession) L2OUTPUTORACLE() (common.Address, error) {
return _FaultDisputeGame.Contract.L2OUTPUTORACLE(&_FaultDisputeGame.CallOpts)
}
// L2OUTPUTORACLE is a free data retrieval call binding the contract method 0xc0c3a092.
//
// Solidity: function L2_OUTPUT_ORACLE() view returns(address)
func (_FaultDisputeGame *FaultDisputeGameCallerSession) L2OUTPUTORACLE() (common.Address, error) {
return _FaultDisputeGame.Contract.L2OUTPUTORACLE(&_FaultDisputeGame.CallOpts)
}
// MAXGAMEDEPTH is a free data retrieval call binding the contract method 0x4778efe8.
//
// Solidity: function MAX_GAME_DEPTH() view returns(uint256)
......@@ -621,6 +652,37 @@ func (_FaultDisputeGame *FaultDisputeGameCallerSession) GameType() (uint8, error
return _FaultDisputeGame.Contract.GameType(&_FaultDisputeGame.CallOpts)
}
// L1Head is a free data retrieval call binding the contract method 0x6361506d.
//
// Solidity: function l1Head() view returns(bytes32)
func (_FaultDisputeGame *FaultDisputeGameCaller) L1Head(opts *bind.CallOpts) ([32]byte, error) {
var out []interface{}
err := _FaultDisputeGame.contract.Call(opts, &out, "l1Head")
if err != nil {
return *new([32]byte), err
}
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
// L1Head is a free data retrieval call binding the contract method 0x6361506d.
//
// Solidity: function l1Head() view returns(bytes32)
func (_FaultDisputeGame *FaultDisputeGameSession) L1Head() ([32]byte, error) {
return _FaultDisputeGame.Contract.L1Head(&_FaultDisputeGame.CallOpts)
}
// L1Head is a free data retrieval call binding the contract method 0x6361506d.
//
// Solidity: function l1Head() view returns(bytes32)
func (_FaultDisputeGame *FaultDisputeGameCallerSession) L1Head() ([32]byte, error) {
return _FaultDisputeGame.Contract.L1Head(&_FaultDisputeGame.CallOpts)
}
// L2BlockNumber is a free data retrieval call binding the contract method 0x8b85902b.
//
// Solidity: function l2BlockNumber() pure returns(uint256 l2BlockNumber_)
......@@ -745,6 +807,27 @@ func (_FaultDisputeGame *FaultDisputeGameCallerSession) Version() (string, error
return _FaultDisputeGame.Contract.Version(&_FaultDisputeGame.CallOpts)
}
// AddLocalData is a paid mutator transaction binding the contract method 0x1e27052a.
//
// Solidity: function addLocalData(uint256 _ident, uint256 _partOffset) returns()
func (_FaultDisputeGame *FaultDisputeGameTransactor) AddLocalData(opts *bind.TransactOpts, _ident *big.Int, _partOffset *big.Int) (*types.Transaction, error) {
return _FaultDisputeGame.contract.Transact(opts, "addLocalData", _ident, _partOffset)
}
// AddLocalData is a paid mutator transaction binding the contract method 0x1e27052a.
//
// Solidity: function addLocalData(uint256 _ident, uint256 _partOffset) returns()
func (_FaultDisputeGame *FaultDisputeGameSession) AddLocalData(_ident *big.Int, _partOffset *big.Int) (*types.Transaction, error) {
return _FaultDisputeGame.Contract.AddLocalData(&_FaultDisputeGame.TransactOpts, _ident, _partOffset)
}
// AddLocalData is a paid mutator transaction binding the contract method 0x1e27052a.
//
// Solidity: function addLocalData(uint256 _ident, uint256 _partOffset) returns()
func (_FaultDisputeGame *FaultDisputeGameTransactorSession) AddLocalData(_ident *big.Int, _partOffset *big.Int) (*types.Transaction, error) {
return _FaultDisputeGame.Contract.AddLocalData(&_FaultDisputeGame.TransactOpts, _ident, _partOffset)
}
// Attack is a paid mutator transaction binding the contract method 0xc55cd0c7.
//
// Solidity: function attack(uint256 _parentIndex, bytes32 _claim) payable returns()
......
......@@ -9,11 +9,11 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc"
)
const FaultDisputeGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"gameStart\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_userDefinedValueType(Timestamp)1012\"},{\"astId\":1001,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"status\",\"offset\":8,\"slot\":\"0\",\"type\":\"t_enum(GameStatus)1006\"},{\"astId\":1002,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"bondManager\",\"offset\":9,\"slot\":\"0\",\"type\":\"t_contract(IBondManager)1005\"},{\"astId\":1003,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claimData\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_struct(ClaimData)1007_storage)dyn_storage\"},{\"astId\":1004,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claims\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_mapping(t_userDefinedValueType(ClaimHash)1009,t_bool)\"}],\"types\":{\"t_array(t_struct(ClaimData)1007_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct IFaultDisputeGame.ClaimData[]\",\"numberOfBytes\":\"32\",\"base\":\"t_struct(ClaimData)1007_storage\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_contract(IBondManager)1005\":{\"encoding\":\"inplace\",\"label\":\"contract IBondManager\",\"numberOfBytes\":\"20\"},\"t_enum(GameStatus)1006\":{\"encoding\":\"inplace\",\"label\":\"enum GameStatus\",\"numberOfBytes\":\"1\"},\"t_mapping(t_userDefinedValueType(ClaimHash)1009,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(ClaimHash =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_userDefinedValueType(ClaimHash)1009\",\"value\":\"t_bool\"},\"t_struct(ClaimData)1007_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IFaultDisputeGame.ClaimData\",\"numberOfBytes\":\"96\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"},\"t_userDefinedValueType(Claim)1008\":{\"encoding\":\"inplace\",\"label\":\"Claim\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(ClaimHash)1009\":{\"encoding\":\"inplace\",\"label\":\"ClaimHash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Clock)1010\":{\"encoding\":\"inplace\",\"label\":\"Clock\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Position)1011\":{\"encoding\":\"inplace\",\"label\":\"Position\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Timestamp)1012\":{\"encoding\":\"inplace\",\"label\":\"Timestamp\",\"numberOfBytes\":\"8\"}}}"
const FaultDisputeGameStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"gameStart\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_userDefinedValueType(Timestamp)1014\"},{\"astId\":1001,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"status\",\"offset\":8,\"slot\":\"0\",\"type\":\"t_enum(GameStatus)1007\"},{\"astId\":1002,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"bondManager\",\"offset\":9,\"slot\":\"0\",\"type\":\"t_contract(IBondManager)1006\"},{\"astId\":1003,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"l1Head\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_userDefinedValueType(Hash)1012\"},{\"astId\":1004,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claimData\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_array(t_struct(ClaimData)1008_storage)dyn_storage\"},{\"astId\":1005,\"contract\":\"src/dispute/FaultDisputeGame.sol:FaultDisputeGame\",\"label\":\"claims\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_mapping(t_userDefinedValueType(ClaimHash)1010,t_bool)\"}],\"types\":{\"t_array(t_struct(ClaimData)1008_storage)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"struct IFaultDisputeGame.ClaimData[]\",\"numberOfBytes\":\"32\",\"base\":\"t_struct(ClaimData)1008_storage\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_contract(IBondManager)1006\":{\"encoding\":\"inplace\",\"label\":\"contract IBondManager\",\"numberOfBytes\":\"20\"},\"t_enum(GameStatus)1007\":{\"encoding\":\"inplace\",\"label\":\"enum GameStatus\",\"numberOfBytes\":\"1\"},\"t_mapping(t_userDefinedValueType(ClaimHash)1010,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(ClaimHash =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_userDefinedValueType(ClaimHash)1010\",\"value\":\"t_bool\"},\"t_struct(ClaimData)1008_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IFaultDisputeGame.ClaimData\",\"numberOfBytes\":\"96\"},\"t_uint32\":{\"encoding\":\"inplace\",\"label\":\"uint32\",\"numberOfBytes\":\"4\"},\"t_userDefinedValueType(Claim)1009\":{\"encoding\":\"inplace\",\"label\":\"Claim\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(ClaimHash)1010\":{\"encoding\":\"inplace\",\"label\":\"ClaimHash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Clock)1011\":{\"encoding\":\"inplace\",\"label\":\"Clock\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Hash)1012\":{\"encoding\":\"inplace\",\"label\":\"Hash\",\"numberOfBytes\":\"32\"},\"t_userDefinedValueType(Position)1013\":{\"encoding\":\"inplace\",\"label\":\"Position\",\"numberOfBytes\":\"16\"},\"t_userDefinedValueType(Timestamp)1014\":{\"encoding\":\"inplace\",\"label\":\"Timestamp\",\"numberOfBytes\":\"8\"}}}"
var FaultDisputeGameStorageLayout = new(solc.StorageLayout)
var FaultDisputeGameDeployedBin = "0x6080604052600436106101755760003560e01c80638980e0cc116100cb578063c31b29ce1161007f578063cf09e0d011610059578063cf09e0d0146104db578063d8cc1a3c146104fa578063fa24f7431461051a57600080fd5b8063c31b29ce14610430578063c55cd0c714610464578063c6f0308c1461047757600080fd5b806392931298116100b057806392931298146103a3578063bbdc02db146103d7578063bcef3b55146103f357600080fd5b80638980e0cc1461034e5780638b85902b1461036357600080fd5b8063363cc4271161012d578063609d333411610107578063609d333414610311578063632247ea146103265780638129fc1c1461033957600080fd5b8063363cc4271461025c5780634778efe8146102bb57806354fd4d50146102ef57600080fd5b80632810e1d61161015e5780632810e1d6146101f85780633218b99d1461020d57806335fef5671461024757600080fd5b8063200d2ed21461017a578063266198f9146101b6575b600080fd5b34801561018657600080fd5b506000546101a09068010000000000000000900460ff1681565b6040516101ad9190611bcd565b60405180910390f35b3480156101c257600080fd5b506101ea7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101ad565b34801561020457600080fd5b506101a061053e565b34801561021957600080fd5b5060005461022e9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101ad565b61025a610255366004611c0e565b61095d565b005b34801561026857600080fd5b50600054610296906901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101ad565b3480156102c757600080fd5b506101ea7f000000000000000000000000000000000000000000000000000000000000000081565b3480156102fb57600080fd5b5061030461096d565b6040516101ad9190611caa565b34801561031d57600080fd5b50610304610a10565b61025a610334366004611cd9565b610a22565b34801561034557600080fd5b5061025a611006565b34801561035a57600080fd5b506001546101ea565b34801561036f57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003602001356101ea565b3480156103af57600080fd5b506102967f000000000000000000000000000000000000000000000000000000000000000081565b3480156103e357600080fd5b50604051600081526020016101ad565b3480156103ff57600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356101ea565b34801561043c57600080fd5b5061022e7f000000000000000000000000000000000000000000000000000000000000000081565b61025a610472366004611c0e565b611147565b34801561048357600080fd5b50610497610492366004611d0e565b611153565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101ad565b3480156104e757600080fd5b5060005467ffffffffffffffff1661022e565b34801561050657600080fd5b5061025a610515366004611d70565b6111c4565b34801561052657600080fd5b5061052f6116e8565b6040516101ad93929190611dfa565b60008060005468010000000000000000900460ff16600281111561056457610564611b9e565b1461059b576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180546000916105ab91611e54565b90506fffffffffffffffffffffffffffffffff815b67ffffffffffffffff811015610695576000600182815481106105e5576105e5611e6b565b6000918252602090912060039091020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019290915060ff640100000000909104161561063657506105c0565b600281015460009061067a906fffffffffffffffffffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000611726565b90508381101561068e578093508260010194505b50506105c0565b506000600183815481106106ab576106ab611e6b565b600091825260208220600390910201805490925063ffffffff9081169190821461071557600182815481106106e2576106e2611e6b565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff16610741565b600283015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff165b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1661078567ffffffffffffffff831642611e54565b6107a1836fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff166107b59190611e9a565b116107ec576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028381015461088e906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b6108989190611ee1565b67ffffffffffffffff161580156108bf57506fffffffffffffffffffffffffffffffff8414155b156108cd57600295506108d2565b600195505b600080548791907fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff166801000000000000000083600281111561091757610917611b9e565b02179055600281111561092c5761092c611b9e565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a2505050505090565b61096982826000610a22565b5050565b60606109987f00000000000000000000000000000000000000000000000000000000000000006117db565b6109c17f00000000000000000000000000000000000000000000000000000000000000006117db565b6109ea7f00000000000000000000000000000000000000000000000000000000000000006117db565b6040516020016109fc93929190611f08565b604051602081830303815290604052905090565b6060610a1d602080611918565b905090565b6000805468010000000000000000900460ff166002811115610a4657610a46611b9e565b14610a7d576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82158015610a89575080155b15610ac0576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060018481548110610ad557610ad5611e6b565b60009182526020918290206040805160a0810182526003909302909101805463ffffffff8116845260ff64010000000090910416151593830193909352600180840154918301919091526002909201546fffffffffffffffffffffffffffffffff80821660608401527001000000000000000000000000000000009091041660808201528154909250819086908110610b7057610b70611e6b565b6000918252602082206003909102018054921515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909316929092179091556060820151610bda906fffffffffffffffffffffffffffffffff1684151760011b90565b90507f0000000000000000000000000000000000000000000000000000000000000000610c99826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115610cdb576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815160009063ffffffff90811614610d3b576001836000015163ffffffff1681548110610d0a57610d0a611e6b565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff1642610d74846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610d889190611e9a565b610d929190611e54565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff82161115610e05576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b421790506000610e26888660009182526020526040902090565b60008181526002602052604090205490915060ff1615610e72576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260026020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815160a08101835263ffffffff808f1682529381018581528184018e81526fffffffffffffffffffffffffffffffff808d16606085019081528a82166080860190815286548088018855968a52945160039096027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf68101805495511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000909616979099169690961793909317909655517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf78401555190518416700100000000000000000000000000000000029316929092177fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf8909201919091555133918a918c917f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be91a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff8152602081019290925260019190810161108b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff909316929092179490941781556040830151938101939093556060820151608090920151811670010000000000000000000000000000000002911617600290910155565b61096982826001610a22565b6001818154811061116357600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b6000805468010000000000000000900460ff1660028111156111e8576111e8611b9e565b1461121f576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001878154811061123457611234611e6b565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506112937f00000000000000000000000000000000000000000000000000000000000000006001611e9a565b61132f826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1614611370576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008089156113f657611394836fffffffffffffffffffffffffffffffff166119af565b67ffffffffffffffff166000036113cd577f000000000000000000000000000000000000000000000000000000000000000091506113ef565b6113e86113db600186611f7e565b865463ffffffff16611a55565b6001015491505b5083611410565b8460010154915061140d8460016113db9190611faf565b90505b818989604051611421929190611fe3565b604051809103902014611460576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f8e0cb968c8c8c8c6040518563ffffffff1660e01b81526004016114c6949392919061203c565b6020604051808303816000875af11580156114e5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611509919061206e565b6002848101549290911492506000916115b4906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611650886fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b61165a9190612087565b6116649190611ee1565b67ffffffffffffffff1615905081151581036116ac576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505084547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff166401000000001790945550505050505050505050565b6000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900335606061171f610a10565b9050909192565b6000806117b3847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1690508083036001841b600180831b0386831b17039250505092915050565b60608160000361181e57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156118485780611832816120a8565b91506118419050600a836120e0565b9150611822565b60008167ffffffffffffffff811115611863576118636120f4565b6040519080825280601f01601f19166020018201604052801561188d576020820181803683370190505b5090505b8415611910576118a2600183611e54565b91506118af600a86612123565b6118ba906030611e9a565b60f81b8183815181106118cf576118cf611e6b565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611909600a866120e0565b9450611891565b949350505050565b6060600061194f84367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003611e9a565b90508267ffffffffffffffff1667ffffffffffffffff811115611974576119746120f4565b6040519080825280601f01601f19166020018201604052801561199e576020820181803683370190505b509150828160208401375092915050565b600080611a3c837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b600080611a73846fffffffffffffffffffffffffffffffff16611af2565b905060018381548110611a8857611a88611e6b565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff828116911614611aeb57815460018054909163ffffffff16908110611ad657611ad6611e6b565b90600052602060002090600302019150611a99565b5092915050565b60008119600183011681611b86827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310611c08577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008060408385031215611c2157600080fd5b50508035926020909101359150565b60005b83811015611c4b578181015183820152602001611c33565b83811115611c5a576000848401525b50505050565b60008151808452611c78816020860160208601611c30565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611cbd6020830184611c60565b9392505050565b80358015158114611cd457600080fd5b919050565b600080600060608486031215611cee57600080fd5b8335925060208401359150611d0560408501611cc4565b90509250925092565b600060208284031215611d2057600080fd5b5035919050565b60008083601f840112611d3957600080fd5b50813567ffffffffffffffff811115611d5157600080fd5b602083019150836020828501011115611d6957600080fd5b9250929050565b60008060008060008060808789031215611d8957600080fd5b86359550611d9960208801611cc4565b9450604087013567ffffffffffffffff80821115611db657600080fd5b611dc28a838b01611d27565b90965094506060890135915080821115611ddb57600080fd5b50611de889828a01611d27565b979a9699509497509295939492505050565b60ff84168152826020820152606060408201526000611e1c6060830184611c60565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015611e6657611e66611e25565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008219821115611ead57611ead611e25565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600067ffffffffffffffff80841680611efc57611efc611eb2565b92169190910692915050565b60008451611f1a818460208901611c30565b80830190507f2e000000000000000000000000000000000000000000000000000000000000008082528551611f56816001850160208a01611c30565b60019201918201528351611f71816002840160208801611c30565b0160020195945050505050565b60006fffffffffffffffffffffffffffffffff83811690831681811015611fa757611fa7611e25565b039392505050565b60006fffffffffffffffffffffffffffffffff808316818516808303821115611fda57611fda611e25565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b604081526000612050604083018688611ff3565b8281036020840152612063818587611ff3565b979650505050505050565b60006020828403121561208057600080fd5b5051919050565b600067ffffffffffffffff83811690831681811015611fa757611fa7611e25565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036120d9576120d9611e25565b5060010190565b6000826120ef576120ef611eb2565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008261213257612132611eb2565b50069056fea164736f6c634300080f000a"
var FaultDisputeGameDeployedBin = "0x6080604052600436106101965760003560e01c80638129fc1c116100e1578063c0c3a0921161008a578063c6f0308c11610064578063c6f0308c14610502578063cf09e0d014610566578063d8cc1a3c14610585578063fa24f743146105a557600080fd5b8063c0c3a09214610487578063c31b29ce146104bb578063c55cd0c7146104ef57600080fd5b806392931298116100bb57806392931298146103fa578063bbdc02db1461042e578063bcef3b551461044a57600080fd5b80638129fc1c146103905780638980e0cc146103a55780638b85902b146103ba57600080fd5b8063363cc42711610143578063609d33341161011d578063609d333414610352578063632247ea146103675780636361506d1461037a57600080fd5b8063363cc4271461029d5780634778efe8146102fc57806354fd4d501461033057600080fd5b80632810e1d6116101745780632810e1d61461023b5780633218b99d1461025057806335fef5671461028a57600080fd5b80631e27052a1461019b578063200d2ed2146101bd578063266198f9146101f9575b600080fd5b3480156101a757600080fd5b506101bb6101b636600461217c565b6105c9565b005b3480156101c957600080fd5b506000546101e39068010000000000000000900460ff1681565b6040516101f091906121cd565b60405180910390f35b34801561020557600080fd5b5061022d7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101f0565b34801561024757600080fd5b506101e3610ad2565b34801561025c57600080fd5b506000546102719067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101f0565b6101bb61029836600461217c565b610ef3565b3480156102a957600080fd5b506000546102d7906901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101f0565b34801561030857600080fd5b5061022d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561033c57600080fd5b50610345610f03565b6040516101f09190612284565b34801561035e57600080fd5b50610345610fa6565b6101bb6103753660046122b3565b610fb8565b34801561038657600080fd5b5061022d60015481565b34801561039c57600080fd5b506101bb6115d4565b3480156103b157600080fd5b5060025461022d565b3480156103c657600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036020013561022d565b34801561040657600080fd5b506102d77f000000000000000000000000000000000000000000000000000000000000000081565b34801561043a57600080fd5b50604051600081526020016101f0565b34801561045657600080fd5b50367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90033561022d565b34801561049357600080fd5b506102d77f000000000000000000000000000000000000000000000000000000000000000081565b3480156104c757600080fd5b506102717f000000000000000000000000000000000000000000000000000000000000000081565b6101bb6104fd36600461217c565b611725565b34801561050e57600080fd5b5061052261051d3660046122e8565b611731565b6040805163ffffffff90961686529315156020860152928401919091526fffffffffffffffffffffffffffffffff908116606084015216608082015260a0016101f0565b34801561057257600080fd5b5060005467ffffffffffffffff16610271565b34801561059157600080fd5b506101bb6105a036600461234a565b6117a2565b3480156105b157600080fd5b506105ba611cc6565b6040516101f0939291906123d4565b6000805468010000000000000000900460ff1660028111156105ed576105ed61219e565b14610624576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa158015610691573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b591906123ff565b905082600103610770576001546040517f9a1f5e7f000000000000000000000000000000000000000000000000000000008152600481018590526024810191909152602060448201526064810183905273ffffffffffffffffffffffffffffffffffffffff821690639a1f5e7f906084015b6020604051808303816000875af1158015610746573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076a9190612435565b50505050565b82600203610909576040517fcf8e5cf0000000000000000000000000000000000000000000000000000000008152367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900360200135600482015260009073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063cf8e5cf090602401606060405180830381865afa158015610832573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610856919061249d565b80516040517f9a1f5e7f000000000000000000000000000000000000000000000000000000008152600481018790526024810191909152602060448201526064810185905290915073ffffffffffffffffffffffffffffffffffffffff831690639a1f5e7f906084016020604051808303816000875af11580156108de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109029190612435565b5050505050565b826003036109a2576040517f9a1f5e7f00000000000000000000000000000000000000000000000000000000815260048101849052367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356024820152602060448201526064810183905273ffffffffffffffffffffffffffffffffffffffff821690639a1f5e7f90608401610727565b82600403610a41576040517f9a1f5e7f00000000000000000000000000000000000000000000000000000000815260048101849052367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c90036020013560c01b6024820152600860448201526064810183905273ffffffffffffffffffffffffffffffffffffffff821690639a1f5e7f90608401610727565b82600503610acd576040517f9a1f5e7f000000000000000000000000000000000000000000000000000000008152600481018490524660c01b6024820152600860448201526064810183905273ffffffffffffffffffffffffffffffffffffffff821690639a1f5e7f906084016020604051808303816000875af1158015610746573d6000803e3d6000fd5b505050565b60008060005468010000000000000000900460ff166002811115610af857610af861219e565b14610b2f576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254600090610b4190600190612558565b90506fffffffffffffffffffffffffffffffff815b67ffffffffffffffff811015610c2b57600060028281548110610b7b57610b7b61256f565b6000918252602090912060039091020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019290915060ff6401000000009091041615610bcc5750610b56565b6002810154600090610c10906fffffffffffffffffffffffffffffffff167f0000000000000000000000000000000000000000000000000000000000000000611d04565b905083811015610c24578093508260010194505b5050610b56565b50600060028381548110610c4157610c4161256f565b600091825260208220600390910201805490925063ffffffff90811691908214610cab5760028281548110610c7857610c7861256f565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff16610cd7565b600283015470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff165b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c16610d1b67ffffffffffffffff831642612558565b610d37836fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff16610d4b919061259e565b11610d82576040517ff2440b5300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600283810154610e24906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b610e2e91906125e5565b67ffffffffffffffff16158015610e5557506fffffffffffffffffffffffffffffffff8414155b15610e635760029550610e68565b600195505b600080548791907fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff1668010000000000000000836002811115610ead57610ead61219e565b021790556002811115610ec257610ec261219e565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a2505050505090565b610eff82826000610fb8565b5050565b6060610f2e7f0000000000000000000000000000000000000000000000000000000000000000611db9565b610f577f0000000000000000000000000000000000000000000000000000000000000000611db9565b610f807f0000000000000000000000000000000000000000000000000000000000000000611db9565b604051602001610f929392919061260c565b604051602081830303815290604052905090565b6060610fb3602080611ef6565b905090565b6000805468010000000000000000900460ff166002811115610fdc57610fdc61219e565b14611013576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8215801561101f575080155b15611056576040517fa42637bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006002848154811061106b5761106b61256f565b60009182526020918290206040805160a0810182526003909302909101805463ffffffff8116845260ff64010000000090910416151593830193909352600180840154918301919091526002928301546fffffffffffffffffffffffffffffffff808216606085015270010000000000000000000000000000000090910416608083015282549193509190869081106111065761110661256f565b6000918252602082206003909102018054921515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff909316929092179091556060820151611170906fffffffffffffffffffffffffffffffff1684151760011b90565b90507f000000000000000000000000000000000000000000000000000000000000000061122f826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161115611271576040517f56f57b2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815160009063ffffffff908116146112d1576002836000015163ffffffff16815481106112a0576112a061256f565b906000526020600020906003020160020160109054906101000a90046fffffffffffffffffffffffffffffffff1690505b608083015160009067ffffffffffffffff1667ffffffffffffffff164261130a846fffffffffffffffffffffffffffffffff1660401c90565b67ffffffffffffffff1661131e919061259e565b6113289190612558565b9050677fffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000060011c1667ffffffffffffffff8216111561139b576040517f3381d11400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000604082901b4217905060006113bc888660009182526020526040902090565b60008181526003602052604090205490915060ff1615611408576040517f80497e3b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60016003600083815260200190815260200160002060006101000a81548160ff02191690831515021790555060026040518060a001604052808b63ffffffff1681526020016000151581526020018a8152602001876fffffffffffffffffffffffffffffffff168152602001846fffffffffffffffffffffffffffffffff16815250908060018154018082558091505060019003906000526020600020906003020160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548160ff0219169083151502179055506040820151816001015560608201518160020160006101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555060808201518160020160106101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555050503373ffffffffffffffffffffffffffffffffffffffff16888a7f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be60405160405180910390a4505050505050505050565b600080547fffffffffffffffffffffffffffffffffffffffffffffff000000000000000000164267ffffffffffffffff161781556040805160a08101825263ffffffff815260208101929092526002919081016116597ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe369081013560f01c90033590565b815260016020820152604001426fffffffffffffffffffffffffffffffff908116909152825460018181018555600094855260209485902084516003909302018054958501511515640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000090961663ffffffff909316929092179490941781556040830151818501556060830151608090930151821670010000000000000000000000000000000002929091169190911760029091015561171f9043612558565b40600155565b610eff82826001610fb8565b6002818154811061174157600080fd5b600091825260209091206003909102018054600182015460029092015463ffffffff8216935064010000000090910460ff1691906fffffffffffffffffffffffffffffffff8082169170010000000000000000000000000000000090041685565b6000805468010000000000000000900460ff1660028111156117c6576117c661219e565b146117fd576040517f67fe195000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600287815481106118125761181261256f565b6000918252602082206003919091020160028101549092506fffffffffffffffffffffffffffffffff16908715821760011b90506118717f0000000000000000000000000000000000000000000000000000000000000000600161259e565b61190d826fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff161461194e576040517f5f53dd9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008089156119d457611972836fffffffffffffffffffffffffffffffff16611f8d565b67ffffffffffffffff166000036119ab577f000000000000000000000000000000000000000000000000000000000000000091506119cd565b6119c66119b9600186612682565b865463ffffffff16612033565b6001015491505b50836119ee565b846001015491506119eb8460016119b991906126b3565b90505b8189896040516119ff9291906126e7565b604051809103902014611a3e576040517f696550ff00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081600101547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f8e0cb968c8c8c8c6040518563ffffffff1660e01b8152600401611aa49493929190612740565b6020604051808303816000875af1158015611ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ae79190612435565b600284810154929091149250600091611b92906fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611c2e886fffffffffffffffffffffffffffffffff167e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b611c389190612772565b611c4291906125e5565b67ffffffffffffffff161590508115158103611c8a576040517ffb4e40dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505084547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff166401000000001790945550505050505050505050565b6000367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c9003356060611cfd610fa6565b9050909192565b600080611d91847e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff1690508083036001841b600180831b0386831b17039250505092915050565b606081600003611dfc57505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115611e265780611e1081612793565b9150611e1f9050600a836127cb565b9150611e00565b60008167ffffffffffffffff811115611e4157611e4161244e565b6040519080825280601f01601f191660200182016040528015611e6b576020820181803683370190505b5090505b8415611eee57611e80600183612558565b9150611e8d600a866127df565b611e9890603061259e565b60f81b818381518110611ead57611ead61256f565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350611ee7600a866127cb565b9450611e6f565b949350505050565b60606000611f2d84367ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe81013560f01c900361259e565b90508267ffffffffffffffff1667ffffffffffffffff811115611f5257611f5261244e565b6040519080825280601f01601f191660200182016040528015611f7c576020820181803683370190505b509150828160208401375092915050565b60008061201a837e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b600167ffffffffffffffff919091161b90920392915050565b600080612051846fffffffffffffffffffffffffffffffff166120d0565b9050600283815481106120665761206661256f565b906000526020600020906003020191505b60028201546fffffffffffffffffffffffffffffffff8281169116146120c957815460028054909163ffffffff169081106120b4576120b461256f565b90600052602060002090600302019150612077565b5092915050565b60008119600183011681612164827e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f7f07c4acdd0000000000000000000000000000000000000000000000000000000067ffffffffffffffff831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b67ffffffffffffffff169390931c8015179392505050565b6000806040838503121561218f57600080fd5b50508035926020909101359150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b6020810160038310612208577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60005b83811015612229578181015183820152602001612211565b8381111561076a5750506000910152565b6000815180845261225281602086016020860161220e565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000612297602083018461223a565b9392505050565b803580151581146122ae57600080fd5b919050565b6000806000606084860312156122c857600080fd5b83359250602084013591506122df6040850161229e565b90509250925092565b6000602082840312156122fa57600080fd5b5035919050565b60008083601f84011261231357600080fd5b50813567ffffffffffffffff81111561232b57600080fd5b60208301915083602082850101111561234357600080fd5b9250929050565b6000806000806000806080878903121561236357600080fd5b863595506123736020880161229e565b9450604087013567ffffffffffffffff8082111561239057600080fd5b61239c8a838b01612301565b909650945060608901359150808211156123b557600080fd5b506123c289828a01612301565b979a9699509497509295939492505050565b60ff841681528260208201526060604082015260006123f6606083018461223a565b95945050505050565b60006020828403121561241157600080fd5b815173ffffffffffffffffffffffffffffffffffffffff8116811461229757600080fd5b60006020828403121561244757600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b80516fffffffffffffffffffffffffffffffff811681146122ae57600080fd5b6000606082840312156124af57600080fd5b6040516060810181811067ffffffffffffffff821117156124f9577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040528251815261250c6020840161247d565b602082015261251d6040840161247d565b60408201529392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561256a5761256a612529565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082198211156125b1576125b1612529565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600067ffffffffffffffff80841680612600576126006125b6565b92169190910692915050565b6000845161261e81846020890161220e565b80830190507f2e00000000000000000000000000000000000000000000000000000000000000808252855161265a816001850160208a0161220e565b6001920191820152835161267581600284016020880161220e565b0160020195945050505050565b60006fffffffffffffffffffffffffffffffff838116908316818110156126ab576126ab612529565b039392505050565b60006fffffffffffffffffffffffffffffffff8083168185168083038211156126de576126de612529565b01949350505050565b8183823760009101908152919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6040815260006127546040830186886126f7565b82810360208401526127678185876126f7565b979650505050505050565b600067ffffffffffffffff838116908316818110156126ab576126ab612529565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036127c4576127c4612529565b5060010190565b6000826127da576127da6125b6565b500490565b6000826127ee576127ee6125b6565b50069056fea164736f6c634300080f000a"
func init() {
if err := json.Unmarshal([]byte(FaultDisputeGameStorageLayoutJSON), FaultDisputeGameStorageLayout); err != nil {
......
......@@ -31,7 +31,7 @@ var (
// MIPSMetaData contains all meta data concerning the MIPS contract.
var MIPSMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[],\"name\":\"BRK_START\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oracle\",\"outputs\":[{\"internalType\":\"contractIPreimageOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"stateData\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"proof\",\"type\":\"bytes\"}],\"name\":\"step\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
Bin: "0x608060405234801561001057600080fd5b50611b24806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063155633fe146100465780637dc0d1d014610067578063f8e0cb9614610098575b600080fd5b61004e61016c565b6040805163ffffffff9092168252519081900360200190f35b61006f610174565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61015a600480360360408110156100ae57600080fd5b8101906020810181356401000000008111156100c957600080fd5b8201836020820111156100db57600080fd5b803590602001918460018302840111640100000000831117156100fd57600080fd5b91939092909160208101903564010000000081111561011b57600080fd5b82018360208201111561012d57600080fd5b8035906020019184600183028401116401000000008311171561014f57600080fd5b509092509050610190565b60408051918252519081900360200190f35b634000000081565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600061019a611a6a565b608081146101a757600080fd5b604051610600146101b757600080fd5b606486146101c457600080fd5b61016684146101d257600080fd5b6101ef565b8035602084810360031b9190911c8352920192910190565b8560806101fe602082846101d7565b9150915061020e602082846101d7565b9150915061021e600482846101d7565b9150915061022e600482846101d7565b9150915061023e600482846101d7565b9150915061024e600482846101d7565b9150915061025e600482846101d7565b9150915061026e600482846101d7565b9150915061027e600182846101d7565b9150915061028e600182846101d7565b9150915061029e600882846101d7565b6020810190819052909250905060005b60208110156102d0576102c3600483856101d7565b90935091506001016102ae565b505050806101200151156102ee576102e6610710565b915050610708565b6101408101805160010167ffffffffffffffff1690526060810151600090610316908261081e565b9050603f601a82901c16600281148061033557508063ffffffff166003145b15610382576103788163ffffffff1660021461035257601f610355565b60005b60ff16600261036b856303ffffff16601a6108e9565b63ffffffff16901b61095c565b9350505050610708565b6101608301516000908190601f601086901c81169190601587901c16602081106103a857fe5b602002015192508063ffffffff851615806103c957508463ffffffff16601c145b156103fa578661016001518263ffffffff16602081106103e557fe5b6020020151925050601f600b86901c166104b1565b60208563ffffffff16101561045d578463ffffffff16600c148061042457508463ffffffff16600d145b8061043557508463ffffffff16600e145b15610446578561ffff169250610458565b6104558661ffff1660106108e9565b92505b6104b1565b60288563ffffffff1610158061047957508463ffffffff166022145b8061048a57508463ffffffff166026145b156104b1578661016001518263ffffffff16602081106104a657fe5b602002015192508190505b60048563ffffffff16101580156104ce575060088563ffffffff16105b806104df57508463ffffffff166001145b156104fe576104f0858784876109c7565b975050505050505050610708565b63ffffffff60006020878316106105635761051e8861ffff1660106108e9565b9095019463fffffffc861661053481600161081e565b915060288863ffffffff161015801561055457508763ffffffff16603014155b1561056157809250600093505b505b600061057189888885610b50565b63ffffffff9081169150603f8a16908916158015610596575060088163ffffffff1610155b80156105a85750601c8163ffffffff16105b15610687578063ffffffff16600814806105c857508063ffffffff166009145b156105ff576105ed8163ffffffff166008146105e457856105e7565b60005b8961095c565b9b505050505050505050505050610708565b8063ffffffff16600a1415610620576105ed858963ffffffff8a1615611216565b8063ffffffff16600b1415610642576105ed858963ffffffff8a161515611216565b8063ffffffff16600c1415610659576105ed6112fb565b60108163ffffffff16101580156106765750601c8163ffffffff16105b15610687576105ed81898988611778565b8863ffffffff1660381480156106a2575063ffffffff861615155b156106d15760018b61016001518763ffffffff16602081106106c057fe5b63ffffffff90921660209290920201525b8363ffffffff1663ffffffff146106ee576106ee8460018461195c565b6106fa85836001611216565b9b5050505050505050505050505b949350505050565b6000610728565b602083810382015183520192910190565b60806040518061073a60208285610717565b9150925061074a60208285610717565b9150925061075a60048285610717565b9150925061076a60048285610717565b9150925061077a60048285610717565b9150925061078a60048285610717565b9150925061079a60048285610717565b915092506107aa60048285610717565b915092506107ba60018285610717565b915092506107ca60018285610717565b915092506107da60088285610717565b60209091019350905060005b6020811015610808576107fb60048386610717565b90945091506001016107e6565b506000815281810382a081900390209150505b90565b60008061082a836119f8565b9050600384161561083a57600080fd5b602081019035610857565b60009081526020919091526040902090565b8460051c8160005b601b8110156108af5760208501943583821c60011680156108875760018114610898576108a5565b6108918285610845565b93506108a5565b6108a28483610845565b93505b505060010161085f565b5060805191508181146108ca57630badf00d60005260206000fd5b5050601f94909416601c0360031b9390931c63ffffffff169392505050565b600063ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80850183169190911c821615159160016020869003821681901b830191861691821b92911b0182610946576000610948565b815b90861663ffffffff16179250505092915050565b6000610966611a6a565b5060e08051610100805163ffffffff90811690935284831690526080918516156109b657806008018261016001518663ffffffff16602081106109a557fe5b63ffffffff90921660209290920201525b6109be610710565b95945050505050565b60006109d1611a6a565b5060806000600463ffffffff881614806109f157508663ffffffff166005145b15610a675760008261016001518663ffffffff1660208110610a0f57fe5b602002015190508063ffffffff168563ffffffff16148015610a3757508763ffffffff166004145b80610a5f57508063ffffffff168563ffffffff1614158015610a5f57508763ffffffff166005145b915050610ae4565b8663ffffffff1660061415610a855760008460030b13159050610ae4565b8663ffffffff1660071415610aa25760008460030b139050610ae4565b8663ffffffff1660011415610ae457601f601087901c1680610ac85760008560030b1291505b8063ffffffff1660011415610ae25760008560030b121591505b505b606082018051608084015163ffffffff169091528115610b2a576002610b0f8861ffff1660106108e9565b63ffffffff90811690911b8201600401166080840152610b3c565b60808301805160040163ffffffff1690525b610b44610710565b98975050505050505050565b6000603f601a86901c81169086166020821015610f245760088263ffffffff1610158015610b845750600f8263ffffffff16105b15610c2b578163ffffffff1660081415610ba057506020610c26565b8163ffffffff1660091415610bb757506021610c26565b8163ffffffff16600a1415610bce5750602a610c26565b8163ffffffff16600b1415610be55750602b610c26565b8163ffffffff16600c1415610bfc57506024610c26565b8163ffffffff16600d1415610c1357506025610c26565b8163ffffffff16600e1415610c26575060265b600091505b63ffffffff8216610e7457601f600688901c16602063ffffffff83161015610d485760088263ffffffff1610610c6657869350505050610708565b63ffffffff8216610c865763ffffffff86811691161b9250610708915050565b8163ffffffff1660021415610caa5763ffffffff86811691161c9250610708915050565b8163ffffffff1660031415610cd5576103788163ffffffff168763ffffffff16901c826020036108e9565b8163ffffffff1660041415610cf9575050505063ffffffff8216601f84161b610708565b8163ffffffff1660061415610d1d575050505063ffffffff8216601f84161c610708565b8163ffffffff1660071415610d48576103788763ffffffff168763ffffffff16901c886020036108e9565b8163ffffffff1660201480610d6357508163ffffffff166021145b15610d75578587019350505050610708565b8163ffffffff1660221480610d9057508163ffffffff166023145b15610da2578587039350505050610708565b8163ffffffff1660241415610dbe578587169350505050610708565b8163ffffffff1660251415610dda578587179350505050610708565b8163ffffffff1660261415610df6578587189350505050610708565b8163ffffffff1660271415610e12575050505082821719610708565b8163ffffffff16602a1415610e45578560030b8760030b12610e35576000610e38565b60015b60ff169350505050610708565b8163ffffffff16602b1415610e6e578563ffffffff168763ffffffff1610610e35576000610e38565b50610f1f565b8163ffffffff16600f1415610e975760108563ffffffff16901b92505050610708565b8163ffffffff16601c1415610f1f578063ffffffff1660021415610ec057505050828202610708565b8063ffffffff1660201480610edb57508063ffffffff166021145b15610f1f578063ffffffff1660201415610ef3579419945b60005b6380000000871615610f15576401fffffffe600197881b169601610ef6565b9250610708915050565b6111af565b60288263ffffffff16101561108e578163ffffffff1660201415610f7157610f688660031660080260180363ffffffff168563ffffffff16901c60ff1660086108e9565b92505050610708565b8163ffffffff1660211415610fa757610f688660021660080260100363ffffffff168563ffffffff16901c61ffff1660106108e9565b8163ffffffff1660221415610fd85750505063ffffffff60086003851602811681811b198416918316901b17610708565b8163ffffffff1660231415610ff1578392505050610708565b8163ffffffff1660241415611025578560031660080260180363ffffffff168463ffffffff16901c60ff1692505050610708565b8163ffffffff166025141561105a578560021660080260100363ffffffff168463ffffffff16901c61ffff1692505050610708565b8163ffffffff1660261415610f1f5750505063ffffffff60086003851602601803811681811c198416918316901c17610708565b8163ffffffff16602814156110c65750505060ff63ffffffff60086003861602601803811682811b9091188316918416901b17610708565b8163ffffffff16602914156110ff5750505061ffff63ffffffff60086002861602601003811682811b9091188316918416901b17610708565b8163ffffffff16602a14156111305750505063ffffffff60086003851602811681811c198316918416901c17610708565b8163ffffffff16602b1415611149578492505050610708565b8163ffffffff16602e141561117d5750505063ffffffff60086003851602601803811681811b198316918416901b17610708565b8163ffffffff1660301415611196578392505050610708565b8163ffffffff16603814156111af578492505050610708565b604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c696420696e737472756374696f6e00000000000000000000000000604482015290519081900360640190fd5b6000611220611a6a565b506080602063ffffffff86161061129857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f76616c6964207265676973746572000000000000000000000000000000000000604482015290519081900360640190fd5b63ffffffff8516158015906112aa5750825b156112d857838161016001518663ffffffff16602081106112c757fe5b63ffffffff90921660209290920201525b60808101805163ffffffff808216606085015260049091011690526109be610710565b6000611305611a6a565b506101e051604081015160808083015160a084015160c09094015191936000928392919063ffffffff8616610ffa141561137d5781610fff81161561134f57610fff811661100003015b63ffffffff84166113735760e08801805163ffffffff838201169091529550611377565b8395505b5061172b565b8563ffffffff16610fcd1415611399576340000000945061172b565b8563ffffffff1661101814156113b2576001945061172b565b8563ffffffff1661109614156113ea57600161012088015260ff83166101008801526113dc610710565b97505050505050505061081b565b8563ffffffff16610fa314156115a95763ffffffff831661140a576115a4565b63ffffffff83166005141561158157600061142c8363fffffffc16600161081e565b6000805460208b01516040808d015181517fe03110e1000000000000000000000000000000000000000000000000000000008152600481019390935263ffffffff16602483015280519495509293849373ffffffffffffffffffffffffffffffffffffffff9093169263e03110e19260448082019391829003018186803b1580156114b657600080fd5b505afa1580156114ca573d6000803e3d6000fd5b505050506040513d60408110156114e057600080fd5b508051602090910151909250905060038516600481900382811015611503578092505b5081851015611510578491505b8260088302610100031c9250826008828460040303021b9250600180600883600403021b036001806008858560040303021b039150811981169050838119861617945050506115678563fffffffc1660018561195c565b60408a018051820163ffffffff16905296506115a4915050565b63ffffffff831660031415611598578094506115a4565b63ffffffff9450600993505b61172b565b8563ffffffff16610fa4141561167d5763ffffffff8316600114806115d4575063ffffffff83166002145b806115e5575063ffffffff83166004145b156115f2578094506115a4565b63ffffffff8316600614156115985760006116148363fffffffc16600161081e565b6020890151909150600384166004038381101561162f578093505b83900360089081029290921c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600193850293841b0116911b176020880152600060408801529350836115a4565b8563ffffffff16610fd7141561172b578163ffffffff166003141561171f5763ffffffff831615806116b5575063ffffffff83166005145b806116c6575063ffffffff83166003145b156116d457600094506115a4565b63ffffffff8316600114806116ef575063ffffffff83166002145b80611700575063ffffffff83166006145b80611711575063ffffffff83166004145b1561159857600194506115a4565b63ffffffff9450601693505b6101608701805163ffffffff808816604090920191909152905185821660e09091015260808801805180831660608b0152600401909116905261176c610710565b97505050505050505090565b6000611782611a6a565b5060806000601063ffffffff881614156117a1575060c08101516118f9565b8663ffffffff16601114156117c15763ffffffff861660c08301526118f9565b8663ffffffff16601214156117db575060a08101516118f9565b8663ffffffff16601314156117fb5763ffffffff861660a08301526118f9565b8663ffffffff16601814156118305763ffffffff600387810b9087900b02602081901c821660c08501521660a08301526118f9565b8663ffffffff16601914156118625763ffffffff86811681871602602081901c821660c08501521660a08301526118f9565b8663ffffffff16601a14156118ad578460030b8660030b8161188057fe5b0763ffffffff1660c0830152600385810b9087900b8161189c57fe5b0563ffffffff1660a08301526118f9565b8663ffffffff16601b14156118f9578463ffffffff168663ffffffff16816118d157fe5b0663ffffffff90811660c0840152858116908716816118ec57fe5b0463ffffffff1660a08301525b63ffffffff84161561192e57808261016001518563ffffffff166020811061191d57fe5b63ffffffff90921660209290920201525b60808201805163ffffffff80821660608601526004909101169052611951610710565b979650505050505050565b6000611967836119f8565b9050600384161561197757600080fd5b6020810190601f8516601c0360031b83811b913563ffffffff90911b1916178460051c60005b601b8110156119ed5760208401933582821c60011680156119c557600181146119d6576119e3565b6119cf8286610845565b94506119e3565b6119e08583610845565b94505b505060010161199d565b505060805250505050565b60ff81166103800261016681019036906104e601811015611a64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611af56023913960400191505060405180910390fd5b50919050565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526101608101611ad0611ad5565b905290565b604051806104000160405280602090602082028036833750919291505056fe636865636b207468617420746865726520697320656e6f7567682063616c6c64617461a164736f6c6343000706000a",
Bin: "0x608060405234801561001057600080fd5b50611ba0806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063155633fe146100465780637dc0d1d01461006b578063f8e0cb96146100b0575b600080fd5b610051634000000081565b60405163ffffffff90911681526020015b60405180910390f35b60005461008b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610062565b6100c36100be366004611aa5565b6100d1565b604051908152602001610062565b60006100db6119d2565b608081146100e857600080fd5b604051610600146100f857600080fd5b6064861461010557600080fd5b610166841461011357600080fd5b8535608052602086013560a052604086013560e090811c60c09081526044880135821c82526048880135821c61010052604c880135821c610120526050880135821c61014052605488013590911c61016052605887013560f890811c610180526059880135901c6101a052605a870135901c6101c0526102006101e0819052606287019060005b60208110156101be57823560e01c825260049092019160209091019060010161019a565b505050806101200151156101dc576101d4610612565b91505061060a565b6101408101805160010167ffffffffffffffff169052606081015160009061020490826106ba565b9050603f601a82901c16600281148061022357508063ffffffff166003145b15610270576102668163ffffffff1660021461024057601f610243565b60005b60ff166002610259856303ffffff16601a610776565b63ffffffff16901b6107e9565b935050505061060a565b6101608301516000908190601f601086901c81169190601587901c166020811061029c5761029c611b11565b602002015192508063ffffffff851615806102bd57508463ffffffff16601c145b156102f4578661016001518263ffffffff16602081106102df576102df611b11565b6020020151925050601f600b86901c166103b0565b60208563ffffffff161015610356578463ffffffff16600c148061031e57508463ffffffff16600d145b8061032f57508463ffffffff16600e145b15610340578561ffff1692506103b0565b61034f8661ffff166010610776565b92506103b0565b60288563ffffffff1610158061037257508463ffffffff166022145b8061038357508463ffffffff166026145b156103b0578661016001518263ffffffff16602081106103a5576103a5611b11565b602002015192508190505b60048563ffffffff16101580156103cd575060088563ffffffff16105b806103de57508463ffffffff166001145b156103fd576103ef8587848761085a565b97505050505050505061060a565b63ffffffff60006020878316106104625761041d8861ffff166010610776565b9095019463fffffffc86166104338160016106ba565b915060288863ffffffff161015801561045357508763ffffffff16603014155b1561046057809250600093505b505b6000610470898888856109e9565b63ffffffff9081169150603f8a16908916158015610495575060088163ffffffff1610155b80156104a75750601c8163ffffffff16105b15610583578063ffffffff16600814806104c757508063ffffffff166009145b156104fe576104ec8163ffffffff166008146104e357856104e6565b60005b896107e9565b9b50505050505050505050505061060a565b8063ffffffff16600a0361051e576104ec858963ffffffff8a1615611091565b8063ffffffff16600b0361053f576104ec858963ffffffff8a161515611091565b8063ffffffff16600c03610555576104ec611177565b60108163ffffffff16101580156105725750601c8163ffffffff16105b15610583576104ec8189898861168b565b8863ffffffff16603814801561059e575063ffffffff861615155b156105d35760018b61016001518763ffffffff16602081106105c2576105c2611b11565b63ffffffff90921660209290920201525b8363ffffffff1663ffffffff146105f0576105f084600184611885565b6105fc85836001611091565b9b5050505050505050505050505b949350505050565b60408051608051815260a051602082015260dc519181019190915260fc51604482015261011c51604882015261013c51604c82015261015c51605082015261017c51605482015261019f5160588201526101bf5160598201526101d851605a8201526000906102009060628101835b60208110156106a557601c8401518252602090930192600490910190600101610681565b506000815281810382a0819003902092915050565b6000806106c683611929565b905060038416156106d657600080fd5b6020810190358460051c8160005b601b81101561073c5760208501943583821c600116801561070c576001811461072157610732565b60008481526020839052604090209350610732565b600082815260208590526040902093505b50506001016106e4565b50608051915081811461075757630badf00d60005260206000fd5b5050601f94909416601c0360031b9390931c63ffffffff169392505050565b600063ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80850183169190911c821615159160016020869003821681901b830191861691821b92911b01826107d35760006107d5565b815b90861663ffffffff16179250505092915050565b60006107f36119d2565b5060e08051610100805163ffffffff908116909352848316905260809185161561084957806008018261016001518663ffffffff166020811061083857610838611b11565b63ffffffff90921660209290920201525b610851610612565b95945050505050565b60006108646119d2565b5060806000600463ffffffff8816148061088457508663ffffffff166005145b156109005760008261016001518663ffffffff16602081106108a8576108a8611b11565b602002015190508063ffffffff168563ffffffff161480156108d057508763ffffffff166004145b806108f857508063ffffffff168563ffffffff16141580156108f857508763ffffffff166005145b91505061097d565b8663ffffffff1660060361091d5760008460030b1315905061097d565b8663ffffffff166007036109395760008460030b13905061097d565b8663ffffffff1660010361097d57601f601087901c1660008190036109625760008560030b1291505b8063ffffffff1660010361097b5760008560030b121591505b505b606082018051608084015163ffffffff1690915281156109c35760026109a88861ffff166010610776565b63ffffffff90811690911b82016004011660808401526109d5565b60808301805160040163ffffffff1690525b6109dd610612565b98975050505050505050565b6000603f601a86901c81169086166020821015610dad5760088263ffffffff1610158015610a1d5750600f8263ffffffff16105b15610abd578163ffffffff16600803610a3857506020610ab8565b8163ffffffff16600903610a4e57506021610ab8565b8163ffffffff16600a03610a645750602a610ab8565b8163ffffffff16600b03610a7a5750602b610ab8565b8163ffffffff16600c03610a9057506024610ab8565b8163ffffffff16600d03610aa657506025610ab8565b8163ffffffff16600e03610ab8575060265b600091505b8163ffffffff16600003610d0157601f600688901c16602063ffffffff83161015610bdb5760088263ffffffff1610610afb5786935050505061060a565b8163ffffffff16600003610b1e5763ffffffff86811691161b925061060a915050565b8163ffffffff16600203610b415763ffffffff86811691161c925061060a915050565b8163ffffffff16600303610b6b576102668163ffffffff168763ffffffff16901c82602003610776565b8163ffffffff16600403610b8e575050505063ffffffff8216601f84161b61060a565b8163ffffffff16600603610bb1575050505063ffffffff8216601f84161c61060a565b8163ffffffff16600703610bdb576102668763ffffffff168763ffffffff16901c88602003610776565b8163ffffffff1660201480610bf657508163ffffffff166021145b15610c0857858701935050505061060a565b8163ffffffff1660221480610c2357508163ffffffff166023145b15610c3557858703935050505061060a565b8163ffffffff16602403610c5057858716935050505061060a565b8163ffffffff16602503610c6b57858717935050505061060a565b8163ffffffff16602603610c8657858718935050505061060a565b8163ffffffff16602703610ca157505050508282171961060a565b8163ffffffff16602a03610cd3578560030b8760030b12610cc3576000610cc6565b60015b60ff16935050505061060a565b8163ffffffff16602b03610cfb578563ffffffff168763ffffffff1610610cc3576000610cc6565b5061102a565b8163ffffffff16600f03610d235760108563ffffffff16901b9250505061060a565b8163ffffffff16601c03610da8578063ffffffff16600203610d4a5750505082820261060a565b8063ffffffff1660201480610d6557508063ffffffff166021145b15610da8578063ffffffff16602003610d7c579419945b60005b6380000000871615610d9e576401fffffffe600197881b169601610d7f565b925061060a915050565b61102a565b60288263ffffffff161015610f10578163ffffffff16602003610df957610df08660031660080260180363ffffffff168563ffffffff16901c60ff166008610776565b9250505061060a565b8163ffffffff16602103610e2e57610df08660021660080260100363ffffffff168563ffffffff16901c61ffff166010610776565b8163ffffffff16602203610e5e5750505063ffffffff60086003851602811681811b198416918316901b1761060a565b8163ffffffff16602303610e7657839250505061060a565b8163ffffffff16602403610ea9578560031660080260180363ffffffff168463ffffffff16901c60ff169250505061060a565b8163ffffffff16602503610edd578560021660080260100363ffffffff168463ffffffff16901c61ffff169250505061060a565b8163ffffffff16602603610da85750505063ffffffff60086003851602601803811681811c198416918316901c1761060a565b8163ffffffff16602803610f475750505060ff63ffffffff60086003861602601803811682811b9091188316918416901b1761060a565b8163ffffffff16602903610f7f5750505061ffff63ffffffff60086002861602601003811682811b9091188316918416901b1761060a565b8163ffffffff16602a03610faf5750505063ffffffff60086003851602811681811c198316918416901c1761060a565b8163ffffffff16602b03610fc757849250505061060a565b8163ffffffff16602e03610ffa5750505063ffffffff60086003851602601803811681811b198316918416901b1761060a565b8163ffffffff1660300361101257839250505061060a565b8163ffffffff1660380361102a57849250505061060a565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c696420696e737472756374696f6e0000000000000000000000000060448201526064015b60405180910390fd5b600061109b6119d2565b506080602063ffffffff86161061110e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f76616c69642072656769737465720000000000000000000000000000000000006044820152606401611088565b63ffffffff8516158015906111205750825b1561115457838161016001518663ffffffff166020811061114357611143611b11565b63ffffffff90921660209290920201525b60808101805163ffffffff80821660608501526004909101169052610851610612565b60006111816119d2565b506101e051604081015160808083015160a084015160c09094015191936000928392919063ffffffff8616610ffa036111fb5781610fff8116156111ca57610fff811661100003015b8363ffffffff166000036111f15760e08801805163ffffffff8382011690915295506111f5565b8395505b5061164a565b8563ffffffff16610fcd03611216576340000000945061164a565b8563ffffffff166110180361122e576001945061164a565b8563ffffffff166110960361126357600161012088015260ff8316610100880152611257610612565b97505050505050505090565b8563ffffffff16610fa3036114ad5763ffffffff83161561164a577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb63ffffffff8416016114675760006112be8363fffffffc1660016106ba565b60208901519091508060001a60010361132b5761132881600090815233602052604090207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790565b90505b6000805460408b81015190517fe03110e10000000000000000000000000000000000000000000000000000000081526004810185905263ffffffff9091166024820152829173ffffffffffffffffffffffffffffffffffffffff169063e03110e1906044016040805180830381865afa1580156113ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d09190611b40565b915091506003861680600403828110156113e8578092505b50818610156113f5578591505b8260088302610100031c9250826008828460040303021b9250600180600883600403021b036001806008858560040303021b0391508119811690508381198716179550505061144c8663fffffffc16600186611885565b60408b018051820163ffffffff16905297506114a892505050565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd63ffffffff84160161149c5780945061164a565b63ffffffff9450600993505b61164a565b8563ffffffff16610fa40361159e5763ffffffff8316600114806114d7575063ffffffff83166002145b806114e8575063ffffffff83166004145b156114f55780945061164a565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa63ffffffff84160161149c5760006115358363fffffffc1660016106ba565b60208901519091506003841660040383811015611550578093505b83900360089081029290921c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600193850293841b0116911b1760208801526000604088015293508361164a565b8563ffffffff16610fd70361164a578163ffffffff1660030361163e5763ffffffff831615806115d4575063ffffffff83166005145b806115e5575063ffffffff83166003145b156115f3576000945061164a565b63ffffffff83166001148061160e575063ffffffff83166002145b8061161f575063ffffffff83166006145b80611630575063ffffffff83166004145b1561149c576001945061164a565b63ffffffff9450601693505b6101608701805163ffffffff808816604090920191909152905185821660e09091015260808801805180831660608b01526004019091169052611257610612565b60006116956119d2565b506080600063ffffffff87166010036116b3575060c081015161181c565b8663ffffffff166011036116d25763ffffffff861660c083015261181c565b8663ffffffff166012036116eb575060a081015161181c565b8663ffffffff1660130361170a5763ffffffff861660a083015261181c565b8663ffffffff1660180361173e5763ffffffff600387810b9087900b02602081901c821660c08501521660a083015261181c565b8663ffffffff1660190361176f5763ffffffff86811681871602602081901c821660c08501521660a083015261181c565b8663ffffffff16601a036117c5578460030b8660030b8161179257611792611b64565b0763ffffffff1660c0830152600385810b9087900b816117b4576117b4611b64565b0563ffffffff1660a083015261181c565b8663ffffffff16601b0361181c578463ffffffff168663ffffffff16816117ee576117ee611b64565b0663ffffffff90811660c08401528581169087168161180f5761180f611b64565b0463ffffffff1660a08301525b63ffffffff84161561185757808261016001518563ffffffff166020811061184657611846611b11565b63ffffffff90921660209290920201525b60808201805163ffffffff8082166060860152600490910116905261187a610612565b979650505050505050565b600061189083611929565b905060038416156118a057600080fd5b6020810190601f8516601c0360031b83811b913563ffffffff90911b1916178460051c60005b601b81101561191e5760208401933582821c60011680156118ee576001811461190357611914565b60008581526020839052604090209450611914565b600082815260208690526040902094505b50506001016118c6565b505060805250505050565b60ff81166103800261016681019036906104e6018110156119cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f636865636b207468617420746865726520697320656e6f7567682063616c6c6460448201527f61746100000000000000000000000000000000000000000000000000000000006064820152608401611088565b50919050565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526101608101611a38611a3d565b905290565b6040518061040001604052806020906020820280368337509192915050565b60008083601f840112611a6e57600080fd5b50813567ffffffffffffffff811115611a8657600080fd5b602083019150836020828501011115611a9e57600080fd5b9250929050565b60008060008060408587031215611abb57600080fd5b843567ffffffffffffffff80821115611ad357600080fd5b611adf88838901611a5c565b90965094506020870135915080821115611af857600080fd5b50611b0587828801611a5c565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008060408385031215611b5357600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea164736f6c634300080f000a",
}
// MIPSABI is the input ABI used to generate the binding from.
......
......@@ -13,9 +13,9 @@ const MIPSStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"src/
var MIPSStorageLayout = new(solc.StorageLayout)
var MIPSDeployedBin = "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063155633fe146100465780637dc0d1d014610067578063f8e0cb9614610098575b600080fd5b61004e61016c565b6040805163ffffffff9092168252519081900360200190f35b61006f610174565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61015a600480360360408110156100ae57600080fd5b8101906020810181356401000000008111156100c957600080fd5b8201836020820111156100db57600080fd5b803590602001918460018302840111640100000000831117156100fd57600080fd5b91939092909160208101903564010000000081111561011b57600080fd5b82018360208201111561012d57600080fd5b8035906020019184600183028401116401000000008311171561014f57600080fd5b509092509050610190565b60408051918252519081900360200190f35b634000000081565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b600061019a611a6a565b608081146101a757600080fd5b604051610600146101b757600080fd5b606486146101c457600080fd5b61016684146101d257600080fd5b6101ef565b8035602084810360031b9190911c8352920192910190565b8560806101fe602082846101d7565b9150915061020e602082846101d7565b9150915061021e600482846101d7565b9150915061022e600482846101d7565b9150915061023e600482846101d7565b9150915061024e600482846101d7565b9150915061025e600482846101d7565b9150915061026e600482846101d7565b9150915061027e600182846101d7565b9150915061028e600182846101d7565b9150915061029e600882846101d7565b6020810190819052909250905060005b60208110156102d0576102c3600483856101d7565b90935091506001016102ae565b505050806101200151156102ee576102e6610710565b915050610708565b6101408101805160010167ffffffffffffffff1690526060810151600090610316908261081e565b9050603f601a82901c16600281148061033557508063ffffffff166003145b15610382576103788163ffffffff1660021461035257601f610355565b60005b60ff16600261036b856303ffffff16601a6108e9565b63ffffffff16901b61095c565b9350505050610708565b6101608301516000908190601f601086901c81169190601587901c16602081106103a857fe5b602002015192508063ffffffff851615806103c957508463ffffffff16601c145b156103fa578661016001518263ffffffff16602081106103e557fe5b6020020151925050601f600b86901c166104b1565b60208563ffffffff16101561045d578463ffffffff16600c148061042457508463ffffffff16600d145b8061043557508463ffffffff16600e145b15610446578561ffff169250610458565b6104558661ffff1660106108e9565b92505b6104b1565b60288563ffffffff1610158061047957508463ffffffff166022145b8061048a57508463ffffffff166026145b156104b1578661016001518263ffffffff16602081106104a657fe5b602002015192508190505b60048563ffffffff16101580156104ce575060088563ffffffff16105b806104df57508463ffffffff166001145b156104fe576104f0858784876109c7565b975050505050505050610708565b63ffffffff60006020878316106105635761051e8861ffff1660106108e9565b9095019463fffffffc861661053481600161081e565b915060288863ffffffff161015801561055457508763ffffffff16603014155b1561056157809250600093505b505b600061057189888885610b50565b63ffffffff9081169150603f8a16908916158015610596575060088163ffffffff1610155b80156105a85750601c8163ffffffff16105b15610687578063ffffffff16600814806105c857508063ffffffff166009145b156105ff576105ed8163ffffffff166008146105e457856105e7565b60005b8961095c565b9b505050505050505050505050610708565b8063ffffffff16600a1415610620576105ed858963ffffffff8a1615611216565b8063ffffffff16600b1415610642576105ed858963ffffffff8a161515611216565b8063ffffffff16600c1415610659576105ed6112fb565b60108163ffffffff16101580156106765750601c8163ffffffff16105b15610687576105ed81898988611778565b8863ffffffff1660381480156106a2575063ffffffff861615155b156106d15760018b61016001518763ffffffff16602081106106c057fe5b63ffffffff90921660209290920201525b8363ffffffff1663ffffffff146106ee576106ee8460018461195c565b6106fa85836001611216565b9b5050505050505050505050505b949350505050565b6000610728565b602083810382015183520192910190565b60806040518061073a60208285610717565b9150925061074a60208285610717565b9150925061075a60048285610717565b9150925061076a60048285610717565b9150925061077a60048285610717565b9150925061078a60048285610717565b9150925061079a60048285610717565b915092506107aa60048285610717565b915092506107ba60018285610717565b915092506107ca60018285610717565b915092506107da60088285610717565b60209091019350905060005b6020811015610808576107fb60048386610717565b90945091506001016107e6565b506000815281810382a081900390209150505b90565b60008061082a836119f8565b9050600384161561083a57600080fd5b602081019035610857565b60009081526020919091526040902090565b8460051c8160005b601b8110156108af5760208501943583821c60011680156108875760018114610898576108a5565b6108918285610845565b93506108a5565b6108a28483610845565b93505b505060010161085f565b5060805191508181146108ca57630badf00d60005260206000fd5b5050601f94909416601c0360031b9390931c63ffffffff169392505050565b600063ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80850183169190911c821615159160016020869003821681901b830191861691821b92911b0182610946576000610948565b815b90861663ffffffff16179250505092915050565b6000610966611a6a565b5060e08051610100805163ffffffff90811690935284831690526080918516156109b657806008018261016001518663ffffffff16602081106109a557fe5b63ffffffff90921660209290920201525b6109be610710565b95945050505050565b60006109d1611a6a565b5060806000600463ffffffff881614806109f157508663ffffffff166005145b15610a675760008261016001518663ffffffff1660208110610a0f57fe5b602002015190508063ffffffff168563ffffffff16148015610a3757508763ffffffff166004145b80610a5f57508063ffffffff168563ffffffff1614158015610a5f57508763ffffffff166005145b915050610ae4565b8663ffffffff1660061415610a855760008460030b13159050610ae4565b8663ffffffff1660071415610aa25760008460030b139050610ae4565b8663ffffffff1660011415610ae457601f601087901c1680610ac85760008560030b1291505b8063ffffffff1660011415610ae25760008560030b121591505b505b606082018051608084015163ffffffff169091528115610b2a576002610b0f8861ffff1660106108e9565b63ffffffff90811690911b8201600401166080840152610b3c565b60808301805160040163ffffffff1690525b610b44610710565b98975050505050505050565b6000603f601a86901c81169086166020821015610f245760088263ffffffff1610158015610b845750600f8263ffffffff16105b15610c2b578163ffffffff1660081415610ba057506020610c26565b8163ffffffff1660091415610bb757506021610c26565b8163ffffffff16600a1415610bce5750602a610c26565b8163ffffffff16600b1415610be55750602b610c26565b8163ffffffff16600c1415610bfc57506024610c26565b8163ffffffff16600d1415610c1357506025610c26565b8163ffffffff16600e1415610c26575060265b600091505b63ffffffff8216610e7457601f600688901c16602063ffffffff83161015610d485760088263ffffffff1610610c6657869350505050610708565b63ffffffff8216610c865763ffffffff86811691161b9250610708915050565b8163ffffffff1660021415610caa5763ffffffff86811691161c9250610708915050565b8163ffffffff1660031415610cd5576103788163ffffffff168763ffffffff16901c826020036108e9565b8163ffffffff1660041415610cf9575050505063ffffffff8216601f84161b610708565b8163ffffffff1660061415610d1d575050505063ffffffff8216601f84161c610708565b8163ffffffff1660071415610d48576103788763ffffffff168763ffffffff16901c886020036108e9565b8163ffffffff1660201480610d6357508163ffffffff166021145b15610d75578587019350505050610708565b8163ffffffff1660221480610d9057508163ffffffff166023145b15610da2578587039350505050610708565b8163ffffffff1660241415610dbe578587169350505050610708565b8163ffffffff1660251415610dda578587179350505050610708565b8163ffffffff1660261415610df6578587189350505050610708565b8163ffffffff1660271415610e12575050505082821719610708565b8163ffffffff16602a1415610e45578560030b8760030b12610e35576000610e38565b60015b60ff169350505050610708565b8163ffffffff16602b1415610e6e578563ffffffff168763ffffffff1610610e35576000610e38565b50610f1f565b8163ffffffff16600f1415610e975760108563ffffffff16901b92505050610708565b8163ffffffff16601c1415610f1f578063ffffffff1660021415610ec057505050828202610708565b8063ffffffff1660201480610edb57508063ffffffff166021145b15610f1f578063ffffffff1660201415610ef3579419945b60005b6380000000871615610f15576401fffffffe600197881b169601610ef6565b9250610708915050565b6111af565b60288263ffffffff16101561108e578163ffffffff1660201415610f7157610f688660031660080260180363ffffffff168563ffffffff16901c60ff1660086108e9565b92505050610708565b8163ffffffff1660211415610fa757610f688660021660080260100363ffffffff168563ffffffff16901c61ffff1660106108e9565b8163ffffffff1660221415610fd85750505063ffffffff60086003851602811681811b198416918316901b17610708565b8163ffffffff1660231415610ff1578392505050610708565b8163ffffffff1660241415611025578560031660080260180363ffffffff168463ffffffff16901c60ff1692505050610708565b8163ffffffff166025141561105a578560021660080260100363ffffffff168463ffffffff16901c61ffff1692505050610708565b8163ffffffff1660261415610f1f5750505063ffffffff60086003851602601803811681811c198416918316901c17610708565b8163ffffffff16602814156110c65750505060ff63ffffffff60086003861602601803811682811b9091188316918416901b17610708565b8163ffffffff16602914156110ff5750505061ffff63ffffffff60086002861602601003811682811b9091188316918416901b17610708565b8163ffffffff16602a14156111305750505063ffffffff60086003851602811681811c198316918416901c17610708565b8163ffffffff16602b1415611149578492505050610708565b8163ffffffff16602e141561117d5750505063ffffffff60086003851602601803811681811b198316918416901b17610708565b8163ffffffff1660301415611196578392505050610708565b8163ffffffff16603814156111af578492505050610708565b604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c696420696e737472756374696f6e00000000000000000000000000604482015290519081900360640190fd5b6000611220611a6a565b506080602063ffffffff86161061129857604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f76616c6964207265676973746572000000000000000000000000000000000000604482015290519081900360640190fd5b63ffffffff8516158015906112aa5750825b156112d857838161016001518663ffffffff16602081106112c757fe5b63ffffffff90921660209290920201525b60808101805163ffffffff808216606085015260049091011690526109be610710565b6000611305611a6a565b506101e051604081015160808083015160a084015160c09094015191936000928392919063ffffffff8616610ffa141561137d5781610fff81161561134f57610fff811661100003015b63ffffffff84166113735760e08801805163ffffffff838201169091529550611377565b8395505b5061172b565b8563ffffffff16610fcd1415611399576340000000945061172b565b8563ffffffff1661101814156113b2576001945061172b565b8563ffffffff1661109614156113ea57600161012088015260ff83166101008801526113dc610710565b97505050505050505061081b565b8563ffffffff16610fa314156115a95763ffffffff831661140a576115a4565b63ffffffff83166005141561158157600061142c8363fffffffc16600161081e565b6000805460208b01516040808d015181517fe03110e1000000000000000000000000000000000000000000000000000000008152600481019390935263ffffffff16602483015280519495509293849373ffffffffffffffffffffffffffffffffffffffff9093169263e03110e19260448082019391829003018186803b1580156114b657600080fd5b505afa1580156114ca573d6000803e3d6000fd5b505050506040513d60408110156114e057600080fd5b508051602090910151909250905060038516600481900382811015611503578092505b5081851015611510578491505b8260088302610100031c9250826008828460040303021b9250600180600883600403021b036001806008858560040303021b039150811981169050838119861617945050506115678563fffffffc1660018561195c565b60408a018051820163ffffffff16905296506115a4915050565b63ffffffff831660031415611598578094506115a4565b63ffffffff9450600993505b61172b565b8563ffffffff16610fa4141561167d5763ffffffff8316600114806115d4575063ffffffff83166002145b806115e5575063ffffffff83166004145b156115f2578094506115a4565b63ffffffff8316600614156115985760006116148363fffffffc16600161081e565b6020890151909150600384166004038381101561162f578093505b83900360089081029290921c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600193850293841b0116911b176020880152600060408801529350836115a4565b8563ffffffff16610fd7141561172b578163ffffffff166003141561171f5763ffffffff831615806116b5575063ffffffff83166005145b806116c6575063ffffffff83166003145b156116d457600094506115a4565b63ffffffff8316600114806116ef575063ffffffff83166002145b80611700575063ffffffff83166006145b80611711575063ffffffff83166004145b1561159857600194506115a4565b63ffffffff9450601693505b6101608701805163ffffffff808816604090920191909152905185821660e09091015260808801805180831660608b0152600401909116905261176c610710565b97505050505050505090565b6000611782611a6a565b5060806000601063ffffffff881614156117a1575060c08101516118f9565b8663ffffffff16601114156117c15763ffffffff861660c08301526118f9565b8663ffffffff16601214156117db575060a08101516118f9565b8663ffffffff16601314156117fb5763ffffffff861660a08301526118f9565b8663ffffffff16601814156118305763ffffffff600387810b9087900b02602081901c821660c08501521660a08301526118f9565b8663ffffffff16601914156118625763ffffffff86811681871602602081901c821660c08501521660a08301526118f9565b8663ffffffff16601a14156118ad578460030b8660030b8161188057fe5b0763ffffffff1660c0830152600385810b9087900b8161189c57fe5b0563ffffffff1660a08301526118f9565b8663ffffffff16601b14156118f9578463ffffffff168663ffffffff16816118d157fe5b0663ffffffff90811660c0840152858116908716816118ec57fe5b0463ffffffff1660a08301525b63ffffffff84161561192e57808261016001518563ffffffff166020811061191d57fe5b63ffffffff90921660209290920201525b60808201805163ffffffff80821660608601526004909101169052611951610710565b979650505050505050565b6000611967836119f8565b9050600384161561197757600080fd5b6020810190601f8516601c0360031b83811b913563ffffffff90911b1916178460051c60005b601b8110156119ed5760208401933582821c60011680156119c557600181146119d6576119e3565b6119cf8286610845565b94506119e3565b6119e08583610845565b94505b505060010161199d565b505060805250505050565b60ff81166103800261016681019036906104e601811015611a64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611af56023913960400191505060405180910390fd5b50919050565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526101608101611ad0611ad5565b905290565b604051806104000160405280602090602082028036833750919291505056fe636865636b207468617420746865726520697320656e6f7567682063616c6c64617461a164736f6c6343000706000a"
var MIPSDeployedBin = "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063155633fe146100465780637dc0d1d01461006b578063f8e0cb96146100b0575b600080fd5b610051634000000081565b60405163ffffffff90911681526020015b60405180910390f35b60005461008b9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610062565b6100c36100be366004611aa5565b6100d1565b604051908152602001610062565b60006100db6119d2565b608081146100e857600080fd5b604051610600146100f857600080fd5b6064861461010557600080fd5b610166841461011357600080fd5b8535608052602086013560a052604086013560e090811c60c09081526044880135821c82526048880135821c61010052604c880135821c610120526050880135821c61014052605488013590911c61016052605887013560f890811c610180526059880135901c6101a052605a870135901c6101c0526102006101e0819052606287019060005b60208110156101be57823560e01c825260049092019160209091019060010161019a565b505050806101200151156101dc576101d4610612565b91505061060a565b6101408101805160010167ffffffffffffffff169052606081015160009061020490826106ba565b9050603f601a82901c16600281148061022357508063ffffffff166003145b15610270576102668163ffffffff1660021461024057601f610243565b60005b60ff166002610259856303ffffff16601a610776565b63ffffffff16901b6107e9565b935050505061060a565b6101608301516000908190601f601086901c81169190601587901c166020811061029c5761029c611b11565b602002015192508063ffffffff851615806102bd57508463ffffffff16601c145b156102f4578661016001518263ffffffff16602081106102df576102df611b11565b6020020151925050601f600b86901c166103b0565b60208563ffffffff161015610356578463ffffffff16600c148061031e57508463ffffffff16600d145b8061032f57508463ffffffff16600e145b15610340578561ffff1692506103b0565b61034f8661ffff166010610776565b92506103b0565b60288563ffffffff1610158061037257508463ffffffff166022145b8061038357508463ffffffff166026145b156103b0578661016001518263ffffffff16602081106103a5576103a5611b11565b602002015192508190505b60048563ffffffff16101580156103cd575060088563ffffffff16105b806103de57508463ffffffff166001145b156103fd576103ef8587848761085a565b97505050505050505061060a565b63ffffffff60006020878316106104625761041d8861ffff166010610776565b9095019463fffffffc86166104338160016106ba565b915060288863ffffffff161015801561045357508763ffffffff16603014155b1561046057809250600093505b505b6000610470898888856109e9565b63ffffffff9081169150603f8a16908916158015610495575060088163ffffffff1610155b80156104a75750601c8163ffffffff16105b15610583578063ffffffff16600814806104c757508063ffffffff166009145b156104fe576104ec8163ffffffff166008146104e357856104e6565b60005b896107e9565b9b50505050505050505050505061060a565b8063ffffffff16600a0361051e576104ec858963ffffffff8a1615611091565b8063ffffffff16600b0361053f576104ec858963ffffffff8a161515611091565b8063ffffffff16600c03610555576104ec611177565b60108163ffffffff16101580156105725750601c8163ffffffff16105b15610583576104ec8189898861168b565b8863ffffffff16603814801561059e575063ffffffff861615155b156105d35760018b61016001518763ffffffff16602081106105c2576105c2611b11565b63ffffffff90921660209290920201525b8363ffffffff1663ffffffff146105f0576105f084600184611885565b6105fc85836001611091565b9b5050505050505050505050505b949350505050565b60408051608051815260a051602082015260dc519181019190915260fc51604482015261011c51604882015261013c51604c82015261015c51605082015261017c51605482015261019f5160588201526101bf5160598201526101d851605a8201526000906102009060628101835b60208110156106a557601c8401518252602090930192600490910190600101610681565b506000815281810382a0819003902092915050565b6000806106c683611929565b905060038416156106d657600080fd5b6020810190358460051c8160005b601b81101561073c5760208501943583821c600116801561070c576001811461072157610732565b60008481526020839052604090209350610732565b600082815260208590526040902093505b50506001016106e4565b50608051915081811461075757630badf00d60005260206000fd5b5050601f94909416601c0360031b9390931c63ffffffff169392505050565b600063ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80850183169190911c821615159160016020869003821681901b830191861691821b92911b01826107d35760006107d5565b815b90861663ffffffff16179250505092915050565b60006107f36119d2565b5060e08051610100805163ffffffff908116909352848316905260809185161561084957806008018261016001518663ffffffff166020811061083857610838611b11565b63ffffffff90921660209290920201525b610851610612565b95945050505050565b60006108646119d2565b5060806000600463ffffffff8816148061088457508663ffffffff166005145b156109005760008261016001518663ffffffff16602081106108a8576108a8611b11565b602002015190508063ffffffff168563ffffffff161480156108d057508763ffffffff166004145b806108f857508063ffffffff168563ffffffff16141580156108f857508763ffffffff166005145b91505061097d565b8663ffffffff1660060361091d5760008460030b1315905061097d565b8663ffffffff166007036109395760008460030b13905061097d565b8663ffffffff1660010361097d57601f601087901c1660008190036109625760008560030b1291505b8063ffffffff1660010361097b5760008560030b121591505b505b606082018051608084015163ffffffff1690915281156109c35760026109a88861ffff166010610776565b63ffffffff90811690911b82016004011660808401526109d5565b60808301805160040163ffffffff1690525b6109dd610612565b98975050505050505050565b6000603f601a86901c81169086166020821015610dad5760088263ffffffff1610158015610a1d5750600f8263ffffffff16105b15610abd578163ffffffff16600803610a3857506020610ab8565b8163ffffffff16600903610a4e57506021610ab8565b8163ffffffff16600a03610a645750602a610ab8565b8163ffffffff16600b03610a7a5750602b610ab8565b8163ffffffff16600c03610a9057506024610ab8565b8163ffffffff16600d03610aa657506025610ab8565b8163ffffffff16600e03610ab8575060265b600091505b8163ffffffff16600003610d0157601f600688901c16602063ffffffff83161015610bdb5760088263ffffffff1610610afb5786935050505061060a565b8163ffffffff16600003610b1e5763ffffffff86811691161b925061060a915050565b8163ffffffff16600203610b415763ffffffff86811691161c925061060a915050565b8163ffffffff16600303610b6b576102668163ffffffff168763ffffffff16901c82602003610776565b8163ffffffff16600403610b8e575050505063ffffffff8216601f84161b61060a565b8163ffffffff16600603610bb1575050505063ffffffff8216601f84161c61060a565b8163ffffffff16600703610bdb576102668763ffffffff168763ffffffff16901c88602003610776565b8163ffffffff1660201480610bf657508163ffffffff166021145b15610c0857858701935050505061060a565b8163ffffffff1660221480610c2357508163ffffffff166023145b15610c3557858703935050505061060a565b8163ffffffff16602403610c5057858716935050505061060a565b8163ffffffff16602503610c6b57858717935050505061060a565b8163ffffffff16602603610c8657858718935050505061060a565b8163ffffffff16602703610ca157505050508282171961060a565b8163ffffffff16602a03610cd3578560030b8760030b12610cc3576000610cc6565b60015b60ff16935050505061060a565b8163ffffffff16602b03610cfb578563ffffffff168763ffffffff1610610cc3576000610cc6565b5061102a565b8163ffffffff16600f03610d235760108563ffffffff16901b9250505061060a565b8163ffffffff16601c03610da8578063ffffffff16600203610d4a5750505082820261060a565b8063ffffffff1660201480610d6557508063ffffffff166021145b15610da8578063ffffffff16602003610d7c579419945b60005b6380000000871615610d9e576401fffffffe600197881b169601610d7f565b925061060a915050565b61102a565b60288263ffffffff161015610f10578163ffffffff16602003610df957610df08660031660080260180363ffffffff168563ffffffff16901c60ff166008610776565b9250505061060a565b8163ffffffff16602103610e2e57610df08660021660080260100363ffffffff168563ffffffff16901c61ffff166010610776565b8163ffffffff16602203610e5e5750505063ffffffff60086003851602811681811b198416918316901b1761060a565b8163ffffffff16602303610e7657839250505061060a565b8163ffffffff16602403610ea9578560031660080260180363ffffffff168463ffffffff16901c60ff169250505061060a565b8163ffffffff16602503610edd578560021660080260100363ffffffff168463ffffffff16901c61ffff169250505061060a565b8163ffffffff16602603610da85750505063ffffffff60086003851602601803811681811c198416918316901c1761060a565b8163ffffffff16602803610f475750505060ff63ffffffff60086003861602601803811682811b9091188316918416901b1761060a565b8163ffffffff16602903610f7f5750505061ffff63ffffffff60086002861602601003811682811b9091188316918416901b1761060a565b8163ffffffff16602a03610faf5750505063ffffffff60086003851602811681811c198316918416901c1761060a565b8163ffffffff16602b03610fc757849250505061060a565b8163ffffffff16602e03610ffa5750505063ffffffff60086003851602601803811681811b198316918416901b1761060a565b8163ffffffff1660300361101257839250505061060a565b8163ffffffff1660380361102a57849250505061060a565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f696e76616c696420696e737472756374696f6e0000000000000000000000000060448201526064015b60405180910390fd5b600061109b6119d2565b506080602063ffffffff86161061110e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f76616c69642072656769737465720000000000000000000000000000000000006044820152606401611088565b63ffffffff8516158015906111205750825b1561115457838161016001518663ffffffff166020811061114357611143611b11565b63ffffffff90921660209290920201525b60808101805163ffffffff80821660608501526004909101169052610851610612565b60006111816119d2565b506101e051604081015160808083015160a084015160c09094015191936000928392919063ffffffff8616610ffa036111fb5781610fff8116156111ca57610fff811661100003015b8363ffffffff166000036111f15760e08801805163ffffffff8382011690915295506111f5565b8395505b5061164a565b8563ffffffff16610fcd03611216576340000000945061164a565b8563ffffffff166110180361122e576001945061164a565b8563ffffffff166110960361126357600161012088015260ff8316610100880152611257610612565b97505050505050505090565b8563ffffffff16610fa3036114ad5763ffffffff83161561164a577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb63ffffffff8416016114675760006112be8363fffffffc1660016106ba565b60208901519091508060001a60010361132b5761132881600090815233602052604090207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790565b90505b6000805460408b81015190517fe03110e10000000000000000000000000000000000000000000000000000000081526004810185905263ffffffff9091166024820152829173ffffffffffffffffffffffffffffffffffffffff169063e03110e1906044016040805180830381865afa1580156113ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d09190611b40565b915091506003861680600403828110156113e8578092505b50818610156113f5578591505b8260088302610100031c9250826008828460040303021b9250600180600883600403021b036001806008858560040303021b0391508119811690508381198716179550505061144c8663fffffffc16600186611885565b60408b018051820163ffffffff16905297506114a892505050565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd63ffffffff84160161149c5780945061164a565b63ffffffff9450600993505b61164a565b8563ffffffff16610fa40361159e5763ffffffff8316600114806114d7575063ffffffff83166002145b806114e8575063ffffffff83166004145b156114f55780945061164a565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa63ffffffff84160161149c5760006115358363fffffffc1660016106ba565b60208901519091506003841660040383811015611550578093505b83900360089081029290921c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600193850293841b0116911b1760208801526000604088015293508361164a565b8563ffffffff16610fd70361164a578163ffffffff1660030361163e5763ffffffff831615806115d4575063ffffffff83166005145b806115e5575063ffffffff83166003145b156115f3576000945061164a565b63ffffffff83166001148061160e575063ffffffff83166002145b8061161f575063ffffffff83166006145b80611630575063ffffffff83166004145b1561149c576001945061164a565b63ffffffff9450601693505b6101608701805163ffffffff808816604090920191909152905185821660e09091015260808801805180831660608b01526004019091169052611257610612565b60006116956119d2565b506080600063ffffffff87166010036116b3575060c081015161181c565b8663ffffffff166011036116d25763ffffffff861660c083015261181c565b8663ffffffff166012036116eb575060a081015161181c565b8663ffffffff1660130361170a5763ffffffff861660a083015261181c565b8663ffffffff1660180361173e5763ffffffff600387810b9087900b02602081901c821660c08501521660a083015261181c565b8663ffffffff1660190361176f5763ffffffff86811681871602602081901c821660c08501521660a083015261181c565b8663ffffffff16601a036117c5578460030b8660030b8161179257611792611b64565b0763ffffffff1660c0830152600385810b9087900b816117b4576117b4611b64565b0563ffffffff1660a083015261181c565b8663ffffffff16601b0361181c578463ffffffff168663ffffffff16816117ee576117ee611b64565b0663ffffffff90811660c08401528581169087168161180f5761180f611b64565b0463ffffffff1660a08301525b63ffffffff84161561185757808261016001518563ffffffff166020811061184657611846611b11565b63ffffffff90921660209290920201525b60808201805163ffffffff8082166060860152600490910116905261187a610612565b979650505050505050565b600061189083611929565b905060038416156118a057600080fd5b6020810190601f8516601c0360031b83811b913563ffffffff90911b1916178460051c60005b601b81101561191e5760208401933582821c60011680156118ee576001811461190357611914565b60008581526020839052604090209450611914565b600082815260208690526040902094505b50506001016118c6565b505060805250505050565b60ff81166103800261016681019036906104e6018110156119cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f636865636b207468617420746865726520697320656e6f7567682063616c6c6460448201527f61746100000000000000000000000000000000000000000000000000000000006064820152608401611088565b50919050565b6040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101919091526101608101611a38611a3d565b905290565b6040518061040001604052806020906020820280368337509192915050565b60008083601f840112611a6e57600080fd5b50813567ffffffffffffffff811115611a8657600080fd5b602083019150836020828501011115611a9e57600080fd5b9250929050565b60008060008060408587031215611abb57600080fd5b843567ffffffffffffffff80821115611ad357600080fd5b611adf88838901611a5c565b90965094506020870135915080821115611af857600080fd5b50611b0587828801611a5c565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008060408385031215611b5357600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fdfea164736f6c634300080f000a"
var MIPSDeployedSourceMap = "1075:33645:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1655:45;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2081:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;22431:5721;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22431:5721:0;;-1:-1:-1;22431:5721:0;-1:-1:-1;22431:5721:0;:::i;:::-;;;;;;;;;;;;;;;;1655:45;1690:10;1655:45;:::o;2081:29::-;;;;;;:::o;22431:5721::-;22509:7;22528:18;;:::i;:::-;22663:4;22656:5;22653:15;22643:2;;22732:1;22730;22723:11;22643:2;22780:4;22774:11;22787;22771:28;22761:2;;22853:1;22851;22844:11;22761:2;22913:3;22895:16;22892:25;22882:2;;22987:1;22985;22978:11;22882:2;23043:3;23029:12;23026:21;23016:2;;23116:1;23114;23107:11;23016:2;23146:416;;;23380:24;;23368:2;23364:13;;;23361:1;23357:21;23353:52;;;;23422:20;;23476:21;;;23530:18;;;23224:338::o;:::-;23639:16;23697:4;23749:18;23764:2;23761:1;23758;23749:18;:::i;:::-;23741:26;;;;23799:18;23814:2;23811:1;23808;23799:18;:::i;:::-;23791:26;;;;23853:17;23868:1;23865;23862;23853:17;:::i;:::-;23845:25;;;;23910:17;23925:1;23922;23919;23910:17;:::i;:::-;23902:25;;;;23955:17;23970:1;23967;23964;23955:17;:::i;:::-;23947:25;;;;24004:17;24019:1;24016;24013;24004:17;:::i;:::-;23996:25;;;;24049:17;24064:1;24061;24058;24049:17;:::i;:::-;24041:25;;;;24094:17;24109:1;24106;24103;24094:17;:::i;:::-;24086:25;;;;24141:17;24156:1;24153;24150;24141:17;:::i;:::-;24133:25;;;;24192:17;24207:1;24204;24201;24192:17;:::i;:::-;24184:25;;;;24241:17;24256:1;24253;24250;24241:17;:::i;:::-;24350:2;24343:10;;24333:21;;;;24233:25;;-1:-1:-1;24343:10:0;-1:-1:-1;24438:1:0;24423:105;24448:2;24445:1;24442:9;24423:105;;;24497:17;24512:1;24509;24506;24497:17;:::i;:::-;24489:25;;-1:-1:-1;24489:25:0;-1:-1:-1;24466:1:0;24459:9;24423:105;;;24427:14;;;24594:5;:12;;;24590:63;;;24629:13;:11;:13::i;:::-;24622:20;;;;;24590:63;24663:10;;;:15;;24677:1;24663:15;;;;;24740:8;;;;-1:-1:-1;;24732:20:0;;-1:-1:-1;24732:7:0;:20::i;:::-;24718:34;-1:-1:-1;24778:10:0;24786:2;24778:10;;;;24847:1;24837:11;;;:26;;;24852:6;:11;;24862:1;24852:11;24837:26;24833:332;;;25090:64;25101:6;:11;;25111:1;25101:11;:20;;25119:2;25101:20;;;25115:1;25101:20;25090:64;;25152:1;25123:25;25126:4;25133:10;25126:17;25145:2;25123;:25::i;:::-;:30;;;;25090:10;:64::i;:::-;25083:71;;;;;;;24833:332;25390:15;;;;25201:9;;;;25330:4;25324:2;25316:10;;;25315:19;;;25390:15;25415:2;25407:10;;;25406:19;25390:36;;;;;;;;;;;;-1:-1:-1;25451:5:0;25471:11;;;;;:29;;;25486:6;:14;;25496:4;25486:14;25471:29;25467:756;;;25555:5;:15;;;25571:5;25555:22;;;;;;;;;;;;;;-1:-1:-1;;25614:4:0;25608:2;25600:10;;;25599:19;25467:756;;;25648:4;25639:6;:13;;;25635:588;;;25757:6;:13;;25767:3;25757:13;:30;;;;25774:6;:13;;25784:3;25774:13;25757:30;:47;;;;25791:6;:13;;25801:3;25791:13;25757:47;25753:229;;;25859:4;25866:6;25859:13;25854:18;;25753:229;;;25946:21;25949:4;25956:6;25949:13;25964:2;25946;:21::i;:::-;25941:26;;25753:229;25635:588;;;26012:4;26002:6;:14;;;;:32;;;;26020:6;:14;;26030:4;26020:14;26002:32;:50;;;;26038:6;:14;;26048:4;26038:14;26002:50;25998:225;;;26114:5;:15;;;26130:5;26114:22;;;;;;;;;;;;;26109:27;;26207:5;26199:13;;25998:225;26248:1;26238:6;:11;;;;:25;;;;;26262:1;26253:6;:10;;;26238:25;26237:42;;;;26268:6;:11;;26278:1;26268:11;26237:42;26233:117;;;26302:37;26315:6;26323:4;26329:5;26336:2;26302:12;:37::i;:::-;26295:44;;;;;;;;;;;26233:117;26379:13;26360:16;26515:4;26505:14;;;;26501:400;;26576:19;26579:4;26584:6;26579:11;26592:2;26576;:19::i;:::-;26570:25;;;;26628:10;26623:15;;26658:16;26623:15;26672:1;26658:7;:16::i;:::-;26652:22;;26702:4;26692:6;:14;;;;:32;;;;;26710:6;:14;;26720:4;26710:14;;26692:32;26688:203;;;26781:4;26769:16;;26875:1;26867:9;;26688:203;26501:400;;26926:10;26939:26;26947:4;26953:2;26957;26961:3;26939:7;:26::i;:::-;26968:10;26939:39;;;;-1:-1:-1;27060:4:0;27053:11;;;27088;;;:24;;;;;27111:1;27103:4;:9;;;;27088:24;:39;;;;;27123:4;27116;:11;;;27088:39;27084:711;;;27147:4;:9;;27155:1;27147:9;:22;;;;27160:4;:9;;27168:1;27160:9;27147:22;27143:116;;;27207:37;27218:4;:9;;27226:1;27218:9;:21;;27234:5;27218:21;;;27230:1;27218:21;27241:2;27207:10;:37::i;:::-;27200:44;;;;;;;;;;;;;;;27143:116;27277:4;:11;;27285:3;27277:11;27273:93;;;27323:28;27332:5;27339:2;27343:7;;;;27323:8;:28::i;27273:93::-;27383:4;:11;;27391:3;27383:11;27379:93;;;27429:28;27438:5;27445:2;27449:7;;;;;27429:8;:28::i;27379:93::-;27534:4;:11;;27542:3;27534:11;27530:72;;;27572:15;:13;:15::i;27530:72::-;27693:4;27685;:12;;;;:27;;;;;27708:4;27701;:11;;;27685:27;27681:104;;;27739:31;27750:4;27756:2;27760;27764:5;27739:10;:31::i;27681:104::-;27847:6;:14;;27857:4;27847:14;:28;;;;-1:-1:-1;27865:10:0;;;;;27847:28;27843:85;;;27916:1;27891:5;:15;;;27907:5;27891:22;;;;;;;;;:26;;;;:22;;;;;;:26;27843:85;27966:9;:26;;27979:13;27966:26;27962:84;;28008:27;28017:9;28028:1;28031:3;28008:8;:27::i;:::-;28119:26;28128:5;28135:3;28140:4;28119:8;:26::i;:::-;28112:33;;;;;;;;;;;;;22431:5721;;;;;;;:::o;2605:1791::-;2646:12;2791:206;;;2891:2;2887:13;;;2877:24;;2871:31;2860:43;;2931:13;;2970;;;2842:155::o;:::-;3068:4;3152;3146:11;3180:5;3252:21;3270:2;3266;3260:4;3252:21;:::i;:::-;3240:33;;;;3310:21;3328:2;3324;3318:4;3310:21;:::i;:::-;3298:33;;;;3372:20;3390:1;3386:2;3380:4;3372:20;:::i;:::-;3360:32;;;;3437:20;3455:1;3451:2;3445:4;3437:20;:::i;:::-;3425:32;;;;3490:20;3508:1;3504:2;3498:4;3490:20;:::i;:::-;3478:32;;;;3547:20;3565:1;3561:2;3555:4;3547:20;:::i;:::-;3535:32;;;;3600:20;3618:1;3614:2;3608:4;3600:20;:::i;:::-;3588:32;;;;3653:20;3671:1;3667:2;3661:4;3653:20;:::i;:::-;3641:32;;;;3708:20;3726:1;3722:2;3716:4;3708:20;:::i;:::-;3696:32;;;;3767:20;3785:1;3781:2;3775:4;3767:20;:::i;:::-;3755:32;;;;3824:20;3842:1;3838:2;3832:4;3824:20;:::i;:::-;3885:2;3875:13;;;;-1:-1:-1;3812:32:0;-1:-1:-1;3983:1:0;3968:112;3993:2;3990:1;3987:9;3968:112;;;4046:20;4064:1;4060:2;4054:4;4046:20;:::i;:::-;4034:32;;-1:-1:-1;4034:32:0;-1:-1:-1;4011:1:0;4004:9;3968:112;;;3972:14;4143:1;4139:2;4132:13;4238:5;4234:2;4230:14;4223:5;4218:27;4344:14;;;4327:32;;;-1:-1:-1;;2605:1791:0;;:::o;18646:1741::-;18719:11;18802:14;18819:24;18831:11;18819;:24::i;:::-;18802:41;;18939:1;18932:5;18928:13;18925:2;;;18970:1;18967;18960:12;18925:2;19103;19091:15;;;19048:20;19201:141;;;;19248:12;;;19284:2;19277:13;;;;19325:2;19312:16;;;19230:112::o;:::-;19497:5;19494:1;19490:13;19528:4;19560:1;19545:375;19570:2;19567:1;19564:9;19545:375;;;19685:2;19673:15;;;19626:20;19716:12;;;19730:1;19712:20;19749:78;;;;19833:1;19828:78;;;;19705:201;;19749:78;19786:23;19801:7;19795:4;19786:23;:::i;:::-;19778:31;;19749:78;;19828;19865:23;19883:4;19874:7;19865:23;:::i;:::-;19857:31;;19705:201;-1:-1:-1;;19588:1:0;19581:9;19545:375;;;19549:14;20022:4;20016:11;20001:26;;20100:7;20094:4;20091:17;20081:2;;20138:10;20135:1;20128:21;20176:2;20173:1;20166:13;20081:2;-1:-1:-1;;20312:2:0;20301:14;;;;20289:10;20285:31;20282:1;20278:39;20342:16;;;;20360:10;20338:33;;18863:1518;-1:-1:-1;;;18863:1518:0:o;2209:288::-;2270:6;2305:18;;;;2314:8;;;;2305:18;;;;;;2304:25;;;;;2321:1;2364:2;:9;;;2358:16;;;;;2357:22;;2356:32;;;;;;;2414:9;;2413:15;2304:25;2467:21;;2487:1;2467:21;;;2478:6;2467:21;2452:11;;;;;:37;;-1:-1:-1;;;2209:288:0;;;;:::o;16135:624::-;16204:12;16263:18;;:::i;:::-;-1:-1:-1;16418:8:0;;;16447:12;;;16436:23;;;;;;;16469:20;;;;;16323:4;;16593:13;;;16589:82;;16650:6;16659:1;16650:10;16622:5;:15;;;16638:8;16622:25;;;;;;;;;:38;;;;:25;;;;;;:38;16589:82;16739:13;:11;:13::i;:::-;16732:20;16135:624;-1:-1:-1;;;;;16135:624:0:o;11567:1713::-;11664:12;11722:18;;:::i;:::-;-1:-1:-1;11782:4:0;11806:17;11905:1;11894:12;;;;;:28;;;11910:7;:12;;11921:1;11910:12;11894:28;11890:859;;;11938:9;11950:5;:15;;;11966:6;11950:23;;;;;;;;;;;;;11938:35;;12010:2;12003:9;;:3;:9;;;:25;;;;;12016:7;:12;;12027:1;12016:12;12003:25;12002:58;;;;12041:2;12034:9;;:3;:9;;;;:25;;;;;12047:7;:12;;12058:1;12047:12;12034:25;11987:73;;11890:859;;;;12160:7;:12;;12171:1;12160:12;12156:593;;;12217:1;12209:3;12203:15;;;;12188:30;;12156:593;;;12309:7;:12;;12320:1;12309:12;12305:444;;;12365:1;12358:3;12352:14;;;12337:29;;12305:444;;;12474:7;:12;;12485:1;12474:12;12470:279;;;12554:4;12548:2;12539:11;;;12538:20;12577:8;12573:76;;12633:1;12626:3;12620:14;;;12605:29;;12573:76;12666:3;:8;;12673:1;12666:8;12662:77;;;12723:1;12715:3;12709:15;;;;12694:30;;12662:77;12470:279;;12817:8;;;;;12887:12;;;;12876:23;;;;;13031:162;;;;13118:1;13092:22;13095:5;13103:6;13095:14;13111:2;13092;:22::i;:::-;:27;;;;;;;13078:42;;13087:1;13078:42;13063:57;:12;;;:57;13031:162;;;13166:12;;;;;13181:1;13166:16;13151:31;;;;13031:162;13260:13;:11;:13::i;:::-;13253:20;11567:1713;-1:-1:-1;;;;;;;;11567:1713:0:o;28198:6520::-;28285:6;28319:10;28327:2;28319:10;;;;;;28366:11;;28470:4;28461:13;;28457:6215;;;28589:1;28579:6;:11;;;;:27;;;;;28603:3;28594:6;:12;;;28579:27;28575:532;;;28630:6;:11;;28640:1;28630:11;28626:431;;;-1:-1:-1;28652:4:0;28626:431;;;28700:6;:11;;28710:1;28700:11;28696:361;;;-1:-1:-1;28722:4:0;28696:361;;;28766:6;:13;;28776:3;28766:13;28762:295;;;-1:-1:-1;28790:4:0;28762:295;;;28831:6;:13;;28841:3;28831:13;28827:230;;;-1:-1:-1;28855:4:0;28827:230;;;28897:6;:13;;28907:3;28897:13;28893:164;;;-1:-1:-1;28921:4:0;28893:164;;;28962:6;:13;;28972:3;28962:13;28958:99;;;-1:-1:-1;28986:4:0;28958:99;;;29026:6;:13;;29036:3;29026:13;29022:35;;;-1:-1:-1;29050:4:0;29022:35;29091:1;29082:10;;28575:532;29160:11;;;29156:3190;;29220:4;29215:1;29207:9;;;29206:18;29253:4;29207:9;29246:11;;;29242:1203;;;29337:4;29329;:12;;;29325:1102;;29376:2;29369:9;;;;;;;29325:1102;29478:12;;;29474:953;;29525:11;;;;;;;;-1:-1:-1;29518:18:0;;-1:-1:-1;;29518:18:0;29474:953;29637:4;:12;;29645:4;29637:12;29633:794;;;29684:11;;;;;;;;-1:-1:-1;29677:18:0;;-1:-1:-1;;29677:18:0;29633:794;29799:4;:12;;29807:4;29799:12;29795:632;;;29846:27;29855:5;29849:11;;:2;:11;;;;29867:5;29862:2;:10;29846:2;:27::i;29795:632::-;29983:4;:12;;29991:4;29983:12;29979:448;;;-1:-1:-1;;;;30030:17:0;;;30042:4;30037:9;;30030:17;30023:24;;29979:448;30158:4;:12;;30166:4;30158:12;30154:273;;;-1:-1:-1;;;;30205:17:0;;;30217:4;30212:9;;30205:17;30198:24;;30154:273;30336:4;:12;;30344:4;30336:12;30332:95;;;30383:21;30392:2;30386:8;;:2;:8;;;;30401:2;30396;:7;30383:2;:21::i;30332:95::-;30589:4;:12;;30597:4;30589:12;:28;;;;30605:4;:12;;30613:4;30605:12;30589:28;30585:1025;;;30653:2;30648;:7;30641:14;;;;;;;30585:1025;30731:4;:12;;30739:4;30731:12;:28;;;;30747:4;:12;;30755:4;30747:12;30731:28;30727:883;;;30795:2;30790;:7;30783:14;;;;;;;30727:883;30865:4;:12;;30873:4;30865:12;30861:749;;;30913:2;30908;:7;30901:14;;;;;;;30861:749;30982:4;:12;;30990:4;30982:12;30978:632;;;31031:2;31026;:7;31018:16;;;;;;;30978:632;31102:4;:12;;31110:4;31102:12;31098:512;;;31151:2;31146;:7;31138:16;;;;;;;31098:512;31222:4;:12;;31230:4;31222:12;31218:392;;;-1:-1:-1;;;;31267:7:0;;;31265:10;31258:17;;31218:392;31366:4;:12;;31374:4;31366:12;31362:248;;;31425:2;31407:21;;31413:2;31407:21;;;:29;;31435:1;31407:29;;;31431:1;31407:29;31400:36;;;;;;;;;31362:248;31537:4;:12;;31545:4;31537:12;31533:77;;;31581:2;31578:5;;:2;:5;;;:13;;31590:1;31578:13;;31533:77;29156:3190;;;;31687:6;:13;;31697:3;31687:13;31683:663;;;31733:2;31727;:8;;;;31720:15;;;;;;31683:663;31796:6;:14;;31806:4;31796:14;31792:554;;;31857:4;:9;;31865:1;31857:9;31853:92;;;-1:-1:-1;;;31904:21:0;;;31890:36;;31853:92;31989:4;:12;;31997:4;31989:12;:28;;;;32005:4;:12;;32013:4;32005:12;31989:28;31985:347;;;32045:4;:12;;32053:4;32045:12;32041:75;;;32090:3;;;32041:75;32137:8;32171:113;32181:10;32178:13;;:18;32171:113;;32253:8;32224:3;32253:8;;;;;32224:3;32171:113;;;32312:1;-1:-1:-1;32305:8:0;;-1:-1:-1;;32305:8:0;31985:347;28457:6215;;;32383:4;32374:6;:13;;;32370:2302;;;32425:6;:14;;32435:4;32425:14;32421:1088;;;32466:42;32484:2;32489:1;32484:6;32494:1;32483:12;32478:2;:17;32470:26;;:3;:26;;;;32500:4;32469:35;32506:1;32466:2;:42::i;:::-;32459:49;;;;;;32421:1088;32563:6;:14;;32573:4;32563:14;32559:950;;;32604:45;32622:2;32627:1;32622:6;32632:1;32621:12;32616:2;:17;32608:26;;:3;:26;;;;32638:6;32607:37;32646:2;32604;:45::i;32559:950::-;32705:6;:14;;32715:4;32705:14;32701:808;;;-1:-1:-1;;;32752:21:0;32771:1;32766;32761:6;;32760:12;32752:21;;32805:36;;;32872:5;32867:10;;32752:21;;;;;32866:18;32859:25;;32701:808;32939:6;:14;;32949:4;32939:14;32935:574;;;32980:3;32973:10;;;;;;32935:574;33039:6;:14;;33049:4;33039:14;33035:474;;;33095:2;33100:1;33095:6;33105:1;33094:12;33089:2;:17;33081:26;;:3;:26;;;;33111:4;33080:35;33073:42;;;;;;33035:474;33171:6;:14;;33181:4;33171:14;33167:342;;;33227:2;33232:1;33227:6;33237:1;33226:12;33221:2;:17;33213:26;;:3;:26;;;;33243:6;33212:37;33205:44;;;;;;33167:342;33305:6;:14;;33315:4;33305:14;33301:208;;;-1:-1:-1;;;33352:26:0;33376:1;33371;33366:6;;33365:12;33360:2;:17;33352:26;;33410:41;;;33482:5;33477:10;;33352:26;;;;;33476:18;33469:25;;32370:2302;33551:6;:14;;33561:4;33551:14;33547:1125;;;-1:-1:-1;;;33600:4:0;33594:34;33626:1;33621;33616:6;;33615:12;33610:2;:17;33594:34;;33676:27;;;33656:48;;;33726:10;;33595:9;;;33594:34;;33725:18;33718:25;;33547:1125;33786:6;:14;;33796:4;33786:14;33782:890;;;-1:-1:-1;;;33835:6:0;33829:36;33863:1;33858;33853:6;;33852:12;33847:2;:17;33829:36;;33913:29;;;33893:50;;;33965:10;;33830:11;;;33829:36;;33964:18;33957:25;;33782:890;34026:6;:14;;34036:4;34026:14;34022:650;;;-1:-1:-1;;;34069:20:0;34087:1;34082;34077:6;;34076:12;34069:20;;34117:36;;;34181:5;34175:11;;34069:20;;;;;34174:19;34167:26;;34022:650;34236:6;:14;;34246:4;34236:14;34232:440;;;34273:2;34266:9;;;;;;34232:440;34319:6;:14;;34329:4;34319:14;34315:357;;;-1:-1:-1;;;34362:25:0;34385:1;34380;34375:6;;34374:12;34369:2;:17;34362:25;;34415:41;;;34484:5;34478:11;;34362:25;;;;;34477:19;34470:26;;34315:357;34539:6;:14;;34549:4;34539:14;34535:137;;;34576:3;34569:10;;;;;;34535:137;34622:6;:14;;34632:4;34622:14;34618:54;;;34659:2;34652:9;;;;;;34618:54;34682:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17040:688;17126:12;17185:18;;:::i;:::-;-1:-1:-1;17245:4:0;17340:2;17328:14;;;;17320:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17449:14;;;;;;;:30;;;17467:12;17449:30;17445:94;;;17524:4;17495:5;:15;;;17511:9;17495:26;;;;;;;;;:33;;;;:26;;;;;;:33;17445:94;17586:12;;;;;17575:23;;;;:8;;;:23;17638:1;17623:16;;;17608:31;;;17708:13;:11;:13::i;4437:6744::-;4480:12;4538:18;;:::i;:::-;-1:-1:-1;4696:15:0;;:18;;;;4598:4;4840:18;;;;4880;;;;4920;;;;;4598:4;;4676:17;;;;4840:18;4880;5002;;;5016:4;5002:18;4998:5911;;;5048:2;5071:4;5068:7;;:12;5064:112;;5156:4;5153:7;;5145:4;:16;5139:22;5064:112;5193:7;;;5189:141;;5225:10;;;;;5253:16;;;;;;;;5225:10;-1:-1:-1;5189:141:0;;;5313:2;5308:7;;5189:141;4998:5911;;;;5434:10;:18;;5448:4;5434:18;5430:5479;;;1690:10;5468:14;;5430:5479;;;5554:10;:18;;5568:4;5554:18;5550:5359;;;5593:1;5588:6;;5550:5359;;;5706:10;:18;;5720:4;5706:18;5702:5207;;;5755:4;5740:12;;;:19;5773:26;;;:14;;;:26;5820:13;:11;:13::i;:::-;5813:20;;;;;;;;;;;5702:5207;5947:10;:18;;5961:4;5947:18;5943:4966;;;6086:14;;;6082:2210;;;;;6240:22;;;1923:1;6240:22;6236:2056;;;6357:10;6370:27;6378:2;6383:10;6378:15;6395:1;6370:7;:27::i;:::-;6456:11;6487:6;;6507:17;;;;6526:20;;;;;6487:60;;;;;;;;;;;;;;;;;;;;6357:40;;-1:-1:-1;6456:11:0;;;;6487:6;;;;;:19;;:60;;;;;;;;;;;:6;:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6487:60:0;;;;;;;;;-1:-1:-1;6487:60:0;-1:-1:-1;6758:1:0;6750:10;;6848:1;6844:17;;;6919;;;6916:2;;;6949:5;6939:15;;6916:2;;7028:6;7024:2;7021:14;7018:2;;;7048;7038:12;;7018:2;7150:3;7145:1;7137:6;7133:14;7128:3;7124:24;7120:34;7113:41;;7246:3;7242:1;7230:9;7221:6;7218:1;7214:14;7210:30;7206:38;7202:48;7195:55;;7366:1;7362;7358;7346:9;7343:1;7339:17;7335:25;7331:33;7327:41;7489:1;7485;7481;7472:6;7460:9;7457:1;7453:17;7449:30;7445:38;7441:46;7437:54;7419:72;;7585:10;7581:15;7575:4;7571:26;7563:34;;7697:3;7689:4;7685:9;7680:3;7676:19;7673:28;7666:35;;;;7831:33;7840:2;7845:10;7840:15;7857:1;7860:3;7831:8;:33::i;:::-;7882:20;;;:38;;;;;;;;;-1:-1:-1;6236:2056:0;;-1:-1:-1;;6236:2056:0;;8023:18;;;1842:1;8023:18;8019:273;;;8181:2;8176:7;;8019:273;;;8239:10;8234:15;;1998:3;8267:10;;8019:273;5943:4966;;;8409:10;:18;;8423:4;8409:18;8405:2504;;;8551:15;;;1769:1;8551:15;;:34;;-1:-1:-1;8570:15:0;;;1804:1;8570:15;8551:34;:57;;;-1:-1:-1;8589:19:0;;;1881:1;8589:19;8551:57;8547:1505;;;8633:2;8628:7;;8547:1505;;;8747:23;;;1966:1;8747:23;8743:1309;;;8790:10;8803:27;8811:2;8816:10;8811:15;8828:1;8803:7;:27::i;:::-;8902:17;;;;8790:40;;-1:-1:-1;9129:1:0;9121:10;;9219:1;9215:17;9290:13;;;9287:2;;;9312:5;9306:11;;9287:2;9586:14;;;9400:1;9582:22;;;9578:32;;;;9479:26;9503:1;9392:10;;;9483:18;;;9479:26;9574:43;9388:20;;9678:12;9794:17;;;:23;9858:1;9835:20;;;:24;9396:2;-1:-1:-1;9396:2:0;8743:1309;;8405:2504;10238:10;:18;;10252:4;10238:18;10234:675;;;10324:2;:7;;10330:1;10324:7;10320:579;;;10393:14;;;;;:40;;-1:-1:-1;10411:22:0;;;1923:1;10411:22;10393:40;:62;;;-1:-1:-1;10437:18:0;;;1842:1;10437:18;10393:62;10389:376;;;10484:1;10479:6;;10389:376;;;10526:15;;;1769:1;10526:15;;:34;;-1:-1:-1;10545:15:0;;;1804:1;10545:15;10526:34;:61;;;-1:-1:-1;10564:23:0;;;1966:1;10564:23;10526:61;:84;;;-1:-1:-1;10591:19:0;;;1881:1;10591:19;10526:84;10522:243;;;10639:1;10634:6;;10522:243;;10320:579;10808:10;10803:15;;2032:4;10836:11;;10320:579;10976:15;;;;;:23;;;;:18;;;;:23;;;;11009:15;;:23;;;:18;;;;:23;-1:-1:-1;11090:12:0;;;;11079:23;;;:8;;;:23;11142:1;11127:16;11112:31;;;;;11161:13;:11;:13::i;:::-;11154:20;;4437:6744;;;;;;;;:::o;13621:2222::-;13715:12;13773:18;;:::i;:::-;-1:-1:-1;13833:4:0;13857:10;13966:4;13957:13;;;;13953:1545;;;-1:-1:-1;13992:8:0;;;;13953:1545;;;14099:5;:13;;14108:4;14099:13;14095:1403;;;14128:14;;;:8;;;:14;14095:1403;;;14246:5;:13;;14255:4;14246:13;14242:1256;;;-1:-1:-1;14281:8:0;;;;14242:1256;;;14388:5;:13;;14397:4;14388:13;14384:1114;;;14417:14;;;:8;;;:14;14384:1114;;;14546:5;:13;;14555:4;14546:13;14542:956;;;14665:9;14615:17;14595;;;14615;;;;14595:37;14672:2;14665:9;;;;;14647:8;;;:28;14689:22;:8;;;:22;14542:956;;;14836:5;:13;;14845:4;14836:13;14832:666;;;14899:11;14885;;;14899;;;14885:25;14950:2;14943:9;;;;;14925:8;;;:28;14967:22;:8;;;:22;14832:666;;;15128:5;:13;;15137:4;15128:13;15124:374;;;15194:3;15175:23;;15181:3;15175:23;;;;;;;;15157:42;;:8;;;:42;15231:23;;;;;;;;;;;;;;15213:42;;:8;;;:42;15124:374;;;15404:5;:13;;15413:4;15404:13;15400:98;;;15450:3;15444:9;;:3;:9;;;;;;;;15433:20;;;;:8;;;:20;15478:9;;;;;;;;;;;;15467:20;;:8;;;:20;15400:98;15583:14;;;;15579:77;;15642:3;15613:5;:15;;;15629:9;15613:26;;;;;;;;;:32;;;;:26;;;;;;:32;15579:77;15702:12;;;;;15691:23;;;;:8;;;:23;15754:1;15739:16;;;15724:31;;;15823:13;:11;:13::i;:::-;15816:20;13621:2222;-1:-1:-1;;;;;;;13621:2222:0:o;20723:1584::-;20871:14;20888:24;20900:11;20888;:24::i;:::-;20871:41;;21008:1;21001:5;20997:13;20994:2;;;21039:1;21036;21029:12;20994:2;21178;21360:15;;;21197:2;21186:14;;21174:10;21170:31;21167:1;21163:39;21320:16;;;21117:20;;21305:10;21294:22;;;21290:27;21280:38;21277:60;21766:5;21763:1;21759:13;21829:1;21814:375;21839:2;21836:1;21833:9;21814:375;;;21954:2;21942:15;;;21895:20;21985:12;;;21999:1;21981:20;22018:78;;;;22102:1;22097:78;;;;21974:201;;22018:78;22055:23;22070:7;22064:4;22055:23;:::i;:::-;22047:31;;22018:78;;22097;22134:23;22152:4;22143:7;22134:23;:::i;:::-;22126:31;;21974:201;-1:-1:-1;;21857:1:0;21850:9;21814:375;;;-1:-1:-1;;22280:4:0;22273:18;-1:-1:-1;;;;20932:1369:0:o;17932:500::-;18222:20;;;18246:7;18222:32;18215:3;:40;;;18304:14;;18343:17;;18337:24;;;18329:72;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18411:14;17932:500;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o"
var MIPSDeployedSourceMap = "1131:36958:105:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1711:45;;1746:10;1711:45;;;;;188:10:253;176:23;;;158:42;;146:2;131:18;1711:45:105;;;;;;;;2137:29;;;;;;;;;;;;412:42:253;400:55;;;382:74;;370:2;355:18;2137:29:105;211:251:253;24476:6295:105;;;;;;:::i;:::-;;:::i;:::-;;;1687:25:253;;;1675:2;1660:18;24476:6295:105;1541:177:253;24476:6295:105;24554:7;24597:18;;:::i;:::-;24744:4;24737:5;24734:15;24724:113;;24817:1;24815;24808:11;24724:113;24873:4;24867:11;24880;24864:28;24854:116;;24950:1;24948;24941:11;24854:116;25018:3;25000:16;24997:25;24987:129;;25096:1;25094;25087:11;24987:129;25160:3;25146:12;25143:21;25133:124;;25237:1;25235;25228:11;25133:124;25517:24;;25862:4;25563:20;25933:2;25621:21;;25517:24;25679:18;25563:20;25621:21;;;25517:24;25494:21;25490:52;;;25679:18;25563:20;;;25621:21;;;25517:24;25490:52;;25563:20;;25621:21;;;25517:24;25490:52;;25679:18;25563:20;25621:21;;;25517:24;25490:52;;25679:18;25563:20;25621:21;;;25517:24;25490:52;;25679:18;25563:20;25621:21;;;25517:24;25490:52;;;25679:18;25563:20;25621:21;;;25517:24;25494:21;25490:52;;;25679:18;25563:20;25621:21;;;25517:24;25490:52;;25679:18;25563:20;25621:21;;;25517:24;25490:52;;25679:18;25563:20;26560:10;25679:18;26550:21;;;25621;;;;26663:1;26648:113;26673:2;26670:1;26667:9;26648:113;;;25517:24;;25494:21;25490:52;25563:20;;26741:1;25621:21;;;;25505:2;25679:18;;;;26691:1;26684:9;26648:113;;;26652:14;;;26839:5;:12;;;26835:71;;;26878:13;:11;:13::i;:::-;26871:20;;;;;26835:71;26920:10;;;:15;;26934:1;26920:15;;;;;27005:8;;;;-1:-1:-1;;26997:20:105;;-1:-1:-1;26997:7:105;:20::i;:::-;26983:34;-1:-1:-1;27047:10:105;27055:2;27047:10;;;;27124:1;27114:11;;;:26;;;27129:6;:11;;27139:1;27129:11;27114:26;27110:348;;;27379:64;27390:6;:11;;27400:1;27390:11;:20;;27408:2;27390:20;;;27404:1;27390:20;27379:64;;27441:1;27412:25;27415:4;27422:10;27415:17;27434:2;27412;:25::i;:::-;:30;;;;27379:10;:64::i;:::-;27372:71;;;;;;;27110:348;27707:15;;;;27502:9;;;;27639:4;27633:2;27625:10;;;27624:19;;;27707:15;27732:2;27724:10;;;27723:19;27707:36;;;;;;;:::i;:::-;;;;;;-1:-1:-1;27772:5:105;27796:11;;;;;:29;;;27811:6;:14;;27821:4;27811:14;27796:29;27792:832;;;27888:5;:15;;;27904:5;27888:22;;;;;;;;;:::i;:::-;;;;;;-1:-1:-1;;27951:4:105;27945:2;27937:10;;;27936:19;27792:832;;;27989:4;27980:6;:13;;;27976:648;;;28110:6;:13;;28120:3;28110:13;:30;;;;28127:6;:13;;28137:3;28127:13;28110:30;:47;;;;28144:6;:13;;28154:3;28144:13;28110:47;28106:253;;;28220:4;28227:6;28220:13;28215:18;;27976:648;;28106:253;28319:21;28322:4;28329:6;28322:13;28337:2;28319;:21::i;:::-;28314:26;;27976:648;;;28393:4;28383:6;:14;;;;:32;;;;28401:6;:14;;28411:4;28401:14;28383:32;:50;;;;28419:6;:14;;28429:4;28419:14;28383:50;28379:245;;;28503:5;:15;;;28519:5;28503:22;;;;;;;;;:::i;:::-;;;;;28498:27;;28604:5;28596:13;;28379:245;28653:1;28643:6;:11;;;;:25;;;;;28667:1;28658:6;:10;;;28643:25;28642:42;;;;28673:6;:11;;28683:1;28673:11;28642:42;28638:125;;;28711:37;28724:6;28732:4;28738:5;28745:2;28711:12;:37::i;:::-;28704:44;;;;;;;;;;;28638:125;28796:13;28777:16;28948:4;28938:14;;;;28934:444;;29017:19;29020:4;29025:6;29020:11;29033:2;29017;:19::i;:::-;29011:25;;;;29073:10;29068:15;;29107:16;29068:15;29121:1;29107:7;:16::i;:::-;29101:22;;29155:4;29145:6;:14;;;;:32;;;;;29163:6;:14;;29173:4;29163:14;;29145:32;29141:223;;;29242:4;29230:16;;29344:1;29336:9;;29141:223;28954:424;28934:444;29411:10;29424:26;29432:4;29438:2;29442;29446:3;29424:7;:26::i;:::-;29453:10;29424:39;;;;-1:-1:-1;29549:4:105;29542:11;;;29581;;;:24;;;;;29604:1;29596:4;:9;;;;29581:24;:39;;;;;29616:4;29609;:11;;;29581:39;29577:787;;;29644:4;:9;;29652:1;29644:9;:22;;;;29657:4;:9;;29665:1;29657:9;29644:22;29640:124;;;29708:37;29719:4;:9;;29727:1;29719:9;:21;;29735:5;29719:21;;;29731:1;29719:21;29742:2;29708:10;:37::i;:::-;29701:44;;;;;;;;;;;;;;;29640:124;29786:4;:11;;29794:3;29786:11;29782:101;;29836:28;29845:5;29852:2;29856:7;;;;29836:8;:28::i;29782:101::-;29904:4;:11;;29912:3;29904:11;29900:101;;29954:28;29963:5;29970:2;29974:7;;;;;29954:8;:28::i;29900:101::-;30071:4;:11;;30079:3;30071:11;30067:80;;30113:15;:13;:15::i;30067:80::-;30250:4;30242;:12;;;;:27;;;;;30265:4;30258;:11;;;30242:27;30238:112;;;30300:31;30311:4;30317:2;30321;30325:5;30300:10;:31::i;30238:112::-;30424:6;:14;;30434:4;30424:14;:28;;;;-1:-1:-1;30442:10:105;;;;;30424:28;30420:93;;;30497:1;30472:5;:15;;;30488:5;30472:22;;;;;;;;;:::i;:::-;:26;;;;:22;;;;;;:26;30420:93;30559:9;:26;;30572:13;30559:26;30555:92;;30605:27;30614:9;30625:1;30628:3;30605:8;:27::i;:::-;30728:26;30737:5;30744:3;30749:4;30728:8;:26::i;:::-;30721:33;;;;;;;;;;;;;24476:6295;;;;;;;:::o;2707:1770::-;3254:4;3248:11;;3170:4;2973:31;2962:43;;3033:13;2973:31;3372:2;3072:13;;2962:43;2979:24;2973:31;3072:13;;;2962:43;;;;2979:24;2973:31;3072:13;;;2962:43;2979:24;2973:31;3072:13;;;2962:43;2979:24;2973:31;3072:13;;;2962:43;2979:24;2973:31;3072:13;;;2962:43;2979:24;2973:31;3072:13;;;2962:43;2979:24;2973:31;3072:13;;;2962:43;2979:24;2973:31;3072:13;;;2962:43;2979:24;2973:31;3072:13;;;2962:43;2748:12;;3977:13;;3072;;;2748:12;4070:112;4095:2;4092:1;4089:9;4070:112;;;2989:13;2979:24;;2973:31;2962:43;;2993:2;3033:13;;;;4166:1;3072:13;;;;4113:1;4106:9;4070:112;;;4074:14;4245:1;4241:2;4234:13;4340:5;4336:2;4332:14;4325:5;4320:27;4446:14;;;4429:32;;;2707:1770;-1:-1:-1;;2707:1770:105:o;20323:1935::-;20396:11;20507:14;20524:24;20536:11;20524;:24::i;:::-;20507:41;;20656:1;20649:5;20645:13;20642:69;;;20691:1;20688;20681:12;20642:69;20840:2;20828:15;;;20781:20;21270:5;21267:1;21263:13;21305:4;21341:1;21326:411;21351:2;21348:1;21345:9;21326:411;;;21474:2;21462:15;;;21411:20;21509:12;;;21523:1;21505:20;21546:86;;;;21638:1;21633:86;;;;21498:221;;21546:86;21004:1;20997:12;;;21037:2;21030:13;;;21082:2;21069:16;;21579:31;;21546:86;;21633;21004:1;20997:12;;;21037:2;21030:13;;;21082:2;21069:16;;21666:31;;21498:221;-1:-1:-1;;21369:1:105;21362:9;21326:411;;;21330:14;21847:4;21841:11;21826:26;;21933:7;21927:4;21924:17;21914:124;;21975:10;21972:1;21965:21;22017:2;22014:1;22007:13;21914:124;-1:-1:-1;;22165:2:105;22154:14;;;;22142:10;22138:31;22135:1;22131:39;22199:16;;;;22217:10;22195:33;;20323:1935;-1:-1:-1;;;20323:1935:105:o;2265:334::-;2326:6;2385:18;;;;2394:8;;;;2385:18;;;;;;2384:25;;;;;2401:1;2448:2;:9;;;2442:16;;;;;2441:22;;2440:32;;;;;;;2502:9;;2501:15;2384:25;2559:21;;2579:1;2559:21;;;2570:6;2559:21;2544:11;;;;;:37;;-1:-1:-1;;;2265:334:105;;;;:::o;17570:714::-;17639:12;17726:18;;:::i;:::-;-1:-1:-1;17901:8:105;;;17934:12;;;17923:23;;;;;;;17960:20;;;;;17794:4;;18092:13;;;18088:90;;18153:6;18162:1;18153:10;18125:5;:15;;;18141:8;18125:25;;;;;;;;;:::i;:::-;:38;;;;:25;;;;;;:38;18088:90;18254:13;:11;:13::i;:::-;18247:20;17570:714;-1:-1:-1;;;;;17570:714:105:o;12542:1915::-;12639:12;12725:18;;:::i;:::-;-1:-1:-1;12793:4:105;12825:17;12932:1;12921:12;;;;;:28;;;12937:7;:12;;12948:1;12937:12;12921:28;12917:947;;;12969:9;12981:5;:15;;;12997:6;12981:23;;;;;;;;;:::i;:::-;;;;;12969:35;;13045:2;13038:9;;:3;:9;;;:25;;;;;13051:7;:12;;13062:1;13051:12;13038:25;13037:58;;;;13076:2;13069:9;;:3;:9;;;;:25;;;;;13082:7;:12;;13093:1;13082:12;13069:25;13022:73;;12951:159;12917:947;;;13207:7;:12;;13218:1;13207:12;13203:661;;13268:1;13260:3;13254:15;;;;13239:30;;13203:661;;;13372:7;:12;;13383:1;13372:12;13368:496;;13432:1;13425:3;13419:14;;;13404:29;;13368:496;;;13553:7;:12;;13564:1;13553:12;13549:315;;13641:4;13635:2;13626:11;;;13625:20;13611:10;13668:8;;;13664:84;;13728:1;13721:3;13715:14;;;13700:29;;13664:84;13769:3;:8;;13776:1;13769:8;13765:85;;13830:1;13822:3;13816:15;;;;13801:30;;13765:85;13567:297;13549:315;13940:8;;;;;14018:12;;;;14007:23;;;;;14174:178;;;;14265:1;14239:22;14242:5;14250:6;14242:14;14258:2;14239;:22::i;:::-;:27;;;;;;;14225:42;;14234:1;14225:42;14210:57;:12;;;:57;14174:178;;;14321:12;;;;;14336:1;14321:16;14306:31;;;;14174:178;14427:13;:11;:13::i;:::-;14420:20;12542:1915;-1:-1:-1;;;;;;;;12542:1915:105:o;30817:7270::-;30904:6;30962:10;30970:2;30962:10;;;;;;31013:11;;31125:4;31116:13;;31112:6915;;;31256:1;31246:6;:11;;;;:27;;;;;31270:3;31261:6;:12;;;31246:27;31242:568;;;31301:6;:11;;31311:1;31301:11;31297:455;;-1:-1:-1;31323:4:105;31297:455;;;31375:6;:11;;31385:1;31375:11;31371:381;;-1:-1:-1;31397:4:105;31371:381;;;31445:6;:13;;31455:3;31445:13;31441:311;;-1:-1:-1;31469:4:105;31441:311;;;31514:6;:13;;31524:3;31514:13;31510:242;;-1:-1:-1;31538:4:105;31510:242;;;31584:6;:13;;31594:3;31584:13;31580:172;;-1:-1:-1;31608:4:105;31580:172;;;31653:6;:13;;31663:3;31653:13;31649:103;;-1:-1:-1;31677:4:105;31649:103;;;31721:6;:13;;31731:3;31721:13;31717:35;;-1:-1:-1;31745:4:105;31717:35;31790:1;31781:10;;31242:568;31871:6;:11;;31881:1;31871:11;31867:3550;;31935:4;31930:1;31922:9;;;31921:18;31972:4;31922:9;31965:11;;;31961:1319;;;32064:4;32056;:12;;;32052:1206;;32107:2;32100:9;;;;;;;32052:1206;32221:4;:12;;32229:4;32221:12;32217:1041;;32272:11;;;;;;;;-1:-1:-1;32265:18:105;;-1:-1:-1;;32265:18:105;32217:1041;32396:4;:12;;32404:4;32396:12;32392:866;;32447:11;;;;;;;;-1:-1:-1;32440:18:105;;-1:-1:-1;;32440:18:105;32392:866;32574:4;:12;;32582:4;32574:12;32570:688;;32625:27;32634:5;32628:11;;:2;:11;;;;32646:5;32641:2;:10;32625:2;:27::i;32570:688::-;32774:4;:12;;32782:4;32774:12;32770:488;;-1:-1:-1;;;;32825:17:105;;;32837:4;32832:9;;32825:17;32818:24;;32770:488;32965:4;:12;;32973:4;32965:12;32961:297;;-1:-1:-1;;;;33016:17:105;;;33028:4;33023:9;;33016:17;33009:24;;32961:297;33159:4;:12;;33167:4;33159:12;33155:103;;33210:21;33219:2;33213:8;;:2;:8;;;;33228:2;33223;:7;33210:2;:21::i;33155:103::-;33440:4;:12;;33448:4;33440:12;:28;;;;33456:4;:12;;33464:4;33456:12;33440:28;33436:1149;;;33508:2;33503;:7;33496:14;;;;;;;33436:1149;33598:4;:12;;33606:4;33598:12;:28;;;;33614:4;:12;;33622:4;33614:12;33598:28;33594:991;;;33666:2;33661;:7;33654:14;;;;;;;33594:991;33748:4;:12;;33756:4;33748:12;33744:841;;33800:2;33795;:7;33788:14;;;;;;;33744:841;33881:4;:12;;33889:4;33881:12;33877:708;;33934:2;33929;:7;33921:16;;;;;;;33877:708;34017:4;:12;;34025:4;34017:12;34013:572;;34070:2;34065;:7;34057:16;;;;;;;34013:572;34153:4;:12;;34161:4;34153:12;34149:436;;-1:-1:-1;;;;34202:7:105;;;34200:10;34193:17;;34149:436;34313:4;:12;;34321:4;34313:12;34309:276;;34378:2;34360:21;;34366:2;34360:21;;;:29;;34388:1;34360:29;;;34384:1;34360:29;34353:36;;;;;;;;;34309:276;34502:4;:12;;34510:4;34502:12;34498:87;;34552:2;34549:5;;:2;:5;;;:13;;34561:1;34549:13;;34498:87;31884:2719;31112:6915;;31867:3550;34674:6;:13;;34684:3;34674:13;34670:747;;34724:2;34718;:8;;;;34711:15;;;;;;34670:747;34799:6;:14;;34809:4;34799:14;34795:622;;34868:4;:9;;34876:1;34868:9;34864:100;;-1:-1:-1;;;34919:21:105;;;34905:36;;34864:100;35016:4;:12;;35024:4;35016:12;:28;;;;35032:4;:12;;35040:4;35032:12;35016:28;35012:387;;;35076:4;:12;;35084:4;35076:12;35072:83;;35125:3;;;35072:83;35180:8;35218:125;35228:10;35225:13;;:18;35218:125;;35308:8;35275:3;35308:8;;;;;35275:3;35218:125;;;35375:1;-1:-1:-1;35368:8:105;;-1:-1:-1;;35368:8:105;35012:387;31112:6915;;;35462:4;35453:6;:13;;;35449:2578;;;35512:6;:14;;35522:4;35512:14;35508:1208;;35557:42;35575:2;35580:1;35575:6;35585:1;35574:12;35569:2;:17;35561:26;;:3;:26;;;;35591:4;35560:35;35597:1;35557:2;:42::i;:::-;35550:49;;;;;;35508:1208;35666:6;:14;;35676:4;35666:14;35662:1054;;35711:45;35729:2;35734:1;35729:6;35739:1;35728:12;35723:2;:17;35715:26;;:3;:26;;;;35745:6;35714:37;35753:2;35711;:45::i;35662:1054::-;35824:6;:14;;35834:4;35824:14;35820:896;;-1:-1:-1;;;35875:21:105;35894:1;35889;35884:6;;35883:12;35875:21;;35932:36;;;36003:5;35998:10;;35875:21;;;;;35997:18;35990:25;;35820:896;36082:6;:14;;36092:4;36082:14;36078:638;;36127:3;36120:10;;;;;;36078:638;36198:6;:14;;36208:4;36198:14;36194:522;;36258:2;36263:1;36258:6;36268:1;36257:12;36252:2;:17;36244:26;;:3;:26;;;;36274:4;36243:35;36236:42;;;;;;36194:522;36346:6;:14;;36356:4;36346:14;36342:374;;36406:2;36411:1;36406:6;36416:1;36405:12;36400:2;:17;36392:26;;:3;:26;;;;36422:6;36391:37;36384:44;;;;;;36342:374;36496:6;:14;;36506:4;36496:14;36492:224;;-1:-1:-1;;;36547:26:105;36571:1;36566;36561:6;;36560:12;36555:2;:17;36547:26;;36609:41;;;36685:5;36680:10;;36547:26;;;;;36679:18;36672:25;;35449:2578;36770:6;:14;;36780:4;36770:14;36766:1261;;-1:-1:-1;;;36823:4:105;36817:34;36849:1;36844;36839:6;;36838:12;36833:2;:17;36817:34;;36903:27;;;36883:48;;;36957:10;;36818:9;;;36817:34;;36956:18;36949:25;;36766:1261;37029:6;:14;;37039:4;37029:14;37025:1002;;-1:-1:-1;;;37082:6:105;37076:36;37110:1;37105;37100:6;;37099:12;37094:2;:17;37076:36;;37164:29;;;37144:50;;;37220:10;;37077:11;;;37076:36;;37219:18;37212:25;;37025:1002;37293:6;:14;;37303:4;37293:14;37289:738;;-1:-1:-1;;;37340:20:105;37358:1;37353;37348:6;;37347:12;37340:20;;37392:36;;;37460:5;37454:11;;37340:20;;;;;37453:19;37446:26;;37289:738;37527:6;:14;;37537:4;37527:14;37523:504;;37568:2;37561:9;;;;;;37523:504;37626:6;:14;;37636:4;37626:14;37622:405;;-1:-1:-1;;;37673:25:105;37696:1;37691;37686:6;;37685:12;37680:2;:17;37673:25;;37730:41;;;37803:5;37797:11;;37673:25;;;;;37796:19;37789:26;;37622:405;37870:6;:14;;37880:4;37870:14;37866:161;;37911:3;37904:10;;;;;;37866:161;37969:6;:14;;37979:4;37969:14;37965:62;;38010:2;38003:9;;;;;;37965:62;38041:29;;;;;2114:2:253;38041:29:105;;;2096:21:253;2153:2;2133:18;;;2126:30;2192:21;2172:18;;;2165:49;2231:18;;38041:29:105;;;;;;;;18565:782;18651:12;18738:18;;:::i;:::-;-1:-1:-1;18806:4:105;18913:2;18901:14;;;;18893:41;;;;;;;2462:2:253;18893:41:105;;;2444:21:253;2501:2;2481:18;;;2474:30;2540:16;2520:18;;;2513:44;2574:18;;18893:41:105;2260:338:253;18893:41:105;19030:14;;;;;;;:30;;;19048:12;19030:30;19026:102;;;19109:4;19080:5;:15;;;19096:9;19080:26;;;;;;;;;:::i;:::-;:33;;;;:26;;;;;;:33;19026:102;19183:12;;;;;19172:23;;;;:8;;;:23;19239:1;19224:16;;;19209:31;;;19317:13;:11;:13::i;4518:7638::-;4561:12;4647:18;;:::i;:::-;-1:-1:-1;4825:15:105;;:18;;;;4715:4;4985:18;;;;5029;;;;5073;;;;;4715:4;;4805:17;;;;4985:18;5029;5163;;;5177:4;5163:18;5159:6687;;5213:2;5240:4;5237:7;;:12;5233:120;;5329:4;5326:7;;5318:4;:16;5312:22;5233:120;5374:2;:7;;5380:1;5374:7;5370:161;;5410:10;;;;;5442:16;;;;;;;;5410:10;-1:-1:-1;5370:161:105;;;5510:2;5505:7;;5370:161;5183:362;5159:6687;;;5647:10;:18;;5661:4;5647:18;5643:6203;;1746:10;5685:14;;5643:6203;;;5783:10;:18;;5797:4;5783:18;5779:6067;;5826:1;5821:6;;5779:6067;;;5951:10;:18;;5965:4;5951:18;5947:5899;;6004:4;5989:12;;;:19;6026:26;;;:14;;;:26;6077:13;:11;:13::i;:::-;6070:20;;;;;;;;;4518:7638;:::o;5947:5899::-;6216:10;:18;;6230:4;6216:18;6212:5634;;6367:14;;;6363:2662;6212:5634;6363:2662;6537:22;;;;;6533:2492;;6662:10;6675:27;6683:2;6688:10;6683:15;6700:1;6675:7;:27::i;:::-;6786:17;;;;6662:40;;-1:-1:-1;6786:17:105;6764:19;6936:14;6955:1;6930:26;6926:131;;6998:36;7022:11;1277:21:106;1426:15;;;1467:8;1461:4;1454:22;1595:4;1582:18;;1602:19;1578:44;1624:11;1575:61;;1222:430;6998:36:105;6984:50;;6926:131;7079:11;7110:6;;7143:20;;;;;7110:54;;;;;;;;2776:25:253;;;2849:10;2837:23;;;2817:18;;;2810:51;7079:11:105;;7110:6;;;:19;;2749:18:253;;7110:54:105;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;7078:86;;;;7391:1;7387:2;7383:10;7488:9;7485:1;7481:17;7570:6;7563:5;7560:17;7557:40;;;7590:5;7580:15;;7557:40;;7673:6;7669:2;7666:14;7663:34;;;7693:2;7683:12;;7663:34;7799:3;7794:1;7786:6;7782:14;7777:3;7773:24;7769:34;7762:41;;7899:3;7895:1;7883:9;7874:6;7871:1;7867:14;7863:30;7859:38;7855:48;7848:55;;8023:1;8019;8015;8003:9;8000:1;7996:17;7992:25;7988:33;7984:41;8150:1;8146;8142;8133:6;8121:9;8118:1;8114:17;8110:30;8106:38;8102:46;8098:54;8080:72;;8250:10;8246:15;8240:4;8236:26;8228:34;;8366:3;8358:4;8354:9;8349:3;8345:19;8342:28;8335:35;;;;8512:33;8521:2;8526:10;8521:15;8538:1;8541:3;8512:8;:33::i;:::-;8567:20;;;:38;;;;;;;;;-1:-1:-1;6533:2492:105;;-1:-1:-1;;;6533:2492:105;;8724:18;;;;;8720:305;;8894:2;8889:7;;6212:5634;;8720:305;8964:10;8959:15;;2054:3;8996:10;;8720:305;6212:5634;;;9154:10;:18;;9168:4;9154:18;9150:2696;;9308:15;;;1825:1;9308:15;;:34;;-1:-1:-1;9327:15:105;;;1860:1;9327:15;9308:34;:57;;;-1:-1:-1;9346:19:105;;;1937:1;9346:19;9308:57;9304:1609;;;9394:2;9389:7;;9150:2696;;9304:1609;9520:23;;;;;9516:1397;;9567:10;9580:27;9588:2;9593:10;9588:15;9605:1;9580:7;:27::i;:::-;9683:17;;;;9567:40;;-1:-1:-1;9926:1:105;9918:10;;10020:1;10016:17;10095:13;;;10092:32;;;10117:5;10111:11;;10092:32;10403:14;;;10209:1;10399:22;;;10395:32;;;;10292:26;10316:1;10201:10;;;10296:18;;;10292:26;10391:43;10197:20;;10499:12;10627:17;;;:23;10695:1;10672:20;;;:24;10205:2;-1:-1:-1;10205:2:105;6212:5634;;9150:2696;11115:10;:18;;11129:4;11115:18;11111:735;;11209:2;:7;;11215:1;11209:7;11205:627;;11282:14;;;;;:40;;-1:-1:-1;11300:22:105;;;1979:1;11300:22;11282:40;:62;;;-1:-1:-1;11326:18:105;;;1898:1;11326:18;11282:62;11278:404;;;11377:1;11372:6;;11205:627;;11278:404;11423:15;;;1825:1;11423:15;;:34;;-1:-1:-1;11442:15:105;;;1860:1;11442:15;11423:34;:61;;;-1:-1:-1;11461:23:105;;;2022:1;11461:23;11423:61;:84;;;-1:-1:-1;11488:19:105;;;1937:1;11488:19;11423:84;11419:263;;;11540:1;11535:6;;6212:5634;;11205:627;11733:10;11728:15;;2088:4;11765:11;;11205:627;11921:15;;;;;:23;;;;:18;;;;:23;;;;11958:15;;:23;;;:18;;;;:23;-1:-1:-1;12047:12:105;;;;12036:23;;;:8;;;:23;12103:1;12088:16;12073:31;;;;;12126:13;:11;:13::i;14798:2480::-;14892:12;14978:18;;:::i;:::-;-1:-1:-1;15046:4:105;15078:10;15186:13;;;15195:4;15186:13;15182:1705;;-1:-1:-1;15225:8:105;;;;15182:1705;;;15344:5;:13;;15353:4;15344:13;15340:1547;;15377:14;;;:8;;;:14;15340:1547;;;15507:5;:13;;15516:4;15507:13;15503:1384;;-1:-1:-1;15546:8:105;;;;15503:1384;;;15665:5;:13;;15674:4;15665:13;15661:1226;;15698:14;;;:8;;;:14;15661:1226;;;15839:5;:13;;15848:4;15839:13;15835:1052;;15966:9;15912:17;15892;;;15912;;;;15892:37;15973:2;15966:9;;;;;15948:8;;;:28;15994:22;:8;;;:22;15835:1052;;;16153:5;:13;;16162:4;16153:13;16149:738;;16220:11;16206;;;16220;;;16206:25;16275:2;16268:9;;;;;16250:8;;;:28;16296:22;:8;;;:22;16149:738;;;16477:5;:13;;16486:4;16477:13;16473:414;;16547:3;16528:23;;16534:3;16528:23;;;;;;;:::i;:::-;;16510:42;;:8;;;:42;16588:23;;;;;;;;;;;;;:::i;:::-;;16570:42;;:8;;;:42;16473:414;;;16781:5;:13;;16790:4;16781:13;16777:110;;16831:3;16825:9;;:3;:9;;;;;;;:::i;:::-;;16814:20;;;;:8;;;:20;16863:9;;;;;;;;;;;:::i;:::-;;16852:20;;:8;;;:20;16777:110;16980:14;;;;16976:85;;17043:3;17014:5;:15;;;17030:9;17014:26;;;;;;;;;:::i;:::-;:32;;;;:26;;;;;;:32;16976:85;17115:12;;;;;17104:23;;;;:8;;;:23;17171:1;17156:16;;;17141:31;;;17248:13;:11;:13::i;:::-;17241:20;14798:2480;-1:-1:-1;;;;;;;14798:2480:105:o;22594:1758::-;22770:14;22787:24;22799:11;22787;:24::i;:::-;22770:41;;22919:1;22912:5;22908:13;22905:69;;;22954:1;22951;22944:12;22905:69;23109:2;23303:15;;;23128:2;23117:14;;23105:10;23101:31;23098:1;23094:39;23259:16;;;23044:20;;23244:10;23233:22;;;23229:27;23219:38;23216:60;23745:5;23742:1;23738:13;23816:1;23801:411;23826:2;23823:1;23820:9;23801:411;;;23949:2;23937:15;;;23886:20;23984:12;;;23998:1;23980:20;24021:86;;;;24113:1;24108:86;;;;23973:221;;24021:86;21004:1;20997:12;;;21037:2;21030:13;;;21082:2;21069:16;;24054:31;;24021:86;;24108;21004:1;20997:12;;;21037:2;21030:13;;;21082:2;21069:16;;24141:31;;23973:221;-1:-1:-1;;23844:1:105;23837:9;23801:411;;;-1:-1:-1;;24311:4:105;24304:18;-1:-1:-1;;;;22594:1758:105:o;19551:558::-;19873:20;;;19897:7;19873:32;19866:3;:40;;;19963:14;;20006:17;;20000:24;;;19992:72;;;;;;;3513:2:253;19992:72:105;;;3495:21:253;3552:2;3532:18;;;3525:30;3591:34;3571:18;;;3564:62;3662:5;3642:18;;;3635:33;3685:19;;19992:72:105;3311:399:253;19992:72:105;20078:14;19551:558;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o;467:347:253:-;518:8;528:6;582:3;575:4;567:6;563:17;559:27;549:55;;600:1;597;590:12;549:55;-1:-1:-1;623:20:253;;666:18;655:30;;652:50;;;698:1;695;688:12;652:50;735:4;727:6;723:17;711:29;;787:3;780:4;771:6;763;759:19;755:30;752:39;749:59;;;804:1;801;794:12;749:59;467:347;;;;;:::o;819:717::-;909:6;917;925;933;986:2;974:9;965:7;961:23;957:32;954:52;;;1002:1;999;992:12;954:52;1042:9;1029:23;1071:18;1112:2;1104:6;1101:14;1098:34;;;1128:1;1125;1118:12;1098:34;1167:58;1217:7;1208:6;1197:9;1193:22;1167:58;:::i;:::-;1244:8;;-1:-1:-1;1141:84:253;-1:-1:-1;1332:2:253;1317:18;;1304:32;;-1:-1:-1;1348:16:253;;;1345:36;;;1377:1;1374;1367:12;1345:36;;1416:60;1468:7;1457:8;1446:9;1442:24;1416:60;:::i;:::-;819:717;;;;-1:-1:-1;1495:8:253;-1:-1:-1;;;;819:717:253:o;1723:184::-;1775:77;1772:1;1765:88;1872:4;1869:1;1862:15;1896:4;1893:1;1886:15;2872:245;2951:6;2959;3012:2;3000:9;2991:7;2987:23;2983:32;2980:52;;;3028:1;3025;3018:12;2980:52;-1:-1:-1;;3051:16:253;;3107:2;3092:18;;;3086:25;3051:16;;3086:25;;-1:-1:-1;2872:245:253:o;3122:184::-;3174:77;3171:1;3164:88;3271:4;3268:1;3261:15;3295:4;3292:1;3285:15"
func init() {
if err := json.Unmarshal([]byte(MIPSStorageLayoutJSON), MIPSStorageLayout); err != nil {
......
......@@ -30,8 +30,8 @@ var (
// PreimageOracleMetaData contains all meta data concerning the PreimageOracle contract.
var PreimageOracleMetaData = &bind.MetaData{
ABI: "[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"partOffset\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"part\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"cheat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_preimage\",\"type\":\"bytes\"}],\"name\":\"computePreimageKey\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"key_\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_partOffset\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_preimage\",\"type\":\"bytes\"}],\"name\":\"loadKeccak256PreimagePart\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"preimageLengths\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"preimagePartOk\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"preimageParts\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_offset\",\"type\":\"uint256\"}],\"name\":\"readPreimage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"dat_\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"datLen_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x608060405234801561001057600080fd5b506105df806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063e03110e11161005b578063e03110e114610111578063e159261114610139578063fe4ac08e1461014e578063fef2b4ed146101c357600080fd5b806361238bde146100825780638542cf50146100c0578063a57c202c146100fe575b600080fd5b6100ad610090366004610433565b600160209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6100ee6100ce366004610433565b600260209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016100b7565b6100ad61010c36600461049e565b6101e3565b61012461011f366004610433565b610242565b604080519283526020830191909152016100b7565b61014c6101473660046104e0565b610333565b005b61014c61015c36600461052c565b6000838152600260209081526040808320878452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091558684528252808320968352958152858220939093559283529082905291902055565b6100ad6101d136600461055e565b60006020819052908152604090205481565b60243560c081901b608052600090608881858237207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f0200000000000000000000000000000000000000000000000000000000000000179392505050565b6000828152600260209081526040808320848452909152812054819060ff166102cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f7072652d696d616765206d757374206578697374000000000000000000000000604482015260640160405180910390fd5b50600083815260208181526040909120546102e78160086105a6565b6102f28560206105a6565b1061031057836103038260086105a6565b61030d91906105bf565b91505b506000938452600160209081526040808620948652939052919092205492909150565b6044356000806008830186111561034957600080fd5b60c083901b6080526088838682378087017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80151908490207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f02000000000000000000000000000000000000000000000000000000000000001760008181526002602090815260408083208b8452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915584845282528083209a83529981528982209390935590815290819052959095209190915550505050565b6000806040838503121561044657600080fd5b50508035926020909101359150565b60008083601f84011261046757600080fd5b50813567ffffffffffffffff81111561047f57600080fd5b60208301915083602082850101111561049757600080fd5b9250929050565b600080602083850312156104b157600080fd5b823567ffffffffffffffff8111156104c857600080fd5b6104d485828601610455565b90969095509350505050565b6000806000604084860312156104f557600080fd5b83359250602084013567ffffffffffffffff81111561051357600080fd5b61051f86828701610455565b9497909650939450505050565b6000806000806080858703121561054257600080fd5b5050823594602084013594506040840135936060013592509050565b60006020828403121561057057600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156105b9576105b9610577565b92915050565b818103818111156105b9576105b961057756fea164736f6c6343000813000a",
ABI: "[{\"inputs\":[],\"name\":\"PartOffsetOOB\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"partOffset\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"part\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"size\",\"type\":\"uint256\"}],\"name\":\"cheat\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_partOffset\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_preimage\",\"type\":\"bytes\"}],\"name\":\"loadKeccak256PreimagePart\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_ident\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"_word\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_size\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_partOffset\",\"type\":\"uint256\"}],\"name\":\"loadLocalData\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"key_\",\"type\":\"bytes32\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"preimageLengths\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"preimagePartOk\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"preimageParts\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_key\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_offset\",\"type\":\"uint256\"}],\"name\":\"readPreimage\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"dat_\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"datLen_\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
Bin: "0x608060405234801561001057600080fd5b506106a5806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063e03110e11161005b578063e03110e114610111578063e159261114610139578063fe4ac08e1461014e578063fef2b4ed146101c357600080fd5b806361238bde146100825780638542cf50146100c05780639a1f5e7f146100fe575b600080fd5b6100ad610090366004610551565b600160209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6100ee6100ce366004610551565b600260209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016100b7565b6100ad61010c366004610573565b6101e3565b61012461011f366004610551565b6102b6565b604080519283526020830191909152016100b7565b61014c6101473660046105a5565b6103a7565b005b61014c61015c366004610573565b6000838152600260209081526040808320878452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091558684528252808320968352958152858220939093559283529082905291902055565b6100ad6101d1366004610621565b60006020819052908152604090205481565b60006101ee856104b0565b90506101fb836008610669565b8211806102085750602083115b1561023f576040517ffe25498700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000602081815260c085901b82526008959095528251828252600286526040808320858452875280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915584845287528083209483529386528382205581815293849052922055919050565b6000828152600260209081526040808320848452909152812054819060ff1661033f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f7072652d696d616765206d757374206578697374000000000000000000000000604482015260640160405180910390fd5b506000838152602081815260409091205461035b816008610669565b610366856020610669565b106103845783610377826008610669565b6103819190610681565b91505b506000938452600160209081526040808620948652939052919092205492909150565b604435600080600883018611156103c65763fe2549876000526004601cfd5b60c083901b6080526088838682378087017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80151908490207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f02000000000000000000000000000000000000000000000000000000000000001760008181526002602090815260408083208b8452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915584845282528083209a83529981528982209390935590815290819052959095209190915550505050565b7f01000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82161761054b81600090815233602052604090207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790565b92915050565b6000806040838503121561056457600080fd5b50508035926020909101359150565b6000806000806080858703121561058957600080fd5b5050823594602084013594506040840135936060013592509050565b6000806000604084860312156105ba57600080fd5b83359250602084013567ffffffffffffffff808211156105d957600080fd5b818601915086601f8301126105ed57600080fd5b8135818111156105fc57600080fd5b87602082850101111561060e57600080fd5b6020830194508093505050509250925092565b60006020828403121561063357600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561067c5761067c61063a565b500190565b6000828210156106935761069361063a565b50039056fea164736f6c634300080f000a",
}
// PreimageOracleABI is the input ABI used to generate the binding from.
......@@ -201,37 +201,6 @@ func (_PreimageOracle *PreimageOracleTransactorRaw) Transact(opts *bind.Transact
return _PreimageOracle.Contract.contract.Transact(opts, method, params...)
}
// ComputePreimageKey is a free data retrieval call binding the contract method 0xa57c202c.
//
// Solidity: function computePreimageKey(bytes _preimage) pure returns(bytes32 key_)
func (_PreimageOracle *PreimageOracleCaller) ComputePreimageKey(opts *bind.CallOpts, _preimage []byte) ([32]byte, error) {
var out []interface{}
err := _PreimageOracle.contract.Call(opts, &out, "computePreimageKey", _preimage)
if err != nil {
return *new([32]byte), err
}
out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte)
return out0, err
}
// ComputePreimageKey is a free data retrieval call binding the contract method 0xa57c202c.
//
// Solidity: function computePreimageKey(bytes _preimage) pure returns(bytes32 key_)
func (_PreimageOracle *PreimageOracleSession) ComputePreimageKey(_preimage []byte) ([32]byte, error) {
return _PreimageOracle.Contract.ComputePreimageKey(&_PreimageOracle.CallOpts, _preimage)
}
// ComputePreimageKey is a free data retrieval call binding the contract method 0xa57c202c.
//
// Solidity: function computePreimageKey(bytes _preimage) pure returns(bytes32 key_)
func (_PreimageOracle *PreimageOracleCallerSession) ComputePreimageKey(_preimage []byte) ([32]byte, error) {
return _PreimageOracle.Contract.ComputePreimageKey(&_PreimageOracle.CallOpts, _preimage)
}
// PreimageLengths is a free data retrieval call binding the contract method 0xfef2b4ed.
//
// Solidity: function preimageLengths(bytes32 ) view returns(uint256)
......@@ -411,3 +380,24 @@ func (_PreimageOracle *PreimageOracleSession) LoadKeccak256PreimagePart(_partOff
func (_PreimageOracle *PreimageOracleTransactorSession) LoadKeccak256PreimagePart(_partOffset *big.Int, _preimage []byte) (*types.Transaction, error) {
return _PreimageOracle.Contract.LoadKeccak256PreimagePart(&_PreimageOracle.TransactOpts, _partOffset, _preimage)
}
// LoadLocalData is a paid mutator transaction binding the contract method 0x9a1f5e7f.
//
// Solidity: function loadLocalData(uint256 _ident, bytes32 _word, uint256 _size, uint256 _partOffset) returns(bytes32 key_)
func (_PreimageOracle *PreimageOracleTransactor) LoadLocalData(opts *bind.TransactOpts, _ident *big.Int, _word [32]byte, _size *big.Int, _partOffset *big.Int) (*types.Transaction, error) {
return _PreimageOracle.contract.Transact(opts, "loadLocalData", _ident, _word, _size, _partOffset)
}
// LoadLocalData is a paid mutator transaction binding the contract method 0x9a1f5e7f.
//
// Solidity: function loadLocalData(uint256 _ident, bytes32 _word, uint256 _size, uint256 _partOffset) returns(bytes32 key_)
func (_PreimageOracle *PreimageOracleSession) LoadLocalData(_ident *big.Int, _word [32]byte, _size *big.Int, _partOffset *big.Int) (*types.Transaction, error) {
return _PreimageOracle.Contract.LoadLocalData(&_PreimageOracle.TransactOpts, _ident, _word, _size, _partOffset)
}
// LoadLocalData is a paid mutator transaction binding the contract method 0x9a1f5e7f.
//
// Solidity: function loadLocalData(uint256 _ident, bytes32 _word, uint256 _size, uint256 _partOffset) returns(bytes32 key_)
func (_PreimageOracle *PreimageOracleTransactorSession) LoadLocalData(_ident *big.Int, _word [32]byte, _size *big.Int, _partOffset *big.Int) (*types.Transaction, error) {
return _PreimageOracle.Contract.LoadLocalData(&_PreimageOracle.TransactOpts, _ident, _word, _size, _partOffset)
}
......@@ -13,9 +13,9 @@ const PreimageOracleStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contrac
var PreimageOracleStorageLayout = new(solc.StorageLayout)
var PreimageOracleDeployedBin = "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063e03110e11161005b578063e03110e114610111578063e159261114610139578063fe4ac08e1461014e578063fef2b4ed146101c357600080fd5b806361238bde146100825780638542cf50146100c0578063a57c202c146100fe575b600080fd5b6100ad610090366004610433565b600160209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6100ee6100ce366004610433565b600260209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016100b7565b6100ad61010c36600461049e565b6101e3565b61012461011f366004610433565b610242565b604080519283526020830191909152016100b7565b61014c6101473660046104e0565b610333565b005b61014c61015c36600461052c565b6000838152600260209081526040808320878452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091558684528252808320968352958152858220939093559283529082905291902055565b6100ad6101d136600461055e565b60006020819052908152604090205481565b60243560c081901b608052600090608881858237207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f0200000000000000000000000000000000000000000000000000000000000000179392505050565b6000828152600260209081526040808320848452909152812054819060ff166102cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f7072652d696d616765206d757374206578697374000000000000000000000000604482015260640160405180910390fd5b50600083815260208181526040909120546102e78160086105a6565b6102f28560206105a6565b1061031057836103038260086105a6565b61030d91906105bf565b91505b506000938452600160209081526040808620948652939052919092205492909150565b6044356000806008830186111561034957600080fd5b60c083901b6080526088838682378087017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80151908490207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f02000000000000000000000000000000000000000000000000000000000000001760008181526002602090815260408083208b8452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915584845282528083209a83529981528982209390935590815290819052959095209190915550505050565b6000806040838503121561044657600080fd5b50508035926020909101359150565b60008083601f84011261046757600080fd5b50813567ffffffffffffffff81111561047f57600080fd5b60208301915083602082850101111561049757600080fd5b9250929050565b600080602083850312156104b157600080fd5b823567ffffffffffffffff8111156104c857600080fd5b6104d485828601610455565b90969095509350505050565b6000806000604084860312156104f557600080fd5b83359250602084013567ffffffffffffffff81111561051357600080fd5b61051f86828701610455565b9497909650939450505050565b6000806000806080858703121561054257600080fd5b5050823594602084013594506040840135936060013592509050565b60006020828403121561057057600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b808201808211156105b9576105b9610577565b92915050565b818103818111156105b9576105b961057756fea164736f6c6343000813000a"
var PreimageOracleDeployedBin = "0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063e03110e11161005b578063e03110e114610111578063e159261114610139578063fe4ac08e1461014e578063fef2b4ed146101c357600080fd5b806361238bde146100825780638542cf50146100c05780639a1f5e7f146100fe575b600080fd5b6100ad610090366004610551565b600160209081526000928352604080842090915290825290205481565b6040519081526020015b60405180910390f35b6100ee6100ce366004610551565b600260209081526000928352604080842090915290825290205460ff1681565b60405190151581526020016100b7565b6100ad61010c366004610573565b6101e3565b61012461011f366004610551565b6102b6565b604080519283526020830191909152016100b7565b61014c6101473660046105a5565b6103a7565b005b61014c61015c366004610573565b6000838152600260209081526040808320878452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091558684528252808320968352958152858220939093559283529082905291902055565b6100ad6101d1366004610621565b60006020819052908152604090205481565b60006101ee856104b0565b90506101fb836008610669565b8211806102085750602083115b1561023f576040517ffe25498700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000602081815260c085901b82526008959095528251828252600286526040808320858452875280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915584845287528083209483529386528382205581815293849052922055919050565b6000828152600260209081526040808320848452909152812054819060ff1661033f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f7072652d696d616765206d757374206578697374000000000000000000000000604482015260640160405180910390fd5b506000838152602081815260409091205461035b816008610669565b610366856020610669565b106103845783610377826008610669565b6103819190610681565b91505b506000938452600160209081526040808620948652939052919092205492909150565b604435600080600883018611156103c65763fe2549876000526004601cfd5b60c083901b6080526088838682378087017ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff80151908490207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f02000000000000000000000000000000000000000000000000000000000000001760008181526002602090815260408083208b8452825280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600190811790915584845282528083209a83529981528982209390935590815290819052959095209190915550505050565b7f01000000000000000000000000000000000000000000000000000000000000007effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82161761054b81600090815233602052604090207effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01000000000000000000000000000000000000000000000000000000000000001790565b92915050565b6000806040838503121561056457600080fd5b50508035926020909101359150565b6000806000806080858703121561058957600080fd5b5050823594602084013594506040840135936060013592509050565b6000806000604084860312156105ba57600080fd5b83359250602084013567ffffffffffffffff808211156105d957600080fd5b818601915086601f8301126105ed57600080fd5b8135818111156105fc57600080fd5b87602082850101111561060e57600080fd5b6020830194508093505050509250925092565b60006020828403121561063357600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561067c5761067c61063a565b500190565b6000828210156106935761069361063a565b50039056fea164736f6c634300080f000a"
var PreimageOracleDeployedSourceMap = "144:4615:51:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;357:68;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;413:25:88;;;401:2;386:18;357:68:51;;;;;;;;501:66;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;614:14:88;;607:22;589:41;;577:2;562:18;501:66:51;449:187:88;2154:850:51;;;;;;:::i;:::-;;:::i;838:564::-;;;;;;:::i;:::-;;:::i;:::-;;;;1581:25:88;;;1637:2;1622:18;;1615:34;;;;1554:18;838:564:51;1407:248:88;3295:1462:51;;;;;;:::i;:::-;;:::i;:::-;;1744:262;;;;;;:::i;:::-;1877:19;;;;:14;:19;;;;;;;;:31;;;;;;;;:38;;;;1911:4;1877:38;;;;;;1925:18;;;;;;;;:30;;;;;;;;;:37;;;;1972:20;;;;;;;;;;:27;1744:262;238:50;;;;;;:::i;:::-;;;;;;;;;;;;;;;2154:850;2321:4;2308:18;2567:3;2563:14;;;2458:4;2551:27;2231:12;;2598:11;2308:18;2718:16;2598:11;2700:41;2840:20;2954:19;2947:27;2976:11;2944:44;;2154:850;-1:-1:-1;;;2154:850:51:o;838:564::-;938:12;991:20;;;:14;:20;;;;;;;;:29;;;;;;;;;938:12;;991:29;;983:62;;;;;;;3101:2:88;983:62:51;;;3083:21:88;3140:2;3120:18;;;3113:30;3179:22;3159:18;;;3152:50;3219:18;;983:62:51;;;;;;;;-1:-1:-1;1176:14:51;1193:21;;;1164:2;1193:21;;;;;;;;1244:10;1193:21;1253:1;1244:10;:::i;:::-;1228:12;:7;1238:2;1228:12;:::i;:::-;:26;1224:87;;1293:7;1280:10;:6;1289:1;1280:10;:::i;:::-;:20;;;;:::i;:::-;1270:30;;1224:87;-1:-1:-1;1367:19:51;;;;:13;:19;;;;;;;;:28;;;;;;;;;;;;838:564;;-1:-1:-1;838:564:51:o;3295:1462::-;3591:4;3578:18;3396:12;;3720:1;3710:12;;3694:29;;3691:77;;;3752:1;3749;3742:12;3691:77;4011:3;4007:14;;;3911:4;3995:27;4042:11;4016:4;4161:16;4042:11;4143:41;4374:29;;;4378:11;4374:29;4368:36;4426:20;;;;4573:19;4566:27;4595:11;4563:44;4626:19;;;;4604:1;4626:19;;;;;;;;:32;;;;;;;;:39;;;;4661:4;4626:39;;;;;;4675:18;;;;;;;;:31;;;;;;;;;:38;;;;4723:20;;;;;;;;;;;:27;;;;-1:-1:-1;;;;3295:1462:51:o;14:248:88:-;82:6;90;143:2;131:9;122:7;118:23;114:32;111:52;;;159:1;156;149:12;111:52;-1:-1:-1;;182:23:88;;;252:2;237:18;;;224:32;;-1:-1:-1;14:248:88:o;641:347::-;692:8;702:6;756:3;749:4;741:6;737:17;733:27;723:55;;774:1;771;764:12;723:55;-1:-1:-1;797:20:88;;840:18;829:30;;826:50;;;872:1;869;862:12;826:50;909:4;901:6;897:17;885:29;;961:3;954:4;945:6;937;933:19;929:30;926:39;923:59;;;978:1;975;968:12;923:59;641:347;;;;;:::o;993:409::-;1063:6;1071;1124:2;1112:9;1103:7;1099:23;1095:32;1092:52;;;1140:1;1137;1130:12;1092:52;1180:9;1167:23;1213:18;1205:6;1202:30;1199:50;;;1245:1;1242;1235:12;1199:50;1284:58;1334:7;1325:6;1314:9;1310:22;1284:58;:::i;:::-;1361:8;;1258:84;;-1:-1:-1;993:409:88;-1:-1:-1;;;;993:409:88:o;1660:477::-;1739:6;1747;1755;1808:2;1796:9;1787:7;1783:23;1779:32;1776:52;;;1824:1;1821;1814:12;1776:52;1860:9;1847:23;1837:33;;1921:2;1910:9;1906:18;1893:32;1948:18;1940:6;1937:30;1934:50;;;1980:1;1977;1970:12;1934:50;2019:58;2069:7;2060:6;2049:9;2045:22;2019:58;:::i;:::-;1660:477;;2096:8;;-1:-1:-1;1993:84:88;;-1:-1:-1;;;;1660:477:88:o;2142:385::-;2228:6;2236;2244;2252;2305:3;2293:9;2284:7;2280:23;2276:33;2273:53;;;2322:1;2319;2312:12;2273:53;-1:-1:-1;;2345:23:88;;;2415:2;2400:18;;2387:32;;-1:-1:-1;2466:2:88;2451:18;;2438:32;;2517:2;2502:18;2489:32;;-1:-1:-1;2142:385:88;-1:-1:-1;2142:385:88:o;2532:180::-;2591:6;2644:2;2632:9;2623:7;2619:23;2615:32;2612:52;;;2660:1;2657;2650:12;2612:52;-1:-1:-1;2683:23:88;;2532:180;-1:-1:-1;2532:180:88:o;3248:184::-;3300:77;3297:1;3290:88;3397:4;3394:1;3387:15;3421:4;3418:1;3411:15;3437:125;3502:9;;;3523:10;;;3520:36;;;3536:18;;:::i;:::-;3437:125;;;;:::o;3567:128::-;3634:9;;;3655:11;;;3652:37;;;3669:18;;:::i"
var PreimageOracleDeployedSourceMap = "306:4482:107:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;537:68;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;413:25:253;;;401:2;386:18;537:68:107;;;;;;;;680:66;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;614:14:253;;607:22;589:41;;577:2;562:18;680:66:107;449:187:253;2004:1145:107;;;;;;:::i;:::-;;:::i;789:564::-;;;;;;:::i;:::-;;:::i;:::-;;;;1205:25:253;;;1261:2;1246:18;;1239:34;;;;1178:18;789:564:107;1031:248:253;3191:1595:107;;;;;;:::i;:::-;;:::i;:::-;;1700:262;;;;;;:::i;:::-;1833:19;;;;:14;:19;;;;;;;;:31;;;;;;;;:38;;;;1867:4;1833:38;;;;;;1881:18;;;;;;;;:30;;;;;;;;;:37;;;;1928:20;;;;;;;;;;:27;1700:262;419:50;;;;;;:::i;:::-;;;;;;;;;;;;;;;2004:1145;2150:12;2251:36;2280:6;2251:28;:36::i;:::-;2244:43;-1:-1:-1;2381:9:107;:5;2389:1;2381:9;:::i;:::-;2367:11;:23;:37;;;;2402:2;2394:5;:10;2367:37;2363:90;;;2427:15;;;;;;;;;;;;;;2363:90;2522:12;2622:4;2615:18;;;2723:3;2719:15;;;2706:29;;2755:4;2748:19;;;;2857:18;;2947:20;;;:14;:20;;;;;;:33;;;;;;;;:40;;;;2983:4;2947:40;;;;;;2997:19;;;;;;;;:32;;;;;;;;;:39;3113:21;;;;;;;;;:29;2962:4;2004:1145;-1:-1:-1;2004:1145:107:o;789:564::-;889:12;942:20;;;:14;:20;;;;;;;;:29;;;;;;;;;889:12;;942:29;;934:62;;;;;;;3229:2:253;934:62:107;;;3211:21:253;3268:2;3248:18;;;3241:30;3307:22;3287:18;;;3280:50;3347:18;;934:62:107;;;;;;;;-1:-1:-1;1127:14:107;1144:21;;;1115:2;1144:21;;;;;;;;1195:10;1144:21;1204:1;1195:10;:::i;:::-;1179:12;:7;1189:2;1179:12;:::i;:::-;:26;1175:87;;1244:7;1231:10;:6;1240:1;1231:10;:::i;:::-;:20;;;;:::i;:::-;1221:30;;1175:87;-1:-1:-1;1318:19:107;;;;:13;:19;;;;;;;;:28;;;;;;;;;;;;789:564;;-1:-1:-1;789:564:107:o;3191:1595::-;3487:4;3474:18;3292:12;;3616:1;3606:12;;3590:29;;3587:210;;;3691:10;3688:1;3681:21;3781:1;3775:4;3768:15;3587:210;4040:3;4036:14;;;3940:4;4024:27;4071:11;4045:4;4190:16;4071:11;4172:41;4403:29;;;4407:11;4403:29;4397:36;4455:20;;;;4602:19;4595:27;4624:11;4592:44;4655:19;;;;4633:1;4655:19;;;;;;;;:32;;;;;;;;:39;;;;4690:4;4655:39;;;;;;4704:18;;;;;;;;:31;;;;;;;;;:38;;;;4752:20;;;;;;;;;;;:27;;;;-1:-1:-1;;;;3191:1595:107:o;492:353:106:-;752:11;777:19;765:32;;749:49;824:14;749:49;1277:21;1426:15;;;1467:8;1461:4;1454:22;1595:4;1582:18;;1602:19;1578:44;1624:11;1575:61;;1222:430;824:14;817:21;492:353;-1:-1:-1;;492:353:106:o;14:248:253:-;82:6;90;143:2;131:9;122:7;118:23;114:32;111:52;;;159:1;156;149:12;111:52;-1:-1:-1;;182:23:253;;;252:2;237:18;;;224:32;;-1:-1:-1;14:248:253:o;641:385::-;727:6;735;743;751;804:3;792:9;783:7;779:23;775:33;772:53;;;821:1;818;811:12;772:53;-1:-1:-1;;844:23:253;;;914:2;899:18;;886:32;;-1:-1:-1;965:2:253;950:18;;937:32;;1016:2;1001:18;988:32;;-1:-1:-1;641:385:253;-1:-1:-1;641:385:253:o;1284:659::-;1363:6;1371;1379;1432:2;1420:9;1411:7;1407:23;1403:32;1400:52;;;1448:1;1445;1438:12;1400:52;1484:9;1471:23;1461:33;;1545:2;1534:9;1530:18;1517:32;1568:18;1609:2;1601:6;1598:14;1595:34;;;1625:1;1622;1615:12;1595:34;1663:6;1652:9;1648:22;1638:32;;1708:7;1701:4;1697:2;1693:13;1689:27;1679:55;;1730:1;1727;1720:12;1679:55;1770:2;1757:16;1796:2;1788:6;1785:14;1782:34;;;1812:1;1809;1802:12;1782:34;1857:7;1852:2;1843:6;1839:2;1835:15;1831:24;1828:37;1825:57;;;1878:1;1875;1868:12;1825:57;1909:2;1905;1901:11;1891:21;;1931:6;1921:16;;;;;1284:659;;;;;:::o;2338:180::-;2397:6;2450:2;2438:9;2429:7;2425:23;2421:32;2418:52;;;2466:1;2463;2456:12;2418:52;-1:-1:-1;2489:23:253;;2338:180;-1:-1:-1;2338:180:253:o;2705:184::-;2757:77;2754:1;2747:88;2854:4;2851:1;2844:15;2878:4;2875:1;2868:15;2894:128;2934:3;2965:1;2961:6;2958:1;2955:13;2952:39;;;2971:18;;:::i;:::-;-1:-1:-1;3007:9:253;;2894:128::o;3376:125::-;3416:4;3444:1;3441;3438:8;3435:34;;;3449:18;;:::i;:::-;-1:-1:-1;3486:9:253;;3376:125::o"
func init() {
if err := json.Unmarshal([]byte(PreimageOracleStorageLayoutJSON), PreimageOracleStorageLayout); err != nil {
......
package srcmap
import (
"path"
"strings"
"testing"
......@@ -11,17 +12,24 @@ import (
)
func TestSourcemap(t *testing.T) {
sourcePath := "../../packages/contracts-bedrock/src/cannon/MIPS.sol"
t.Skip("TODO(clabby): This test is disabled until source IDs have been added to foundry artifacts.")
contractsDir := "../../packages/contracts-bedrock"
sources := []string{path.Join(contractsDir, "src/cannon/MIPS.sol")}
for i, source := range sources {
sources[i] = path.Join(contractsDir, source)
}
deployedByteCode := hexutil.MustDecode(bindings.MIPSDeployedBin)
srcMap, err := ParseSourceMap(
[]string{sourcePath},
sources,
deployedByteCode,
bindings.MIPSDeployedSourceMap)
require.NoError(t, err)
for i := 0; i < len(deployedByteCode); i++ {
info := srcMap.FormattedInfo(uint64(i))
if !strings.HasPrefix(info, "generated:") && !strings.HasPrefix(info, sourcePath) {
if strings.HasPrefix(info, "unknown") {
t.Fatalf("unexpected info: %q", info)
}
}
......
......@@ -30,10 +30,11 @@ func setupFaultDisputeGame() (common.Address, *bind.TransactOpts, *backends.Simu
_, _, contract, err := bindings.DeployFaultDisputeGame(
opts,
backend,
[32]byte{0x01},
big.NewInt(15),
uint64(604800), // 7 days
common.Address{0xdd},
[32]byte{0x01}, // Absolute Prestate Claim
big.NewInt(15), // Max Game Depth
uint64(604800), // 7 days
common.Address{0xdd}, // VM
common.Address{0xee}, // L2OutputOracle (Not used in Alphabet Game)
)
if err != nil {
return common.Address{}, nil, nil, nil, err
......
......@@ -9,6 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-chain-ops/deployer"
"github.com/ethereum-optimism/optimism/op-service/client/utils"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/ethclient"
"github.com/stretchr/testify/require"
)
......@@ -50,7 +51,7 @@ func deployDisputeGameContracts(require *require.Assertions, ctx context.Context
require.NoError(err)
// Deploy the fault dispute game implementation
_, tx, _, err = bindings.DeployFaultDisputeGame(opts, client, alphabetVMAbsolutePrestateClaim, big.NewInt(alphabetGameDepth), gameDuration, alphaVMAddr)
_, tx, _, err = bindings.DeployFaultDisputeGame(opts, client, alphabetVMAbsolutePrestateClaim, big.NewInt(alphabetGameDepth), gameDuration, alphaVMAddr, common.Address{0xBE, 0xEF})
require.NoError(err)
faultDisputeGameAddr, err := bind.WaitDeployed(ctx, client, tx)
require.NoError(err)
......
......@@ -85,35 +85,35 @@ FaucetTest:test_nonAdmin_drip_fails() (gas: 262520)
FaucetTest:test_receive_succeeds() (gas: 17401)
FaucetTest:test_withdraw_nonAdmin_reverts() (gas: 13145)
FaucetTest:test_withdraw_succeeds() (gas: 78359)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot1:test_resolvesCorrectly_succeeds() (gas: 498839)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 505685)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 502382)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot4:test_resolvesCorrectly_succeeds() (gas: 505561)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot5:test_resolvesCorrectly_succeeds() (gas: 504878)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot1:test_resolvesCorrectly_succeeds() (gas: 497604)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 504450)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 501147)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot4:test_resolvesCorrectly_succeeds() (gas: 502326)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot5:test_resolvesCorrectly_succeeds() (gas: 501643)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot1:test_resolvesCorrectly_succeeds() (gas: 501957)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 508759)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 505478)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot4:test_resolvesCorrectly_succeeds() (gas: 508657)
FaultDisputeGame_ResolvesCorrectly_CorrectRoot5:test_resolvesCorrectly_succeeds() (gas: 507974)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot1:test_resolvesCorrectly_succeeds() (gas: 500722)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot2:test_resolvesCorrectly_succeeds() (gas: 507524)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot3:test_resolvesCorrectly_succeeds() (gas: 504243)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot4:test_resolvesCorrectly_succeeds() (gas: 505422)
FaultDisputeGame_ResolvesCorrectly_IncorrectRoot5:test_resolvesCorrectly_succeeds() (gas: 504739)
FaultDisputeGame_Test:test_extraData_succeeds() (gas: 17404)
FaultDisputeGame_Test:test_gameData_succeeds() (gas: 17917)
FaultDisputeGame_Test:test_gameData_succeeds() (gas: 17939)
FaultDisputeGame_Test:test_gameStart_succeeds() (gas: 10315)
FaultDisputeGame_Test:test_gameType_succeeds() (gas: 8260)
FaultDisputeGame_Test:test_initialRootClaimData_succeeds() (gas: 17669)
FaultDisputeGame_Test:test_move_clockCorrectness_succeeds() (gas: 416029)
FaultDisputeGame_Test:test_move_clockTimeExceeded_reverts() (gas: 26399)
FaultDisputeGame_Test:test_initialRootClaimData_succeeds() (gas: 17624)
FaultDisputeGame_Test:test_move_clockCorrectness_succeeds() (gas: 419180)
FaultDisputeGame_Test:test_move_clockTimeExceeded_reverts() (gas: 26421)
FaultDisputeGame_Test:test_move_defendRoot_reverts() (gas: 13360)
FaultDisputeGame_Test:test_move_duplicateClaim_reverts() (gas: 103254)
FaultDisputeGame_Test:test_move_gameDepthExceeded_reverts() (gas: 408148)
FaultDisputeGame_Test:test_move_gameNotInProgress_reverts() (gas: 10968)
FaultDisputeGame_Test:test_move_nonExistentParent_reverts() (gas: 24655)
FaultDisputeGame_Test:test_move_simpleAttack_succeeds() (gas: 107356)
FaultDisputeGame_Test:test_resolve_challengeContested_succeeds() (gas: 224820)
FaultDisputeGame_Test:test_move_duplicateClaim_reverts() (gas: 104120)
FaultDisputeGame_Test:test_move_gameDepthExceeded_reverts() (gas: 411546)
FaultDisputeGame_Test:test_move_gameNotInProgress_reverts() (gas: 11012)
FaultDisputeGame_Test:test_move_nonExistentParent_reverts() (gas: 24677)
FaultDisputeGame_Test:test_move_simpleAttack_succeeds() (gas: 108110)
FaultDisputeGame_Test:test_resolve_challengeContested_succeeds() (gas: 226511)
FaultDisputeGame_Test:test_resolve_notInProgress_reverts() (gas: 9657)
FaultDisputeGame_Test:test_resolve_rootContested_succeeds() (gas: 109773)
FaultDisputeGame_Test:test_resolve_rootUncontestedClockNotExpired_succeeds() (gas: 21434)
FaultDisputeGame_Test:test_resolve_rootUncontested_succeeds() (gas: 27263)
FaultDisputeGame_Test:test_resolve_teamDeathmatch_succeeds() (gas: 395502)
FaultDisputeGame_Test:test_resolve_rootContested_succeeds() (gas: 110642)
FaultDisputeGame_Test:test_resolve_rootUncontestedClockNotExpired_succeeds() (gas: 21437)
FaultDisputeGame_Test:test_resolve_rootUncontested_succeeds() (gas: 27288)
FaultDisputeGame_Test:test_resolve_teamDeathmatch_succeeds() (gas: 398859)
FaultDisputeGame_Test:test_rootClaim_succeeds() (gas: 8225)
FeeVault_Test:test_constructor_succeeds() (gas: 18185)
GasBenchMark_L1CrossDomainMessenger:test_sendMessage_benchmark_0() (gas: 352113)
......@@ -437,9 +437,11 @@ OptimistTest:test_tokenURI_returnsCorrectTokenURI_succeeds() (gas: 195908)
OptimistTest:test_transferFrom_soulbound_reverts() (gas: 75512)
PostSherlockL1:test_script_succeeds() (gas: 3078)
PostSherlockL2:test_script_succeeds() (gas: 3078)
PreimageOracle_Test:test_computePreimageKey_succeeds() (gas: 6242)
PreimageOracle_Test:test_loadKeccak256PreimagePart_outOfBoundsOffset_reverts() (gas: 9005)
PreimageOracle_Test:test_loadKeccak256PreimagePart_succeeds() (gas: 77502)
PreimageOracle_Test:test_keccak256PreimageKey_succeeds() (gas: 319)
PreimageOracle_Test:test_loadKeccak256PreimagePart_outOfBoundsOffset_reverts() (gas: 8993)
PreimageOracle_Test:test_loadKeccak256PreimagePart_succeeds() (gas: 76098)
PreimageOracle_Test:test_loadLocalData_onePart_succeeds() (gas: 75840)
PreimageOracle_Test:test_loadLocalData_outOfBoundsOffset_reverts() (gas: 8803)
ProxyAdmin_Test:test_chugsplashChangeProxyAdmin_succeeds() (gas: 35586)
ProxyAdmin_Test:test_chugsplashGetProxyAdmin_succeeds() (gas: 15675)
ProxyAdmin_Test:test_chugsplashGetProxyImplementation_succeeds() (gas: 51084)
......
......@@ -698,7 +698,8 @@ contract Deploy is Deployer {
_absolutePrestate: absolutePrestate,
_maxGameDepth: cfg.faultGameMaxDepth(),
_gameDuration: Duration.wrap(uint64(cfg.faultGameMaxDuration())),
_vm: faultVm
_vm: faultVm,
_l2oo: L2OutputOracle(mustGetAddress("L2OutputOracleProxy"))
}));
console.log("DisputeGameFactory: set `FaultDisputeGame` implementation");
}
......
......@@ -14,6 +14,7 @@
"src/L2/L2StandardBridge.sol": "0x8ee5257e03ae4ba8555d9f7d13374c8a388315d62c16107bb4cadd450bfeb3d3",
"src/L2/L2ToL1MessagePasser.sol": "0x7e35c3c4f1dd3d131dd71db07676301f7c477f02b6d6bf0ec468ecf2bed8325b",
"src/L2/SequencerFeeVault.sol": "0x17b30ccaed8b8dbe965c892cb8aae7f594fb4a87e0edd3ca6cd8f94559b86df9",
"src/dispute/FaultDisputeGame.sol": "0xb36f6456d74a9ee93df97bb6d5a554dcb531d730e6e2b10dd442897875f2ca81",
"src/legacy/DeployerWhitelist.sol": "0x47277d9c8409d517501d172db6697d55090d3d3a9e4bb2b1adea83471d793b6b",
"src/legacy/L1BlockNumber.sol": "0x1a1690b8b5ab53cf2b5c8e85fb86028b4078ae656286ae482cabe68374334f2a",
"src/legacy/LegacyMessagePasser.sol": "0xc7f42e6165507b4c50a5169a950f66602e6b4b8cff17f5d95994e121abb18390",
......
// SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
pragma solidity 0.8.15;
import { IPreimageOracle } from "./interfaces/IPreimageOracle.sol";
import { PreimageKeyLib } from "./PreimageKeyLib.sol";
/// @title MIPS
/// @notice The MIPS contract emulates a single MIPS instruction.
......@@ -57,10 +58,12 @@ contract MIPS {
/// @notice Extends the value leftwards with its most significant bit (sign extension).
function SE(uint32 _dat, uint32 _idx) internal pure returns (uint32) {
bool isSigned = (_dat >> (_idx - 1)) != 0;
uint256 signed = ((1 << (32 - _idx)) - 1) << _idx;
uint256 mask = (1 << _idx) - 1;
return uint32(_dat & mask | (isSigned ? signed : 0));
unchecked {
bool isSigned = (_dat >> (_idx - 1)) != 0;
uint256 signed = ((1 << (32 - _idx)) - 1) << _idx;
uint256 mask = (1 << _idx) - 1;
return uint32(_dat & mask | (isSigned ? signed : 0));
}
}
/// @notice Computes the hash of the MIPS state.
......@@ -109,160 +112,166 @@ contract MIPS {
// Compute the hash of the resulting MIPS state
out_ := keccak256(start, sub(to, start))
}
return out_;
}
/// @notice Handles a syscall.
function handleSyscall() internal returns (bytes32 out_) {
// Load state from memory
State memory state;
assembly {
state := 0x80
}
// Load the syscall number from the registers
uint32 syscall_no = state.registers[2];
uint32 v0 = 0;
uint32 v1 = 0;
// Load the syscall arguments from the registers
uint32 a0 = state.registers[4];
uint32 a1 = state.registers[5];
uint32 a2 = state.registers[6];
// mmap: Allocates a page from the heap.
if (syscall_no == 4090) {
uint32 sz = a1;
if (sz&4095 != 0) { // adjust size to align with page size
sz += 4096 - (sz&4095);
}
if (a0 == 0) {
v0 = state.heap;
state.heap += sz;
} else {
v0 = a0;
unchecked {
// Load state from memory
State memory state;
assembly {
state := 0x80
}
// Load the syscall number from the registers
uint32 syscall_no = state.registers[2];
uint32 v0 = 0;
uint32 v1 = 0;
// Load the syscall arguments from the registers
uint32 a0 = state.registers[4];
uint32 a1 = state.registers[5];
uint32 a2 = state.registers[6];
// mmap: Allocates a page from the heap.
if (syscall_no == 4090) {
uint32 sz = a1;
if (sz&4095 != 0) { // adjust size to align with page size
sz += 4096 - (sz&4095);
}
if (a0 == 0) {
v0 = state.heap;
state.heap += sz;
} else {
v0 = a0;
}
}
}
// brk: Returns a fixed address for the program break at 0x40000000
else if (syscall_no == 4045) {
v0 = BRK_START;
}
// clone (not supported) returns 1
else if (syscall_no == 4120) {
v0 = 1;
}
// exit group: Sets the Exited and ExitCode states to true and argument 0.
else if (syscall_no == 4246) {
state.exited = true;
state.exitCode = uint8(a0);
return outputState();
}
// read: Like Linux read syscall. Splits unaligned reads into aligned reads.
else if (syscall_no == 4003) {
// args: a0 = fd, a1 = addr, a2 = count
// returns: v0 = read, v1 = err code
if (a0 == FD_STDIN) {
// Leave v0 and v1 zero: read nothing, no error
}
// pre-image oracle read
else if (a0 == FD_PREIMAGE_READ) {
// verify proof 1 is correct, and get the existing memory.
uint32 mem = readMem(a1 & 0xFFffFFfc, 1); // mask the addr to align it to 4 bytes
(bytes32 dat, uint256 datLen) = oracle.readPreimage(state.preimageKey, state.preimageOffset);
// Transform data for writing to memory
// We use assembly for more precise ops, and no var count limit
assembly {
let alignment := and(a1, 3) // the read might not start at an aligned address
let space := sub(4, alignment) // remaining space in memory word
if lt(space, datLen) { datLen := space } // if less space than data, shorten data
if lt(a2, datLen) { datLen := a2 } // if requested to read less, read less
dat := shr(sub(256, mul(datLen, 8)), dat) // right-align data
dat := shl(mul(sub(sub(4, datLen), alignment), 8), dat) // position data to insert into memory word
let mask := sub(shl(mul(sub(4, alignment), 8), 1), 1) // mask all bytes after start
let suffixMask := sub(shl(mul(sub(sub(4, alignment), datLen), 8), 1), 1) // mask of all bytes starting from end, maybe none
mask := and(mask, not(suffixMask)) // reduce mask to just cover the data we insert
mem := or(and(mem, not(mask)), dat) // clear masked part of original memory, and insert data
}
// Write memory back
writeMem(a1 & 0xFFffFFfc, 1, mem);
state.preimageOffset += uint32(datLen);
v0 = uint32(datLen);
}
// hint response
else if (a0 == FD_HINT_READ) {
// Don't read into memory, just say we read it all
// The result is ignored anyway
v0 = a2;
}
else {
v0 = 0xFFffFFff;
v1 = EBADF;
// brk: Returns a fixed address for the program break at 0x40000000
else if (syscall_no == 4045) {
v0 = BRK_START;
}
// clone (not supported) returns 1
else if (syscall_no == 4120) {
v0 = 1;
}
// exit group: Sets the Exited and ExitCode states to true and argument 0.
else if (syscall_no == 4246) {
state.exited = true;
state.exitCode = uint8(a0);
return outputState();
}
// read: Like Linux read syscall. Splits unaligned reads into aligned reads.
else if (syscall_no == 4003) {
// args: a0 = fd, a1 = addr, a2 = count
// returns: v0 = read, v1 = err code
if (a0 == FD_STDIN) {
// Leave v0 and v1 zero: read nothing, no error
}
// pre-image oracle read
else if (a0 == FD_PREIMAGE_READ) {
// verify proof 1 is correct, and get the existing memory.
uint32 mem = readMem(a1 & 0xFFffFFfc, 1); // mask the addr to align it to 4 bytes
bytes32 preimageKey = state.preimageKey;
// If the preimage key is a local key, localize it in the context of the caller.
if (uint8(preimageKey[0]) == 1) {
preimageKey = PreimageKeyLib.localize(preimageKey);
}
(bytes32 dat, uint256 datLen) = oracle.readPreimage(preimageKey, state.preimageOffset);
// Transform data for writing to memory
// We use assembly for more precise ops, and no var count limit
assembly {
let alignment := and(a1, 3) // the read might not start at an aligned address
let space := sub(4, alignment) // remaining space in memory word
if lt(space, datLen) { datLen := space } // if less space than data, shorten data
if lt(a2, datLen) { datLen := a2 } // if requested to read less, read less
dat := shr(sub(256, mul(datLen, 8)), dat) // right-align data
dat := shl(mul(sub(sub(4, datLen), alignment), 8), dat) // position data to insert into memory word
let mask := sub(shl(mul(sub(4, alignment), 8), 1), 1) // mask all bytes after start
let suffixMask := sub(shl(mul(sub(sub(4, alignment), datLen), 8), 1), 1) // mask of all bytes starting from end, maybe none
mask := and(mask, not(suffixMask)) // reduce mask to just cover the data we insert
mem := or(and(mem, not(mask)), dat) // clear masked part of original memory, and insert data
}
// Write memory back
writeMem(a1 & 0xFFffFFfc, 1, mem);
state.preimageOffset += uint32(datLen);
v0 = uint32(datLen);
}
// hint response
else if (a0 == FD_HINT_READ) {
// Don't read into memory, just say we read it all
// The result is ignored anyway
v0 = a2;
}
else {
v0 = 0xFFffFFff;
v1 = EBADF;
}
}
}
// write: like Linux write syscall. Splits unaligned writes into aligned writes.
else if (syscall_no == 4004) {
// args: a0 = fd, a1 = addr, a2 = count
// returns: v0 = written, v1 = err code
if (a0 == FD_STDOUT || a0 == FD_STDERR || a0 == FD_HINT_WRITE) {
v0 = a2; // tell program we have written everything
}
// pre-image oracle
else if (a0 == FD_PREIMAGE_WRITE) {
uint32 mem = readMem(a1 & 0xFFffFFfc, 1); // mask the addr to align it to 4 bytes
bytes32 key = state.preimageKey;
// Construct pre-image key from memory
// We use assembly for more precise ops, and no var count limit
assembly {
let alignment := and(a1, 3) // the read might not start at an aligned address
let space := sub(4, alignment) // remaining space in memory word
if lt(space, a2) { a2 := space } // if less space than data, shorten data
key := shl(mul(a2, 8), key) // shift key, make space for new info
let mask := sub(shl(mul(a2, 8), 1), 1) // mask for extracting value from memory
mem := and(shr(mul(sub(space, a2), 8), mem), mask) // align value to right, mask it
key := or(key, mem) // insert into key
}
// Write pre-image key to oracle
state.preimageKey = key;
state.preimageOffset = 0; // reset offset, to read new pre-image data from the start
v0 = a2;
}
else {
v0 = 0xFFffFFff;
v1 = EBADF;
// write: like Linux write syscall. Splits unaligned writes into aligned writes.
else if (syscall_no == 4004) {
// args: a0 = fd, a1 = addr, a2 = count
// returns: v0 = written, v1 = err code
if (a0 == FD_STDOUT || a0 == FD_STDERR || a0 == FD_HINT_WRITE) {
v0 = a2; // tell program we have written everything
}
// pre-image oracle
else if (a0 == FD_PREIMAGE_WRITE) {
uint32 mem = readMem(a1 & 0xFFffFFfc, 1); // mask the addr to align it to 4 bytes
bytes32 key = state.preimageKey;
// Construct pre-image key from memory
// We use assembly for more precise ops, and no var count limit
assembly {
let alignment := and(a1, 3) // the read might not start at an aligned address
let space := sub(4, alignment) // remaining space in memory word
if lt(space, a2) { a2 := space } // if less space than data, shorten data
key := shl(mul(a2, 8), key) // shift key, make space for new info
let mask := sub(shl(mul(a2, 8), 1), 1) // mask for extracting value from memory
mem := and(shr(mul(sub(space, a2), 8), mem), mask) // align value to right, mask it
key := or(key, mem) // insert into key
}
// Write pre-image key to oracle
state.preimageKey = key;
state.preimageOffset = 0; // reset offset, to read new pre-image data from the start
v0 = a2;
}
else {
v0 = 0xFFffFFff;
v1 = EBADF;
}
}
}
// fcntl: Like linux fcntl syscall, but only supports minimal file-descriptor control commands,
// to retrieve the file-descriptor R/W flags.
else if (syscall_no == 4055) { // fcntl
// args: a0 = fd, a1 = cmd
if (a1 == 3) { // F_GETFL: get file descriptor flags
if (a0 == FD_STDIN || a0 == FD_PREIMAGE_READ || a0 == FD_HINT_READ) {
v0 = 0; // O_RDONLY
} else if (a0 == FD_STDOUT || a0 == FD_STDERR || a0 == FD_PREIMAGE_WRITE || a0 == FD_HINT_WRITE) {
v0 = 1; // O_WRONLY
// fcntl: Like linux fcntl syscall, but only supports minimal file-descriptor control commands,
// to retrieve the file-descriptor R/W flags.
else if (syscall_no == 4055) { // fcntl
// args: a0 = fd, a1 = cmd
if (a1 == 3) { // F_GETFL: get file descriptor flags
if (a0 == FD_STDIN || a0 == FD_PREIMAGE_READ || a0 == FD_HINT_READ) {
v0 = 0; // O_RDONLY
} else if (a0 == FD_STDOUT || a0 == FD_STDERR || a0 == FD_PREIMAGE_WRITE || a0 == FD_HINT_WRITE) {
v0 = 1; // O_WRONLY
} else {
v0 = 0xFFffFFff;
v1 = EBADF;
}
} else {
v0 = 0xFFffFFff;
v1 = EBADF;
v1 = EINVAL; // cmd not recognized by this kernel
}
} else {
v0 = 0xFFffFFff;
v1 = EINVAL; // cmd not recognized by this kernel
}
}
// Write the results back to the state registers
state.registers[2] = v0;
state.registers[7] = v1;
// Write the results back to the state registers
state.registers[2] = v0;
state.registers[7] = v1;
// Update the PC and nextPC
state.pc = state.nextPC;
state.nextPC = state.nextPC + 4;
// Update the PC and nextPC
state.pc = state.nextPC;
state.nextPC = state.nextPC + 4;
out_ = outputState();
out_ = outputState();
}
}
/// @notice Handles a branch instruction, updating the MIPS state PC where needed.
......@@ -272,55 +281,57 @@ contract MIPS {
/// @param _rs The register to be compared with the branch register.
/// @return out_ The hashed MIPS state.
function handleBranch(uint32 _opcode, uint32 _insn, uint32 _rtReg, uint32 _rs) internal returns (bytes32 out_) {
// Load state from memory
State memory state;
assembly {
state := 0x80
}
bool shouldBranch = false;
// beq/bne: Branch on equal / not equal
if (_opcode == 4 || _opcode == 5) {
uint32 rt = state.registers[_rtReg];
shouldBranch = (_rs == rt && _opcode == 4) || (_rs != rt && _opcode == 5);
}
// blez: Branches if instruction is less than or equal to zero
else if (_opcode == 6) {
shouldBranch = int32(_rs) <= 0;
}
// bgtz: Branches if instruction is greater than zero
else if (_opcode == 7) {
shouldBranch = int32(_rs) > 0;
}
// bltz/bgez: Branch on less than zero / greater than or equal to zero
else if (_opcode == 1) {
// regimm
uint32 rtv = ((_insn >> 16) & 0x1F);
if (rtv == 0) {
shouldBranch = int32(_rs) < 0;
}
if (rtv == 1) {
shouldBranch = int32(_rs) >= 0;
unchecked {
// Load state from memory
State memory state;
assembly {
state := 0x80
}
bool shouldBranch = false;
// beq/bne: Branch on equal / not equal
if (_opcode == 4 || _opcode == 5) {
uint32 rt = state.registers[_rtReg];
shouldBranch = (_rs == rt && _opcode == 4) || (_rs != rt && _opcode == 5);
}
// blez: Branches if instruction is less than or equal to zero
else if (_opcode == 6) {
shouldBranch = int32(_rs) <= 0;
}
// bgtz: Branches if instruction is greater than zero
else if (_opcode == 7) {
shouldBranch = int32(_rs) > 0;
}
// bltz/bgez: Branch on less than zero / greater than or equal to zero
else if (_opcode == 1) {
// regimm
uint32 rtv = ((_insn >> 16) & 0x1F);
if (rtv == 0) {
shouldBranch = int32(_rs) < 0;
}
if (rtv == 1) {
shouldBranch = int32(_rs) >= 0;
}
}
}
// Update the state's previous PC
uint32 prevPC = state.pc;
// Update the state's previous PC
uint32 prevPC = state.pc;
// Execute the delay slot first
state.pc = state.nextPC;
// Execute the delay slot first
state.pc = state.nextPC;
// If we should branch, update the PC to the branch target
// Otherwise, proceed to the next instruction
if (shouldBranch) {
state.nextPC = prevPC + 4 + (SE(_insn & 0xFFFF, 16) << 2);
} else {
state.nextPC = state.nextPC + 4;
}
// If we should branch, update the PC to the branch target
// Otherwise, proceed to the next instruction
if (shouldBranch) {
state.nextPC = prevPC + 4 + (SE(_insn & 0xFFFF, 16) << 2);
} else {
state.nextPC = state.nextPC + 4;
}
// Return the hash of the resulting state
out_ = outputState();
// Return the hash of the resulting state
out_ = outputState();
}
}
/// @notice Handles HI and LO register instructions.
......@@ -330,68 +341,70 @@ contract MIPS {
/// @param _storeReg The register to store the result in.
/// @return out_ The hash of the resulting MIPS state.
function handleHiLo(uint32 _func, uint32 _rs, uint32 _rt, uint32 _storeReg) internal returns (bytes32 out_) {
// Load state from memory
State memory state;
assembly {
state := 0x80
}
unchecked {
// Load state from memory
State memory state;
assembly {
state := 0x80
}
uint32 val;
uint32 val;
// mfhi: Move the contents of the HI register into the destination
if (_func == 0x10) {
val = state.hi;
}
// mthi: Move the contents of the source into the HI register
else if (_func == 0x11) {
state.hi = _rs;
}
// mflo: Move the contents of the LO register into the destination
else if (_func == 0x12) {
val = state.lo;
}
// mtlo: Move the contents of the source into the LO register
else if (_func == 0x13) {
state.lo = _rs;
}
// mult: Multiplies `rs` by `rt` and stores the result in HI and LO registers
else if (_func == 0x18) {
uint64 acc = uint64(int64(int32(_rs)) * int64(int32(_rt)));
state.hi = uint32(acc >> 32);
state.lo = uint32(acc);
}
// multu: Unsigned multiplies `rs` by `rt` and stores the result in HI and LO registers
else if (_func == 0x19) {
uint64 acc = uint64(uint64(_rs) * uint64(_rt));
state.hi = uint32(acc >> 32);
state.lo = uint32(acc);
}
// div: Divides `rs` by `rt`.
// Stores the quotient in LO
// And the remainder in HI
else if (_func == 0x1a) {
state.hi = uint32(int32(_rs) % int32(_rt));
state.lo = uint32(int32(_rs) / int32(_rt));
}
// divu: Unsigned divides `rs` by `rt`.
// Stores the quotient in LO
// And the remainder in HI
else if (_func == 0x1b) {
state.hi = _rs % _rt;
state.lo = _rs / _rt;
}
// mfhi: Move the contents of the HI register into the destination
if (_func == 0x10) {
val = state.hi;
}
// mthi: Move the contents of the source into the HI register
else if (_func == 0x11) {
state.hi = _rs;
}
// mflo: Move the contents of the LO register into the destination
else if (_func == 0x12) {
val = state.lo;
}
// mtlo: Move the contents of the source into the LO register
else if (_func == 0x13) {
state.lo = _rs;
}
// mult: Multiplies `rs` by `rt` and stores the result in HI and LO registers
else if (_func == 0x18) {
uint64 acc = uint64(int64(int32(_rs)) * int64(int32(_rt)));
state.hi = uint32(acc >> 32);
state.lo = uint32(acc);
}
// multu: Unsigned multiplies `rs` by `rt` and stores the result in HI and LO registers
else if (_func == 0x19) {
uint64 acc = uint64(uint64(_rs) * uint64(_rt));
state.hi = uint32(acc >> 32);
state.lo = uint32(acc);
}
// div: Divides `rs` by `rt`.
// Stores the quotient in LO
// And the remainder in HI
else if (_func == 0x1a) {
state.hi = uint32(int32(_rs) % int32(_rt));
state.lo = uint32(int32(_rs) / int32(_rt));
}
// divu: Unsigned divides `rs` by `rt`.
// Stores the quotient in LO
// And the remainder in HI
else if (_func == 0x1b) {
state.hi = _rs % _rt;
state.lo = _rs / _rt;
}
// Store the result in the destination register, if applicable
if (_storeReg != 0) {
state.registers[_storeReg] = val;
}
// Store the result in the destination register, if applicable
if (_storeReg != 0) {
state.registers[_storeReg] = val;
}
// Update the PC
state.pc = state.nextPC;
state.nextPC = state.nextPC + 4;
// Update the PC
state.pc = state.nextPC;
state.nextPC = state.nextPC + 4;
// Return the hash of the resulting state
out_ = outputState();
// Return the hash of the resulting state
out_ = outputState();
}
}
/// @notice Handles a jump instruction, updating the MIPS state PC where needed.
......@@ -399,24 +412,26 @@ contract MIPS {
/// @param _dest The destination to jump to.
/// @return out_ The hashed MIPS state.
function handleJump(uint32 _linkReg, uint32 _dest) internal returns (bytes32 out_) {
// Load state from memory.
State memory state;
assembly {
state := 0x80
}
unchecked {
// Load state from memory.
State memory state;
assembly {
state := 0x80
}
// Update the next PC to the jump destination.
uint32 prevPC = state.pc;
state.pc = state.nextPC;
state.nextPC = _dest;
// Update the next PC to the jump destination.
uint32 prevPC = state.pc;
state.pc = state.nextPC;
state.nextPC = _dest;
// Update the link-register to the instruction after the delay slot instruction.
if (_linkReg != 0) {
state.registers[_linkReg] = prevPC + 8;
}
// Update the link-register to the instruction after the delay slot instruction.
if (_linkReg != 0) {
state.registers[_linkReg] = prevPC + 8;
}
// Return the hash of the resulting state.
out_ = outputState();
// Return the hash of the resulting state.
out_ = outputState();
}
}
/// @notice Handles a storing a value into a register.
......@@ -425,39 +440,43 @@ contract MIPS {
/// @param _conditional Whether or not the store is conditional.
/// @return out_ The hashed MIPS state.
function handleRd(uint32 _storeReg, uint32 _val, bool _conditional) internal returns (bytes32 out_) {
// Load state from memory.
State memory state;
assembly {
state := 0x80
}
unchecked {
// Load state from memory.
State memory state;
assembly {
state := 0x80
}
// The destination register must be valid.
require(_storeReg < 32, "valid register");
// The destination register must be valid.
require(_storeReg < 32, "valid register");
// Never write to reg 0, and it can be conditional (movz, movn).
if (_storeReg != 0 && _conditional) {
state.registers[_storeReg] = _val;
}
// Never write to reg 0, and it can be conditional (movz, movn).
if (_storeReg != 0 && _conditional) {
state.registers[_storeReg] = _val;
}
// Update the PC.
state.pc = state.nextPC;
state.nextPC = state.nextPC + 4;
// Update the PC.
state.pc = state.nextPC;
state.nextPC = state.nextPC + 4;
// Return the hash of the resulting state.
out_ = outputState();
// Return the hash of the resulting state.
out_ = outputState();
}
}
/// @notice Computes the offset of the proof in the calldata.
/// @param _proofIndex The index of the proof in the calldata.
/// @return offset_ The offset of the proof in the calldata.
function proofOffset(uint8 _proofIndex) internal pure returns (uint256 offset_) {
// A proof of 32 bit memory, with 32-byte leaf values, is (32-5)=27 bytes32 entries.
// And the leaf value itself needs to be encoded as well. And proof.offset == 358
offset_ = 358 + (uint256(_proofIndex) * (28 * 32));
uint256 s = 0;
assembly { s := calldatasize() }
require(s >= (offset_ + 28 * 32), "check that there is enough calldata");
return offset_;
unchecked {
// A proof of 32 bit memory, with 32-byte leaf values, is (32-5)=27 bytes32 entries.
// And the leaf value itself needs to be encoded as well. And proof.offset == 358
offset_ = 358 + (uint256(_proofIndex) * (28 * 32));
uint256 s = 0;
assembly { s := calldatasize() }
require(s >= (offset_ + 28 * 32), "check that there is enough calldata");
return offset_;
}
}
/// @notice Reads a 32-bit value from memory.
......@@ -465,53 +484,55 @@ contract MIPS {
/// @param _proofIndex The index of the proof in the calldata.
/// @return out_ The hashed MIPS state.
function readMem(uint32 _addr, uint8 _proofIndex) internal pure returns (uint32 out_) {
// Compute the offset of the proof in the calldata.
uint256 offset = proofOffset(_proofIndex);
assembly {
// Validate the address alignement.
if and(_addr, 3) {
revert(0, 0)
}
unchecked {
// Compute the offset of the proof in the calldata.
uint256 offset = proofOffset(_proofIndex);
assembly {
// Validate the address alignement.
if and(_addr, 3) {
revert(0, 0)
}
// Load the leaf value.
let leaf := calldataload(offset)
offset := add(offset, 32)
// Load the leaf value.
let leaf := calldataload(offset)
offset := add(offset, 32)
// Convenience function to hash two nodes together in scratch space.
function hashPair(a, b) -> h {
mstore(0, a)
mstore(32, b)
h := keccak256(0, 64)
}
// Convenience function to hash two nodes together in scratch space.
function hashPair(a, b) -> h {
mstore(0, a)
mstore(32, b)
h := keccak256(0, 64)
}
// Start with the leaf node.
// Work back up by combining with siblings, to reconstruct the root.
let path := shr(5, _addr)
let node := leaf
for { let i := 0 } lt(i, 27) { i := add(i, 1) } {
let sibling := calldataload(offset)
offset := add(offset, 32)
switch and(shr(i, path), 1)
case 0 {
node := hashPair(node, sibling)
} case 1 {
node := hashPair(sibling, node)
// Start with the leaf node.
// Work back up by combining with siblings, to reconstruct the root.
let path := shr(5, _addr)
let node := leaf
for { let i := 0 } lt(i, 27) { i := add(i, 1) } {
let sibling := calldataload(offset)
offset := add(offset, 32)
switch and(shr(i, path), 1)
case 0 {
node := hashPair(node, sibling)
} case 1 {
node := hashPair(sibling, node)
}
}
}
// Load the memory root from the first field of state.
let memRoot := mload(0x80)
// Load the memory root from the first field of state.
let memRoot := mload(0x80)
// Verify the root matches.
if iszero(eq(node, memRoot)) {
mstore(0, 0x0badf00d)
revert(0, 32)
}
// Verify the root matches.
if iszero(eq(node, memRoot)) {
mstore(0, 0x0badf00d)
revert(0, 32)
}
// Bits to shift = (32 - 4 - (addr % 32)) * 8
let shamt := shl(3, sub(sub(32, 4), and(_addr, 31)))
out_ := and(shr(shamt, leaf), 0xFFffFFff)
// Bits to shift = (32 - 4 - (addr % 32)) * 8
let shamt := shl(3, sub(sub(32, 4), and(_addr, 31)))
out_ := and(shr(shamt, leaf), 0xFFffFFff)
}
}
}
......@@ -522,397 +543,403 @@ contract MIPS {
/// @param _proofIndex The index of the proof in the calldata.
/// @param _val The value to write.
function writeMem(uint32 _addr, uint8 _proofIndex, uint32 _val) internal pure {
// Compute the offset of the proof in the calldata.
uint256 offset = proofOffset(_proofIndex);
assembly {
// Validate the address alignement.
if and(_addr, 3) {
revert(0, 0)
}
unchecked {
// Compute the offset of the proof in the calldata.
uint256 offset = proofOffset(_proofIndex);
assembly {
// Validate the address alignement.
if and(_addr, 3) {
revert(0, 0)
}
// Load the leaf value.
let leaf := calldataload(offset)
let shamt := shl(3, sub(sub(32, 4), and(_addr, 31)))
// Load the leaf value.
let leaf := calldataload(offset)
let shamt := shl(3, sub(sub(32, 4), and(_addr, 31)))
// Mask out 4 bytes, and OR in the value
leaf := or(and(leaf, not(shl(shamt, 0xFFffFFff))), shl(shamt, _val))
offset := add(offset, 32)
// Mask out 4 bytes, and OR in the value
leaf := or(and(leaf, not(shl(shamt, 0xFFffFFff))), shl(shamt, _val))
offset := add(offset, 32)
// Convenience function to hash two nodes together in scratch space.
function hashPair(a, b) -> h {
mstore(0, a)
mstore(32, b)
h := keccak256(0, 64)
}
// Convenience function to hash two nodes together in scratch space.
function hashPair(a, b) -> h {
mstore(0, a)
mstore(32, b)
h := keccak256(0, 64)
}
// Start with the leaf node.
// Work back up by combining with siblings, to reconstruct the root.
let path := shr(5, _addr)
let node := leaf
for { let i := 0 } lt(i, 27) { i := add(i, 1) } {
let sibling := calldataload(offset)
offset := add(offset, 32)
switch and(shr(i, path), 1)
case 0 {
node := hashPair(node, sibling)
} case 1 {
node := hashPair(sibling, node)
// Start with the leaf node.
// Work back up by combining with siblings, to reconstruct the root.
let path := shr(5, _addr)
let node := leaf
for { let i := 0 } lt(i, 27) { i := add(i, 1) } {
let sibling := calldataload(offset)
offset := add(offset, 32)
switch and(shr(i, path), 1)
case 0 {
node := hashPair(node, sibling)
} case 1 {
node := hashPair(sibling, node)
}
}
}
// Store the new memory root in the first field of state.
mstore(0x80, node)
// Store the new memory root in the first field of state.
mstore(0x80, node)
}
}
}
/// @notice Executes a single step of the vm.
/// Will revert if any required input state is missing.
function step(bytes calldata stateData, bytes calldata proof) public returns (bytes32) {
State memory state;
unchecked {
State memory state;
// Packed calldata is ~6 times smaller than state size
assembly {
if iszero(eq(state, 0x80)) { // expected state mem offset check
revert(0,0)
}
if iszero(eq(mload(0x40), mul(32, 48))) { // expected memory check
revert(0,0)
}
if iszero(eq(stateData.offset, 100)) { // 32*3+4=100 expected state data offset
revert(0,0)
}
if iszero(eq(proof.offset, 358)) { // 100+32+226=358 expected proof offset
revert(0,0)
}
function putField(callOffset, memOffset, size) -> callOffsetOut, memOffsetOut {
// calldata is packed, thus starting left-aligned, shift-right to pad and right-align
let w := shr(shl(3, sub(32, size)), calldataload(callOffset))
mstore(memOffset, w)
callOffsetOut := add(callOffset, size)
memOffsetOut := add(memOffset, 32)
}
// Unpack state from calldata into memory
let c := stateData.offset // calldata offset
let m := 0x80 // mem offset
c, m := putField(c, m, 32) // memRoot
c, m := putField(c, m, 32) // preimageKey
c, m := putField(c, m, 4) // preimageOffset
c, m := putField(c, m, 4) // pc
c, m := putField(c, m, 4) // nextPC
c, m := putField(c, m, 4) // lo
c, m := putField(c, m, 4) // hi
c, m := putField(c, m, 4) // heap
c, m := putField(c, m, 1) // exitCode
c, m := putField(c, m, 1) // exited
c, m := putField(c, m, 8) // step
// Unpack register calldata into memory
mstore(m, add(m, 32)) // offset to registers
m := add(m, 32)
for { let i := 0 } lt(i, 32) { i := add(i, 1) } {
c, m := putField(c, m, 4)
}
}
// Packed calldata is ~6 times smaller than state size
assembly {
if iszero(eq(state, 0x80)) { // expected state mem offset check
revert(0,0)
}
if iszero(eq(mload(0x40), mul(32, 48))) { // expected memory check
revert(0,0)
}
if iszero(eq(stateData.offset, 100)) { // 32*3+4=100 expected state data offset
revert(0,0)
}
if iszero(eq(proof.offset, 358)) { // 100+32+226=358 expected proof offset
revert(0,0)
}
// Don't change state once exited
if (state.exited) {
return outputState();
}
function putField(callOffset, memOffset, size) -> callOffsetOut, memOffsetOut {
// calldata is packed, thus starting left-aligned, shift-right to pad and right-align
let w := shr(shl(3, sub(32, size)), calldataload(callOffset))
mstore(memOffset, w)
callOffsetOut := add(callOffset, size)
memOffsetOut := add(memOffset, 32)
}
state.step += 1;
// Unpack state from calldata into memory
let c := stateData.offset // calldata offset
let m := 0x80 // mem offset
c, m := putField(c, m, 32) // memRoot
c, m := putField(c, m, 32) // preimageKey
c, m := putField(c, m, 4) // preimageOffset
c, m := putField(c, m, 4) // pc
c, m := putField(c, m, 4) // nextPC
c, m := putField(c, m, 4) // lo
c, m := putField(c, m, 4) // hi
c, m := putField(c, m, 4) // heap
c, m := putField(c, m, 1) // exitCode
c, m := putField(c, m, 1) // exited
c, m := putField(c, m, 8) // step
// Unpack register calldata into memory
mstore(m, add(m, 32)) // offset to registers
m := add(m, 32)
for { let i := 0 } lt(i, 32) { i := add(i, 1) } {
c, m := putField(c, m, 4)
}
}
// instruction fetch
uint32 insn = readMem(state.pc, 0);
uint32 opcode = insn >> 26; // 6-bits
// Don't change state once exited
if (state.exited) {
return outputState();
}
// j-type j/jal
if (opcode == 2 || opcode == 3) {
// TODO(CLI-4136): likely bug in original code: MIPS spec says this should be in the "current" region;
// a 256 MB aligned region (i.e. use top 4 bits of branch delay slot (pc+4))
return handleJump(opcode == 2 ? 0 : 31, SE(insn & 0x03FFFFFF, 26) << 2);
}
state.step += 1;
// register fetch
uint32 rs; // source register 1 value
uint32 rt; // source register 2 / temp value
uint32 rtReg = (insn >> 16) & 0x1F;
// R-type or I-type (stores rt)
rs = state.registers[(insn >> 21) & 0x1F];
uint32 rdReg = rtReg;
if (opcode == 0 || opcode == 0x1c) {
// R-type (stores rd)
rt = state.registers[rtReg];
rdReg = (insn >> 11) & 0x1F;
} else if (opcode < 0x20) {
// rt is SignExtImm
// don't sign extend for andi, ori, xori
if (opcode == 0xC || opcode == 0xD || opcode == 0xe) {
// ZeroExtImm
rt = insn & 0xFFFF;
} else {
// SignExtImm
rt = SE(insn & 0xFFFF, 16);
// instruction fetch
uint32 insn = readMem(state.pc, 0);
uint32 opcode = insn >> 26; // 6-bits
// j-type j/jal
if (opcode == 2 || opcode == 3) {
// TODO(CLI-4136): likely bug in original code: MIPS spec says this should be in the "current" region;
// a 256 MB aligned region (i.e. use top 4 bits of branch delay slot (pc+4))
return handleJump(opcode == 2 ? 0 : 31, SE(insn & 0x03FFFFFF, 26) << 2);
}
} else if (opcode >= 0x28 || opcode == 0x22 || opcode == 0x26) {
// store rt value with store
rt = state.registers[rtReg];
// store actual rt with lwl and lwr
rdReg = rtReg;
}
// register fetch
uint32 rs; // source register 1 value
uint32 rt; // source register 2 / temp value
uint32 rtReg = (insn >> 16) & 0x1F;
if ((opcode >= 4 && opcode < 8) || opcode == 1) {
return handleBranch(opcode, insn, rtReg, rs);
}
// R-type or I-type (stores rt)
rs = state.registers[(insn >> 21) & 0x1F];
uint32 rdReg = rtReg;
uint32 storeAddr = 0xFF_FF_FF_FF;
// memory fetch (all I-type)
// we do the load for stores also
uint32 mem;
if (opcode >= 0x20) {
// M[R[rs]+SignExtImm]
rs += SE(insn&0xFFFF, 16);
uint32 addr = rs & 0xFFFFFFFC;
mem = readMem(addr, 1);
if (opcode >= 0x28 && opcode != 0x30) {
// store
storeAddr = addr;
// store opcodes don't write back to a register
rdReg = 0;
if (opcode == 0 || opcode == 0x1c) {
// R-type (stores rd)
rt = state.registers[rtReg];
rdReg = (insn >> 11) & 0x1F;
} else if (opcode < 0x20) {
// rt is SignExtImm
// don't sign extend for andi, ori, xori
if (opcode == 0xC || opcode == 0xD || opcode == 0xe) {
// ZeroExtImm
rt = insn & 0xFFFF;
} else {
// SignExtImm
rt = SE(insn & 0xFFFF, 16);
}
} else if (opcode >= 0x28 || opcode == 0x22 || opcode == 0x26) {
// store rt value with store
rt = state.registers[rtReg];
// store actual rt with lwl and lwr
rdReg = rtReg;
}
if ((opcode >= 4 && opcode < 8) || opcode == 1) {
return handleBranch(opcode, insn, rtReg, rs);
}
uint32 storeAddr = 0xFF_FF_FF_FF;
// memory fetch (all I-type)
// we do the load for stores also
uint32 mem;
if (opcode >= 0x20) {
// M[R[rs]+SignExtImm]
rs += SE(insn&0xFFFF, 16);
uint32 addr = rs & 0xFFFFFFFC;
mem = readMem(addr, 1);
if (opcode >= 0x28 && opcode != 0x30) {
// store
storeAddr = addr;
// store opcodes don't write back to a register
rdReg = 0;
}
}
}
// ALU
uint32 val = execute(insn, rs, rt, mem) & 0xffFFffFF; // swr outputs more than 4 bytes without the mask
// ALU
uint32 val = execute(insn, rs, rt, mem) & 0xffFFffFF; // swr outputs more than 4 bytes without the mask
uint32 func = insn & 0x3f; // 6-bits
if (opcode == 0 && func >= 8 && func < 0x1c) {
if (func == 8 || func == 9) { // jr/jalr
return handleJump(func == 8 ? 0 : rdReg, rs);
}
uint32 func = insn & 0x3f; // 6-bits
if (opcode == 0 && func >= 8 && func < 0x1c) {
if (func == 8 || func == 9) { // jr/jalr
return handleJump(func == 8 ? 0 : rdReg, rs);
}
if (func == 0xa) { // movz
return handleRd(rdReg, rs, rt == 0);
}
if (func == 0xb) { // movn
return handleRd(rdReg, rs, rt != 0);
}
if (func == 0xa) { // movz
return handleRd(rdReg, rs, rt == 0);
}
if (func == 0xb) { // movn
return handleRd(rdReg, rs, rt != 0);
}
// syscall (can read and write)
if (func == 0xC) {
return handleSyscall();
}
// syscall (can read and write)
if (func == 0xC) {
return handleSyscall();
// lo and hi registers
// can write back
if (func >= 0x10 && func < 0x1c) {
return handleHiLo(func, rs, rt, rdReg);
}
}
// lo and hi registers
// can write back
if (func >= 0x10 && func < 0x1c) {
return handleHiLo(func, rs, rt, rdReg);
// stupid sc, write a 1 to rt
if (opcode == 0x38 && rtReg != 0) {
state.registers[rtReg] = 1;
}
}
// stupid sc, write a 1 to rt
if (opcode == 0x38 && rtReg != 0) {
state.registers[rtReg] = 1;
}
// write memory
if (storeAddr != 0xFF_FF_FF_FF) {
writeMem(storeAddr, 1, val);
}
// write memory
if (storeAddr != 0xFF_FF_FF_FF) {
writeMem(storeAddr, 1, val);
// write back the value to destination register
return handleRd(rdReg, val, true);
}
// write back the value to destination register
return handleRd(rdReg, val, true);
}
/// @notice Execute an instruction.
function execute(uint32 insn, uint32 rs, uint32 rt, uint32 mem) internal pure returns (uint32) {
uint32 opcode = insn >> 26; // 6-bits
uint32 func = insn & 0x3f; // 6-bits
// TODO(CLI-4136): deref the immed into a register
if (opcode < 0x20) {
// transform ArithLogI
// TODO(CLI-4136): replace with table
if (opcode >= 8 && opcode < 0xF) {
if (opcode == 8) { func = 0x20; } // addi
else if (opcode == 9) { func = 0x21; } // addiu
else if (opcode == 0xa) { func = 0x2a; } // slti
else if (opcode == 0xb) { func = 0x2B; } // sltiu
else if (opcode == 0xc) { func = 0x24; } // andi
else if (opcode == 0xd) { func = 0x25; } // ori
else if (opcode == 0xe) { func = 0x26; } // xori
opcode = 0;
}
// 0 is opcode SPECIAL
if (opcode == 0) {
uint32 shamt = (insn >> 6) & 0x1f;
if (func < 0x20) {
// jr/jalr/div + others
if (func >= 0x08) {
return rs;
unchecked {
uint32 opcode = insn >> 26; // 6-bits
uint32 func = insn & 0x3f; // 6-bits
// TODO(CLI-4136): deref the immed into a register
if (opcode < 0x20) {
// transform ArithLogI
// TODO(CLI-4136): replace with table
if (opcode >= 8 && opcode < 0xF) {
if (opcode == 8) { func = 0x20; } // addi
else if (opcode == 9) { func = 0x21; } // addiu
else if (opcode == 0xa) { func = 0x2a; } // slti
else if (opcode == 0xb) { func = 0x2B; } // sltiu
else if (opcode == 0xc) { func = 0x24; } // andi
else if (opcode == 0xd) { func = 0x25; } // ori
else if (opcode == 0xe) { func = 0x26; } // xori
opcode = 0;
}
// 0 is opcode SPECIAL
if (opcode == 0) {
uint32 shamt = (insn >> 6) & 0x1f;
if (func < 0x20) {
// jr/jalr/div + others
if (func >= 0x08) {
return rs;
}
// sll: Logical Shift Left
else if (func == 0x00) {
return rt << shamt;
}
// srl: Logical Shift Right
else if (func == 0x02) {
return rt >> shamt;
}
// sra: Arithmetic Shift Right
else if (func == 0x03) {
return SE(rt >> shamt, 32 - shamt);
}
// sllv: Variable Logical Shift Left
else if (func == 0x04) {
return rt << (rs & 0x1F);
}
// srlv: Variable Logical Shift Right
else if (func == 0x06) {
return rt >> (rs & 0x1F);
}
// srav: Variable Arithmetic Shift Right
else if (func == 0x07) {
return SE(rt >> rs, 32 - rs);
}
}
// sll: Logical Shift Left
else if (func == 0x00) {
return rt << shamt;
// R-type (ArithLog)
// 0x10-0x13 = mfhi, mthi, mflo, mtlo
// add or addu
if (func == 0x20 || func == 0x21) {
return rs + rt;
}
// srl: Logical Shift Right
else if (func == 0x02) {
return rt >> shamt;
// sub or subu
else if (func == 0x22 || func == 0x23) {
return rs - rt;
}
// sra: Arithmetic Shift Right
else if (func == 0x03) {
return SE(rt >> shamt, 32 - shamt);
// and
else if (func == 0x24) {
return rs & rt;
}
// sllv: Variable Logical Shift Left
else if (func == 0x04) {
return rt << (rs & 0x1F);
// or
else if (func == 0x25) {
return (rs | rt);
}
// srlv: Variable Logical Shift Right
else if (func == 0x06) {
return rt >> (rs & 0x1F);
// xor
else if (func == 0x26) {
return (rs ^ rt);
}
// srav: Variable Arithmetic Shift Right
else if (func == 0x07) {
return SE(rt >> rs, 32 - rs);
// nor
else if (func == 0x27) {
return ~(rs | rt);
}
// slt: Set to 1 if less than
else if (func == 0x2a) {
return int32(rs) < int32(rt) ? 1 : 0;
}
// sltu: Set to 1 if less than unsigned
else if (func == 0x2B) {
return rs<rt ? 1 : 0;
}
}
// R-type (ArithLog)
// 0x10-0x13 = mfhi, mthi, mflo, mtlo
// add or addu
if (func == 0x20 || func == 0x21) {
return rs + rt;
}
// sub or subu
else if (func == 0x22 || func == 0x23) {
return rs - rt;
// lui: Load Upper Immediate
else if (opcode == 0xf) {
return rt << 16;
}
// and
else if (func == 0x24) {
return rs & rt;
// SPECIAL2
else if (opcode == 0x1c) {
// mul
if (func == 2) {
return uint32(int32(rs) * int32(rt));
}
// clo
if (func == 0x20 || func == 0x21) {
if (func == 0x20) {
rs = ~rs;
}
uint32 i = 0;
while (rs&0x80000000 != 0) {
i++;
rs <<= 1;
}
return i;
}
}
// or
else if (func == 0x25) {
return (rs | rt);
}
else if (opcode < 0x28) {
// lb
if (opcode == 0x20) {
return SE((mem >> (24 - (rs & 3) * 8)) & 0xFF, 8);
}
// xor
else if (func == 0x26) {
return (rs ^ rt);
// lh
else if (opcode == 0x21) {
return SE((mem >> (16 - (rs & 2) * 8)) & 0xFFFF, 16);
}
// nor
else if (func == 0x27) {
return ~(rs | rt);
// lwl
else if (opcode == 0x22) {
uint32 val = mem << ((rs & 3) * 8);
uint32 mask = uint32(0xFFFFFFFF) << ((rs & 3) * 8);
return (rt & ~mask) | val;
}
// slt: Set to 1 if less than
else if (func == 0x2a) {
return int32(rs) < int32(rt) ? 1 : 0;
// lw
else if (opcode == 0x23) {
return mem;
}
// sltu: Set to 1 if less than unsigned
else if (func == 0x2B) {
return rs<rt ? 1 : 0;
// lbu
else if (opcode == 0x24) {
return (mem >> (24 - (rs & 3) * 8)) & 0xFF;
}
}
// lui: Load Upper Immediate
else if (opcode == 0xf) {
return rt << 16;
}
// SPECIAL2
else if (opcode == 0x1c) {
// mul
if (func == 2) {
return uint32(int32(rs) * int32(rt));
// lhu
else if (opcode == 0x25) {
return (mem >> (16 - (rs & 2) * 8)) & 0xFFFF;
}
// clo
if (func == 0x20 || func == 0x21) {
if (func == 0x20) {
rs = ~rs;
}
uint32 i = 0;
while (rs&0x80000000 != 0) {
i++;
rs <<= 1;
}
return i;
// lwr
else if (opcode == 0x26) {
uint32 val = mem >> (24 - (rs & 3) * 8);
uint32 mask = uint32(0xFFFFFFFF) >> (24 - (rs & 3) * 8);
return (rt & ~mask) | val;
}
}
}
else if (opcode < 0x28) {
// lb
if (opcode == 0x20) {
return SE((mem >> (24 - (rs & 3) * 8)) & 0xFF, 8);
}
// lh
else if (opcode == 0x21) {
return SE((mem >> (16 - (rs & 2) * 8)) & 0xFFFF, 16);
}
// lwl
else if (opcode == 0x22) {
uint32 val = mem << ((rs & 3) * 8);
uint32 mask = uint32(0xFFFFFFFF) << ((rs & 3) * 8);
return (rt & ~mask) | val;
}
// lw
else if (opcode == 0x23) {
// sb
else if (opcode == 0x28) {
uint32 val = (rt & 0xFF) << (24 - (rs & 3) * 8);
uint32 mask = 0xFFFFFFFF ^ uint32(0xFF << (24 - (rs & 3) * 8));
return (mem & mask) | val;
}
// sh
else if (opcode == 0x29) {
uint32 val = (rt & 0xFFFF) << (16 - (rs & 2) * 8);
uint32 mask = 0xFFFFFFFF ^ uint32(0xFFFF << (16 - (rs & 2) * 8));
return (mem & mask) | val;
}
// swl
else if (opcode == 0x2a) {
uint32 val = rt >> ((rs & 3) * 8);
uint32 mask = uint32(0xFFFFFFFF) >> ((rs & 3) * 8);
return (mem & ~mask) | val;
}
// sw
else if (opcode == 0x2b) {
return rt;
}
// swr
else if (opcode == 0x2e) {
uint32 val = rt << (24 - (rs & 3) * 8);
uint32 mask = uint32(0xFFFFFFFF) << (24 - (rs & 3) * 8);
return (mem & ~mask) | val;
}
// ll
else if (opcode == 0x30) {
return mem;
}
// lbu
else if (opcode == 0x24) {
return (mem >> (24 - (rs & 3) * 8)) & 0xFF;
}
// lhu
else if (opcode == 0x25) {
return (mem >> (16 - (rs & 2) * 8)) & 0xFFFF;
// sc
else if (opcode == 0x38) {
return rt;
}
// lwr
else if (opcode == 0x26) {
uint32 val = mem >> (24 - (rs & 3) * 8);
uint32 mask = uint32(0xFFFFFFFF) >> (24 - (rs & 3) * 8);
return (rt & ~mask) | val;
}
}
// sb
else if (opcode == 0x28) {
uint32 val = (rt & 0xFF) << (24 - (rs & 3) * 8);
uint32 mask = 0xFFFFFFFF ^ uint32(0xFF << (24 - (rs & 3) * 8));
return (mem & mask) | val;
}
// sh
else if (opcode == 0x29) {
uint32 val = (rt & 0xFFFF) << (16 - (rs & 2) * 8);
uint32 mask = 0xFFFFFFFF ^ uint32(0xFFFF << (16 - (rs & 2) * 8));
return (mem & mask) | val;
}
// swl
else if (opcode == 0x2a) {
uint32 val = rt >> ((rs & 3) * 8);
uint32 mask = uint32(0xFFFFFFFF) >> ((rs & 3) * 8);
return (mem & ~mask) | val;
}
// sw
else if (opcode == 0x2b) {
return rt;
}
// swr
else if (opcode == 0x2e) {
uint32 val = rt << (24 - (rs & 3) * 8);
uint32 mask = uint32(0xFFFFFFFF) << (24 - (rs & 3) * 8);
return (mem & ~mask) | val;
}
// ll
else if (opcode == 0x30) {
return mem;
}
// sc
else if (opcode == 0x38) {
return rt;
}
revert("invalid instruction");
revert("invalid instruction");
}
}
}
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
/// @title PreimageKeyLib
/// @notice Shared utilities for localizing local keys in the preimage oracle.
library PreimageKeyLib {
/// @notice Generates a context-specific local key for the given local data identifier.
/// @dev See `localize` for a description of the localization operation.
/// @param _ident The identifier of the local data. [0, 32) bytes in size.
/// @return key_ The context-specific local key.
function localizeIdent(uint256 _ident) internal view returns (bytes32 key_) {
assembly {
// Set the type byte in the given identifier to `1` (Local). We only care about
// the [1, 32) bytes in this value.
key_ := or(shl(248, 1), and(_ident, not(shl(248, 0xFF))))
}
key_ = localize(key_);
}
/// @notice Localizes a given local data key for the caller's context.
/// @dev The localization operation is defined as:
/// localize(k) = H(k .. sender) & ~(0xFF << 248) | (0x01 << 248)
/// where H is the Keccak-256 hash function.
/// @param _key The local data key to localize.
/// @return localizedKey_ The localized local data key.
function localize(bytes32 _key) internal view returns (bytes32 localizedKey_) {
assembly {
// Store the local data key and caller next to each other in memory for hashing.
mstore(0, _key)
mstore(0x20, caller())
// Localize the key with the above `localize` operation.
localizedKey_ := or(and(keccak256(0, 0x40), not(shl(248, 0xFF))), shl(248, 1))
}
}
/// @notice Computes and returns the key for a global keccak pre-image.
/// @param _preimage The pre-image.
/// @return key_ The pre-image key.
function keccak256PreimageKey(bytes memory _preimage) internal pure returns (bytes32 key_) {
assembly {
// Grab the size of the `_preimage`
let size := mload(_preimage)
// Compute the pre-image keccak256 hash (aka the pre-image key)
let h := keccak256(add(_preimage, 0x20), size)
// Mask out prefix byte, replace with type 2 byte
key_ := or(and(h, not(shl(248, 0xFF))), shl(248, 2))
}
}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity 0.8.15;
import { IPreimageOracle } from "./interfaces/IPreimageOracle.sol";
import { PreimageKeyLib } from "./PreimageKeyLib.sol";
import "./libraries/CannonErrors.sol";
/// @title PreimageOracle
/// @notice A contract for storing permissioned pre-images.
contract PreimageOracle {
contract PreimageOracle is IPreimageOracle {
/// @notice Mapping of pre-image keys to pre-image lengths.
mapping(bytes32 => uint256) public preimageLengths;
/// @notice Mapping of pre-image keys to pre-image parts.
mapping(bytes32 => mapping(uint256 => bytes32)) public preimageParts;
/// @notice Mapping of pre-image keys to pre-image part offsets.
mapping(bytes32 => mapping(uint256 => bool)) public preimagePartOk;
/// @notice Reads a pre-image from the oracle.
/// @param _key The key of the pre-image to read.
/// @param _offset The offset of the pre-image to read.
/// @return dat_ The pre-image data.
/// @return datLen_ The length of the pre-image data.
/// @inheritdoc IPreimageOracle
function readPreimage(bytes32 _key, uint256 _offset)
external
view
......@@ -37,11 +35,11 @@ contract PreimageOracle {
dat_ = preimageParts[_key][_offset];
}
// TODO(CLI-4104):
// we need to mix-in the ID of the dispute for local-type keys to avoid collisions,
// and restrict local pre-image insertion to the dispute-managing contract.
// For now we permit anyone to write any pre-image unchecked, to make testing easy.
// This method is DANGEROUS. And NOT FOR PRODUCTION.
/// TODO(CLI-4104):
/// we need to mix-in the ID of the dispute for local-type keys to avoid collisions,
/// and restrict local pre-image insertion to the dispute-managing contract.
/// For now we permit anyone to write any pre-image unchecked, to make testing easy.
/// This method is DANGEROUS. And NOT FOR PRODUCTION.
function cheat(
uint256 partOffset,
bytes32 key,
......@@ -53,37 +51,43 @@ contract PreimageOracle {
preimageLengths[key] = size;
}
/// @notice Computes and returns the key for a pre-image.
/// @param _preimage The pre-image.
/// @return key_ The pre-image key.
function computePreimageKey(bytes calldata _preimage) external pure returns (bytes32 key_) {
uint256 size;
assembly {
size := calldataload(0x24)
// Leave slots 0x40 and 0x60 untouched,
// and everything after as scratch-memory.
let ptr := 0x80
/// @inheritdoc IPreimageOracle
function loadLocalData(
uint256 _ident,
bytes32 _word,
uint256 _size,
uint256 _partOffset
) external returns (bytes32 key_) {
// Compute the localized key from the given local identifier.
key_ = PreimageKeyLib.localizeIdent(_ident);
// Store size as a big-endian uint64 at the start of pre-image
mstore(ptr, shl(192, size))
ptr := add(ptr, 8)
// Revert if the given part offset is not within bounds.
if (_partOffset > _size + 8 || _size > 32) {
revert PartOffsetOOB();
}
// Copy preimage payload into memory so we can hash and read it.
calldatacopy(ptr, _preimage.offset, size)
// Prepare the local data part at the given offset
bytes32 part;
assembly {
// Clean the memory in [0x20, 0x40)
mstore(0x20, 0x00)
// Compute the pre-image keccak256 hash (aka the pre-image key)
let h := keccak256(ptr, size)
// Store the full local data in scratch space.
mstore(0x00, shl(192, _size))
mstore(0x08, _word)
// Mask out prefix byte, replace with type 2 byte
key_ := or(and(h, not(shl(248, 0xFF))), shl(248, 2))
// Prepare the local data part at the requested offset.
part := mload(_partOffset)
}
// Store the first part with `_partOffset`.
preimagePartOk[key_][_partOffset] = true;
preimageParts[key_][_partOffset] = part;
// Assign the length of the preimage at the localized key.
preimageLengths[key_] = _size;
}
/// @notice Prepares a pre-image to be read by keccak256 key, starting at
/// the given offset and up to 32 bytes (clipped at pre-image length, if out of data).
/// @param _partOffset The offset of the pre-image to read.
/// @param _preimage The preimage data.
/// @inheritdoc IPreimageOracle
function loadKeccak256PreimagePart(uint256 _partOffset, bytes calldata _preimage) external {
uint256 size;
bytes32 key;
......@@ -94,7 +98,10 @@ contract PreimageOracle {
// revert if part offset > size+8 (i.e. parts must be within bounds)
if gt(_partOffset, add(size, 8)) {
revert(0, 0)
// Store "PartOffsetOOB()"
mstore(0, 0xfe254987)
// Revert with "PartOffsetOOB()"
revert(0x1c, 4)
}
// we leave solidity slots 0x40 and 0x60 untouched,
// and everything after as scratch-memory.
......
// SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
pragma solidity 0.8.15;
/// @title IPreimageOracle
/// @notice Interface for a preimage oracle.
......@@ -14,10 +14,31 @@ interface IPreimageOracle {
view
returns (bytes32 dat_, uint256 datLen_);
/// @notice Computes and returns the key for a pre-image.
/// @param _preimage The pre-image.
/// @return key_ The pre-image key.
function computePreimageKey(bytes calldata _preimage) external pure returns (bytes32 key_);
/// @notice Loads of local data part into the preimage oracle.
/// @param _ident The identifier of the local data.
/// @param _word The local data word.
/// @param _size The number of bytes in `_word` to load.
/// @param _partOffset The offset of the local data part to write to the oracle.
/// @dev The local data parts are loaded into the preimage oracle under the context
/// of the caller - no other account can write to the caller's context
/// specific data.
///
/// There are 5 local data identifiers:
/// ┌────────────┬────────────────────────┐
/// │ Identifier │ Data │
/// ├────────────┼────────────────────────┤
/// │ 1 │ L1 Head Hash (bytes32) │
/// │ 2 │ Output Root (bytes32) │
/// │ 3 │ Root Claim (bytes32) │
/// │ 4 │ L2 Block Number (u64) │
/// │ 5 │ Chain ID (u64) │
/// └────────────┴────────────────────────┘
function loadLocalData(
uint256 _ident,
bytes32 _word,
uint256 _size,
uint256 _partOffset
) external returns (bytes32 key_);
/// @notice Prepares a preimage to be read by keccak256 key, starting at
/// the given offset and up to 32 bytes (clipped at preimage length, if out of data).
......
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
/// @notice Thrown when a passed part offset is out of bounds.
error PartOffsetOOB();
......@@ -5,9 +5,11 @@ import { IDisputeGame } from "./interfaces/IDisputeGame.sol";
import { IFaultDisputeGame } from "./interfaces/IFaultDisputeGame.sol";
import { IInitializable } from "./interfaces/IInitializable.sol";
import { IBondManager } from "./interfaces/IBondManager.sol";
import { IBigStepper } from "./interfaces/IBigStepper.sol";
import { IBigStepper, IPreimageOracle } from "./interfaces/IBigStepper.sol";
import { L2OutputOracle } from "../L1/L2OutputOracle.sol";
import { Clone } from "../libraries/Clone.sol";
import { Types } from "../libraries/Types.sol";
import { Semver } from "../universal/Semver.sol";
import { LibHashing } from "./lib/LibHashing.sol";
import { LibPosition } from "./lib/LibPosition.sol";
......@@ -33,9 +35,12 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
/// @notice The duration of the game.
Duration public immutable GAME_DURATION;
/// @notice A hypervisor that performs single instruction steps on a fault proof program trace.
/// @notice An onchain VM that performs single instruction steps on a fault proof program trace.
IBigStepper public immutable VM;
/// @notice The trusted L2OutputOracle contract.
L2OutputOracle public immutable L2_OUTPUT_ORACLE;
/// @notice The root claim's position is always at gindex 1.
Position internal constant ROOT_POSITION = Position.wrap(1);
......@@ -48,6 +53,9 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
/// @inheritdoc IDisputeGame
IBondManager public bondManager;
/// @inheritdoc IFaultDisputeGame
Hash public l1Head;
/// @notice An append-only array of all claims made during the dispute game.
ClaimData[] public claimData;
......@@ -55,16 +63,24 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
mapping(ClaimHash => bool) internal claims;
/// @param _absolutePrestate The absolute prestate of the instruction trace.
/// @param _maxGameDepth The maximum depth of bisection.
/// @param _gameDuration The duration of the game.
/// @param _vm An onchain VM that performs single instruction steps on a fault proof program
/// trace.
/// @param _l2oo The trusted L2OutputOracle contract.
/// @custom:semver 0.0.4
constructor(
Claim _absolutePrestate,
uint256 _maxGameDepth,
Duration _gameDuration,
IBigStepper _vm
) Semver(0, 0, 3) {
IBigStepper _vm,
L2OutputOracle _l2oo
) Semver(0, 0, 4) {
ABSOLUTE_PRESTATE = _absolutePrestate;
MAX_GAME_DEPTH = _maxGameDepth;
GAME_DURATION = _gameDuration;
VM = _vm;
L2_OUTPUT_ORACLE = _l2oo;
}
////////////////////////////////////////////////////////////////
......@@ -241,6 +257,38 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
move(_parentIndex, _claim, false);
}
/// @inheritdoc IFaultDisputeGame
function addLocalData(uint256 _ident, uint256 _partOffset) external {
// INVARIANT: Local data can only be added if the game is currently in progress.
if (status != GameStatus.IN_PROGRESS) revert GameNotInProgress();
IPreimageOracle oracle = VM.oracle();
if (_ident == 1) {
// Load the L1 head hash into the game's local context in the preimage oracle.
oracle.loadLocalData(_ident, Hash.unwrap(l1Head), 32, _partOffset);
} else if (_ident == 2) {
// Load the earliest output root that commits to the passed L2 block number
// into the game's local context in the preimage oracle.
Types.OutputProposal memory proposal = L2_OUTPUT_ORACLE.getL2OutputAfter(
l2BlockNumber()
);
oracle.loadLocalData(_ident, proposal.outputRoot, 32, _partOffset);
} else if (_ident == 3) {
// Load the root claim into the game's local context in the preimage oracle.
oracle.loadLocalData(_ident, Claim.unwrap(rootClaim()), 32, _partOffset);
} else if (_ident == 4) {
// Load the L2 block number into the game's local context in the preimage oracle.
// The L2 block number is stored as a big-endian uint64 in the upper 8 bytes of the
// passed word.
oracle.loadLocalData(_ident, bytes32(l2BlockNumber() << 192), 8, _partOffset);
} else if (_ident == 5) {
// Load the chain ID into the game's local context in the preimage oracle.
// The chain ID is stored as a big-endian uint64 in the upper 8 bytes of the
// passed word.
oracle.loadLocalData(_ident, bytes32(block.chainid << 192), 8, _partOffset);
}
}
/// @inheritdoc IFaultDisputeGame
function l2BlockNumber() public pure returns (uint256 l2BlockNumber_) {
l2BlockNumber_ = _getArgUint256(0x20);
......@@ -337,8 +385,6 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
/// @inheritdoc IDisputeGame
function extraData() public pure returns (bytes memory extraData_) {
// The extra data starts at the second word within the cwia calldata.
// TODO: What data do we need to pass along to this contract from the factory?
// Block hash, preimage data, etc.?
extraData_ = _getArgDynBytes(0x20, 0x20);
}
......@@ -378,6 +424,9 @@ contract FaultDisputeGame is IFaultDisputeGame, Clone, Semver {
countered: false
})
);
// Set the L1 head hash at the time of the game's creation.
l1Head = Hash.wrap(blockhash(block.number - 1));
}
/// @notice Returns the length of the `claimData` array.
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import { IPreimageOracle } from "../../cannon/interfaces/IPreimageOracle.sol";
/// @title IBigStepper
/// @notice An interface for a contract with a state transition function that
/// will accept a pre state and return a post state.
......@@ -31,4 +33,7 @@ interface IBigStepper {
function step(bytes calldata _stateData, bytes calldata _proof)
external
returns (bytes32 postState_);
/// @notice Returns the preimage oracle used by the stepper.
function oracle() external view returns (IPreimageOracle oracle_);
}
......@@ -22,19 +22,18 @@ interface IDisputeGame is IInitializable {
function status() external view returns (GameStatus status_);
/// @notice Getter for the game type.
/// @dev `clones-with-immutable-args` argument #1
/// @dev The reference impl should be entirely different depending on the type (fault, validity)
/// i.e. The game type should indicate the security model.
/// @return gameType_ The type of proof system being used.
function gameType() external pure returns (GameType gameType_);
/// @notice Getter for the root claim.
/// @dev `clones-with-immutable-args` argument #2
/// @dev `clones-with-immutable-args` argument #1
/// @return rootClaim_ The root claim of the DisputeGame.
function rootClaim() external pure returns (Claim rootClaim_);
/// @notice Getter for the extra data.
/// @dev `clones-with-immutable-args` argument #3
/// @dev `clones-with-immutable-args` argument #2
/// @return extraData_ Any extra data supplied to the dispute game contract by the creator.
function extraData() external pure returns (bytes memory extraData_);
......
......@@ -53,6 +53,14 @@ interface IFaultDisputeGame is IDisputeGame {
bytes calldata _proof
) external;
/// @notice Posts the requested local data to the VM's `PreimageOralce`.
/// @param _ident The local identifier of the data to post.
/// @param _partOffset The offset of the data to post.
function addLocalData(uint256 _ident, uint256 _partOffset) external;
/// @notice Returns the L1 block hash at the time of the game's creation.
function l1Head() external view returns (Hash l1Head_);
/// @notice The l2BlockNumber that the `rootClaim` commits to. The trace being bisected within
/// the game is from `l2BlockNumber - 1` -> `l2BlockNumber`.
/// @return l2BlockNumber_ The l2BlockNumber that the `rootClaim` commits to.
......
......@@ -64,6 +64,7 @@ contract AssetReceiver is Transactor {
function withdrawETH(address payable _to, uint256 _amount) public onlyOwner {
// slither-disable-next-line reentrancy-unlimited-gas
(bool success, ) = _to.call{ value: _amount }("");
success; // Suppress warning; We ignore the low-level call result.
emit WithdrewETH(msg.sender, _to, _amount);
}
......
......@@ -4,14 +4,15 @@ pragma solidity ^0.8.15;
import { Test } from "forge-std/Test.sol";
import { Vm } from "forge-std/Vm.sol";
import { DisputeGameFactory_Init } from "./DisputeGameFactory.t.sol";
import { DisputeGameFactory } from "../src/dispute/DisputeGameFactory.sol";
import { FaultDisputeGame } from "../src/dispute/FaultDisputeGame.sol";
import { DisputeGameFactory } from "src/dispute/DisputeGameFactory.sol";
import { FaultDisputeGame } from "src/dispute/FaultDisputeGame.sol";
import { L2OutputOracle } from "src/L1/L2OutputOracle.sol";
import "../src/libraries/DisputeTypes.sol";
import "../src/libraries/DisputeErrors.sol";
import { LibClock } from "../src/dispute/lib/LibClock.sol";
import { LibPosition } from "../src/dispute/lib/LibPosition.sol";
import { IBigStepper } from "../src/dispute/interfaces/IBigStepper.sol";
import "src/libraries/DisputeTypes.sol";
import "src/libraries/DisputeErrors.sol";
import { LibClock } from "src/dispute/lib/LibClock.sol";
import { LibPosition } from "src/dispute/lib/LibPosition.sol";
import { IBigStepper, IPreimageOracle } from "src/dispute/interfaces/IBigStepper.sol";
contract FaultDisputeGame_Init is DisputeGameFactory_Init {
/// @dev The extra data passed to the game for initialization.
......@@ -28,12 +29,14 @@ contract FaultDisputeGame_Init is DisputeGameFactory_Init {
function init(Claim rootClaim, Claim absolutePrestate) public {
super.setUp();
// Deploy an implementation of the fault game
gameImpl = new FaultDisputeGame(
absolutePrestate,
4,
Duration.wrap(7 days),
new AlphabetVM(absolutePrestate)
new AlphabetVM(absolutePrestate),
L2OutputOracle(deployNoop())
);
// Register the game implementation with the factory.
factory.setImplementation(GAME_TYPE, gameImpl);
......@@ -889,9 +892,11 @@ contract VariableDivergentPlayer is GamePlayer {
contract AlphabetVM is IBigStepper {
Claim internal immutable ABSOLUTE_PRESTATE;
IPreimageOracle public oracle;
constructor(Claim _absolutePrestate) {
ABSOLUTE_PRESTATE = _absolutePrestate;
oracle = IPreimageOracle(deployNoop());
}
/// @inheritdoc IBigStepper
......@@ -915,3 +920,16 @@ contract AlphabetVM is IBigStepper {
postState_ = keccak256(abi.encode(traceIndex, claim + 1));
}
}
////////////////////////////////////////////////////////////////
// HELPERS //
////////////////////////////////////////////////////////////////
/// @notice Deploys a noop contract.
function deployNoop() returns (address noop_) {
assembly {
mstore(0x00, 0x60016000F3)
let size := 5
noop_ := create(0, sub(0x20, size), size)
}
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
pragma solidity 0.8.15;
import { Test } from "forge-std/Test.sol";
import { PreimageOracle } from "../src/cannon/PreimageOracle.sol";
import { PreimageOracle } from "src/cannon/PreimageOracle.sol";
import { PreimageKeyLib } from "src/cannon/PreimageKeyLib.sol";
import "src/cannon/libraries/CannonErrors.sol";
contract PreimageOracle_Test is Test {
PreimageOracle oracle;
......@@ -15,18 +17,76 @@ contract PreimageOracle_Test is Test {
}
/// @notice Test the pre-image key computation with a known pre-image.
function test_computePreimageKey_succeeds() public {
function test_keccak256PreimageKey_succeeds() public {
bytes memory preimage = hex"deadbeef";
bytes32 key = oracle.computePreimageKey(preimage);
bytes32 key = PreimageKeyLib.keccak256PreimageKey(preimage);
bytes32 known = 0x02fd4e189132273036449fc9e11198c739161b4c0116a9a2dccdfa1c492006f1;
assertEq(key, known);
}
/// @notice Tests that context-specific data [0, 24] bytes in length can be loaded correctly.
function test_loadLocalData_onePart_succeeds() public {
uint256 ident = 1;
bytes32 word = bytes32(uint256(0xdeadbeef) << 224);
uint8 size = 4;
uint8 partOffset = 0;
// Load the local data into the preimage oracle under the test contract's context.
bytes32 contextKey = oracle.loadLocalData(ident, word, size, partOffset);
// Validate that the pre-image part is set
bool ok = oracle.preimagePartOk(contextKey, partOffset);
assertTrue(ok);
// Validate the local data part
bytes32 expectedPart = 0x0000000000000004deadbeef0000000000000000000000000000000000000000;
assertEq(oracle.preimageParts(contextKey, partOffset), expectedPart);
// Validate the local data length
uint256 length = oracle.preimageLengths(contextKey);
assertEq(length, size);
}
/// @notice Tests that context-specific data [0, 32] bytes in length can be loaded correctly.
function testFuzz_loadLocalData_varyingLength_succeeds(
uint256 ident,
bytes32 word,
uint256 size,
uint256 partOffset
) public {
// Bound the size to [0, 32]
size = bound(size, 0, 32);
// Bound the part offset to [0, size + 8]
partOffset = bound(partOffset, 0, size + 8);
// Load the local data into the preimage oracle under the test contract's context.
bytes32 contextKey = oracle.loadLocalData(ident, word, uint8(size), uint8(partOffset));
// Validate that the first local data part is set
bool ok = oracle.preimagePartOk(contextKey, partOffset);
assertTrue(ok);
// Validate the first local data part
bytes32 expectedPart;
assembly {
mstore(0x20, 0x00)
mstore(0x00, shl(192, size))
mstore(0x08, word)
expectedPart := mload(partOffset)
}
assertEq(oracle.preimageParts(contextKey, partOffset), expectedPart);
// Validate the local data length
uint256 length = oracle.preimageLengths(contextKey);
assertEq(length, size);
}
/// @notice Tests that a pre-image is correctly set.
function test_loadKeccak256PreimagePart_succeeds() public {
// Set the pre-image
bytes memory preimage = hex"deadbeef";
bytes32 key = oracle.computePreimageKey(preimage);
bytes32 key = PreimageKeyLib.keccak256PreimageKey(preimage);
uint256 offset = 0;
oracle.loadKeccak256PreimagePart(offset, preimage);
......@@ -44,12 +104,21 @@ contract PreimageOracle_Test is Test {
assertTrue(ok);
}
/// @notice Tests that a pre-image cannot be set with an out-of-bounds offset.
function test_loadLocalData_outOfBoundsOffset_reverts() public {
bytes32 preimage = bytes32(uint256(0xdeadbeef));
uint256 offset = preimage.length + 9;
vm.expectRevert(PartOffsetOOB.selector);
oracle.loadLocalData(1, preimage, 32, offset);
}
/// @notice Tests that a pre-image cannot be set with an out-of-bounds offset.
function test_loadKeccak256PreimagePart_outOfBoundsOffset_reverts() public {
bytes memory preimage = hex"deadbeef";
uint256 offset = preimage.length + 9;
vm.expectRevert();
vm.expectRevert(PartOffsetOOB.selector);
oracle.loadKeccak256PreimagePart(offset, preimage);
}
......
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