public static LedgerStruct.ChannelMigrationArgs getChannelMigrationArgsInner(LedgerStruct.Channel _c)
 {
     LedgerStruct.ChannelMigrationArgs channelMigrationArgs = new LedgerStruct.ChannelMigrationArgs();
     channelMigrationArgs.disputeTimeout = _c.disputeTimeout;
     PbEntity.TokenInfo tokenInfo = _c.token;
     channelMigrationArgs.tokenType    = tokenInfo.tokenType;
     channelMigrationArgs.tokenAddress = tokenInfo.address;
     channelMigrationArgs.cooperativeWithdrawSeqNum = _c.cooperativeWithdrawSeqNum;
     _c.token = tokenInfo;
     return(channelMigrationArgs);
 }
    public static LedgerStruct.Channel _importChannelMigrationArgs(LedgerStruct.Channel _c, byte[] _fromLedgerAddr, byte[] _channelId)
    {
        BasicMethods.assert(BasicMethods._isLegalAddress(_fromLedgerAddr), "invalid contract address");
        BasicMethods.assert(BasicMethods._isByte32(_channelId), "invalid _channelId");

        DynamicCallContract dyncall = (DynamicCallContract)_fromLedgerAddr.ToDelegate();

        LedgerStruct.ChannelMigrationArgs args = (LedgerStruct.ChannelMigrationArgs)dyncall("getChannelMigrationArgs", new object[] { _channelId });
        _c.disputeTimeout = args.disputeTimeout;
        PbEntity.TokenInfo token = new PbEntity.TokenInfo();
        token.tokenType = args.tokenType;
        token.address   = args.tokenAddress;
        _c.token        = token;
        _c.cooperativeWithdrawSeqNum = args.cooperativeWithdrawSeqNum;
        return(_c);
    }