Moved common chains parts to chain class, added dogechain api